text: /*! For license information please see module.js.LICENSE.txt */
  define(["react","@grafana/data","@grafana/ui","emotion","d3","lodash"],(function(t,e,r,n,i,a){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/",r(r.s=378)}([function(e,r){e.exports=t},function(t,r){t.exports=e},function(t,e,r){var n;try{n={cloneDeep:r(280),constant:r(63),defaults:r(134),each:r(79),filter:r(124),find:r(281),flatten:r(136),forEach:r(122),forIn:r(286),has:r(80),isUndefined:r(125),last:r(287),map:r(126),mapValues:r(288),max:r(289),merge:r(291),min:r(296),minBy:r(297),now:r(298),pick:r(141),range:r(142),reduce:r(127),sortBy:r(86),uniqueId:r(143),values:r(128),zipObject:r(305)}}catch(t){}n||(n=window._),t.exports=n},function(t,e){t.exports=r},function(t,e){t.exports=n},function(t,e){var r=Array.isArray;t.exports=r},function(t,e){t.exports=i},function(t,e,r){"use strict";var n=r(2),i=r(14).Graph;function a(t,e,r,i){var a;do{a=n.uniqueId(i)}while(t.hasNode(a));return r.dummy=e,t.setNode(a,r),a}function o(t){return n.max(n.map(t.nodes(),(function(e){var r=t.node(e).rank;if(!n.isUndefined(r))return r})))}t.exports={addDummyNode:a,simplify:function(t){var e=(new i).setGraph(t.graph());return n.forEach(t.nodes(),(function(r){e.setNode(r,t.node(r))})),n.forEach(t.edges(),(function(r){var n=e.edge(r.v,r.w)||{weight:0,minlen:1},i=t.edge(r);e.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return n.forEach(t.nodes(),(function(r){t.children(r).length||e.setNode(r,t.node(r))})),n.forEach(t.edges(),(function(r){e.setEdge(r,t.edge(r))})),e},successorWeights:function(t){var e=n.map(t.nodes(),(function(e){var r={};return n.forEach(t.outEdges(e),(function(e){r[e.w]=(r[e.w]||0)+t.edge(e).weight})),r}));return n.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=n.map(t.nodes(),(function(e){var r={};return n.forEach(t.inEdges(e),(function(e){r[e.v]=(r[e.v]||0)+t.edge(e).weight})),r}));return n.zipObject(t.nodes(),e)},intersectRect:function(t,e){var r,n,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,l=t.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*c>Math.abs(o)*l?(s<0&&(l=-l),r=l*o/s,n=l):(o<0&&(c=-c),r=c,n=c*s/o);return{x:i+r,y:a+n}},buildLayerMatrix:function(t){var e=n.map(n.range(o(t)+1),(function(){return[]}));return n.forEach(t.nodes(),(function(r){var i=t.node(r),a=i.rank;n.isUndefined(a)||(e[a][i.order]=r)})),e},normalizeRanks:function(t){var e=n.min(n.map(t.nodes(),(function(e){return t.node(e).rank})));n.forEach(t.nodes(),(function(r){var i=t.node(r);n.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=n.min(n.map(t.nodes(),(function(e){return t.node(e).rank}))),r=[];n.forEach(t.nodes(),(function(n){var i=t.node(n).rank-e;r[i]||(r[i]=[]),r[i].push(n)}));var i=0,a=t.graph().nodeRankFactor;n.forEach(r,(function(e,r){n.isUndefined(e)&&r%a!=0?--i:i&&n.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,r,n){var i={width:0,height:0};arguments.length>=4&&(i.rank=r,i.order=n);return a(t,"border",i,e)},maxRank:o,partition:function(t,e){var r={lhs:[],rhs:[]};return n.forEach(t,(function(t){e(t)?r.lhs.push(t):r.rhs.push(t)})),r},time:function(t,e){var r=n.now();try{return e()}finally{console.log(t+" time: "+(n.now()-r)+"ms")}},notime:function(t,e){return e()}}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,r){var n;try{n={clone:r(238),constant:r(63),each:r(79),filter:r(124),has:r(80),isArray:r(5),isEmpty:r(257),isFunction:r(28),isUndefined:r(125),keys:r(19),map:r(126),reduce:r(127),size:r(260),transform:r(266),union:r(85),values:r(128)}}catch(t){}n||(n=window._),t.exports=n},function(t,e,r){var n=r(34);t.exports={isSubgraph:function(t,e){return!!t.children(e).length},edgeToId:function(t){return a(t.v)+":"+a(t.w)+":"+a(t.name)},applyStyle:function(t,e){e&&t.attr("style",e)},applyClass:function(t,e,r){e&&t.attr("class",e).attr("class",r+" "+t.attr("class"))},applyTransition:function(t,e){var r=e.graph();if(n.isPlainObject(r)){var i=r.transition;if(n.isFunction(i))return i(t)}return t}};var i=/:/g;function a(t){return t?String(t).replace(i,"\\:"):""}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(350),i=r(351),a=r(352),o={channel:n.default,lang:i.default,unit:a.default};e.default=o},function(t,e,r){"use strict";function n(t,e,r,n,i,a){if("undefined"!=typeof window)return arguments.length>1?document.cookie=t+"="+encodeURIComponent(e)+(r?"; expires="+new Date(+new Date+1e3*r).toUTCString()+(n?"; path="+n:"")+(i?"; domain="+i:"")+(a?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+t+"=")[1]||"").split(";")[0])}function i(){try{n("_c_","1");var t=-1!==document.cookie.indexOf("_c_");return n("_c_","",-1),t}catch(t){return!1}}r.d(e,"b",(function(){return i})),r.d(e,"d",(function(){return o})),r.d(e,"a",(function(){return a})),r.d(e,"c",(function(){return s}));var a=n,o=n;function s(t){return n(t,"",-1)}},function(t,e,r){var n=r(87),i="object"==typeof self&&self&&self.Object===Object&&self,a=n||i||Function("return this")();t.exports=a},function(t,e,r){var n;try{n=r(75)}catch(t){}n||(n=window.graphlib),t.exports=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(84),i=r(151),a=r(356),o=r(357),s=r(358),c={format:{keyword:a.default,hex:i.default,rgb:o.default,rgba:o.default,hsl:s.default,hsla:s.default},parse:function(t){if("string"!=typeof t)return t;var e=i.default.parse(t)||o.default.parse(t)||s.default.parse(t)||a.default.parse(t);if(e)return e;throw new Error('Unsupported color format: "'+t+'"')},stringify:function(t){return!t.changed&&t.color?t.color:t.type.is(n.TYPE.HSL)||void 0===t.data.r?s.default.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?o.default.stringify(t):i.default.stringify(t)}};e.default=c},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,r){var n=r(28),i=r(67);t.exports=function(t){return null!=t&&i(t.length)&&!n(t)}},function(t,e,r){var n=r(202),i=r(222),a=r(24),o=r(5),s=r(229);t.exports=function(t){return"function"==typeof t?t:null==t?a:"object"==typeof t?o(t)?i(t[0],t[1]):n(t):s(t)}},function(t,e,r){var n=r(105),i=r(70),a=r(17);t.exports=function(t){return a(t)?n(t):i(t)}},function(t,e,r){var n;if(!n)try{n=r(6)}catch(t){}n||(n=window.d3),t.exports=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(11),i=r(15);e.default=function(t,e){return n.default.lang.round(i.default.parse(t)[e])}},function(t,e,r){"use strict";(function(t){r.d(e,"b",(function(){return o}));var n=r(12);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t){var e;try{void 0===(e=JSON.parse(t))&&(e=t),"true"===e&&(e=!0),"false"===e&&(e=!1),parseFloat(e)===e&&"object"!==i(e)&&(e=parseFloat(e))}catch(r){e=t}return e}var o="object"===("undefined"==typeof self?"undefined":i(self))&&self.self===self&&self||"object"===(void 0===t?"undefined":i(t))&&t.global===t&&t||void 0,s=function(){try{if("undefined"==typeof localStorage||"undefined"==typeof JSON)return!1;localStorage.setItem("_t_","1"),localStorage.removeItem("_t_")}catch(t){return!1}return!0}(),c=Object(n.b)();function l(t){return{cookie:a(Object(n.a)(t)),localStorage:a(localStorage.getItem(t)),global:o[t]||null}}function u(t){return"string"==typeof t?t:t.storage}function d(t){return s&&(!t||"localStorage"===t)}function h(t){return c&&(!t||"cookie"===t)}var f={getItem:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return null;var r=u(e);if("all"===r)return l(t);if(d(r)){var i=localStorage.getItem(t);if(i||"localStorage"===r)return a(i)}if(h(r)){var s=Object(n.a)(t);if(s||"cookie"===r)return a(s)}return o[t]||null},setItem:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t||!e)return!1;var i=u(r),s=JSON.stringify(e);if(d(i)){var c=a(localStorage.getItem(t));return localStorage.setItem(t,s),{value:e,oldValue:c,location:"localStorage"}}if(h(i)){var l=a(Object(n.a)(t));return Object(n.d)(t,s),{value:e,oldValue:l,location:"cookie"}}var f=o[t];return o[t]=e,{value:e,oldValue:f,location:"global"}},removeItem:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return!1;var r=u(e);return d(r)?(localStorage.removeItem(t),"localStorage"):h(r)?(Object(n.c)(t),"cookie"):(o[t]=void 0,"global")}};e.a=f}).call(this,r(88))},function(t,e,r){var n=r(27),i=r(165),a=r(166),o=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?i(t):a(t)}},function(t,e){t.exports=function(t){return t}},function(t,e,r){var n=r(169),i=r(172);t.exports=function(t,e){var r=i(t,e);return n(r)?r:void 0}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(11),i=r(15);e.default=function(t,e,r){var a=i.default.parse(t),o=a[e],s=n.default.channel.clamp[e](o+r);return o!==s&&(a[e]=s),i.default.stringify(a)}},function(t,e,r){var n=r(13).Symbol;t.exports=n},function(t,e,r){var n=r(23),i=r(8);t.exports=function(t){if(!i(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,r){(function(t){var n=r(13),i=r(215),a=e&&!e.nodeType&&e,o=a&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===a?n.Buffer:void 0,c=(s?s.isBuffer:void 0)||i;t.exports=c}).call(this,r(47)(t))},function(t,e,r){var n=r(218),i=r(65),a=r(219),o=r(96),s=r(220),c=r(23),l=r(92),u=l(n),d=l(i),h=l(a),f=l(o),p=l(s),g=c;(n&&"[object DataView]"!=g(new n(new ArrayBuffer(1)))||i&&"[object Map]"!=g(new i)||a&&"[object Promise]"!=g(a.resolve())||o&&"[object Set]"!=g(new o)||s&&"[object WeakMap]"!=g(new s))&&(g=function(t){var e=c(t),r="[object Object]"==e?t.constructor:void 0,n=r?l(r):"";if(n)switch(n){case u:return"[object DataView]";case d:return"[object Map]";case h:return"[object Promise]";case f:return"[object Set]";case p:return"[object WeakMap]"}return e}),t.exports=g},function(t,e,r){var n=r(23),i=r(16);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==n(t)}},function(t,e,r){var n=r(105),i=r(241),a=r(17);t.exports=function(t){return a(t)?n(t,!0):i(t)}},function(t,e,r){var n;try{n={defaults:r(134),each:r(79),isFunction:r(28),isPlainObject:r(138),pick:r(141),has:r(80),range:r(142),uniqueId:r(143)}}catch(t){}n||(n=window._),t.exports=n},function(t,e,r){var n=r(164),i=r(16),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(t){return i(t)&&o.call(t,"callee")&&!s.call(t,"callee")};t.exports=c},function(t,e,r){var n=r(216),i=r(49),a=r(69),o=a&&a.isTypedArray,s=o?i(o):n;t.exports=s},function(t,e,r){var n=r(32);t.exports=function(t){if("string"==typeof t||n(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e,r){var n=r(54),i=r(55);t.exports=function(t,e,r,a){var o=!r;r||(r={});for(var s=-1,c=e.length;++s<c;){var l=e[s],u=a?a(r[l],t[l],l,r,t):void 0;void 0===u&&(u=t[l]),o?i(r,l,u):n(r,l,u)}return r}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=new(r(353).default)({r:0,g:0,b:0,a:0},"transparent");e.default=n},function(t,e,r){var n=r(24),i=r(89),a=r(90);t.exports=function(t,e){return a(i(t,e,n),t+"")}},function(t,e,r){var n=r(25)(Object,"create");t.exports=n},function(t,e,r){var n=r(182),i=r(183),a=r(184),o=r(185),s=r(186);function c(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},function(t,e,r){var n=r(29);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},function(t,e,r){var n=r(188);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}},function(t,e,r){var n=r(42),i=r(204),a=r(205),o=r(206),s=r(207),c=r(208);function l(t){var e=this.__data__=new n(t);this.size=e.size}l.prototype.clear=i,l.prototype.delete=a,l.prototype.get=o,l.prototype.has=s,l.prototype.set=c,t.exports=l},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){var r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&r.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e){var r=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},function(t,e,r){var n=r(5),i=r(72),a=r(224),o=r(109);t.exports=function(t,e){return n(t)?t:i(t,e)?[t]:a(o(t))}},function(t,e,r){var n=r(73),i=r(232)(n);t.exports=i},function(t,e,r){var n=r(29),i=r(17),a=r(48),o=r(8);t.exports=function(t,e,r){if(!o(r))return!1;var s=typeof e;return!!("number"==s?i(r)&&a(e,r.length):"string"==s&&e in r)&&n(r[e],t)}},function(t,e,r){var n=r(55),i=r(29),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var o=t[e];a.call(t,e)&&i(o,r)&&(void 0!==r||e in t)||n(t,e,r)}},function(t,e,r){var n=r(91);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},function(t,e,r){var n=r(106)(Object.getPrototypeOf,Object);t.exports=n},function(t,e,r){"use strict";var n=r(2);t.exports={longestPath:function(t){var e={};n.forEach(t.sources(),(function r(i){var a=t.node(i);if(n.has(e,i))return a.rank;e[i]=!0;var o=n.min(n.map(t.outEdges(i),(function(e){return r(e.w)-t.edge(e).minlen})));return o!==Number.POSITIVE_INFINITY&&null!=o||(o=0),a.rank=o}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(11),i=r(39),a=r(15),o=r(59);e.default=function(t,e,r,s){if(void 0===r&&(r=0),void 0===s&&(s=1),"number"!=typeof t)return o.default(t,{a:e});var c=i.default.set({r:n.default.channel.clamp.r(t),g:n.default.channel.clamp.g(e),b:n.default.channel.clamp.b(r),a:n.default.channel.clamp.a(s)});return a.default.stringify(c)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(11),i=r(15);e.default=function(t,e){var r=i.default.parse(t);for(var a in e)r[a]=n.default.channel.clamp[a](e[a]);return i.default.stringify(r)}},function(t,e){t.exports=a},function(t,e,r){var n=r(62),i=r(163);t.exports=function t(e,r,a,o,s){var c=-1,l=e.length;for(a||(a=i),s||(s=[]);++c<l;){var u=e[c];r>0&&a(u)?r>1?t(u,r-1,a,o,s):n(s,u):o||(s[s.length]=u)}return s}},function(t,e){t.exports=function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e,r){var n=r(175),i=r(187),a=r(189),o=r(190),s=r(191);function c(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},function(t,e,r){var n=r(25)(r(13),"Map");t.exports=n},function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e,r){var n=r(103),i=r(104),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(t){return null==t?[]:(t=Object(t),n(o(t),(function(e){return a.call(t,e)})))}:i;t.exports=s},function(t,e,r){(function(t){var n=r(87),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i&&n.process,s=function(){try{var t=a&&a.require&&a.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=s}).call(this,r(47)(t))},function(t,e,r){var n=r(50),i=r(217),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return i(t);var e=[];for(var r in Object(t))a.call(t,r)&&"constructor"!=r&&e.push(r);return e}},function(t,e,r){var n=r(51),i=r(37);t.exports=function(t,e){for(var r=0,a=(e=n(e,t)).length;null!=t&&r<a;)t=t[i(e[r++])];return r&&r==a?t:void 0}},function(t,e,r){var n=r(5),i=r(32),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=function(t,e){if(n(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!i(t))||(o.test(t)||!a.test(t)||null!=e&&t in Object(e))}},function(t,e,r){var n=r(74),i=r(19);t.exports=function(t,e){return t&&n(t,e,i)}},function(t,e,r){var n=r(231)();t.exports=n},function(t,e,r){var n=r(237);t.exports={Graph:n.Graph,json:r(269),alg:r(270),version:n.version}},function(t,e,r){"use strict";var n=r(9);t.exports=i;function i(t){this._isDirected=!n.has(t,"directed")||t.directed,this._isMultigraph=!!n.has(t,"multigraph")&&t.multigraph,this._isCompound=!!n.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=n.constant(void 0),this._defaultEdgeLabelFn=n.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function a(t,e){t[e]?t[e]++:t[e]=1}function o(t,e){--t[e]||delete t[e]}function s(t,e,r,i){var a=""+e,o=""+r;if(!t&&a>o){var s=a;a=o,o=s}return a+""+o+""+(n.isUndefined(i)?"\0":i)}function c(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return n&&(s.name=n),s}function l(t,e){return s(t,e.v,e.w,e.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(t){return this._label=t,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(t){return n.isFunction(t)||(t=n.constant(t)),this._defaultNodeLabelFn=t,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return n.keys(this._nodes)},i.prototype.sources=function(){var t=this;return n.filter(this.nodes(),(function(e){return n.isEmpty(t._in[e])}))},i.prototype.sinks=function(){var t=this;return n.filter(this.nodes(),(function(e){return n.isEmpty(t._out[e])}))},i.prototype.setNodes=function(t,e){var r=arguments,i=this;return n.each(t,(function(t){r.length>1?i.setNode(t,e):i.setNode(t)})),this},i.prototype.setNode=function(t,e){return n.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]="\0",this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},i.prototype.node=function(t){return this._nodes[t]},i.prototype.hasNode=function(t){return n.has(this._nodes,t)},i.prototype.removeNode=function(t){var e=this;if(n.has(this._nodes,t)){var r=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],n.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),n.each(n.keys(this._in[t]),r),delete this._in[t],delete this._preds[t],n.each(n.keys(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},i.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(n.isUndefined(e))e="\0";else{for(var r=e+="";!n.isUndefined(r);r=this.parent(r))if(r===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},i.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},i.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if("\0"!==e)return e}},i.prototype.children=function(t){if(n.isUndefined(t)&&(t="\0"),this._isCompound){var e=this._children[t];if(e)return n.keys(e)}else{if("\0"===t)return this.nodes();if(this.hasNode(t))return[]}},i.prototype.predecessors=function(t){var e=this._preds[t];if(e)return n.keys(e)},i.prototype.successors=function(t){var e=this._sucs[t];if(e)return n.keys(e)},i.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return n.union(e,this.successors(t))},i.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},i.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;n.each(this._nodes,(function(r,n){t(n)&&e.setNode(n,r)})),n.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,r.edge(t))}));var i={};return this._isCompound&&n.each(e.nodes(),(function(t){e.setParent(t,function t(n){var a=r.parent(n);return void 0===a||e.hasNode(a)?(i[n]=a,a):a in i?i[a]:t(a)}(t))})),e},i.prototype.setDefaultEdgeLabel=function(t){return n.isFunction(t)||(t=n.constant(t)),this._defaultEdgeLabelFn=t,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return n.values(this._edgeObjs)},i.prototype.setPath=function(t,e){var r=this,i=arguments;return n.reduce(t,(function(t,n){return i.length>1?r.setEdge(t,n,e):r.setEdge(t,n),n})),this},i.prototype.setEdge=function(){var t,e,r,i,o=!1,l=arguments[0];"object"==typeof l&&null!==l&&"v"in l?(t=l.v,e=l.w,r=l.name,2===arguments.length&&(i=arguments[1],o=!0)):(t=l,e=arguments[1],r=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),t=""+t,e=""+e,n.isUndefined(r)||(r=""+r);var u=s(this._isDirected,t,e,r);if(n.has(this._edgeLabels,u))return o&&(this._edgeLabels[u]=i),this;if(!n.isUndefined(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[u]=o?i:this._defaultEdgeLabelFn(t,e,r);var d=c(this._isDirected,t,e,r);return t=d.v,e=d.w,Object.freeze(d),this._edgeObjs[u]=d,a(this._preds[e],t),a(this._sucs[t],e),this._in[e][u]=d,this._out[t][u]=d,this._edgeCount++,this},i.prototype.edge=function(t,e,r){var n=1===arguments.length?l(this._isDirected,arguments[0]):s(this._isDirected,t,e,r);return this._edgeLabels[n]},i.prototype.hasEdge=function(t,e,r){var i=1===arguments.length?l(this._isDirected,arguments[0]):s(this._isDirected,t,e,r);return n.has(this._edgeLabels,i)},i.prototype.removeEdge=function(t,e,r){var n=1===arguments.length?l(this._isDirected,arguments[0]):s(this._isDirected,t,e,r),i=this._edgeObjs[n];return i&&(t=i.v,e=i.w,delete this._edgeLabels[n],delete this._edgeObjs[n],o(this._preds[e],t),o(this._sucs[t],e),delete this._in[e][n],delete this._out[t][n],this._edgeCount--),this},i.prototype.inEdges=function(t,e){var r=this._in[t];if(r){var i=n.values(r);return e?n.filter(i,(function(t){return t.v===e})):i}},i.prototype.outEdges=function(t,e){var r=this._out[t];if(r){var i=n.values(r);return e?n.filter(i,(function(t){return t.w===e})):i}},i.prototype.nodeEdges=function(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}},function(t,e,r){var n=r(100);t.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},function(t,e,r){t.exports=r(122)},function(t,e,r){var n=r(256),i=r(111);t.exports=function(t,e){return null!=t&&i(t,e,n)}},function(t,e,r){var n=r(32);t.exports=function(t,e,r){for(var i=-1,a=t.length;++i<a;){var o=t[i],s=e(o);if(null!=s&&(void 0===c?s==s&&!n(s):r(s,c)))var c=s,l=o}return l}},function(t,e){t.exports=function(t,e,r,n){var i=t.x,a=t.y,o=i-n.x,s=a-n.y,c=Math.sqrt(e*e*s*s+r*r*o*o),l=Math.abs(e*r*o/c);n.x<i&&(l=-l);var u=Math.abs(e*r*s/c);n.y<a&&(u=-u);return{x:i+l,y:a+u}}},function(t,e,r){var n=r(336),i=r(150),a=r(337);t.exports=function(t,e,r){var o=e.label,s=t.append("g");"svg"===e.labelType?a(s,e):"string"!=typeof o||"html"===e.labelType?i(s,e):n(s,e);var c,l=s.node().getBBox();switch(r){case"top":c=-e.height/2;break;case"bottom":c=e.height/2-l.height;break;default:c=-l.height/2}return s.attr("transform","translate("+-l.width/2+","+c+")"),s}},function(t,e,r){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.ALL=0]="ALL",t[t.RGB=1]="RGB",t[t.HSL=2]="HSL"}(n||(n={})),e.TYPE=n},function(t,e,r){var n=r(61),i=r(40),a=r(174),o=r(97),s=i((function(t){return a(n(t,1,o,!0))}));t.exports=s},function(t,e,r){var n=r(61),i=r(201),a=r(40),o=r(53),s=a((function(t,e){if(null==t)return[];var r=e.length;return r>1&&o(t,e[0],e[1])?e=[]:r>2&&o(e[0],e[1],e[2])&&(e=[e[0]]),i(t,n(e,1),[])}));t.exports=s},function(t,e,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(this,r(88))},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(167),i=Math.max;t.exports=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var a=arguments,o=-1,s=i(a.length-e,0),c=Array(s);++o<s;)c[o]=a[e+o];o=-1;for(var l=Array(e+1);++o<e;)l[o]=a[o];return l[e]=r(c),n(t,this,l)}}},function(t,e,r){var n=r(168),i=r(173)(n);t.exports=i},function(t,e,r){var n=r(25),i=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e){var r=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,r){var n=r(64),i=r(192),a=r(193);function o(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new n;++e<r;)this.add(t[e])}o.prototype.add=o.prototype.push=i,o.prototype.has=a,t.exports=o},function(t,e){t.exports=function(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a<i;)if(e(t[a],a,t))return a;return-1}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,r){var n=r(25)(r(13),"Set");t.exports=n},function(t,e,r){var n=r(17),i=r(16);t.exports=function(t){return i(t)&&n(t)}},function(t,e,r){var n=r(209),i=r(16);t.exports=function t(e,r,a,o,s){return e===r||(null==e||null==r||!i(e)&&!i(r)?e!=e&&r!=r:n(e,r,a,o,t,s))}},function(t,e,r){var n=r(93),i=r(210),a=r(95);t.exports=function(t,e,r,o,s,c){var l=1&r,u=t.length,d=e.length;if(u!=d&&!(l&&d>u))return!1;var h=c.get(t);if(h&&c.get(e))return h==e;var f=-1,p=!0,g=2&r?new n:void 0;for(c.set(t,e),c.set(e,t);++f<u;){var y=t[f],m=e[f];if(o)var v=l?o(m,y,f,e,t,c):o(y,m,f,t,e,c);if(void 0!==v){if(v)continue;p=!1;break}if(g){if(!i(e,(function(t,e){if(!a(g,e)&&(y===t||s(y,t,r,o,c)))return g.push(e)}))){p=!1;break}}else if(y!==m&&!s(y,m,r,o,c)){p=!1;break}}return c.delete(t),c.delete(e),p}},function(t,e,r){var n=r(13).Uint8Array;t.exports=n},function(t,e,r){var n=r(102),i=r(68),a=r(19);t.exports=function(t){return n(t,a,i)}},function(t,e,r){var n=r(62),i=r(5);t.exports=function(t,e,r){var a=e(t);return i(t)?a:n(a,r(t))}},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,a=[];++r<n;){var o=t[r];e(o,r,t)&&(a[i++]=o)}return a}},function(t,e){t.exports=function(){return[]}},function(t,e,r){var n=r(214),i=r(35),a=r(5),o=r(30),s=r(48),c=r(36),l=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=a(t),u=!r&&i(t),d=!r&&!u&&o(t),h=!r&&!u&&!d&&c(t),f=r||u||d||h,p=f?n(t.length,String):[],g=p.length;for(var y in t)!e&&!l.call(t,y)||f&&("length"==y||d&&("offset"==y||"parent"==y)||h&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,g))||p.push(y);return p}},function(t,e){t.exports=function(t,e){return function(r){return t(e(r))}}},function(t,e,r){var n=r(8);t.exports=function(t){return t==t&&!n(t)}},function(t,e){t.exports=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}}},function(t,e,r){var n=r(227);t.exports=function(t){return null==t?"":n(t)}},function(t,e,r){var n=r(228),i=r(111);t.exports=function(t,e){return null!=t&&i(t,e,n)}},function(t,e,r){var n=r(51),i=r(35),a=r(5),o=r(48),s=r(67),c=r(37);t.exports=function(t,e,r){for(var l=-1,u=(e=n(e,t)).length,d=!1;++l<u;){var h=c(e[l]);if(!(d=null!=t&&r(t,h)))break;t=t[h]}return d||++l!=u?d:!!(u=null==t?0:t.length)&&s(u)&&o(h,u)&&(a(t)||i(t))}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e,r){var n=r(52),i=r(17);t.exports=function(t,e){var r=-1,a=i(t)?Array(t.length):[];return n(t,(function(t,n,i){a[++r]=e(t,n,i)})),a}},function(t,e,r){t.exports={graphlib:r(14),layout:r(279),debug:r(328),util:{time:r(7).time,notime:r(7).notime},version:r(329)}},function(t,e,r){var n=r(46),i=r(77),a=r(54),o=r(239),s=r(240),c=r(116),l=r(117),u=r(243),d=r(244),h=r(101),f=r(245),p=r(31),g=r(246),y=r(247),m=r(120),v=r(5),b=r(30),x=r(251),k=r(8),w=r(253),_=r(19),E={};E["[object Arguments]"]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E["[object Object]"]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E["[object Function]"]=E["[object WeakMap]"]=!1,t.exports=function t(e,r,C,T,O,S){var A,j=1&r,D=2&r,B=4&r;if(C&&(A=O?C(e,T,O,S):C(e)),void 0!==A)return A;if(!k(e))return e;var N=v(e);if(N){if(A=g(e),!j)return l(e,A)}else{var M=p(e),L="[object Function]"==M||"[object GeneratorFunction]"==M;if(b(e))return c(e,j);if("[object Object]"==M||"[object Arguments]"==M||L&&!O){if(A=D||L?{}:m(e),!j)return D?d(e,s(A,e)):u(e,o(A,e))}else{if(!E[M])return O?e:{};A=y(e,M,j)}}S||(S=new n);var I=S.get(e);if(I)return I;S.set(e,A),w(e)?e.forEach((function(n){A.add(t(n,r,C,n,e,S))})):x(e)&&e.forEach((function(n,i){A.set(i,t(n,r,C,i,e,S))}));var P=B?D?f:h:D?keysIn:_,F=N?void 0:P(e);return i(F||e,(function(n,i){F&&(n=e[i=n]),a(A,i,t(n,r,C,i,e,S))})),A}},function(t,e,r){(function(t){var n=r(13),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=s?s(r):new t.constructor(r);return t.copy(n),n}}).call(this,r(47)(t))},function(t,e){t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},function(t,e,r){var n=r(62),i=r(56),a=r(68),o=r(104),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)n(e,a(t)),t=i(t);return e}:o;t.exports=s},function(t,e,r){var n=r(78);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},function(t,e,r){var n=r(121),i=r(56),a=r(50);t.exports=function(t){return"function"!=typeof t.constructor||a(t)?{}:n(i(t))}},function(t,e,r){var n=r(8),i=Object.create,a=function(){function t(){}return function(e){if(!n(e))return{};if(i)return i(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();t.exports=a},function(t,e,r){var n=r(77),i=r(52),a=r(123),o=r(5);t.exports=function(t,e){return(o(t)?n:i)(t,a(e))}},function(t,e,r){var n=r(24);t.exports=function(t){return"function"==typeof t?t:n}},function(t,e,r){var n=r(103),i=r(255),a=r(18),o=r(5);t.exports=function(t,e){return(o(t)?n:i)(t,a(e,3))}},function(t,e){t.exports=function(t){return void 0===t}},function(t,e,r){var n=r(45),i=r(18),a=r(113),o=r(5);t.exports=function(t,e){return(o(t)?n:a)(t,i(e,3))}},function(t,e,r){var n=r(258),i=r(52),a=r(18),o=r(259),s=r(5);t.exports=function(t,e,r){var c=s(t)?n:o,l=arguments.length<3;return c(t,a(e,4),r,l,i)}},function(t,e,r){var n=r(267),i=r(19);t.exports=function(t){return null==t?[]:n(t,i(t))}},function(t,e,r){var n=r(9),i=r(130);t.exports=function(t,e,r,n){return function(t,e,r,n){var a,o,s={},c=new i,l=function(t){var e=t.v!==a?t.v:t.w,n=s[e],i=r(t),l=o.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);l<n.distance&&(n.distance=l,n.predecessor=a,c.decrease(e,l))};t.nodes().forEach((function(t){var r=t===e?0:Number.POSITIVE_INFINITY;s[t]={distance:r},c.add(t,r)}));for(;c.size()>0&&(a=c.removeMin(),(o=s[a]).distance!==Number.POSITIVE_INFINITY);)n(a).forEach(l);return s}(t,String(e),r||a,n||function(e){return t.outEdges(e)})};var a=n.constant(1)},function(t,e,r){var n=r(9);function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return n.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var r=this._keyIndices;if(t=String(t),!n.has(r,t)){var i=this._arr,a=i.length;return r[t]=a,i.push({key:t,priority:e}),this._decrease(a),!0}return!1},i.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},i.prototype.decrease=function(t,e){var r=this._keyIndices[t];if(e>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[r].priority+" New: "+e);this._arr[r].priority=e,this._decrease(r)},i.prototype._heapify=function(t){var e=this._arr,r=2*t,n=r+1,i=t;r<e.length&&(i=e[r].priority<e[i].priority?r:i,n<e.length&&(i=e[n].priority<e[i].priority?n:i),i!==t&&(this._swap(t,i),this._heapify(i)))},i.prototype._decrease=function(t){for(var e,r=this._arr,n=r[t].priority;0!==t&&!(r[e=t>>1].priority<n);)this._swap(t,e),t=e},i.prototype._swap=function(t,e){var r=this._arr,n=this._keyIndices,i=r[t],a=r[e];r[t]=a,r[e]=i,n[a.key]=t,n[i.key]=e}},function(t,e,r){var n=r(9);t.exports=function(t){var e=0,r=[],i={},a=[];return t.nodes().forEach((function(o){n.has(i,o)||function o(s){var c=i[s]={onStack:!0,lowlink:e,index:e++};if(r.push(s),t.successors(s).forEach((function(t){n.has(i,t)?i[t].onStack&&(c.lowlink=Math.min(c.lowlink,i[t].index)):(o(t),c.lowlink=Math.min(c.lowlink,i[t].lowlink))})),c.lowlink===c.index){var l,u=[];do{l=r.pop(),i[l].onStack=!1,u.push(l)}while(s!==l);a.push(u)}}(o)})),a}},function(t,e,r){var n=r(9);function i(t){var e={},r={},i=[];if(n.each(t.sinks(),(function o(s){if(n.has(r,s))throw new a;n.has(e,s)||(r[s]=!0,e[s]=!0,n.each(t.predecessors(s),o),delete r[s],i.push(s))})),n.size(e)!==t.nodeCount())throw new a;return i}function a(){}t.exports=i,i.CycleException=a,a.prototype=new Error},function(t,e,r){var n=r(9);t.exports=function(t,e,r){n.isArray(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],o={};return n.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);!function t(e,r,i,a,o,s){n.has(a,r)||(a[r]=!0,i||s.push(r),n.each(o(r),(function(r){t(e,r,i,a,o,s)})),i&&s.push(r))}(t,e,"post"===r,o,i,a)})),a}},function(t,e,r){var n=r(40),i=r(29),a=r(53),o=r(33),s=Object.prototype,c=s.hasOwnProperty,l=n((function(t,e){t=Object(t);var r=-1,n=e.length,l=n>2?e[2]:void 0;for(l&&a(e[0],e[1],l)&&(n=1);++r<n;)for(var u=e[r],d=o(u),h=-1,f=d.length;++h<f;){var p=d[h],g=t[p];(void 0===g||i(g,s[p])&&!c.call(t,p))&&(t[p]=u[p])}return t}));t.exports=l},function(t,e,r){var n=r(285);t.exports=function(t){return t?(t=n(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},function(t,e,r){var n=r(61);t.exports=function(t){return(null==t?0:t.length)?n(t,1):[]}},function(t,e,r){var n=r(55),i=r(29);t.exports=function(t,e,r){(void 0!==r&&!i(t[e],r)||void 0===r&&!(e in t))&&n(t,e,r)}},function(t,e,r){var n=r(23),i=r(56),a=r(16),o=Function.prototype,s=Object.prototype,c=o.toString,l=s.hasOwnProperty,u=c.call(Object);t.exports=function(t){if(!a(t)||"[object Object]"!=n(t))return!1;var e=i(t);if(null===e)return!0;var r=l.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==u}},function(t,e){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},function(t,e){t.exports=function(t,e){return t<e}},function(t,e,r){var n=r(299),i=r(302)((function(t,e){return null==t?{}:n(t,e)}));t.exports=i},function(t,e,r){var n=r(303)();t.exports=n},function(t,e,r){var n=r(109),i=0;t.exports=function(t){var e=++i;return n(t)+e}},function(t,e,r){"use strict";var n=r(2),i=r(14).Graph,a=r(57).slack;function o(t,e){return n.forEach(t.nodes(),(function r(i){n.forEach(e.nodeEdges(i),(function(n){var o=n.v,s=i===o?n.w:o;t.hasNode(s)||a(e,n)||(t.setNode(s,{}),t.setEdge(i,s,{}),r(s))}))})),t.nodeCount()}function s(t,e){return n.minBy(e.edges(),(function(r){if(t.hasNode(r.v)!==t.hasNode(r.w))return a(e,r)}))}function c(t,e,r){n.forEach(t.nodes(),(function(t){e.node(t).rank+=r}))}t.exports=function(t){var e,r,n=new i({directed:!1}),l=t.nodes()[0],u=t.nodeCount();n.setNode(l,{});for(;o(n,t)<u;)e=s(n,t),r=n.hasNode(e.v)?a(t,e):-a(t,e),c(n,t,r);return n}},function(t,e,r){var n;try{n=r(114)}catch(t){}n||(n=window.dagre),t.exports=n},function(t,e){t.exports=function(t,e){return t.intersect(e)}},function(t,e,r){var n=r(82);t.exports=function(t,e,r){return n(t,e,e,r)}},function(t,e,r){var n=r(333);t.exports=function(t,e,r){var i=t.x,a=t.y,o=[],s=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;e.forEach((function(t){s=Math.min(s,t.x),c=Math.min(c,t.y)}));for(var l=i-t.width/2-s,u=a-t.height/2-c,d=0;d<e.length;d++){var h=e[d],f=e[d<e.length-1?d+1:0],p=n(t,r,{x:l+h.x,y:u+h.y},{x:l+f.x,y:u+f.y});p&&o.push(p)}if(!o.length)return console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t;o.length>1&&o.sort((function(t,e){var n=t.x-r.x,i=t.y-r.y,a=Math.sqrt(n*n+i*i),o=e.x-r.x,s=e.y-r.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}));return o[0]}},function(t,e){t.exports=function(t,e){var r,n,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,l=t.height/2;Math.abs(s)*c>Math.abs(o)*l?(s<0&&(l=-l),r=0===s?0:l*o/s,n=l):(o<0&&(c=-c),r=c,n=0===o?0:c*s/o);return{x:i+r,y:a+n}}},function(t,e,r){var n=r(10);t.exports=function(t,e){var r=t.append("foreignObject").attr("width","100000"),i=r.append("xhtml:div");i.attr("xmlns","http://www.w3.org/1999/xhtml");var a=e.label;switch(typeof a){case"function":i.insert(a);break;case"object":i.insert((function(){return a}));break;default:i.html(a)}n.applyStyle(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var o=i.node().getBoundingClientRect();return r.attr("width",o.width).attr("height",o.height),r}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(11),i=r(39),a=r(355),o={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:function(t){if(35===t.charCodeAt(0)){var e=t.match(o.re);if(e){var r=e[1],n=parseInt(r,16),a=r.length,s=a%4==0,c=a>4,l=c?1:17,u=c?8:4,d=s?0:-1,h=c?255:15;return i.default.set({r:(n>>u*(d+3)&h)*l,g:(n>>u*(d+2)&h)*l,b:(n>>u*(d+1)&h)*l,a:s?(n&h)*l/255:1},t)}}},stringify:function(t){return t.a<1?"#"+a.DEC2HEX[Math.round(t.r)]+a.DEC2HEX[Math.round(t.g)]+a.DEC2HEX[Math.round(t.b)]+n.default.unit.frac2hex(t.a):"#"+a.DEC2HEX[Math.round(t.r)]+a.DEC2HEX[Math.round(t.g)]+a.DEC2HEX[Math.round(t.b)]}};e.default=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(11),i=r(39),a=r(15);e.default=function(t,e,r,o){void 0===o&&(o=1);var s=i.default.set({h:n.default.channel.clamp.h(t),s:n.default.channel.clamp.s(e),l:n.default.channel.clamp.l(r),a:n.default.channel.clamp.a(o)});return a.default.stringify(s)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(21);e.default=function(t){return n.default(t,"a")}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(11),i=r(15);e.default=function(t){var e=i.default.parse(t),r=e.r,a=e.g,o=e.b,s=.2126*n.default.channel.toLinear(r)+.7152*n.default.channel.toLinear(a)+.0722*n.default.channel.toLinear(o);return n.default.lang.round(s)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(154);e.default=function(t){return n.default(t)>=.5}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(26);e.default=function(t,e){return n.default(t,"a",e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(26);e.default=function(t,e){return n.default(t,"a",-e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(15),i=r(59);e.default=function(t,e){var r=n.default.parse(t),a={};for(var o in e)e[o]&&(a[o]=r[o]+e[o]);return i.default(t,a)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(15),i=r(58);e.default=function(t,e,r){void 0===r&&(r=50);var a=n.default.parse(t),o=a.r,s=a.g,c=a.b,l=a.a,u=n.default.parse(e),d=u.r,h=u.g,f=u.b,p=u.a,g=r/100,y=2*g-1,m=l-p,v=((y*m==-1?y:(y+m)/(1+y*m))+1)/2,b=1-v,x=o*v+d*b,k=s*v+h*b,w=c*v+f*b,_=l*g+p*(1-g);return i.default(x,k,w,_)}},function(t,e){},function(t,e,r){t.exports=function(t,e,r,n,i){for(e=e.split?e.split("."):e,n=0;n<e.length;n++)t=t?t[e[n]]:i;return t===i?r:t}},function(t,e,r){var n;"undefined"!=typeof self&&self,n=function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s="./src/mermaid.js")}({"./node_modules/node-libs-browser/mock/empty.js":function(t,e){},"./node_modules/path-browserify/index.js":function(t,e,r){(function(t){function r(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function n(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n<t.length;n++)e(t[n],n,t)&&r.push(t[n]);return r}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(i?"/":"")+(e=r(n(e.split("/"),(function(t){return!!t})),!i).join("/"))||"."},e.normalize=function(t){var a=e.isAbsolute(t),o="/"===i(t,-1);return(t=r(n(t.split("/"),(function(t){return!!t})),!a).join("/"))||a||(t="."),t&&o&&(t+="/"),(a?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(n(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,r){function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=e.resolve(t).substr(1),r=e.resolve(r).substr(1);for(var i=n(t.split("/")),a=n(r.split("/")),o=Math.min(i.length,a.length),s=o,c=0;c<o;c++)if(i[c]!==a[c]){s=c;break}var l=[];for(c=s;c<i.length;c++)l.push("..");return(l=l.concat(a.slice(s))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),r=47===e,n=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!i){n=a;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"/":t.slice(0,n)},e.basename=function(t,e){var r=function(t){"string"!=typeof t&&(t+="");var e,r=0,n=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){r=e+1;break}}else-1===n&&(i=!1,n=e+1);return-1===n?"":t.slice(r,n)}(t);return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},e.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,r=0,n=-1,i=!0,a=0,o=t.length-1;o>=0;--o){var s=t.charCodeAt(o);if(47!==s)-1===n&&(i=!1,n=o+1),46===s?-1===e?e=o:1!==a&&(a=1):-1!==e&&(a=-1);else if(!i){r=o+1;break}}return-1===e||-1===n||0===a||1===a&&e===n-1&&e===r+1?"":t.slice(e,n)};var i="b"==="ab".substr(-1)?function(t,e,r){return t.substr(e,r)}:function(t,e,r){return e<0&&(e=t.length+e),t.substr(e,r)}}).call(this,r("./node_modules/process/browser.js"))},"./node_modules/process/browser.js":function(t,e){var r,n,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(t){r=a}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var c,l=[],u=!1,d=-1;function h(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&f())}function f(){if(!u){var t=s(h);u=!0;for(var e=l.length;e;){for(c=l,l=[];++d<e;)c&&c[d].run();d=-1,e=l.length}c=null,u=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function g(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new p(t,e)),1!==l.length||u||s(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},"./node_modules/webpack/buildin/module.js":function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},"./package.json":function(t){t.exports=JSON.parse('{"name":"mermaid","version":"8.8.0","description":"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.","main":"dist/mermaid.core.js","keywords":["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph"],"scripts":{"build:development":"webpack --progress --colors","build:production":"yarn build:development -p --config webpack.config.prod.babel.js","build":"yarn build:development && yarn build:production","postbuild":"documentation build src/mermaidAPI.js src/config.js --shallow -f md --markdown-toc false | gsed \'1i---\\\\nsort: 3\\\\ntitle: Configurations\\\\n---\\\\n\' > docs/getting-started/Setup.md","build:watch":"yarn build --watch","minify":"minify ./dist/mermaid.js > ./dist/mermaid.min.js","release":"yarn build","lint":"eslint src","e2e:depr":"yarn lint && jest e2e --config e2e/jest.config.js","cypress":"percy exec -- cypress run","e2e":"start-server-and-test dev http://localhost:9000/ cypress","e2e-upd":"yarn lint && jest e2e -u --config e2e/jest.config.js","dev":"webpack-dev-server --config webpack.config.e2e.js","test":"yarn lint && jest src/.*","test:watch":"jest --watch src","prepublishOnly":"yarn build && yarn test && yarn e2e","prepare":"yarn build"},"repository":{"type":"git","url":"https://github.com/knsv/mermaid"},"author":"Knut Sveidqvist","license":"MIT","standard":{"ignore":["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],"globals":["page"]},"dependencies":{"@braintree/sanitize-url":"^3.1.0","babel-eslint":"^10.1.0","d3":"^5.7.0","dagre":"^0.8.4","dagre-d3":"^0.6.4","entity-decode":"^2.0.2","graphlib":"^2.1.7","he":"^1.2.0","khroma":"^1.1.0","minify":"^4.1.1","moment-mini":"^2.22.1","stylis":"^3.5.2"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.8.4","@babel/register":"^7.0.0","@percy/cypress":"*","babel-core":"7.0.0-bridge.0","babel-jest":"^24.9.0","babel-loader":"^8.0.4","coveralls":"^3.0.2","css-loader":"^2.0.1","css-to-string-loader":"^0.1.3","cypress":"4.0.1","documentation":"^12.0.1","eslint":"^6.3.0","eslint-config-prettier":"^6.3.0","eslint-plugin-prettier":"^3.1.0","husky":"^1.2.1","identity-obj-proxy":"^3.0.0","jest":"^24.9.0","jison":"^0.4.18","moment":"^2.23.0","node-sass":"^4.12.0","prettier":"^1.18.2","puppeteer":"^1.17.0","sass-loader":"^7.1.0","start-server-and-test":"^1.10.6","terser-webpack-plugin":"^2.2.2","webpack":"^4.41.2","webpack-bundle-analyzer":"^3.7.0","webpack-cli":"^3.1.2","webpack-dev-server":"^3.4.1","webpack-node-externals":"^1.7.2","yarn-upgrade-all":"^0.5.0"},"files":["dist"],"yarn-upgrade-all":{"ignore":["babel-core"]},"sideEffects":["**/*.css","**/*.scss"],"husky":{"hooks":{"pre-push":"yarn test"}}}')},"./src/config.js":function(t,e,r){"use strict";r.r(e),r.d(e,"defaultConfig",(function(){return c})),r.d(e,"updateCurrentConfig",(function(){return h})),r.d(e,"setSiteConfig",(function(){return f})),r.d(e,"setSiteConfigDelta",(function(){return p})),r.d(e,"updateSiteConfig",(function(){return g})),r.d(e,"getSiteConfig",(function(){return y})),r.d(e,"setConfig",(function(){return m})),r.d(e,"getConfig",(function(){return v})),r.d(e,"sanitize",(function(){return b})),r.d(e,"addDirective",(function(){return x})),r.d(e,"reset",(function(){return k}));var n,i=r("./src/utils.js"),a=r("./src/logger.js"),o=r("./src/themes/index.js"),s=r("./src/defaultConfig.js"),c=Object.freeze(s.default),l=Object(i.assignWithDepth)({},c),u=[],d=Object(i.assignWithDepth)({},c),h=function(t,e){for(var r=Object(i.assignWithDepth)({},t),a={},s=0;s<e.length;s++){var c=e[s];b(c),a=Object(i.assignWithDepth)(a,c)}if(r=Object(i.assignWithDepth)(r,a),a.theme){var l=Object(i.assignWithDepth)(n.themeVariables||{},a.themeVariables);r.themeVariables=o.default[r.theme].getThemeVariables(l)}return d=r,r},f=function(t){return l=Object(i.assignWithDepth)({},c),l=Object(i.assignWithDepth)(l,t),t.theme&&(l.themeVariables=o.default[t.theme].getThemeVariables(t.themeVariables)),d=h(l,u),l},p=function(t){n=Object(i.assignWithDepth)({},t)},g=function(t){return l=Object(i.assignWithDepth)(l,t),h(l,u),l},y=function(){return Object(i.assignWithDepth)({},l)},m=function(t){return Object(i.assignWithDepth)(d,t),v()},v=function(){return Object(i.assignWithDepth)({},d)},b=function(t){Object.keys(l.secure).forEach((function(e){void 0!==t[l.secure[e]]&&(a.logger.debug("Denied attempt to modify a secure key ".concat(l.secure[e]),t[l.secure[e]]),delete t[l.secure[e]])}))},x=function(t){t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),u.push(t),h(l,u)},k=function(){h(l,u=[])}},"./src/dagre-wrapper/clusters.js":function(t,e,r){"use strict";r.r(e),r.d(e,"insertCluster",(function(){return u})),r.d(e,"getClusterTitleWidth",(function(){return d})),r.d(e,"clear",(function(){return h})),r.d(e,"positionCluster",(function(){return f}));var n=r("./src/dagre-wrapper/intersect/intersect-rect.js"),i=r("./src/logger.js"),a=r("./src/dagre-wrapper/createLabel.js"),o=r("d3"),s=r("./src/config.js"),c={rect:function(t,e){i.logger.trace("Creating subgraph rect for ",e.id,e);var r=t.insert("g").attr("class","cluster").attr("id",e.id),c=r.insert("rect",":first-child"),l=r.insert("g").attr("class","cluster-label"),u=l.node().appendChild(Object(a.default)(e.labelText,e.labelStyle,void 0,!0)),d=u.getBBox();if(Object(s.getConfig)().flowchart.htmlLabels){var h=u.children[0],f=Object(o.select)(u);d=h.getBoundingClientRect(),f.attr("width",d.width),f.attr("height",d.height)}var p=0*e.padding,g=p/2;i.logger.trace("Data ",e,JSON.stringify(e)),c.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-g).attr("y",e.y-e.height/2-g).attr("width",e.width+p).attr("height",e.height+p),l.attr("transform","translate("+(e.x-d.width/2)+", "+(e.y-e.height/2-e.padding/3+3)+")");var y=c.node().getBBox();return e.width=y.width,e.height=y.height,e.intersect=function(t){return Object(n.default)(e,t)},r},roundedWithTitle:function(t,e){var r=t.insert("g").attr("class",e.classes).attr("id",e.id),i=r.insert("rect",":first-child"),c=r.insert("g").attr("class","cluster-label"),l=r.append("rect"),u=c.node().appendChild(Object(a.default)(e.labelText,e.labelStyle,void 0,!0)),d=u.getBBox();if(Object(s.getConfig)().flowchart.htmlLabels){var h=u.children[0],f=Object(o.select)(u);d=h.getBoundingClientRect(),f.attr("width",d.width),f.attr("height",d.height)}d=u.getBBox();var p=0*e.padding,g=p/2;i.attr("class","outer").attr("x",e.x-e.width/2-g).attr("y",e.y-e.height/2-g).attr("width",e.width+p).attr("height",e.height+p),l.attr("class","inner").attr("x",e.x-e.width/2-g).attr("y",e.y-e.height/2-g+d.height-1).attr("width",e.width+p).attr("height",e.height+p-d.height-3),c.attr("transform","translate("+(e.x-d.width/2)+", "+(e.y-e.height/2-e.padding/3+(Object(s.getConfig)().flowchart.htmlLabels?5:3))+")");var y=i.node().getBBox();return e.width=y.width,e.height=y.height,e.intersect=function(t){return Object(n.default)(e,t)},r},noteGroup:function(t,e){var r=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=r.insert("rect",":first-child"),a=0*e.padding,o=a/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-o).attr("y",e.y-e.height/2-o).attr("width",e.width+a).attr("height",e.height+a).attr("fill","none");var s=i.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(t){return Object(n.default)(e,t)},r},divider:function(t,e){var r=t.insert("g").attr("class",e.classes).attr("id",e.id),i=r.insert("rect",":first-child"),a=0*e.padding,o=a/2;i.attr("class","divider").attr("x",e.x-e.width/2-o).attr("y",e.y-e.height/2).attr("width",e.width+a).attr("height",e.height+a);var s=i.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(t){return Object(n.default)(e,t)},r}},l={},u=function(t,e){i.logger.trace("Inserting cluster");var r=e.shape||"rect";l[e.id]=c[r](t,e)},d=function(t,e){var r=Object(a.default)(e.labelText,e.labelStyle,void 0,!0);t.node().appendChild(r);var n=r.getBBox().width;return t.node().removeChild(r),n},h=function(){l={}},f=function(t){i.logger.info("Position cluster"),l[t.id].attr("transform","translate("+t.x+", "+t.y+")")}},"./src/dagre-wrapper/createLabel.js":function(t,e,r){"use strict";r.r(e);var n=r("d3"),i=r("./src/logger.js"),a=r("./src/config.js");e.default=function(t,e,r,o){var s=t||"";if(Object(a.getConfig)().flowchart.htmlLabels)return s=s.replace(/\\n|\n/g,"<br />"),i.logger.info("vertexText"+s),function(t){var e,r,i=Object(n.select)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=i.append("xhtml:div"),o=t.label,s=t.isNode?"nodeLabel":"edgeLabel";return a.html('<span class="'+s+'">'+o+"</span>"),e=a,(r=t.labelStyle)&&e.attr("style",r),a.style("display","inline-block"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),i.node()}({isNode:o,label:s.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))});var c=document.createElementNS("http://www.w3.org/2000/svg","text");c.setAttribute("style",e.replace("color:","fill:"));var l=[];l="string"==typeof s?s.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(s)?s:[];for(var u=0;u<l.length;u++){var d=document.createElementNS("http://www.w3.org/2000/svg","tspan");d.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),d.setAttribute("dy","1em"),d.setAttribute("x","0"),r?d.setAttribute("class","title-row"):d.setAttribute("class","row"),d.textContent=l[u].trim(),c.appendChild(d)}return c}},"./src/dagre-wrapper/edges.js":function(t,e,r){"use strict";r.r(e),r.d(e,"clear",(function(){return l})),r.d(e,"insertEdgeLabel",(function(){return u})),r.d(e,"positionEdgeLabel",(function(){return d})),r.d(e,"intersection",(function(){return f})),r.d(e,"insertEdge",(function(){return p}));var n=r("./src/logger.js"),i=r("./src/dagre-wrapper/createLabel.js"),a=r("d3"),o=r("./src/config.js"),s=r("./src/utils.js"),c={},l=function(){c={}},u=function(t,e){var r=Object(i.default)(e.label,e.labelStyle),n=t.insert("g").attr("class","edgeLabel"),s=n.insert("g").attr("class","label");s.node().appendChild(r);var l=r.getBBox();if(Object(o.getConfig)().flowchart.htmlLabels){var u=r.children[0],d=Object(a.select)(r);l=u.getBoundingClientRect(),d.attr("width",l.width),d.attr("height",l.height)}s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),c[e.id]=n,e.width=l.width,e.height=l.height},d=function(t,e){if(n.logger.info("Moving label",t.id,t.label,c[t.id]),t.label){var r=c[t.id],i=t.x,a=t.y;if(e){var o=s.default.calcLabelPosition(e);i=o.x,a=o.y}r.attr("transform","translate("+i+", "+a+")")}},h=function(t,e){var r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),o=t.width/2,s=t.height/2;return i>=o||a>=s},f=function(t,e,r){n.logger.warn("intersection calc o:",e," i:",r,t);var i=t.x,a=t.y,o=Math.abs(i-r.x),s=t.width/2,c=r.x<e.x?s-o:s+o,l=t.height/2,u=i-s,d=i+s,h=a-l,f=a+l;if(e.x===u||e.x===d||e.y===h||e.y===f)return n.logger.warn("calc equals on edge"),e;var p=Math.abs(e.y-r.y),g=Math.abs(e.x-r.x);if(Math.abs(a-e.y)*s>Math.abs(i-e.x)*l){var y=r.y<e.y?e.y-l-a:a-l-e.y;c=g*y/p;var m={x:r.x<e.x?r.x+g-c:r.x-c,y:e.y+y};return n.logger.warn("topp/bott calc, Q ".concat(p,", q ").concat(y,", R ").concat(g,", r ").concat(c),m),m}var v=v=p*(c=r.x<e.x?e.x-s-i:i-s-e.x)/g;return n.logger.warn("sides calc, Q ".concat(p,", q ").concat(v,", R ").concat(g,", r ").concat(c),{x:r.x<e.x?r.x+g-c:r.x+o-s,y:r.y<e.y?r.y+v:r.y-v}),{x:r.x<e.x?r.x+g-c:r.x+o-s,y:r.y<e.y?r.y+v:r.y-v}},p=function(t,e,r,i,s,c){var l=r.points,u=!1,d=c.node(e.v),p=c.node(e.w);if(p.intersect&&d.intersect&&((l=l.slice(1,r.points.length-1)).unshift(d.intersect(l[0])),n.logger.info("Last point",l[l.length-1],p,p.intersect(l[l.length-1])),l.push(p.intersect(l[l.length-1]))),r.toCluster){var g;n.logger.trace("edge",r),n.logger.trace("to cluster",i[r.toCluster]),l=[];var y=!1;r.points.forEach((function(t){var e=i[r.toCluster].node;if(h(e,t)||y)y||l.push(t);else{n.logger.trace("inside",r.toCluster,t,g);var a=f(e,g,t),o=!1;l.forEach((function(t){o=o||t.x===a.x&&t.y===a.y})),l.find((function(t){return t.x===a.x&&t.y===a.y}))?n.logger.warn("no intersect",a,l):l.push(a),y=!0}g=t})),u=!0}if(r.fromCluster){n.logger.trace("edge",r),n.logger.warn("from cluster",i[r.fromCluster]);for(var m,v=[],b=!1,x=l.length-1;x>=0;x--){var k=l[x],w=i[r.fromCluster].node;if(h(w,k)||b)n.logger.trace("Outside point",k),b||v.unshift(k);else{n.logger.warn("inside",r.fromCluster,k,w);var _=f(w,m,k);v.unshift(_),b=!0}m=k}l=v,u=!0}var E,C=l.filter((function(t){return!Number.isNaN(t.y)})),T=Object(a.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(a.curveBasis);switch(r.thickness){case"normal":E="edge-thickness-normal";break;case"thick":E="edge-thickness-thick";break;default:E=""}switch(r.pattern){case"solid":E+=" edge-pattern-solid";break;case"dotted":E+=" edge-pattern-dotted";break;case"dashed":E+=" edge-pattern-dashed"}var O=t.append("path").attr("d",T(C)).attr("id",r.id).attr("class"," "+E+(r.classes?" "+r.classes:"")),S="";switch(Object(o.getConfig)().state.arrowMarkerAbsolute&&(S=(S=(S=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),n.logger.info("arrowTypeStart",r.arrowTypeStart),n.logger.info("arrowTypeEnd",r.arrowTypeEnd),r.arrowTypeStart){case"arrow_cross":O.attr("marker-start","url("+S+"#"+s+"-crossStart)");break;case"arrow_point":O.attr("marker-start","url("+S+"#"+s+"-pointStart)");break;case"arrow_barb":O.attr("marker-start","url("+S+"#"+s+"-barbStart)");break;case"arrow_circle":O.attr("marker-start","url("+S+"#"+s+"-circleStart)");break;case"aggregation":O.attr("marker-start","url("+S+"#"+s+"-aggregationStart)");break;case"extension":O.attr("marker-start","url("+S+"#"+s+"-extensionStart)");break;case"composition":O.attr("marker-start","url("+S+"#"+s+"-compositionStart)");break;case"dependency":O.attr("marker-start","url("+S+"#"+s+"-dependencyStart)")}switch(r.arrowTypeEnd){case"arrow_cross":O.attr("marker-end","url("+S+"#"+s+"-crossEnd)");break;case"arrow_point":O.attr("marker-end","url("+S+"#"+s+"-pointEnd)");break;case"arrow_barb":O.attr("marker-end","url("+S+"#"+s+"-barbEnd)");break;case"arrow_circle":O.attr("marker-end","url("+S+"#"+s+"-circleEnd)");break;case"aggregation":O.attr("marker-end","url("+S+"#"+s+"-aggregationEnd)");break;case"extension":O.attr("marker-end","url("+S+"#"+s+"-extensionEnd)");break;case"composition":O.attr("marker-end","url("+S+"#"+s+"-compositionEnd)");break;case"dependency":O.attr("marker-end","url("+S+"#"+s+"-dependencyEnd)")}if(u)return l}},"./src/dagre-wrapper/index.js":function(t,e,r){"use strict";r.r(e),r.d(e,"render",(function(){return p}));var n=r("dagre"),i=r.n(n),a=r("graphlib"),o=r.n(a),s=r("./src/dagre-wrapper/markers.js"),c=r("./src/dagre-wrapper/shapes/util.js"),l=r("./src/dagre-wrapper/mermaid-graphlib.js"),u=r("./src/dagre-wrapper/nodes.js"),d=r("./src/dagre-wrapper/clusters.js"),h=r("./src/dagre-wrapper/edges.js"),f=r("./src/logger.js"),p=function(t,e,r,n,a){Object(s.default)(t,r,n,a),Object(u.clear)(),Object(h.clear)(),Object(d.clear)(),Object(l.clear)(),f.logger.warn("Graph before:",o.a.json.write(e)),Object(l.adjustClustersAndEdges)(e),f.logger.warn("Graph after:",o.a.json.write(e)),f.logger.warn("Graph ever  after:",e.graph()),function t(e,r,n,a){f.logger.info("Graph in recursive render:",o.a.json.write(r),a);var s=r.graph().rankdir;f.logger.warn("Dir in recursive render - dir:",s);var p=e.insert("g").attr("class","root");r.nodes()?f.logger.info("Recursive render",r.nodes()):f.logger.info("No nodes found for",r),r.edges().length>0&&f.logger.info("Recursive edges",r.edge(r.edges()[0]));var g=p.insert("g").attr("class","clusters"),y=p.insert("g").attr("class","edgePaths"),m=p.insert("g").attr("class","edgeLabels"),v=p.insert("g").attr("class","nodes");return r.nodes().forEach((function(e){var i=r.node(e);if(void 0!==a){var o=JSON.parse(JSON.stringify(a.clusterData));f.logger.info("Setting data for cluster",o),r.setNode(a.id,o),r.setParent(e,a.id,o)}if(f.logger.info("(Insert) Node "+e+": "+JSON.stringify(r.node(e))),i&&i.clusterNode){f.logger.info("Cluster identified",e,i,r.node(e));var d=t(v,i.graph,n,r.node(e));Object(c.updateNodeBounds)(i,d),Object(u.setNodeElem)(d,i),f.logger.warn("Recursive render complete",d,i)}else r.children(e).length>0?(f.logger.info("Cluster - the non recursive path",e,i.id,i,r),f.logger.info(Object(l.findNonClusterChild)(i.id,r)),l.clusterDb[i.id]={id:Object(l.findNonClusterChild)(i.id,r),node:i}):(f.logger.info("Node - the non recursive path",e,i.id,i),Object(u.insertNode)(v,r.node(e),s))})),r.edges().forEach((function(t){var e=r.edge(t.v,t.w,t.name);f.logger.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),f.logger.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(r.edge(t))),f.logger.info("Fix",l.clusterDb,"ids:",t.v,t.w,"Translateing: ",l.clusterDb[t.v],l.clusterDb[t.w]),Object(h.insertEdgeLabel)(m,e)})),r.edges().forEach((function(t){f.logger.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))})),f.logger.info("#############################################"),f.logger.info("###                Layout                 ###"),f.logger.info("#############################################"),f.logger.info(r),i.a.layout(r),f.logger.info("Graph after layout:",o.a.json.write(r)),r.nodes().forEach((function(t){var e=r.node(t);f.logger.info("Position "+t+": "+JSON.stringify(r.node(t))),f.logger.info("Position "+t+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e&&e.clusterNode?Object(u.positionNode)(e):r.children(t).length>0?(Object(d.insertCluster)(g,e),l.clusterDb[e.id].node=e):Object(u.positionNode)(e)})),r.edges().forEach((function(t){var e=r.edge(t);f.logger.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e),e);var i=Object(h.insertEdge)(y,t,e,l.clusterDb,n,r);Object(h.positionEdgeLabel)(e,i)})),p}(t,e,n)}},"./src/dagre-wrapper/intersect/index.js":function(t,e,r){"use strict";r.r(e);var n=r("./src/dagre-wrapper/intersect/intersect-node.js"),i=r.n(n),a=r("./src/dagre-wrapper/intersect/intersect-circle.js"),o=r("./src/dagre-wrapper/intersect/intersect-ellipse.js"),s=r("./src/dagre-wrapper/intersect/intersect-polygon.js"),c=r("./src/dagre-wrapper/intersect/intersect-rect.js");e.default={node:i.a,circle:a.default,ellipse:o.default,polygon:s.default,rect:c.default}},"./src/dagre-wrapper/intersect/intersect-circle.js":function(t,e,r){"use strict";r.r(e);var n=r("./src/dagre-wrapper/intersect/intersect-ellipse.js");e.default=function(t,e,r){return Object(n.default)(t,e,e,r)}},"./src/dagre-wrapper/intersect/intersect-ellipse.js":function(t,e,r){"use strict";r.r(e),e.default=function(t,e,r,n){var i=t.x,a=t.y,o=i-n.x,s=a-n.y,c=Math.sqrt(e*e*s*s+r*r*o*o),l=Math.abs(e*r*o/c);n.x<i&&(l=-l);var u=Math.abs(e*r*s/c);return n.y<a&&(u=-u),{x:i+l,y:a+u}}},"./src/dagre-wrapper/intersect/intersect-line.js":function(t,e,r){"use strict";function n(t,e){return t*e>0}r.r(e),e.default=function(t,e,r,i){var a,o,s,c,l,u,d,h,f,p,g,y,m;if(a=e.y-t.y,s=t.x-e.x,l=e.x*t.y-t.x*e.y,f=a*r.x+s*r.y+l,p=a*i.x+s*i.y+l,!(0!==f&&0!==p&&n(f,p)||(o=i.y-r.y,c=r.x-i.x,u=i.x*r.y-r.x*i.y,d=o*t.x+c*t.y+u,h=o*e.x+c*e.y+u,0!==d&&0!==h&&n(d,h)||0==(g=a*c-o*s))))return y=Math.abs(g/2),{x:(m=s*u-c*l)<0?(m-y)/g:(m+y)/g,y:(m=o*l-a*u)<0?(m-y)/g:(m+y)/g}}},"./src/dagre-wrapper/intersect/intersect-node.js":function(t,e){t.exports=function(t,e){return t.intersect(e)}},"./src/dagre-wrapper/intersect/intersect-polygon.js":function(t,e,r){"use strict";r.r(e);var n=r("./src/dagre-wrapper/intersect/intersect-line.js");e.default=function(t,e,r){var i=t.x,a=t.y,o=[],s=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){s=Math.min(s,t.x),c=Math.min(c,t.y)})):(s=Math.min(s,e.x),c=Math.min(c,e.y));for(var l=i-t.width/2-s,u=a-t.height/2-c,d=0;d<e.length;d++){var h=e[d],f=e[d<e.length-1?d+1:0],p=Object(n.default)(t,r,{x:l+h.x,y:u+h.y},{x:l+f.x,y:u+f.y});p&&o.push(p)}return o.length?(o.length>1&&o.sort((function(t,e){var n=t.x-r.x,i=t.y-r.y,a=Math.sqrt(n*n+i*i),o=e.x-r.x,s=e.y-r.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1})),o[0]):t}},"./src/dagre-wrapper/intersect/intersect-rect.js":function(t,e,r){"use strict";r.r(e),e.default=function(t,e){var r,n,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,l=t.height/2;return Math.abs(s)*c>Math.abs(o)*l?(s<0&&(l=-l),r=0===s?0:l*o/s,n=l):(o<0&&(c=-c),r=c,n=0===o?0:c*s/o),{x:i+r,y:a+n}}},"./src/dagre-wrapper/markers.js":function(t,e,r){"use strict";r.r(e);var n=r("./src/logger.js"),i={extension:function(t,e,r){n.logger.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:function(t,e){t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:function(t,e){t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:function(t,e){t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},point:function(t,e){t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:function(t,e){t.append("marker").attr("id",e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:function(t,e){t.append("marker").attr("id",e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:function(t,e){t.append("defs").append("marker").attr("id",e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}};e.default=function(t,e,r,n){e.forEach((function(e){i[e](t,r,n)}))}},"./src/dagre-wrapper/mermaid-graphlib.js":function(t,e,r){"use strict";r.r(e),r.d(e,"clusterDb",(function(){return o})),r.d(e,"clear",(function(){return l})),r.d(e,"extractDecendants",(function(){return h})),r.d(e,"validate",(function(){return f})),r.d(e,"findNonClusterChild",(function(){return p})),r.d(e,"adjustClustersAndEdges",(function(){return y})),r.d(e,"extractor",(function(){return m}));var n=r("./src/logger.js"),i=r("graphlib"),a=r.n(i),o={},s={},c={},l=function(){s={},c={},o={}},u=function(t,e){return n.logger.debug("In isDecendant",e," ",t," = ",s[e].indexOf(t)>=0),s[e].indexOf(t)>=0},d=function t(e,r,i,a){n.logger.info("Copying children of ",e,"root",a,"data",r.node(e),a);var o=r.children(e)||[];e!==a&&o.push(e),n.logger.debug("Copying (nodes) clusterId",e,"nodes",o),o.forEach((function(o){if(r.children(o).length>0)t(o,r,i,a);else{var c=r.node(o);n.logger.info("cp ",o," to ",a," with parent ",e),i.setNode(o,c),n.logger.debug("Setting parent",o,r.parent(o)),a!==r.parent(o)&&i.setParent(o,r.parent(o)),e!==a&&o!==e?(n.logger.debug("Setting parent",o,e),i.setParent(o,e)):(n.logger.info("In copy ",e,"root",a,"data",r.node(e),a),n.logger.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==a,"node!==clusterId",o!==e));var l=r.edges(o);n.logger.debug("Copying Edges",l),l.forEach((function(t){n.logger.info("Edge",t);var o=r.edge(t.v,t.w,t.name);n.logger.info("Edge data",o,a);try{!function(t,e){return n.logger.info("Decendants of ",e," is ",s[e]),n.logger.info("Edge is ",t),t.v!==e&&t.w!==e&&(s[e]?(n.logger.info("Here "),s[e].indexOf(t.v)>=0||!!u(t.v,e)||!!u(t.w,e)||s[e].indexOf(t.w)>=0):(n.logger.debug("Tilt, ",e,",not in decendants"),!1))}(t,a)?n.logger.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",a," clusterId:",e):(n.logger.info("Copying as ",t.v,t.w,o,t.name),i.setEdge(t.v,t.w,o,t.name),n.logger.info("newGraph edges ",i.edges(),i.edge(i.edges()[0])))}catch(t){n.logger.error(t)}}))}n.logger.debug("Removing node",o),r.removeNode(o)}))},h=function t(e,r){for(var n=r.children(e),i=[].concat(n),a=0;a<n.length;a++)c[n[a]]=e,i=i.concat(t(n[a],r));return i},f=function(t){var e=t.edges();n.logger.trace("Edges: ",e);for(var r=0;r<e.length;r++){if(t.children(e[r].v).length>0)return n.logger.trace("The node ",e[r].v," is part of and edge even though it has children"),!1;if(t.children(e[r].w).length>0)return n.logger.trace("The node ",e[r].w," is part of and edge even though it has children"),!1}return!0},p=function t(e,r){n.logger.trace("Searching",e);var i=r.children(e);if(n.logger.trace("Searching children of id ",e,i),i.length<1)return n.logger.trace("This is a valid node",e),e;for(var a=0;a<i.length;a++){var o=t(i[a],r);if(o)return n.logger.trace("Found replacement for",e," => ",o),o}},g=function(t){return o[t]&&o[t].externalConnections&&o[t]?o[t].id:t},y=function(t,e){!t||e>10?n.logger.debug("Opting out, no graph "):(n.logger.debug("Opting in, graph "),t.nodes().forEach((function(e){t.children(e).length>0&&(n.logger.warn("Cluster identified",e," Replacement id in edges: ",p(e,t)),s[e]=h(e,t),o[e]={id:p(e,t),clusterData:t.node(e)})})),t.nodes().forEach((function(e){var r=t.children(e),i=t.edges();r.length>0&&(n.logger.debug("Cluster identified",e,s),i.forEach((function(t){t.v!==e&&t.w!==e&&u(t.v,e)^u(t.w,e)&&(n.logger.debug("Edge: ",t," leaves cluster ",e),n.logger.debug("Decendants of ",e,": ",s[e]),o[e].externalConnections=!0)})))})),m(t,0),t.edges().forEach((function(e){var r=t.edge(e);n.logger.trace("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),n.logger.trace("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));var i=e.v,a=e.w;n.logger.trace("Fix",o,"ids:",e.v,e.w,"Translateing: ",o[e.v],o[e.w]),(o[e.v]||o[e.w])&&(n.logger.warn("Fixing and trixing - removing",e.v,e.w,e.name),i=g(e.v),a=g(e.w),t.removeEdge(e.v,e.w,e.name),i!==e.v&&(r.fromCluster=e.v),a!==e.w&&(r.toCluster=e.w),n.logger.warn("Replacing with",i,a,e.name),t.setEdge(i,a,r,e.name))})),n.logger.warn("Adjusted Graph",a.a.json.write(t)),n.logger.trace(o))},m=function t(e,r){if(n.logger.debug("extractor - ",r,a.a.json.write(e),e.children("D")),r>10)n.logger.error("Bailing out");else{for(var i=e.nodes(),s=!1,c=0;c<i.length;c++){var l=i[c],u=e.children(l);s=s||u.length>0}if(s){n.logger.debug("Nodes = ",i,r);for(var h=0;h<i.length;h++){var f=i[h];if(n.logger.debug("Extracting node",f,o,o[f]&&!o[f].externalConnections,!e.parent(f),e.node(f),e.children("D")," Depth ",r),o[f])if(!o[f].externalConnections&&!e.parent(f)&&e.children(f)&&e.children(f).length>0){n.logger.debug("Cluster without external connections, without a parent and with children",f,r);var p=e.graph(),g=new a.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:"TB"===p.rankdir?"LR":"TB",nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));n.logger.debug("Old graph before copy",a.a.json.write(e)),d(f,e,g,f),e.setNode(f,{clusterNode:!0,id:f,clusterData:o[f].clusterData,labelText:o[f].labelText,graph:g}),n.logger.debug("New graph after copy",a.a.json.write(g)),n.logger.debug("Old graph after copy",a.a.json.write(e))}else n.logger.debug("Cluster ** ",f," **not meeting the criteria !externalConnections:",!o[f].externalConnections," no parent: ",!e.parent(f)," children ",e.children(f)&&e.children(f).length>0,e.children("D"),r),n.logger.debug(o);else n.logger.debug("Not a cluster",f,r)}i=e.nodes(),n.logger.debug("New list of nodes",i);for(var y=0;y<i.length;y++){var m=i[y],v=e.node(m);n.logger.debug(" Now next leveö",m,v),v.clusterNode&&t(v.graph,r+1)}}else n.logger.debug("Done, no node has children",e.nodes())}}},"./src/dagre-wrapper/nodes.js":function(t,e,r){"use strict";r.r(e),r.d(e,"insertNode",(function(){return h})),r.d(e,"setNodeElem",(function(){return f})),r.d(e,"clear",(function(){return p})),r.d(e,"positionNode",(function(){return g}));var n=r("d3"),i=r("./src/logger.js"),a=r("./src/dagre-wrapper/shapes/util.js"),o=r("./src/config.js"),s=r("./src/dagre-wrapper/intersect/index.js"),c=r("./src/dagre-wrapper/createLabel.js"),l=function(t,e,r){var n=t.insert("g").attr("class","node default").attr("id",e.id),i=70,o=10;"LR"===r&&(i=10,o=70);var c=n.append("rect").style("stroke","black").style("fill","black").attr("x",-1*i/2).attr("y",-1*o/2).attr("width",i).attr("height",o).attr("class","fork-join");return Object(a.updateNodeBounds)(e,c),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return s.default.rect(e,t)},n},u={question:function(t,e){var r=Object(a.labelHelper)(t,e,void 0,!0),n=r.shapeSvg,o=r.bbox,c=o.width+e.padding+(o.height+e.padding),l=[{x:c/2,y:0},{x:c,y:-c/2},{x:c/2,y:-c},{x:0,y:-c/2}];i.logger.info("Question main (Circle)");var u=Object(a.insertPolygonShape)(n,c,c,l);return Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return i.logger.warn("Intersect called"),s.default.polygon(e,l,t)},n},rect:function(t,e){var r=Object(a.labelHelper)(t,e,"node "+e.classes,!0),n=r.shapeSvg,o=r.bbox,c=r.halfPadding;i.logger.trace("Classes = ",e.classes);var l=n.insert("rect",":first-child");return l.attr("class","basic label-container").attr("rx",e.rx).attr("ry",e.ry).attr("x",-o.width/2-c).attr("y",-o.height/2-c).attr("width",o.width+e.padding).attr("height",o.height+e.padding),Object(a.updateNodeBounds)(e,l),e.intersect=function(t){return s.default.rect(e,t)},n},rectWithTitle:function(t,e){var r;r=e.classes?"node "+e.classes:"node default";var l=t.insert("g").attr("class",r).attr("id",e.id),u=l.insert("rect",":first-child"),d=l.insert("line"),h=l.insert("g").attr("class","label"),f=e.labelText.flat();i.logger.info("Label text",f[0]);var p,g=h.node().appendChild(Object(c.default)(f[0],e.labelStyle,!0,!0));if(Object(o.getConfig)().flowchart.htmlLabels){var y=g.children[0],m=Object(n.select)(g);p=y.getBoundingClientRect(),m.attr("width",p.width),m.attr("height",p.height)}i.logger.info("Text 2",f);var v=f.slice(1,f.length),b=g.getBBox(),x=h.node().appendChild(Object(c.default)(v.join("<br/>"),e.labelStyle,!0,!0));if(Object(o.getConfig)().flowchart.htmlLabels){var k=x.children[0],w=Object(n.select)(x);p=k.getBoundingClientRect(),w.attr("width",p.width),w.attr("height",p.height)}var _=e.padding/2;return Object(n.select)(x).attr("transform","translate( "+(p.width>b.width?0:(b.width-p.width)/2)+", "+(b.height+_+5)+")"),Object(n.select)(g).attr("transform","translate( "+(p.width<b.width?0:-(b.width-p.width)/2)+", 0)"),p=h.node().getBBox(),h.attr("transform","translate("+-p.width/2+", "+(-p.height/2-_+3)+")"),u.attr("class","outer title-state").attr("x",-p.width/2-_).attr("y",-p.height/2-_).attr("width",p.width+e.padding).attr("height",p.height+e.padding),d.attr("class","divider").attr("x1",-p.width/2-_).attr("x2",p.width/2+_).attr("y1",-p.height/2-_+b.height+_).attr("y2",-p.height/2-_+b.height+_),Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.rect(e,t)},l},circle:function(t,e){var r=Object(a.labelHelper)(t,e,void 0,!0),n=r.shapeSvg,o=r.bbox,c=r.halfPadding,l=n.insert("circle",":first-child");return l.attr("rx",e.rx).attr("ry",e.ry).attr("r",o.width/2+c).attr("width",o.width+e.padding).attr("height",o.height+e.padding),i.logger.info("Circle main"),Object(a.updateNodeBounds)(e,l),e.intersect=function(t){return i.logger.info("Circle intersect",e,o.width/2+c,t),s.default.circle(e,o.width/2+c,t)},n},stadium:function(t,e){var r=Object(a.labelHelper)(t,e,void 0,!0),n=r.shapeSvg,i=r.bbox,o=i.height+e.padding,c=i.width+o/4+e.padding,l=n.insert("rect",":first-child").attr("rx",o/2).attr("ry",o/2).attr("x",-c/2).attr("y",-o/2).attr("width",c).attr("height",o);return Object(a.updateNodeBounds)(e,l),e.intersect=function(t){return s.default.rect(e,t)},n},hexagon:function(t,e){var r=Object(a.labelHelper)(t,e,void 0,!0),n=r.shapeSvg,i=r.bbox,o=i.height+e.padding,c=o/4,l=i.width+2*c+e.padding,u=[{x:c,y:0},{x:l-c,y:0},{x:l,y:-o/2},{x:l-c,y:-o},{x:c,y:-o},{x:0,y:-o/2}],d=Object(a.insertPolygonShape)(n,l,o,u);return Object(a.updateNodeBounds)(e,d),e.intersect=function(t){return s.default.polygon(e,t)},n},rect_left_inv_arrow:function(t,e){var r=Object(a.labelHelper)(t,e,void 0,!0),n=r.shapeSvg,i=r.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:-c/2,y:0},{x:o,y:0},{x:o,y:-c},{x:-c/2,y:-c},{x:0,y:-c/2}],u=Object(a.insertPolygonShape)(n,o,c,l);return Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.polygon(e,t)},n},lean_right:function(t,e){var r=Object(a.labelHelper)(t,e,void 0,!0),n=r.shapeSvg,i=r.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:-2*c/6,y:0},{x:o-c/6,y:0},{x:o+2*c/6,y:-c},{x:c/6,y:-c}],u=Object(a.insertPolygonShape)(n,o,c,l);return Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.polygon(e,t)},n},lean_left:function(t,e){var r=Object(a.labelHelper)(t,e,void 0,!0),n=r.shapeSvg,i=r.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:2*c/6,y:0},{x:o+c/6,y:0},{x:o-2*c/6,y:-c},{x:-c/6,y:-c}],u=Object(a.insertPolygonShape)(n,o,c,l);return Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.polygon(e,t)},n},trapezoid:function(t,e){var r=Object(a.labelHelper)(t,e,void 0,!0),n=r.shapeSvg,i=r.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:-2*c/6,y:0},{x:o+2*c/6,y:0},{x:o-c/6,y:-c},{x:c/6,y:-c}],u=Object(a.insertPolygonShape)(n,o,c,l);return Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.polygon(e,t)},n},inv_trapezoid:function(t,e){var r=Object(a.labelHelper)(t,e,void 0,!0),n=r.shapeSvg,i=r.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:c/6,y:0},{x:o-c/6,y:0},{x:o+2*c/6,y:-c},{x:-2*c/6,y:-c}],u=Object(a.insertPolygonShape)(n,o,c,l);return Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.polygon(e,t)},n},rect_right_inv_arrow:function(t,e){var r=Object(a.labelHelper)(t,e,void 0,!0),n=r.shapeSvg,i=r.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:0,y:0},{x:o+c/2,y:0},{x:o,y:-c/2},{x:o+c/2,y:-c},{x:0,y:-c}],u=Object(a.insertPolygonShape)(n,o,c,l);return Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.polygon(e,t)},n},cylinder:function(t,e){var r=Object(a.labelHelper)(t,e,void 0,!0),n=r.shapeSvg,i=r.bbox,o=i.width+e.padding,c=o/2,l=c/(2.5+o/50),u=i.height+l+e.padding,d="M 0,"+l+" a "+c+","+l+" 0,0,0 "+o+" 0 a "+c+","+l+" 0,0,0 "+-o+" 0 l 0,"+u+" a "+c+","+l+" 0,0,0 "+o+" 0 l 0,"+-u,h=n.attr("label-offset-y",l).insert("path",":first-child").attr("d",d).attr("transform","translate("+-o/2+","+-(u/2+l)+")");return Object(a.updateNodeBounds)(e,h),e.intersect=function(t){var r=s.default.rect(e,t),n=r.x-e.x;if(0!=c&&(Math.abs(n)<e.width/2||Math.abs(n)==e.width/2&&Math.abs(r.y-e.y)>e.height/2-l)){var i=l*l*(1-n*n/(c*c));0!=i&&(i=Math.sqrt(i)),i=l-i,t.y-e.y>0&&(i=-i),r.y+=i}return r},n},start:function(t,e){var r=t.insert("g").attr("class","node default").attr("id",e.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Object(a.updateNodeBounds)(e,n),e.intersect=function(t){return s.default.circle(e,7,t)},r},end:function(t,e){var r=t.insert("g").attr("class","node default").attr("id",e.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Object(a.updateNodeBounds)(e,i),e.intersect=function(t){return s.default.circle(e,7,t)},r},note:r("./src/dagre-wrapper/shapes/note.js").default,subroutine:function(t,e){var r=Object(a.labelHelper)(t,e,void 0,!0),n=r.shapeSvg,i=r.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:0,y:0},{x:o,y:0},{x:o,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-c},{x:-8,y:-c},{x:-8,y:0}],u=Object(a.insertPolygonShape)(n,o,c,l);return Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.polygon(e,t)},n},fork:l,join:l,class_box:function(t,e){var r,i=e.padding/2;r=e.classes?"node "+e.classes:"node default";var l=t.insert("g").attr("class",r).attr("id",e.id),u=l.insert("rect",":first-child"),d=l.insert("line"),h=l.insert("line"),f=0,p=4,g=l.insert("g").attr("class","label"),y=0,m=e.classData.annotations&&e.classData.annotations[0],v=g.node().appendChild(Object(c.default)(e.classData.annotations[0],e.labelStyle,!0,!0)),b=v.getBBox();e.classData.annotations[0]&&(p+=b.height+4,f+=b.width);var x=g.node().appendChild(Object(c.default)(e.labelText,e.labelStyle,!0,!0)),k=x.getBBox();p+=k.height+4,k.width>f&&(f=k.width);var w=[];e.classData.members.forEach((function(t){var r=g.node().appendChild(Object(c.default)(t,e.labelStyle,!0,!0)),n=r.getBBox();n.width>f&&(f=n.width),p+=n.height+4,w.push(r)}));var _=[];e.classData.methods.forEach((function(t){var r=g.node().appendChild(Object(c.default)(t,e.labelStyle,!0,!0)),n=r.getBBox();n.width>f&&(f=n.width),p+=n.height+4,_.push(r)})),p+=8,m&&(Object(n.select)(v).attr("transform","translate( "+-(f+e.padding-b.width/2)/2+", "+-1*p/2+")"),y=b.height+4);var E,C=(f-k.width)/2;if(Object(n.select)(x).attr("transform","translate( "+(-1*f/2+C)+", "+(-1*p/2+y)+")"),y+=k.height+4,d.attr("class","divider").attr("x1",-f/2-i).attr("x2",f/2+i).attr("y1",-p/2-i+8+y).attr("y2",-p/2-i+8+y),y+=8,w.forEach((function(t){Object(n.select)(t).attr("transform","translate( "+-f/2+", "+(-1*p/2+y+4)+")"),y+=k.height+4})),h.attr("class","divider").attr("x1",-f/2-i).attr("x2",f/2+i).attr("y1",-p/2-i+8+y).attr("y2",-p/2-i+8+y),y+=8,_.forEach((function(t){Object(n.select)(t).attr("transform","translate( "+-f/2+", "+(-1*p/2+y)+")"),y+=k.height+4})),Object(o.getConfig)().flowchart.htmlLabels){var T=v.children[0],O=Object(n.select)(v);E=T.getBoundingClientRect(),O.attr("width",E.width),O.attr("height",E.height)}return u.attr("class","outer title-state").attr("x",-f/2-i).attr("y",-p/2-i).attr("width",f+e.padding).attr("height",p+e.padding),Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.rect(e,t)},l}},d={},h=function(t,e,r){d[e.id]=u[e.shape](t,e,r)},f=function(t,e){d[e.id]=t},p=function(){d={}},g=function(t){var e=d[t.id];i.logger.trace("Transforming node",t,"translate("+(t.x-t.width/2-5)+", "+(t.y-t.height/2-5)+")"),t.clusterNode?e.attr("transform","translate("+(t.x-t.width/2-8)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")")}},"./src/dagre-wrapper/shapes/note.js":function(t,e,r){"use strict";r.r(e);var n=r("./src/dagre-wrapper/shapes/util.js"),i=r("./src/logger.js"),a=r("./src/dagre-wrapper/intersect/index.js");e.default=function(t,e){var r=Object(n.labelHelper)(t,e,"node "+e.classes,!0),o=r.shapeSvg,s=r.bbox,c=r.halfPadding;i.logger.info("Classes = ",e.classes);var l=o.insert("rect",":first-child");return l.attr("rx",e.rx).attr("ry",e.ry).attr("x",-s.width/2-c).attr("y",-s.height/2-c).attr("width",s.width+e.padding).attr("height",s.height+e.padding),Object(n.updateNodeBounds)(e,l),e.intersect=function(t){return a.default.rect(e,t)},o}},"./src/dagre-wrapper/shapes/util.js":function(t,e,r){"use strict";r.r(e),r.d(e,"labelHelper",(function(){return o})),r.d(e,"updateNodeBounds",(function(){return s})),r.d(e,"insertPolygonShape",(function(){return c}));var n=r("./src/dagre-wrapper/createLabel.js"),i=r("./src/config.js"),a=r("d3"),o=function(t,e,r,o){var s;s=r||"node default";var c=t.insert("g").attr("class",s).attr("id",e.id),l=c.insert("g").attr("class","label"),u=l.node().appendChild(Object(n.default)(e.labelText,e.labelStyle,!1,o)),d=u.getBBox();if(Object(i.getConfig)().flowchart.htmlLabels){var h=u.children[0],f=Object(a.select)(u);d=h.getBoundingClientRect(),f.attr("width",d.width),f.attr("height",d.height)}var p=e.padding/2;return l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),{shapeSvg:c,bbox:d,halfPadding:p,label:l}},s=function(t,e){var r=e.node().getBBox();t.width=r.width,t.height=r.height};function c(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}},"./src/defaultConfig.js":function(t,e,r){"use strict";r.r(e);var n={theme:"default",themeVariables:r("./src/themes/index.js").default.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,fontFamily:'"trebuchet ms", verdana, arial;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],flowchart:{diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"linear",padding:15},sequence:{activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open-Sans", "sans-serif"',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"},journey:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1},class:{arrowMarkerAbsolute:!1},git:{arrowMarkerAbsolute:!1},state:{dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5},er:{diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0}};n.class.arrowMarkerAbsolute=n.arrowMarkerAbsolute,n.git.arrowMarkerAbsolute=n.arrowMarkerAbsolute,e.default=n},"./src/diagrams/class/classDb.js":function(t,e,r){"use strict";r.r(e),r.d(e,"parseDirective",(function(){return p})),r.d(e,"addClass",(function(){return y})),r.d(e,"lookUpDomId",(function(){return m})),r.d(e,"clear",(function(){return v})),r.d(e,"getClass",(function(){return b})),r.d(e,"getClasses",(function(){return x})),r.d(e,"getRelations",(function(){return k})),r.d(e,"addRelation",(function(){return w})),r.d(e,"addAnnotation",(function(){return _})),r.d(e,"addMember",(function(){return E})),r.d(e,"addMembers",(function(){return C})),r.d(e,"cleanupLabel",(function(){return T})),r.d(e,"setCssClass",(function(){return O})),r.d(e,"setLink",(function(){return S})),r.d(e,"setClickEvent",(function(){return A})),r.d(e,"bindFunctions",(function(){return D})),r.d(e,"lineType",(function(){return B})),r.d(e,"relationType",(function(){return N}));var n=r("d3"),i=r("./src/logger.js"),a=r("./src/config.js"),o=r("./src/diagrams/common/common.js"),s=r("./src/utils.js"),c=r("./src/mermaidAPI.js"),l=a.getConfig(),u=[],d={},h=0,f=[],p=function(t,e,r){c.default.parseDirective(this,t,e,r)},g=function(t){var e="",r=t;if(t.indexOf("~")>0){var n=t.split("~");r=n[0],e=n[1]}return{className:r,type:e}},y=function(t){var e=g(t);void 0===d[e.className]&&(d[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:"classid-"+e.className+"-"+h},h++)},m=function(t){for(var e=Object.keys(d),r=0;r<e.length;r++)if(d[e[r]].id===t)return d[e[r]].domId},v=function(){u=[],d={},(f=[]).push(M)},b=function(t){return d[t]},x=function(){return d},k=function(){return u},w=function(t){i.logger.debug("Adding relation: "+JSON.stringify(t)),y(t.id1),y(t.id2),t.id1=g(t.id1).className,t.id2=g(t.id2).className,u.push(t)},_=function(t,e){var r=g(t).className;d[r].annotations.push(e)},E=function(t,e){var r=g(t).className,n=d[r];if("string"==typeof e){var i=e.trim();i.startsWith("<<")&&i.endsWith(">>")?n.annotations.push(i.substring(2,i.length-2)):i.indexOf(")")>0?n.methods.push(i):i&&n.members.push(i)}},C=function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((function(e){return E(t,e)})))},T=function(t){return":"===t.substring(0,1)?t.substr(1).trim():t.trim()},O=function(t,e){t.split(",").forEach((function(t){var r=t;t[0].match(/\d/)&&(r="classid-"+r),void 0!==d[r]&&d[r].cssClasses.push(e)}))},S=function(t,e,r){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n="classid-"+n),void 0!==d[n]&&(d[n].link=s.default.formatUrl(e,l),r&&(d[n].tooltip=o.default.sanitizeText(r,l)))})),O(t,"clickable")},A=function(t,e,r){t.split(",").forEach((function(t){j(t,e,r)})),O(t,"clickable")},j=function(t,e,r){var n=t,i=m(n);"loose"===l.securityLevel&&void 0!==e&&void 0!==d[n]&&(r&&(d[n].tooltip=o.default.sanitizeText(r,l)),f.push((function(){var t=document.querySelector('[id="'.concat(i,'"]'));null!==t&&t.addEventListener("click",(function(){s.default.runFunc(e,i)}),!1)})))},D=function(t){f.forEach((function(e){e(t)}))},B={LINE:0,DOTTED_LINE:1},N={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},M=function(t){var e=Object(n.select)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Object(n.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Object(n.select)(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=Object(n.select)(this);if(null!==t.attr("title")){var r=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(t.attr("title")).style("left",window.scrollX+r.left+(r.right-r.left)/2+"px").style("top",window.scrollY+r.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Object(n.select)(this).classed("hover",!1)}))};f.push(M),e.default={parseDirective:p,getConfig:function(){return a.getConfig().class},addClass:y,bindFunctions:D,clear:v,getClass:b,getClasses:x,addAnnotation:_,getRelations:k,addRelation:w,addMember:E,addMembers:C,cleanupLabel:T,lineType:B,relationType:N,setClickEvent:A,setCssClass:O,setLink:S,lookUpDomId:m}},"./src/diagrams/class/classRenderer-v2.js":function(t,e,r){"use strict";r.r(e),r.d(e,"addClasses",(function(){return v})),r.d(e,"addRelations",(function(){return b})),r.d(e,"setConf",(function(){return k})),r.d(e,"drawOld",(function(){return w})),r.d(e,"draw",(function(){return _}));var n=r("d3"),i=r("dagre"),a=r.n(i),o=r("graphlib"),s=r.n(o),c=r("./src/logger.js"),l=r("./src/diagrams/class/classDb.js"),u=r("./src/diagrams/class/parser/classDiagram.jison"),d=r("./src/diagrams/class/svgDraw.js"),h=r("./src/config.js"),f=r("./src/dagre-wrapper/index.js"),p=r("./src/utils.js"),g=r("./src/diagrams/common/common.js");u.parser.yy=l.default;var y={},m={dividerMargin:10,padding:5,textHeight:10},v=function(t,e){var r=Object.keys(t);c.logger.info("keys:",r),c.logger.info(t),r.forEach((function(r){var n=t[r],i={labelStyle:""},a=void 0!==n.text?n.text:n.id,o="";switch(n.type){case"class":o="class_box";break;default:o="class_box"}e.setNode(n.id,{labelStyle:i.labelStyle,shape:o,labelText:a,classData:n,rx:0,ry:0,class:"default",style:i.style,id:n.id,width:"group"===n.type?500:void 0,type:n.type,padding:Object(h.getConfig)().flowchart.padding}),c.logger.info("setNode",{labelStyle:i.labelStyle,shape:o,labelText:a,rx:0,ry:0,class:"default",style:i.style,id:n.id,width:"group"===n.type?500:void 0,type:n.type,padding:Object(h.getConfig)().flowchart.padding})}))},b=function(t,e){var r=0;t.forEach((function(i){r++;var a={classes:"relation"};a.pattern=1==i.relation.lineType?"dashed":"solid",a.id="id"+r,"arrow_open"===i.type?a.arrowhead="none":a.arrowhead="normal",c.logger.info(a,i),a.arrowTypeStart=E(i.relation.type1),a.arrowTypeEnd=E(i.relation.type2);var o="",s="";if(void 0!==i.style){var l=Object(p.getStylesFromArray)(i.style);o=l.style,s=l.labelStyle}else o="fill:none";a.style=o,a.labelStyle=s,void 0!==i.interpolate?a.curve=Object(p.interpolateToCurve)(i.interpolate,n.curveLinear):void 0!==t.defaultInterpolate?a.curve=Object(p.interpolateToCurve)(t.defaultInterpolate,n.curveLinear):a.curve=Object(p.interpolateToCurve)(m.curve,n.curveLinear),i.text=i.title,void 0===i.text?void 0!==i.style&&(a.arrowheadStyle="fill: #333"):(a.arrowheadStyle="fill: #333",a.labelpos="c",Object(h.getConfig)().flowchart.htmlLabels,a.labelType="text",a.label=i.text.replace(g.default.lineBreakRegex,"\n"),void 0===i.style&&(a.style=a.style||"stroke: #333; stroke-width: 1.5px;fill:none"),a.labelStyle=a.labelStyle.replace("color:","fill:")),e.setEdge(i.id1,i.id2,a,r)}))},x=function(t){for(var e=Object.keys(y),r=0;r<e.length;r++)if(y[e[r]].label===t)return e[r]},k=function(t){Object.keys(t).forEach((function(e){m[e]=t[e]}))},w=function(t,e){y={},u.parser.yy.clear(),u.parser.parse(t),c.logger.info("Rendering diagram "+t);var r=Object(n.select)("[id='".concat(e,"']")),i=new s.a.Graph({multigraph:!0});i.setGraph({isMultiGraph:!0}),i.setDefaultEdgeLabel((function(){return{}}));var o=l.default.getClasses();c.logger.info("classes:"),c.logger.info(o);for(var h=Object.keys(o),f=0;f<h.length;f++){var p=o[h[f]],g=d.default.drawClass(r,p,m);y[g.id]=g,i.setNode(g.id,g),c.logger.info("Org height: "+g.height)}var v=l.default.getRelations();c.logger.info("relations:",v),v.forEach((function(t){c.logger.info("tjoho"+x(t.id1)+x(t.id2)+JSON.stringify(t)),i.setEdge(x(t.id1),x(t.id2),{relation:t},t.title||"DEFAULT")})),a.a.layout(i),i.nodes().forEach((function(t){void 0!==t&&void 0!==i.node(t)&&(c.logger.debug("Node "+t+": "+JSON.stringify(i.node(t))),Object(n.select)("#"+Object(l.lookUpDomId)(t)).attr("transform","translate("+(i.node(t).x-i.node(t).width/2)+","+(i.node(t).y-i.node(t).height/2)+" )"))})),i.edges().forEach((function(t){void 0!==t&&void 0!==i.edge(t)&&(c.logger.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(i.edge(t))),d.default.drawEdge(r,i.edge(t),i.edge(t).relation,m))}));var b=r.node().getBBox(),k=b.width+40,w=b.height+40;m.useMaxWidth?(r.attr("width","100%"),r.attr("style","max-width: ".concat(k,"px;"))):(r.attr("height",w),r.attr("width",k));var _="".concat(b.x-20," ").concat(b.y-20," ").concat(k," ").concat(w);c.logger.debug("viewBox ".concat(_)),r.attr("viewBox",_)},_=function(t,e){c.logger.info("Drawing class"),l.default.clear(),u.parser.parse(t);var r=Object(h.getConfig)().flowchart;c.logger.info("config:",r);var i=r.nodeSpacing||50,a=r.rankSpacing||50,o=new s.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:"TD",nodesep:i,ranksep:a,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),d=l.default.getClasses(),p=l.default.getRelations();c.logger.info(p),v(d,o,e),b(p,o);var g=Object(n.select)('[id="'.concat(e,'"]'));g.attr("xmlns:xlink","http://www.w3.org/1999/xlink");var y=Object(n.select)("#"+e+" g");Object(f.render)(y,o,["aggregation","extension","composition","dependency"],"classDiagram",e);var m=g.node().getBBox(),x=m.width+16,k=m.height+16;if(c.logger.debug("new ViewBox 0 0 ".concat(x," ").concat(k),"translate(".concat(8-o._label.marginx,", ").concat(8-o._label.marginy,")")),r.useMaxWidth?(g.attr("width","100%"),g.attr("style","max-width: ".concat(x,"px;"))):(g.attr("height",k),g.attr("width",x)),g.attr("viewBox","0 0 ".concat(x," ").concat(k)),g.select("g").attr("transform","translate(".concat(8-o._label.marginx,", ").concat(8-m.y,")")),!r.htmlLabels)for(var w=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),_=0;_<w.length;_++){var E=w[_],C=E.getBBox(),T=document.createElementNS("http://www.w3.org/2000/svg","rect");T.setAttribute("rx",0),T.setAttribute("ry",0),T.setAttribute("width",C.width),T.setAttribute("height",C.height),T.setAttribute("style","fill:#e8e8e8;"),E.insertBefore(T,E.firstChild)}};function E(t){var e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;default:e="none"}return e}e.default={setConf:k,draw:_}},"./src/diagrams/class/classRenderer.js":function(t,e,r){"use strict";r.r(e),r.d(e,"setConf",(function(){return g})),r.d(e,"draw",(function(){return y}));var n=r("d3"),i=r("dagre"),a=r.n(i),o=r("graphlib"),s=r.n(o),c=r("./src/logger.js"),l=r("./src/diagrams/class/classDb.js"),u=r("./src/diagrams/class/parser/classDiagram.jison"),d=r("./src/diagrams/class/svgDraw.js");u.parser.yy=l.default;var h={},f={dividerMargin:10,padding:5,textHeight:10},p=function(t){for(var e=Object.keys(h),r=0;r<e.length;r++)if(h[e[r]].label===t)return e[r]},g=function(t){Object.keys(t).forEach((function(e){f[e]=t[e]}))},y=function(t,e){h={},u.parser.yy.clear(),u.parser.parse(t),c.logger.info("Rendering diagram "+t);var r,i=Object(n.select)("[id='".concat(e,"']"));i.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),(r=i).append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),r.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),r.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z");var o=new s.a.Graph({multigraph:!0});o.setGraph({isMultiGraph:!0}),o.setDefaultEdgeLabel((function(){return{}}));for(var g=l.default.getClasses(),y=Object.keys(g),m=0;m<y.length;m++){var v=g[y[m]],b=d.default.drawClass(i,v,f);h[b.id]=b,o.setNode(b.id,b),c.logger.info("Org height: "+b.height)}l.default.getRelations().forEach((function(t){c.logger.info("tjoho"+p(t.id1)+p(t.id2)+JSON.stringify(t)),o.setEdge(p(t.id1),p(t.id2),{relation:t},t.title||"DEFAULT")})),a.a.layout(o),o.nodes().forEach((function(t){void 0!==t&&void 0!==o.node(t)&&(c.logger.debug("Node "+t+": "+JSON.stringify(o.node(t))),Object(n.select)("#"+Object(l.lookUpDomId)(t)).attr("transform","translate("+(o.node(t).x-o.node(t).width/2)+","+(o.node(t).y-o.node(t).height/2)+" )"))})),o.edges().forEach((function(t){void 0!==t&&void 0!==o.edge(t)&&(c.logger.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(o.edge(t))),d.default.drawEdge(i,o.edge(t),o.edge(t).relation,f))}));var x=i.node().getBBox(),k=x.width+40,w=x.height+40;f.useMaxWidth?(i.attr("width","100%"),i.attr("style","max-width: ".concat(k,"px;"))):(i.attr("height",w),i.attr("width",k));var _="".concat(x.x-20," ").concat(x.y-20," ").concat(k," ").concat(w);c.logger.debug("viewBox ".concat(_)),i.attr("viewBox",_)};e.default={setConf:g,draw:y}},"./src/diagrams/class/parser/classDiagram.jison":function(t,e,r){(function(t,n){var i=function(){var t=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},e=[1,7],r=[1,6],n=[1,14],i=[1,25],a=[1,28],o=[1,26],s=[1,27],c=[1,29],l=[1,30],u=[1,31],d=[1,33],h=[1,34],f=[1,35],p=[10,19],g=[1,47],y=[1,48],m=[1,49],v=[1,50],b=[1,51],x=[1,52],k=[10,19,25,32,33,41,44,45,46,47,48,49],w=[10,19,23,25,32,33,37,41,44,45,46,47,48,49,66,67,68],_=[10,13,17,19],E=[41,66,67,68],C=[41,48,49,66,67,68],T=[41,44,45,46,47,66,67,68],O=[10,19,25],S=[1,81],A={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,graphConfig:6,openDirective:7,typeDirective:8,closeDirective:9,NEWLINE:10,":":11,argDirective:12,open_directive:13,type_directive:14,arg_directive:15,close_directive:16,CLASS_DIAGRAM:17,statements:18,EOF:19,statement:20,className:21,alphaNumToken:22,GENERICTYPE:23,relationStatement:24,LABEL:25,classStatement:26,methodStatement:27,annotationStatement:28,clickStatement:29,cssClassStatement:30,CLASS:31,STYLE_SEPARATOR:32,STRUCT_START:33,members:34,STRUCT_STOP:35,ANNOTATION_START:36,ANNOTATION_END:37,MEMBER:38,SEPARATOR:39,relation:40,STR:41,relationType:42,lineType:43,AGGREGATION:44,EXTENSION:45,COMPOSITION:46,DEPENDENCY:47,LINE:48,DOTTED_LINE:49,CALLBACK:50,LINK:51,CSSCLASS:52,commentToken:53,textToken:54,graphCodeTokens:55,textNoTagsToken:56,TAGSTART:57,TAGEND:58,"==":59,"--":60,PCT:61,DEFAULT:62,SPACE:63,MINUS:64,keywords:65,UNICODE_TEXT:66,NUM:67,ALPHA:68,$accept:0,$end:1},terminals_:{2:"error",10:"NEWLINE",11:":",13:"open_directive",14:"type_directive",15:"arg_directive",16:"close_directive",17:"CLASS_DIAGRAM",19:"EOF",23:"GENERICTYPE",25:"LABEL",31:"CLASS",32:"STYLE_SEPARATOR",33:"STRUCT_START",35:"STRUCT_STOP",36:"ANNOTATION_START",37:"ANNOTATION_END",38:"MEMBER",39:"SEPARATOR",41:"STR",44:"AGGREGATION",45:"EXTENSION",46:"COMPOSITION",47:"DEPENDENCY",48:"LINE",49:"DOTTED_LINE",50:"CALLBACK",51:"LINK",52:"CSSCLASS",55:"graphCodeTokens",57:"TAGSTART",58:"TAGEND",59:"==",60:"--",61:"PCT",62:"DEFAULT",63:"SPACE",64:"MINUS",65:"keywords",66:"UNICODE_TEXT",67:"NUM",68:"ALPHA"},productions_:[0,[3,1],[3,2],[4,1],[5,4],[5,6],[7,1],[8,1],[12,1],[9,1],[6,4],[18,1],[18,2],[18,3],[21,1],[21,2],[21,3],[21,2],[20,1],[20,2],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[26,2],[26,4],[26,5],[26,7],[28,4],[34,1],[34,2],[27,1],[27,2],[27,1],[27,1],[24,3],[24,4],[24,4],[24,5],[40,3],[40,2],[40,2],[40,1],[42,1],[42,1],[42,1],[42,1],[43,1],[43,1],[29,3],[29,4],[29,3],[29,4],[30,3],[53,1],[53,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,1],[56,1],[56,1],[56,1],[56,1],[22,1],[22,1],[22,1]],performAction:function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 6:n.parseDirective("%%{","open_directive");break;case 7:n.parseDirective(a[s],"type_directive");break;case 8:a[s]=a[s].trim().replace(/'/g,'"'),n.parseDirective(a[s],"arg_directive");break;case 9:n.parseDirective("}%%","close_directive","class");break;case 14:this.$=a[s];break;case 15:this.$=a[s-1]+a[s];break;case 16:this.$=a[s-2]+"~"+a[s-1]+a[s];break;case 17:this.$=a[s-1]+"~"+a[s];break;case 18:n.addRelation(a[s]);break;case 19:a[s-1].title=n.cleanupLabel(a[s]),n.addRelation(a[s-1]);break;case 26:n.addClass(a[s]);break;case 27:n.addClass(a[s-2]),n.setCssClass(a[s-2],a[s]);break;case 28:n.addClass(a[s-3]),n.addMembers(a[s-3],a[s-1]);break;case 29:n.addClass(a[s-5]),n.setCssClass(a[s-5],a[s-3]),n.addMembers(a[s-5],a[s-1]);break;case 30:n.addAnnotation(a[s],a[s-2]);break;case 31:this.$=[a[s]];break;case 32:a[s].push(a[s-1]),this.$=a[s];break;case 33:break;case 34:n.addMember(a[s-1],n.cleanupLabel(a[s]));break;case 35:case 36:break;case 37:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 38:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:"none"};break;case 39:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:"none",relationTitle2:a[s-1]};break;case 40:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 41:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 42:this.$={type1:"none",type2:a[s],lineType:a[s-1]};break;case 43:this.$={type1:a[s-1],type2:"none",lineType:a[s]};break;case 44:this.$={type1:"none",type2:"none",lineType:a[s]};break;case 45:this.$=n.relationType.AGGREGATION;break;case 46:this.$=n.relationType.EXTENSION;break;case 47:this.$=n.relationType.COMPOSITION;break;case 48:this.$=n.relationType.DEPENDENCY;break;case 49:this.$=n.lineType.LINE;break;case 50:this.$=n.lineType.DOTTED_LINE;break;case 51:this.$=a[s-2],n.setClickEvent(a[s-1],a[s],void 0);break;case 52:this.$=a[s-3],n.setClickEvent(a[s-2],a[s-1],a[s]);break;case 53:this.$=a[s-2],n.setLink(a[s-1],a[s],void 0);break;case 54:this.$=a[s-3],n.setLink(a[s-2],a[s-1],a[s]);break;case 55:n.setCssClass(a[s-1],a[s])}},table:[{3:1,4:2,5:3,6:4,7:5,13:e,17:r},{1:[3]},{1:[2,1]},{3:8,4:2,5:3,6:4,7:5,13:e,17:r},{1:[2,3]},{8:9,14:[1,10]},{10:[1,11]},{14:[2,6]},{1:[2,2]},{9:12,11:[1,13],16:n},t([11,16],[2,7]),{5:23,7:5,13:e,18:15,20:16,21:24,22:32,24:17,26:18,27:19,28:20,29:21,30:22,31:i,36:a,38:o,39:s,50:c,51:l,52:u,66:d,67:h,68:f},{10:[1,36]},{12:37,15:[1,38]},{10:[2,9]},{19:[1,39]},{10:[1,40],19:[2,11]},t(p,[2,18],{25:[1,41]}),t(p,[2,20]),t(p,[2,21]),t(p,[2,22]),t(p,[2,23]),t(p,[2,24]),t(p,[2,25]),t(p,[2,33],{40:42,42:45,43:46,25:[1,44],41:[1,43],44:g,45:y,46:m,47:v,48:b,49:x}),{21:53,22:32,66:d,67:h,68:f},t(p,[2,35]),t(p,[2,36]),{22:54,66:d,67:h,68:f},{21:55,22:32,66:d,67:h,68:f},{21:56,22:32,66:d,67:h,68:f},{41:[1,57]},t(k,[2,14],{22:32,21:58,23:[1,59],66:d,67:h,68:f}),t(w,[2,69]),t(w,[2,70]),t(w,[2,71]),t(_,[2,4]),{9:60,16:n},{16:[2,8]},{1:[2,10]},{5:23,7:5,13:e,18:61,19:[2,12],20:16,21:24,22:32,24:17,26:18,27:19,28:20,29:21,30:22,31:i,36:a,38:o,39:s,50:c,51:l,52:u,66:d,67:h,68:f},t(p,[2,19]),{21:62,22:32,41:[1,63],66:d,67:h,68:f},{40:64,42:45,43:46,44:g,45:y,46:m,47:v,48:b,49:x},t(p,[2,34]),{43:65,48:b,49:x},t(E,[2,44],{42:66,44:g,45:y,46:m,47:v}),t(C,[2,45]),t(C,[2,46]),t(C,[2,47]),t(C,[2,48]),t(T,[2,49]),t(T,[2,50]),t(p,[2,26],{32:[1,67],33:[1,68]}),{37:[1,69]},{41:[1,70]},{41:[1,71]},{22:72,66:d,67:h,68:f},t(k,[2,15]),t(k,[2,17],{22:32,21:73,66:d,67:h,68:f}),{10:[1,74]},{19:[2,13]},t(O,[2,37]),{21:75,22:32,66:d,67:h,68:f},{21:76,22:32,41:[1,77],66:d,67:h,68:f},t(E,[2,43],{42:78,44:g,45:y,46:m,47:v}),t(E,[2,42]),{22:79,66:d,67:h,68:f},{34:80,38:S},{21:82,22:32,66:d,67:h,68:f},t(p,[2,51],{41:[1,83]}),t(p,[2,53],{41:[1,84]}),t(p,[2,55]),t(k,[2,16]),t(_,[2,5]),t(O,[2,39]),t(O,[2,38]),{21:85,22:32,66:d,67:h,68:f},t(E,[2,41]),t(p,[2,27],{33:[1,86]}),{35:[1,87]},{34:88,35:[2,31],38:S},t(p,[2,30]),t(p,[2,52]),t(p,[2,54]),t(O,[2,40]),{34:89,38:S},t(p,[2,28]),{35:[2,32]},{35:[1,90]},t(p,[2,29])],defaultActions:{2:[2,1],4:[2,3],7:[2,6],8:[2,2],14:[2,9],38:[2,8],39:[2,10],61:[2,13],88:[2,32]},parseError:function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},parse:function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=0,d=2,h=1,f=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=n.pop()||p.lex()||h)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,w,_,E,C,T,O,S,A={};;){if(w=r[r.length-1],this.defaultActions[w]?_=this.defaultActions[w]:(null==x&&(x=b()),_=o[w]&&o[w][x]),void 0===_||!_.length||!_[0]){var j="";for(C in S=[],o[w])this.terminals_[C]&&C>d&&S.push("'"+this.terminals_[C]+"'");j=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(j,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(_[0]){case 1:r.push(x),i.push(p.yytext),a.push(p.yylloc),r.push(_[1]),x=null,k?(x=k,k=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(T=this.productions_[_[1]][1],A.$=i[i.length-T],A._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},v&&(A._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(A,[s,l,c,g.yy,_[1],i,a].concat(f))))return E;T&&(r=r.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),r.push(this.productions_[_[1]][0]),i.push(A.$),a.push(A._$),O=o[r[r.length-2]][r[r.length-1]],r.push(O);break;case 3:return!0}}return!0}},j={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||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];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(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 e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),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(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,r,n){switch(r){case 0:return this.begin("open_directive"),13;case 1:return this.begin("type_directive"),14;case 2:return this.popState(),this.begin("arg_directive"),11;case 3:return this.popState(),this.popState(),16;case 4:return 15;case 5:case 6:break;case 7:return 10;case 8:break;case 9:case 10:return 17;case 11:return this.begin("struct"),33;case 12:return"EOF_IN_STRUCT";case 13:return"OPEN_IN_STRUCT";case 14:return this.popState(),35;case 15:break;case 16:return"MEMBER";case 17:return 31;case 18:return 52;case 19:return 50;case 20:return 51;case 21:return 36;case 22:return 37;case 23:this.begin("generic");break;case 24:this.popState();break;case 25:return"GENERICTYPE";case 26:this.begin("string");break;case 27:this.popState();break;case 28:return"STR";case 29:case 30:return 45;case 31:case 32:return 47;case 33:return 46;case 34:return 44;case 35:return 48;case 36:return 49;case 37:return 25;case 38:return 32;case 39:return 64;case 40:return"DOT";case 41:return"PLUS";case 42:return 61;case 43:case 44:return"EQUALS";case 45:return 68;case 46:return"PUNCTUATION";case 47:return 67;case 48:return 66;case 49:return 63;case 50:return 19}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\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)/,/^(?:$)/],conditions:{string:{rules:[27,28],inclusive:!1},generic:{rules:[24,25],inclusive:!1},struct:{rules:[12,13,14,15,16],inclusive:!1},open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,17,18,19,20,21,22,23,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],inclusive:!0}}};function D(){this.yy={}}return A.lexer=j,D.prototype=A,A.Parser=D,new D}();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"),t.exit(1));var i=r("./node_modules/node-libs-browser/mock/empty.js").readFileSync(r("./node_modules/path-browserify/index.js").normalize(n[1]),"utf8");return e.parser.parse(i)},r.c[r.s]===n&&e.main(t.argv.slice(1))}).call(this,r("./node_modules/process/browser.js"),r("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/class/styles.js":function(t,e,r){"use strict";r.r(e),e.default=function(t){return"g.classGroup text {\n  fill: ".concat(t.nodeBorder,";\n  fill: ").concat(t.classText,";\n  stroke: none;\n  font-family: ").concat(t.fontFamily,";\n  font-size: 10px;\n\n  .title {\n    font-weight: bolder;\n  }\n}\n.node rect,\n  .node circle,\n  .node ellipse,\n  .node polygon,\n  .node path {\n    fill: ").concat(t.mainBkg,";\n    stroke: ").concat(t.nodeBorder,";\n    stroke-width: 1px;\n  }\n\n\n.divider {\n  stroke: ").concat(t.nodeBorder,";\n  stroke: 1;\n}\n\ng.clickable {\n  cursor: pointer;\n}\n\ng.classGroup rect {\n  fill: ").concat(t.mainBkg,";\n  stroke: ").concat(t.nodeBorder,";\n}\n\ng.classGroup line {\n  stroke: ").concat(t.nodeBorder,";\n  stroke-width: 1;\n}\n\n.classLabel .box {\n  stroke: none;\n  stroke-width: 0;\n  fill: ").concat(t.mainBkg,";\n  opacity: 0.5;\n}\n\n.classLabel .label {\n  fill: ").concat(t.nodeBorder,";\n  font-size: 10px;\n}\n\n.relation {\n  stroke: ").concat(t.lineColor,";\n  stroke-width: 1;\n  fill: none;\n}\n\n.dashed-line{\n  stroke-dasharray: 3;\n}\n\n#compositionStart, .composition {\n  fill: ").concat(t.lineColor," !important;\n  stroke: ").concat(t.lineColor," !important;\n  stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n  fill: ").concat(t.lineColor," !important;\n  stroke: ").concat(t.lineColor," !important;\n  stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n  fill: ").concat(t.lineColor," !important;\n  stroke: ").concat(t.lineColor," !important;\n  stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n  fill: ").concat(t.lineColor," !important;\n  stroke: ").concat(t.lineColor," !important;\n  stroke-width: 1;\n}\n\n#extensionStart, .extension {\n  fill: ").concat(t.lineColor," !important;\n  stroke: ").concat(t.lineColor," !important;\n  stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n  fill: ").concat(t.lineColor," !important;\n  stroke: ").concat(t.lineColor," !important;\n  stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n  fill: ").concat(t.mainBkg," !important;\n  stroke: ").concat(t.lineColor," !important;\n  stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n  fill: ").concat(t.mainBkg," !important;\n  stroke: ").concat(t.lineColor," !important;\n  stroke-width: 1;\n}\n")}},"./src/diagrams/class/svgDraw.js":function(t,e,r){"use strict";r.r(e),r.d(e,"drawEdge",(function(){return c})),r.d(e,"drawClass",(function(){return l})),r.d(e,"parseMember",(function(){return u}));var n=r("d3"),i=r("./src/diagrams/class/classDb.js"),a=r("./src/utils.js"),o=r("./src/logger.js"),s=0,c=function(t,e,r,c){var l=function(t){switch(t){case i.relationType.AGGREGATION:return"aggregation";case i.relationType.EXTENSION:return"extension";case i.relationType.COMPOSITION:return"composition";case i.relationType.DEPENDENCY:return"dependency"}};e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var u,d,h=e.points,f=Object(n.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(n.curveBasis),p=t.append("path").attr("d",f(h)).attr("id","edge"+s).attr("class","relation"),g="";c.arrowMarkerAbsolute&&(g=(g=(g=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),1==r.relation.lineType&&p.attr("class","relation dashed-line"),"none"!==r.relation.type1&&p.attr("marker-start","url("+g+"#"+l(r.relation.type1)+"Start)"),"none"!==r.relation.type2&&p.attr("marker-end","url("+g+"#"+l(r.relation.type2)+"End)");var y,m,v,b,x=e.points.length,k=a.default.calcLabelPosition(e.points);if(u=k.x,d=k.y,x%2!=0&&x>1){var w=a.default.calcCardinalityPosition("none"!==r.relation.type1,e.points,e.points[0]),_=a.default.calcCardinalityPosition("none"!==r.relation.type2,e.points,e.points[x-1]);o.logger.debug("cardinality_1_point "+JSON.stringify(w)),o.logger.debug("cardinality_2_point "+JSON.stringify(_)),y=w.x,m=w.y,v=_.x,b=_.y}if(void 0!==r.title){var E=t.append("g").attr("class","classLabel"),C=E.append("text").attr("class","label").attr("x",u).attr("y",d).attr("fill","red").attr("text-anchor","middle").text(r.title);window.label=C;var T=C.node().getBBox();E.insert("rect",":first-child").attr("class","box").attr("x",T.x-c.padding/2).attr("y",T.y-c.padding/2).attr("width",T.width+c.padding).attr("height",T.height+c.padding)}o.logger.info("Rendering relation "+JSON.stringify(r)),void 0!==r.relationTitle1&&"none"!==r.relationTitle1&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",y).attr("y",m).attr("fill","black").attr("font-size","6").text(r.relationTitle1),void 0!==r.relationTitle2&&"none"!==r.relationTitle2&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",v).attr("y",b).attr("fill","black").attr("font-size","6").text(r.relationTitle2),s++},l=function(t,e,r){o.logger.info("Rendering class "+e);var n,a=e.id,s={id:a,label:e.id,width:0,height:0},c=t.append("g").attr("id",Object(i.lookUpDomId)(a)).attr("class","classGroup");n=e.link?c.append("svg:a").attr("xlink:href",e.link).attr("target","_blank").append("text").attr("y",r.textHeight+r.padding).attr("x",0):c.append("text").attr("y",r.textHeight+r.padding).attr("x",0);var l=!0;e.annotations.forEach((function(t){var e=n.append("tspan").text("«"+t+"»");l||e.attr("dy",r.textHeight),l=!1}));var u=e.id;void 0!==e.type&&""!==e.type&&(u+="<"+e.type+">");var d=n.append("tspan").text(u).attr("class","title");l||d.attr("dy",r.textHeight);var h=n.node().getBBox().height,f=c.append("line").attr("x1",0).attr("y1",r.padding+h+r.dividerMargin/2).attr("y2",r.padding+h+r.dividerMargin/2),g=c.append("text").attr("x",r.padding).attr("y",h+r.dividerMargin+r.textHeight).attr("fill","white").attr("class","classText");l=!0,e.members.forEach((function(t){p(g,t,l,r),l=!1}));var y=g.node().getBBox(),m=c.append("line").attr("x1",0).attr("y1",r.padding+h+r.dividerMargin+y.height).attr("y2",r.padding+h+r.dividerMargin+y.height),v=c.append("text").attr("x",r.padding).attr("y",h+2*r.dividerMargin+y.height+r.textHeight).attr("fill","white").attr("class","classText");l=!0,e.methods.forEach((function(t){p(v,t,l,r),l=!1}));var b=c.node().getBBox(),x=" ";e.cssClasses.length>0&&(x+=e.cssClasses.join(" "));var k=c.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",b.width+2*r.padding).attr("height",b.height+r.padding+.5*r.dividerMargin).attr("class",x).node().getBBox().width;return n.node().childNodes.forEach((function(t){t.setAttribute("x",(k-t.getBBox().width)/2)})),e.tooltip&&n.insert("title").text(e.tooltip),f.attr("x2",k),m.attr("x2",k),s.width=k,s.height=b.height+r.padding+.5*r.dividerMargin,s},u=function(t){var e=t.match(/(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+)/),r=t.match(/^([+|\-|~|#])?(\w+) *\( *(.*)\) *(\*|\$)? *(\w*[~|[\]]*\s*\w*~?)$/);return e&&!r?d(e):r?h(r):f(t)},d=function(t){var e="";try{e=(t[1]?t[1].trim():"")+(t[2]?t[2].trim():"")+(t[3]?g(t[3].trim()):"")+" "+(t[4]?t[4].trim():"")}catch(r){e=t}return{displayText:e,cssStyle:""}},h=function(t){var e="",r="";try{var n=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",a=t[3]?g(t[3].trim()):"",o=t[4]?t[4].trim():"";r=n+i+"("+a+")"+(t[5]?" : "+g(t[5]).trim():""),e=y(o)}catch(e){r=t}return{displayText:r,cssStyle:e}},f=function(t){var e="",r="",n="",i=t.indexOf("("),a=t.indexOf(")");if(i>1&&a>i&&a<=t.length){var o="",s="",c=t.substring(0,1);c.match(/\w/)?s=t.substring(0,i).trim():(c.match(/\+|-|~|#/)&&(o=c),s=t.substring(1,i).trim());var l=t.substring(i+1,a),u=t.substring(a+1,1);r=y(u),e=o+s+"("+g(l.trim())+")",a<"".length&&""!==(n=t.substring(a+2).trim())&&(n=" : "+g(n))}else e=g(t);return{displayText:e,cssStyle:r}},p=function(t,e,r,n){var i=u(e),a=t.append("tspan").attr("x",n.padding).text(i.displayText);""!==i.cssStyle&&a.attr("style",i.cssStyle),r||a.attr("dy",n.textHeight)},g=function t(e){var r=e;return-1!=e.indexOf("~")?t(r=(r=r.replace("~","<")).replace("~",">")):r},y=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}};e.default={drawClass:l,drawEdge:c,parseMember:u}},"./src/diagrams/common/common.js":function(t,e,r){"use strict";r.r(e),r.d(e,"getRows",(function(){return n})),r.d(e,"removeScript",(function(){return i})),r.d(e,"sanitizeText",(function(){return a})),r.d(e,"lineBreakRegex",(function(){return o})),r.d(e,"hasBreaks",(function(){return s})),r.d(e,"splitBreaks",(function(){return c}));var n=function(t){if(!t)return 1;var e=l(t);return(e=e.replace(/\\n/g,"#br#")).split("#br#")},i=function(t){for(var e="",r=0;r>=0;){if(!((r=t.indexOf("<script"))>=0)){e+=t,r=-1;break}e+=t.substr(0,r),(r=(t=t.substr(r+1)).indexOf("<\/script>"))>=0&&(r+=9,t=t.substr(r))}return e},a=function(t,e){var r=t,n=!0;if(!e.flowchart||!1!==e.flowchart.htmlLabels&&"false"!==e.flowchart.htmlLabels||(n=!1),n){var a=e.securityLevel;"antiscript"===a?r=i(r):"loose"!==a&&(r=(r=(r=l(r)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),r=u(r))}return r},o=/<br\s*\/?>/gi,s=function(t){return/<br\s*[/]?>/gi.test(t)},c=function(t){return t.split(/<br\s*[/]?>/gi)},l=function(t){return t.replace(o,"#br#")},u=function(t){return t.replace(/#br#/g,"<br/>")};e.default={getRows:n,sanitizeText:a,hasBreaks:s,splitBreaks:c,lineBreakRegex:o,removeScript:i}},"./src/diagrams/er/erDb.js":function(t,e,r){"use strict";r.r(e),r.d(e,"parseDirective",(function(){return l}));var n=r("./src/logger.js"),i=r("./src/mermaidAPI.js"),a=r("./src/config.js"),o={},s=[],c="",l=function(t,e,r){i.default.parseDirective(this,t,e,r)};e.default={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},parseDirective:l,getConfig:function(){return a.getConfig().er},addEntity:function(t){void 0===o[t]&&(o[t]=t,n.logger.debug("Added new entity :",t))},getEntities:function(){return o},addRelationship:function(t,e,r,i){var a={entityA:t,roleA:e,entityB:r,relSpec:i};s.push(a),n.logger.debug("Added new relationship :",a)},getRelationships:function(){return s},clear:function(){o={},s=[],c=""},setTitle:function(t){c=t},getTitle:function(){return c}}},"./src/diagrams/er/erMarkers.js":function(t,e,r){"use strict";r.r(e);var n={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"};e.default={ERMarkers:n,insertMarkers:function(t,e){var r;t.append("defs").append("marker").attr("id",n.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",n.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),(r=t.append("defs").append("marker").attr("id",n.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),(r=t.append("defs").append("marker").attr("id",n.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",n.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",n.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),(r=t.append("defs").append("marker").attr("id",n.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(r=t.append("defs").append("marker").attr("id",n.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")}}},"./src/diagrams/er/erRenderer.js":function(t,e,r){"use strict";r.r(e),r.d(e,"setConf",(function(){return g})),r.d(e,"draw",(function(){return v}));var n=r("graphlib"),i=r.n(n),a=r("d3"),o=r("./src/diagrams/er/erDb.js"),s=r("./src/diagrams/er/parser/erDiagram.jison"),c=r.n(s),l=r("dagre"),u=r.n(l),d=r("./src/config.js"),h=r("./src/logger.js"),f=r("./src/diagrams/er/erMarkers.js"),p={},g=function(t){for(var e=Object.keys(t),r=0;r<e.length;r++)p[e[r]]=t[e[r]]},y=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},m=0,v=function(t,e){h.logger.info("Drawing ER diagram"),o.default.clear();var r=c.a.parser;r.yy=o.default;try{r.parse(t)}catch(t){h.logger.debug("Parsing failed")}var n,s=Object(a.select)("[id='".concat(e,"']"));f.default.insertMarkers(s,p),n=new i.a.Graph({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:p.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));var l,g,v,b,x=(l=s,g=o.default.getEntities(),v=n,Object.keys(g).forEach((function(t){var e=l.append("g").attr("id",t);b=void 0===b?t:b;var r="entity-"+t,n=e.append("text").attr("class","er entityLabel").attr("id",r).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("style","font-family: "+Object(d.getConfig)().fontFamily+"; font-size: "+p.fontSize+"px").text(t),i=n.node().getBBox(),a=Math.max(p.minEntityWidth,i.width+2*p.entityPadding),o=Math.max(p.minEntityHeight,i.height+2*p.entityPadding);n.attr("transform","translate("+a/2+","+o/2+")");var s=e.insert("rect","#"+r).attr("class","er entityBox").attr("fill",p.fill).attr("fill-opacity","100%").attr("stroke",p.stroke).attr("x",0).attr("y",0).attr("width",a).attr("height",o).node().getBBox();v.setNode(t,{width:s.width,height:s.height,shape:"rect",id:t})})),b),k=function(t,e){return t.forEach((function(t){e.setEdge(t.entityA,t.entityB,{relationship:t},y(t))})),t}(o.default.getRelationships(),n);u.a.layout(n),function(t,e){e.nodes().forEach((function(r){void 0!==r&&void 0!==e.node(r)&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")}))}(s,n),k.forEach((function(t){!function(t,e,r,n){m++;var i=r.edge(e.entityA,e.entityB,y(e)),s=Object(a.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(a.curveBasis),c=t.insert("path","#"+n).attr("class","er relationshipLine").attr("d",s(i.points)).attr("stroke",p.stroke).attr("fill","none");e.relSpec.relType===o.default.Identification.NON_IDENTIFYING&&c.attr("stroke-dasharray","8,8");var l="";switch(p.arrowMarkerAbsolute&&(l=(l=(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e.relSpec.cardA){case o.default.Cardinality.ZERO_OR_ONE:c.attr("marker-end","url("+l+"#"+f.default.ERMarkers.ZERO_OR_ONE_END+")");break;case o.default.Cardinality.ZERO_OR_MORE:c.attr("marker-end","url("+l+"#"+f.default.ERMarkers.ZERO_OR_MORE_END+")");break;case o.default.Cardinality.ONE_OR_MORE:c.attr("marker-end","url("+l+"#"+f.default.ERMarkers.ONE_OR_MORE_END+")");break;case o.default.Cardinality.ONLY_ONE:c.attr("marker-end","url("+l+"#"+f.default.ERMarkers.ONLY_ONE_END+")")}switch(e.relSpec.cardB){case o.default.Cardinality.ZERO_OR_ONE:c.attr("marker-start","url("+l+"#"+f.default.ERMarkers.ZERO_OR_ONE_START+")");break;case o.default.Cardinality.ZERO_OR_MORE:c.attr("marker-start","url("+l+"#"+f.default.ERMarkers.ZERO_OR_MORE_START+")");break;case o.default.Cardinality.ONE_OR_MORE:c.attr("marker-start","url("+l+"#"+f.default.ERMarkers.ONE_OR_MORE_START+")");break;case o.default.Cardinality.ONLY_ONE:c.attr("marker-start","url("+l+"#"+f.default.ERMarkers.ONLY_ONE_START+")")}var u=c.node().getTotalLength(),h=c.node().getPointAtLength(.5*u),g="rel"+m,v=t.append("text").attr("class","er relationshipLabel").attr("id",g).attr("x",h.x).attr("y",h.y).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("style","font-family: "+Object(d.getConfig)().fontFamily+"; font-size: "+p.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+g).attr("class","er relationshipLabelBox").attr("x",h.x-v.width/2).attr("y",h.y-v.height/2).attr("width",v.width).attr("height",v.height).attr("fill","white").attr("fill-opacity","85%")}(s,t,n,x)}));var w=p.diagramPadding,_=s.node().getBBox(),E=_.width+2*w,C=_.height+2*w;p.useMaxWidth?(s.attr("width","100%"),s.attr("style","max-width: ".concat(E,"px;"))):(s.attr("height",C),s.attr("width",E)),s.attr("viewBox","".concat(_.x-w," ").concat(_.y-w," ").concat(E," ").concat(C))};e.default={setConf:g,draw:v}},"./src/diagrams/er/parser/erDiagram.jison":function(t,e,r){(function(t,n){var i=function(){var t=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},e=[1,2],r=[1,5],n=[6,9,11,20,30],i=[1,17],a=[1,20],o=[1,24],s=[1,25],c=[1,26],l=[1,27],u=[20,27,28],d=[4,6,9,11,20,30],h=[23,24,25,26],f={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,ALPHANUM:20,cardinality:21,relType:22,ZERO_OR_ONE:23,ZERO_OR_MORE:24,ONE_OR_MORE:25,ONLY_ONE:26,NON_IDENTIFYING:27,IDENTIFYING:28,WORD:29,open_directive:30,type_directive:31,arg_directive:32,close_directive:33,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"ALPHANUM",23:"ZERO_OR_ONE",24:"ZERO_OR_MORE",25:"ONE_OR_MORE",26:"ONLY_ONE",27:"NON_IDENTIFYING",28:"IDENTIFYING",29:"WORD",30:"open_directive",31:"type_directive",32:"arg_directive",33:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[17,1],[18,3],[21,1],[21,1],[21,1],[21,1],[22,1],[22,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 1:break;case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 12:n.addEntity(a[s-4]),n.addEntity(a[s-2]),n.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 13:this.$=a[s];break;case 14:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 15:this.$=n.Cardinality.ZERO_OR_ONE;break;case 16:this.$=n.Cardinality.ZERO_OR_MORE;break;case 17:this.$=n.Cardinality.ONE_OR_MORE;break;case 18:this.$=n.Cardinality.ONLY_ONE;break;case 19:this.$=n.Identification.NON_IDENTIFYING;break;case 20:this.$=n.Identification.IDENTIFYING;break;case 21:this.$=a[s].replace(/"/g,"");break;case 22:this.$=a[s];break;case 23:n.parseDirective("%%{","open_directive");break;case 24:n.parseDirective(a[s],"type_directive");break;case 25:a[s]=a[s].trim().replace(/'/g,'"'),n.parseDirective(a[s],"arg_directive");break;case 26:n.parseDirective("}%%","close_directive","er")}},table:[{3:1,4:e,7:3,12:4,30:r},{1:[3]},t(n,[2,3],{5:6}),{3:7,4:e,7:3,12:4,30:r},{13:8,31:[1,9]},{31:[2,23]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,20:i,30:r},{1:[2,2]},{14:18,15:[1,19],33:a},t([15,33],[2,24]),t(n,[2,8],{1:[2,1]}),t(n,[2,4]),{7:15,10:21,12:4,17:16,20:i,30:r},t(n,[2,6]),t(n,[2,7]),t(n,[2,11]),{18:22,21:23,23:o,24:s,25:c,26:l},t([15,23,24,25,26],[2,13]),{11:[1,28]},{16:29,32:[1,30]},{11:[2,26]},t(n,[2,5]),{17:31,20:i},{22:32,27:[1,33],28:[1,34]},t(u,[2,15]),t(u,[2,16]),t(u,[2,17]),t(u,[2,18]),t(d,[2,9]),{14:35,33:a},{33:[2,25]},{15:[1,36]},{21:37,23:o,24:s,25:c,26:l},t(h,[2,19]),t(h,[2,20]),{11:[1,38]},{19:39,20:[1,41],29:[1,40]},{20:[2,14]},t(d,[2,10]),t(n,[2,12]),t(n,[2,21]),t(n,[2,22])],defaultActions:{5:[2,23],7:[2,2],20:[2,26],30:[2,25],37:[2,14]},parseError:function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},parse:function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=0,d=2,h=1,f=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=n.pop()||p.lex()||h)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,w,_,E,C,T,O,S,A={};;){if(w=r[r.length-1],this.defaultActions[w]?_=this.defaultActions[w]:(null==x&&(x=b()),_=o[w]&&o[w][x]),void 0===_||!_.length||!_[0]){var j="";for(C in S=[],o[w])this.terminals_[C]&&C>d&&S.push("'"+this.terminals_[C]+"'");j=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(j,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(_[0]){case 1:r.push(x),i.push(p.yytext),a.push(p.yylloc),r.push(_[1]),x=null,k?(x=k,k=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(T=this.productions_[_[1]][1],A.$=i[i.length-T],A._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},v&&(A._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(A,[s,l,c,g.yy,_[1],i,a].concat(f))))return E;T&&(r=r.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),r.push(this.productions_[_[1]][0]),i.push(A.$),a.push(A._$),O=o[r[r.length-2]][r[r.length-1]],r.push(O);break;case 3:return!0}}return!0}},p={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||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];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(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 e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),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(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,r,n){switch(r){case 0:return this.begin("open_directive"),30;case 1:return this.begin("type_directive"),31;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),33;case 4:return 32;case 5:case 6:break;case 7:return 11;case 8:break;case 9:return 9;case 10:return 29;case 11:return 4;case 12:return 23;case 13:return 24;case 14:return 25;case 15:return 26;case 16:return 23;case 17:return 24;case 18:return 25;case 19:return 27;case 20:return 28;case 21:case 22:return 27;case 23:return 20;case 24:return e.yytext[0];case 25:return 6}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\|o\b)/i,/^(?:\}o\b)/i,/^(?:\}\|)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}};function g(){this.yy={}}return f.lexer=p,g.prototype=f,f.Parser=g,new g}();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"),t.exit(1));var i=r("./node_modules/node-libs-browser/mock/empty.js").readFileSync(r("./node_modules/path-browserify/index.js").normalize(n[1]),"utf8");return e.parser.parse(i)},r.c[r.s]===n&&e.main(t.argv.slice(1))}).call(this,r("./node_modules/process/browser.js"),r("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/er/styles.js":function(t,e,r){"use strict";r.r(e),e.default=function(t){return"\n  .entityBox {\n    fill: ".concat(t.mainBkg,";\n    stroke: ").concat(t.nodeBorder,";\n  }\n\n  .relationshipLabelBox {\n    fill: ").concat(t.tertiaryColor,";\n    opacity: 0.7;\n    background-color: ").concat(t.tertiaryColor,";\n      rect {\n        opacity: 0.5;\n      }\n  }\n\n    .relationshipLine {\n      stroke: ").concat(t.lineColor,";\n    }\n")}},"./src/diagrams/flowchart/flowChartShapes.js":function(t,e,r){"use strict";r.r(e),r.d(e,"addToRender",(function(){return y})),r.d(e,"addToRenderV2",(function(){return m}));var n=r("dagre-d3"),i=r.n(n);function a(t,e,r){var n=.9*(e.width+e.height),a=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],o=v(t,n,n,a);return r.intersect=function(t){return i.a.intersect.polygon(r,a,t)},o}function o(t,e,r){var n=e.height,a=n/4,o=e.width+2*a,s=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-n/2},{x:o-a,y:-n},{x:a,y:-n},{x:0,y:-n/2}],c=v(t,o,n,s);return r.intersect=function(t){return i.a.intersect.polygon(r,s,t)},c}function s(t,e,r){var n=e.width,a=e.height,o=[{x:-a/2,y:0},{x:n,y:0},{x:n,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}],s=v(t,n,a,o);return r.intersect=function(t){return i.a.intersect.polygon(r,o,t)},s}function c(t,e,r){var n=e.width,a=e.height,o=[{x:-2*a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:a/6,y:-a}],s=v(t,n,a,o);return r.intersect=function(t){return i.a.intersect.polygon(r,o,t)},s}function l(t,e,r){var n=e.width,a=e.height,o=[{x:2*a/6,y:0},{x:n+a/6,y:0},{x:n-2*a/6,y:-a},{x:-a/6,y:-a}],s=v(t,n,a,o);return r.intersect=function(t){return i.a.intersect.polygon(r,o,t)},s}function u(t,e,r){var n=e.width,a=e.height,o=[{x:-2*a/6,y:0},{x:n+2*a/6,y:0},{x:n-a/6,y:-a},{x:a/6,y:-a}],s=v(t,n,a,o);return r.intersect=function(t){return i.a.intersect.polygon(r,o,t)},s}function d(t,e,r){var n=e.width,a=e.height,o=[{x:a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:-2*a/6,y:-a}],s=v(t,n,a,o);return r.intersect=function(t){return i.a.intersect.polygon(r,o,t)},s}function h(t,e,r){var n=e.width,a=e.height,o=[{x:0,y:0},{x:n+a/2,y:0},{x:n,y:-a/2},{x:n+a/2,y:-a},{x:0,y:-a}],s=v(t,n,a,o);return r.intersect=function(t){return i.a.intersect.polygon(r,o,t)},s}function f(t,e,r){var n=e.height,a=e.width+n/4,o=t.insert("rect",":first-child").attr("rx",n/2).attr("ry",n/2).attr("x",-a/2).attr("y",-n/2).attr("width",a).attr("height",n);return r.intersect=function(t){return i.a.intersect.rect(r,t)},o}function p(t,e,r){var n=e.width,a=e.height,o=[{x:0,y:0},{x:n,y:0},{x:n,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],s=v(t,n,a,o);return r.intersect=function(t){return i.a.intersect.polygon(r,o,t)},s}function g(t,e,r){var n=e.width,a=n/2,o=a/(2.5+n/50),s=e.height+o,c="M 0,"+o+" a "+a+","+o+" 0,0,0 "+n+" 0 a "+a+","+o+" 0,0,0 "+-n+" 0 l 0,"+s+" a "+a+","+o+" 0,0,0 "+n+" 0 l 0,"+-s,l=t.attr("label-offset-y",o).insert("path",":first-child").attr("d",c).attr("transform","translate("+-n/2+","+-(s/2+o)+")");return r.intersect=function(t){var e=i.a.intersect.rect(r,t),n=e.x-r.x;if(0!=a&&(Math.abs(n)<r.width/2||Math.abs(n)==r.width/2&&Math.abs(e.y-r.y)>r.height/2-o)){var s=o*o*(1-n*n/(a*a));0!=s&&(s=Math.sqrt(s)),s=o-s,t.y-r.y>0&&(s=-s),e.y+=s}return e},l}function y(t){t.shapes().question=a,t.shapes().hexagon=o,t.shapes().stadium=f,t.shapes().subroutine=p,t.shapes().cylinder=g,t.shapes().rect_left_inv_arrow=s,t.shapes().lean_right=c,t.shapes().lean_left=l,t.shapes().trapezoid=u,t.shapes().inv_trapezoid=d,t.shapes().rect_right_inv_arrow=h}function m(t){t({question:a}),t({hexagon:o}),t({stadium:f}),t({subroutine:p}),t({cylinder:g}),t({rect_left_inv_arrow:s}),t({lean_right:c}),t({lean_left:l}),t({trapezoid:u}),t({inv_trapezoid:d}),t({rect_right_inv_arrow:h})}function v(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map((function(t){return t.x+","+t.y})).join(" ")).attr("transform","translate("+-e/2+","+r/2+")")}e.default={addToRender:y,addToRenderV2:m}},"./src/diagrams/flowchart/flowDb.js":function(t,e,r){"use strict";r.r(e),r.d(e,"parseDirective",(function(){return x})),r.d(e,"addVertex",(function(){return k})),r.d(e,"addSingleLink",(function(){return w})),r.d(e,"addLink",(function(){return _})),r.d(e,"updateLinkInterpolate",(function(){return E})),r.d(e,"updateLink",(function(){return C})),r.d(e,"addClass",(function(){return T})),r.d(e,"setDirection",(function(){return O})),r.d(e,"setClass",(function(){return S})),r.d(e,"setLink",(function(){return j})),r.d(e,"getTooltip",(function(){return D})),r.d(e,"setClickEvent",(function(){return B})),r.d(e,"bindFunctions",(function(){return N})),r.d(e,"getDirection",(function(){return M})),r.d(e,"getVertices",(function(){return L})),r.d(e,"getEdges",(function(){return I})),r.d(e,"getClasses",(function(){return P})),r.d(e,"clear",(function(){return R})),r.d(e,"defaultStyle",(function(){return Y})),r.d(e,"addSubGraph",(function(){return V})),r.d(e,"getDepthFirstPos",(function(){return U})),r.d(e,"indexNodes",(function(){return G})),r.d(e,"getSubGraphs",(function(){return H})),r.d(e,"firstGraph",(function(){return q}));var n=r("d3"),i=r("./src/utils.js"),a=r("./src/config.js"),o=r("./src/diagrams/common/common.js"),s=r("./src/mermaidAPI.js");function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var l,u=a.getConfig(),d={},h=[],f=[],p=[],g={},y={},m=0,v=!0,b=[],x=function(t,e,r){s.default.parseDirective(this,t,e,r)},k=function(t,e,r,n,i){var s,c=t;void 0!==c&&0!==c.trim().length&&(c[0].match(/\d/)&&(c=""+c),void 0===d[c]&&(d[c]={id:c,styles:[],classes:[]}),void 0!==e?(u=a.getConfig(),'"'===(s=o.default.sanitizeText(e.trim(),u))[0]&&'"'===s[s.length-1]&&(s=s.substring(1,s.length-1)),d[c].text=s):void 0===d[c].text&&(d[c].text=t),void 0!==r&&(d[c].type=r),null!=n&&n.forEach((function(t){d[c].styles.push(t)})),null!=i&&i.forEach((function(t){d[c].classes.push(t)})))},w=function(t,e,r,n){var i=t,a=e;i[0].match(/\d/)&&(i=""+i),a[0].match(/\d/)&&(a=""+a);var s={start:i,end:a,type:void 0,text:""};void 0!==(n=r.text)&&(s.text=o.default.sanitizeText(n.trim(),u),'"'===s.text[0]&&'"'===s.text[s.text.length-1]&&(s.text=s.text.substring(1,s.text.length-1))),void 0!==r&&(s.type=r.type,s.stroke=r.stroke,s.length=r.length),h.push(s)},_=function(t,e,r,n){var i,a;for(i=0;i<t.length;i++)for(a=0;a<e.length;a++)w(t[i],e[a],r,n)},E=function(t,e){t.forEach((function(t){"default"===t?h.defaultInterpolate=e:h[t].interpolate=e}))},C=function(t,e){t.forEach((function(t){"default"===t?h.defaultStyle=e:(-1===i.default.isSubstringInArray("fill",e)&&e.push("fill:none"),h[t].style=e)}))},T=function(t,e){void 0===f[t]&&(f[t]={id:t,styles:[],textStyles:[]}),null!=e&&e.forEach((function(e){if(e.match("color")){var r=e.replace("fill","bgFill").replace("color","fill");f[t].textStyles.push(r)}f[t].styles.push(e)}))},O=function(t){(l=t).match(/.*</)&&(l="RL"),l.match(/.*\^/)&&(l="BT"),l.match(/.*>/)&&(l="LR"),l.match(/.*v/)&&(l="TB")},S=function(t,e){t.split(",").forEach((function(t){var r=t;t[0].match(/\d/)&&(r=""+r),void 0!==d[r]&&d[r].classes.push(e),void 0!==g[r]&&g[r].classes.push(e)}))},A=function(t,e){t.split(",").forEach((function(t){void 0!==e&&(y[t]=o.default.sanitizeText(e,u))}))},j=function(t,e,r,n){t.split(",").forEach((function(t){var r=t;t[0].match(/\d/)&&(r=""+r),void 0!==d[r]&&(d[r].link=i.default.formatUrl(e,u),d[r].linkTarget=n)})),A(t,r),S(t,"clickable")},D=function(t){return y[t]},B=function(t,e,r){t.split(",").forEach((function(t){!function(t,e){var r=t;t[0].match(/\d/)&&(r=""+r),"loose"===a.getConfig().securityLevel&&void 0!==e&&void 0!==d[r]&&b.push((function(){var t=document.querySelector('[id="'.concat(r,'"]'));null!==t&&t.addEventListener("click",(function(){i.default.runFunc(e,r)}),!1)}))}(t,e)})),A(t,r),S(t,"clickable")},N=function(t){b.forEach((function(e){e(t)}))},M=function(){return l.trim()},L=function(){return d},I=function(){return h},P=function(){return f},F=function(t){var e=Object(n.select)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Object(n.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Object(n.select)(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=Object(n.select)(this);if(null!==t.attr("title")){var r=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(t.attr("title")).style("left",window.scrollX+r.left+(r.right-r.left)/2+"px").style("top",window.scrollY+r.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Object(n.select)(this).classed("hover",!1)}))};b.push(F);var R=function(){d={},f={},h=[],(b=[]).push(F),p=[],g={},m=0,y=[],v=!0},Y=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},V=function(t,e,r){var n=t.trim(),i=r;t===r&&r.match(/\s/)&&(n=void 0);var a,s,l,d=[];a=d.concat.apply(d,e),s={boolean:{},number:{},string:{}},l=[],d=a.filter((function(t){var e=c(t);return""!==t.trim()&&(e in s?!s[e].hasOwnProperty(t)&&(s[e][t]=!0):!(l.indexOf(t)>=0)&&l.push(t))}));for(var h=0;h<d.length;h++)d[h][0].match(/\d/)&&(d[h]=""+d[h]);(n=n||"subGraph"+m)[0].match(/\d/)&&(n=""+n),i=i||"",i=o.default.sanitizeText(i,u),m+=1;var f={id:n,nodes:d,title:i.trim(),classes:[]};return p.push(f),g[n]=f,n},W=function(t){for(var e=0;e<p.length;e++)if(p[e].id===t)return e;return-1},z=-1,$=[],U=function(t){return $[t]},G=function(){z=-1,p.length>0&&function t(e,r){var n=p[r].nodes;if(!((z+=1)>2e3)){if($[z]=r,p[r].id===e)return{result:!0,count:0};for(var i=0,a=1;i<n.length;){var o=W(n[i]);if(o>=0){var s=t(e,o);if(s.result)return{result:!0,count:a+s.count};a+=s.count}i+=1}return{result:!1,count:a}}}("none",p.length-1)},H=function(){return p},q=function(){return!!v&&(v=!1,!0)};e.default={parseDirective:x,defaultConfig:function(){return a.defaultConfig.flowchart},addVertex:k,addLink:_,updateLinkInterpolate:E,updateLink:C,addClass:T,setDirection:O,setClass:S,getTooltip:D,setClickEvent:B,setLink:j,bindFunctions:N,getDirection:M,getVertices:L,getEdges:I,getClasses:P,clear:R,defaultStyle:Y,addSubGraph:V,getDepthFirstPos:U,indexNodes:G,getSubGraphs:H,destructLink:function(t,e){var r,n=function(t){var e=t.trim(),r=e.slice(0,-1),n="arrow_open";switch(e.slice(-1)){case"x":n="arrow_cross","x"===e[0]&&(n="double_"+n,r=r.slice(1));break;case">":n="arrow_point","<"===e[0]&&(n="double_"+n,r=r.slice(1));break;case"o":n="arrow_circle","o"===e[0]&&(n="double_"+n,r=r.slice(1))}var i="normal",a=r.length-1;"="===r[0]&&(i="thick");var o=function(t,e){for(var r=e.length,n=0,i=0;i<r;++i)e[i]===t&&++n;return n}(".",r);return o&&(i="dotted",a=o),{type:n,stroke:i,length:a}}(t);if(e){if((r=function(t){var e=t.trim(),r="arrow_open";switch(e[0]){case"<":r="arrow_point",e=e.slice(1);break;case"x":r="arrow_cross",e=e.slice(1);break;case"o":r="arrow_circle",e=e.slice(1)}var n="normal";return-1!==e.indexOf("=")&&(n="thick"),-1!==e.indexOf(".")&&(n="dotted"),{type:r,stroke:n}}(e)).stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===r.type)r.type=n.type;else{if(r.type!==n.type)return{type:"INVALID",stroke:"INVALID"};r.type="double_"+r.type}return"double_arrow"===r.type&&(r.type="double_arrow_point"),r.length=n.length,r}return n},lex:{firstGraph:q}}},"./src/diagrams/flowchart/flowRenderer-v2.js":function(t,e,r){"use strict";r.r(e),r.d(e,"setConf",(function(){return m})),r.d(e,"addVertices",(function(){return v})),r.d(e,"addEdges",(function(){return b})),r.d(e,"getClasses",(function(){return x})),r.d(e,"draw",(function(){return k}));var n=r("graphlib"),i=r.n(n),a=r("d3"),o=r("./src/diagrams/flowchart/flowDb.js"),s=r("./src/diagrams/flowchart/parser/flow.jison"),c=r.n(s),l=r("./src/config.js"),u=r("./src/dagre-wrapper/index.js"),d=r("dagre-d3/lib/label/add-html-label.js"),h=r.n(d),f=r("./src/logger.js"),p=r("./src/diagrams/common/common.js"),g=r("./src/utils.js"),y={},m=function(t){for(var e=Object.keys(t),r=0;r<e.length;r++)y[e[r]]=t[e[r]]},v=function(t,e,r){var n=Object(a.select)('[id="'.concat(r,'"]'));Object.keys(t).forEach((function(r){var i=t[r],a="default";i.classes.length>0&&(a=i.classes.join(" "));var o,s=Object(g.getStylesFromArray)(i.styles),c=void 0!==i.text?i.text:i.id;if(Object(l.getConfig)().flowchart.htmlLabels){var u={label:c.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(o=h()(n,u).node()).parentNode.removeChild(o)}else{var d=document.createElementNS("http://www.w3.org/2000/svg","text");d.setAttribute("style",s.labelStyle.replace("color:","fill:"));for(var y=c.split(p.default.lineBreakRegex),m=0;m<y.length;m++){var v=document.createElementNS("http://www.w3.org/2000/svg","tspan");v.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),v.setAttribute("dy","1em"),v.setAttribute("x","1"),v.textContent=y[m],d.appendChild(v)}o=d}var b=0,x="";switch(i.type){case"round":b=5,x="rect";break;case"square":x="rect";break;case"diamond":x="question";break;case"hexagon":x="hexagon";break;case"odd":x="rect_left_inv_arrow";break;case"lean_right":x="lean_right";break;case"lean_left":x="lean_left";break;case"trapezoid":x="trapezoid";break;case"inv_trapezoid":x="inv_trapezoid";break;case"odd_right":x="rect_left_inv_arrow";break;case"circle":x="circle";break;case"ellipse":x="ellipse";break;case"stadium":x="stadium";break;case"subroutine":x="subroutine";break;case"cylinder":x="cylinder";break;case"group":x="rect";break;default:x="rect"}e.setNode(i.id,{labelStyle:s.labelStyle,shape:x,labelText:c,rx:b,ry:b,class:a,style:s.style,id:i.id,width:"group"===i.type?500:void 0,type:i.type,padding:Object(l.getConfig)().flowchart.padding}),f.logger.info("setNode",{labelStyle:s.labelStyle,shape:x,labelText:c,rx:b,ry:b,class:a,style:s.style,id:i.id,width:"group"===i.type?500:void 0,type:i.type,padding:Object(l.getConfig)().flowchart.padding})}))},b=function(t,e){var r,n,i=0;if(void 0!==t.defaultStyle){var o=Object(g.getStylesFromArray)(t.defaultStyle);r=o.style,n=o.labelStyle}t.forEach((function(o){i++;var s="L-"+o.start+"-"+o.end,c="LS-"+o.start,u="LE-"+o.end,d={};switch(d.minlen=o.length||1,"arrow_open"===o.type?d.arrowhead="none":d.arrowhead="normal",d.arrowTypeStart="arrow_open",d.arrowTypeEnd="arrow_open",o.type){case"double_arrow_cross":d.arrowTypeStart="arrow_cross";case"arrow_cross":d.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":d.arrowTypeStart="arrow_point";case"arrow_point":d.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":d.arrowTypeStart="arrow_circle";case"arrow_circle":d.arrowTypeEnd="arrow_circle"}var h="",f="";if(void 0!==o.style){var m=Object(g.getStylesFromArray)(o.style);h=m.style,f=m.labelStyle}else switch(o.stroke){case"normal":h="fill:none",void 0!==r&&(h=r),void 0!==n&&(f=n),d.thickness="normal",d.pattern="solid";break;case"dotted":d.thickness="normal",d.pattern="dotted";break;case"thick":d.thickness="thick",d.pattern="solid"}d.style=h,d.labelStyle=f,void 0!==o.interpolate?d.curve=Object(g.interpolateToCurve)(o.interpolate,a.curveLinear):void 0!==t.defaultInterpolate?d.curve=Object(g.interpolateToCurve)(t.defaultInterpolate,a.curveLinear):d.curve=Object(g.interpolateToCurve)(y.curve,a.curveLinear),void 0===o.text?void 0!==o.style&&(d.arrowheadStyle="fill: #333"):(d.arrowheadStyle="fill: #333",d.labelpos="c",Object(l.getConfig)().flowchart.htmlLabels,d.labelType="text",d.label=o.text.replace(p.default.lineBreakRegex,"\n"),void 0===o.style&&(d.style=d.style||"stroke: #333; stroke-width: 1.5px;fill:none"),d.labelStyle=d.labelStyle.replace("color:","fill:")),d.id=s,d.classes="flowchart-link "+c+" "+u,e.setEdge(o.start,o.end,d,i)}))},x=function(t){f.logger.info("Extracting classes"),o.default.clear();var e=c.a.parser;e.yy=o.default;try{e.parse(t)}catch(t){return}return o.default.getClasses()},k=function(t,e){f.logger.info("Drawing flowchart"),o.default.clear();var r=c.a.parser;r.yy=o.default,r.parse(t);var n=o.default.getDirection();void 0===n&&(n="TD");var s,d=Object(l.getConfig)().flowchart,h=d.nodeSpacing||50,p=d.rankSpacing||50,g=new i.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:h,ranksep:p,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),y=o.default.getSubGraphs();f.logger.info("Subgraphs - ",y);for(var m=y.length-1;m>=0;m--)s=y[m],f.logger.info("Subgraph - ",s),o.default.addVertex(s.id,s.title,"group",void 0,s.classes);var x=o.default.getVertices(),k=o.default.getEdges();f.logger.info(k);var w=0;for(w=y.length-1;w>=0;w--){s=y[w],Object(a.selectAll)("cluster").append("text");for(var _=0;_<s.nodes.length;_++)g.setParent(s.nodes[_],s.id)}v(x,g,e),b(k,g);var E=Object(a.select)('[id="'.concat(e,'"]'));E.attr("xmlns:xlink","http://www.w3.org/1999/xlink");var C=Object(a.select)("#"+e+" g");Object(u.render)(C,g,["point","circle","cross"],"flowchart",e),C.selectAll("g.node").attr("title",(function(){return o.default.getTooltip(this.id)}));var T=d.diagramPadding,O=E.node().getBBox(),S=O.width+2*T,A=O.height+2*T;if(f.logger.debug("new ViewBox 0 0 ".concat(S," ").concat(A),"translate(".concat(T-g._label.marginx,", ").concat(T-g._label.marginy,")")),d.useMaxWidth?(E.attr("width","100%"),E.attr("style","max-width: ".concat(S,"px;"))):(E.attr("height",A),E.attr("width",S)),E.attr("viewBox","0 0 ".concat(S," ").concat(A)),E.select("g").attr("transform","translate(".concat(T-g._label.marginx,", ").concat(T-O.y,")")),o.default.indexNodes("subGraph"+w),!d.htmlLabels)for(var j=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),D=0;D<j.length;D++){var B=j[D],N=B.getBBox(),M=document.createElementNS("http://www.w3.org/2000/svg","rect");M.setAttribute("rx",0),M.setAttribute("ry",0),M.setAttribute("width",N.width),M.setAttribute("height",N.height),B.insertBefore(M,B.firstChild)}Object.keys(x).forEach((function(t){var r=x[t];if(r.link){var n=Object(a.select)("#"+e+' [id="'+t+'"]');if(n){var i=document.createElementNS("http://www.w3.org/2000/svg","a");i.setAttributeNS("http://www.w3.org/2000/svg","class",r.classes.join(" ")),i.setAttributeNS("http://www.w3.org/2000/svg","href",r.link),i.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),r.linkTarget&&i.setAttributeNS("http://www.w3.org/2000/svg","target",r.linkTarget);var o=n.insert((function(){return i}),":first-child"),s=n.select(".label-container");s&&o.append((function(){return s.node()}));var c=n.select(".label");c&&o.append((function(){return c.node()}))}}}))};e.default={setConf:m,addVertices:v,addEdges:b,getClasses:x,draw:k}},"./src/diagrams/flowchart/flowRenderer.js":function(t,e,r){"use strict";r.r(e),r.d(e,"setConf",(function(){return b})),r.d(e,"addVertices",(function(){return x})),r.d(e,"addEdges",(function(){return k})),r.d(e,"getClasses",(function(){return w})),r.d(e,"draw",(function(){return _}));var n=r("graphlib"),i=r.n(n),a=r("d3"),o=r("./src/diagrams/flowchart/flowDb.js"),s=r("./src/diagrams/flowchart/parser/flow.jison"),c=r.n(s),l=r("./src/config.js"),u=r("dagre-d3"),d=r.n(u),h=r("dagre-d3/lib/label/add-html-label.js"),f=r.n(h),p=r("./src/logger.js"),g=r("./src/diagrams/common/common.js"),y=r("./src/utils.js"),m=r("./src/diagrams/flowchart/flowChartShapes.js"),v={},b=function(t){for(var e=Object.keys(t),r=0;r<e.length;r++)v[e[r]]=t[e[r]]},x=function(t,e,r){var n=Object(a.select)('[id="'.concat(r,'"]'));Object.keys(t).forEach((function(r){var i=t[r],a="default";i.classes.length>0&&(a=i.classes.join(" "));var o,s=Object(y.getStylesFromArray)(i.styles),c=void 0!==i.text?i.text:i.id;if(Object(l.getConfig)().flowchart.htmlLabels){var u={label:c.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(o=f()(n,u).node()).parentNode.removeChild(o)}else{var d=document.createElementNS("http://www.w3.org/2000/svg","text");d.setAttribute("style",s.labelStyle.replace("color:","fill:"));for(var h=c.split(g.default.lineBreakRegex),p=0;p<h.length;p++){var m=document.createElementNS("http://www.w3.org/2000/svg","tspan");m.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),m.setAttribute("dy","1em"),m.setAttribute("x","1"),m.textContent=h[p],d.appendChild(m)}o=d}var v=0,b="";switch(i.type){case"round":v=5,b="rect";break;case"square":b="rect";break;case"diamond":b="question";break;case"hexagon":b="hexagon";break;case"odd":b="rect_left_inv_arrow";break;case"lean_right":b="lean_right";break;case"lean_left":b="lean_left";break;case"trapezoid":b="trapezoid";break;case"inv_trapezoid":b="inv_trapezoid";break;case"odd_right":b="rect_left_inv_arrow";break;case"circle":b="circle";break;case"ellipse":b="ellipse";break;case"stadium":b="stadium";break;case"subroutine":b="subroutine";break;case"cylinder":b="cylinder";break;case"group":b="rect";break;default:b="rect"}e.setNode(i.id,{labelType:"svg",labelStyle:s.labelStyle,shape:b,label:o,rx:v,ry:v,class:a,style:s.style,id:i.id})}))},k=function(t,e){var r,n,i=0;if(void 0!==t.defaultStyle){var o=Object(y.getStylesFromArray)(t.defaultStyle);r=o.style,n=o.labelStyle}t.forEach((function(o){i++;var s="L-"+o.start+"-"+o.end,c="LS-"+o.start,u="LE-"+o.end,d={};"arrow_open"===o.type?d.arrowhead="none":d.arrowhead="normal";var h="",f="";if(void 0!==o.style){var p=Object(y.getStylesFromArray)(o.style);h=p.style,f=p.labelStyle}else switch(o.stroke){case"normal":h="fill:none",void 0!==r&&(h=r),void 0!==n&&(f=n);break;case"dotted":h="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":h=" stroke-width: 3.5px;fill:none"}d.style=h,d.labelStyle=f,void 0!==o.interpolate?d.curve=Object(y.interpolateToCurve)(o.interpolate,a.curveLinear):void 0!==t.defaultInterpolate?d.curve=Object(y.interpolateToCurve)(t.defaultInterpolate,a.curveLinear):d.curve=Object(y.interpolateToCurve)(v.curve,a.curveLinear),void 0===o.text?void 0!==o.style&&(d.arrowheadStyle="fill: #333"):(d.arrowheadStyle="fill: #333",d.labelpos="c",Object(l.getConfig)().flowchart.htmlLabels?(d.labelType="html",d.label='<span id="L-'.concat(s,'" class="edgeLabel L-').concat(c,"' L-").concat(u,'">').concat(o.text,"</span>")):(d.labelType="text",d.label=o.text.replace(g.default.lineBreakRegex,"\n"),void 0===o.style&&(d.style=d.style||"stroke: #333; stroke-width: 1.5px;fill:none"),d.labelStyle=d.labelStyle.replace("color:","fill:"))),d.id=s,d.class=c+" "+u,d.minlen=o.length||1,e.setEdge(o.start,o.end,d,i)}))},w=function(t){p.logger.info("Extracting classes"),o.default.clear();try{var e=c.a.parser;return e.yy=o.default,e.parse(t),o.default.getClasses()}catch(t){return}},_=function(t,e){p.logger.info("Drawing flowchart"),o.default.clear();var r=c.a.parser;r.yy=o.default,r.parse(t);var n=o.default.getDirection();void 0===n&&(n="TD");for(var s,u=Object(l.getConfig)().flowchart,h=u.nodeSpacing||50,f=u.rankSpacing||50,g=new i.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:h,ranksep:f,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),y=o.default.getSubGraphs(),v=y.length-1;v>=0;v--)s=y[v],o.default.addVertex(s.id,s.title,"group",void 0,s.classes);var b=o.default.getVertices(),w=o.default.getEdges(),_=0;for(_=y.length-1;_>=0;_--){s=y[_],Object(a.selectAll)("cluster").append("text");for(var E=0;E<s.nodes.length;E++)g.setParent(s.nodes[E],s.id)}x(b,g,e),k(w,g);var C=new(0,d.a.render);m.default.addToRender(C),C.arrows().none=function(t,e,r,n){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");d.a.util.applyStyle(i,r[n+"Style"])},C.arrows().normal=function(t,e){t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};var T=Object(a.select)('[id="'.concat(e,'"]'));T.attr("xmlns:xlink","http://www.w3.org/1999/xlink");var O=Object(a.select)("#"+e+" g");C(O,g),O.selectAll("g.node").attr("title",(function(){return o.default.getTooltip(this.id)}));var S=u.diagramPadding,A=T.node().getBBox(),j=A.width+2*S,D=A.height+2*S;u.useMaxWidth?(T.attr("width","100%"),T.attr("style","max-width: ".concat(j,"px;"))):(T.attr("height",D),T.attr("width",j));var B="".concat(A.x-S," ").concat(A.y-S," ").concat(j," ").concat(D);for(p.logger.debug("viewBox ".concat(B)),T.attr("viewBox",B),o.default.indexNodes("subGraph"+_),_=0;_<y.length;_++)if("undefined"!==(s=y[_]).title){var N=document.querySelectorAll("#"+e+' [id="'+s.id+'"] rect'),M=document.querySelectorAll("#"+e+' [id="'+s.id+'"]'),L=N[0].x.baseVal.value,I=N[0].y.baseVal.value,P=N[0].width.baseVal.value,F=Object(a.select)(M[0]).select(".label");F.attr("transform","translate(".concat(L+P/2,", ").concat(I+14,")")),F.attr("id",e+"Text");for(var R=0;R<s.classes.length;R++)M[0].classList.add(s.classes[R])}u.htmlLabels;for(var Y=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),V=0;V<Y.length;V++){var W=Y[V],z=W.getBBox(),$=document.createElementNS("http://www.w3.org/2000/svg","rect");$.setAttribute("rx",0),$.setAttribute("ry",0),$.setAttribute("width",z.width),$.setAttribute("height",z.height),W.insertBefore($,W.firstChild)}Object.keys(b).forEach((function(t){var r=b[t];if(r.link){var n=Object(a.select)("#"+e+' [id="'+t+'"]');if(n){var i=document.createElementNS("http://www.w3.org/2000/svg","a");i.setAttributeNS("http://www.w3.org/2000/svg","class",r.classes.join(" ")),i.setAttributeNS("http://www.w3.org/2000/svg","href",r.link),i.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),r.linkTarget&&i.setAttributeNS("http://www.w3.org/2000/svg","target",r.linkTarget);var o=n.insert((function(){return i}),":first-child"),s=n.select(".label-container");s&&o.append((function(){return s.node()}));var c=n.select(".label");c&&o.append((function(){return c.node()}))}}}))};e.default={setConf:b,addVertices:x,addEdges:k,getClasses:w,draw:_}},"./src/diagrams/flowchart/parser/flow.jison":function(t,e,r){(function(t,n){var i=function(){var t=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},e=[1,9],r=[1,7],n=[1,6],i=[1,8],a=[1,20,21,22,23,38,46,75,76,77,78,79,80,91,92,95,96,97,99,100,106,107,108,109,110,111],o=[2,10],s=[1,20],c=[1,21],l=[1,22],u=[1,23],d=[1,30],h=[1,54],f=[1,32],p=[1,33],g=[1,34],y=[1,35],m=[1,36],v=[1,48],b=[1,43],x=[1,45],k=[1,40],w=[1,44],_=[1,47],E=[1,51],C=[1,52],T=[1,53],O=[1,42],S=[1,46],A=[1,49],j=[1,50],D=[1,41],B=[1,57],N=[1,62],M=[1,20,21,22,23,38,42,46,75,76,77,78,79,80,91,92,95,96,97,99,100,106,107,108,109,110,111],L=[1,66],I=[1,65],P=[1,67],F=[20,21,23,69,70],R=[20,21,22,23,69,70],Y=[20,21,22,23,47,69,70],V=[20,21,22,23,40,46,47,49,51,53,55,57,59,61,62,64,69,70,80,91,92,95,96,97,99,100,106,107,108,109,110,111],W=[20,21,23],z=[20,21,23,46,69,70,80,91,92,95,96,97,99,100,106,107,108,109,110,111],$=[1,12,20,21,22,23,24,38,42,46,75,76,77,78,79,80,91,92,95,96,97,99,100,106,107,108,109,110,111],U=[46,80,91,92,95,96,97,99,100,106,107,108,109,110,111],G=[1,115],H=[1,136],q=[1,137],X=[1,138],Z=[1,139],J=[1,119],Q=[1,110],K=[1,111],tt=[1,107],et=[1,131],rt=[1,132],nt=[1,133],it=[1,134],at=[1,135],ot=[1,140],st=[1,141],ct=[1,113],lt=[1,121],ut=[1,124],dt=[1,122],ht=[1,123],ft=[1,116],pt=[1,129],gt=[1,128],yt=[1,112],mt=[1,109],vt=[1,118],bt=[1,120],xt=[1,125],kt=[1,126],wt=[1,127],_t=[1,130],Et=[20,21,22,23,38,42,46,75,76,77,78,79,80,91,92,95,96,97,99,100,106,107,108,109,110,111],Ct=[1,144],Tt=[1,148],Ot=[1,150],St=[1,151],At=[12,21,22,24],jt=[20,21,22,23,24,26,38,40,41,42,46,50,52,54,56,58,60,61,63,65,69,70,71,75,76,77,78,79,80,81,84,91,92,95,96,97,99,100,101,102,106,107,108,109,110,111],Dt=[20,21,22,23,26,46,80,91,92,95,96,97,99,100,106,107,108,109,110,111],Bt=[22,92],Nt=[1,220],Mt=[1,224],Lt=[1,221],It=[1,218],Pt=[1,215],Ft=[1,216],Rt=[1,217],Yt=[1,219],Vt=[1,222],Wt=[1,223],zt=[1,225],$t=[1,241],Ut=[20,21,23,92],Gt=[20,21,22,23,75,88,91,92,95,96,97,98,99,100,101],Ht={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,link:43,node:44,vertex:45,AMP:46,STYLE_SEPARATOR:47,idString:48,PS:49,PE:50,"(-":51,"-)":52,STADIUMSTART:53,STADIUMEND:54,SUBROUTINESTART:55,SUBROUTINEEND:56,CYLINDERSTART:57,CYLINDEREND:58,DIAMOND_START:59,DIAMOND_STOP:60,TAGEND:61,TRAPSTART:62,TRAPEND:63,INVTRAPSTART:64,INVTRAPEND:65,linkStatement:66,arrowText:67,TESTSTR:68,START_LINK:69,LINK:70,PIPE:71,textToken:72,STR:73,keywords:74,STYLE:75,LINKSTYLE:76,CLASSDEF:77,CLASS:78,CLICK:79,DOWN:80,UP:81,textNoTags:82,textNoTagsToken:83,DEFAULT:84,stylesOpt:85,alphaNum:86,LINK_TARGET:87,HEX:88,numList:89,INTERPOLATE:90,NUM:91,COMMA:92,style:93,styleComponent:94,ALPHA:95,COLON:96,MINUS:97,UNIT:98,BRKT:99,DOT:100,PCT:101,TAGSTART:102,alphaNumToken:103,idStringToken:104,alphaNumStatement:105,PUNCTUATION:106,UNICODE_TEXT:107,PLUS:108,EQUALS:109,MULT:110,UNDERSCORE:111,graphCodeTokens:112,ARROW_CROSS:113,ARROW_POINT:114,ARROW_CIRCLE:115,ARROW_OPEN:116,QUOTE:117,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",46:"AMP",47:"STYLE_SEPARATOR",49:"PS",50:"PE",51:"(-",52:"-)",53:"STADIUMSTART",54:"STADIUMEND",55:"SUBROUTINESTART",56:"SUBROUTINEEND",57:"CYLINDERSTART",58:"CYLINDEREND",59:"DIAMOND_START",60:"DIAMOND_STOP",61:"TAGEND",62:"TRAPSTART",63:"TRAPEND",64:"INVTRAPSTART",65:"INVTRAPEND",68:"TESTSTR",69:"START_LINK",70:"LINK",71:"PIPE",73:"STR",75:"STYLE",76:"LINKSTYLE",77:"CLASSDEF",78:"CLASS",79:"CLICK",80:"DOWN",81:"UP",84:"DEFAULT",87:"LINK_TARGET",88:"HEX",90:"INTERPOLATE",91:"NUM",92:"COMMA",95:"ALPHA",96:"COLON",97:"MINUS",98:"UNIT",99:"BRKT",100:"DOT",101:"PCT",102:"TAGSTART",106:"PUNCTUATION",107:"UNICODE_TEXT",108:"PLUS",109:"EQUALS",110:"MULT",111:"UNDERSCORE",113:"ARROW_CROSS",114:"ARROW_POINT",115:"ARROW_CIRCLE",116:"ARROW_OPEN",117:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[44,1],[44,5],[44,3],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[43,2],[43,3],[43,3],[43,1],[43,3],[66,1],[67,3],[39,1],[39,2],[39,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[82,1],[82,2],[35,5],[35,5],[36,5],[37,5],[37,7],[37,5],[37,7],[37,7],[37,9],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[89,1],[89,3],[85,1],[85,3],[93,1],[93,2],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[83,1],[83,1],[83,1],[83,1],[48,1],[48,2],[86,1],[86,2],[105,1],[105,1],[105,1],[105,1],[103,1],[103,1],[103,1],[103,1],[103,1],[103,1],[103,1],[103,1],[103,1],[103,1],[103,1],[103,1],[103,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1]],performAction:function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 5:n.parseDirective("%%{","open_directive");break;case 6:n.parseDirective(a[s],"type_directive");break;case 7:a[s]=a[s].trim().replace(/'/g,'"'),n.parseDirective(a[s],"arg_directive");break;case 8:n.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:a[s]!==[]&&a[s-1].push(a[s]),this.$=a[s-1];break;case 12:case 76:case 78:case 90:case 138:case 140:case 141:this.$=a[s];break;case 19:n.setDirection("TB"),this.$="TB";break;case 20:n.setDirection(a[s-1]),this.$=a[s-1];break;case 35:this.$=a[s-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=n.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 42:this.$=n.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 43:this.$=n.addSubGraph(void 0,a[s-1],void 0);break;case 47:n.addLink(a[s-2].stmt,a[s],a[s-1]),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 48:n.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 49:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 50:this.$={stmt:a[s],nodes:a[s]};break;case 51:this.$=[a[s]];break;case 52:this.$=a[s-4].concat(a[s]);break;case 53:this.$=[a[s-2]],n.setClass(a[s-2],a[s]);break;case 54:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"square");break;case 55:this.$=a[s-5],n.addVertex(a[s-5],a[s-2],"circle");break;case 56:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"ellipse");break;case 57:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"stadium");break;case 58:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"subroutine");break;case 59:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"cylinder");break;case 60:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"round");break;case 61:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"diamond");break;case 62:this.$=a[s-5],n.addVertex(a[s-5],a[s-2],"hexagon");break;case 63:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"odd");break;case 64:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"trapezoid");break;case 65:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"inv_trapezoid");break;case 66:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"lean_right");break;case 67:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"lean_left");break;case 68:this.$=a[s],n.addVertex(a[s]);break;case 69:a[s-1].text=a[s],this.$=a[s-1];break;case 70:case 71:a[s-2].text=a[s-1],this.$=a[s-2];break;case 72:this.$=a[s];break;case 73:var c=n.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1]};break;case 74:c=n.destructLink(a[s]),this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 75:this.$=a[s-1];break;case 77:case 91:case 139:this.$=a[s-1]+""+a[s];break;case 92:case 93:this.$=a[s-4],n.addClass(a[s-2],a[s]);break;case 94:this.$=a[s-4],n.setClass(a[s-2],a[s]);break;case 95:this.$=a[s-4],n.setClickEvent(a[s-2],a[s],void 0);break;case 96:this.$=a[s-6],n.setClickEvent(a[s-4],a[s-2],a[s]);break;case 97:this.$=a[s-4],n.setLink(a[s-2],a[s],void 0,void 0);break;case 98:this.$=a[s-6],n.setLink(a[s-4],a[s-2],a[s],void 0);break;case 99:this.$=a[s-6],n.setLink(a[s-4],a[s-2],void 0,a[s]);break;case 100:this.$=a[s-8],n.setLink(a[s-6],a[s-4],a[s-2],a[s]);break;case 101:this.$=a[s-4],n.addVertex(a[s-2],void 0,void 0,a[s]);break;case 102:case 104:this.$=a[s-4],n.updateLink(a[s-2],a[s]);break;case 103:this.$=a[s-4],n.updateLink([a[s-2]],a[s]);break;case 105:this.$=a[s-8],n.updateLinkInterpolate([a[s-6]],a[s-2]),n.updateLink([a[s-6]],a[s]);break;case 106:this.$=a[s-8],n.updateLinkInterpolate(a[s-6],a[s-2]),n.updateLink(a[s-6],a[s]);break;case 107:this.$=a[s-6],n.updateLinkInterpolate([a[s-4]],a[s]);break;case 108:this.$=a[s-6],n.updateLinkInterpolate(a[s-4],a[s]);break;case 109:case 111:this.$=[a[s]];break;case 110:case 112:a[s-2].push(a[s]),this.$=a[s-2];break;case 114:this.$=a[s-1]+a[s];break;case 136:this.$=a[s];break;case 137:this.$=a[s-1]+""+a[s];break;case 142:this.$="v";break;case 143:this.$="-"}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:r,22:n,24:i},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:r,22:n,24:i},t(a,o,{17:11}),{7:12,13:[1,13]},{16:14,21:r,22:n,24:i},{16:15,21:r,22:n,24:i},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:s,21:c,22:l,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:d,44:31,45:37,46:h,48:38,75:f,76:p,77:g,78:y,79:m,80:v,91:b,92:x,95:k,96:w,97:_,99:E,100:C,104:39,106:T,107:O,108:S,109:A,110:j,111:D},{8:55,10:[1,56],15:B},t([10,15],[2,6]),t(a,[2,17]),t(a,[2,18]),t(a,[2,19]),{20:[1,59],21:[1,60],22:N,27:58,30:61},t(M,[2,11]),t(M,[2,12]),t(M,[2,13]),t(M,[2,14]),t(M,[2,15]),t(M,[2,16]),{9:63,20:L,21:I,23:P,43:64,66:68,69:[1,69],70:[1,70]},{9:71,20:L,21:I,23:P},{9:72,20:L,21:I,23:P},{9:73,20:L,21:I,23:P},{9:74,20:L,21:I,23:P},{9:75,20:L,21:I,23:P},{9:77,20:L,21:I,22:[1,76],23:P},t(F,[2,50],{30:78,22:N}),{22:[1,79]},{22:[1,80]},{22:[1,81]},{22:[1,82]},{22:[1,83]},t(R,[2,51],{47:[1,84]}),t(Y,[2,68],{104:95,40:[1,85],46:h,49:[1,86],51:[1,87],53:[1,88],55:[1,89],57:[1,90],59:[1,91],61:[1,92],62:[1,93],64:[1,94],80:v,91:b,92:x,95:k,96:w,97:_,99:E,100:C,106:T,107:O,108:S,109:A,110:j,111:D}),t(V,[2,136]),t(V,[2,157]),t(V,[2,158]),t(V,[2,159]),t(V,[2,160]),t(V,[2,161]),t(V,[2,162]),t(V,[2,163]),t(V,[2,164]),t(V,[2,165]),t(V,[2,166]),t(V,[2,167]),t(V,[2,168]),t(V,[2,169]),t(V,[2,170]),t(V,[2,171]),{9:96,20:L,21:I,23:P},{11:97,14:[1,98]},t(W,[2,8]),t(a,[2,20]),t(a,[2,26]),t(a,[2,27]),{21:[1,99]},t(z,[2,34],{30:100,22:N}),t(M,[2,35]),{44:101,45:37,46:h,48:38,80:v,91:b,92:x,95:k,96:w,97:_,99:E,100:C,104:39,106:T,107:O,108:S,109:A,110:j,111:D},t($,[2,44]),t($,[2,45]),t($,[2,46]),t(U,[2,72],{67:102,68:[1,103],71:[1,104]}),{22:G,24:H,26:q,38:X,39:105,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},t([46,68,71,80,91,92,95,96,97,99,100,106,107,108,109,110,111],[2,74]),t(M,[2,36]),t(M,[2,37]),t(M,[2,38]),t(M,[2,39]),t(M,[2,40]),{22:G,24:H,26:q,38:X,39:142,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},t(Et,o,{17:143}),t(F,[2,49],{46:Ct}),{26:Tt,46:J,80:Ot,86:145,88:[1,146],91:lt,92:ut,95:dt,96:ht,97:St,99:pt,100:gt,103:149,105:147,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{84:[1,152],89:153,91:[1,154]},{26:Tt,46:J,80:Ot,84:[1,155],86:156,91:lt,92:ut,95:dt,96:ht,97:St,99:pt,100:gt,103:149,105:147,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{26:Tt,46:J,80:Ot,86:157,91:lt,92:ut,95:dt,96:ht,97:St,99:pt,100:gt,103:149,105:147,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{26:Tt,46:J,80:Ot,86:158,91:lt,92:ut,95:dt,96:ht,97:St,99:pt,100:gt,103:149,105:147,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{46:h,48:159,80:v,91:b,92:x,95:k,96:w,97:_,99:E,100:C,104:39,106:T,107:O,108:S,109:A,110:j,111:D},{22:G,24:H,26:q,38:X,39:160,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,39:162,42:Z,46:J,49:[1,161],61:Q,69:K,72:106,73:tt,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,39:163,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,39:164,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,39:165,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,39:166,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,39:167,42:Z,46:J,59:[1,168],61:Q,69:K,72:106,73:tt,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,39:169,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,39:170,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,39:171,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},t(V,[2,137]),t(At,[2,3]),{8:172,15:B},{15:[2,7]},t(a,[2,28]),t(z,[2,33]),t(F,[2,47],{30:173,22:N}),t(U,[2,69],{22:[1,174]}),{22:[1,175]},{22:G,24:H,26:q,38:X,39:176,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,42:Z,46:J,61:Q,69:K,70:[1,177],72:178,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},t(jt,[2,76]),t(jt,[2,78]),t(jt,[2,126]),t(jt,[2,127]),t(jt,[2,128]),t(jt,[2,129]),t(jt,[2,130]),t(jt,[2,131]),t(jt,[2,132]),t(jt,[2,133]),t(jt,[2,134]),t(jt,[2,135]),t(jt,[2,144]),t(jt,[2,145]),t(jt,[2,146]),t(jt,[2,147]),t(jt,[2,148]),t(jt,[2,149]),t(jt,[2,150]),t(jt,[2,151]),t(jt,[2,152]),t(jt,[2,153]),t(jt,[2,154]),t(jt,[2,155]),t(jt,[2,156]),t(jt,[2,79]),t(jt,[2,80]),t(jt,[2,81]),t(jt,[2,82]),t(jt,[2,83]),t(jt,[2,84]),t(jt,[2,85]),t(jt,[2,86]),t(jt,[2,87]),t(jt,[2,88]),t(jt,[2,89]),{9:180,20:L,21:I,22:G,23:P,24:H,26:q,38:X,40:[1,179],42:Z,46:J,61:Q,69:K,72:178,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{18:18,19:19,20:s,21:c,22:l,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,181],44:31,45:37,46:h,48:38,75:f,76:p,77:g,78:y,79:m,80:v,91:b,92:x,95:k,96:w,97:_,99:E,100:C,104:39,106:T,107:O,108:S,109:A,110:j,111:D},{22:N,30:182},{22:[1,183],26:Tt,46:J,80:Ot,91:lt,92:ut,95:dt,96:ht,97:St,99:pt,100:gt,103:149,105:184,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:[1,185]},t(Dt,[2,138]),t(Dt,[2,140]),t(Dt,[2,141]),t(Dt,[2,142]),t(Dt,[2,143]),{22:[1,186]},{22:[1,187],92:[1,188]},t(Bt,[2,109]),{22:[1,189]},{22:[1,190],26:Tt,46:J,80:Ot,91:lt,92:ut,95:dt,96:ht,97:St,99:pt,100:gt,103:149,105:184,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:[1,191],26:Tt,46:J,80:Ot,91:lt,92:ut,95:dt,96:ht,97:St,99:pt,100:gt,103:149,105:184,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:[1,192],26:Tt,46:J,80:Ot,91:lt,92:ut,95:dt,96:ht,97:St,99:pt,100:gt,103:149,105:184,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},t(R,[2,53],{104:95,46:h,80:v,91:b,92:x,95:k,96:w,97:_,99:E,100:C,106:T,107:O,108:S,109:A,110:j,111:D}),{22:G,24:H,26:q,38:X,41:[1,193],42:Z,46:J,61:Q,69:K,72:178,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,39:194,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,42:Z,46:J,50:[1,195],61:Q,69:K,72:178,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,42:Z,46:J,52:[1,196],61:Q,69:K,72:178,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,42:Z,46:J,54:[1,197],61:Q,69:K,72:178,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,42:Z,46:J,56:[1,198],61:Q,69:K,72:178,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,42:Z,46:J,58:[1,199],61:Q,69:K,72:178,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,42:Z,46:J,60:[1,200],61:Q,69:K,72:178,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,39:201,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,41:[1,202],42:Z,46:J,61:Q,69:K,72:178,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,42:Z,46:J,61:Q,63:[1,203],65:[1,204],69:K,72:178,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{22:G,24:H,26:q,38:X,42:Z,46:J,61:Q,63:[1,206],65:[1,205],69:K,72:178,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{9:207,20:L,21:I,23:P},t(F,[2,48],{46:Ct}),t(U,[2,71]),t(U,[2,70]),{22:G,24:H,26:q,38:X,42:Z,46:J,61:Q,69:K,71:[1,208],72:178,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},t(U,[2,73]),t(jt,[2,77]),{22:G,24:H,26:q,38:X,39:209,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},t(Et,o,{17:210}),t(M,[2,43]),{45:211,46:h,48:38,80:v,91:b,92:x,95:k,96:w,97:_,99:E,100:C,104:39,106:T,107:O,108:S,109:A,110:j,111:D},{22:Nt,75:Mt,85:212,88:Lt,91:It,93:213,94:214,95:Pt,96:Ft,97:Rt,98:Yt,99:Vt,100:Wt,101:zt},t(Dt,[2,139]),{22:Nt,75:Mt,85:226,88:Lt,91:It,93:213,94:214,95:Pt,96:Ft,97:Rt,98:Yt,99:Vt,100:Wt,101:zt},{22:Nt,75:Mt,85:227,88:Lt,90:[1,228],91:It,93:213,94:214,95:Pt,96:Ft,97:Rt,98:Yt,99:Vt,100:Wt,101:zt},{22:Nt,75:Mt,85:229,88:Lt,90:[1,230],91:It,93:213,94:214,95:Pt,96:Ft,97:Rt,98:Yt,99:Vt,100:Wt,101:zt},{91:[1,231]},{22:Nt,75:Mt,85:232,88:Lt,91:It,93:213,94:214,95:Pt,96:Ft,97:Rt,98:Yt,99:Vt,100:Wt,101:zt},{22:Nt,75:Mt,85:233,88:Lt,91:It,93:213,94:214,95:Pt,96:Ft,97:Rt,98:Yt,99:Vt,100:Wt,101:zt},{26:Tt,46:J,80:Ot,86:234,91:lt,92:ut,95:dt,96:ht,97:St,99:pt,100:gt,103:149,105:147,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{26:Tt,46:J,73:[1,236],80:Ot,86:235,91:lt,92:ut,95:dt,96:ht,97:St,99:pt,100:gt,103:149,105:147,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},t(Y,[2,54]),{22:G,24:H,26:q,38:X,42:Z,46:J,50:[1,237],61:Q,69:K,72:178,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},t(Y,[2,60]),t(Y,[2,56]),t(Y,[2,57]),t(Y,[2,58]),t(Y,[2,59]),t(Y,[2,61]),{22:G,24:H,26:q,38:X,42:Z,46:J,60:[1,238],61:Q,69:K,72:178,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},t(Y,[2,63]),t(Y,[2,64]),t(Y,[2,66]),t(Y,[2,65]),t(Y,[2,67]),t(At,[2,4]),t([22,46,80,91,92,95,96,97,99,100,106,107,108,109,110,111],[2,75]),{22:G,24:H,26:q,38:X,41:[1,239],42:Z,46:J,61:Q,69:K,72:178,74:117,75:et,76:rt,77:nt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:lt,92:ut,95:dt,96:ht,97:ft,99:pt,100:gt,101:yt,102:mt,103:114,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{18:18,19:19,20:s,21:c,22:l,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,240],44:31,45:37,46:h,48:38,75:f,76:p,77:g,78:y,79:m,80:v,91:b,92:x,95:k,96:w,97:_,99:E,100:C,104:39,106:T,107:O,108:S,109:A,110:j,111:D},t(R,[2,52]),t(W,[2,101],{92:$t}),t(Ut,[2,111],{94:242,22:Nt,75:Mt,88:Lt,91:It,95:Pt,96:Ft,97:Rt,98:Yt,99:Vt,100:Wt,101:zt}),t(Gt,[2,113]),t(Gt,[2,115]),t(Gt,[2,116]),t(Gt,[2,117]),t(Gt,[2,118]),t(Gt,[2,119]),t(Gt,[2,120]),t(Gt,[2,121]),t(Gt,[2,122]),t(Gt,[2,123]),t(Gt,[2,124]),t(Gt,[2,125]),t(W,[2,102],{92:$t}),t(W,[2,103],{92:$t}),{22:[1,243]},t(W,[2,104],{92:$t}),{22:[1,244]},t(Bt,[2,110]),t(W,[2,92],{92:$t}),t(W,[2,93],{92:$t}),t(W,[2,94],{103:149,105:184,26:Tt,46:J,80:Ot,91:lt,92:ut,95:dt,96:ht,97:St,99:pt,100:gt,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t}),t(W,[2,95],{103:149,105:184,22:[1,245],26:Tt,46:J,80:Ot,91:lt,92:ut,95:dt,96:ht,97:St,99:pt,100:gt,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t}),t(W,[2,97],{22:[1,246]}),{50:[1,247]},{60:[1,248]},{9:249,20:L,21:I,23:P},t(M,[2,42]),{22:Nt,75:Mt,88:Lt,91:It,93:250,94:214,95:Pt,96:Ft,97:Rt,98:Yt,99:Vt,100:Wt,101:zt},t(Gt,[2,114]),{26:Tt,46:J,80:Ot,86:251,91:lt,92:ut,95:dt,96:ht,97:St,99:pt,100:gt,103:149,105:147,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{26:Tt,46:J,80:Ot,86:252,91:lt,92:ut,95:dt,96:ht,97:St,99:pt,100:gt,103:149,105:147,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t},{73:[1,253]},{73:[1,254],87:[1,255]},t(Y,[2,55]),t(Y,[2,62]),t(Et,o,{17:256}),t(Ut,[2,112],{94:242,22:Nt,75:Mt,88:Lt,91:It,95:Pt,96:Ft,97:Rt,98:Yt,99:Vt,100:Wt,101:zt}),t(W,[2,107],{103:149,105:184,22:[1,257],26:Tt,46:J,80:Ot,91:lt,92:ut,95:dt,96:ht,97:St,99:pt,100:gt,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t}),t(W,[2,108],{103:149,105:184,22:[1,258],26:Tt,46:J,80:Ot,91:lt,92:ut,95:dt,96:ht,97:St,99:pt,100:gt,106:vt,107:bt,108:xt,109:kt,110:wt,111:_t}),t(W,[2,96]),t(W,[2,98],{22:[1,259]}),t(W,[2,99]),{18:18,19:19,20:s,21:c,22:l,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,260],44:31,45:37,46:h,48:38,75:f,76:p,77:g,78:y,79:m,80:v,91:b,92:x,95:k,96:w,97:_,99:E,100:C,104:39,106:T,107:O,108:S,109:A,110:j,111:D},{22:Nt,75:Mt,85:261,88:Lt,91:It,93:213,94:214,95:Pt,96:Ft,97:Rt,98:Yt,99:Vt,100:Wt,101:zt},{22:Nt,75:Mt,85:262,88:Lt,91:It,93:213,94:214,95:Pt,96:Ft,97:Rt,98:Yt,99:Vt,100:Wt,101:zt},{87:[1,263]},t(M,[2,41]),t(W,[2,105],{92:$t}),t(W,[2,106],{92:$t}),t(W,[2,100])],defaultActions:{2:[2,1],9:[2,5],10:[2,2],98:[2,7]},parseError:function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},parse:function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=0,d=2,h=1,f=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=n.pop()||p.lex()||h)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,w,_,E,C,T,O,S,A={};;){if(w=r[r.length-1],this.defaultActions[w]?_=this.defaultActions[w]:(null==x&&(x=b()),_=o[w]&&o[w][x]),void 0===_||!_.length||!_[0]){var j="";for(C in S=[],o[w])this.terminals_[C]&&C>d&&S.push("'"+this.terminals_[C]+"'");j=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(j,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(_[0]){case 1:r.push(x),i.push(p.yytext),a.push(p.yylloc),r.push(_[1]),x=null,k?(x=k,k=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(T=this.productions_[_[1]][1],A.$=i[i.length-T],A._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},v&&(A._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(A,[s,l,c,g.yy,_[1],i,a].concat(f))))return E;T&&(r=r.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),r.push(this.productions_[_[1]][0]),i.push(A.$),a.push(A._$),O=o[r[r.length-2]][r[r.length-1]],r.push(O);break;case 3:return!0}}return!0}},qt={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||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];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(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 e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),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(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,r,n){switch(r){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:case 6:break;case 7:this.begin("string");break;case 8:this.popState();break;case 9:return"STR";case 10:return 75;case 11:return 84;case 12:return 76;case 13:return 90;case 14:return 77;case 15:return 78;case 16:return 79;case 17:case 18:return t.lex.firstGraph()&&this.begin("dir"),24;case 19:return 38;case 20:return 42;case 21:case 22:case 23:case 24:return 87;case 25:return this.popState(),25;case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:return this.popState(),26;case 36:return 91;case 37:return 99;case 38:return 47;case 39:return 96;case 40:return 46;case 41:return 20;case 42:return 92;case 43:return 110;case 44:case 45:case 46:return 70;case 47:case 48:case 49:return 69;case 50:return 51;case 51:return 52;case 52:return 53;case 53:return 54;case 54:return 55;case 55:return 56;case 56:return 57;case 57:return 58;case 58:return 97;case 59:return 100;case 60:return 111;case 61:return 108;case 62:return 101;case 63:case 64:return 109;case 65:return 102;case 66:return 61;case 67:return 81;case 68:return"SEP";case 69:return 80;case 70:return 95;case 71:return 63;case 72:return 62;case 73:return 65;case 74:return 64;case 75:return 106;case 76:return 107;case 77:return 71;case 78:return 49;case 79:return 50;case 80:return 40;case 81:return 41;case 82:return 59;case 83:return 60;case 84:return 117;case 85:return 21;case 86:return 22;case 87:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\()/,/^(?:\)\])/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\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])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[25,26,27,28,29,30,31,32,33,34,35],inclusive:!1},string:{rules:[8,9],inclusive:!1},INITIAL:{rules:[0,5,6,7,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,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,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87],inclusive:!0}}};function Xt(){this.yy={}}return Ht.lexer=qt,Xt.prototype=Ht,Ht.Parser=Xt,new Xt}();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"),t.exit(1));var i=r("./node_modules/node-libs-browser/mock/empty.js").readFileSync(r("./node_modules/path-browserify/index.js").normalize(n[1]),"utf8");return e.parser.parse(i)},r.c[r.s]===n&&e.main(t.argv.slice(1))}).call(this,r("./node_modules/process/browser.js"),r("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/flowchart/styles.js":function(t,e,r){"use strict";r.r(e),e.default=function(t){return".label {\n    font-family: ".concat(t.fontFamily,";\n    color: ").concat(t.nodeTextColor||t.textColor,";\n  }\n\n  .label text {\n    fill: ").concat(t.nodeTextColor||t.textColor,";\n  }\n\n  .node rect,\n  .node circle,\n  .node ellipse,\n  .node polygon,\n  .node path {\n    fill: ").concat(t.mainBkg,";\n    stroke: ").concat(t.nodeBorder,";\n    stroke-width: 1px;\n  }\n\n  .node .label {\n    text-align: center;\n  }\n  .node.clickable {\n    cursor: pointer;\n  }\n\n  .arrowheadPath {\n    fill: ").concat(t.arrowheadColor,";\n  }\n\n  .edgePath .path {\n    stroke: ").concat(t.lineColor,";\n    stroke-width: 1.5px;\n  }\n\n  .flowchart-link {\n    stroke: ").concat(t.lineColor,";\n    fill: none;\n  }\n\n  .edgeLabel {\n    background-color: ").concat(t.edgeLabelBackground,";\n    rect {\n      opacity: 0.5;\n      background-color: ").concat(t.edgeLabelBackground,";\n      fill: ").concat(t.edgeLabelBackground,";\n    }\n    text-align: center;\n  }\n\n  .cluster rect {\n    fill: ").concat(t.clusterBkg,";\n    stroke: ").concat(t.clusterBorder,";\n    stroke-width: 1px;\n  }\n\n  .cluster text {\n    fill: ").concat(t.titleColor,";\n  }\n\n  div.mermaidTooltip {\n    position: absolute;\n    text-align: center;\n    max-width: 200px;\n    padding: 2px;\n    font-family: ").concat(t.fontFamily,";\n    font-size: 12px;\n    background: ").concat(t.tertiaryColor,";\n    border: 1px solid ").concat(t.border2,";\n    border-radius: 2px;\n    pointer-events: none;\n    z-index: 100;\n  }\n")}},"./src/diagrams/gantt/ganttDb.js":function(t,e,r){"use strict";r.r(e),r.d(e,"parseDirective",(function(){return C})),r.d(e,"clear",(function(){return T})),r.d(e,"setAxisFormat",(function(){return O})),r.d(e,"getAxisFormat",(function(){return S})),r.d(e,"setTodayMarker",(function(){return A})),r.d(e,"getTodayMarker",(function(){return j})),r.d(e,"setDateFormat",(function(){return D})),r.d(e,"enableInclusiveEndDates",(function(){return B})),r.d(e,"endDatesAreInclusive",(function(){return N})),r.d(e,"getDateFormat",(function(){return M})),r.d(e,"setExcludes",(function(){return L})),r.d(e,"getExcludes",(function(){return I})),r.d(e,"setTitle",(function(){return P})),r.d(e,"getTitle",(function(){return F})),r.d(e,"addSection",(function(){return R})),r.d(e,"getSections",(function(){return Y})),r.d(e,"getTasks",(function(){return V})),r.d(e,"addTask",(function(){return Q})),r.d(e,"findTaskById",(function(){return K})),r.d(e,"addTaskOrg",(function(){return tt})),r.d(e,"setLink",(function(){return rt})),r.d(e,"setClass",(function(){return nt})),r.d(e,"setClickEvent",(function(){return at})),r.d(e,"bindFunctions",(function(){return ot}));var n=r("moment-mini"),i=r.n(n),a=r("@braintree/sanitize-url"),o=r("./src/logger.js"),s=r("./src/config.js"),c=r("./src/utils.js"),l=r("./src/mermaidAPI.js");function u(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var d,h,f="",p="",g="",y=[],m="",v=[],b=[],x="",k=["active","done","crit","milestone"],w=[],_=!1,E=0,C=function(t,e,r){l.default.parseDirective(this,t,e,r)},T=function(){v=[],b=[],x="",w=[],m="",q=0,d=void 0,h=void 0,Z=[],f="",p="",g="",y=[],_=!1,E=0},O=function(t){p=t},S=function(){return p},A=function(t){g=t},j=function(){return g},D=function(t){f=t},B=function(){_=!0},N=function(){return _},M=function(){return f},L=function(t){y=t.toLowerCase().split(/[\s,]+/)},I=function(){return y},P=function(t){m=t},F=function(){return m},R=function(t){x=t,v.push(t)},Y=function(){return v},V=function(){for(var t=et(),e=0;!t&&e<10;)t=et(),e++;return b=Z},W=function(t,e,r){return t.isoWeekday()>=6&&r.indexOf("weekends")>=0||r.indexOf(t.format("dddd").toLowerCase())>=0||r.indexOf(t.format(e.trim()))>=0},z=function(t,e,r){if(r.length&&!t.manualEndTime){var n=i()(t.startTime,e,!0);n.add(1,"d");var a=i()(t.endTime,e,!0),o=$(n,a,e,r);t.endTime=a.toDate(),t.renderEndTime=o}},$=function(t,e,r,n){for(var i=!1,a=null;t<=e;)i||(a=e.toDate()),(i=W(t,r,n))&&e.add(1,"d"),t.add(1,"d");return a},U=function(t,e,r){r=r.trim();var n=/^after\s+([\d\w- ]+)/.exec(r.trim());if(null!==n){var a=null;if(n[1].split(" ").forEach((function(t){var e=K(t);void 0!==e&&(a?e.endTime>a.endTime&&(a=e):a=e)})),a)return a.endTime;var s=new Date;return s.setHours(0,0,0,0),s}var c=i()(r,e.trim(),!0);return c.isValid()?c.toDate():(o.logger.debug("Invalid date:"+r),o.logger.debug("With date format:"+e.trim()),new Date)},G=function(t,e){if(null!==t)switch(t[2]){case"s":e.add(t[1],"seconds");break;case"m":e.add(t[1],"minutes");break;case"h":e.add(t[1],"hours");break;case"d":e.add(t[1],"days");break;case"w":e.add(t[1],"weeks")}return e.toDate()},H=function(t,e,r,n){n=n||!1,r=r.trim();var a=i()(r,e.trim(),!0);return a.isValid()?(n&&a.add(1,"d"),a.toDate()):G(/^([\d]+)([wdhms])/.exec(r.trim()),i()(t))},q=0,X=function(t){return void 0===t?"task"+(q+=1):t},Z=[],J={},Q=function(t,e){var r={section:x,type:x,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},n=function(t,e){var r=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),n={};st(r,n,k);for(var i=0;i<r.length;i++)r[i]=r[i].trim();switch(r.length){case 1:n.id=X(),n.startTime={type:"prevTaskEnd",id:t},n.endTime={data:r[0]};break;case 2:n.id=X(),n.startTime={type:"getStartDate",startData:r[0]},n.endTime={data:r[1]};break;case 3:n.id=X(r[0]),n.startTime={type:"getStartDate",startData:r[1]},n.endTime={data:r[2]}}return n}(h,e);r.raw.startTime=n.startTime,r.raw.endTime=n.endTime,r.id=n.id,r.prevTaskId=h,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,r.order=E,E++;var i=Z.push(r);h=r.id,J[r.id]=i-1},K=function(t){var e=J[t];return Z[e]},tt=function(t,e){var r={section:x,type:x,description:t,task:t,classes:[]},n=function(t,e){var r=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),n={};st(r,n,k);for(var a=0;a<r.length;a++)r[a]=r[a].trim();var o="";switch(r.length){case 1:n.id=X(),n.startTime=t.endTime,o=r[0];break;case 2:n.id=X(),n.startTime=U(0,f,r[0]),o=r[1];break;case 3:n.id=X(r[0]),n.startTime=U(0,f,r[1]),o=r[2]}return o&&(n.endTime=H(n.startTime,f,o,_),n.manualEndTime=i()(o,"YYYY-MM-DD",!0).isValid(),z(n,f,y)),n}(d,e);r.startTime=n.startTime,r.endTime=n.endTime,r.id=n.id,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,d=r,b.push(r)},et=function(){for(var t=function(t){var e=Z[t],r="";switch(Z[t].raw.startTime.type){case"prevTaskEnd":var n=K(e.prevTaskId);e.startTime=n.endTime;break;case"getStartDate":(r=U(0,f,Z[t].raw.startTime.startData))&&(Z[t].startTime=r)}return Z[t].startTime&&(Z[t].endTime=H(Z[t].startTime,f,Z[t].raw.endTime.data,_),Z[t].endTime&&(Z[t].processed=!0,Z[t].manualEndTime=i()(Z[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),z(Z[t],f,y))),Z[t].processed},e=!0,r=0;r<Z.length;r++)t(r),e=e&&Z[r].processed;return e},rt=function(t,e){var r=e;"loose"!==s.getConfig().securityLevel&&(r=Object(a.sanitizeUrl)(e)),t.split(",").forEach((function(t){void 0!==K(t)&&it(t,(function(){window.open(r,"_self")}))})),nt(t,"clickable")},nt=function(t,e){t.split(",").forEach((function(t){var r=K(t);void 0!==r&&r.classes.push(e)}))},it=function(t,e){w.push((function(){var r=document.querySelector('[id="'.concat(t,'"]'));null!==r&&r.addEventListener("click",(function(){e()}))})),w.push((function(){var r=document.querySelector('[id="'.concat(t,'-text"]'));null!==r&&r.addEventListener("click",(function(){e()}))}))},at=function(t,e,r){t.split(",").forEach((function(t){!function(t,e,r){if("loose"===s.getConfig().securityLevel&&void 0!==e){var n=[];if("string"==typeof r){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var i=0;i<n.length;i++){var a=n[i].trim();'"'===a.charAt(0)&&'"'===a.charAt(a.length-1)&&(a=a.substr(1,a.length-2)),n[i]=a}}0===n.length&&n.push(t),void 0!==K(t)&&it(t,(function(){c.default.runFunc.apply(c.default,[e].concat(u(n)))}))}}(t,e,r)})),nt(t,"clickable")},ot=function(t){w.forEach((function(e){e(t)}))};function st(t,e,r){for(var n=!0;n;)n=!1,r.forEach((function(r){var i=new RegExp("^\\s*"+r+"\\s*$");t[0].match(i)&&(e[r]=!0,t.shift(1),n=!0)}))}e.default={parseDirective:C,getConfig:function(){return s.getConfig().gantt},clear:T,setDateFormat:D,getDateFormat:M,enableInclusiveEndDates:B,endDatesAreInclusive:N,setAxisFormat:O,getAxisFormat:S,setTodayMarker:A,getTodayMarker:j,setTitle:P,getTitle:F,addSection:R,getSections:Y,getTasks:V,addTask:Q,findTaskById:K,addTaskOrg:tt,setExcludes:L,getExcludes:I,setClickEvent:at,setLink:rt,bindFunctions:ot,durationToDate:G}},"./src/diagrams/gantt/ganttRenderer.js":function(t,e,r){"use strict";r.r(e),r.d(e,"setConf",(function(){return l})),r.d(e,"draw",(function(){return u}));var n=r("d3"),i=r("./src/diagrams/gantt/parser/gantt.jison"),a=r("./src/diagrams/common/common.js"),o=r("./src/diagrams/gantt/ganttDb.js");i.parser.yy=o.default;var s,c={titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"'},l=function(t){Object.keys(t).forEach((function(e){c[e]=t[e]}))},u=function(t,e){i.parser.yy.clear(),i.parser.parse(t);var r=document.getElementById(e);void 0===(s=r.parentElement.offsetWidth)&&(s=1200),void 0!==c.useWidth&&(s=c.useWidth);var l=i.parser.yy.getTasks(),u=l.length*(c.barHeight+c.barGap)+2*c.topPadding;r.setAttribute("height","100%"),r.setAttribute("viewBox","0 0 "+s+" "+u);for(var d=Object(n.select)('[id="'.concat(e,'"]')),h=Object(n.scaleTime)().domain([Object(n.min)(l,(function(t){return t.startTime})),Object(n.max)(l,(function(t){return t.endTime}))]).rangeRound([0,s-c.leftPadding-c.rightPadding]),f=[],p=0;p<l.length;p++)f.push(l[p].type);var g,y,m,v,b,x,k,w=f;function _(t){for(var e=t.length,r={};e;)r[t[--e]]=(r[t[e]]||0)+1;return r}f=function(t){for(var e={},r=[],n=0,i=t.length;n<i;++n)e.hasOwnProperty(t[n])||(e[t[n]]=!0,r.push(t[n]));return r}(f),l.sort((function(t,e){var r=t.startTime,n=e.startTime,i=0;return r>n?i=1:r<n&&(i=-1),i})),g=l,y=s,m=u,v=c.barHeight,b=v+c.barGap,x=c.topPadding,k=c.leftPadding,Object(n.scaleLinear)().domain([0,f.length]).range(["#00B9FA","#F95002"]).interpolate(n.interpolateHcl),function(t,e,r,a){var o=Object(n.axisBottom)(h).tickSize(-a+e+c.gridLineStartPadding).tickFormat(Object(n.timeFormat)(i.parser.yy.getAxisFormat()||c.axisFormat||"%Y-%m-%d"));d.append("g").attr("class","grid").attr("transform","translate("+t+", "+(a-50)+")").call(o).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em")}(k,x,0,m),function(t,e,r,n,i,a,o){d.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",(function(t,n){return t.order*e+r-2})).attr("width",(function(){return o-c.rightPadding/2})).attr("height",e).attr("class",(function(t){for(var e=0;e<f.length;e++)if(t.type===f[e])return"section section"+e%c.numberSectionStyles;return"section section0"}));var s=d.append("g").selectAll("rect").data(t).enter();s.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?h(t.startTime)+n+.5*(h(t.endTime)-h(t.startTime))-.5*i:h(t.startTime)+n})).attr("y",(function(t,n){return t.order*e+r})).attr("width",(function(t){return t.milestone?i:h(t.renderEndTime||t.endTime)-h(t.startTime)})).attr("height",i).attr("transform-origin",(function(t,a){return(h(t.startTime)+n+.5*(h(t.endTime)-h(t.startTime))).toString()+"px "+(a*e+r+.5*i).toString()+"px"})).attr("class",(function(t){var e="";t.classes.length>0&&(e=t.classes.join(" "));for(var r=0,n=0;n<f.length;n++)t.type===f[n]&&(r=n%c.numberSectionStyles);var i="";return t.active?t.crit?i+=" activeCrit":i=" active":t.done?i=t.crit?" doneCrit":" done":t.crit&&(i+=" crit"),0===i.length&&(i=" task"),t.milestone&&(i=" milestone "+i),i+=r,"task"+(i+=" "+e)})),s.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",c.fontSize).attr("x",(function(t){var e=h(t.startTime),r=h(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(h(t.endTime)-h(t.startTime))-.5*i),t.milestone&&(r=e+i);var a=this.getBBox().width;return a>r-e?r+a+1.5*c.leftPadding>o?e+n-5:r+n+5:(r-e)/2+e+n})).attr("y",(function(t,n){return t.order*e+c.barHeight/2+(c.fontSize/2-2)+r})).attr("text-height",i).attr("class",(function(t){var e=h(t.startTime),r=h(t.endTime);t.milestone&&(r=e+i);var n=this.getBBox().width,a="";t.classes.length>0&&(a=t.classes.join(" "));var s=0;console.log(c);for(var l=0;l<f.length;l++)t.type===f[l]&&(s=l%c.numberSectionStyles);var u="";return t.active&&(u=t.crit?"activeCritText"+s:"activeText"+s),t.done?u=t.crit?u+" doneCritText"+s:u+" doneText"+s:t.crit&&(u=u+" critText"+s),t.milestone&&(u+=" milestoneText"),n>r-e?r+n+1.5*c.leftPadding>o?a+" taskTextOutsideLeft taskTextOutside"+s+" "+u:a+" taskTextOutsideRight taskTextOutside"+s+" "+u+" width-"+n:a+" taskText taskText"+s+" "+u+" width-"+n}))}(g,b,x,k,v,0,y),function(t,e){for(var r=[],n=0,i=0;i<f.length;i++)r[i]=[f[i],(o=f[i],s=w,_(s)[o]||0)];var o,s;d.append("g").selectAll("text").data(r).enter().append((function(t){var e=t[0].split(a.default.lineBreakRegex),r=-(e.length-1)/2,n=document.createElementNS("http://www.w3.org/2000/svg","text");n.setAttribute("dy",r+"em");for(var i=0;i<e.length;i++){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttribute("alignment-baseline","central"),o.setAttribute("x","10"),i>0&&o.setAttribute("dy","1em"),o.textContent=e[i],n.appendChild(o)}return n})).attr("x",10).attr("y",(function(i,a){if(!(a>0))return i[1]*t/2+e;for(var o=0;o<a;o++)return n+=r[a-1][1],i[1]*t/2+n*t+e})).attr("class",(function(t){for(var e=0;e<f.length;e++)if(t[0]===f[e])return"sectionTitle sectionTitle"+e%c.numberSectionStyles;return"sectionTitle"}))}(b,x),function(t,e,r,n){var i=o.default.getTodayMarker();if("off"!==i){var a=d.append("g").attr("class","today"),s=new Date,l=a.append("line");l.attr("x1",h(s)+t).attr("x2",h(s)+t).attr("y1",c.titleTopMargin).attr("y2",n-c.titleTopMargin).attr("class","today"),""!==i&&l.attr("style",i.replace(/,/g,";"))}}(k,0,0,m),void 0!==c.useWidth&&r.setAttribute("width",s),d.append("text").text(i.parser.yy.getTitle()).attr("x",s/2).attr("y",c.titleTopMargin).attr("class","titleText")};e.default={setConf:l,draw:u}},"./src/diagrams/gantt/parser/gantt.jison":function(t,e,r){(function(t,n){var i=function(){var t=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},e=[1,3],r=[1,5],n=[7,9,11,12,13,14,15,16,17,18,20,27,32],i=[1,15],a=[1,16],o=[1,17],s=[1,18],c=[1,19],l=[1,20],u=[1,21],d=[1,23],h=[1,25],f=[1,28],p=[5,7,9,11,12,13,14,15,16,17,18,20,27,32],g={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,axisFormat:14,excludes:15,todayMarker:16,title:17,section:18,clickStatement:19,taskTxt:20,taskData:21,openDirective:22,typeDirective:23,closeDirective:24,":":25,argDirective:26,click:27,callbackname:28,callbackargs:29,href:30,clickStatementDebug:31,open_directive:32,type_directive:33,arg_directive:34,close_directive:35,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"axisFormat",15:"excludes",16:"todayMarker",17:"title",18:"section",20:"taskTxt",21:"taskData",25:":",27:"click",28:"callbackname",29:"callbackargs",30:"href",32:"open_directive",33:"type_directive",34:"arg_directive",35:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[19,2],[19,3],[19,3],[19,4],[19,3],[19,4],[19,2],[31,2],[31,3],[31,3],[31,4],[31,3],[31,4],[31,2],[22,1],[23,1],[26,1],[24,1]],performAction:function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 2:return a[s-1];case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 9:n.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 10:n.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 11:n.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 12:n.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 13:n.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 14:n.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 15:n.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 17:n.addTask(a[s-1],a[s]),this.$="task";break;case 21:this.$=a[s-1],n.setClickEvent(a[s-1],a[s],null);break;case 22:this.$=a[s-2],n.setClickEvent(a[s-2],a[s-1],a[s]);break;case 23:this.$=a[s-2],n.setClickEvent(a[s-2],a[s-1],null),n.setLink(a[s-2],a[s]);break;case 24:this.$=a[s-3],n.setClickEvent(a[s-3],a[s-2],a[s-1]),n.setLink(a[s-3],a[s]);break;case 25:this.$=a[s-2],n.setClickEvent(a[s-2],a[s],null),n.setLink(a[s-2],a[s-1]);break;case 26:this.$=a[s-3],n.setClickEvent(a[s-3],a[s-1],a[s]),n.setLink(a[s-3],a[s-2]);break;case 27:this.$=a[s-1],n.setLink(a[s-1],a[s]);break;case 28:case 34:this.$=a[s-1]+" "+a[s];break;case 29:case 30:case 32:this.$=a[s-2]+" "+a[s-1]+" "+a[s];break;case 31:case 33:this.$=a[s-3]+" "+a[s-2]+" "+a[s-1]+" "+a[s];break;case 35:n.parseDirective("%%{","open_directive");break;case 36:n.parseDirective(a[s],"type_directive");break;case 37:a[s]=a[s].trim().replace(/'/g,'"'),n.parseDirective(a[s],"arg_directive");break;case 38:n.parseDirective("}%%","close_directive","gantt")}},table:[{3:1,4:2,5:e,22:4,32:r},{1:[3]},{3:6,4:2,5:e,22:4,32:r},t(n,[2,3],{6:7}),{23:8,33:[1,9]},{33:[2,35]},{1:[2,1]},{4:24,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:i,13:a,14:o,15:s,16:c,17:l,18:u,19:22,20:d,22:4,27:h,32:r},{24:26,25:[1,27],35:f},t([25,35],[2,36]),t(n,[2,8],{1:[2,2]}),t(n,[2,4]),{4:24,10:29,12:i,13:a,14:o,15:s,16:c,17:l,18:u,19:22,20:d,22:4,27:h,32:r},t(n,[2,6]),t(n,[2,7]),t(n,[2,9]),t(n,[2,10]),t(n,[2,11]),t(n,[2,12]),t(n,[2,13]),t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),{21:[1,30]},t(n,[2,18]),{28:[1,31],30:[1,32]},{11:[1,33]},{26:34,34:[1,35]},{11:[2,38]},t(n,[2,5]),t(n,[2,17]),t(n,[2,21],{29:[1,36],30:[1,37]}),t(n,[2,27],{28:[1,38]}),t(p,[2,19]),{24:39,35:f},{35:[2,37]},t(n,[2,22],{30:[1,40]}),t(n,[2,23]),t(n,[2,25],{29:[1,41]}),{11:[1,42]},t(n,[2,24]),t(n,[2,26]),t(p,[2,20])],defaultActions:{5:[2,35],6:[2,1],28:[2,38],35:[2,37]},parseError:function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},parse:function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=0,d=2,h=1,f=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=n.pop()||p.lex()||h)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,w,_,E,C,T,O,S,A={};;){if(w=r[r.length-1],this.defaultActions[w]?_=this.defaultActions[w]:(null==x&&(x=b()),_=o[w]&&o[w][x]),void 0===_||!_.length||!_[0]){var j="";for(C in S=[],o[w])this.terminals_[C]&&C>d&&S.push("'"+this.terminals_[C]+"'");j=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(j,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(_[0]){case 1:r.push(x),i.push(p.yytext),a.push(p.yylloc),r.push(_[1]),x=null,k?(x=k,k=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(T=this.productions_[_[1]][1],A.$=i[i.length-T],A._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},v&&(A._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(A,[s,l,c,g.yy,_[1],i,a].concat(f))))return E;T&&(r=r.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),r.push(this.productions_[_[1]][0]),i.push(A.$),a.push(A._$),O=o[r[r.length-2]][r[r.length-1]],r.push(O);break;case 3:return!0}}return!0}},y={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||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];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(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 e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),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(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,r,n){switch(r){case 0:return this.begin("open_directive"),32;case 1:return this.begin("type_directive"),33;case 2:return this.popState(),this.begin("arg_directive"),25;case 3:return this.popState(),this.popState(),35;case 4:return 34;case 5:case 6:case 7:break;case 8:return 11;case 9:case 10:case 11:break;case 12:this.begin("href");break;case 13:this.popState();break;case 14:return 30;case 15:this.begin("callbackname");break;case 16:this.popState();break;case 17:this.popState(),this.begin("callbackargs");break;case 18:return 28;case 19:this.popState();break;case 20:return 29;case 21:this.begin("click");break;case 22:this.popState();break;case 23:return 27;case 24:return 5;case 25:return 12;case 26:return 13;case 27:return 14;case 28:return 15;case 29:return 16;case 30:return"date";case 31:return 17;case 32:return 18;case 33:return 20;case 34:return 21;case 35:return 25;case 36:return 7;case 37:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\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:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[19,20],inclusive:!1},callbackname:{rules:[16,17,18],inclusive:!1},href:{rules:[13,14],inclusive:!1},click:{rules:[22,23],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,15,21,24,25,26,27,28,29,30,31,32,33,34,35,36,37],inclusive:!0}}};function m(){this.yy={}}return g.lexer=y,m.prototype=g,g.Parser=m,new m}();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"),t.exit(1));var i=r("./node_modules/node-libs-browser/mock/empty.js").readFileSync(r("./node_modules/path-browserify/index.js").normalize(n[1]),"utf8");return e.parser.parse(i)},r.c[r.s]===n&&e.main(t.argv.slice(1))}).call(this,r("./node_modules/process/browser.js"),r("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/gantt/styles.js":function(t,e,r){"use strict";r.r(e),e.default=function(t){return'\n  .mermaid-main-font {\n    font-family: "trebuchet ms", verdana, arial;\n    font-family: var(--mermaid-font-family);\n  }\n\n  .section {\n    stroke: none;\n    opacity: 0.2;\n  }\n\n  .section0 {\n    fill: '.concat(t.sectionBkgColor,";\n  }\n\n  .section2 {\n    fill: ").concat(t.sectionBkgColor2,";\n  }\n\n  .section1,\n  .section3 {\n    fill: ").concat(t.altSectionBkgColor,";\n    opacity: 0.2;\n  }\n\n  .sectionTitle0 {\n    fill: ").concat(t.titleColor,";\n  }\n\n  .sectionTitle1 {\n    fill: ").concat(t.titleColor,";\n  }\n\n  .sectionTitle2 {\n    fill: ").concat(t.titleColor,";\n  }\n\n  .sectionTitle3 {\n    fill: ").concat(t.titleColor,";\n  }\n\n  .sectionTitle {\n    text-anchor: start;\n    font-size: 11px;\n    text-height: 14px;\n    font-family: 'trebuchet ms', verdana, arial;\n    font-family: var(--mermaid-font-family);\n\n  }\n\n\n  /* Grid and axis */\n\n  .grid .tick {\n    stroke: ").concat(t.gridColor,";\n    opacity: 0.8;\n    shape-rendering: crispEdges;\n    text {\n      font-family: ").concat(t.fontFamily,";\n      fill: ").concat(t.textColor,";\n    }\n  }\n\n  .grid path {\n    stroke-width: 0;\n  }\n\n\n  /* Today line */\n\n  .today {\n    fill: none;\n    stroke: ").concat(t.todayLineColor,";\n    stroke-width: 2px;\n  }\n\n\n  /* Task styling */\n\n  /* Default task */\n\n  .task {\n    stroke-width: 2;\n  }\n\n  .taskText {\n    text-anchor: middle;\n    font-family: 'trebuchet ms', verdana, arial;\n    font-family: var(--mermaid-font-family);\n  }\n\n  .taskText:not([font-size]) {\n    font-size: 11px;\n  }\n\n  .taskTextOutsideRight {\n    fill: ").concat(t.taskTextDarkColor,";\n    text-anchor: start;\n    font-size: 11px;\n    font-family: 'trebuchet ms', verdana, arial;\n    font-family: var(--mermaid-font-family);\n\n  }\n\n  .taskTextOutsideLeft {\n    fill: ").concat(t.taskTextDarkColor,";\n    text-anchor: end;\n    font-size: 11px;\n  }\n\n  /* Special case clickable */\n  .task.clickable {\n    cursor: pointer;\n  }\n  .taskText.clickable {\n    cursor: pointer;\n    fill: ").concat(t.taskTextClickableColor," !important;\n    font-weight: bold;\n  }\n\n  .taskTextOutsideLeft.clickable {\n    cursor: pointer;\n    fill: ").concat(t.taskTextClickableColor," !important;\n    font-weight: bold;\n  }\n\n  .taskTextOutsideRight.clickable {\n    cursor: pointer;\n    fill: ").concat(t.taskTextClickableColor," !important;\n    font-weight: bold;\n  }\n\n  /* Specific task settings for the sections*/\n\n  .taskText0,\n  .taskText1,\n  .taskText2,\n  .taskText3 {\n    fill: ").concat(t.taskTextColor,";\n  }\n\n  .task0,\n  .task1,\n  .task2,\n  .task3 {\n    fill: ").concat(t.taskBkgColor,";\n    stroke: ").concat(t.taskBorderColor,";\n  }\n\n  .taskTextOutside0,\n  .taskTextOutside2\n  {\n    fill: ").concat(t.taskTextOutsideColor,";\n  }\n\n  .taskTextOutside1,\n  .taskTextOutside3 {\n    fill: ").concat(t.taskTextOutsideColor,";\n  }\n\n\n  /* Active task */\n\n  .active0,\n  .active1,\n  .active2,\n  .active3 {\n    fill: ").concat(t.activeTaskBkgColor,";\n    stroke: ").concat(t.activeTaskBorderColor,";\n  }\n\n  .activeText0,\n  .activeText1,\n  .activeText2,\n  .activeText3 {\n    fill: ").concat(t.taskTextDarkColor," !important;\n  }\n\n\n  /* Completed task */\n\n  .done0,\n  .done1,\n  .done2,\n  .done3 {\n    stroke: ").concat(t.doneTaskBorderColor,";\n    fill: ").concat(t.doneTaskBkgColor,";\n    stroke-width: 2;\n  }\n\n  .doneText0,\n  .doneText1,\n  .doneText2,\n  .doneText3 {\n    fill: ").concat(t.taskTextDarkColor," !important;\n  }\n\n\n  /* Tasks on the critical line */\n\n  .crit0,\n  .crit1,\n  .crit2,\n  .crit3 {\n    stroke: ").concat(t.critBorderColor,";\n    fill: ").concat(t.critBkgColor,";\n    stroke-width: 2;\n  }\n\n  .activeCrit0,\n  .activeCrit1,\n  .activeCrit2,\n  .activeCrit3 {\n    stroke: ").concat(t.critBorderColor,";\n    fill: ").concat(t.activeTaskBkgColor,";\n    stroke-width: 2;\n  }\n\n  .doneCrit0,\n  .doneCrit1,\n  .doneCrit2,\n  .doneCrit3 {\n    stroke: ").concat(t.critBorderColor,";\n    fill: ").concat(t.doneTaskBkgColor,";\n    stroke-width: 2;\n    cursor: pointer;\n    shape-rendering: crispEdges;\n  }\n\n  .milestone {\n    transform: rotate(45deg) scale(0.8,0.8);\n  }\n\n  .milestoneText {\n    font-style: italic;\n  }\n  .doneCritText0,\n  .doneCritText1,\n  .doneCritText2,\n  .doneCritText3 {\n    fill: ").concat(t.taskTextDarkColor," !important;\n  }\n\n  .activeCritText0,\n  .activeCritText1,\n  .activeCritText2,\n  .activeCritText3 {\n    fill: ").concat(t.taskTextDarkColor," !important;\n  }\n\n  .titleText {\n    text-anchor: middle;\n    font-size: 18px;\n    fill: ").concat(t.textColor,"    ;\n    font-family: 'trebuchet ms', verdana, arial;\n    font-family: var(--mermaid-font-family);\n  }\n")}},"./src/diagrams/git/gitGraphAst.js":function(t,e,r){"use strict";r.r(e),r.d(e,"setDirection",(function(){return f})),r.d(e,"setOptions",(function(){return g})),r.d(e,"getOptions",(function(){return y})),r.d(e,"commit",(function(){return m})),r.d(e,"branch",(function(){return v})),r.d(e,"merge",(function(){return b})),r.d(e,"checkout",(function(){return x})),r.d(e,"reset",(function(){return k})),r.d(e,"prettyPrint",(function(){return E})),r.d(e,"clear",(function(){return C})),r.d(e,"getBranchesAsObjArray",(function(){return T})),r.d(e,"getBranches",(function(){return O})),r.d(e,"getCommits",(function(){return S})),r.d(e,"getCommitsArray",(function(){return A})),r.d(e,"getCurrentBranch",(function(){return j})),r.d(e,"getDirection",(function(){return D})),r.d(e,"getHead",(function(){return B}));var n=r("./src/logger.js"),i=r("./src/utils.js"),a={},o=null,s={master:o},c="master",l="LR",u=0;function d(){return Object(i.random)({length:7})}function h(t,e){for(n.logger.debug("Entering isfastforwardable:",t.id,e.id);t.seq<=e.seq&&t!==e&&null!=e.parent;){if(Array.isArray(e.parent))return n.logger.debug("In merge commit:",e.parent),h(t,a[e.parent[0]])||h(t,a[e.parent[1]]);e=a[e.parent]}return n.logger.debug(t.id,e.id),t.id===e.id}var f=function(t){l=t},p={},g=function(t){n.logger.debug("options str",t),t=(t=t&&t.trim())||"{}";try{p=JSON.parse(t)}catch(t){n.logger.error("error while parsing gitGraph options",t.message)}},y=function(){return p},m=function(t){var e={id:d(),message:t,seq:u++,parent:null==o?null:o.id};o=e,a[e.id]=e,s[c]=e.id,n.logger.debug("in pushCommit "+e.id)},v=function(t){s[t]=null!=o?o.id:null,n.logger.debug("in createBranch")},b=function(t){var e=a[s[c]],r=a[s[t]];if(function(t,e){return t.seq>e.seq&&h(e,t)}(e,r))n.logger.debug("Already merged");else{if(h(e,r))s[c]=s[t],o=a[s[c]];else{var i={id:d(),message:"merged branch "+t+" into "+c,seq:u++,parent:[null==o?null:o.id,s[t]]};o=i,a[i.id]=i,s[c]=i.id}n.logger.debug(s),n.logger.debug("in mergeBranch")}},x=function(t){n.logger.debug("in checkout");var e=s[c=t];o=a[e]},k=function(t){n.logger.debug("in reset",t);var e=t.split(":")[0],r=parseInt(t.split(":")[1]),i="HEAD"===e?o:a[s[e]];for(n.logger.debug(i,r);r>0;)if(r--,!(i=a[i.parent])){var l="Critical error - unique parent commit not found during reset";throw n.logger.error(l),l}o=i,s[c]=i.id};function w(t,e,r){var n=t.indexOf(e);-1===n?t.push(r):t.splice(n,1,r)}function _(t){var e=t.reduce((function(t,e){return t.seq>e.seq?t:e}),t[0]),r="";t.forEach((function(t){r+=t===e?"\t*":"\t|"}));var i,o,c,l=[r,e.id,e.seq];for(var u in s)s[u]===e.id&&l.push(u);if(n.logger.debug(l.join(" ")),Array.isArray(e.parent)){var d=a[e.parent[0]];w(t,e,d),t.push(a[e.parent[1]])}else{if(null==e.parent)return;var h=a[e.parent];w(t,e,h)}i=t,o=function(t){return t.id},c=Object.create(null),_(t=i.reduce((function(t,e){var r=o(e);return c[r]||(c[r]=!0,t.push(e)),t}),[]))}var E=function(){n.logger.debug(a),_([A()[0]])},C=function(){a={},s={master:o=null},c="master",u=0},T=function(){var t=[];for(var e in s)t.push({name:e,commit:a[s[e]]});return t},O=function(){return s},S=function(){return a},A=function(){var t=Object.keys(a).map((function(t){return a[t]}));return t.forEach((function(t){n.logger.debug(t.id)})),t.sort((function(t,e){return e.seq-t.seq})),t},j=function(){return c},D=function(){return l},B=function(){return o};e.default={setDirection:f,setOptions:g,getOptions:y,commit:m,branch:v,merge:b,checkout:x,reset:k,prettyPrint:E,clear:C,getBranchesAsObjArray:T,getBranches:O,getCommits:S,getCommitsArray:A,getCurrentBranch:j,getDirection:D,getHead:B}},"./src/diagrams/git/gitGraphRenderer.js":function(t,e,r){"use strict";r.r(e),r.d(e,"setConf",(function(){return f})),r.d(e,"draw",(function(){return x}));var n,i=r("d3"),a=r("./src/diagrams/git/gitGraphAst.js"),o=r("./src/diagrams/git/parser/gitGraph.jison"),s=r.n(o),c=r("./src/logger.js"),l=r("./src/utils.js"),u={},d={nodeSpacing:150,nodeFillColor:"yellow",nodeStrokeWidth:2,nodeStrokeColor:"grey",lineStrokeWidth:4,branchOffset:50,lineColor:"grey",leftMargin:50,branchColors:["#442f74","#983351","#609732","#AA9A39"],nodeRadius:10,nodeLabel:{width:75,height:100,x:-25,y:0}},h={},f=function(t){h=t};function p(t,e,r,n){var a=Object(l.interpolateToCurve)(n,i.curveBasis),o=d.branchColors[r%d.branchColors.length],s=Object(i.line)().x((function(t){return Math.round(t.x)})).y((function(t){return Math.round(t.y)})).curve(a);t.append("svg:path").attr("d",s(e)).style("stroke",o).style("stroke-width",d.lineStrokeWidth).style("fill","none")}function g(t,e){e=e||t.node().getBBox();var r=t.node().getCTM();return{left:r.e+e.x*r.a,top:r.f+e.y*r.d,width:e.width,height:e.height}}function y(t,e,r,n,i){c.logger.debug("svgDrawLineForCommits: ",e,r);var a=g(t.select("#node-"+e+" circle")),o=g(t.select("#node-"+r+" circle"));switch(n){case"LR":if(a.left-o.left>d.nodeSpacing){var s={x:a.left-d.nodeSpacing,y:o.top+o.height/2};p(t,[s,{x:o.left+o.width,y:o.top+o.height/2}],i,"linear"),p(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-d.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-d.nodeSpacing/2,y:s.y},s],i)}else p(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-d.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-d.nodeSpacing/2,y:o.top+o.height/2},{x:o.left+o.width,y:o.top+o.height/2}],i);break;case"BT":if(o.top-a.top>d.nodeSpacing){var l={x:o.left+o.width/2,y:a.top+a.height+d.nodeSpacing};p(t,[l,{x:o.left+o.width/2,y:o.top}],i,"linear"),p(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+a.height+d.nodeSpacing/2},{x:o.left+o.width/2,y:l.y-d.nodeSpacing/2},l],i)}else p(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+d.nodeSpacing/2},{x:o.left+o.width/2,y:o.top-d.nodeSpacing/2},{x:o.left+o.width/2,y:o.top}],i)}}function m(t,e){return t.select(e).node().cloneNode(!0)}function v(t,e,r,i){var a,o=Object.keys(u).length;if("string"==typeof e)do{if(a=u[e],c.logger.debug("in renderCommitHistory",a.id,a.seq),t.select("#node-"+e).size()>0)return;t.append((function(){return m(t,"#def-commit")})).attr("class","commit").attr("id",(function(){return"node-"+a.id})).attr("transform",(function(){switch(i){case"LR":return"translate("+(a.seq*d.nodeSpacing+d.leftMargin)+", "+n*d.branchOffset+")";case"BT":return"translate("+(n*d.branchOffset+d.leftMargin)+", "+(o-a.seq)*d.nodeSpacing+")"}})).attr("fill",d.nodeFillColor).attr("stroke",d.nodeStrokeColor).attr("stroke-width",d.nodeStrokeWidth);var s=void 0;for(var l in r)if(r[l].commit===a){s=r[l];break}s&&(c.logger.debug("found branch ",s.name),t.select("#node-"+a.id+" p").append("xhtml:span").attr("class","branch-label").text(s.name+", ")),t.select("#node-"+a.id+" p").append("xhtml:span").attr("class","commit-id").text(a.id),""!==a.message&&"BT"===i&&t.select("#node-"+a.id+" p").append("xhtml:span").attr("class","commit-msg").text(", "+a.message),e=a.parent}while(e&&u[e]);Array.isArray(e)&&(c.logger.debug("found merge commmit",e),v(t,e[0],r,i),n++,v(t,e[1],r,i),n--)}function b(t,e,r,n){for(n=n||0;e.seq>0&&!e.lineDrawn;)"string"==typeof e.parent?(y(t,e.id,e.parent,r,n),e.lineDrawn=!0,e=u[e.parent]):Array.isArray(e.parent)&&(y(t,e.id,e.parent[0],r,n),y(t,e.id,e.parent[1],r,n+1),b(t,u[e.parent[1]],r,n+1),e.lineDrawn=!0,e=u[e.parent[0]])}var x=function(t,e,r){try{var o=s.a.parser;o.yy=a.default,o.yy.clear(),c.logger.debug("in gitgraph renderer",t+"\n","id:",e,r),o.parse(t+"\n"),d=Object.assign(d,h,a.default.getOptions()),c.logger.debug("effective options",d);var l=a.default.getDirection();u=a.default.getCommits();var f=a.default.getBranchesAsObjArray();"BT"===l&&(d.nodeLabel.x=f.length*d.branchOffset,d.nodeLabel.width="100%",d.nodeLabel.y=-2*d.nodeRadius);var p=Object(i.select)('[id="'.concat(e,'"]'));for(var g in function(t){t.append("defs").append("g").attr("id","def-commit").append("circle").attr("r",d.nodeRadius).attr("cx",0).attr("cy",0),t.select("#def-commit").append("foreignObject").attr("width",d.nodeLabel.width).attr("height",d.nodeLabel.height).attr("x",d.nodeLabel.x).attr("y",d.nodeLabel.y).attr("class","node-label").attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").append("p").html("")}(p),n=1,f){var y=f[g];v(p,y.commit.id,f,l),b(p,y.commit,l),n++}p.attr("height",(function(){return"BT"===l?Object.keys(u).length*d.nodeSpacing:(f.length+1)*d.branchOffset}))}catch(t){c.logger.error("Error while rendering gitgraph"),c.logger.error(t.message)}};e.default={setConf:f,draw:x}},"./src/diagrams/git/parser/gitGraph.jison":function(t,e,r){(function(t,n){var i=function(){var t=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},e=[2,3],r=[1,7],n=[7,12,15,17,19,20,21],i=[7,11,12,15,17,19,20,21],a=[2,20],o=[1,32],s={trace:function(){},yy:{},symbols_:{error:2,start:3,GG:4,":":5,document:6,EOF:7,DIR:8,options:9,body:10,OPT:11,NL:12,line:13,statement:14,COMMIT:15,commit_arg:16,BRANCH:17,ID:18,CHECKOUT:19,MERGE:20,RESET:21,reset_arg:22,STR:23,HEAD:24,reset_parents:25,CARET:26,$accept:0,$end:1},terminals_:{2:"error",4:"GG",5:":",7:"EOF",8:"DIR",11:"OPT",12:"NL",15:"COMMIT",17:"BRANCH",18:"ID",19:"CHECKOUT",20:"MERGE",21:"RESET",23:"STR",24:"HEAD",26:"CARET"},productions_:[0,[3,4],[3,5],[6,0],[6,2],[9,2],[9,1],[10,0],[10,2],[13,2],[13,1],[14,2],[14,2],[14,2],[14,2],[14,2],[16,0],[16,1],[22,2],[22,2],[25,0],[25,2]],performAction:function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:return n.setDirection(a[s-3]),a[s-1];case 4:n.setOptions(a[s-1]),this.$=a[s];break;case 5:a[s-1]+=a[s],this.$=a[s-1];break;case 7:this.$=[];break;case 8:a[s-1].push(a[s]),this.$=a[s-1];break;case 9:this.$=a[s-1];break;case 11:n.commit(a[s]);break;case 12:n.branch(a[s]);break;case 13:n.checkout(a[s]);break;case 14:n.merge(a[s]);break;case 15:n.reset(a[s]);break;case 16:this.$="";break;case 17:this.$=a[s];break;case 18:this.$=a[s-1]+":"+a[s];break;case 19:this.$=a[s-1]+":"+n.count,n.count=0;break;case 20:n.count=0;break;case 21:n.count+=1}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3],8:[1,4]},{6:5,7:e,9:6,12:r},{5:[1,8]},{7:[1,9]},t(n,[2,7],{10:10,11:[1,11]}),t(i,[2,6]),{6:12,7:e,9:6,12:r},{1:[2,1]},{7:[2,4],12:[1,15],13:13,14:14,15:[1,16],17:[1,17],19:[1,18],20:[1,19],21:[1,20]},t(i,[2,5]),{7:[1,21]},t(n,[2,8]),{12:[1,22]},t(n,[2,10]),{12:[2,16],16:23,23:[1,24]},{18:[1,25]},{18:[1,26]},{18:[1,27]},{18:[1,30],22:28,24:[1,29]},{1:[2,2]},t(n,[2,9]),{12:[2,11]},{12:[2,17]},{12:[2,12]},{12:[2,13]},{12:[2,14]},{12:[2,15]},{12:a,25:31,26:o},{12:a,25:33,26:o},{12:[2,18]},{12:a,25:34,26:o},{12:[2,19]},{12:[2,21]}],defaultActions:{9:[2,1],21:[2,2],23:[2,11],24:[2,17],25:[2,12],26:[2,13],27:[2,14],28:[2,15],31:[2,18],33:[2,19],34:[2,21]},parseError:function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},parse:function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=0,d=2,h=1,f=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=n.pop()||p.lex()||h)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,w,_,E,C,T,O,S,A={};;){if(w=r[r.length-1],this.defaultActions[w]?_=this.defaultActions[w]:(null==x&&(x=b()),_=o[w]&&o[w][x]),void 0===_||!_.length||!_[0]){var j="";for(C in S=[],o[w])this.terminals_[C]&&C>d&&S.push("'"+this.terminals_[C]+"'");j=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(j,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(_[0]){case 1:r.push(x),i.push(p.yytext),a.push(p.yylloc),r.push(_[1]),x=null,k?(x=k,k=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(T=this.productions_[_[1]][1],A.$=i[i.length-T],A._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},v&&(A._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(A,[s,l,c,g.yy,_[1],i,a].concat(f))))return E;T&&(r=r.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),r.push(this.productions_[_[1]][0]),i.push(A.$),a.push(A._$),O=o[r[r.length-2]][r[r.length-1]],r.push(O);break;case 3:return!0}}return!0}},c={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||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];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(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 e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),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(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,r,n){switch(r){case 0:return 12;case 1:case 2:case 3:break;case 4:return 4;case 5:return 15;case 6:return 17;case 7:return 20;case 8:return 21;case 9:return 19;case 10:case 11:return 8;case 12:return 5;case 13:return 26;case 14:this.begin("options");break;case 15:this.popState();break;case 16:return 11;case 17:this.begin("string");break;case 18:this.popState();break;case 19:return 23;case 20:return 18;case 21:return 7}},rules:[/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:branch\b)/i,/^(?:merge\b)/i,/^(?:reset\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:end\r?\n)/i,/^(?:[^\n]+\r?\n)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[a-zA-Z][-_\.a-zA-Z0-9]*[-_a-zA-Z0-9])/i,/^(?:$)/i],conditions:{options:{rules:[15,16],inclusive:!1},string:{rules:[18,19],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,20,21],inclusive:!0}}};function l(){this.yy={}}return s.lexer=c,l.prototype=s,s.Parser=l,new l}();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"),t.exit(1));var i=r("./node_modules/node-libs-browser/mock/empty.js").readFileSync(r("./node_modules/path-browserify/index.js").normalize(n[1]),"utf8");return e.parser.parse(i)},r.c[r.s]===n&&e.main(t.argv.slice(1))}).call(this,r("./node_modules/process/browser.js"),r("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/git/styles.js":function(t,e,r){"use strict";r.r(e),e.default=function(){return"\n  .commit-id,\n  .commit-msg,\n  .branch-label {\n    fill: lightgrey;\n    color: lightgrey;\n    font-family: 'trebuchet ms', verdana, arial;\n    font-family: var(--mermaid-font-family);\n  }\n"}},"./src/diagrams/info/infoDb.js":function(t,e,r){"use strict";r.r(e),r.d(e,"setMessage",(function(){return o})),r.d(e,"getMessage",(function(){return s})),r.d(e,"setInfo",(function(){return c})),r.d(e,"getInfo",(function(){return l}));var n=r("./src/logger.js"),i="",a=!1,o=function(t){n.logger.debug("Setting message to: "+t),i=t},s=function(){return i},c=function(t){a=t},l=function(){return a};e.default={setMessage:o,getMessage:s,setInfo:c,getInfo:l}},"./src/diagrams/info/infoRenderer.js":function(t,e,r){"use strict";r.r(e),r.d(e,"setConf",(function(){return l})),r.d(e,"draw",(function(){return u}));var n=r("d3"),i=r("./src/diagrams/info/infoDb.js"),a=r("./src/diagrams/info/parser/info.jison"),o=r.n(a),s=r("./src/logger.js"),c={},l=function(t){Object.keys(t).forEach((function(e){c[e]=t[e]}))},u=function(t,e,r){try{var a=o.a.parser;a.yy=i.default,s.logger.debug("Renering info diagram\n"+t),a.parse(t),s.logger.debug("Parsed info diagram");var c=Object(n.select)("#"+e);c.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+r),c.attr("height",100),c.attr("width",400)}catch(t){s.logger.error("Error while rendering info diagram"),s.logger.error(t.message)}};e.default={setConf:l,draw:u}},"./src/diagrams/info/parser/info.jison":function(t,e,r){(function(t,n){var i=function(){var t=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},e=[6,9,10],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,r,n,i,a,o){switch(a.length,i){case 1:return n;case 4:break;case 6:n.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},parse:function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=0,d=2,h=1,f=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=n.pop()||p.lex()||h)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,w,_,E,C,T,O,S,A={};;){if(w=r[r.length-1],this.defaultActions[w]?_=this.defaultActions[w]:(null==x&&(x=b()),_=o[w]&&o[w][x]),void 0===_||!_.length||!_[0]){var j="";for(C in S=[],o[w])this.terminals_[C]&&C>d&&S.push("'"+this.terminals_[C]+"'");j=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(j,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(_[0]){case 1:r.push(x),i.push(p.yytext),a.push(p.yylloc),r.push(_[1]),x=null,k?(x=k,k=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(T=this.productions_[_[1]][1],A.$=i[i.length-T],A._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},v&&(A._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(A,[s,l,c,g.yy,_[1],i,a].concat(f))))return E;T&&(r=r.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),r.push(this.productions_[_[1]][0]),i.push(A.$),a.push(A._$),O=o[r[r.length-2]][r[r.length-1]],r.push(O);break;case 3:return!0}}return!0}},n={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||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];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(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 e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),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(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,r,n){switch(r){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};function i(){this.yy={}}return r.lexer=n,i.prototype=r,r.Parser=i,new i}();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"),t.exit(1));var i=r("./node_modules/node-libs-browser/mock/empty.js").readFileSync(r("./node_modules/path-browserify/index.js").normalize(n[1]),"utf8");return e.parser.parse(i)},r.c[r.s]===n&&e.main(t.argv.slice(1))}).call(this,r("./node_modules/process/browser.js"),r("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/info/styles.js":function(t,e,r){"use strict";r.r(e),e.default=function(){return""}},"./src/diagrams/pie/parser/pie.jison":function(t,e,r){(function(t,n){var i=function(){var t=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},e=[1,4],r=[1,5],n=[1,6],i=[1,7],a=[1,9],o=[1,10,12,19,20,21,22],s=[1,6,10,12,19,20,21,22],c=[19,20,21],l=[1,22],u=[6,19,20,21,22],d={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,line:8,statement:9,txt:10,value:11,title:12,title_value:13,openDirective:14,typeDirective:15,closeDirective:16,":":17,argDirective:18,NEWLINE:19,";":20,EOF:21,open_directive:22,type_directive:23,arg_directive:24,close_directive:25,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",10:"txt",11:"value",12:"title",13:"title_value",17:":",19:"NEWLINE",20:";",21:"EOF",22:"open_directive",23:"type_directive",24:"arg_directive",25:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[9,0],[9,2],[9,2],[9,1],[5,3],[5,5],[4,1],[4,1],[4,1],[14,1],[15,1],[18,1],[16,1]],performAction:function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 6:this.$=a[s-1];break;case 8:n.addSection(a[s-1],n.cleanupValue(a[s]));break;case 9:this.$=a[s].trim(),n.setTitle(this.$);break;case 16:n.parseDirective("%%{","open_directive");break;case 17:n.parseDirective(a[s],"type_directive");break;case 18:a[s]=a[s].trim().replace(/'/g,'"'),n.parseDirective(a[s],"arg_directive");break;case 19:n.parseDirective("}%%","close_directive","pie")}},table:[{3:1,4:2,5:3,6:e,14:8,19:r,20:n,21:i,22:a},{1:[3]},{3:10,4:2,5:3,6:e,14:8,19:r,20:n,21:i,22:a},{3:11,4:2,5:3,6:e,14:8,19:r,20:n,21:i,22:a},t(o,[2,4],{7:12}),t(s,[2,13]),t(s,[2,14]),t(s,[2,15]),{15:13,23:[1,14]},{23:[2,16]},{1:[2,1]},{1:[2,2]},t(c,[2,7],{14:8,8:15,9:16,5:19,1:[2,3],10:[1,17],12:[1,18],22:a}),{16:20,17:[1,21],25:l},t([17,25],[2,17]),t(o,[2,5]),{4:23,19:r,20:n,21:i},{11:[1,24]},{13:[1,25]},t(c,[2,10]),t(u,[2,11]),{18:26,24:[1,27]},t(u,[2,19]),t(o,[2,6]),t(c,[2,8]),t(c,[2,9]),{16:28,25:l},{25:[2,18]},t(u,[2,12])],defaultActions:{9:[2,16],10:[2,1],11:[2,2],27:[2,18]},parseError:function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},parse:function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=0,d=2,h=1,f=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=n.pop()||p.lex()||h)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,w,_,E,C,T,O,S,A={};;){if(w=r[r.length-1],this.defaultActions[w]?_=this.defaultActions[w]:(null==x&&(x=b()),_=o[w]&&o[w][x]),void 0===_||!_.length||!_[0]){var j="";for(C in S=[],o[w])this.terminals_[C]&&C>d&&S.push("'"+this.terminals_[C]+"'");j=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(j,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(_[0]){case 1:r.push(x),i.push(p.yytext),a.push(p.yylloc),r.push(_[1]),x=null,k?(x=k,k=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(T=this.productions_[_[1]][1],A.$=i[i.length-T],A._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},v&&(A._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(A,[s,l,c,g.yy,_[1],i,a].concat(f))))return E;T&&(r=r.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),r.push(this.productions_[_[1]][0]),i.push(A.$),a.push(A._$),O=o[r[r.length-2]][r[r.length-1]],r.push(O);break;case 3:return!0}}return!0}},h={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||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];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(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 e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),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(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,r,n){switch(r){case 0:return this.begin("open_directive"),22;case 1:return this.begin("type_directive"),23;case 2:return this.popState(),this.begin("arg_directive"),17;case 3:return this.popState(),this.popState(),25;case 4:return 24;case 5:break;case 6:console.log("Crap after close");break;case 7:return 19;case 8:case 9:break;case 10:return this.begin("title"),12;case 11:return this.popState(),"title_value";case 12:this.begin("string");break;case 13:this.popState();break;case 14:return"txt";case 15:return 6;case 16:return"value";case 17:return 21}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,15,16,17],inclusive:!0}}};function f(){this.yy={}}return d.lexer=h,f.prototype=d,d.Parser=f,new f}();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"),t.exit(1));var i=r("./node_modules/node-libs-browser/mock/empty.js").readFileSync(r("./node_modules/path-browserify/index.js").normalize(n[1]),"utf8");return e.parser.parse(i)},r.c[r.s]===n&&e.main(t.argv.slice(1))}).call(this,r("./node_modules/process/browser.js"),r("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/pie/pieDb.js":function(t,e,r){"use strict";r.r(e),r.d(e,"parseDirective",(function(){return c}));var n=r("./src/logger.js"),i=r("./src/mermaidAPI.js"),a=r("./src/config.js"),o={},s="",c=function(t,e,r){i.default.parseDirective(this,t,e,r)};e.default={parseDirective:c,getConfig:function(){return a.getConfig().pie},addSection:function(t,e){void 0===o[t]&&(o[t]=e,n.logger.debug("Added new section :",t))},getSections:function(){return o},cleanupValue:function(t){return":"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){o={},s=""},setTitle:function(t){s=t},getTitle:function(){return s}}},"./src/diagrams/pie/pieRenderer.js":function(t,e,r){"use strict";r.r(e),r.d(e,"setConf",(function(){return u})),r.d(e,"draw",(function(){return d}));var n,i=r("d3"),a=r("./src/diagrams/pie/pieDb.js"),o=r("./src/diagrams/pie/parser/pie.jison"),s=r.n(o),c=r("./src/logger.js"),l={},u=function(t){Object.keys(t).forEach((function(e){l[e]=t[e]}))},d=function(t,e){try{var r=s.a.parser;r.yy=a.default,c.logger.debug("Rendering info diagram\n"+t),r.yy.clear(),r.parse(t),c.logger.debug("Parsed info diagram");var o=document.getElementById(e);void 0===(n=o.parentElement.offsetWidth)&&(n=1200),void 0!==l.useWidth&&(n=l.useWidth),o.setAttribute("height","100%"),o.setAttribute("viewBox","0 0 "+n+" 450");var u=n,d=Math.min(u,450)/2-40,h=Object(i.select)("#"+e).append("svg").attr("width",u).attr("height",450).append("g").attr("transform","translate("+u/2+",225)"),f=a.default.getSections(),p=0;Object.keys(f).forEach((function(t){p+=f[t]})),c.logger.info(f);var g=Object(i.scaleOrdinal)().domain(f).range(i.schemeSet2),y=Object(i.pie)().value((function(t){return t.value}))(Object(i.entries)(f)),m=Object(i.arc)().innerRadius(0).outerRadius(d);h.selectAll("mySlices").data(y).enter().append("path").attr("d",m).attr("fill",(function(t){return g(t.data.key)})).attr("stroke","black").style("stroke-width","2px").style("opacity",.7),h.selectAll("mySlices").data(y).enter().append("text").text((function(t){return(t.data.value/p*100).toFixed(0)+"%"})).attr("transform",(function(t){return"translate("+m.centroid(t)+")"})).style("text-anchor","middle").attr("class","slice").style("font-size",17),h.append("text").text(r.yy.getTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");var v=h.selectAll(".legend").data(g.domain()).enter().append("g").attr("class","legend").attr("transform",(function(t,e){return"translate(216,"+(22*e-22*g.domain().length/2)+")"}));v.append("rect").attr("width",18).attr("height",18).style("fill",g).style("stroke",g),v.append("text").attr("x",22).attr("y",14).text((function(t){return t}))}catch(t){c.logger.error("Error while rendering info diagram"),c.logger.error(t)}};e.default={setConf:u,draw:d}},"./src/diagrams/pie/styles.js":function(t,e,r){"use strict";r.r(e),e.default=function(t){return".pieTitleText {\n    text-anchor: middle;\n    font-size: 25px;\n    fill: ".concat(t.taskTextDarkColor,";\n    font-family: ").concat(t.fontFamily,";\n  }\n  .slice {\n    font-family: ").concat(t.fontFamily,";\n    fill: ").concat(t.textColor,";\n    // fill: white;\n  }\n  .legend text {\n    fill: ").concat(t.taskTextDarkColor,";\n    font-family: ").concat(t.fontFamily,";\n    font-size: 17px;\n  }\n")}},"./src/diagrams/sequence/parser/sequenceDiagram.jison":function(t,e,r){(function(t,n){var i=function(){var t=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},e=[1,2],r=[1,3],n=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,18],l=[1,20],u=[1,21],d=[1,22],h=[1,24],f=[1,25],p=[1,26],g=[1,27],y=[1,28],m=[1,29],v=[1,32],b=[1,33],x=[1,36],k=[1,4,5,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,56],w=[1,44],_=[4,5,16,21,22,23,25,27,28,29,30,31,33,37,48,56],E=[4,5,16,21,22,23,25,27,28,29,30,31,33,36,37,48,56],C=[4,5,16,21,22,23,25,27,28,29,30,31,33,35,37,48,56],T=[46,47,48],O=[1,4,5,7,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,56],S={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,openDirective:11,typeDirective:12,closeDirective:13,":":14,argDirective:15,participant:16,actor:17,AS:18,restOfLine:19,signal:20,autonumber:21,activate:22,deactivate:23,note_statement:24,title:25,text2:26,loop:27,end:28,rect:29,opt:30,alt:31,else_sections:32,par:33,par_sections:34,and:35,else:36,note:37,placement:38,over:39,actor_pair:40,spaceList:41,",":42,left_of:43,right_of:44,signaltype:45,"+":46,"-":47,ACTOR:48,SOLID_OPEN_ARROW:49,DOTTED_OPEN_ARROW:50,SOLID_ARROW:51,DOTTED_ARROW:52,SOLID_CROSS:53,DOTTED_CROSS:54,TXT:55,open_directive:56,type_directive:57,arg_directive:58,close_directive:59,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",21:"autonumber",22:"activate",23:"deactivate",25:"title",27:"loop",28:"end",29:"rect",30:"opt",31:"alt",33:"par",35:"and",36:"else",37:"note",39:"over",42:",",43:"left_of",44:"right_of",46:"+",47:"-",48:"ACTOR",49:"SOLID_OPEN_ARROW",50:"DOTTED_OPEN_ARROW",51:"SOLID_ARROW",52:"DOTTED_ARROW",53:"SOLID_CROSS",54:"DOTTED_CROSS",55:"TXT",56:"open_directive",57:"type_directive",58:"arg_directive",59:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,2],[10,1],[10,3],[10,3],[10,2],[10,3],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[34,1],[34,4],[32,1],[32,4],[24,4],[24,4],[41,2],[41,1],[40,3],[40,1],[38,1],[38,1],[20,5],[20,5],[20,4],[17,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[26,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 4:return n.apply(a[s]),a[s];case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:this.$=[];break;case 12:a[s-3].description=n.parseMessage(a[s-1]),this.$=a[s-3];break;case 13:this.$=a[s-1];break;case 15:n.enableSequenceNumbers();break;case 16:this.$={type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:a[s-1]};break;case 17:this.$={type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[s-1]};break;case 19:this.$=[{type:"setTitle",text:a[s-1]}];break;case 20:a[s-1].unshift({type:"loopStart",loopText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.LOOP_START}),a[s-1].push({type:"loopEnd",loopText:a[s-2],signalType:n.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 21:a[s-1].unshift({type:"rectStart",color:n.parseMessage(a[s-2]),signalType:n.LINETYPE.RECT_START}),a[s-1].push({type:"rectEnd",color:n.parseMessage(a[s-2]),signalType:n.LINETYPE.RECT_END}),this.$=a[s-1];break;case 22:a[s-1].unshift({type:"optStart",optText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.OPT_START}),a[s-1].push({type:"optEnd",optText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.OPT_END}),this.$=a[s-1];break;case 23:a[s-1].unshift({type:"altStart",altText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.ALT_START}),a[s-1].push({type:"altEnd",signalType:n.LINETYPE.ALT_END}),this.$=a[s-1];break;case 24:a[s-1].unshift({type:"parStart",parText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.PAR_START}),a[s-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[s-1];break;case 27:this.$=a[s-3].concat([{type:"and",parText:n.parseMessage(a[s-1]),signalType:n.LINETYPE.PAR_AND},a[s]]);break;case 29:this.$=a[s-3].concat([{type:"else",altText:n.parseMessage(a[s-1]),signalType:n.LINETYPE.ALT_ELSE},a[s]]);break;case 30:this.$=[a[s-1],{type:"addNote",placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 31:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:"addNote",placement:n.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 34:this.$=[a[s-2],a[s]];break;case 35:this.$=a[s];break;case 36:this.$=n.PLACEMENT.LEFTOF;break;case 37:this.$=n.PLACEMENT.RIGHTOF;break;case 38:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:a[s-1]}];break;case 39:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[s-4]}];break;case 40:this.$=[a[s-3],a[s-1],{type:"addMessage",from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 41:this.$={type:"addActor",actor:a[s]};break;case 42:this.$=n.LINETYPE.SOLID_OPEN;break;case 43:this.$=n.LINETYPE.DOTTED_OPEN;break;case 44:this.$=n.LINETYPE.SOLID;break;case 45:this.$=n.LINETYPE.DOTTED;break;case 46:this.$=n.LINETYPE.SOLID_CROSS;break;case 47:this.$=n.LINETYPE.DOTTED_CROSS;break;case 48:this.$=n.parseMessage(a[s].trim().substring(1));break;case 49:n.parseDirective("%%{","open_directive");break;case 50:n.parseDirective(a[s],"type_directive");break;case 51:a[s]=a[s].trim().replace(/'/g,'"'),n.parseDirective(a[s],"arg_directive");break;case 52:n.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:e,5:r,6:4,7:n,11:6,56:i},{1:[3]},{3:8,4:e,5:r,6:4,7:n,11:6,56:i},{3:9,4:e,5:r,6:4,7:n,11:6,56:i},{3:10,4:e,5:r,6:4,7:n,11:6,56:i},t([1,4,5,16,21,22,23,25,27,29,30,31,33,37,48,56],a,{8:11}),{12:12,57:[1,13]},{57:[2,49]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:l,22:u,23:d,24:23,25:h,27:f,29:p,30:g,31:y,33:m,37:v,48:b,56:i},{13:34,14:[1,35],59:x},t([14,59],[2,50]),t(k,[2,6]),{6:30,10:37,11:6,16:c,17:31,20:19,21:l,22:u,23:d,24:23,25:h,27:f,29:p,30:g,31:y,33:m,37:v,48:b,56:i},t(k,[2,8]),t(k,[2,9]),{17:38,48:b},{5:[1,39]},t(k,[2,15]),{17:40,48:b},{17:41,48:b},{5:[1,42]},{26:43,55:w},{19:[1,45]},{19:[1,46]},{19:[1,47]},{19:[1,48]},{19:[1,49]},t(k,[2,25]),{45:50,49:[1,51],50:[1,52],51:[1,53],52:[1,54],53:[1,55],54:[1,56]},{38:57,39:[1,58],43:[1,59],44:[1,60]},t([5,18,42,49,50,51,52,53,54,55],[2,41]),{5:[1,61]},{15:62,58:[1,63]},{5:[2,52]},t(k,[2,7]),{5:[1,65],18:[1,64]},t(k,[2,14]),{5:[1,66]},{5:[1,67]},t(k,[2,18]),{5:[1,68]},{5:[2,48]},t(_,a,{8:69}),t(_,a,{8:70}),t(_,a,{8:71}),t(E,a,{32:72,8:73}),t(C,a,{34:74,8:75}),{17:78,46:[1,76],47:[1,77],48:b},t(T,[2,42]),t(T,[2,43]),t(T,[2,44]),t(T,[2,45]),t(T,[2,46]),t(T,[2,47]),{17:79,48:b},{17:81,40:80,48:b},{48:[2,36]},{48:[2,37]},t(O,[2,10]),{13:82,59:x},{59:[2,51]},{19:[1,83]},t(k,[2,13]),t(k,[2,16]),t(k,[2,17]),t(k,[2,19]),{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:l,22:u,23:d,24:23,25:h,27:f,28:[1,84],29:p,30:g,31:y,33:m,37:v,48:b,56:i},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:l,22:u,23:d,24:23,25:h,27:f,28:[1,85],29:p,30:g,31:y,33:m,37:v,48:b,56:i},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:l,22:u,23:d,24:23,25:h,27:f,28:[1,86],29:p,30:g,31:y,33:m,37:v,48:b,56:i},{28:[1,87]},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:l,22:u,23:d,24:23,25:h,27:f,28:[2,28],29:p,30:g,31:y,33:m,36:[1,88],37:v,48:b,56:i},{28:[1,89]},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:l,22:u,23:d,24:23,25:h,27:f,28:[2,26],29:p,30:g,31:y,33:m,35:[1,90],37:v,48:b,56:i},{17:91,48:b},{17:92,48:b},{26:93,55:w},{26:94,55:w},{26:95,55:w},{42:[1,96],55:[2,35]},{5:[1,97]},{5:[1,98]},t(k,[2,20]),t(k,[2,21]),t(k,[2,22]),t(k,[2,23]),{19:[1,99]},t(k,[2,24]),{19:[1,100]},{26:101,55:w},{26:102,55:w},{5:[2,40]},{5:[2,30]},{5:[2,31]},{17:103,48:b},t(O,[2,11]),t(k,[2,12]),t(E,a,{8:73,32:104}),t(C,a,{8:75,34:105}),{5:[2,38]},{5:[2,39]},{55:[2,34]},{28:[2,29]},{28:[2,27]}],defaultActions:{7:[2,49],8:[2,1],9:[2,2],10:[2,3],36:[2,52],44:[2,48],59:[2,36],60:[2,37],63:[2,51],93:[2,40],94:[2,30],95:[2,31],101:[2,38],102:[2,39],103:[2,34],104:[2,29],105:[2,27]},parseError:function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},parse:function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=0,d=2,h=1,f=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=n.pop()||p.lex()||h)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,w,_,E,C,T,O,S,A={};;){if(w=r[r.length-1],this.defaultActions[w]?_=this.defaultActions[w]:(null==x&&(x=b()),_=o[w]&&o[w][x]),void 0===_||!_.length||!_[0]){var j="";for(C in S=[],o[w])this.terminals_[C]&&C>d&&S.push("'"+this.terminals_[C]+"'");j=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(j,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(_[0]){case 1:r.push(x),i.push(p.yytext),a.push(p.yylloc),r.push(_[1]),x=null,k?(x=k,k=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(T=this.productions_[_[1]][1],A.$=i[i.length-T],A._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},v&&(A._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(A,[s,l,c,g.yy,_[1],i,a].concat(f))))return E;T&&(r=r.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),r.push(this.productions_[_[1]][0]),i.push(A.$),a.push(A._$),O=o[r[r.length-2]][r[r.length-1]],r.push(O);break;case 3:return!0}}return!0}},A={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||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];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(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 e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),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(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,r,n){switch(r){case 0:return this.begin("open_directive"),56;case 1:return this.begin("type_directive"),57;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),59;case 4:return 58;case 5:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return this.begin("ID"),16;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),48;case 13:return this.popState(),this.popState(),this.begin("LINE"),18;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),27;case 16:return this.begin("LINE"),29;case 17:return this.begin("LINE"),30;case 18:return this.begin("LINE"),31;case 19:return this.begin("LINE"),36;case 20:return this.begin("LINE"),33;case 21:return this.begin("LINE"),35;case 22:return this.popState(),19;case 23:return 28;case 24:return 43;case 25:return 44;case 26:return 39;case 27:return 37;case 28:return this.begin("ID"),22;case 29:return this.begin("ID"),23;case 30:return 25;case 31:return 7;case 32:return 21;case 33:return 42;case 34:return 5;case 35:return e.yytext=e.yytext.trim(),48;case 36:return 51;case 37:return 52;case 38:return 49;case 39:return 50;case 40:return 53;case 41:return 54;case 42:return 55;case 43:return 46;case 44:return 47;case 45:return 5;case 46:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:participant\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,12],inclusive:!1},ALIAS:{rules:[7,8,13,14],inclusive:!1},LINE:{rules:[7,8,22],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};function j(){this.yy={}}return S.lexer=A,j.prototype=S,S.Parser=j,new j}();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"),t.exit(1));var i=r("./node_modules/node-libs-browser/mock/empty.js").readFileSync(r("./node_modules/path-browserify/index.js").normalize(n[1]),"utf8");return e.parser.parse(i)},r.c[r.s]===n&&e.main(t.argv.slice(1))}).call(this,r("./node_modules/process/browser.js"),r("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/sequence/sequenceDb.js":function(t,e,r){"use strict";r.r(e),r.d(e,"parseDirective",(function(){return g})),r.d(e,"addActor",(function(){return y})),r.d(e,"addMessage",(function(){return v})),r.d(e,"addSignal",(function(){return b})),r.d(e,"getMessages",(function(){return x})),r.d(e,"getActors",(function(){return k})),r.d(e,"getActor",(function(){return w})),r.d(e,"getActorKeys",(function(){return _})),r.d(e,"getTitle",(function(){return E})),r.d(e,"getTitleWrapped",(function(){return C})),r.d(e,"enableSequenceNumbers",(function(){return T})),r.d(e,"showSequenceNumbers",(function(){return O})),r.d(e,"setWrap",(function(){return S})),r.d(e,"autoWrap",(function(){return A})),r.d(e,"clear",(function(){return j})),r.d(e,"parseMessage",(function(){return D})),r.d(e,"LINETYPE",(function(){return B})),r.d(e,"ARROWTYPE",(function(){return N})),r.d(e,"PLACEMENT",(function(){return M})),r.d(e,"addNote",(function(){return L})),r.d(e,"setTitle",(function(){return I})),r.d(e,"apply",(function(){return P}));var n=r("./src/mermaidAPI.js"),i=r("./src/config.js"),a=r("./src/diagrams/common/common.js"),o=r("./src/logger.js"),s=void 0,c={},l=[],u=[],d="",h=!1,f=!1,p=!1,g=function(t,e,r){n.default.parseDirective(this,t,e,r)},y=function(t,e,r){var n=c[t];n&&e===n.name&&null==r||(null!=r&&null!=r.text||(r={text:e,wrap:null}),c[t]={name:e,description:r.text,wrap:void 0===r.wrap&&A()||!!r.wrap,prevActor:s},s&&c[s]&&(c[s].nextActor=t),s=t)},m=function(t){var e,r=0;for(e=0;e<l.length;e++)l[e].type===B.ACTIVE_START&&l[e].from.actor===t&&r++,l[e].type===B.ACTIVE_END&&l[e].from.actor===t&&r--;return r},v=function(t,e,r,n){l.push({from:t,to:e,message:r.text,wrap:void 0===r.wrap&&A()||!!r.wrap,answer:n})},b=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{text:void 0,wrap:void 0},n=arguments.length>3?arguments[3]:void 0;if(n===B.ACTIVE_END){var i=m(t.actor);if(i<1){var a=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw a.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a}}return l.push({from:t,to:e,message:r.text,wrap:void 0===r.wrap&&A()||!!r.wrap,type:n}),!0},x=function(){return l},k=function(){return c},w=function(t){return c[t]},_=function(){return Object.keys(c)},E=function(){return d},C=function(){return h},T=function(){f=!0},O=function(){return f},S=function(t){p=t},A=function(){return p},j=function(){c={},l=[]},D=function(t){var e=t.trim(),r={text:e.replace(/^[:]?(?:no)?wrap:/,"").trim(),wrap:null===e.match(/^[:]?(?:no)?wrap:/)?a.default.hasBreaks(e)||void 0:null!==e.match(/^[:]?wrap:/)||null===e.match(/^[:]?nowrap:/)&&void 0};return o.logger.debug("parseMessage:",r),r},B={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,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23},N={FILLED:0,OPEN:1},M={LEFTOF:0,RIGHTOF:1,OVER:2},L=function(t,e,r){var n={actor:t,placement:e,message:r.text,wrap:void 0===r.wrap&&A()||!!r.wrap},i=[].concat(t,t);u.push(n),l.push({from:i[0],to:i[1],message:r.text,wrap:void 0===r.wrap&&A()||!!r.wrap,type:B.NOTE,placement:e})},I=function(t){d=t.text,h=void 0===t.wrap&&A()||!!t.wrap},P=function t(e){if(e instanceof Array)e.forEach((function(e){t(e)}));else switch(e.type){case"addActor":y(e.actor,e.actor,e.description);break;case"activeStart":case"activeEnd":b(e.actor,void 0,void 0,e.signalType);break;case"addNote":L(e.actor,e.placement,e.text);break;case"addMessage":b(e.from,e.to,e.msg,e.signalType);break;case"loopStart":b(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":b(void 0,void 0,void 0,e.signalType);break;case"rectStart":b(void 0,void 0,e.color,e.signalType);break;case"rectEnd":b(void 0,void 0,void 0,e.signalType);break;case"optStart":b(void 0,void 0,e.optText,e.signalType);break;case"optEnd":b(void 0,void 0,void 0,e.signalType);break;case"altStart":case"else":b(void 0,void 0,e.altText,e.signalType);break;case"altEnd":b(void 0,void 0,void 0,e.signalType);break;case"setTitle":I(e.text);break;case"parStart":case"and":b(void 0,void 0,e.parText,e.signalType);break;case"parEnd":b(void 0,void 0,void 0,e.signalType)}};e.default={addActor:y,addMessage:v,addSignal:b,autoWrap:A,setWrap:S,enableSequenceNumbers:T,showSequenceNumbers:O,getMessages:x,getActors:k,getActor:w,getActorKeys:_,getTitle:E,parseDirective:g,getConfig:function(){return i.getConfig().sequence},getTitleWrapped:C,clear:j,parseMessage:D,LINETYPE:B,ARROWTYPE:N,PLACEMENT:M,addNote:L,setTitle:I,apply:P}},"./src/diagrams/sequence/sequenceRenderer.js":function(t,e,r){"use strict";r.r(e),r.d(e,"bounds",(function(){return h})),r.d(e,"drawActors",(function(){return y})),r.d(e,"setConf",(function(){return m})),r.d(e,"draw",(function(){return k}));var n=r("d3"),i=r("./src/diagrams/sequence/svgDraw.js"),a=r("./src/logger.js"),o=r("./src/diagrams/sequence/parser/sequenceDiagram.jison"),s=r("./src/diagrams/common/common.js"),c=r("./src/diagrams/sequence/sequenceDb.js"),l=r("./src/config.js"),u=r("./src/utils.js");o.parser.yy=c.default;var d={},h={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((function(t){return t.height||0})))+(0===this.loops.length?0:this.loops.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.messages.length?0:this.messages.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.notes.length?0:this.notes.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))},clear:function(){this.actors=[],this.loops=[],this.messages=[],this.notes=[]},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,m(o.parser.yy.getConfig())},updateVal:function(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])},updateBounds:function(t,e,r,n){var i=this,a=0;function o(o){return function(s){a++;var c=i.sequenceItems.length-a+1;i.updateVal(s,"starty",e-c*d.boxMargin,Math.min),i.updateVal(s,"stopy",n+c*d.boxMargin,Math.max),i.updateVal(h.data,"startx",t-c*d.boxMargin,Math.min),i.updateVal(h.data,"stopx",r+c*d.boxMargin,Math.max),"activation"!==o&&(i.updateVal(s,"startx",t-c*d.boxMargin,Math.min),i.updateVal(s,"stopx",r+c*d.boxMargin,Math.max),i.updateVal(h.data,"starty",e-c*d.boxMargin,Math.min),i.updateVal(h.data,"stopy",n+c*d.boxMargin,Math.max))}}this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},insert:function(t,e,r,n){var i=Math.min(t,r),a=Math.max(t,r),o=Math.min(e,n),s=Math.max(e,n);this.updateVal(h.data,"startx",i,Math.min),this.updateVal(h.data,"starty",o,Math.min),this.updateVal(h.data,"stopx",a,Math.max),this.updateVal(h.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},newActivation:function(t,e,r){var n=r[t.from.actor],a=v(t.from.actor).length||0,o=n.x+n.width/2+(a-1)*d.activationWidth/2;this.activations.push({startx:o,starty:this.verticalPos+2,stopx:o+d.activationWidth,stopy:void 0,actor:t.from.actor,anchored:i.default.anchorElement(e)})},endActivation:function(t){var e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:h.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return console.log("here",this.data),{bounds:this.data,models:this.models}}},f=function(t){return{fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}},p=function(t){return{fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}},g=function(t){return{fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}},y=function(t,e,r,n){for(var a=0,o=0,s=0;s<r.length;s++){var c=e[r[s]];c.width=c.width||d.width,c.height=Math.max(c.height||d.height,d.height),c.margin=c.margin||d.actorMargin,c.x=a+o,c.y=n,i.default.drawActor(t,c,d),h.insert(c.x,n,c.x+c.width,c.height),a+=c.width,o+=c.margin,h.models.addActor(c)}h.bumpVerticalPos(d.height)},m=function(t){Object(u.assignWithDepth)(d,t),t.fontFamily&&(d.actorFontFamily=d.noteFontFamily=d.messageFontFamily=t.fontFamily),t.fontSize&&(d.actorFontSize=d.noteFontSize=d.messageFontSize=t.fontSize),t.fontWeight&&(d.actorFontWeight=d.noteFontWeight=d.messageFontWeight=t.fontWeight)},v=function(t){return h.activations.filter((function(e){return e.actor===t}))},b=function(t,e){var r=e[t],n=v(t);return[n.reduce((function(t,e){return Math.min(t,e.startx)}),r.x+r.width/2),n.reduce((function(t,e){return Math.max(t,e.stopx)}),r.x+r.width/2)]};function x(t,e,r,n,i){h.bumpVerticalPos(r);var o=n;if(e.id&&e.message&&t[e.id]){var s=t[e.id].width,c=f(d);e.message=u.default.wrapLabel("[".concat(e.message,"]"),s-2*d.wrapPadding,c),e.width=s,e.wrap=!0;var l=u.default.calculateTextDimensions(e.message,c),p=Math.max(l.height,d.labelBoxHeight);o=n+p,a.logger.debug("".concat(p," - ").concat(e.message))}i(e),h.bumpVerticalPos(o)}var k=function(t,e){d=l.getConfig().sequence,console.log("there ",d),o.parser.yy.clear(),o.parser.yy.setWrap(d.wrap),o.parser.parse(t+"\n"),h.init(),a.logger.debug("C:".concat(JSON.stringify(d,null,2)));var r=Object(n.select)('[id="'.concat(e,'"]')),p=o.parser.yy.getActors(),g=o.parser.yy.getActorKeys(),m=o.parser.yy.getMessages(),b=o.parser.yy.getTitle(),k=w(p,m);d.height=_(p,k),y(r,p,g,0);var C=E(m,p,k);i.default.insertArrowHead(r),i.default.insertArrowCrossHead(r),i.default.insertSequenceNumber(r);var T=1;m.forEach((function(t){var e,n,l;switch(t.type){case o.parser.yy.LINETYPE.NOTE:n=t.noteModel,function(t,e){h.bumpVerticalPos(d.boxMargin),e.height=d.boxMargin,e.starty=h.getVerticalPos();var r=i.default.getNoteRect();r.x=e.startx,r.y=e.starty,r.width=e.width||d.width,r.class="note";var n=t.append("g"),a=i.default.drawRect(n,r),o=i.default.getTextObj();o.x=e.startx,o.y=e.starty,o.width=r.width,o.dy="1em",o.text=e.message,o.class="noteText",o.fontFamily=d.noteFontFamily,o.fontSize=d.noteFontSize,o.fontWeight=d.noteFontWeight,o.anchor=d.noteAlign,o.textMargin=d.noteMargin,o.valign=d.noteAlign,o.wrap=!0;var s=Object(i.drawText)(n,o),c=Math.round(s.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));a.attr("height",c+2*d.noteMargin),e.height+=c+2*d.noteMargin,h.bumpVerticalPos(c+2*d.noteMargin),e.stopy=e.starty+c+2*d.noteMargin,e.stopx=e.startx+r.width,h.insert(e.startx,e.starty,e.stopx,e.stopy),h.models.addNote(e)}(r,n);break;case o.parser.yy.LINETYPE.ACTIVE_START:h.newActivation(t,r,p);break;case o.parser.yy.LINETYPE.ACTIVE_END:!function(t,e){var n=h.endActivation(t);n.starty+18>e&&(n.starty=e-6,e+=12),i.default.drawActivation(r,n,e,d,v(t.from.actor).length),h.insert(n.startx,e-10,n.stopx,e)}(t,h.getVerticalPos());break;case o.parser.yy.LINETYPE.LOOP_START:x(C,t,d.boxMargin,d.boxMargin+d.boxTextMargin,(function(t){return h.newLoop(t)}));break;case o.parser.yy.LINETYPE.LOOP_END:e=h.endLoop(),i.default.drawLoop(r,e,"loop",d),h.bumpVerticalPos(e.stopy-h.getVerticalPos()),h.models.addLoop(e);break;case o.parser.yy.LINETYPE.RECT_START:x(C,t,d.boxMargin,d.boxMargin,(function(t){return h.newLoop(void 0,t.message)}));break;case o.parser.yy.LINETYPE.RECT_END:e=h.endLoop(),i.default.drawBackgroundRect(r,e),h.models.addLoop(e),h.bumpVerticalPos(e.stopy-h.getVerticalPos());break;case o.parser.yy.LINETYPE.OPT_START:x(C,t,d.boxMargin,d.boxMargin+d.boxTextMargin,(function(t){return h.newLoop(t)}));break;case o.parser.yy.LINETYPE.OPT_END:e=h.endLoop(),i.default.drawLoop(r,e,"opt",d),h.bumpVerticalPos(e.stopy-h.getVerticalPos()),h.models.addLoop(e);break;case o.parser.yy.LINETYPE.ALT_START:x(C,t,d.boxMargin,d.boxMargin+d.boxTextMargin,(function(t){return h.newLoop(t)}));break;case o.parser.yy.LINETYPE.ALT_ELSE:x(C,t,d.boxMargin+d.boxTextMargin,d.boxMargin,(function(t){return h.addSectionToLoop(t)}));break;case o.parser.yy.LINETYPE.ALT_END:e=h.endLoop(),i.default.drawLoop(r,e,"alt",d),h.bumpVerticalPos(e.stopy-h.getVerticalPos()),h.models.addLoop(e);break;case o.parser.yy.LINETYPE.PAR_START:x(C,t,d.boxMargin,d.boxMargin+d.boxTextMargin,(function(t){return h.newLoop(t)}));break;case o.parser.yy.LINETYPE.PAR_AND:x(C,t,d.boxMargin+d.boxTextMargin,d.boxMargin,(function(t){return h.addSectionToLoop(t)}));break;case o.parser.yy.LINETYPE.PAR_END:e=h.endLoop(),i.default.drawLoop(r,e,"par",d),h.bumpVerticalPos(e.stopy-h.getVerticalPos()),h.models.addLoop(e);break;default:try{(l=t.msgModel).starty=h.getVerticalPos(),l.sequenceIndex=T,function(t,e){h.bumpVerticalPos(10);var r=e.startx,n=e.stopx,a=e.starty,l=e.message,p=e.type,g=e.sequenceIndex,y=e.wrap,m=s.default.splitBreaks(l).length,v=u.default.calculateTextDimensions(l,f(d)),b=v.height/m;e.height+=b,h.bumpVerticalPos(b);var x=i.default.getTextObj();x.x=r,x.y=a+10,x.width=n-r,x.class="messageText",x.dy="1em",x.text=l,x.fontFamily=d.messageFontFamily,x.fontSize=d.messageFontSize,x.fontWeight=d.messageFontWeight,x.anchor=d.messageAlign,x.valign=d.messageAlign,x.textMargin=d.wrapPadding,x.tspan=!1,x.wrap=y,Object(i.drawText)(t,x);var k,w,_=v.height-10,E=v.width;if(r===n){w=h.getVerticalPos()+_,d.rightAngles?k=t.append("path").attr("d","M  ".concat(r,",").concat(w," H ").concat(r+Math.max(d.width/2,E/2)," V ").concat(w+25," H ").concat(r)):(_+=d.boxMargin,w=h.getVerticalPos()+_,k=t.append("path").attr("d","M "+r+","+w+" C "+(r+60)+","+(w-10)+" "+(r+60)+","+(w+30)+" "+r+","+(w+20))),_+=30;var C=Math.max(E/2,d.width/2);h.insert(r-C,h.getVerticalPos()-10+_,n+C,h.getVerticalPos()+30+_)}else _+=d.boxMargin,w=h.getVerticalPos()+_,(k=t.append("line")).attr("x1",r),k.attr("y1",w),k.attr("x2",n),k.attr("y2",w),h.insert(r,w-10,n,w);p===o.parser.yy.LINETYPE.DOTTED||p===o.parser.yy.LINETYPE.DOTTED_CROSS||p===o.parser.yy.LINETYPE.DOTTED_OPEN?(k.style("stroke-dasharray","3, 3"),k.attr("class","messageLine1")):k.attr("class","messageLine0");var T="";d.arrowMarkerAbsolute&&(T=(T=(T=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),k.attr("stroke-width",2),k.attr("stroke","none"),k.style("fill","none"),p!==o.parser.yy.LINETYPE.SOLID&&p!==o.parser.yy.LINETYPE.DOTTED||k.attr("marker-end","url("+T+"#arrowhead)"),p!==o.parser.yy.LINETYPE.SOLID_CROSS&&p!==o.parser.yy.LINETYPE.DOTTED_CROSS||k.attr("marker-end","url("+T+"#crosshead)"),(c.default.showSequenceNumbers()||d.showSequenceNumbers)&&(k.attr("marker-start","url("+T+"#sequencenumber)"),t.append("text").attr("x",r).attr("y",w+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("textLength","16px").attr("class","sequenceNumber").text(g)),h.bumpVerticalPos(_),e.height+=_,e.stopy=e.starty+e.height,h.insert(e.fromBounds,e.starty,e.toBounds,e.stopy)}(r,l),h.models.addMessage(l)}catch(t){a.logger.error("error while drawing message",t)}}[o.parser.yy.LINETYPE.SOLID_OPEN,o.parser.yy.LINETYPE.DOTTED_OPEN,o.parser.yy.LINETYPE.SOLID,o.parser.yy.LINETYPE.DOTTED,o.parser.yy.LINETYPE.SOLID_CROSS,o.parser.yy.LINETYPE.DOTTED_CROSS].includes(t.type)&&T++})),d.mirrorActors&&(h.bumpVerticalPos(2*d.boxMargin),y(r,p,g,h.getVerticalPos()));var O=h.getBounds().bounds;a.logger.debug("For line height fix Querying: #"+e+" .actor-line"),Object(n.selectAll)("#"+e+" .actor-line").attr("y2",O.stopy);var S=O.stopy-O.starty+2*d.diagramMarginY;d.mirrorActors&&(S=S-d.boxMargin+d.bottomMarginAdj);var A=O.stopx-O.startx+2*d.diagramMarginX;b&&r.append("text").text(b).attr("x",(O.stopx-O.startx)/2-2*d.diagramMarginX).attr("y",-25),d.useMaxWidth?(r.attr("height","100%"),r.attr("width","100%"),r.attr("style","max-width:"+A+"px;")):(r.attr("height",S),r.attr("width",A));var j=b?40:0;r.attr("viewBox",O.startx-d.diagramMarginX+" -"+(d.diagramMarginY+j)+" "+A+" "+(S+j)),a.logger.debug("models:",h.models)},w=function(t,e){var r={};return e.forEach((function(e){if(t[e.to]&&t[e.from]){var n=t[e.to];if(e.placement===o.parser.yy.PLACEMENT.LEFTOF&&!n.prevActor)return;if(e.placement===o.parser.yy.PLACEMENT.RIGHTOF&&!n.nextActor)return;var i=void 0!==e.placement,a=!i,s=i?p(d):f(d),c=e.wrap?u.default.wrapLabel(e.message,d.width-2*d.wrapPadding,s):e.message,l=u.default.calculateTextDimensions(c,s).width+2*d.wrapPadding;a&&e.from===n.nextActor?r[e.to]=Math.max(r[e.to]||0,l):a&&e.from===n.prevActor?r[e.from]=Math.max(r[e.from]||0,l):a&&e.from===e.to?(r[e.from]=Math.max(r[e.from]||0,l/2),r[e.to]=Math.max(r[e.to]||0,l/2)):e.placement===o.parser.yy.PLACEMENT.RIGHTOF?r[e.from]=Math.max(r[e.from]||0,l):e.placement===o.parser.yy.PLACEMENT.LEFTOF?r[n.prevActor]=Math.max(r[n.prevActor]||0,l):e.placement===o.parser.yy.PLACEMENT.OVER&&(n.prevActor&&(r[n.prevActor]=Math.max(r[n.prevActor]||0,l/2)),n.nextActor&&(r[e.from]=Math.max(r[e.from]||0,l/2)))}})),a.logger.debug("maxMessageWidthPerActor:",r),r},_=function(t,e){var r=0;for(var n in Object.keys(t).forEach((function(e){var n=t[e];n.wrap&&(n.description=u.default.wrapLabel(n.description,d.width-2*d.wrapPadding,g(d)));var i=u.default.calculateTextDimensions(n.description,g(d));n.width=n.wrap?d.width:Math.max(d.width,i.width+2*d.wrapPadding),n.height=n.wrap?Math.max(i.height,d.height):d.height,r=Math.max(r,n.height)})),e){var i=t[n];if(i){var a=t[i.nextActor];if(a){var o=e[n]+d.actorMargin-i.width/2-a.width/2;i.margin=Math.max(o,d.actorMargin)}}}return Math.max(r,d.height)},E=function(t,e){var r,n,i,s={},c=[];return t.forEach((function(t){switch(t.id=u.default.random({length:10}),t.type){case o.parser.yy.LINETYPE.LOOP_START:case o.parser.yy.LINETYPE.ALT_START:case o.parser.yy.LINETYPE.OPT_START:case o.parser.yy.LINETYPE.PAR_START:c.push({id:t.id,msg:t.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case o.parser.yy.LINETYPE.ALT_ELSE:case o.parser.yy.LINETYPE.PAR_AND:t.message&&(r=c.pop(),s[r.id]=r,s[t.id]=r,c.push(r));break;case o.parser.yy.LINETYPE.LOOP_END:case o.parser.yy.LINETYPE.ALT_END:case o.parser.yy.LINETYPE.OPT_END:case o.parser.yy.LINETYPE.PAR_END:r=c.pop(),s[r.id]=r;break;case o.parser.yy.LINETYPE.ACTIVE_START:var l=e[t.from?t.from.actor:t.to.actor],g=v(t.from?t.from.actor:t.to.actor).length,y=l.x+l.width/2+(g-1)*d.activationWidth/2,m={startx:y,stopx:y+d.activationWidth,actor:t.from.actor,enabled:!0};h.activations.push(m);break;case o.parser.yy.LINETYPE.ACTIVE_END:var x=h.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);delete h.activations.splice(x,1)[0]}void 0!==t.placement?(n=function(t,e){var r=e[t.from].x,n=e[t.to].x,i=t.wrap&&t.message,s=u.default.calculateTextDimensions(i?u.default.wrapLabel(t.message,d.width,p(d)):t.message,p(d)),c={width:i?d.width:Math.max(d.width,s.width+2*d.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===o.parser.yy.PLACEMENT.RIGHTOF?(c.width=i?Math.max(d.width,s.width):Math.max(e[t.from].width/2+e[t.to].width/2,s.width+2*d.noteMargin),c.startx=r+(e[t.from].width+d.actorMargin)/2):t.placement===o.parser.yy.PLACEMENT.LEFTOF?(c.width=i?Math.max(d.width,s.width+2*d.noteMargin):Math.max(e[t.from].width/2+e[t.to].width/2,s.width+2*d.noteMargin),c.startx=r-c.width+(e[t.from].width-d.actorMargin)/2):t.to===t.from?(s=u.default.calculateTextDimensions(i?u.default.wrapLabel(t.message,Math.max(d.width,e[t.from].width),p(d)):t.message,p(d)),c.width=i?Math.max(d.width,e[t.from].width):Math.max(e[t.from].width,d.width,s.width+2*d.noteMargin),c.startx=r+(e[t.from].width-c.width)/2):(c.width=Math.abs(r+e[t.from].width/2-(n+e[t.to].width/2))+d.actorMargin,c.startx=r<n?r+e[t.from].width/2-d.actorMargin/2:n+e[t.to].width/2-d.actorMargin/2),i&&(c.message=u.default.wrapLabel(t.message,c.width-2*d.wrapPadding,p(d))),a.logger.debug("NM:[".concat(c.startx,",").concat(c.stopx,",").concat(c.starty,",").concat(c.stopy,":").concat(c.width,",").concat(c.height,"=").concat(t.message,"]")),c}(t,e),t.noteModel=n,c.forEach((function(t){(r=t).from=Math.min(r.from,n.startx),r.to=Math.max(r.to,n.startx+n.width),r.width=Math.max(r.width,Math.abs(r.from-r.to))-d.labelBoxWidth}))):(i=function(t,e){var r=!1;if([o.parser.yy.LINETYPE.SOLID_OPEN,o.parser.yy.LINETYPE.DOTTED_OPEN,o.parser.yy.LINETYPE.SOLID,o.parser.yy.LINETYPE.DOTTED,o.parser.yy.LINETYPE.SOLID_CROSS,o.parser.yy.LINETYPE.DOTTED_CROSS].includes(t.type)&&(r=!0),!r)return{};var n=b(t.from,e),i=b(t.to,e),a=n[0]<=i[0]?1:0,s=n[0]<i[0]?0:1,c=n.concat(i),l=Math.abs(i[s]-n[a]),h=u.default.calculateTextDimensions(t.message,f(d));return t.wrap&&t.message&&(t.message=u.default.wrapLabel(t.message,Math.max(l+2*d.wrapPadding,d.width),f(d))),{width:Math.max(t.wrap?0:h.width+2*d.wrapPadding,l+2*d.wrapPadding,d.width),height:0,startx:n[a],stopx:i[s],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,c),toBounds:Math.max.apply(null,c)}}(t,e),t.msgModel=i,i.startx&&i.stopx&&c.length>0&&c.forEach((function(n){if(r=n,i.startx===i.stopx){var a=e[t.from],o=e[t.to];r.from=Math.min(a.x-i.width/2,a.x-a.width/2,r.from),r.to=Math.max(o.x+i.width/2,o.x+a.width/2,r.to),r.width=Math.max(r.width,Math.abs(r.to-r.from))-d.labelBoxWidth}else r.from=Math.min(i.startx,r.from),r.to=Math.max(i.stopx,r.to),r.width=Math.max(r.width,i.width)-d.labelBoxWidth})))})),h.activations=[],a.logger.debug("Loop type widths:",s),s};e.default={bounds:h,drawActors:y,setConf:m,draw:k}},"./src/diagrams/sequence/styles.js":function(t,e,r){"use strict";r.r(e),e.default=function(t){return".actor {\n    stroke: ".concat(t.actorBorder,";\n    fill: ").concat(t.actorBkg,";\n  }\n\n  text.actor > tspan {\n    fill: ").concat(t.actorTextColor,";\n    stroke: none;\n  }\n\n  .actor-line {\n    stroke: ").concat(t.actorLineColor,";\n  }\n\n  .messageLine0 {\n    stroke-width: 1.5;\n    stroke-dasharray: none;\n    stroke: ").concat(t.signalColor,";\n  }\n\n  .messageLine1 {\n    stroke-width: 1.5;\n    stroke-dasharray: 2, 2;\n    stroke: ").concat(t.signalColor,";\n  }\n\n  #arrowhead path {\n    fill: ").concat(t.signalColor,";\n    stroke: ").concat(t.signalColor,";\n  }\n\n  .sequenceNumber {\n    fill: ").concat(t.sequenceNumberColor,";\n  }\n\n  #sequencenumber {\n    fill: ").concat(t.signalColor,";\n  }\n\n  #crosshead path {\n    fill: ").concat(t.signalColor,";\n    stroke: ").concat(t.signalColor,";\n  }\n\n  .messageText {\n    fill: ").concat(t.signalTextColor,";\n    stroke: ").concat(t.signalTextColor,";\n  }\n\n  .labelBox {\n    stroke: ").concat(t.labelBoxBorderColor,";\n    fill: ").concat(t.labelBoxBkgColor,";\n  }\n\n  .labelText, .labelText > tspan {\n    fill: ").concat(t.labelTextColor,";\n    stroke: none;\n  }\n\n  .loopText, .loopText > tspan {\n    fill: ").concat(t.loopTextColor,";\n    stroke: none;\n  }\n\n  .loopLine {\n    stroke-width: 2px;\n    stroke-dasharray: 2, 2;\n    stroke: ").concat(t.labelBoxBorderColor,";\n    fill: ").concat(t.labelBoxBorderColor,";\n  }\n\n  .note {\n    //stroke: #decc93;\n    stroke: ").concat(t.noteBorderColor,";\n    fill: ").concat(t.noteBkgColor,";\n  }\n\n  .noteText, .noteText > tspan {\n    fill: ").concat(t.noteTextColor,";\n    stroke: none;\n  }\n\n  .activation0 {\n    fill: ").concat(t.activationBkgColor,";\n    stroke: ").concat(t.activationBorderColor,";\n  }\n\n  .activation1 {\n    fill: ").concat(t.activationBkgColor,";\n    stroke: ").concat(t.activationBorderColor,";\n  }\n\n  .activation2 {\n    fill: ").concat(t.activationBkgColor,";\n    stroke: ").concat(t.activationBorderColor,";\n  }\n")}},"./src/diagrams/sequence/svgDraw.js":function(t,e,r){"use strict";r.r(e),r.d(e,"drawRect",(function(){return i})),r.d(e,"drawText",(function(){return a})),r.d(e,"drawLabel",(function(){return o})),r.d(e,"drawActor",(function(){return c})),r.d(e,"anchorElement",(function(){return l})),r.d(e,"drawActivation",(function(){return u})),r.d(e,"drawLoop",(function(){return d})),r.d(e,"drawBackgroundRect",(function(){return h})),r.d(e,"insertArrowHead",(function(){return f})),r.d(e,"insertSequenceNumber",(function(){return p})),r.d(e,"insertArrowCrossHead",(function(){return g})),r.d(e,"getTextObj",(function(){return y})),r.d(e,"getNoteRect",(function(){return m}));var n=r("./src/diagrams/common/common.js"),i=function(t,e){var r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),void 0!==e.class&&r.attr("class",e.class),r},a=function(t,e){var r=0,i=0,a=e.wrap?e.text.split(n.default.lineBreakRegex):[e.text.replace(n.default.lineBreakRegex," ")],o=[],s=0,c=function(){return e.y};if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":c=function(){return Math.round(e.y+e.textMargin)};break;case"middle":case"center":c=function(){return Math.round(e.y+(r+i+e.textMargin)/2)};break;case"bottom":case"end":c=function(){return Math.round(e.y+(r+i+2*e.textMargin)-e.textMargin)}}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="text-after-edge",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="text-before-edge",e.alignmentBaseline="middle"}for(var l=0;l<a.length;l++){var u=a[l];void 0!==e.textMargin&&0===e.textMargin&&void 0!==e.fontSize&&(s=l*e.fontSize);var d=t.append("text");if(d.attr("x",e.x),d.attr("y",c()),void 0!==e.anchor&&d.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&d.style("font-family",e.fontFamily),void 0!==e.fontSize&&d.style("font-size",e.fontSize),void 0!==e.fontWeight&&d.style("font-weight",e.fontWeight),void 0!==e.fill&&d.attr("fill",e.fill),void 0!==e.class&&d.attr("class",e.class),void 0!==e.dy?d.attr("dy",e.dy):0!==s&&d.attr("dy",s),e.tspan){var h=d.append("tspan");h.attr("x",e.x),void 0!==e.fill&&h.attr("fill",e.fill),h.text(u)}else d.text(u);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(i+=(d._groups||d)[0][0].getBBox().height,r=i),o.push(d)}return o},o=function(t,e){var r,n,i,o,s,c=t.append("polygon");return c.attr("points",(r=e.x,n=e.y,i=e.width,o=e.height,r+","+n+" "+(r+i)+","+n+" "+(r+i)+","+(n+o-(s=7))+" "+(r+i-1.2*s)+","+(n+o)+" "+r+","+(n+o))),c.attr("class","labelBox"),e.y=e.y+e.height/2,a(t,e),c},s=-1,c=function(t,e,r){var n=e.x+e.width/2,a=t.append("g");0===e.y&&(s++,a.append("line").attr("id","actor"+s).attr("x1",n).attr("y1",5).attr("x2",n).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));var o=m();o.x=e.x,o.y=e.y,o.fill="#eaeaea",o.width=e.width,o.height=e.height,o.class="actor",o.rx=3,o.ry=3,i(a,o),v(r)(e.description,a,o.x,o.y,o.width,o.height,{class:"actor"},r)},l=function(t){return t.append("g")},u=function(t,e,r,n,a){var o=m(),s=e.anchored;o.x=e.startx,o.y=e.starty,o.class="activation"+a%3,o.width=e.stopx-e.startx,o.height=r-e.starty,i(s,o)},d=function(t,e,r,n){var i=n.boxMargin,s=n.boxTextMargin,c=n.labelBoxHeight,l=n.labelBoxWidth,u=n.messageFontFamily,d=n.messageFontSize,h=n.messageFontWeight,f=t.append("g"),p=function(t,e,r,n){return f.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",n).attr("class","loopLine")};p(e.startx,e.starty,e.stopx,e.starty),p(e.stopx,e.starty,e.stopx,e.stopy),p(e.startx,e.stopy,e.stopx,e.stopy),p(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){p(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));var g=y();g.text=r,g.x=e.startx,g.y=e.starty,g.fontFamily=u,g.fontSize=d,g.fontWeight=h,g.anchor="middle",g.valign="middle",g.tspan=!1,g.width=l||50,g.height=c||20,g.textMargin=s,g.class="labelText",o(f,g),(g=y()).text=e.title,g.x=e.startx+l/2+(e.stopx-e.startx)/2,g.y=e.starty+i+s,g.anchor="middle",g.valign="middle",g.textMargin=s,g.class="loopText",g.fontFamily=u,g.fontSize=d,g.fontWeight=h,g.wrap=!0;var m=a(f,g);return void 0!==e.sectionTitles&&e.sectionTitles.forEach((function(t,r){if(t.message){g.text=t.message,g.x=e.startx+(e.stopx-e.startx)/2,g.y=e.sections[r].y+i+s,g.class="loopText",g.anchor="middle",g.valign="middle",g.tspan=!1,g.fontFamily=u,g.fontSize=d,g.fontWeight=h,g.wrap=e.wrap,m=a(f,g);var n=Math.round(m.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));e.sections[r].height+=n-(i+s)}})),e.height=Math.round(e.stopy-e.starty),f},h=function(t,e){i(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},f=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")},p=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},g=function(t){var e=t.append("defs").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")},y=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},m=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},v=function(){function t(t,e,r,n,a,o,s){i(e.append("text").attr("x",r+a/2).attr("y",n+o/2+5).style("text-anchor","middle").text(t),s)}function e(t,e,r,a,o,s,c,l){for(var u=l.actorFontSize,d=l.actorFontFamily,h=l.actorFontWeight,f=t.split(n.default.lineBreakRegex),p=0;p<f.length;p++){var g=p*u-u*(f.length-1)/2,y=e.append("text").attr("x",r+o/2).attr("y",a).style("text-anchor","middle").style("font-size",u).style("font-weight",h).style("font-family",d);y.append("tspan").attr("x",r+o/2).attr("dy",g).text(f[p]),y.attr("y",a+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(y,c)}}function r(t,r,n,a,o,s,c,l){var u=r.append("switch"),d=u.append("foreignObject").attr("x",n).attr("y",a).attr("width",o).attr("height",s).append("div").style("display","table").style("height","100%").style("width","100%");d.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,u,n,a,o,s,c,l),i(d,c)}function i(t,e){for(var r in e)e.hasOwnProperty(r)&&t.attr(r,e[r])}return function(n){return"fo"===n.textPlacement?r:"old"===n.textPlacement?t:e}}();e.default={drawRect:i,drawText:a,drawLabel:o,drawActor:c,anchorElement:l,drawActivation:u,drawLoop:d,drawBackgroundRect:h,insertArrowHead:f,insertSequenceNumber:p,insertArrowCrossHead:g,getTextObj:y,getNoteRect:m}},"./src/diagrams/state/id-cache.js":function(t,e,r){"use strict";r.r(e),r.d(e,"set",(function(){return i})),r.d(e,"get",(function(){return a})),r.d(e,"keys",(function(){return o})),r.d(e,"size",(function(){return s}));var n={},i=function(t,e){n[t]=e},a=function(t){return n[t]},o=function(){return Object.keys(n)},s=function(){return o().length};e.default={get:a,set:i,keys:o,size:s}},"./src/diagrams/state/parser/stateDiagram.jison":function(t,e,r){(function(t,n){var i=function(){var t=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},e=[1,2],r=[1,3],n=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,19],l=[1,20],u=[1,21],d=[1,22],h=[1,28],f=[1,23],p=[1,24],g=[1,25],y=[1,26],m=[1,29],v=[1,32],b=[1,4,5,14,15,17,19,20,22,23,24,25,26,36,39],x=[1,4,5,12,13,14,15,17,19,20,22,23,24,25,26,36,39],k=[1,4,5,7,14,15,17,19,20,22,23,24,25,26,36,39],w=[4,5,14,15,17,19,20,22,23,24,25,26,36,39],_={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,idStatement:11,DESCR:12,"--\x3e":13,HIDE_EMPTY:14,scale:15,WIDTH:16,COMPOSIT_STATE:17,STRUCT_START:18,STRUCT_STOP:19,STATE_DESCR:20,AS:21,ID:22,FORK:23,JOIN:24,CONCURRENT:25,note:26,notePosition:27,NOTE_TEXT:28,openDirective:29,typeDirective:30,closeDirective:31,":":32,argDirective:33,eol:34,";":35,EDGE_STATE:36,left_of:37,right_of:38,open_directive:39,type_directive:40,arg_directive:41,close_directive:42,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",12:"DESCR",13:"--\x3e",14:"HIDE_EMPTY",15:"scale",16:"WIDTH",17:"COMPOSIT_STATE",18:"STRUCT_START",19:"STRUCT_STOP",20:"STATE_DESCR",21:"AS",22:"ID",23:"FORK",24:"JOIN",25:"CONCURRENT",26:"note",28:"NOTE_TEXT",32:":",35:";",36:"EDGE_STATE",37:"left_of",38:"right_of",39:"open_directive",40:"type_directive",41:"arg_directive",42:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[6,3],[6,5],[34,1],[34,1],[11,1],[11,1],[27,1],[27,1],[29,1],[30,1],[33,1],[31,1]],performAction:function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 4:return n.setRootDoc(a[s]),a[s];case 5:this.$=[];break;case 6:"nl"!=a[s]&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 7:case 8:this.$=a[s];break;case 9:this.$="nl";break;case 10:this.$={stmt:"state",id:a[s],type:"default",description:""};break;case 11:this.$={stmt:"state",id:a[s-1],type:"default",description:n.trimColon(a[s])};break;case 12:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-2],type:"default",description:""},state2:{stmt:"state",id:a[s],type:"default",description:""}};break;case 13:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-3],type:"default",description:""},state2:{stmt:"state",id:a[s-1],type:"default",description:""},description:a[s].substr(1).trim()};break;case 17:this.$={stmt:"state",id:a[s-3],type:"default",description:"",doc:a[s-1]};break;case 18:var c=a[s],l=a[s-2].trim();if(a[s].match(":")){var u=a[s].split(":");c=u[0],l=[l,u[1]]}this.$={stmt:"state",id:c,type:"default",description:l};break;case 19:this.$={stmt:"state",id:a[s-3],type:"default",description:a[s-5],doc:a[s-1]};break;case 20:this.$={stmt:"state",id:a[s],type:"fork"};break;case 21:this.$={stmt:"state",id:a[s],type:"join"};break;case 22:this.$={stmt:"state",id:n.getDividerId(),type:"divider"};break;case 23:this.$={stmt:"state",id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 30:case 31:this.$=a[s];break;case 34:n.parseDirective("%%{","open_directive");break;case 35:n.parseDirective(a[s],"type_directive");break;case 36:a[s]=a[s].trim().replace(/'/g,'"'),n.parseDirective(a[s],"arg_directive");break;case 37:n.parseDirective("}%%","close_directive","state")}},table:[{3:1,4:e,5:r,6:4,7:n,29:6,39:i},{1:[3]},{3:8,4:e,5:r,6:4,7:n,29:6,39:i},{3:9,4:e,5:r,6:4,7:n,29:6,39:i},{3:10,4:e,5:r,6:4,7:n,29:6,39:i},t([1,4,5,14,15,17,20,22,23,24,25,26,36,39],a,{8:11}),{30:12,40:[1,13]},{40:[2,34]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:27,9:14,10:16,11:18,14:c,15:l,17:u,20:d,22:h,23:f,24:p,25:g,26:y,29:6,36:m,39:i},{31:30,32:[1,31],42:v},t([32,42],[2,35]),t(b,[2,6]),{6:27,10:33,11:18,14:c,15:l,17:u,20:d,22:h,23:f,24:p,25:g,26:y,29:6,36:m,39:i},t(b,[2,8]),t(b,[2,9]),t(b,[2,10],{12:[1,34],13:[1,35]}),t(b,[2,14]),{16:[1,36]},t(b,[2,16],{18:[1,37]}),{21:[1,38]},t(b,[2,20]),t(b,[2,21]),t(b,[2,22]),{27:39,28:[1,40],37:[1,41],38:[1,42]},t(b,[2,25]),t(x,[2,30]),t(x,[2,31]),t(k,[2,26]),{33:43,41:[1,44]},t(k,[2,37]),t(b,[2,7]),t(b,[2,11]),{11:45,22:h,36:m},t(b,[2,15]),t(w,a,{8:46}),{22:[1,47]},{22:[1,48]},{21:[1,49]},{22:[2,32]},{22:[2,33]},{31:50,42:v},{42:[2,36]},t(b,[2,12],{12:[1,51]}),{4:o,5:s,6:27,9:14,10:16,11:18,14:c,15:l,17:u,19:[1,52],20:d,22:h,23:f,24:p,25:g,26:y,29:6,36:m,39:i},t(b,[2,18],{18:[1,53]}),{28:[1,54]},{22:[1,55]},t(k,[2,27]),t(b,[2,13]),t(b,[2,17]),t(w,a,{8:56}),t(b,[2,23]),t(b,[2,24]),{4:o,5:s,6:27,9:14,10:16,11:18,14:c,15:l,17:u,19:[1,57],20:d,22:h,23:f,24:p,25:g,26:y,29:6,36:m,39:i},t(b,[2,19])],defaultActions:{7:[2,34],8:[2,1],9:[2,2],10:[2,3],41:[2,32],42:[2,33],44:[2,36]},parseError:function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},parse:function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=0,d=2,h=1,f=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=n.pop()||p.lex()||h)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,w,_,E,C,T,O,S,A={};;){if(w=r[r.length-1],this.defaultActions[w]?_=this.defaultActions[w]:(null==x&&(x=b()),_=o[w]&&o[w][x]),void 0===_||!_.length||!_[0]){var j="";for(C in S=[],o[w])this.terminals_[C]&&C>d&&S.push("'"+this.terminals_[C]+"'");j=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(j,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(_[0]){case 1:r.push(x),i.push(p.yytext),a.push(p.yylloc),r.push(_[1]),x=null,k?(x=k,k=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(T=this.productions_[_[1]][1],A.$=i[i.length-T],A._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},v&&(A._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(A,[s,l,c,g.yy,_[1],i,a].concat(f))))return E;T&&(r=r.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),r.push(this.productions_[_[1]][0]),i.push(A.$),a.push(A._$),O=o[r[r.length-2]][r[r.length-1]],r.push(O);break;case 3:return!0}}return!0}},E={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||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];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(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 e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),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(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,r,n){switch(r){case 0:return this.begin("open_directive"),39;case 1:return this.begin("type_directive"),40;case 2:return this.popState(),this.begin("arg_directive"),32;case 3:return this.popState(),this.popState(),42;case 4:return 41;case 5:break;case 6:console.log("Crap after close");break;case 7:return 5;case 8:case 9:case 10:case 11:break;case 12:return this.pushState("SCALE"),15;case 13:return 16;case 14:this.popState();break;case 15:this.pushState("STATE");break;case 16:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 17:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 18:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 19:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 20:this.begin("STATE_STRING");break;case 21:return this.popState(),this.pushState("STATE_ID"),"AS";case 22:return this.popState(),"ID";case 23:this.popState();break;case 24:return"STATE_DESCR";case 25:return 17;case 26:this.popState();break;case 27:return this.popState(),this.pushState("struct"),18;case 28:return this.popState(),19;case 29:break;case 30:return this.begin("NOTE"),26;case 31:return this.popState(),this.pushState("NOTE_ID"),37;case 32:return this.popState(),this.pushState("NOTE_ID"),38;case 33:this.popState(),this.pushState("FLOATING_NOTE");break;case 34:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 35:break;case 36:return"NOTE_TEXT";case 37:return this.popState(),"ID";case 38:return this.popState(),this.pushState("NOTE_TEXT"),22;case 39:return this.popState(),e.yytext=e.yytext.substr(2).trim(),28;case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),28;case 41:case 42:return 7;case 43:return 14;case 44:return 36;case 45:return 22;case 46:return e.yytext=e.yytext.trim(),12;case 47:return 13;case 48:return 25;case 49:return 5;case 50:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:\s*[^:;]+end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},close_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[3,4,9,10],inclusive:!1},type_directive:{rules:[2,3,9,10],inclusive:!1},open_directive:{rules:[1,9,10],inclusive:!1},struct:{rules:[9,10,15,28,29,30,44,45,46,47,48],inclusive:!1},FLOATING_NOTE_ID:{rules:[37],inclusive:!1},FLOATING_NOTE:{rules:[34,35,36],inclusive:!1},NOTE_TEXT:{rules:[39,40],inclusive:!1},NOTE_ID:{rules:[38],inclusive:!1},NOTE:{rules:[31,32,33],inclusive:!1},SCALE:{rules:[13,14],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[22],inclusive:!1},STATE_STRING:{rules:[23,24],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,16,17,18,19,20,21,25,26,27],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,10,11,12,15,27,30,41,42,43,44,45,46,47,49,50],inclusive:!0}}};function C(){this.yy={}}return _.lexer=E,C.prototype=_,_.Parser=C,new C}();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"),t.exit(1));var i=r("./node_modules/node-libs-browser/mock/empty.js").readFileSync(r("./node_modules/path-browserify/index.js").normalize(n[1]),"utf8");return e.parser.parse(i)},r.c[r.s]===n&&e.main(t.argv.slice(1))}).call(this,r("./node_modules/process/browser.js"),r("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/state/shapes.js":function(t,e,r){"use strict";r.r(e),r.d(e,"drawStartState",(function(){return u})),r.d(e,"drawDivider",(function(){return d})),r.d(e,"drawSimpleState",(function(){return h})),r.d(e,"drawDescrState",(function(){return f})),r.d(e,"addTitleAndBox",(function(){return p})),r.d(e,"drawText",(function(){return g})),r.d(e,"drawNote",(function(){return y})),r.d(e,"drawState",(function(){return m})),r.d(e,"drawEdge",(function(){return b}));var n=r("d3"),i=r("./src/diagrams/state/id-cache.js"),a=r("./src/diagrams/state/stateDb.js"),o=r("./src/utils.js"),s=r("./src/diagrams/common/common.js"),c=r("./src/config.js"),l=r("./src/logger.js"),u=function(t){return t.append("circle").attr("class","start-state").attr("r",Object(c.getConfig)().state.sizeUnit).attr("cx",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit).attr("cy",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit)},d=function(t){return t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",Object(c.getConfig)().state.textHeight).attr("class","divider").attr("x2",2*Object(c.getConfig)().state.textHeight).attr("y1",0).attr("y2",0)},h=function(t,e){var r=t.append("text").attr("x",2*Object(c.getConfig)().state.padding).attr("y",Object(c.getConfig)().state.textHeight+2*Object(c.getConfig)().state.padding).attr("font-size",Object(c.getConfig)().state.fontSize).attr("class","state-title").text(e.id),n=r.node().getBBox();return t.insert("rect",":first-child").attr("x",Object(c.getConfig)().state.padding).attr("y",Object(c.getConfig)().state.padding).attr("width",n.width+2*Object(c.getConfig)().state.padding).attr("height",n.height+2*Object(c.getConfig)().state.padding).attr("rx",Object(c.getConfig)().state.radius),r},f=function(t,e){var r=t.append("text").attr("x",2*Object(c.getConfig)().state.padding).attr("y",Object(c.getConfig)().state.textHeight+1.3*Object(c.getConfig)().state.padding).attr("font-size",Object(c.getConfig)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),n=r.height,i=t.append("text").attr("x",Object(c.getConfig)().state.padding).attr("y",n+.4*Object(c.getConfig)().state.padding+Object(c.getConfig)().state.dividerMargin+Object(c.getConfig)().state.textHeight).attr("class","state-description"),a=!0,o=!0;e.descriptions.forEach((function(t){a||(function(t,e,r){var n=t.append("tspan").attr("x",2*Object(c.getConfig)().state.padding).text(e);r||n.attr("dy",Object(c.getConfig)().state.textHeight)}(i,t,o),o=!1),a=!1}));var s=t.append("line").attr("x1",Object(c.getConfig)().state.padding).attr("y1",Object(c.getConfig)().state.padding+n+Object(c.getConfig)().state.dividerMargin/2).attr("y2",Object(c.getConfig)().state.padding+n+Object(c.getConfig)().state.dividerMargin/2).attr("class","descr-divider"),l=i.node().getBBox(),u=Math.max(l.width,r.width);return s.attr("x2",u+3*Object(c.getConfig)().state.padding),t.insert("rect",":first-child").attr("x",Object(c.getConfig)().state.padding).attr("y",Object(c.getConfig)().state.padding).attr("width",u+2*Object(c.getConfig)().state.padding).attr("height",l.height+n+2*Object(c.getConfig)().state.padding).attr("rx",Object(c.getConfig)().state.radius),t},p=function(t,e,r){var n,i=Object(c.getConfig)().state.padding,a=2*Object(c.getConfig)().state.padding,o=t.node().getBBox(),s=o.width,l=o.x,u=t.append("text").attr("x",0).attr("y",Object(c.getConfig)().state.titleShift).attr("font-size",Object(c.getConfig)().state.fontSize).attr("class","state-title").text(e.id),d=u.node().getBBox().width+a,h=Math.max(d,s);h===s&&(h+=a);var f=t.node().getBBox();e.doc,n=l-i,d>s&&(n=(s-h)/2+i),Math.abs(l-f.x)<i&&d>s&&(n=l-(d-s)/2);var p=1-Object(c.getConfig)().state.textHeight;return t.insert("rect",":first-child").attr("x",n).attr("y",p).attr("class",r?"alt-composit":"composit").attr("width",h).attr("height",f.height+Object(c.getConfig)().state.textHeight+Object(c.getConfig)().state.titleShift+1).attr("rx","0"),u.attr("x",n+i),d<=s&&u.attr("x",l+(h-a)/2-d/2+i),t.insert("rect",":first-child").attr("x",n).attr("y",Object(c.getConfig)().state.titleShift-Object(c.getConfig)().state.textHeight-Object(c.getConfig)().state.padding).attr("width",h).attr("height",3*Object(c.getConfig)().state.textHeight).attr("rx",Object(c.getConfig)().state.radius),t.insert("rect",":first-child").attr("x",n).attr("y",Object(c.getConfig)().state.titleShift-Object(c.getConfig)().state.textHeight-Object(c.getConfig)().state.padding).attr("width",h).attr("height",f.height+3+2*Object(c.getConfig)().state.textHeight).attr("rx",Object(c.getConfig)().state.radius),t},g=function(t,e){var r=e.text.replace(s.default.lineBreakRegex," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.style("text-anchor",e.anchor),n.attr("fill",e.fill),void 0!==e.class&&n.attr("class",e.class);var i=n.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.attr("fill",e.fill),i.text(r),n},y=function(t,e){e.attr("class","state-note");var r=e.append("rect").attr("x",0).attr("y",Object(c.getConfig)().state.padding),n=function(t,e,r,n){var i=0,a=n.append("text");a.style("text-anchor","start"),a.attr("class","noteText");var o=t.replace(/\r\n/g,"<br/>"),l=(o=o.replace(/\n/g,"<br/>")).split(s.default.lineBreakRegex),u=1.25*Object(c.getConfig)().state.noteMargin,d=!0,h=!1,f=void 0;try{for(var p,g=l[Symbol.iterator]();!(d=(p=g.next()).done);d=!0){var y=p.value.trim();if(y.length>0){var m=a.append("tspan");m.text(y),0===u&&(u+=m.node().getBBox().height),i+=u,m.attr("x",e+Object(c.getConfig)().state.noteMargin),m.attr("y",r+i+1.25*Object(c.getConfig)().state.noteMargin)}}}catch(t){h=!0,f=t}finally{try{d||null==g.return||g.return()}finally{if(h)throw f}}return{textWidth:a.node().getBBox().width,textHeight:i}}(t,0,0,e.append("g")),i=n.textWidth,a=n.textHeight;return r.attr("height",a+2*Object(c.getConfig)().state.noteMargin),r.attr("width",i+2*Object(c.getConfig)().state.noteMargin),r},m=function(t,e){var r=e.id,n={id:r,label:e.id,width:0,height:0},a=t.append("g").attr("id",r).attr("class","stateGroup");"start"===e.type&&u(a),"end"===e.type&&function(t){t.append("circle").attr("class","end-state-outer").attr("r",Object(c.getConfig)().state.sizeUnit+Object(c.getConfig)().state.miniPadding).attr("cx",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit+Object(c.getConfig)().state.miniPadding).attr("cy",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit+Object(c.getConfig)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",Object(c.getConfig)().state.sizeUnit).attr("cx",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit+2).attr("cy",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit+2)}(a),"fork"!==e.type&&"join"!==e.type||function(t,e){var r=Object(c.getConfig)().state.forkWidth,n=Object(c.getConfig)().state.forkHeight;if(e.parentId){var i=r;r=n,n=i}t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",Object(c.getConfig)().state.padding).attr("y",Object(c.getConfig)().state.padding)}(a,e),"note"===e.type&&y(e.note.text,a),"divider"===e.type&&d(a),"default"===e.type&&0===e.descriptions.length&&h(a,e),"default"===e.type&&e.descriptions.length>0&&f(a,e);var o=a.node().getBBox();return n.width=o.width+2*Object(c.getConfig)().state.padding,n.height=o.height+2*Object(c.getConfig)().state.padding,i.default.set(r,n),n},v=0,b=function(t,e,r){e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var i=e.points,u=Object(n.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(n.curveBasis),d=t.append("path").attr("d",u(i)).attr("id","edge"+v).attr("class","transition"),h="";if(Object(c.getConfig)().state.arrowMarkerAbsolute&&(h=(h=(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),d.attr("marker-end","url("+h+"#"+function(t){switch(t){case a.default.relationType.AGGREGATION:return"aggregation";case a.default.relationType.EXTENSION:return"extension";case a.default.relationType.COMPOSITION:return"composition";case a.default.relationType.DEPENDENCY:return"dependency"}}(a.default.relationType.DEPENDENCY)+"End)"),void 0!==r.title){for(var f=t.append("g").attr("class","stateLabel"),p=o.default.calcLabelPosition(e.points),g=p.x,y=p.y,m=s.default.getRows(r.title),b=0,x=[],k=0,w=0,_=0;_<=m.length;_++){var E=f.append("text").attr("text-anchor","middle").text(m[_]).attr("x",g).attr("y",y+b),C=E.node().getBBox();if(k=Math.max(k,C.width),w=Math.min(w,C.x),l.logger.info(C.x,g,y+b),0===b){var T=E.node().getBBox();b=T.height,l.logger.info("Title height",b,y)}x.push(E)}var O=b*m.length;if(m.length>1){var S=(m.length-1)*b*.5;x.forEach((function(t,e){return t.attr("y",y+e*b-S)})),O=b*m.length}var A=f.node().getBBox();f.insert("rect",":first-child").attr("class","box").attr("x",g-k/2-Object(c.getConfig)().state.padding/2).attr("y",y-O/2-Object(c.getConfig)().state.padding/2-3.5).attr("width",k+Object(c.getConfig)().state.padding).attr("height",O+Object(c.getConfig)().state.padding),l.logger.info(A)}v++}},"./src/diagrams/state/stateDb.js":function(t,e,r){"use strict";r.r(e),r.d(e,"parseDirective",(function(){return u})),r.d(e,"addState",(function(){return p})),r.d(e,"clear",(function(){return g})),r.d(e,"getState",(function(){return y})),r.d(e,"getStates",(function(){return m})),r.d(e,"logDocuments",(function(){return v})),r.d(e,"getRelations",(function(){return b})),r.d(e,"addRelation",(function(){return x})),r.d(e,"cleanupLabel",(function(){return w})),r.d(e,"lineType",(function(){return _})),r.d(e,"relationType",(function(){return T}));var n=r("./src/logger.js"),i=r("./src/utils.js"),a=r("./src/mermaidAPI.js"),o=r("./src/config.js");function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var c=function(t){return JSON.parse(JSON.stringify(t))},l=[],u=function(t,e,r){a.default.parseDirective(this,t,e,r)},d={root:{relations:[],states:{},documents:{}}},h=d.root,f=0,p=function(t,e,r,i,a){void 0===h.states[t]?h.states[t]={id:t,descriptions:[],type:e,doc:r,note:a}:(h.states[t].doc||(h.states[t].doc=r),h.states[t].type||(h.states[t].type=e)),i&&(n.logger.info("Adding state ",t,i),"string"==typeof i&&k(t,i.trim()),"object"===s(i)&&i.forEach((function(e){return k(t,e.trim())}))),a&&(h.states[t].note=a)},g=function(){h=(d={root:{relations:[],states:{},documents:{}}}).root,h=d.root,f=0,C=[]},y=function(t){return h.states[t]},m=function(){return h.states},v=function(){n.logger.info("Documents = ",d)},b=function(){return h.relations},x=function(t,e,r){var n=t,i=e,a="default",o="default";"[*]"===t&&(n="start"+ ++f,a="start"),"[*]"===e&&(i="end"+f,o="end"),p(n,a),p(i,o),h.relations.push({id1:n,id2:i,title:r})},k=function(t,e){var r=h.states[t],n=e;":"===n[0]&&(n=n.substr(1).trim()),r.descriptions.push(n)},w=function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},_={LINE:0,DOTTED_LINE:1},E=0,C=[],T={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3};e.default={parseDirective:u,getConfig:function(){return o.getConfig().state},addState:p,clear:g,getState:y,getStates:m,getRelations:b,getClasses:function(){return C},getDirection:function(){return"TB"},addRelation:x,getDividerId:function(){return"divider-id-"+ ++E},cleanupLabel:w,lineType:_,relationType:T,logDocuments:v,getRootDoc:function(){return l},setRootDoc:function(t){n.logger.info("Setting root doc",t),l=t},getRootDocV2:function(){return function t(e,r,n){if("relation"===r.stmt)t(e,r.state1,!0),t(e,r.state2,!1);else if("state"===r.stmt&&"[*]"===r.id&&(r.id=n?e.id+"_start":e.id+"_end",r.start=n),r.doc){var a=[],o=0,s=[];for(o=0;o<r.doc.length;o++)if("divider"===r.doc[o].type){var l=c(r.doc[o]);l.doc=c(s),a.push(l),s=[]}else s.push(r.doc[o]);if(a.length>0&&s.length>0){var u={stmt:"state",id:Object(i.generateId)(),type:"divider",doc:c(s)};a.push(c(u)),r.doc=a}r.doc.forEach((function(e){return t(r,e,!0)}))}}({id:"root"},{id:"root",doc:l},!0),{id:"root",doc:l}},extract:function(t){var e;e=t.doc?t.doc:t,n.logger.info(e),g(),n.logger.info("Extract",e),e.forEach((function(t){"state"===t.stmt&&p(t.id,t.type,t.doc,t.description,t.note),"relation"===t.stmt&&x(t.state1.id,t.state2.id,t.description)}))},trimColon:function(t){return t&&":"===t[0]?t.substr(1).trim():t.trim()}}},"./src/diagrams/state/stateRenderer-v2.js":function(t,e,r){"use strict";r.r(e),r.d(e,"setConf",(function(){return f})),r.d(e,"getClasses",(function(){return g})),r.d(e,"draw",(function(){return b}));var n=r("graphlib"),i=r.n(n),a=r("d3"),o=r("./src/diagrams/state/stateDb.js"),s=r("./src/diagrams/state/parser/stateDiagram.jison"),c=r.n(s),l=r("./src/config.js"),u=r("./src/dagre-wrapper/index.js"),d=r("./src/logger.js"),h={},f=function(t){for(var e=Object.keys(t),r=0;r<e.length;r++)h[e[r]]=t[e[r]]},p={},g=function(t){d.logger.trace("Extracting classes"),o.default.clear();var e=c.a.parser;return e.yy=o.default,e.parse(t),o.default.getClasses()},y=function(t,e,r,n){if("root"!==r.id){var i="rect";!0===r.start&&(i="start"),!1===r.start&&(i="end"),"default"!==r.type&&(i=r.type),p[r.id]||(p[r.id]={id:r.id,shape:i,description:r.id,classes:"statediagram-state"}),r.description&&(Array.isArray(p[r.id].description)?(p[r.id].shape="rectWithTitle",p[r.id].description.push(r.description)):p[r.id].description.length>0?(p[r.id].shape="rectWithTitle",p[r.id].description===r.id?p[r.id].description=[r.description]:p[r.id].description=[p[r.id].description,r.description]):(p[r.id].shape="rect",p[r.id].description=r.description)),!p[r.id].type&&r.doc&&(d.logger.info("Setting cluser for ",r.id),p[r.id].type="group",p[r.id].shape="divider"===r.type?"divider":"roundedWithTitle",p[r.id].classes=p[r.id].classes+" "+(n?"statediagram-cluster statediagram-cluster-alt":"statediagram-cluster"));var a={labelStyle:"",shape:p[r.id].shape,labelText:p[r.id].description,classes:p[r.id].classes,style:"",id:r.id,type:p[r.id].type,padding:15};if(r.note){var o={labelStyle:"",shape:"note",labelText:r.note.text,classes:"statediagram-note",style:"",id:r.id+"----note",type:p[r.id].type,padding:15},s={labelStyle:"",shape:"noteGroup",labelText:r.note.text,classes:p[r.id].classes,style:"",id:r.id+"----parent",type:"group",padding:0};t.setNode(r.id+"----parent",s),t.setNode(o.id,o),t.setNode(r.id,a),t.setParent(r.id,r.id+"----parent"),t.setParent(o.id,r.id+"----parent");var c=r.id,l=o.id;"left of"===r.note.position&&(c=o.id,l=r.id),t.setEdge(c,l,{arrowhead:"none",arrowType:"",style:"fill:none",labelStyle:"",classes:"transition note-edge",arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal"})}else t.setNode(r.id,a)}e&&"root"!==e.id&&(d.logger.info("Setting node ",r.id," to be child of its parent ",e.id),t.setParent(r.id,e.id)),r.doc&&(d.logger.info("Adding nodes children "),v(t,r,r.doc,!n))},m=0,v=function(t,e,r,n){d.logger.trace("items",r),r.forEach((function(r){if("state"===r.stmt||"default"===r.stmt)y(t,e,r,n);else if("relation"===r.stmt){y(t,e,r.state1,n),y(t,e,r.state2,n);var i={id:"edge"+m,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:"fill:none",labelStyle:"",label:r.description,arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal",classes:"transition"},a=r.state1.id,o=r.state2.id;t.setEdge(a,o,i,m),m++}}))},b=function(t,e){d.logger.info("Drawing state diagram (v2)",e),o.default.clear(),p={};var r=c.a.parser;r.yy=o.default,r.parse(t);var n=o.default.getDirection();void 0===n&&(n="LR");var s=Object(l.getConfig)().state,h=s.nodeSpacing||50,f=s.rankSpacing||50,g=new i.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:"TB",nodesep:h,ranksep:f,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));d.logger.info(o.default.getRootDocV2()),o.default.extract(o.default.getRootDocV2()),d.logger.info(o.default.getRootDocV2()),y(g,void 0,o.default.getRootDocV2(),!0);var m=Object(a.select)('[id="'.concat(e,'"]')),v=Object(a.select)("#"+e+" g");Object(u.render)(v,g,["barb"],"statediagram",e);var b=m.node().getBBox(),x=b.width+16,k=b.height+16;m.attr("width",1.75*x),m.attr("class","statediagram");var w=m.node().getBBox();s.useMaxWidth?(m.attr("width","100%"),m.attr("style","max-width: ".concat(x,"px;"))):(m.attr("height",k),m.attr("width",x));var _="".concat(w.x-8," ").concat(w.y-8," ").concat(x," ").concat(k);if(d.logger.debug("viewBox ".concat(_)),m.attr("viewBox",_),!s.htmlLabels)for(var E=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),C=0;C<E.length;C++){var T=E[C],O=T.getBBox(),S=document.createElementNS("http://www.w3.org/2000/svg","rect");S.setAttribute("rx",0),S.setAttribute("ry",0),S.setAttribute("width",O.width),S.setAttribute("height",O.height),T.insertBefore(S,T.firstChild)}};e.default={setConf:f,getClasses:g,draw:b}},"./src/diagrams/state/stateRenderer.js":function(t,e,r){"use strict";r.r(e),r.d(e,"setConf",(function(){return y})),r.d(e,"draw",(function(){return m}));var n,i=r("d3"),a=r("dagre"),o=r.n(a),s=r("graphlib"),c=r.n(s),l=r("./src/logger.js"),u=r("./src/diagrams/state/stateDb.js"),d=r("./src/diagrams/common/common.js"),h=r("./src/diagrams/state/parser/stateDiagram.jison"),f=r("./src/diagrams/state/shapes.js"),p=r("./src/config.js");h.parser.yy=u.default;var g={},y=function(){},m=function(t,e){n=Object(p.getConfig)().state,h.parser.yy.clear(),h.parser.parse(t),l.logger.debug("Rendering diagram "+t);var r=Object(i.select)("[id='".concat(e,"']"));r.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z"),new c.a.Graph({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel((function(){return{}}));var a=u.default.getRootDoc();v(a,r,void 0,!1);var o=n.padding,s=r.node().getBBox(),d=s.width+2*o,f=s.height+2*o;n.useMaxWidth?(r.attr("width","100%"),r.attr("style","max-width: ".concat(1.75*d,"px;"))):r.attr("width",1.75*d),r.attr("viewBox","".concat(s.x-n.padding,"  ").concat(s.y-n.padding," ")+d+" "+f)},v=function t(e,r,a,s){var h,p=new c.a.Graph({compound:!0,multigraph:!0}),y=!0;for(h=0;h<e.length;h++)if("relation"===e[h].stmt){y=!1;break}a?p.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:y?1:n.edgeLengthFactor,nodeSep:y?1:50,isMultiGraph:!0}):p.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:y?1:n.edgeLengthFactor,nodeSep:y?1:50,ranker:"tight-tree",isMultiGraph:!0}),p.setDefaultEdgeLabel((function(){return{}})),u.default.extract(e);for(var m=u.default.getStates(),v=u.default.getRelations(),b=Object.keys(m),x=0;x<b.length;x++){var k=m[b[x]];a&&(k.parentId=a);var w=void 0;if(k.doc){var _=r.append("g").attr("id",k.id).attr("class","stateGroup");w=t(k.doc,_,k.id,!s);var E=(_=Object(f.addTitleAndBox)(_,k,s)).node().getBBox();w.width=E.width,w.height=E.height+n.padding/2,g[k.id]={y:n.compositTitleSize}}else w=Object(f.drawState)(r,k,p);if(k.note){var C={descriptions:[],id:k.id+"-note",note:k.note,type:"note"},T=Object(f.drawState)(r,C,p);"left of"===k.note.position?(p.setNode(w.id+"-note",T),p.setNode(w.id,w)):(p.setNode(w.id,w),p.setNode(w.id+"-note",T)),p.setParent(w.id,w.id+"-group"),p.setParent(w.id+"-note",w.id+"-group")}else p.setNode(w.id,w)}l.logger.debug("Count=",p.nodeCount(),p);var O=0;v.forEach((function(t){var e;O++,l.logger.debug("Setting edge",t),p.setEdge(t.id1,t.id2,{relation:t,width:(e=t.title,e?e.length*n.fontSizeFactor:1),height:n.labelHeight*d.default.getRows(t.title).length,labelpos:"c"},"id"+O)})),o.a.layout(p),l.logger.debug("Graph after layout",p.nodes());var S=r.node();p.nodes().forEach((function(t){void 0!==t&&void 0!==p.node(t)?(l.logger.warn("Node "+t+": "+JSON.stringify(p.node(t))),Object(i.select)("#"+S.id+" #"+t).attr("transform","translate("+(p.node(t).x-p.node(t).width/2)+","+(p.node(t).y+(g[t]?g[t].y:0)-p.node(t).height/2)+" )"),Object(i.select)("#"+S.id+" #"+t).attr("data-x-shift",p.node(t).x-p.node(t).width/2),document.querySelectorAll("#"+S.id+" #"+t+" .divider").forEach((function(t){var e=t.parentElement,r=0,n=0;e&&(e.parentElement&&(r=e.parentElement.getBBox().width),n=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(n)&&(n=0)),t.setAttribute("x1",0-n+8),t.setAttribute("x2",r-n-8)}))):l.logger.debug("No Node "+t+": "+JSON.stringify(p.node(t)))}));var A=S.getBBox();p.edges().forEach((function(t){void 0!==t&&void 0!==p.edge(t)&&(l.logger.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(p.edge(t))),Object(f.drawEdge)(r,p.edge(t),p.edge(t).relation))})),A=S.getBBox();var j={id:a||"root",label:a||"root",width:0,height:0};return j.width=A.width+2*n.padding,j.height=A.height+2*n.padding,l.logger.debug("Doc rendered",j,p),j};e.default={setConf:y,draw:m}},"./src/diagrams/state/styles.js":function(t,e,r){"use strict";r.r(e),e.default=function(t){return"g.stateGroup text {\n  fill: ".concat(t.nodeBorder,";\n  stroke: none;\n  font-size: 10px;\n}\ng.stateGroup text {\n  fill: ").concat(t.textColor,";\n  stroke: none;\n  font-size: 10px;\n\n}\ng.stateGroup .state-title {\n  font-weight: bolder;\n  fill: ").concat(t.labelColor,";\n}\n\ng.stateGroup rect {\n  fill: ").concat(t.mainBkg,";\n  stroke: ").concat(t.nodeBorder,";\n}\n\ng.stateGroup line {\n  stroke: ").concat(t.lineColor,";\n  stroke-width: 1;\n}\n\n.transition {\n  stroke: ").concat(t.lineColor,";\n  stroke-width: 1;\n  fill: none;\n}\n\n.stateGroup .composit {\n  fill: ").concat(t.background,";\n  border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n  fill: #e0e0e0;\n  border-bottom: 1px\n}\n\n.state-note {\n  stroke: ").concat(t.noteBorderColor,";\n  fill: ").concat(t.noteBkgColor,";\n\n  text {\n    fill: black;\n    stroke: none;\n    font-size: 10px;\n  }\n}\n\n.stateLabel .box {\n  stroke: none;\n  stroke-width: 0;\n  fill: ").concat(t.mainBkg,";\n  opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n  fill: ").concat(t.tertiaryColor,";\n  opacity: 0.5;\n}\n.edgeLabel .label text {\n  fill: ").concat(t.tertiaryTextColor,";\n}\n.label div .edgeLabel {\n  color: ").concat(t.tertiaryTextColor,";\n}\n\n.stateLabel text {\n  fill: ").concat(t.labelColor,";\n  font-size: 10px;\n  font-weight: bold;\n}\n\n.node circle.state-start {\n  fill: ").concat(t.lineColor,";\n  stroke: black;\n}\n.node circle.state-end {\n  fill: ").concat(t.primaryBorderColor,";\n  stroke: ").concat(t.background,";\n  stroke-width: 1.5\n}\n.end-state-inner {\n  fill: ").concat(t.background,";\n  // stroke: ").concat(t.background,";\n  stroke-width: 1.5\n}\n\n.node rect {\n  fill: ").concat(t.mainBkg,";\n  stroke: ").concat(t.nodeBorder,";\n  stroke-width: 1px;\n}\n#statediagram-barbEnd {\n  fill: ").concat(t.lineColor,";\n}\n\n.statediagram-cluster rect {\n  fill: ").concat(t.mainBkg,";\n  stroke: ").concat(t.nodeBorder,";\n  stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n  color: ").concat(t.textColor,";\n}\n\n.statediagram-cluster rect.outer {\n  rx: 5px;\n  ry: 5px;\n}\n.statediagram-state .divider {\n  stroke: ").concat(t.nodeBorder,";\n}\n\n.statediagram-state .title-state {\n  rx: 5px;\n  ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n  fill: ").concat(t.background,";\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n  fill: #e0e0e0;\n}\n\n.statediagram-cluster .inner {\n  rx:0;\n  ry:0;\n}\n\n.statediagram-state rect.basic {\n  rx: 5px;\n  ry: 5px;\n}\n.statediagram-state rect.divider {\n  stroke-dasharray: 10,10;\n  fill: ").concat(t.altBackground?t.altBackground:"#efefef",";\n}\n\n.note-edge {\n  stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n  fill: ").concat(t.noteBkgColor,";\n  stroke: ").concat(t.noteBorderColor,";\n  stroke-width: 1px;\n  rx: 0;\n  ry: 0;\n}\n.statediagram-note rect {\n  fill: ").concat(t.noteBkgColor,";\n  stroke: ").concat(t.noteBorderColor,";\n  stroke-width: 1px;\n  rx: 0;\n  ry: 0;\n}\n\n.statediagram-note text {\n  fill: ").concat(t.noteTextColor,";\n}\n\n.statediagram-note .nodeLabel {\n  color: ").concat(t.noteTextColor,";\n}\n\n#dependencyStart, #dependencyEnd {\n  fill: ").concat(t.lineColor,";\n  stroke: ").concat(t.lineColor,";\n  stroke-width: 1;\n}\n")}},"./src/diagrams/user-journey/journeyDb.js":function(t,e,r){"use strict";r.r(e),r.d(e,"parseDirective",(function(){return d})),r.d(e,"clear",(function(){return h})),r.d(e,"setTitle",(function(){return f})),r.d(e,"getTitle",(function(){return p})),r.d(e,"addSection",(function(){return g})),r.d(e,"getSections",(function(){return y})),r.d(e,"getTasks",(function(){return m})),r.d(e,"addTask",(function(){return v})),r.d(e,"addTaskOrg",(function(){return b}));var n=r("./src/mermaidAPI.js"),i=r("./src/config.js");function a(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var o="",s="",c=[],l=[],u=[],d=function(t,e,r){n.default.parseDirective(this,t,e,r)},h=function(){c.length=0,l.length=0,s="",o="",u.length=0},f=function(t){o=t},p=function(){return o},g=function(t){s=t,c.push(t)},y=function(){return c},m=function(){for(var t=x(),e=0;!t&&e<100;)t=x(),e++;return l.push.apply(l,u),l},v=function(t,e){var r=e.substr(1).split(":"),n=0,i=[];1===r.length?(n=Number(r[0]),i=[]):(n=Number(r[0]),i=r[1].split(","));var a=i.map((function(t){return t.trim()})),o={section:s,type:s,people:a,task:t,score:n};u.push(o)},b=function(t){var e={section:s,type:s,description:t,task:t,classes:[]};l.push(e)},x=function(){for(var t=!0,e=0;e<u.length;e++)u[e].processed,t=t&&u[e].processed;return t};e.default={parseDirective:d,getConfig:function(){return i.getConfig().journey},clear:h,setTitle:f,getTitle:p,addSection:g,getSections:y,getTasks:m,addTask:v,addTaskOrg:b,getActors:function(){return t=[],l.forEach((function(e){e.people&&t.push.apply(t,a(e.people))})),a(new Set(t)).sort();var t}}},"./src/diagrams/user-journey/journeyRenderer.js":function(t,e,r){"use strict";r.r(e),r.d(e,"setConf",(function(){return c})),r.d(e,"draw",(function(){return d})),r.d(e,"bounds",(function(){return h})),r.d(e,"drawTasks",(function(){return g}));var n=r("d3"),i=r("./src/diagrams/user-journey/parser/journey.jison"),a=r("./src/diagrams/user-journey/journeyDb.js"),o=r("./src/diagrams/user-journey/svgDraw.js");i.parser.yy=a.default;var s={leftMargin:150,diagramMarginX:50,diagramMarginY:20,taskMargin:50,width:150,height:50,taskFontSize:14,taskFontFamily:'"Open-Sans", "sans-serif"',boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},c=function(t){Object.keys(t).forEach((function(e){s[e]=t[e]}))},l={},u=s.leftMargin,d=function(t,e){i.parser.yy.clear(),i.parser.parse(t+"\n"),h.init();var r=Object(n.select)("#"+e);r.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),o.default.initGraphics(r);var a=i.parser.yy.getTasks(),c=i.parser.yy.getTitle(),d=i.parser.yy.getActors();for(var f in l)delete l[f];var p=0;d.forEach((function(t){l[t]=s.actorColours[p%s.actorColours.length],p++})),function(t){var e=60;Object.keys(l).forEach((function(r){var n=l[r],i={cx:20,cy:e,r:7,fill:n,stroke:"#000"};o.default.drawCircle(t,i);var a={x:40,y:e+7,fill:"#666",text:r,textMargin:5|s.boxTextMargin};o.default.drawText(t,a),e+=20}))}(r),h.insert(0,0,u,50*Object.keys(l).length),g(r,a,0);var y=h.getBounds();c&&r.append("text").text(c).attr("x",u).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);var m=y.stopy-y.starty+2*s.diagramMarginY,v=u+y.stopx+2*s.diagramMarginX;s.useMaxWidth?(r.attr("height","100%"),r.attr("width","100%"),r.attr("style","max-width:"+v+"px;")):(r.attr("height",m),r.attr("width",v)),r.append("line").attr("x1",u).attr("y1",4*s.height).attr("x2",v-u-4).attr("y2",4*s.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");var b=c?70:0;r.attr("viewBox","".concat(y.startx," -25 ").concat(v," ").concat(m+b)),r.attr("preserveAspectRatio","xMinYMin meet")},h={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])},updateBounds:function(t,e,r,n){var i,a=this,o=0;this.sequenceItems.forEach((function(c){o++;var l=a.sequenceItems.length-o+1;a.updateVal(c,"starty",e-l*s.boxMargin,Math.min),a.updateVal(c,"stopy",n+l*s.boxMargin,Math.max),a.updateVal(h.data,"startx",t-l*s.boxMargin,Math.min),a.updateVal(h.data,"stopx",r+l*s.boxMargin,Math.max),"activation"!==i&&(a.updateVal(c,"startx",t-l*s.boxMargin,Math.min),a.updateVal(c,"stopx",r+l*s.boxMargin,Math.max),a.updateVal(h.data,"starty",e-l*s.boxMargin,Math.min),a.updateVal(h.data,"stopy",n+l*s.boxMargin,Math.max))}))},insert:function(t,e,r,n){var i=Math.min(t,r),a=Math.max(t,r),o=Math.min(e,n),s=Math.max(e,n);this.updateVal(h.data,"startx",i,Math.min),this.updateVal(h.data,"starty",o,Math.min),this.updateVal(h.data,"stopx",a,Math.max),this.updateVal(h.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},f=s.sectionFills,p=s.sectionColours,g=function(t,e,r){for(var n="",i=r+(2*s.height+s.diagramMarginY),a=0,c="#CCC",d="black",g=0,y=0;y<e.length;y++){var m=e[y];if(n!==m.section){c=f[a%f.length],g=a%f.length,d=p[a%p.length];var v={x:y*s.taskMargin+y*s.width+u,y:50,text:m.section,fill:c,num:g,colour:d};o.default.drawSection(t,v,s),n=m.section,a++}var b=m.people.reduce((function(t,e){return l[e]&&(t[e]=l[e]),t}),{});m.x=y*s.taskMargin+y*s.width+u,m.y=i,m.width=s.diagramMarginX,m.height=s.diagramMarginY,m.colour=d,m.fill=c,m.num=g,m.actors=b,o.default.drawTask(t,m,s),h.insert(m.x,m.y,m.x+m.width+s.taskMargin,450)}};e.default={setConf:c,draw:d}},"./src/diagrams/user-journey/parser/journey.jison":function(t,e,r){(function(t,n){var i=function(){var t=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},e=[1,2],r=[1,5],n=[6,9,11,17,18,19,21],i=[1,15],a=[1,16],o=[1,17],s=[1,21],c=[4,6,9,11,17,18,19,21],l={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,section:18,taskName:19,taskData:20,open_directive:21,type_directive:22,arg_directive:23,close_directive:24,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"section",19:"taskName",20:"taskData",21:"open_directive",22:"type_directive",23:"arg_directive",24:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 11:n.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:n.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:n.addTask(a[s-1],a[s]),this.$="task";break;case 15:n.parseDirective("%%{","open_directive");break;case 16:n.parseDirective(a[s],"type_directive");break;case 17:a[s]=a[s].trim().replace(/'/g,'"'),n.parseDirective(a[s],"arg_directive");break;case 18:n.parseDirective("}%%","close_directive","journey")}},table:[{3:1,4:e,7:3,12:4,21:r},{1:[3]},t(n,[2,3],{5:6}),{3:7,4:e,7:3,12:4,21:r},{13:8,22:[1,9]},{22:[2,15]},{6:[1,10],7:18,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:a,19:o,21:r},{1:[2,2]},{14:19,15:[1,20],24:s},t([15,24],[2,16]),t(n,[2,8],{1:[2,1]}),t(n,[2,4]),{7:18,10:22,12:4,17:i,18:a,19:o,21:r},t(n,[2,6]),t(n,[2,7]),t(n,[2,11]),t(n,[2,12]),{20:[1,23]},t(n,[2,14]),{11:[1,24]},{16:25,23:[1,26]},{11:[2,18]},t(n,[2,5]),t(n,[2,13]),t(c,[2,9]),{14:27,24:s},{24:[2,17]},{11:[1,28]},t(c,[2,10])],defaultActions:{5:[2,15],7:[2,2],21:[2,18],26:[2,17]},parseError:function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},parse:function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=0,d=2,h=1,f=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=n.pop()||p.lex()||h)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,k,w,_,E,C,T,O,S,A={};;){if(w=r[r.length-1],this.defaultActions[w]?_=this.defaultActions[w]:(null==x&&(x=b()),_=o[w]&&o[w][x]),void 0===_||!_.length||!_[0]){var j="";for(C in S=[],o[w])this.terminals_[C]&&C>d&&S.push("'"+this.terminals_[C]+"'");j=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(j,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(_[0]){case 1:r.push(x),i.push(p.yytext),a.push(p.yylloc),r.push(_[1]),x=null,k?(x=k,k=null):(l=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(T=this.productions_[_[1]][1],A.$=i[i.length-T],A._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},v&&(A._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(A,[s,l,c,g.yy,_[1],i,a].concat(f))))return E;T&&(r=r.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),r.push(this.productions_[_[1]][0]),i.push(A.$),a.push(A._$),O=o[r[r.length-2]][r[r.length-1]],r.push(O);break;case 3:return!0}}return!0}},u={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||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];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(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 e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),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(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,r,n){switch(r){case 0:return this.begin("open_directive"),21;case 1:return this.begin("type_directive"),22;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),24;case 4:return 23;case 5:case 6:break;case 7:return 11;case 8:case 9:break;case 10:return 4;case 11:return 17;case 12:return 18;case 13:return 19;case 14:return 20;case 15:return 15;case 16:return 6;case 17:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,13,14,15,16,17],inclusive:!0}}};function d(){this.yy={}}return l.lexer=u,d.prototype=l,l.Parser=d,new d}();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"),t.exit(1));var i=r("./node_modules/node-libs-browser/mock/empty.js").readFileSync(r("./node_modules/path-browserify/index.js").normalize(n[1]),"utf8");return e.parser.parse(i)},r.c[r.s]===n&&e.main(t.argv.slice(1))}).call(this,r("./node_modules/process/browser.js"),r("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/user-journey/styles.js":function(t,e,r){"use strict";r.r(e),e.default=function(t){return".label {\n    font-family: 'trebuchet ms', verdana, arial;\n    font-family: var(--mermaid-font-family);\n    color: ".concat(t.textColor,";\n  }\n  .mouth {\n    stroke: #666;\n  }\n\n  line {\n    stroke: ").concat(t.textColor,"\n  }\n\n  .legend {\n    fill: ").concat(t.textColor,";\n  }\n\n  .label text {\n    fill: #333;\n  }\n  .label {\n    color: ").concat(t.textColor,"\n  }\n\n  .face {\n    fill: #FFF8DC;\n    stroke: #999;\n  }\n\n  .node rect,\n  .node circle,\n  .node ellipse,\n  .node polygon,\n  .node path {\n    fill: ").concat(t.mainBkg,";\n    stroke: ").concat(t.nodeBorder,";\n    stroke-width: 1px;\n  }\n\n  .node .label {\n    text-align: center;\n  }\n  .node.clickable {\n    cursor: pointer;\n  }\n\n  .arrowheadPath {\n    fill: ").concat(t.arrowheadColor,";\n  }\n\n  .edgePath .path {\n    stroke: ").concat(t.lineColor,";\n    stroke-width: 1.5px;\n  }\n\n  .flowchart-link {\n    stroke: ").concat(t.lineColor,";\n    fill: none;\n  }\n\n  .edgeLabel {\n    background-color: ").concat(t.edgeLabelBackground,";\n    rect {\n      opacity: 0.5;\n    }\n    text-align: center;\n  }\n\n  .cluster rect {\n  }\n\n  .cluster text {\n    fill: ").concat(t.titleColor,";\n  }\n\n  div.mermaidTooltip {\n    position: absolute;\n    text-align: center;\n    max-width: 200px;\n    padding: 2px;\n    font-family: 'trebuchet ms', verdana, arial;\n    font-family: var(--mermaid-font-family);\n    font-size: 12px;\n    background: ").concat(t.tertiaryColor,";\n    border: 1px solid ").concat(t.border2,";\n    border-radius: 2px;\n    pointer-events: none;\n    z-index: 100;\n  }\n\n  .task-type-0, .section-type-0  {\n    ").concat(t.fillType0?"fill: ".concat(t.fillType0):"",";\n  }\n  .task-type-1, .section-type-1  {\n    ").concat(t.fillType0?"fill: ".concat(t.fillType1):"",";\n  }\n  .task-type-2, .section-type-2  {\n    ").concat(t.fillType0?"fill: ".concat(t.fillType2):"",";\n  }\n  .task-type-3, .section-type-3  {\n    ").concat(t.fillType0?"fill: ".concat(t.fillType3):"",";\n  }\n  .task-type-4, .section-type-4  {\n    ").concat(t.fillType0?"fill: ".concat(t.fillType4):"",";\n  }\n  .task-type-5, .section-type-5  {\n    ").concat(t.fillType0?"fill: ".concat(t.fillType5):"",";\n  }\n  .task-type-6, .section-type-6  {\n    ").concat(t.fillType0?"fill: ".concat(t.fillType6):"",";\n  }\n  .task-type-7, .section-type-7  {\n    ").concat(t.fillType0?"fill: ".concat(t.fillType7):"",";\n  }\n")}},"./src/diagrams/user-journey/svgDraw.js":function(t,e,r){"use strict";r.r(e),r.d(e,"drawRect",(function(){return i})),r.d(e,"drawFace",(function(){return a})),r.d(e,"drawCircle",(function(){return o})),r.d(e,"drawText",(function(){return s})),r.d(e,"drawLabel",(function(){return c})),r.d(e,"drawSection",(function(){return l})),r.d(e,"drawTask",(function(){return d})),r.d(e,"drawBackgroundRect",(function(){return h})),r.d(e,"getTextObj",(function(){return f})),r.d(e,"getNoteRect",(function(){return p}));var n=r("d3"),i=function(t,e){var r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),void 0!==e.class&&r.attr("class",e.class),r},a=function(t,e){var r=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");return i.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),e.score>3?function(t){var r=Object(n.arc)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",r).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}(i):e.score<3?function(t){var r=Object(n.arc)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",r).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}(i):function(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}(i),r},o=function(t,e){var r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),void 0!==r.class&&r.attr("class",r.class),void 0!==e.title&&r.append("title").text(e.title),r},s=function(t,e){var r=e.text.replace(/<br\s*\/?>/gi," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),void 0!==e.class&&n.attr("class",e.class);var i=n.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(r),n},c=function(t,e){var r,n,i,a,o,c=t.append("polygon");c.attr("points",(r=e.x,n=e.y,r+","+n+" "+(r+(i=50))+","+n+" "+(r+i)+","+(n+(a=20)-(o=7))+" "+(r+i-1.2*o)+","+(n+a)+" "+r+","+(n+a))),c.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,s(t,e)},l=function(t,e,r){var n=t.append("g"),a=p();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=r.width,a.height=r.height,a.class="journey-section section-type-"+e.num,a.rx=3,a.ry=3,i(n,a),g(r)(e.text,n,a.x,a.y,a.width,a.height,{class:"journey-section section-type-"+e.num},r,e.colour)},u=-1,d=function(t,e,r){var n=e.x+r.width/2,s=t.append("g");u++,s.append("line").attr("id","task"+u).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),a(s,{cx:n,cy:300+30*(5-e.score),score:e.score});var c=p();c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=r.width,c.height=r.height,c.class="task task-type-"+e.num,c.rx=3,c.ry=3,i(s,c);var l=e.x+14;e.people.forEach((function(t){var r=e.actors[t],n={cx:l,cy:e.y,r:7,fill:r,stroke:"#000",title:t};o(s,n),l+=10})),g(r)(e.task,s,c.x,c.y,c.width,c.height,{class:"task"},r,e.colour)},h=function(t,e){i(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},f=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},p=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},g=function(){function t(t,e,r,i,a,o,s,c){n(e.append("text").attr("x",r+a/2).attr("y",i+o/2+5).style("font-color",c).style("text-anchor","middle").text(t),s)}function e(t,e,r,i,a,o,s,c,l){for(var u=c.taskFontSize,d=c.taskFontFamily,h=t.split(/<br\s*\/?>/gi),f=0;f<h.length;f++){var p=f*u-u*(h.length-1)/2,g=e.append("text").attr("x",r+a/2).attr("y",i).attr("fill",l).style("text-anchor","middle").style("font-size",u).style("font-family",d);g.append("tspan").attr("x",r+a/2).attr("dy",p).text(h[f]),g.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(g,s)}}function r(t,r,i,a,o,s,c,l){var u=r.append("switch"),d=u.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).attr("position","fixed").append("div").style("display","table").style("height","100%").style("width","100%");d.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,u,i,a,o,s,c,l),n(d,c)}function n(t,e){for(var r in e)r in e&&t.attr(r,e[r])}return function(n){return"fo"===n.textPlacement?r:"old"===n.textPlacement?t:e}}();e.default={drawRect:i,drawCircle:o,drawSection:l,drawText:s,drawLabel:c,drawTask:d,drawBackgroundRect:h,getTextObj:f,getNoteRect:p,initGraphics: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")}}},"./src/errorRenderer.js":function(t,e,r){"use strict";r.r(e),r.d(e,"setConf",(function(){return o})),r.d(e,"draw",(function(){return s}));var n=r("d3"),i=r("./src/logger.js"),a={},o=function(t){Object.keys(t).forEach((function(e){a[e]=t[e]}))},s=function(t,e){try{i.logger.debug("Renering svg for syntax error\n");var r=Object(n.select)("#"+t),a=r.append("g");a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1240).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),a.append("text").attr("class","error-text").attr("x",1050).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+e),r.attr("height",100),r.attr("width",400),r.attr("viewBox","768 0 512 512")}catch(t){i.logger.error("Error while rendering info diagram"),i.logger.error(t.message)}};e.default={setConf:o,draw:s}},"./src/logger.js":function(t,e,r){"use strict";r.r(e),r.d(e,"LEVELS",(function(){return a})),r.d(e,"logger",(function(){return o})),r.d(e,"setLogLevel",(function(){return s}));var n=r("moment-mini"),i=r.n(n),a={debug:1,info:2,warn:3,error:4,fatal:5},o={debug:function(){},info:function(){},warn:function(){},error:function(){},fatal:function(){}},s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"fatal";isNaN(t)&&(t=t.toLowerCase(),void 0!==a[t]&&(t=a[t])),o.trace=function(){},o.debug=function(){},o.info=function(){},o.warn=function(){},o.error=function(){},o.fatal=function(){},t<=a.fatal&&(o.fatal=console.error?console.error.bind(console,c("FATAL"),"color: orange"):console.log.bind(console,"[35m",c("FATAL"))),t<=a.error&&(o.error=console.error?console.error.bind(console,c("ERROR"),"color: orange"):console.log.bind(console,"[31m",c("ERROR"))),t<=a.warn&&(o.warn=console.warn?console.warn.bind(console,c("WARN"),"color: orange"):console.log.bind(console,"[33m",c("WARN"))),t<=a.info&&(o.info=console.info?console.info.bind(console,c("INFO"),"color: lightblue"):console.log.bind(console,"[34m",c("INFO"))),t<=a.debug&&(o.debug=console.debug?console.debug.bind(console,c("DEBUG"),"color: lightgreen"):console.log.bind(console,"[32m",c("DEBUG")))},c=function(t){var e=i()().format("ss.SSS");return"%c".concat(e," : ").concat(t," : ")}},"./src/mermaid.js":function(t,e,r){"use strict";r.r(e);var n=r("entity-decode/browser"),i=r.n(n),a=r("./src/mermaidAPI.js"),o=r("./src/logger.js"),s=r("./src/utils.js"),c=function(){l.startOnLoad?a.default.getConfig().startOnLoad&&l.init():void 0===l.startOnLoad&&(o.logger.debug("In start, no config"),a.default.getConfig().startOnLoad&&l.init())};"undefined"!=typeof document&&window.addEventListener("load",(function(){c()}),!1);var l={startOnLoad:!0,htmlLabels:!0,mermaidAPI:a.default,parse:a.default.parse,render:a.default.render,init:function(){var t,e,r,n=this,c=a.default.getConfig();arguments.length>=2?(void 0!==arguments[0]&&(l.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],"function"==typeof arguments[arguments.length-1]?(e=arguments[arguments.length-1],o.logger.debug("Callback function found")):void 0!==c.mermaid&&("function"==typeof c.mermaid.callback?(e=c.mermaid.callback,o.logger.debug("Callback function found")):o.logger.debug("No Callback function found")),t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof window.Node?[t]:t,o.logger.debug("Start On Load before: "+l.startOnLoad),void 0!==l.startOnLoad&&(o.logger.debug("Start On Load inner: "+l.startOnLoad),a.default.updateSiteConfig({startOnLoad:l.startOnLoad})),void 0!==l.ganttConfig&&a.default.updateSiteConfig({gantt:l.ganttConfig});for(var u=function(c){var l=t[c];if(l.getAttribute("data-processed"))return"continue";l.setAttribute("data-processed",!0);var u="mermaid-".concat(Date.now());r=l.innerHTML,r=i()(r).trim().replace(/<br\s*\/?>/gi,"<br/>");var d=s.default.detectInit(r);d&&o.logger.debug("Detected early reinit: ",d);try{a.default.render(u,r,(function(t,r){l.innerHTML=t,void 0!==e&&e(u),r&&r(l)}),l)}catch(t){o.logger.warn("Syntax Error rendering"),o.logger.warn(t),n.parseError&&n.parseError(t)}},d=0;d<t.length;d++)u(d)},initialize:function(t){void 0!==t.mermaid&&(void 0!==t.mermaid.startOnLoad&&(l.startOnLoad=t.mermaid.startOnLoad),void 0!==t.mermaid.htmlLabels&&(l.htmlLabels=t.mermaid.htmlLabels)),a.default.initialize(t)},contentLoaded:c};e.default=l},"./src/mermaidAPI.js":function(t,e,r){"use strict";r.r(e),r.d(e,"encodeEntities",(function(){return nt})),r.d(e,"decodeEntities",(function(){return it}));var n=r("stylis"),i=r.n(n),a=r("d3"),o=r("./package.json"),s=r("./src/logger.js"),c=r("./src/utils.js"),l=r("./src/diagrams/flowchart/flowRenderer.js"),u=r("./src/diagrams/flowchart/flowRenderer-v2.js"),d=r("./src/diagrams/flowchart/parser/flow.jison"),h=r.n(d),f=r("./src/diagrams/flowchart/flowDb.js"),p=r("./src/diagrams/sequence/sequenceRenderer.js"),g=r("./src/diagrams/sequence/parser/sequenceDiagram.jison"),y=r.n(g),m=r("./src/diagrams/sequence/sequenceDb.js"),v=r("./src/diagrams/gantt/ganttRenderer.js"),b=r("./src/diagrams/gantt/parser/gantt.jison"),x=r.n(b),k=r("./src/diagrams/gantt/ganttDb.js"),w=r("./src/diagrams/class/classRenderer.js"),_=r("./src/diagrams/class/classRenderer-v2.js"),E=r("./src/diagrams/class/parser/classDiagram.jison"),C=r.n(E),T=r("./src/diagrams/class/classDb.js"),O=r("./src/diagrams/state/stateRenderer.js"),S=r("./src/diagrams/state/stateRenderer-v2.js"),A=r("./src/diagrams/state/parser/stateDiagram.jison"),j=r.n(A),D=r("./src/diagrams/state/stateDb.js"),B=r("./src/diagrams/git/gitGraphRenderer.js"),N=r("./src/diagrams/git/parser/gitGraph.jison"),M=r.n(N),L=r("./src/diagrams/git/gitGraphAst.js"),I=r("./src/diagrams/info/infoRenderer.js"),P=r("./src/errorRenderer.js"),F=r("./src/diagrams/info/parser/info.jison"),R=r.n(F),Y=r("./src/diagrams/info/infoDb.js"),V=r("./src/diagrams/pie/pieRenderer.js"),W=r("./src/diagrams/pie/parser/pie.jison"),z=r.n(W),$=r("./src/diagrams/pie/pieDb.js"),U=r("./src/diagrams/er/erDb.js"),G=r("./src/diagrams/er/parser/erDiagram.jison"),H=r.n(G),q=r("./src/diagrams/er/erRenderer.js"),X=r("./src/diagrams/user-journey/parser/journey.jison"),Z=r.n(X),J=r("./src/diagrams/user-journey/journeyDb.js"),Q=r("./src/diagrams/user-journey/journeyRenderer.js"),K=r("./src/config.js"),tt=r("./src/styles.js"),et=r("./src/themes/index.js");function rt(t){return(rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var nt=function(t){var e=t;return e=(e=(e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)}))).replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)}))).replace(/#\w+;/g,(function(t){var e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"ﬂ°°"+e+"¶ß":"ﬂ°"+e+"¶ß"}))},it=function(t){var e=t;return e=(e=(e=e.replace(/ﬂ°°/g,(function(){return"&#"}))).replace(/ﬂ°/g,(function(){return"&"}))).replace(/¶ß/g,(function(){return";"}))},at={},ot=function(t,e,r){switch(s.logger.debug("Directive type=".concat(e.type," with args:"),e.args),e.type){case"init":case"initialize":["config"].forEach((function(t){void 0!==e.args[t]&&("flowchart-v2"===r&&(r="flowchart"),e.args[r]=e.args[t],delete e.args[t])})),e.args,K.addDirective(e.args);break;case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap("wrap"===e.type);break;default:s.logger.warn("Unhandled directive: source: '%%{".concat(e.type,": ").concat(JSON.stringify(e.args?e.args:{}),"}%%"),e)}};function st(t){B.default.setConf(t.git),l.default.setConf(t.flowchart),u.default.setConf(t.flowchart),void 0!==t.sequenceDiagram&&p.default.setConf(Object(c.assignWithDepth)(t.sequence,t.sequenceDiagram)),p.default.setConf(t.sequence),v.default.setConf(t.gantt),w.default.setConf(t.class),O.default.setConf(t.state),S.default.setConf(t.state),I.default.setConf(t.class),V.default.setConf(t.class),q.default.setConf(t.er),Q.default.setConf(t.journey),P.default.setConf(t.class)}function ct(){}var lt=Object.freeze({render:function(t,e,r,n){K.reset();var d=e,h=c.default.detectInit(d);h&&K.addDirective(h);var g=K.getConfig();if(console.warn("Render with config after adding new directives",g.sequence),e.length>g.maxTextSize&&(d="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa"),void 0!==n)n.innerHTML="",Object(a.select)(n).append("div").attr("id","d"+t).attr("style","font-family: "+g.fontFamily).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g");else{var y=document.getElementById(t);y&&y.remove();var m=document.querySelector("#d"+t);m&&m.remove(),Object(a.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=d,d=nt(d);var b=Object(a.select)("#d"+t).node(),x=c.default.detectType(d),E=b.firstChild,C=E.firstChild,A="";if(void 0!==g.themeCSS&&(A+="\n".concat(g.themeCSS)),void 0!==g.fontFamily&&(A+="\n:root { --mermaid-font-family: ".concat(g.fontFamily,"}")),void 0!==g.altFontFamily&&(A+="\n:root { --mermaid-alt-font-family: ".concat(g.altFontFamily,"}")),"flowchart"===x||"flowchart-v2"===x||"graph"===x){var j=l.default.getClasses(d);for(var D in j)A+="\n.".concat(D," > * { ").concat(j[D].styles.join(" !important; ")," !important; }"),j[D].textStyles&&(A+="\n.".concat(D," tspan { ").concat(j[D].textStyles.join(" !important; ")," !important; }"))}var N=(new i.a)("#".concat(t),Object(tt.default)(x,A,g.themeVariables)),M=document.createElement("style");M.innerHTML=N,E.insertBefore(M,C);try{switch(x){case"git":g.flowchart.arrowMarkerAbsolute=g.arrowMarkerAbsolute,B.default.setConf(g.git),B.default.draw(d,t,!1);break;case"flowchart":g.flowchart.arrowMarkerAbsolute=g.arrowMarkerAbsolute,l.default.setConf(g.flowchart),l.default.draw(d,t,!1);break;case"flowchart-v2":g.flowchart.arrowMarkerAbsolute=g.arrowMarkerAbsolute,u.default.setConf(g.flowchart),u.default.draw(d,t,!1);break;case"sequence":g.sequence.arrowMarkerAbsolute=g.arrowMarkerAbsolute,g.sequenceDiagram?(p.default.setConf(Object.assign(g.sequence,g.sequenceDiagram)),console.error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.")):p.default.setConf(g.sequence),p.default.draw(d,t);break;case"gantt":g.gantt.arrowMarkerAbsolute=g.arrowMarkerAbsolute,v.default.setConf(g.gantt),v.default.draw(d,t);break;case"class":g.class.arrowMarkerAbsolute=g.arrowMarkerAbsolute,w.default.setConf(g.class),w.default.draw(d,t);break;case"classDiagram":g.class.arrowMarkerAbsolute=g.arrowMarkerAbsolute,_.default.setConf(g.class),_.default.draw(d,t);break;case"state":g.class.arrowMarkerAbsolute=g.arrowMarkerAbsolute,O.default.setConf(g.state),O.default.draw(d,t);break;case"stateDiagram":g.class.arrowMarkerAbsolute=g.arrowMarkerAbsolute,S.default.setConf(g.state),S.default.draw(d,t);break;case"info":g.class.arrowMarkerAbsolute=g.arrowMarkerAbsolute,I.default.setConf(g.class),I.default.draw(d,t,o.version);break;case"pie":g.class.arrowMarkerAbsolute=g.arrowMarkerAbsolute,V.default.setConf(g.class),V.default.draw(d,t,o.version);break;case"er":q.default.setConf(g.er),q.default.draw(d,t,o.version);break;case"journey":Q.default.setConf(g.journey),Q.default.draw(d,t,o.version)}}catch(e){throw P.default.draw(t,o.version),e}Object(a.select)('[id="'.concat(t,'"]')).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");var L=Object(a.select)("#d"+t).node().innerHTML;if(s.logger.debug("cnf.arrowMarkerAbsolute",g.arrowMarkerAbsolute),g.arrowMarkerAbsolute&&"false"!==g.arrowMarkerAbsolute||(L=L.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),L=it(L),void 0!==r)switch(x){case"flowchart":case"flowchart-v2":r(L,f.default.bindFunctions);break;case"gantt":r(L,k.default.bindFunctions);break;case"class":r(L,T.default.bindFunctions);break;default:r(L)}else s.logger.debug("CB = undefined!");var F=Object(a.select)("#d"+t).node();return null!==F&&"function"==typeof F.remove&&Object(a.select)("#d"+t).node().remove(),L},parse:function(t){var e=c.default.detectInit(t);e&&s.logger.debug("reinit ",e);var r,n=c.default.detectType(t);switch(s.logger.debug("Type "+n),n){case"git":(r=M.a).parser.yy=L.default;break;case"flowchart":case"flowchart-v2":f.default.clear(),(r=h.a).parser.yy=f.default;break;case"sequence":(r=y.a).parser.yy=m.default;break;case"gantt":(r=x.a).parser.yy=k.default;break;case"class":case"classDiagram":(r=C.a).parser.yy=T.default;break;case"state":case"stateDiagram":(r=j.a).parser.yy=D.default;break;case"info":s.logger.debug("info info info"),(r=R.a).parser.yy=Y.default;break;case"pie":s.logger.debug("pie"),(r=z.a).parser.yy=$.default;break;case"er":s.logger.debug("er"),(r=H.a).parser.yy=U.default;break;case"journey":s.logger.debug("Journey"),(r=Z.a).parser.yy=J.default}return r.parser.yy.graphType=n,r.parser.yy.parseError=function(t,e){throw{str:t,hash:e}},r.parse(t),r},parseDirective:function(t,e,r,n){try{if(void 0!==e)switch(e=e.trim(),r){case"open_directive":at={};break;case"type_directive":at.type=e.toLowerCase();break;case"arg_directive":at.args=JSON.parse(e);break;case"close_directive":ot(t,at,n),at=null}}catch(t){s.logger.error("Error while rendering sequenceDiagram directive: ".concat(e," jison context: ").concat(r)),s.logger.error(t.message)}},initialize:function(t){t&&t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),K.setSiteConfigDelta(t),t&&t.theme&&et.default[t.theme]?t.themeVariables=et.default[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=et.default.default.getThemeVariables(t.themeVariables));var e="object"===rt(t)?K.setSiteConfig(t):K.getSiteConfig();st(e),Object(s.setLogLevel)(e.logLevel)},reinitialize:ct,getConfig:K.getConfig,setConfig:K.setConfig,getSiteConfig:K.getSiteConfig,updateSiteConfig:K.updateSiteConfig,reset:function(){K.reset()},globalReset:function(){K.reset(K.defaultConfig),st(K.getConfig())},defaultConfig:K.defaultConfig});Object(s.setLogLevel)(K.getConfig().logLevel),K.reset(K.getConfig()),e.default=lt},"./src/styles.js":function(t,e,r){"use strict";r.r(e),r.d(e,"calcThemeVariables",(function(){return p}));var n=r("./src/diagrams/class/styles.js"),i=r("./src/diagrams/er/styles.js"),a=r("./src/diagrams/flowchart/styles.js"),o=r("./src/diagrams/gantt/styles.js"),s=r("./src/diagrams/git/styles.js"),c=r("./src/diagrams/info/styles.js"),l=r("./src/diagrams/pie/styles.js"),u=r("./src/diagrams/sequence/styles.js"),d=r("./src/diagrams/state/styles.js"),h=r("./src/diagrams/user-journey/styles.js"),f={flowchart:a.default,"flowchart-v2":a.default,sequence:u.default,gantt:o.default,classDiagram:n.default,"classDiagram-v2":n.default,class:n.default,stateDiagram:d.default,state:d.default,git:s.default,info:c.default,pie:l.default,er:i.default,journey:h.default},p=function(t,e){return t.calcColors(e)};e.default=function(t,e,r){return" {\n    font-family: ".concat(r.fontFamily,";\n    font-size: ").concat(r.fontSize,";\n    fill: ").concat(r.textColor,"\n  }\n\n  /* Classes common for multiple diagrams */\n\n  .error-icon {\n    fill: ").concat(r.errorBkgColor,";\n  }\n  .error-text {\n    fill: ").concat(r.errorTextColor,";\n    stroke: ").concat(r.errorTextColor,";\n  }\n\n  .edge-thickness-normal {\n    stroke-width: 2px;\n  }\n  .edge-thickness-thick {\n    stroke-width: 3.5px\n  }\n  .edge-pattern-solid {\n    stroke-dasharray: 0;\n  }\n\n  .edge-pattern-dashed{\n    stroke-dasharray: 3;\n  }\n  .edge-pattern-dotted {\n    stroke-dasharray: 2;\n  }\n\n  .marker {\n    fill: ").concat(r.lineColor,";\n  }\n  .marker.cross {\n    stroke: ").concat(r.lineColor,";\n  }\n\n  svg {\n    font-family: ").concat(r.fontFamily,";\n    font-size: ").concat(r.fontSize,";\n  }\n\n  ").concat(f[t](r),"\n\n  ").concat(e,"\n\n  ").concat(t," { fill: apa;}\n")}},"./src/themes/index.js":function(t,e,r){"use strict";r.r(e);var n=r("./src/themes/theme-base.js"),i=r("./src/themes/theme-dark.js"),a=r("./src/themes/theme-default.js"),o=r("./src/themes/theme-forest.js"),s=r("./src/themes/theme-neutral.js");e.default={base:{getThemeVariables:n.getThemeVariables},dark:{getThemeVariables:i.getThemeVariables},default:{getThemeVariables:a.getThemeVariables},forest:{getThemeVariables:o.getThemeVariables},neutral:{getThemeVariables:s.getThemeVariables}}},"./src/themes/theme-base.js":function(t,e,r){"use strict";r.r(e),r.d(e,"getThemeVariables",(function(){return c}));var n=r("khroma"),i=r("./src/themes/theme-helpers.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.darkMode=!1,this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.fontFamily='"trebuchet ms", verdana, arial',this.fontSize="16px"}var e,r,s;return e=t,(r=[{key:"updateColors",value:function(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#ddd":"#333"),this.secondaryColor=this.secondaryColor||Object(n.adjust)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Object(n.adjust)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Object(i.mkBorder)(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Object(i.mkBorder)(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Object(i.mkBorder)(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Object(i.mkBorder)(this.noteBkgColor,this.darkMode),this.secondaryTextColor=this.secondaryTextColor||Object(n.invert)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Object(n.invert)(this.tertiaryColor),this.lineColor=this.lineColor||Object(n.invert)(this.background),this.textColor=this.textColor||this.primaryTextColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||this.darkMode?Object(n.darken)(this.secondaryColor,30):this.secondaryColor,this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Object(n.darken)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Object(n.invert)(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Object(n.lighten)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.labelColor=this.labelColor||this.primaryTextColor,this.altBackground=this.altBackground||this.tertiaryColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Object(n.adjust)(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Object(n.adjust)(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Object(n.adjust)(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Object(n.adjust)(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Object(n.adjust)(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Object(n.adjust)(this.secondaryColor,{h:128})}},{key:"calculate",value:function(t){var e=this;if("object"===a(t)){var r=Object.keys(t);r.forEach((function(r){e[r]=t[r]})),this.updateColors(),r.forEach((function(r){e[r]=t[r]}))}else this.updateColors()}}])&&o(e.prototype,r),s&&o(e,s),t}(),c=function(t){var e=new s;return e.calculate(t),e}},"./src/themes/theme-dark.js":function(t,e,r){"use strict";r.r(e),r.d(e,"getThemeVariables",(function(){return c}));var n=r("khroma"),i=r("./src/themes/theme-helpers.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Object(n.lighten)(this.primaryColor,16),this.tertiaryColor=Object(n.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=Object(i.mkBorder)(this.primaryColor,this.darkMode),this.secondaryBorderColor=Object(i.mkBorder)(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Object(i.mkBorder)(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(n.invert)(this.primaryColor),this.secondaryTextColor=Object(n.invert)(this.secondaryColor),this.tertiaryTextColor=Object(n.invert)(this.tertiaryColor),this.lineColor=Object(n.invert)(this.background),this.textColor=Object(n.invert)(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Object(n.lighten)(Object(n.invert)("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=Object(n.rgba)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Object(n.darken)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=Object(n.rgba)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Object(n.rgba)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}var e,r,s;return e=t,(r=[{key:"updateColors",value:function(){this.secondBkg=Object(n.lighten)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=Object(n.lighten)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.border2,this.noteTextColor=this.mainBkg,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=Object(n.lighten)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.labelColor=this.textColor,this.altBackground=Object(n.lighten)(this.background,20),this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(n.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(n.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(n.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(n.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(n.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(n.adjust)(this.secondaryColor,{h:128}),this.classText=this.primaryTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===a(t)){var r=Object.keys(t);r.forEach((function(r){e[r]=t[r]})),this.updateColors(),r.forEach((function(r){e[r]=t[r]}))}else this.updateColors()}}])&&o(e.prototype,r),s&&o(e,s),t}(),c=function(t){var e=new s;return e.calculate(t),console.info("Theme(dark)",{userOverrides:t,theme:e}),e}},"./src/themes/theme-default.js":function(t,e,r){"use strict";r.r(e),r.d(e,"getThemeVariables",(function(){return c}));var n=r("khroma"),i=r("./src/themes/theme-helpers.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Object(n.adjust)(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Object(n.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=Object(i.mkBorder)(this.primaryColor,this.darkMode),this.secondaryBorderColor=Object(i.mkBorder)(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Object(i.mkBorder)(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(n.invert)(this.primaryColor),this.secondaryTextColor=Object(n.invert)(this.secondaryColor),this.tertiaryTextColor=Object(n.invert)(this.tertiaryColor),this.lineColor=Object(n.invert)(this.background),this.textColor=Object(n.invert)(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=Object(n.rgba)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}var e,r,s;return e=t,(r=[{key:"updateColors",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=Object(n.lighten)(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(n.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(n.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(n.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(n.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(n.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(n.adjust)(this.secondaryColor,{h:128})}},{key:"calculate",value:function(t){var e=this;if("object"===a(t)){var r=Object.keys(t);r.forEach((function(r){e[r]=t[r]})),this.updateColors(),r.forEach((function(r){e[r]=t[r]}))}else this.updateColors()}}])&&o(e.prototype,r),s&&o(e,s),t}(),c=function(t){var e=new s;return e.calculate(t),e}},"./src/themes/theme-forest.js":function(t,e,r){"use strict";r.r(e),r.d(e,"getThemeVariables",(function(){return c}));var n=r("khroma"),i=r("./src/themes/theme-helpers.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial',this.fontSize="16px",this.tertiaryColor=Object(n.lighten)("#cde498",10),this.primaryBorderColor=Object(i.mkBorder)(this.primaryColor,this.darkMode),this.secondaryBorderColor=Object(i.mkBorder)(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Object(i.mkBorder)(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(n.invert)(this.primaryColor),this.secondaryTextColor=Object(n.invert)(this.secondaryColor),this.tertiaryTextColor=Object(n.invert)(this.primaryColor),this.lineColor=Object(n.invert)(this.background),this.textColor=Object(n.invert)(this.background),this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}var e,r,s;return e=t,(r=[{key:"updateColors",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=Object(n.darken)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(n.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(n.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(n.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(n.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(n.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(n.adjust)(this.secondaryColor,{h:128})}},{key:"calculate",value:function(t){var e=this;if("object"===a(t)){var r=Object.keys(t);r.forEach((function(r){e[r]=t[r]})),this.updateColors(),r.forEach((function(r){e[r]=t[r]}))}else this.updateColors()}}])&&o(e.prototype,r),s&&o(e,s),t}(),c=function(t){var e=new s;return e.calculate(t),console.info("Theme(forest)",{userOverrides:t,theme:e}),e}},"./src/themes/theme-helpers.js":function(t,e,r){"use strict";r.r(e),r.d(e,"mkBorder",(function(){return i}));var n=r("khroma"),i=function(t,e){return e?Object(n.adjust)(t,{s:-40,l:10}):Object(n.adjust)(t,{s:-40,l:-10})}},"./src/themes/theme-neutral.js":function(t,e,r){"use strict";r.r(e),r.d(e,"getThemeVariables",(function(){return c}));var n=r("khroma"),i=r("./src/themes/theme-helpers.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.primaryColor="#eee",this.contrast="#26a",this.secondaryColor=Object(n.lighten)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Object(n.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=Object(i.mkBorder)(this.primaryColor,this.darkMode),this.secondaryBorderColor=Object(i.mkBorder)(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Object(i.mkBorder)(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(n.invert)(this.primaryColor),this.secondaryTextColor=Object(n.invert)(this.secondaryColor),this.tertiaryTextColor=Object(n.invert)(this.tertiaryColor),this.lineColor=Object(n.invert)(this.background),this.textColor=Object(n.invert)(this.background),this.altBackground=Object(n.lighten)(this.contrast,55),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial',this.fontSize="16px",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}var e,r,s;return e=t,(r=[{key:"updateColors",value:function(){this.secondBkg=Object(n.lighten)(this.contrast,55),this.border2=this.contrast,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=Object(n.lighten)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor=Object(n.darken)(this.note,60),this.noteBkgColor=this.note,this.noteTextColor=this.actorTextColor,this.sectionBkgColor=Object(n.lighten)(this.contrast,30),this.sectionBkgColor2=Object(n.lighten)(this.contrast,30),this.taskBorderColor=Object(n.darken)(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=Object(n.lighten)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Object(n.darken)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(n.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(n.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(n.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(n.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(n.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(n.adjust)(this.secondaryColor,{h:128})}},{key:"calculate",value:function(t){var e=this;if("object"===a(t)){var r=Object.keys(t);r.forEach((function(r){e[r]=t[r]})),this.updateColors(),r.forEach((function(r){e[r]=t[r]}))}else this.updateColors()}}])&&o(e.prototype,r),s&&o(e,s),t}(),c=function(t){var e=new s;return e.calculate(t),console.info("Theme(neutral)",{userOverrides:t,theme:e}),e}},"./src/utils.js":function(t,e,r){"use strict";r.r(e),r.d(e,"detectInit",(function(){return f})),r.d(e,"detectDirective",(function(){return p})),r.d(e,"detectType",(function(){return g})),r.d(e,"isSubstringInArray",(function(){return m})),r.d(e,"interpolateToCurve",(function(){return v})),r.d(e,"formatUrl",(function(){return b})),r.d(e,"runFunc",(function(){return x})),r.d(e,"getStylesFromArray",(function(){return w})),r.d(e,"generateId",(function(){return E})),r.d(e,"random",(function(){return C})),r.d(e,"assignWithDepth",(function(){return T})),r.d(e,"getTextObj",(function(){return O})),r.d(e,"drawSimpleText",(function(){return S})),r.d(e,"wrapLabel",(function(){return A})),r.d(e,"calculateTextHeight",(function(){return D})),r.d(e,"calculateTextWidth",(function(){return B})),r.d(e,"calculateTextDimensions",(function(){return N}));var n=r("d3"),i=r("./src/logger.js"),a=r("@braintree/sanitize-url"),o=r("./src/diagrams/common/common.js");function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var l={curveBasis:n.curveBasis,curveBasisClosed:n.curveBasisClosed,curveBasisOpen:n.curveBasisOpen,curveLinear:n.curveLinear,curveLinearClosed:n.curveLinearClosed,curveMonotoneX:n.curveMonotoneX,curveMonotoneY:n.curveMonotoneY,curveNatural:n.curveNatural,curveStep:n.curveStep,curveStepAfter:n.curveStepAfter,curveStepBefore:n.curveStepBefore},u=/[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,d=/\s*(?:(?:(\w+)(?=:):|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,h=/\s*%%.*\n/gm,f=function(t){var e=p(t,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(e)){var n=e.map((function(t){return t.args}));r=T(r,c(n))}else r=e.args;if(r){var i=g(t);["config"].forEach((function(t){void 0!==r[t]&&("flowchart-v2"===i&&(i="flowchart"),r[i]=r[t],delete r[t])}))}return r},p=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var r=new RegExp("[%]{2}(?![{]".concat(d.source,")(?=[}][%]{2}).*\n"),"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),i.logger.debug("Detecting diagram directive".concat(null!==e?" type:"+e:""," based on the text:").concat(t));for(var n,a=[];null!==(n=u.exec(t));)if(n.index===u.lastIndex&&u.lastIndex++,n&&!e||e&&n[1]&&n[1].match(e)||e&&n[2]&&n[2].match(e)){var o=n[1]?n[1]:n[2],s=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;a.push({type:o,args:s})}return 0===a.length&&a.push({type:t,args:null}),1===a.length?a[0]:a}catch(r){return i.logger.error("ERROR: ".concat(r.message," - Unable to parse directive").concat(null!==e?" type:"+e:""," based on the text:").concat(t)),{type:null,args:null}}},g=function(t){return t=t.replace(u,"").replace(h,"\n"),i.logger.debug("Detecting diagram type based on the text "+t),t.match(/^\s*sequenceDiagram/)?"sequence":t.match(/^\s*gantt/)?"gantt":t.match(/^\s*classDiagram-v2/)?"classDiagram":t.match(/^\s*classDiagram/)?"class":t.match(/^\s*stateDiagram-v2/)?"stateDiagram":t.match(/^\s*stateDiagram/)?"state":t.match(/^\s*gitGraph/)?"git":t.match(/^\s*flowchart/)?"flowchart-v2":t.match(/^\s*info/)?"info":t.match(/^\s*pie/)?"pie":t.match(/^\s*erDiagram/)?"er":t.match(/^\s*journey/)?"journey":"flowchart"},y=function(t,e){var r={};return function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=e?e.apply(void 0,i):i[0];if(o in r)return r[o];var s=t.apply(void 0,i);return r[o]=s,s}},m=function(t,e){for(var r=0;r<e.length;r++)if(e[r].match(t))return r;return-1},v=function(t,e){if(!t)return e;var r="curve".concat(t.charAt(0).toUpperCase()+t.slice(1));return l[r]||e},b=function(t,e){var r=t.trim();if(r)return"loose"!==e.securityLevel?Object(a.sanitizeUrl)(r):r},x=function(t){for(var e,r=t.split("."),n=r.length-1,i=r[n],a=window,o=0;o<n;o++)if(!(a=a[r[o]]))return;for(var s=arguments.length,c=new Array(s>1?s-1:0),l=1;l<s;l++)c[l-1]=arguments[l];(e=a)[i].apply(e,c)},k=function(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0},w=function(t){for(var e="",r="",n=0;n<t.length;n++)void 0!==t[n]&&(t[n].startsWith("color:")||t[n].startsWith("text-align:")?r=r+t[n]+";":e=e+t[n]+";");return{style:e,labelStyle:r}},_=0,E=function(){return _++,"id-"+Math.random().toString(36).substr(2,12)+"-"+_},C=function(t){return function(t){for(var e="",r="0123456789abcdef".length,n=0;n<t;n++)e+="0123456789abcdef".charAt(Math.floor(Math.random()*r));return e}(t.length)},T=function t(e,r,n){var i=Object.assign({depth:2,clobber:!1},n),a=i.depth,o=i.clobber;return Array.isArray(r)&&!Array.isArray(e)?(r.forEach((function(r){return t(e,r,n)})),e):Array.isArray(r)&&Array.isArray(e)?(r.forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),e):void 0===e||a<=0?null!=e&&"object"===s(e)&&"object"===s(r)?Object.assign(e,r):r:(void 0!==r&&"object"===s(e)&&"object"===s(r)&&Object.keys(r).forEach((function(n){"object"!==s(r[n])||void 0!==e[n]&&"object"!==s(e[n])?(o||"object"!==s(e[n])&&"object"!==s(r[n]))&&(e[n]=r[n]):(void 0===e[n]&&(e[n]=Array.isArray(r[n])?[]:{}),e[n]=t(e[n],r[n],{depth:a-1,clobber:o}))})),e)},O=function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0}},S=function(t,e){var r=e.text.replace(o.default.lineBreakRegex," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.style("text-anchor",e.anchor),n.style("font-family",e.fontFamily),n.style("font-size",e.fontSize),n.style("font-weight",e.fontWeight),n.attr("fill",e.fill),void 0!==e.class&&n.attr("class",e.class);var i=n.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.attr("fill",e.fill),i.text(r),n},A=y((function(t,e,r){if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),o.default.lineBreakRegex.test(t))return t;var n=t.split(" "),i=[],a="";return n.forEach((function(t,o){var s=B("".concat(t," "),r),l=B(a,r);if(s>e){var u=j(t,e,"-",r),d=u.hyphenatedStrings,h=u.remainingWord;i.push.apply(i,[a].concat(c(d))),a=h}else l+s>=e?(i.push(a),a=t):a=[a,t].filter(Boolean).join(" ");o+1===n.length&&i.push(a)})),i.filter((function(t){return""!==t})).join(r.joinWith)}),(function(t,e,r){return"".concat(t,"-").concat(e,"-").concat(r.fontSize,"-").concat(r.fontWeight,"-").concat(r.fontFamily,"-").concat(r.joinWith)})),j=y((function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",n=arguments.length>3?arguments[3]:void 0;n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);var i=t.split(""),a=[],o="";return i.forEach((function(t,s){var c="".concat(o).concat(t);if(B(c,n)>=e){var l=s+1,u=i.length===l,d="".concat(c).concat(r);a.push(u?c:d),o=""}else o=c})),{hyphenatedStrings:a,remainingWord:o}}),(function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",n=arguments.length>3?arguments[3]:void 0;return"".concat(t,"-").concat(e,"-").concat(r,"-").concat(n.fontSize,"-").concat(n.fontWeight,"-").concat(n.fontFamily)})),D=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),N(t,e).height},B=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),N(t,e).width},N=y((function(t,e){var r=e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),i=r.fontSize,a=r.fontFamily,s=r.fontWeight;if(!t)return{width:0,height:0};var c=["sans-serif",a],l=t.split(o.default.lineBreakRegex),u=[],d=Object(n.select)("body");if(!d.remove)return{width:0,height:0,lineHeight:0};for(var h=d.append("svg"),f=0,p=c;f<p.length;f++){var g=p[f],y=0,m={width:0,height:0,lineHeight:0},v=!0,b=!1,x=void 0;try{for(var k,w=l[Symbol.iterator]();!(v=(k=w.next()).done);v=!0){var _=k.value,E=O();E.text=_;var C=S(h,E).style("font-size",i).style("font-weight",s).style("font-family",g),T=(C._groups||C)[0][0].getBBox();m.width=Math.round(Math.max(m.width,T.width)),y=Math.round(T.height),m.height+=y,m.lineHeight=Math.round(Math.max(m.lineHeight,y))}}catch(t){b=!0,x=t}finally{try{v||null==w.return||w.return()}finally{if(b)throw x}}u.push(m)}return h.remove(),u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]}),(function(t,e){return"".concat(t,"-").concat(e.fontSize,"-").concat(e.fontWeight,"-").concat(e.fontFamily)}));e.default={assignWithDepth:T,wrapLabel:A,calculateTextHeight:D,calculateTextWidth:B,calculateTextDimensions:N,detectInit:f,detectDirective:p,detectType:g,isSubstringInArray:m,interpolateToCurve:v,calcLabelPosition:function(t){return function(t){var e,r=0;t.forEach((function(t){r+=k(t,e),e=t}));var n=r/2,i=void 0;return e=void 0,t.forEach((function(t){if(e&&!i){var r=k(t,e);if(r<n)n-=r;else{var a=n/r;a<=0&&(i=e),a>=1&&(i={x:t.x,y:t.y}),a>0&&a<1&&(i={x:(1-a)*e.x+a*t.x,y:(1-a)*e.y+a*t.y})}}e=t})),i}(t)},calcCardinalityPosition:function(t,e,r){var n;e[0]!==r&&(e=e.reverse()),e.forEach((function(t){k(t,n),n=t}));var i,a=25;n=void 0,e.forEach((function(t){if(n&&!i){var e=k(t,n);if(e<a)a-=e;else{var r=a/e;r<=0&&(i=n),r>=1&&(i={x:t.x,y:t.y}),r>0&&r<1&&(i={x:(1-r)*n.x+r*t.x,y:(1-r)*n.y+r*t.y})}}n=t}));var o=t?10:5,s=Math.atan2(e[0].y-i.y,e[0].x-i.x),c={x:0,y:0};return c.x=Math.sin(s)*o+(e[0].x+i.x)/2,c.y=-Math.cos(s)*o+(e[0].y+i.y)/2,c},formatUrl:b,getStylesFromArray:w,generateId:E,random:C,memoize:y,runFunc:x}},"@braintree/sanitize-url":function(t,e){t.exports=r(236)},d3:function(t,e){t.exports=r(6)},dagre:function(t,e){t.exports=r(114)},"dagre-d3":function(t,e){t.exports=r(330)},"dagre-d3/lib/label/add-html-label.js":function(t,e){t.exports=r(150)},"entity-decode/browser":function(t,e){t.exports=r(347)},graphlib:function(t,e){t.exports=r(75)},khroma:function(t,e){t.exports=r(348)},"moment-mini":function(t,e){t.exports=r(375)},stylis:function(t,e){t.exports=r(377)}}).default},t.exports=n()},function(t,e,r){var n=r(27),i=r(35),a=r(5),o=n?n.isConcatSpreadable:void 0;t.exports=function(t){return a(t)||i(t)||!!(o&&t&&t[o])}},function(t,e,r){var n=r(23),i=r(16);t.exports=function(t){return i(t)&&"[object Arguments]"==n(t)}},function(t,e,r){var n=r(27),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=n?n.toStringTag:void 0;t.exports=function(t){var e=a.call(t,s),r=t[s];try{t[s]=void 0;var n=!0}catch(t){}var i=o.call(t);return n&&(e?t[s]=r:delete t[s]),i}},function(t,e){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,e){t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},function(t,e,r){var n=r(63),i=r(91),a=r(24),o=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:a;t.exports=o},function(t,e,r){var n=r(28),i=r(170),a=r(8),o=r(92),s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,h=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!a(t)||i(t))&&(n(t)?h:s).test(o(t))}},function(t,e,r){var n,i=r(171),a=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!a&&a in t}},function(t,e,r){var n=r(13)["__core-js_shared__"];t.exports=n},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e){var r=Date.now;t.exports=function(t){var e=0,n=0;return function(){var i=r(),a=16-(i-n);if(n=i,a>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,r){var n=r(93),i=r(194),a=r(198),o=r(95),s=r(199),c=r(66);t.exports=function(t,e,r){var l=-1,u=i,d=t.length,h=!0,f=[],p=f;if(r)h=!1,u=a;else if(d>=200){var g=e?null:s(t);if(g)return c(g);h=!1,u=o,p=new n}else p=e?[]:f;t:for(;++l<d;){var y=t[l],m=e?e(y):y;if(y=r||0!==y?y:0,h&&m==m){for(var v=p.length;v--;)if(p[v]===m)continue t;e&&p.push(m),f.push(y)}else u(p,m,r)||(p!==f&&p.push(m),f.push(y))}return f}},function(t,e,r){var n=r(176),i=r(42),a=r(65);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||i),string:new n}}},function(t,e,r){var n=r(177),i=r(178),a=r(179),o=r(180),s=r(181);function c(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},function(t,e,r){var n=r(41);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,r){var n=r(41),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(e,t)?e[t]:void 0}},function(t,e,r){var n=r(41),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:i.call(e,t)}},function(t,e,r){var n=r(41);t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,r){var n=r(43),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0)&&(r==e.length-1?e.pop():i.call(e,r,1),--this.size,!0)}},function(t,e,r){var n=r(43);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},function(t,e,r){var n=r(43);t.exports=function(t){return n(this.__data__,t)>-1}},function(t,e,r){var n=r(43);t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},function(t,e,r){var n=r(44);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(44);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(44);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(44);t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,r){var n=r(195);t.exports=function(t,e){return!!(null==t?0:t.length)&&n(t,e,0)>-1}},function(t,e,r){var n=r(94),i=r(196),a=r(197);t.exports=function(t,e,r){return e==e?a(t,e,r):n(t,i,r)}},function(t,e){t.exports=function(t){return t!=t}},function(t,e){t.exports=function(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}},function(t,e){t.exports=function(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}},function(t,e,r){var n=r(96),i=r(200),a=r(66),o=n&&1/a(new n([,-0]))[1]==1/0?function(t){return new n(t)}:i;t.exports=o},function(t,e){t.exports=function(){}},function(t,e,r){var n=r(45),i=r(18),a=r(113),o=r(233),s=r(49),c=r(234),l=r(24);t.exports=function(t,e,r){var u=-1;e=n(e.length?e:[l],s(i));var d=a(t,(function(t,r,i){return{criteria:n(e,(function(e){return e(t)})),index:++u,value:t}}));return o(d,(function(t,e){return c(t,e,r)}))}},function(t,e,r){var n=r(203),i=r(221),a=r(108);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?a(e[0][0],e[0][1]):function(r){return r===t||n(r,t,e)}}},function(t,e,r){var n=r(46),i=r(98);t.exports=function(t,e,r,a){var o=r.length,s=o,c=!a;if(null==t)return!s;for(t=Object(t);o--;){var l=r[o];if(c&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++o<s;){var u=(l=r[o])[0],d=t[u],h=l[1];if(c&&l[2]){if(void 0===d&&!(u in t))return!1}else{var f=new n;if(a)var p=a(d,h,u,t,e,f);if(!(void 0===p?i(h,d,3,a,f):p))return!1}}return!0}},function(t,e,r){var n=r(42);t.exports=function(){this.__data__=new n,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,r){var n=r(42),i=r(65),a=r(64);t.exports=function(t,e){var r=this.__data__;if(r instanceof n){var o=r.__data__;if(!i||o.length<199)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new a(o)}return r.set(t,e),this.size=r.size,this}},function(t,e,r){var n=r(46),i=r(99),a=r(211),o=r(213),s=r(31),c=r(5),l=r(30),u=r(36),d="[object Object]",h=Object.prototype.hasOwnProperty;t.exports=function(t,e,r,f,p,g){var y=c(t),m=c(e),v=y?"[object Array]":s(t),b=m?"[object Array]":s(e),x=(v="[object Arguments]"==v?d:v)==d,k=(b="[object Arguments]"==b?d:b)==d,w=v==b;if(w&&l(t)){if(!l(e))return!1;y=!0,x=!1}if(w&&!x)return g||(g=new n),y||u(t)?i(t,e,r,f,p,g):a(t,e,v,r,f,p,g);if(!(1&r)){var _=x&&h.call(t,"__wrapped__"),E=k&&h.call(e,"__wrapped__");if(_||E){var C=_?t.value():t,T=E?e.value():e;return g||(g=new n),p(C,T,r,f,g)}}return!!w&&(g||(g=new n),o(t,e,r,f,p,g))}},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}},function(t,e,r){var n=r(27),i=r(100),a=r(29),o=r(99),s=r(212),c=r(66),l=n?n.prototype:void 0,u=l?l.valueOf:void 0;t.exports=function(t,e,r,n,l,d,h){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!d(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var f=s;case"[object Set]":var p=1&n;if(f||(f=c),t.size!=e.size&&!p)return!1;var g=h.get(t);if(g)return g==e;n|=2,h.set(t,e);var y=o(f(t),f(e),n,l,d,h);return h.delete(t),y;case"[object Symbol]":if(u)return u.call(t)==u.call(e)}return!1}},function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}},function(t,e,r){var n=r(101),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,r,a,o,s){var c=1&r,l=n(t),u=l.length;if(u!=n(e).length&&!c)return!1;for(var d=u;d--;){var h=l[d];if(!(c?h in e:i.call(e,h)))return!1}var f=s.get(t);if(f&&s.get(e))return f==e;var p=!0;s.set(t,e),s.set(e,t);for(var g=c;++d<u;){var y=t[h=l[d]],m=e[h];if(a)var v=c?a(m,y,h,e,t,s):a(y,m,h,t,e,s);if(!(void 0===v?y===m||o(y,m,r,a,s):v)){p=!1;break}g||(g="constructor"==h)}if(p&&!g){var b=t.constructor,x=e.constructor;b==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x||(p=!1)}return s.delete(t),s.delete(e),p}},function(t,e){t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},function(t,e){t.exports=function(){return!1}},function(t,e,r){var n=r(23),i=r(67),a=r(16),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,t.exports=function(t){return a(t)&&i(t.length)&&!!o[n(t)]}},function(t,e,r){var n=r(106)(Object.keys,Object);t.exports=n},function(t,e,r){var n=r(25)(r(13),"DataView");t.exports=n},function(t,e,r){var n=r(25)(r(13),"Promise");t.exports=n},function(t,e,r){var n=r(25)(r(13),"WeakMap");t.exports=n},function(t,e,r){var n=r(107),i=r(19);t.exports=function(t){for(var e=i(t),r=e.length;r--;){var a=e[r],o=t[a];e[r]=[a,o,n(o)]}return e}},function(t,e,r){var n=r(98),i=r(223),a=r(110),o=r(72),s=r(107),c=r(108),l=r(37);t.exports=function(t,e){return o(t)&&s(e)?c(l(t),e):function(r){var o=i(r,t);return void 0===o&&o===e?a(r,t):n(e,o,3)}}},function(t,e,r){var n=r(71);t.exports=function(t,e,r){var i=null==t?void 0:n(t,e);return void 0===i?r:i}},function(t,e,r){var n=r(225),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=n((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,r,n,i){e.push(n?i.replace(a,"$1"):r||t)})),e}));t.exports=o},function(t,e,r){var n=r(226);t.exports=function(t){var e=n(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}},function(t,e,r){var n=r(64);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(i.Cache||n),r}i.Cache=n,t.exports=i},function(t,e,r){var n=r(27),i=r(45),a=r(5),o=r(32),s=n?n.prototype:void 0,c=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(a(e))return i(e,t)+"";if(o(e))return c?c.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,r){var n=r(112),i=r(230),a=r(72),o=r(37);t.exports=function(t){return a(t)?n(o(t)):i(t)}},function(t,e,r){var n=r(71);t.exports=function(t){return function(e){return n(e,t)}}},function(t,e){t.exports=function(t){return function(e,r,n){for(var i=-1,a=Object(e),o=n(e),s=o.length;s--;){var c=o[t?s:++i];if(!1===r(a[c],c,a))break}return e}}},function(t,e,r){var n=r(17);t.exports=function(t,e){return function(r,i){if(null==r)return r;if(!n(r))return t(r,i);for(var a=r.length,o=e?a:-1,s=Object(r);(e?o--:++o<a)&&!1!==i(s[o],o,s););return r}}},function(t,e){t.exports=function(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}},function(t,e,r){var n=r(235);t.exports=function(t,e,r){for(var i=-1,a=t.criteria,o=e.criteria,s=a.length,c=r.length;++i<s;){var l=n(a[i],o[i]);if(l)return i>=c?l:l*("desc"==r[i]?-1:1)}return t.index-e.index}},function(t,e,r){var n=r(32);t.exports=function(t,e){if(t!==e){var r=void 0!==t,i=null===t,a=t==t,o=n(t),s=void 0!==e,c=null===e,l=e==e,u=n(e);if(!c&&!u&&!o&&t>e||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&t<e||u&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!l)return-1}return 0}},function(t,e,r){"use strict";var n=/^(%20|\s)*(javascript|data)/im,i=/[^\x20-\x7E]/gim,a=/^([^:]+):/gm,o=[".","/"];t.exports={sanitizeUrl:function(t){if(!t)return"about:blank";var e,r,s=t.replace(i,"").trim();return function(t){return o.indexOf(t[0])>-1}(s)?s:(r=s.match(a))?(e=r[0],n.test(e)?"about:blank":s):"about:blank"}}},function(t,e,r){t.exports={Graph:r(76),version:r(268)}},function(t,e,r){var n=r(115);t.exports=function(t){return n(t,4)}},function(t,e,r){var n=r(38),i=r(19);t.exports=function(t,e){return t&&n(e,i(e),t)}},function(t,e,r){var n=r(38),i=r(33);t.exports=function(t,e){return t&&n(e,i(e),t)}},function(t,e,r){var n=r(8),i=r(50),a=r(242),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return a(t);var e=i(t),r=[];for(var s in t)("constructor"!=s||!e&&o.call(t,s))&&r.push(s);return r}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},function(t,e,r){var n=r(38),i=r(68);t.exports=function(t,e){return n(t,i(t),e)}},function(t,e,r){var n=r(38),i=r(118);t.exports=function(t,e){return n(t,i(t),e)}},function(t,e,r){var n=r(102),i=r(118),a=r(33);t.exports=function(t){return n(t,a,i)}},function(t,e){var r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&r.call(t,"index")&&(n.index=t.index,n.input=t.input),n}},function(t,e,r){var n=r(78),i=r(248),a=r(249),o=r(250),s=r(119);t.exports=function(t,e,r){var c=t.constructor;switch(e){case"[object ArrayBuffer]":return n(t);case"[object Boolean]":case"[object Date]":return new c(+t);case"[object DataView]":return i(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(t,r);case"[object Map]":return new c;case"[object Number]":case"[object String]":return new c(t);case"[object RegExp]":return a(t);case"[object Set]":return new c;case"[object Symbol]":return o(t)}}},function(t,e,r){var n=r(78);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}},function(t,e){var r=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,r.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,r){var n=r(27),i=n?n.prototype:void 0,a=i?i.valueOf:void 0;t.exports=function(t){return a?Object(a.call(t)):{}}},function(t,e,r){var n=r(252),i=r(49),a=r(69),o=a&&a.isMap,s=o?i(o):n;t.exports=s},function(t,e,r){var n=r(31),i=r(16);t.exports=function(t){return i(t)&&"[object Map]"==n(t)}},function(t,e,r){var n=r(254),i=r(49),a=r(69),o=a&&a.isSet,s=o?i(o):n;t.exports=s},function(t,e,r){var n=r(31),i=r(16);t.exports=function(t){return i(t)&&"[object Set]"==n(t)}},function(t,e,r){var n=r(52);t.exports=function(t,e){var r=[];return n(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}},function(t,e){var r=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&r.call(t,e)}},function(t,e,r){var n=r(70),i=r(31),a=r(35),o=r(5),s=r(17),c=r(30),l=r(50),u=r(36),d=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(o(t)||"string"==typeof t||"function"==typeof t.splice||c(t)||u(t)||a(t)))return!t.length;var e=i(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(l(t))return!n(t).length;for(var r in t)if(d.call(t,r))return!1;return!0}},function(t,e){t.exports=function(t,e,r,n){var i=-1,a=null==t?0:t.length;for(n&&a&&(r=t[++i]);++i<a;)r=e(r,t[i],i,t);return r}},function(t,e){t.exports=function(t,e,r,n,i){return i(t,(function(t,i,a){r=n?(n=!1,t):e(r,t,i,a)})),r}},function(t,e,r){var n=r(70),i=r(31),a=r(17),o=r(261),s=r(262);t.exports=function(t){if(null==t)return 0;if(a(t))return o(t)?s(t):t.length;var e=i(t);return"[object Map]"==e||"[object Set]"==e?t.size:n(t).length}},function(t,e,r){var n=r(23),i=r(5),a=r(16);t.exports=function(t){return"string"==typeof t||!i(t)&&a(t)&&"[object String]"==n(t)}},function(t,e,r){var n=r(263),i=r(264),a=r(265);t.exports=function(t){return i(t)?a(t):n(t)}},function(t,e,r){var n=r(112)("length");t.exports=n},function(t,e){var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return r.test(t)}},function(t,e){var r="[\\ud800-\\udfff]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",a="[^\\ud800-\\udfff]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+n+"|"+i+")"+"?",l="[\\ufe0e\\ufe0f]?"+c+("(?:\\u200d(?:"+[a,o,s].join("|")+")[\\ufe0e\\ufe0f]?"+c+")*"),u="(?:"+[a+n+"?",n,o,s,r].join("|")+")",d=RegExp(i+"(?="+i+")|"+u+l,"g");t.exports=function(t){for(var e=d.lastIndex=0;d.test(t);)++e;return e}},function(t,e,r){var n=r(77),i=r(121),a=r(73),o=r(18),s=r(56),c=r(5),l=r(30),u=r(28),d=r(8),h=r(36);t.exports=function(t,e,r){var f=c(t),p=f||l(t)||h(t);if(e=o(e,4),null==r){var g=t&&t.constructor;r=p?f?new g:[]:d(t)&&u(g)?i(s(t)):{}}return(p?n:a)(t,(function(t,n,i){return e(r,t,n,i)})),r}},function(t,e,r){var n=r(45);t.exports=function(t,e){return n(e,(function(e){return t[e]}))}},function(t,e){t.exports="2.1.8"},function(t,e,r){var n=r(9),i=r(76);function a(t){return n.map(t.nodes(),(function(e){var r=t.node(e),i=t.parent(e),a={v:e};return n.isUndefined(r)||(a.value=r),n.isUndefined(i)||(a.parent=i),a}))}function o(t){return n.map(t.edges(),(function(e){var r=t.edge(e),i={v:e.v,w:e.w};return n.isUndefined(e.name)||(i.name=e.name),n.isUndefined(r)||(i.value=r),i}))}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:a(t),edges:o(t)};n.isUndefined(t.graph())||(e.value=n.clone(t.graph()));return e},read:function(t){var e=new i(t.options).setGraph(t.value);return n.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),n.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}}},function(t,e,r){t.exports={components:r(271),dijkstra:r(129),dijkstraAll:r(272),findCycles:r(273),floydWarshall:r(274),isAcyclic:r(275),postorder:r(276),preorder:r(277),prim:r(278),tarjan:r(131),topsort:r(132)}},function(t,e,r){var n=r(9);t.exports=function(t){var e,r={},i=[];function a(i){n.has(r,i)||(r[i]=!0,e.push(i),n.each(t.successors(i),a),n.each(t.predecessors(i),a))}return n.each(t.nodes(),(function(t){e=[],a(t),e.length&&i.push(e)})),i}},function(t,e,r){var n=r(129),i=r(9);t.exports=function(t,e,r){return i.transform(t.nodes(),(function(i,a){i[a]=n(t,a,e,r)}),{})}},function(t,e,r){var n=r(9),i=r(131);t.exports=function(t){return n.filter(i(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},function(t,e,r){var n=r(9);t.exports=function(t,e,r){return function(t,e,r){var n={},i=t.nodes();return i.forEach((function(t){n[t]={},n[t][t]={distance:0},i.forEach((function(e){t!==e&&(n[t][e]={distance:Number.POSITIVE_INFINITY})})),r(t).forEach((function(r){var i=r.v===t?r.w:r.v,a=e(r);n[t][i]={distance:a,predecessor:t}}))})),i.forEach((function(t){var e=n[t];i.forEach((function(r){var a=n[r];i.forEach((function(r){var n=a[t],i=e[r],o=a[r],s=n.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)}))}))})),n}(t,e||i,r||function(e){return t.outEdges(e)})};var i=n.constant(1)},function(t,e,r){var n=r(132);t.exports=function(t){try{n(t)}catch(t){if(t instanceof n.CycleException)return!1;throw t}return!0}},function(t,e,r){var n=r(133);t.exports=function(t,e){return n(t,e,"post")}},function(t,e,r){var n=r(133);t.exports=function(t,e){return n(t,e,"pre")}},function(t,e,r){var n=r(9),i=r(76),a=r(130);t.exports=function(t,e){var r,o=new i,s={},c=new a;function l(t){var n=t.v===r?t.w:t.v,i=c.priority(n);if(void 0!==i){var a=e(t);a<i&&(s[n]=r,c.decrease(n,a))}}if(0===t.nodeCount())return o;n.each(t.nodes(),(function(t){c.add(t,Number.POSITIVE_INFINITY),o.setNode(t)})),c.decrease(t.nodes()[0],0);var u=!1;for(;c.size()>0;){if(r=c.removeMin(),n.has(s,r))o.setEdge(r,s[r]);else{if(u)throw new Error("Input graph is not connected: "+t);u=!0}t.nodeEdges(r).forEach(l)}return o}},function(t,e,r){"use strict";var n=r(2),i=r(307),a=r(310),o=r(311),s=r(7).normalizeRanks,c=r(313),l=r(7).removeEmptyRanks,u=r(314),d=r(315),h=r(316),f=r(317),p=r(326),g=r(7),y=r(14).Graph;t.exports=function(t,e){var r=e&&e.debugTiming?g.time:g.notime;r("layout",(function(){var e=r("  buildLayoutGraph",(function(){return function(t){var e=new y({multigraph:!0,compound:!0}),r=T(t.graph());return e.setGraph(n.merge({},v,C(r,m),n.pick(r,b))),n.forEach(t.nodes(),(function(r){var i=T(t.node(r));e.setNode(r,n.defaults(C(i,x),k)),e.setParent(r,t.parent(r))})),n.forEach(t.edges(),(function(r){var i=T(t.edge(r));e.setEdge(r,n.merge({},_,C(i,w),n.pick(i,E)))})),e}(t)}));r("  runLayout",(function(){!function(t,e){e("    makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,n.forEach(t.edges(),(function(r){var n=t.edge(r);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)}))}(t)})),e("    removeSelfEdges",(function(){!function(t){n.forEach(t.edges(),(function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e("    acyclic",(function(){i.run(t)})),e("    nestingGraph.run",(function(){u.run(t)})),e("    rank",(function(){o(g.asNonCompoundGraph(t))})),e("    injectEdgeLabelProxies",(function(){!function(t){n.forEach(t.edges(),(function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),i={rank:(t.node(e.w).rank-n.rank)/2+n.rank,e:e};g.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e("    removeEmptyRanks",(function(){l(t)})),e("    nestingGraph.cleanup",(function(){u.cleanup(t)})),e("    normalizeRanks",(function(){s(t)})),e("    assignRankMinMax",(function(){!function(t){var e=0;n.forEach(t.nodes(),(function(r){var i=t.node(r);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=n.max(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e("    removeEdgeLabelProxies",(function(){!function(t){n.forEach(t.nodes(),(function(e){var r=t.node(e);"edge-proxy"===r.dummy&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))}))}(t)})),e("    normalize.run",(function(){a.run(t)})),e("    parentDummyChains",(function(){c(t)})),e("    addBorderSegments",(function(){d(t)})),e("    order",(function(){f(t)})),e("    insertSelfEdges",(function(){!function(t){var e=g.buildLayerMatrix(t);n.forEach(e,(function(e){var r=0;n.forEach(e,(function(e,i){var a=t.node(e);a.order=i+r,n.forEach(a.selfEdges,(function(e){g.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:a.rank,order:i+ ++r,e:e.e,label:e.label},"_se")})),delete a.selfEdges}))}))}(t)})),e("    adjustCoordinateSystem",(function(){h.adjust(t)})),e("    position",(function(){p(t)})),e("    positionSelfEdges",(function(){!function(t){n.forEach(t.nodes(),(function(e){var r=t.node(e);if("selfedge"===r.dummy){var n=t.node(r.e.v),i=n.x+n.width/2,a=n.y,o=r.x-i,s=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],r.label.x=r.x,r.label.y=r.y}}))}(t)})),e("    removeBorderNodes",(function(){!function(t){n.forEach(t.nodes(),(function(e){if(t.children(e).length){var r=t.node(e),i=t.node(r.borderTop),a=t.node(r.borderBottom),o=t.node(n.last(r.borderLeft)),s=t.node(n.last(r.borderRight));r.width=Math.abs(s.x-o.x),r.height=Math.abs(a.y-i.y),r.x=o.x+r.width/2,r.y=i.y+r.height/2}})),n.forEach(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e("    normalize.undo",(function(){a.undo(t)})),e("    fixupEdgeLabelCoords",(function(){!function(t){n.forEach(t.edges(),(function(e){var r=t.edge(e);if(n.has(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}}))}(t)})),e("    undoCoordinateSystem",(function(){h.undo(t)})),e("    translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,a=0,o=t.graph(),s=o.marginx||0,c=o.marginy||0;function l(t){var n=t.x,o=t.y,s=t.width,c=t.height;e=Math.min(e,n-s/2),r=Math.max(r,n+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}n.forEach(t.nodes(),(function(e){l(t.node(e))})),n.forEach(t.edges(),(function(e){var r=t.edge(e);n.has(r,"x")&&l(r)})),e-=s,i-=c,n.forEach(t.nodes(),(function(r){var n=t.node(r);n.x-=e,n.y-=i})),n.forEach(t.edges(),(function(r){var a=t.edge(r);n.forEach(a.points,(function(t){t.x-=e,t.y-=i})),n.has(a,"x")&&(a.x-=e),n.has(a,"y")&&(a.y-=i)})),o.width=r-e+s,o.height=a-i+c}(t)})),e("    assignNodeIntersects",(function(){!function(t){n.forEach(t.edges(),(function(e){var r,n,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(r=i.points[0],n=i.points[i.points.length-1]):(i.points=[],r=o,n=a),i.points.unshift(g.intersectRect(a,r)),i.points.push(g.intersectRect(o,n))}))}(t)})),e("    reversePoints",(function(){!function(t){n.forEach(t.edges(),(function(e){var r=t.edge(e);r.reversed&&r.points.reverse()}))}(t)})),e("    acyclic.undo",(function(){i.undo(t)}))}(e,r)})),r("  updateInputGraph",(function(){!function(t,e){n.forEach(t.nodes(),(function(r){var n=t.node(r),i=e.node(r);n&&(n.x=i.x,n.y=i.y,e.children(r).length&&(n.width=i.width,n.height=i.height))})),n.forEach(t.edges(),(function(r){var i=t.edge(r),a=e.edge(r);i.points=a.points,n.has(a,"x")&&(i.x=a.x,i.y=a.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))};var m=["nodesep","edgesep","ranksep","marginx","marginy"],v={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],x=["width","height"],k={width:0,height:0},w=["minlen","weight","width","height","labeloffset"],_={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},E=["labelpos"];function C(t,e){return n.mapValues(n.pick(t,e),Number)}function T(t){var e={};return n.forEach(t,(function(t,r){e[r.toLowerCase()]=t})),e}},function(t,e,r){var n=r(115);t.exports=function(t){return n(t,5)}},function(t,e,r){var n=r(282)(r(283));t.exports=n},function(t,e,r){var n=r(18),i=r(17),a=r(19);t.exports=function(t){return function(e,r,o){var s=Object(e);if(!i(e)){var c=n(r,3);e=a(e),r=function(t){return c(s[t],t,s)}}var l=t(e,r,o);return l>-1?s[c?e[l]:l]:void 0}}},function(t,e,r){var n=r(94),i=r(18),a=r(284),o=Math.max;t.exports=function(t,e,r){var s=null==t?0:t.length;if(!s)return-1;var c=null==r?0:a(r);return c<0&&(c=o(s+c,0)),n(t,i(e,3),c)}},function(t,e,r){var n=r(135);t.exports=function(t){var e=n(t),r=e%1;return e==e?r?e-r:e:0}},function(t,e,r){var n=r(8),i=r(32),a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(n(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=n(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(a,"");var r=s.test(t);return r||c.test(t)?l(t.slice(2),r?2:8):o.test(t)?NaN:+t}},function(t,e,r){var n=r(74),i=r(123),a=r(33);t.exports=function(t,e){return null==t?t:n(t,i(e),a)}},function(t,e){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},function(t,e,r){var n=r(55),i=r(73),a=r(18);t.exports=function(t,e){var r={};return e=a(e,3),i(t,(function(t,i,a){n(r,i,e(t,i,a))})),r}},function(t,e,r){var n=r(81),i=r(290),a=r(24);t.exports=function(t){return t&&t.length?n(t,a,i):void 0}},function(t,e){t.exports=function(t,e){return t>e}},function(t,e,r){var n=r(292),i=r(295)((function(t,e,r){n(t,e,r)}));t.exports=i},function(t,e,r){var n=r(46),i=r(137),a=r(74),o=r(293),s=r(8),c=r(33),l=r(139);t.exports=function t(e,r,u,d,h){e!==r&&a(r,(function(a,c){if(h||(h=new n),s(a))o(e,r,c,u,t,d,h);else{var f=d?d(l(e,c),a,c+"",e,r,h):void 0;void 0===f&&(f=a),i(e,c,f)}}),c)}},function(t,e,r){var n=r(137),i=r(116),a=r(119),o=r(117),s=r(120),c=r(35),l=r(5),u=r(97),d=r(30),h=r(28),f=r(8),p=r(138),g=r(36),y=r(139),m=r(294);t.exports=function(t,e,r,v,b,x,k){var w=y(t,r),_=y(e,r),E=k.get(_);if(E)n(t,r,E);else{var C=x?x(w,_,r+"",t,e,k):void 0,T=void 0===C;if(T){var O=l(_),S=!O&&d(_),A=!O&&!S&&g(_);C=_,O||S||A?l(w)?C=w:u(w)?C=o(w):S?(T=!1,C=i(_,!0)):A?(T=!1,C=a(_,!0)):C=[]:p(_)||c(_)?(C=w,c(w)?C=m(w):f(w)&&!h(w)||(C=s(_))):T=!1}T&&(k.set(_,C),b(C,_,v,x,k),k.delete(_)),n(t,r,C)}}},function(t,e,r){var n=r(38),i=r(33);t.exports=function(t){return n(t,i(t))}},function(t,e,r){var n=r(40),i=r(53);t.exports=function(t){return n((function(e,r){var n=-1,a=r.length,o=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,s&&i(r[0],r[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++n<a;){var c=r[n];c&&t(e,c,n,o)}return e}))}},function(t,e,r){var n=r(81),i=r(140),a=r(24);t.exports=function(t){return t&&t.length?n(t,a,i):void 0}},function(t,e,r){var n=r(81),i=r(18),a=r(140);t.exports=function(t,e){return t&&t.length?n(t,i(e,2),a):void 0}},function(t,e,r){var n=r(13);t.exports=function(){return n.Date.now()}},function(t,e,r){var n=r(300),i=r(110);t.exports=function(t,e){return n(t,e,(function(e,r){return i(t,r)}))}},function(t,e,r){var n=r(71),i=r(301),a=r(51);t.exports=function(t,e,r){for(var o=-1,s=e.length,c={};++o<s;){var l=e[o],u=n(t,l);r(u,l)&&i(c,a(l,t),u)}return c}},function(t,e,r){var n=r(54),i=r(51),a=r(48),o=r(8),s=r(37);t.exports=function(t,e,r,c){if(!o(t))return t;for(var l=-1,u=(e=i(e,t)).length,d=u-1,h=t;null!=h&&++l<u;){var f=s(e[l]),p=r;if(l!=d){var g=h[f];void 0===(p=c?c(g,f,h):void 0)&&(p=o(g)?g:a(e[l+1])?[]:{})}n(h,f,p),h=h[f]}return t}},function(t,e,r){var n=r(136),i=r(89),a=r(90);t.exports=function(t){return a(i(t,void 0,n),t+"")}},function(t,e,r){var n=r(304),i=r(53),a=r(135);t.exports=function(t){return function(e,r,o){return o&&"number"!=typeof o&&i(e,r,o)&&(r=o=void 0),e=a(e),void 0===r?(r=e,e=0):r=a(r),o=void 0===o?e<r?1:-1:a(o),n(e,r,o,t)}}},function(t,e){var r=Math.ceil,n=Math.max;t.exports=function(t,e,i,a){for(var o=-1,s=n(r((e-t)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=t,t+=i;return c}},function(t,e,r){var n=r(54),i=r(306);t.exports=function(t,e){return i(t||[],e||[],n)}},function(t,e){t.exports=function(t,e,r){for(var n=-1,i=t.length,a=e.length,o={};++n<i;){var s=n<a?e[n]:void 0;r(o,t[n],s)}return o}},function(t,e,r){"use strict";var n=r(2),i=r(308);t.exports={run:function(t){var e="greedy"===t.graph().acyclicer?i(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],r={},i={};function a(o){n.has(i,o)||(i[o]=!0,r[o]=!0,n.forEach(t.outEdges(o),(function(t){n.has(r,t.w)?e.push(t):a(t.w)})),delete r[o])}return n.forEach(t.nodes(),a),e}(t);n.forEach(e,(function(e){var r=t.edge(e);t.removeEdge(e),r.forwardName=e.name,r.reversed=!0,t.setEdge(e.w,e.v,r,n.uniqueId("rev"))}))},undo:function(t){n.forEach(t.edges(),(function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var n=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,n)}}))}}},function(t,e,r){var n=r(2),i=r(14).Graph,a=r(309);t.exports=function(t,e){if(t.nodeCount()<=1)return[];var r=function(t,e){var r=new i,o=0,s=0;n.forEach(t.nodes(),(function(t){r.setNode(t,{v:t,in:0,out:0})})),n.forEach(t.edges(),(function(t){var n=r.edge(t.v,t.w)||0,i=e(t),a=n+i;r.setEdge(t.v,t.w,a),s=Math.max(s,r.node(t.v).out+=i),o=Math.max(o,r.node(t.w).in+=i)}));var l=n.range(s+o+3).map((function(){return new a})),u=o+1;return n.forEach(r.nodes(),(function(t){c(l,u,r.node(t))})),{graph:r,buckets:l,zeroIdx:u}}(t,e||o),l=function(t,e,r){var n,i=[],a=e[e.length-1],o=e[0];for(;t.nodeCount();){for(;n=o.dequeue();)s(t,e,r,n);for(;n=a.dequeue();)s(t,e,r,n);if(t.nodeCount())for(var c=e.length-2;c>0;--c)if(n=e[c].dequeue()){i=i.concat(s(t,e,r,n,!0));break}}return i}(r.graph,r.buckets,r.zeroIdx);return n.flatten(n.map(l,(function(e){return t.outEdges(e.v,e.w)})),!0)};var o=n.constant(1);function s(t,e,r,i,a){var o=a?[]:void 0;return n.forEach(t.inEdges(i.v),(function(n){var i=t.edge(n),s=t.node(n.v);a&&o.push({v:n.v,w:n.w}),s.out-=i,c(e,r,s)})),n.forEach(t.outEdges(i.v),(function(n){var i=t.edge(n),a=n.w,o=t.node(a);o.in-=i,c(e,r,o)})),t.removeNode(i.v),o}function c(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}},function(t,e){function r(){var t={};t._next=t._prev=t,this._sentinel=t}function n(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function i(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=r,r.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return n(e),e},r.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&n(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},r.prototype.toString=function(){for(var t=[],e=this._sentinel,r=e._prev;r!==e;)t.push(JSON.stringify(r,i)),r=r._prev;return"["+t.join(", ")+"]"}},function(t,e,r){"use strict";var n=r(2),i=r(7);t.exports={run:function(t){t.graph().dummyChains=[],n.forEach(t.edges(),(function(e){!function(t,e){var r,n,a,o=e.v,s=t.node(o).rank,c=e.w,l=t.node(c).rank,u=e.name,d=t.edge(e),h=d.labelRank;if(l===s+1)return;for(t.removeEdge(e),a=0,++s;s<l;++a,++s)d.points=[],n={width:0,height:0,edgeLabel:d,edgeObj:e,rank:s},r=i.addDummyNode(t,"edge",n,"_d"),s===h&&(n.width=d.width,n.height=d.height,n.dummy="edge-label",n.labelpos=d.labelpos),t.setEdge(o,r,{weight:d.weight},u),0===a&&t.graph().dummyChains.push(r),o=r;t.setEdge(o,c,{weight:d.weight},u)}(t,e)}))},undo:function(t){n.forEach(t.graph().dummyChains,(function(e){var r,n=t.node(e),i=n.edgeLabel;for(t.setEdge(n.edgeObj,i);n.dummy;)r=t.successors(e)[0],t.removeNode(e),i.points.push({x:n.x,y:n.y}),"edge-label"===n.dummy&&(i.x=n.x,i.y=n.y,i.width=n.width,i.height=n.height),e=r,n=t.node(e)}))}}},function(t,e,r){"use strict";var n=r(57).longestPath,i=r(144),a=r(312);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":s(t);break;case"tight-tree":!function(t){n(t),i(t)}(t);break;case"longest-path":o(t);break;default:s(t)}};var o=n;function s(t){a(t)}},function(t,e,r){"use strict";var n=r(2),i=r(144),a=r(57).slack,o=r(57).longestPath,s=r(14).alg.preorder,c=r(14).alg.postorder,l=r(7).simplify;function u(t){t=l(t),o(t);var e,r=i(t);for(f(r),d(r,t);e=g(r);)m(r,t,e,y(r,t,e))}function d(t,e){var r=c(t,t.nodes());r=r.slice(0,r.length-1),n.forEach(r,(function(r){!function(t,e,r){var n=t.node(r).parent;t.edge(r,n).cutvalue=h(t,e,r)}(t,e,r)}))}function h(t,e,r){var i=t.node(r).parent,a=!0,o=e.edge(r,i),s=0;return o||(a=!1,o=e.edge(i,r)),s=o.weight,n.forEach(e.nodeEdges(r),(function(n){var o,c,l=n.v===r,u=l?n.w:n.v;if(u!==i){var d=l===a,h=e.edge(n).weight;if(s+=d?h:-h,o=r,c=u,t.hasEdge(o,c)){var f=t.edge(r,u).cutvalue;s+=d?-f:f}}})),s}function f(t,e){arguments.length<2&&(e=t.nodes()[0]),p(t,{},1,e)}function p(t,e,r,i,a){var o=r,s=t.node(i);return e[i]=!0,n.forEach(t.neighbors(i),(function(a){n.has(e,a)||(r=p(t,e,r,a,i))})),s.low=o,s.lim=r++,a?s.parent=a:delete s.parent,r}function g(t){return n.find(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function y(t,e,r){var i=r.v,o=r.w;e.hasEdge(i,o)||(i=r.w,o=r.v);var s=t.node(i),c=t.node(o),l=s,u=!1;s.lim>c.lim&&(l=c,u=!0);var d=n.filter(e.edges(),(function(e){return u===v(t,t.node(e.v),l)&&u!==v(t,t.node(e.w),l)}));return n.minBy(d,(function(t){return a(e,t)}))}function m(t,e,r,i){var a=r.v,o=r.w;t.removeEdge(a,o),t.setEdge(i.v,i.w,{}),f(t),d(t,e),function(t,e){var r=n.find(t.nodes(),(function(t){return!e.node(t).parent})),i=s(t,r);i=i.slice(1),n.forEach(i,(function(r){var n=t.node(r).parent,i=e.edge(r,n),a=!1;i||(i=e.edge(n,r),a=!0),e.node(r).rank=e.node(n).rank+(a?i.minlen:-i.minlen)}))}(t,e)}function v(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}t.exports=u,u.initLowLimValues=f,u.initCutValues=d,u.calcCutValue=h,u.leaveEdge=g,u.enterEdge=y,u.exchangeEdges=m},function(t,e,r){var n=r(2);t.exports=function(t){var e=function(t){var e={},r=0;function i(a){var o=r;n.forEach(t.children(a),i),e[a]={low:o,lim:r++}}return n.forEach(t.children(),i),e}(t);n.forEach(t.graph().dummyChains,(function(r){for(var n=t.node(r),i=n.edgeObj,a=function(t,e,r,n){var i,a,o=[],s=[],c=Math.min(e[r].low,e[n].low),l=Math.max(e[r].lim,e[n].lim);i=r;do{i=t.parent(i),o.push(i)}while(i&&(e[i].low>c||l>e[i].lim));a=i,i=n;for(;(i=t.parent(i))!==a;)s.push(i);return{path:o.concat(s.reverse()),lca:a}}(t,e,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;r!==i.w;){if(n=t.node(r),u){for(;(l=o[c])!==s&&t.node(l).maxRank<n.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&t.node(l=o[c+1]).minRank<=n.rank;)c++;l=o[c]}t.setParent(r,l),r=t.successors(r)[0]}}))}},function(t,e,r){var n=r(2),i=r(7);t.exports={run:function(t){var e=i.addDummyNode(t,"root",{},"_root"),r=function(t){var e={};return n.forEach(t.children(),(function(r){!function r(i,a){var o=t.children(i);o&&o.length&&n.forEach(o,(function(t){r(t,a+1)}));e[i]=a}(r,1)})),e}(t),a=n.max(n.values(r))-1,o=2*a+1;t.graph().nestingRoot=e,n.forEach(t.edges(),(function(e){t.edge(e).minlen*=o}));var s=function(t){return n.reduce(t.edges(),(function(e,r){return e+t.edge(r).weight}),0)}(t)+1;n.forEach(t.children(),(function(c){!function t(e,r,a,o,s,c,l){var u=e.children(l);if(!u.length)return void(l!==r&&e.setEdge(r,l,{weight:0,minlen:a}));var d=i.addBorderNode(e,"_bt"),h=i.addBorderNode(e,"_bb"),f=e.node(l);e.setParent(d,l),f.borderTop=d,e.setParent(h,l),f.borderBottom=h,n.forEach(u,(function(n){t(e,r,a,o,s,c,n);var i=e.node(n),u=i.borderTop?i.borderTop:n,f=i.borderBottom?i.borderBottom:n,p=i.borderTop?o:2*o,g=u!==f?1:s-c[l]+1;e.setEdge(d,u,{weight:p,minlen:g,nestingEdge:!0}),e.setEdge(f,h,{weight:p,minlen:g,nestingEdge:!0})})),e.parent(l)||e.setEdge(r,d,{weight:0,minlen:s+c[l]})}(t,e,o,s,a,r,c)})),t.graph().nodeRankFactor=o},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,n.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},function(t,e,r){var n=r(2),i=r(7);function a(t,e,r,n,a,o){var s={width:0,height:0,rank:o,borderType:e},c=a[e][o-1],l=i.addDummyNode(t,"border",s,r);a[e][o]=l,t.setParent(l,n),c&&t.setEdge(c,l,{weight:1})}t.exports=function(t){n.forEach(t.children(),(function e(r){var i=t.children(r),o=t.node(r);if(i.length&&n.forEach(i,e),n.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var s=o.minRank,c=o.maxRank+1;s<c;++s)a(t,"borderLeft","_bl",r,o,s),a(t,"borderRight","_br",r,o,s)}}))}},function(t,e,r){"use strict";var n=r(2);function i(t){n.forEach(t.nodes(),(function(e){a(t.node(e))})),n.forEach(t.edges(),(function(e){a(t.edge(e))}))}function a(t){var e=t.width;t.width=t.height,t.height=e}function o(t){t.y=-t.y}function s(t){var e=t.x;t.x=t.y,t.y=e}t.exports={adjust:function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||i(t)},undo:function(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){n.forEach(t.nodes(),(function(e){o(t.node(e))})),n.forEach(t.edges(),(function(e){var r=t.edge(e);n.forEach(r.points,o),n.has(r,"y")&&o(r)}))}(t);"lr"!==e&&"rl"!==e||(!function(t){n.forEach(t.nodes(),(function(e){s(t.node(e))})),n.forEach(t.edges(),(function(e){var r=t.edge(e);n.forEach(r.points,s),n.has(r,"x")&&s(r)}))}(t),i(t))}}},function(t,e,r){"use strict";var n=r(2),i=r(318),a=r(319),o=r(320),s=r(324),c=r(325),l=r(14).Graph,u=r(7);function d(t,e,r){return n.map(e,(function(e){return s(t,e,r)}))}function h(t,e){var r=new l;n.forEach(t,(function(t){var i=t.graph().root,a=o(t,i,r,e);n.forEach(a.vs,(function(e,r){t.node(e).order=r})),c(t,r,a.vs)}))}function f(t,e){n.forEach(e,(function(e){n.forEach(e,(function(e,r){t.node(e).order=r}))}))}t.exports=function(t){var e=u.maxRank(t),r=d(t,n.range(1,e+1),"inEdges"),o=d(t,n.range(e-1,-1,-1),"outEdges"),s=i(t);f(t,s);for(var c,l=Number.POSITIVE_INFINITY,p=0,g=0;g<4;++p,++g){h(p%2?r:o,p%4>=2),s=u.buildLayerMatrix(t);var y=a(t,s);y<l&&(g=0,c=n.cloneDeep(s),l=y)}f(t,c)}},function(t,e,r){"use strict";var n=r(2);t.exports=function(t){var e={},r=n.filter(t.nodes(),(function(e){return!t.children(e).length})),i=n.max(n.map(r,(function(e){return t.node(e).rank}))),a=n.map(n.range(i+1),(function(){return[]}));var o=n.sortBy(r,(function(e){return t.node(e).rank}));return n.forEach(o,(function r(i){if(n.has(e,i))return;e[i]=!0;var o=t.node(i);a[o.rank].push(i),n.forEach(t.successors(i),r)})),a}},function(t,e,r){"use strict";var n=r(2);function i(t,e,r){for(var i=n.zipObject(r,n.map(r,(function(t,e){return e}))),a=n.flatten(n.map(e,(function(e){return n.sortBy(n.map(t.outEdges(e),(function(e){return{pos:i[e.w],weight:t.edge(e).weight}})),"pos")})),!0),o=1;o<r.length;)o<<=1;var s=2*o-1;o-=1;var c=n.map(new Array(s),(function(){return 0})),l=0;return n.forEach(a.forEach((function(t){var e=t.pos+o;c[e]+=t.weight;for(var r=0;e>0;)e%2&&(r+=c[e+1]),c[e=e-1>>1]+=t.weight;l+=t.weight*r}))),l}t.exports=function(t,e){for(var r=0,n=1;n<e.length;++n)r+=i(t,e[n-1],e[n]);return r}},function(t,e,r){var n=r(2),i=r(321),a=r(322),o=r(323);t.exports=function t(e,r,s,c){var l=e.children(r),u=e.node(r),d=u?u.borderLeft:void 0,h=u?u.borderRight:void 0,f={};d&&(l=n.filter(l,(function(t){return t!==d&&t!==h})));var p=i(e,l);n.forEach(p,(function(r){if(e.children(r.v).length){var i=t(e,r.v,s,c);f[r.v]=i,n.has(i,"barycenter")&&(a=r,o=i,n.isUndefined(a.barycenter)?(a.barycenter=o.barycenter,a.weight=o.weight):(a.barycenter=(a.barycenter*a.weight+o.barycenter*o.weight)/(a.weight+o.weight),a.weight+=o.weight))}var a,o}));var g=a(p,s);!function(t,e){n.forEach(t,(function(t){t.vs=n.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(g,f);var y=o(g,c);if(d&&(y.vs=n.flatten([d,y.vs,h],!0),e.predecessors(d).length)){var m=e.node(e.predecessors(d)[0]),v=e.node(e.predecessors(h)[0]);n.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+m.order+v.order)/(y.weight+2),y.weight+=2}return y}},function(t,e,r){var n=r(2);t.exports=function(t,e){return n.map(e,(function(e){var r=t.inEdges(e);if(r.length){var i=n.reduce(r,(function(e,r){var n=t.edge(r),i=t.node(r.v);return{sum:e.sum+n.weight*i.order,weight:e.weight+n.weight}}),{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}}))}},function(t,e,r){"use strict";var n=r(2);t.exports=function(t,e){var r={};return n.forEach(t,(function(t,e){var i=r[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};n.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)})),n.forEach(e.edges(),(function(t){var e=r[t.v],i=r[t.w];n.isUndefined(e)||n.isUndefined(i)||(i.indegree++,e.out.push(r[t.w]))})),function(t){var e=[];function r(t){return function(e){e.merged||(n.isUndefined(e.barycenter)||n.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&function(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight);e.weight&&(r+=e.barycenter*e.weight,n+=e.weight);t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function i(e){return function(r){r.in.push(e),0==--r.indegree&&t.push(r)}}for(;t.length;){var a=t.pop();e.push(a),n.forEach(a.in.reverse(),r(a)),n.forEach(a.out,i(a))}return n.map(n.filter(e,(function(t){return!t.merged})),(function(t){return n.pick(t,["vs","i","barycenter","weight"])}))}(n.filter(r,(function(t){return!t.indegree})))}},function(t,e,r){var n=r(2),i=r(7);function a(t,e,r){for(var i;e.length&&(i=n.last(e)).i<=r;)e.pop(),t.push(i.vs),r++;return r}t.exports=function(t,e){var r=i.partition(t,(function(t){return n.has(t,"barycenter")})),o=r.lhs,s=n.sortBy(r.rhs,(function(t){return-t.i})),c=[],l=0,u=0,d=0;o.sort((h=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:h?e.i-t.i:t.i-e.i})),d=a(c,s,d),n.forEach(o,(function(t){d+=t.vs.length,c.push(t.vs),l+=t.barycenter*t.weight,u+=t.weight,d=a(c,s,d)}));var h;var f={vs:n.flatten(c,!0)};u&&(f.barycenter=l/u,f.weight=u);return f}},function(t,e,r){var n=r(2),i=r(14).Graph;t.exports=function(t,e,r){var a=function(t){var e;for(;t.hasNode(e=n.uniqueId("_root")););return e}(t),o=new i({compound:!0}).setGraph({root:a}).setDefaultNodeLabel((function(e){return t.node(e)}));return n.forEach(t.nodes(),(function(i){var s=t.node(i),c=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(o.setNode(i),o.setParent(i,c||a),n.forEach(t[r](i),(function(e){var r=e.v===i?e.w:e.v,a=o.edge(r,i),s=n.isUndefined(a)?0:a.weight;o.setEdge(r,i,{weight:t.edge(e).weight+s})})),n.has(s,"minRank")&&o.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))})),o}},function(t,e,r){var n=r(2);t.exports=function(t,e,r){var i,a={};n.forEach(r,(function(r){for(var n,o,s=t.parent(r);s;){if((n=t.parent(s))?(o=a[n],a[n]=s):(o=i,i=s),o&&o!==s)return void e.setEdge(o,s);s=n}}))}},function(t,e,r){"use strict";var n=r(2),i=r(7),a=r(327).positionX;t.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),r=t.graph().ranksep,a=0;n.forEach(e,(function(e){var i=n.max(n.map(e,(function(e){return t.node(e).height})));n.forEach(e,(function(e){t.node(e).y=a+i/2})),a+=i+r}))})(t=i.asNonCompoundGraph(t)),n.forEach(a(t),(function(e,r){t.node(r).x=e}))}},function(t,e,r){"use strict";var n=r(2),i=r(14).Graph,a=r(7);function o(t,e){var r={};return n.reduce(e,(function(e,i){var a=0,o=0,s=e.length,l=n.last(i);return n.forEach(i,(function(e,u){var d=function(t,e){if(t.node(e).dummy)return n.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),h=d?t.node(d).order:s;(d||e===l)&&(n.forEach(i.slice(o,u+1),(function(e){n.forEach(t.predecessors(e),(function(n){var i=t.node(n),o=i.order;!(o<a||h<o)||i.dummy&&t.node(e).dummy||c(r,n,e)}))})),o=u+1,a=h)})),i})),r}function s(t,e){var r={};function i(e,i,a,o,s){var l;n.forEach(n.range(i,a),(function(i){l=e[i],t.node(l).dummy&&n.forEach(t.predecessors(l),(function(e){var n=t.node(e);n.dummy&&(n.order<o||n.order>s)&&c(r,e,l)}))}))}return n.reduce(e,(function(e,r){var a,o=-1,s=0;return n.forEach(r,(function(n,c){if("border"===t.node(n).dummy){var l=t.predecessors(n);l.length&&(a=t.node(l[0]).order,i(r,s,c,o,a),s=c,o=a)}i(r,s,r.length,a,e.length)})),r})),r}function c(t,e,r){if(e>r){var n=e;e=r,r=n}var i=t[e];i||(t[e]=i={}),i[r]=!0}function l(t,e,r){if(e>r){var i=e;e=r,r=i}return n.has(t[e],r)}function u(t,e,r,i){var a={},o={},s={};return n.forEach(e,(function(t){n.forEach(t,(function(t,e){a[t]=t,o[t]=t,s[t]=e}))})),n.forEach(e,(function(t){var e=-1;n.forEach(t,(function(t){var c=i(t);if(c.length)for(var u=((c=n.sortBy(c,(function(t){return s[t]}))).length-1)/2,d=Math.floor(u),h=Math.ceil(u);d<=h;++d){var f=c[d];o[t]===t&&e<s[f]&&!l(r,t,f)&&(o[f]=t,o[t]=a[t]=a[f],e=s[f])}}))})),{root:a,align:o}}function d(t,e,r,a,o){var s={},c=function(t,e,r,a){var o=new i,s=t.graph(),c=function(t,e,r){return function(i,a,o){var s,c=i.node(a),l=i.node(o),u=0;if(u+=c.width/2,n.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":s=-c.width/2;break;case"r":s=c.width/2}if(s&&(u+=r?s:-s),s=0,u+=(c.dummy?e:t)/2,u+=(l.dummy?e:t)/2,u+=l.width/2,n.has(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":s=l.width/2;break;case"r":s=-l.width/2}return s&&(u+=r?s:-s),s=0,u}}(s.nodesep,s.edgesep,a);return n.forEach(e,(function(e){var i;n.forEach(e,(function(e){var n=r[e];if(o.setNode(n),i){var a=r[i],s=o.edge(a,n);o.setEdge(a,n,Math.max(c(t,e,i),s||0))}i=e}))})),o}(t,e,r,o),l=o?"borderLeft":"borderRight";function u(t,e){for(var r=c.nodes(),n=r.pop(),i={};n;)i[n]?t(n):(i[n]=!0,r.push(n),r=r.concat(e(n))),n=r.pop()}return u((function(t){s[t]=c.inEdges(t).reduce((function(t,e){return Math.max(t,s[e.v]+c.edge(e))}),0)}),c.predecessors.bind(c)),u((function(e){var r=c.outEdges(e).reduce((function(t,e){return Math.min(t,s[e.w]-c.edge(e))}),Number.POSITIVE_INFINITY),n=t.node(e);r!==Number.POSITIVE_INFINITY&&n.borderType!==l&&(s[e]=Math.max(s[e],r))}),c.successors.bind(c)),n.forEach(a,(function(t){s[t]=s[r[t]]})),s}function h(t,e){return n.minBy(n.values(e),(function(e){var r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return n.forIn(e,(function(e,n){var a=function(t,e){return t.node(e).width}(t,n)/2;r=Math.max(e+a,r),i=Math.min(e-a,i)})),r-i}))}function f(t,e){var r=n.values(e),i=n.min(r),a=n.max(r);n.forEach(["u","d"],(function(r){n.forEach(["l","r"],(function(o){var s,c=r+o,l=t[c];if(l!==e){var u=n.values(l);(s="l"===o?i-n.min(u):a-n.max(u))&&(t[c]=n.mapValues(l,(function(t){return t+s})))}}))}))}function p(t,e){return n.mapValues(t.ul,(function(r,i){if(e)return t[e.toLowerCase()][i];var a=n.sortBy(n.map(t,i));return(a[1]+a[2])/2}))}t.exports={positionX:function(t){var e,r=a.buildLayerMatrix(t),i=n.merge(o(t,r),s(t,r)),c={};n.forEach(["u","d"],(function(a){e="u"===a?r:n.values(r).reverse(),n.forEach(["l","r"],(function(r){"r"===r&&(e=n.map(e,(function(t){return n.values(t).reverse()})));var o=("u"===a?t.predecessors:t.successors).bind(t),s=u(t,e,i,o),l=d(t,e,s.root,s.align,"r"===r);"r"===r&&(l=n.mapValues(l,(function(t){return-t}))),c[a+r]=l}))}));var l=h(t,c);return f(c,l),p(c,t.graph().align)},findType1Conflicts:o,findType2Conflicts:s,addConflict:c,hasConflict:l,verticalAlignment:u,horizontalCompaction:d,alignCoordinates:f,findSmallestWidthAlignment:h,balance:p}},function(t,e,r){var n=r(2),i=r(7),a=r(14).Graph;t.exports={debugOrdering:function(t){var e=i.buildLayerMatrix(t),r=new a({compound:!0,multigraph:!0}).setGraph({});return n.forEach(t.nodes(),(function(e){r.setNode(e,{label:e}),r.setParent(e,"layer"+t.node(e).rank)})),n.forEach(t.edges(),(function(t){r.setEdge(t.v,t.w,{},t.name)})),n.forEach(e,(function(t,e){var i="layer"+e;r.setNode(i,{rank:"same"}),n.reduce(t,(function(t,e){return r.setEdge(t,e,{style:"invis"}),e}))})),r}}},function(t,e){t.exports="0.8.5"},function(t,e,r){t.exports={graphlib:r(331),dagre:r(145),intersect:r(332),render:r(334),util:r(10),version:r(346)}},function(t,e,r){var n;try{n=r(75)}catch(t){}n||(n=window.graphlib),t.exports=n},function(t,e,r){t.exports={node:r(146),circle:r(147),ellipse:r(82),polygon:r(148),rect:r(149)}},function(t,e){function r(t,e){return t*e>0}t.exports=function(t,e,n,i){var a,o,s,c,l,u,d,h,f,p,g,y,m;if(a=e.y-t.y,s=t.x-e.x,l=e.x*t.y-t.x*e.y,f=a*n.x+s*n.y+l,p=a*i.x+s*i.y+l,0!==f&&0!==p&&r(f,p))return;if(o=i.y-n.y,c=n.x-i.x,u=i.x*n.y-n.x*i.y,d=o*t.x+c*t.y+u,h=o*e.x+c*e.y+u,0!==d&&0!==h&&r(d,h))return;if(0===(g=a*c-o*s))return;return y=Math.abs(g/2),{x:(m=s*u-c*l)<0?(m-y)/g:(m+y)/g,y:(m=o*l-a*u)<0?(m-y)/g:(m+y)/g}}},function(t,e,r){var n=r(34),i=r(20),a=r(145).layout;t.exports=function(){var t=r(335),e=r(338),i=r(339),l=r(340),u=r(341),d=r(342),h=r(343),f=r(344),p=r(345),g=function(r,g){!function(t){t.nodes().forEach((function(e){var r=t.node(e);n.has(r,"label")||t.children(e).length||(r.label=e),n.has(r,"paddingX")&&n.defaults(r,{paddingLeft:r.paddingX,paddingRight:r.paddingX}),n.has(r,"paddingY")&&n.defaults(r,{paddingTop:r.paddingY,paddingBottom:r.paddingY}),n.has(r,"padding")&&n.defaults(r,{paddingLeft:r.padding,paddingRight:r.padding,paddingTop:r.padding,paddingBottom:r.padding}),n.defaults(r,o),n.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],(function(t){r[t]=Number(r[t])})),n.has(r,"width")&&(r._prevWidth=r.width),n.has(r,"height")&&(r._prevHeight=r.height)})),t.edges().forEach((function(e){var r=t.edge(e);n.has(r,"label")||(r.label=""),n.defaults(r,s)}))}(g);var y=c(r,"output"),m=c(y,"clusters"),v=c(y,"edgePaths"),b=i(c(y,"edgeLabels"),g),x=t(c(y,"nodes"),g,f);a(g),u(x,g),d(b,g),l(v,g,p);var k=e(m,g);h(k,g),function(t){n.each(t.nodes(),(function(e){var r=t.node(e);n.has(r,"_prevWidth")?r.width=r._prevWidth:delete r.width,n.has(r,"_prevHeight")?r.height=r._prevHeight:delete r.height,delete r._prevWidth,delete r._prevHeight}))}(g)};return g.createNodes=function(e){return arguments.length?(t=e,g):t},g.createClusters=function(t){return arguments.length?(e=t,g):e},g.createEdgeLabels=function(t){return arguments.length?(i=t,g):i},g.createEdgePaths=function(t){return arguments.length?(l=t,g):l},g.shapes=function(t){return arguments.length?(f=t,g):f},g.arrows=function(t){return arguments.length?(p=t,g):p},g};var o={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},s={arrowhead:"normal",curve:i.curveLinear};function c(t,e){var r=t.select("g."+e);return r.empty()&&(r=t.append("g").attr("class",e)),r}},function(t,e,r){"use strict";var n=r(34),i=r(83),a=r(10),o=r(20);t.exports=function(t,e,r){var s,c=e.nodes().filter((function(t){return!a.isSubgraph(e,t)})),l=t.selectAll("g.node").data(c,(function(t){return t})).classed("update",!0);l.exit().remove(),l.enter().append("g").attr("class","node").style("opacity",0),(l=t.selectAll("g.node")).each((function(t){var s=e.node(t),c=o.select(this);a.applyClass(c,s.class,(c.classed("update")?"update ":"")+"node"),c.select("g.label").remove();var l=c.append("g").attr("class","label"),u=i(l,s),d=r[s.shape],h=n.pick(u.node().getBBox(),"width","height");s.elem=this,s.id&&c.attr("id",s.id),s.labelId&&l.attr("id",s.labelId),n.has(s,"width")&&(h.width=s.width),n.has(s,"height")&&(h.height=s.height),h.width+=s.paddingLeft+s.paddingRight,h.height+=s.paddingTop+s.paddingBottom,l.attr("transform","translate("+(s.paddingLeft-s.paddingRight)/2+","+(s.paddingTop-s.paddingBottom)/2+")");var f=o.select(this);f.select(".label-container").remove();var p=d(f,h,s).classed("label-container",!0);a.applyStyle(p,s.style);var g=p.node().getBBox();s.width=g.width,s.height=g.height})),s=l.exit?l.exit():l.selectAll(null);return a.applyTransition(s,e).style("opacity",0).remove(),l}},function(t,e,r){var n=r(10);t.exports=function(t,e){for(var r=t.append("text"),i=function(t){for(var e,r="",n=!1,i=0;i<t.length;++i)if(e=t[i],n){switch(e){case"n":r+="\n";break;default:r+=e}n=!1}else"\\"===e?n=!0:r+=e;return r}(e.label).split("\n"),a=0;a<i.length;a++)r.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(i[a]);return n.applyStyle(r,e.labelStyle),r}},function(t,e,r){var n=r(10);t.exports=function(t,e){var r=t;return r.node().appendChild(e.label),n.applyStyle(r,e.labelStyle),r}},function(t,e,r){var n=r(10),i=r(20),a=r(83);t.exports=function(t,e){var r,o=e.nodes().filter((function(t){return n.isSubgraph(e,t)})),s=t.selectAll("g.cluster").data(o,(function(t){return t}));s.selectAll("*").remove(),s.enter().append("g").attr("class","cluster").attr("id",(function(t){return e.node(t).id})).style("opacity",0),s=t.selectAll("g.cluster"),n.applyTransition(s,e).style("opacity",1),s.each((function(t){var r=e.node(t),n=i.select(this);i.select(this).append("rect");var o=n.append("g").attr("class","label");a(o,r,r.clusterLabelPos)})),s.selectAll("rect").each((function(t){var r=e.node(t),a=i.select(this);n.applyStyle(a,r.style)})),r=s.exit?s.exit():s.selectAll(null);return n.applyTransition(r,e).style("opacity",0).remove(),s}},function(t,e,r){"use strict";var n=r(34),i=r(83),a=r(10),o=r(20);t.exports=function(t,e){var r,s=t.selectAll("g.edgeLabel").data(e.edges(),(function(t){return a.edgeToId(t)})).classed("update",!0);s.exit().remove(),s.enter().append("g").classed("edgeLabel",!0).style("opacity",0),(s=t.selectAll("g.edgeLabel")).each((function(t){var r=o.select(this);r.select(".label").remove();var a=e.edge(t),s=i(r,e.edge(t),0,0).classed("label",!0),c=s.node().getBBox();a.labelId&&s.attr("id",a.labelId),n.has(a,"width")||(a.width=c.width),n.has(a,"height")||(a.height=c.height)})),r=s.exit?s.exit():s.selectAll(null);return a.applyTransition(r,e).style("opacity",0).remove(),s}},function(t,e,r){"use strict";var n=r(34),i=r(146),a=r(10),o=r(20);function s(t,e){var r=(o.line||o.svg.line)().x((function(t){return t.x})).y((function(t){return t.y}));return(r.curve||r.interpolate)(t.curve),r(e)}t.exports=function(t,e,r){var c=t.selectAll("g.edgePath").data(e.edges(),(function(t){return a.edgeToId(t)})).classed("update",!0),l=function(t,e){var r=t.enter().append("g").attr("class","edgePath").style("opacity",0);return r.append("path").attr("class","path").attr("d",(function(t){var r=e.edge(t),i=e.node(t.v).elem;return s(r,n.range(r.points.length).map((function(){return e=(t=i).getBBox(),{x:(r=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2)).e,y:r.f};var t,e,r})))})),r.append("defs"),r}(c,e);!function(t,e){var r=t.exit();a.applyTransition(r,e).style("opacity",0).remove()}(c,e);var u=void 0!==c.merge?c.merge(l):c;return a.applyTransition(u,e).style("opacity",1),u.each((function(t){var r=o.select(this),n=e.edge(t);n.elem=this,n.id&&r.attr("id",n.id),a.applyClass(r,n.class,(r.classed("update")?"update ":"")+"edgePath")})),u.selectAll("path.path").each((function(t){var r=e.edge(t);r.arrowheadId=n.uniqueId("arrowhead");var c=o.select(this).attr("marker-end",(function(){return"url("+(t=location.href,e=r.arrowheadId,t.split("#")[0]+"#"+e+")");var t,e})).style("fill","none");a.applyTransition(c,e).attr("d",(function(t){return function(t,e){var r=t.edge(e),n=t.node(e.v),a=t.node(e.w),o=r.points.slice(1,r.points.length-1);return o.unshift(i(n,o[0])),o.push(i(a,o[o.length-1])),s(r,o)}(e,t)})),a.applyStyle(c,r.style)})),u.selectAll("defs *").remove(),u.selectAll("defs").each((function(t){var n=e.edge(t);(0,r[n.arrowhead])(o.select(this),n.arrowheadId,n,"arrowhead")})),u}},function(t,e,r){"use strict";var n=r(10),i=r(20);t.exports=function(t,e){function r(t){var r=e.node(t);return"translate("+r.x+","+r.y+")"}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",r),n.applyTransition(t,e).style("opacity",1).attr("transform",r)}},function(t,e,r){"use strict";var n=r(10),i=r(20),a=r(34);t.exports=function(t,e){function r(t){var r=e.edge(t);return a.has(r,"x")?"translate("+r.x+","+r.y+")":""}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",r),n.applyTransition(t,e).style("opacity",1).attr("transform",r)}},function(t,e,r){"use strict";var n=r(10),i=r(20);t.exports=function(t,e){var r=t.filter((function(){return!i.select(this).classed("update")}));function a(t){var r=e.node(t);return"translate("+r.x+","+r.y+")"}r.attr("transform",a),n.applyTransition(t,e).style("opacity",1).attr("transform",a),n.applyTransition(r.selectAll("rect"),e).attr("width",(function(t){return e.node(t).width})).attr("height",(function(t){return e.node(t).height})).attr("x",(function(t){return-e.node(t).width/2})).attr("y",(function(t){return-e.node(t).height/2}))}},function(t,e,r){"use strict";var n=r(149),i=r(82),a=r(147),o=r(148);t.exports={rect:function(t,e,r){var i=t.insert("rect",":first-child").attr("rx",r.rx).attr("ry",r.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return r.intersect=function(t){return n(r,t)},i},ellipse:function(t,e,r){var n=e.width/2,a=e.height/2,o=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",n).attr("ry",a);return r.intersect=function(t){return i(r,n,a,t)},o},circle:function(t,e,r){var n=Math.max(e.width,e.height)/2,i=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",n);return r.intersect=function(t){return a(r,n,t)},i},diamond:function(t,e,r){var n=e.width*Math.SQRT2/2,i=e.height*Math.SQRT2/2,a=[{x:0,y:-i},{x:-n,y:0},{x:0,y:i},{x:n,y:0}],s=t.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" "));return r.intersect=function(t){return o(r,a,t)},s}}},function(t,e,r){var n=r(10);function i(t,e,r,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");n.applyStyle(a,r[i+"Style"]),r[i+"Class"]&&a.attr("class",r[i+"Class"])}t.exports={default:i,normal:i,vee:function(t,e,r,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").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");n.applyStyle(a,r[i+"Style"]),r[i+"Class"]&&a.attr("class",r[i+"Class"])},undirected:function(t,e,r,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");n.applyStyle(a,r[i+"Style"]),r[i+"Class"]&&a.attr("class",r[i+"Class"])}}},function(t,e){t.exports="0.6.4"},function(t,e,r){"use strict";var n;function i(t){return n=n||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),n.innerHTML=t,unescape(n.textContent)}r.r(e),r.d(e,"default",(function(){return i}))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(r(349))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(58);e.hex=n.default;var i=r(58);e.rgb=i.default;var a=r(58);e.rgba=a.default;var o=r(152);e.hsl=o.default;var s=r(152);e.hsla=s.default;var c=r(21);e.channel=c.default;var l=r(359);e.red=l.default;var u=r(360);e.green=u.default;var d=r(361);e.blue=d.default;var h=r(362);e.hue=h.default;var f=r(363);e.saturation=f.default;var p=r(364);e.lightness=p.default;var g=r(153);e.alpha=g.default;var y=r(153);e.opacity=y.default;var m=r(154);e.luminance=m.default;var v=r(365);e.isDark=v.default;var b=r(155);e.isLight=b.default;var x=r(366);e.isValid=x.default;var k=r(367);e.saturate=k.default;var w=r(368);e.desaturate=w.default;var _=r(369);e.lighten=_.default;var E=r(370);e.darken=E.default;var C=r(156);e.opacify=C.default;var T=r(156);e.fadeIn=T.default;var O=r(157);e.transparentize=O.default;var S=r(157);e.fadeOut=S.default;var A=r(371);e.complement=A.default;var j=r(372);e.grayscale=j.default;var D=r(158);e.adjust=D.default;var B=r(59);e.change=B.default;var N=r(373);e.invert=N.default;var M=r(159);e.mix=M.default;var L=r(374);e.scale=L.default},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:function(t){return t>=255?255:t<0?0:t},g:function(t){return t>=255?255:t<0?0:t},b:function(t){return t>=255?255:t<0?0:t},h:function(t){return t%360},s:function(t){return t>=100?100:t<0?0:t},l:function(t){return t>=100?100:t<0?0:t},a:function(t){return t>=1?1:t<0?0:t}},toLinear:function(t){var e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:function(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t},hsl2rgb:function(t,e){var r=t.h,i=t.s,a=t.l;if(100===i)return 2.55*a;r/=360,i/=100;var o=(a/=100)<.5?a*(1+i):a+i-a*i,s=2*a-o;switch(e){case"r":return 255*n.hue2rgb(s,o,r+1/3);case"g":return 255*n.hue2rgb(s,o,r);case"b":return 255*n.hue2rgb(s,o,r-1/3)}},rgb2hsl:function(t,e){var r=t.r,n=t.g,i=t.b;r/=255,n/=255,i/=255;var a=Math.max(r,n,i),o=Math.min(r,n,i),s=(a+o)/2;if("l"===e)return 100*s;if(a===o)return 0;var c=a-o;if("s"===e)return 100*(s>.5?c/(2-a-o):c/(a+o));switch(a){case r:return 60*((n-i)/c+(n<i?6:0));case n:return 60*((i-r)/c+2);case i:return 60*((r-n)/c+4);default:return-1}}};e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={round:function(t){return Math.round(1e10*t)/1e10}};e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={frac2hex:function(t){var e=Math.round(255*t).toString(16);return e.length>1?e:"0"+e},dec2hex:function(t){var e=Math.round(t).toString(16);return e.length>1?e:"0"+e}};e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(11),i=r(84),a=r(354),o=function(){function t(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new a.default}return t.prototype.set=function(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=i.TYPE.ALL,this},t.prototype._ensureHSL=function(){void 0===this.data.h&&(this.data.h=n.default.channel.rgb2hsl(this.data,"h")),void 0===this.data.s&&(this.data.s=n.default.channel.rgb2hsl(this.data,"s")),void 0===this.data.l&&(this.data.l=n.default.channel.rgb2hsl(this.data,"l"))},t.prototype._ensureRGB=function(){void 0===this.data.r&&(this.data.r=n.default.channel.hsl2rgb(this.data,"r")),void 0===this.data.g&&(this.data.g=n.default.channel.hsl2rgb(this.data,"g")),void 0===this.data.b&&(this.data.b=n.default.channel.hsl2rgb(this.data,"b"))},Object.defineProperty(t.prototype,"r",{get:function(){return this.type.is(i.TYPE.HSL)||void 0===this.data.r?(this._ensureHSL(),n.default.channel.hsl2rgb(this.data,"r")):this.data.r},set:function(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.r=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"g",{get:function(){return this.type.is(i.TYPE.HSL)||void 0===this.data.g?(this._ensureHSL(),n.default.channel.hsl2rgb(this.data,"g")):this.data.g},set:function(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.g=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"b",{get:function(){return this.type.is(i.TYPE.HSL)||void 0===this.data.b?(this._ensureHSL(),n.default.channel.hsl2rgb(this.data,"b")):this.data.b},set:function(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.b=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"h",{get:function(){return this.type.is(i.TYPE.RGB)||void 0===this.data.h?(this._ensureRGB(),n.default.channel.rgb2hsl(this.data,"h")):this.data.h},set:function(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.h=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"s",{get:function(){return this.type.is(i.TYPE.RGB)||void 0===this.data.s?(this._ensureRGB(),n.default.channel.rgb2hsl(this.data,"s")):this.data.s},set:function(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.s=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"l",{get:function(){return this.type.is(i.TYPE.RGB)||void 0===this.data.l?(this._ensureRGB(),n.default.channel.rgb2hsl(this.data,"l")):this.data.l},set:function(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.l=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"a",{get:function(){return this.data.a},set:function(t){this.changed=!0,this.data.a=t},enumerable:!0,configurable:!0}),t}();e.default=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(84),i=function(){function t(){this.type=n.TYPE.ALL}return t.prototype.get=function(){return this.type},t.prototype.set=function(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t},t.prototype.reset=function(){this.type=n.TYPE.ALL},t.prototype.is=function(t){return this.type===t},t}();e.default=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(11),i={};e.DEC2HEX=i;for(var a=0;a<=255;a++)i[a]=n.default.unit.dec2hex(a)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(151),i={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:function(t){t=t.toLowerCase();var e=i.colors[t];if(e)return n.default.parse(e)},stringify:function(t){var e=n.default.stringify(t);for(var r in i.colors)if(i.colors[r]===e)return r}};e.default=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(11),i=r(39),a={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:function(t){var e=t.charCodeAt(0);if(114===e||82===e){var r=t.match(a.re);if(r){var o=r[1],s=r[2],c=r[3],l=r[4],u=r[5],d=r[6],h=r[7],f=r[8];return i.default.set({r:n.default.channel.clamp.r(s?2.55*parseFloat(o):parseFloat(o)),g:n.default.channel.clamp.g(l?2.55*parseFloat(c):parseFloat(c)),b:n.default.channel.clamp.b(d?2.55*parseFloat(u):parseFloat(u)),a:h?n.default.channel.clamp.a(f?parseFloat(h)/100:parseFloat(h)):1},t)}}},stringify:function(t){return t.a<1?"rgba("+n.default.lang.round(t.r)+", "+n.default.lang.round(t.g)+", "+n.default.lang.round(t.b)+", "+n.default.lang.round(t.a)+")":"rgb("+n.default.lang.round(t.r)+", "+n.default.lang.round(t.g)+", "+n.default.lang.round(t.b)+")"}};e.default=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(11),i=r(39),a={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:function(t){var e=t.match(a.hueRe);if(e){var r=e[1];switch(e[2]){case"grad":return n.default.channel.clamp.h(.9*parseFloat(r));case"rad":return n.default.channel.clamp.h(180*parseFloat(r)/Math.PI);case"turn":return n.default.channel.clamp.h(360*parseFloat(r))}}return n.default.channel.clamp.h(parseFloat(t))},parse:function(t){var e=t.charCodeAt(0);if(104===e||72===e){var r=t.match(a.re);if(r){var o=r[1],s=r[2],c=r[3],l=r[4],u=r[5];return i.default.set({h:a._hue2deg(o),s:n.default.channel.clamp.s(parseFloat(s)),l:n.default.channel.clamp.l(parseFloat(c)),a:l?n.default.channel.clamp.a(u?parseFloat(l)/100:parseFloat(l)):1},t)}}},stringify:function(t){return t.a<1?"hsla("+n.default.lang.round(t.h)+", "+n.default.lang.round(t.s)+"%, "+n.default.lang.round(t.l)+"%, "+t.a+")":"hsl("+n.default.lang.round(t.h)+", "+n.default.lang.round(t.s)+"%, "+n.default.lang.round(t.l)+"%)"}};e.default=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(21);e.default=function(t){return n.default(t,"r")}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(21);e.default=function(t){return n.default(t,"g")}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(21);e.default=function(t){return n.default(t,"b")}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(21);e.default=function(t){return n.default(t,"h")}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(21);e.default=function(t){return n.default(t,"s")}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(21);e.default=function(t){return n.default(t,"l")}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(155);e.default=function(t){return!n.default(t)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(15);e.default=function(t){try{return n.default.parse(t),!0}catch(t){return!1}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(26);e.default=function(t,e){return n.default(t,"s",e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(26);e.default=function(t,e){return n.default(t,"s",-e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(26);e.default=function(t,e){return n.default(t,"l",e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(26);e.default=function(t,e){return n.default(t,"l",-e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(26);e.default=function(t){return n.default(t,"h",180)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(59);e.default=function(t){return n.default(t,{s:0})}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(15),i=r(159);e.default=function(t,e){void 0===e&&(e=100);var r=n.default.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,i.default(r,t,e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(11),i=r(15),a=r(158);e.default=function(t,e){var r,o,s,c=i.default.parse(t),l={};for(var u in e)l[u]=(r=c[u],o=e[u],s=n.default.channel.max[u],o>0?(s-r)*o/100:r*o/100);return a.default(t,l)}},function(t,e,r){(function(t){t.exports=function(){"use strict";var e,n;function i(){return e.apply(null,arguments)}function a(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function o(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){return void 0===t}function c(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function l(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function u(t,e){var r,n=[];for(r=0;r<t.length;++r)n.push(e(t[r],r));return n}function d(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function h(t,e){for(var r in e)d(e,r)&&(t[r]=e[r]);return d(e,"toString")&&(t.toString=e.toString),d(e,"valueOf")&&(t.valueOf=e.valueOf),t}function f(t,e,r,n){return be(t,e,r,n,!0).utc()}function p(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function g(t){if(null==t._isValid){var e=p(t),r=n.call(e.parsedDateParts,(function(t){return null!=t})),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&r);if(t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return i;t._isValid=i}return t._isValid}function y(t){var e=f(NaN);return null!=t?h(p(e),t):p(e).userInvalidated=!0,e}n=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),r=e.length>>>0,n=0;n<r;n++)if(n in e&&t.call(this,e[n],n,e))return!0;return!1};var m=i.momentProperties=[];function v(t,e){var r,n,i;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=p(e)),s(e._locale)||(t._locale=e._locale),0<m.length)for(r=0;r<m.length;r++)s(i=e[n=m[r]])||(t[n]=i);return t}var b=!1;function x(t){v(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,i.updateOffset(this),b=!1)}function k(t){return t instanceof x||null!=t&&null!=t._isAMomentObject}function w(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function _(t){var e=+t,r=0;return 0!==e&&isFinite(e)&&(r=w(e)),r}function E(t,e,r){var n,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(n=0;n<i;n++)(r&&t[n]!==e[n]||!r&&_(t[n])!==_(e[n]))&&o++;return o+a}function C(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function T(t,e){var r=!0;return h((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),r){for(var n,a=[],o=0;o<arguments.length;o++){if(n="","object"==typeof arguments[o]){for(var s in n+="\n["+o+"] ",arguments[0])n+=s+": "+arguments[0][s]+", ";n=n.slice(0,-2)}else n=arguments[o];a.push(n)}C(t+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),r=!1}return e.apply(this,arguments)}),e)}var O,S={};function A(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),S[t]||(C(e),S[t]=!0)}function j(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function D(t,e){var r,n=h({},t);for(r in e)d(e,r)&&(o(t[r])&&o(e[r])?(n[r]={},h(n[r],t[r]),h(n[r],e[r])):null!=e[r]?n[r]=e[r]:delete n[r]);for(r in t)d(t,r)&&!d(e,r)&&o(t[r])&&(n[r]=h({},n[r]));return n}function B(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,O=Object.keys?Object.keys:function(t){var e,r=[];for(e in t)d(t,e)&&r.push(e);return r};var N={};function M(t,e){var r=t.toLowerCase();N[r]=N[r+"s"]=N[e]=t}function L(t){return"string"==typeof t?N[t]||N[t.toLowerCase()]:void 0}function I(t){var e,r,n={};for(r in t)d(t,r)&&(e=L(r))&&(n[e]=t[r]);return n}var P={};function F(t,e){P[t]=e}function R(t,e,r){var n=""+Math.abs(t),i=e-n.length;return(0<=t?r?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}var Y=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,V=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,W={},z={};function $(t,e,r,n){var i=n;"string"==typeof n&&(i=function(){return this[n]()}),t&&(z[t]=i),e&&(z[e[0]]=function(){return R(i.apply(this,arguments),e[1],e[2])}),r&&(z[r]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function U(t,e){return t.isValid()?(e=G(e,t.localeData()),W[e]=W[e]||function(t){var e,r,n,i=t.match(Y);for(e=0,r=i.length;e<r;e++)z[i[e]]?i[e]=z[i[e]]:i[e]=(n=i[e]).match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"");return function(e){var n,a="";for(n=0;n<r;n++)a+=j(i[n])?i[n].call(e,t):i[n];return a}}(e),W[e](t)):t.localeData().invalidDate()}function G(t,e){var r=5;function n(t){return e.longDateFormat(t)||t}for(V.lastIndex=0;0<=r&&V.test(t);)t=t.replace(V,n),V.lastIndex=0,r-=1;return t}var H=/\d/,q=/\d\d/,X=/\d{3}/,Z=/\d{4}/,J=/[+-]?\d{6}/,Q=/\d\d?/,K=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,et=/\d{1,3}/,rt=/\d{1,4}/,nt=/[+-]?\d{1,6}/,it=/\d+/,at=/[+-]?\d+/,ot=/Z|[+-]\d\d:?\d\d/gi,st=/Z|[+-]\d\d(?::?\d\d)?/gi,ct=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,lt={};function ut(t,e,r){lt[t]=j(e)?e:function(t,n){return t&&r?r:e}}function dt(t,e){return d(lt,t)?lt[t](e._strict,e._locale):new RegExp(ht(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,r,n,i){return e||r||n||i}))))}function ht(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ft={};function pt(t,e){var r,n=e;for("string"==typeof t&&(t=[t]),c(e)&&(n=function(t,r){r[e]=_(t)}),r=0;r<t.length;r++)ft[t[r]]=n}function gt(t,e){pt(t,(function(t,r,n,i){n._w=n._w||{},e(t,n._w,n,i)}))}function yt(t){return mt(t)?366:365}function mt(t){return t%4==0&&t%100!=0||t%400==0}$("Y",0,0,(function(){var t=this.year();return t<=9999?""+t:"+"+t})),$(0,["YY",2],0,(function(){return this.year()%100})),$(0,["YYYY",4],0,"year"),$(0,["YYYYY",5],0,"year"),$(0,["YYYYYY",6,!0],0,"year"),M("year","y"),F("year",1),ut("Y",at),ut("YY",Q,q),ut("YYYY",rt,Z),ut("YYYYY",nt,J),ut("YYYYYY",nt,J),pt(["YYYYY","YYYYYY"],0),pt("YYYY",(function(t,e){e[0]=2===t.length?i.parseTwoDigitYear(t):_(t)})),pt("YY",(function(t,e){e[0]=i.parseTwoDigitYear(t)})),pt("Y",(function(t,e){e[0]=parseInt(t,10)})),i.parseTwoDigitYear=function(t){return _(t)+(68<_(t)?1900:2e3)};var vt,bt=xt("FullYear",!0);function xt(t,e){return function(r){return null!=r?(wt(this,t,r),i.updateOffset(this,e),this):kt(this,t)}}function kt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function wt(t,e,r){t.isValid()&&!isNaN(r)&&("FullYear"===e&&mt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](r,t.month(),_t(r,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](r))}function _t(t,e){if(isNaN(t)||isNaN(e))return NaN;var r=(e%12+12)%12;return t+=(e-r)/12,1===r?mt(t)?29:28:31-r%7%2}vt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},$("M",["MM",2],"Mo",(function(){return this.month()+1})),$("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),$("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),M("month","M"),F("month",8),ut("M",Q),ut("MM",Q,q),ut("MMM",(function(t,e){return e.monthsShortRegex(t)})),ut("MMMM",(function(t,e){return e.monthsRegex(t)})),pt(["M","MM"],(function(t,e){e[1]=_(t)-1})),pt(["MMM","MMMM"],(function(t,e,r,n){var i=r._locale.monthsParse(t,n,r._strict);null!=i?e[1]=i:p(r).invalidMonth=t}));var Et=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ct="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Tt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ot(t,e){var r;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=_(e);else if(!c(e=t.localeData().monthsParse(e)))return t;return r=Math.min(t.date(),_t(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,r),t}function St(t){return null!=t?(Ot(this,t),i.updateOffset(this,!0),this):kt(this,"Month")}var At=ct,jt=ct;function Dt(){function t(t,e){return e.length-t.length}var e,r,n=[],i=[],a=[];for(e=0;e<12;e++)r=f([2e3,e]),n.push(this.monthsShort(r,"")),i.push(this.months(r,"")),a.push(this.months(r,"")),a.push(this.monthsShort(r,""));for(n.sort(t),i.sort(t),a.sort(t),e=0;e<12;e++)n[e]=ht(n[e]),i[e]=ht(i[e]);for(e=0;e<24;e++)a[e]=ht(a[e]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function Bt(t){var e;if(t<100&&0<=t){var r=Array.prototype.slice.call(arguments);r[0]=t+400,e=new Date(Date.UTC.apply(null,r)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function Nt(t,e,r){var n=7+e-r;return-(7+Bt(t,0,n).getUTCDay()-e)%7+n-1}function Mt(t,e,r,n,i){var a,o,s=1+7*(e-1)+(7+r-n)%7+Nt(t,n,i);return o=s<=0?yt(a=t-1)+s:s>yt(t)?(a=t+1,s-yt(t)):(a=t,s),{year:a,dayOfYear:o}}function Lt(t,e,r){var n,i,a=Nt(t.year(),e,r),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?n=o+It(i=t.year()-1,e,r):o>It(t.year(),e,r)?(n=o-It(t.year(),e,r),i=t.year()+1):(i=t.year(),n=o),{week:n,year:i}}function It(t,e,r){var n=Nt(t,e,r),i=Nt(t+1,e,r);return(yt(t)-n+i)/7}function Pt(t,e){return t.slice(e,7).concat(t.slice(0,e))}$("w",["ww",2],"wo","week"),$("W",["WW",2],"Wo","isoWeek"),M("week","w"),M("isoWeek","W"),F("week",5),F("isoWeek",5),ut("w",Q),ut("ww",Q,q),ut("W",Q),ut("WW",Q,q),gt(["w","ww","W","WW"],(function(t,e,r,n){e[n.substr(0,1)]=_(t)})),$("d",0,"do","day"),$("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),$("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),$("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),$("e",0,0,"weekday"),$("E",0,0,"isoWeekday"),M("day","d"),M("weekday","e"),M("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),ut("d",Q),ut("e",Q),ut("E",Q),ut("dd",(function(t,e){return e.weekdaysMinRegex(t)})),ut("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),ut("dddd",(function(t,e){return e.weekdaysRegex(t)})),gt(["dd","ddd","dddd"],(function(t,e,r,n){var i=r._locale.weekdaysParse(t,n,r._strict);null!=i?e.d=i:p(r).invalidWeekday=t})),gt(["d","e","E"],(function(t,e,r,n){e[n]=_(t)}));var Ft="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Rt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Yt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Vt=ct,Wt=ct,zt=ct;function $t(){function t(t,e){return e.length-t.length}var e,r,n,i,a,o=[],s=[],c=[],l=[];for(e=0;e<7;e++)r=f([2e3,1]).day(e),n=this.weekdaysMin(r,""),i=this.weekdaysShort(r,""),a=this.weekdays(r,""),o.push(n),s.push(i),c.push(a),l.push(n),l.push(i),l.push(a);for(o.sort(t),s.sort(t),c.sort(t),l.sort(t),e=0;e<7;e++)s[e]=ht(s[e]),c[e]=ht(c[e]),l[e]=ht(l[e]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Ut(){return this.hours()%12||12}function Gt(t,e){$(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Ht(t,e){return e._meridiemParse}$("H",["HH",2],0,"hour"),$("h",["hh",2],0,Ut),$("k",["kk",2],0,(function(){return this.hours()||24})),$("hmm",0,0,(function(){return""+Ut.apply(this)+R(this.minutes(),2)})),$("hmmss",0,0,(function(){return""+Ut.apply(this)+R(this.minutes(),2)+R(this.seconds(),2)})),$("Hmm",0,0,(function(){return""+this.hours()+R(this.minutes(),2)})),$("Hmmss",0,0,(function(){return""+this.hours()+R(this.minutes(),2)+R(this.seconds(),2)})),Gt("a",!0),Gt("A",!1),M("hour","h"),F("hour",13),ut("a",Ht),ut("A",Ht),ut("H",Q),ut("h",Q),ut("k",Q),ut("HH",Q,q),ut("hh",Q,q),ut("kk",Q,q),ut("hmm",K),ut("hmmss",tt),ut("Hmm",K),ut("Hmmss",tt),pt(["H","HH"],3),pt(["k","kk"],(function(t,e,r){var n=_(t);e[3]=24===n?0:n})),pt(["a","A"],(function(t,e,r){r._isPm=r._locale.isPM(t),r._meridiem=t})),pt(["h","hh"],(function(t,e,r){e[3]=_(t),p(r).bigHour=!0})),pt("hmm",(function(t,e,r){var n=t.length-2;e[3]=_(t.substr(0,n)),e[4]=_(t.substr(n)),p(r).bigHour=!0})),pt("hmmss",(function(t,e,r){var n=t.length-4,i=t.length-2;e[3]=_(t.substr(0,n)),e[4]=_(t.substr(n,2)),e[5]=_(t.substr(i)),p(r).bigHour=!0})),pt("Hmm",(function(t,e,r){var n=t.length-2;e[3]=_(t.substr(0,n)),e[4]=_(t.substr(n))})),pt("Hmmss",(function(t,e,r){var n=t.length-4,i=t.length-2;e[3]=_(t.substr(0,n)),e[4]=_(t.substr(n,2)),e[5]=_(t.substr(i))}));var qt,Xt=xt("Hours",!0),Zt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{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"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d 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"},months:Ct,monthsShort:Tt,week:{dow:0,doy:6},weekdays:Ft,weekdaysMin:Yt,weekdaysShort:Rt,meridiemParse:/[ap]\.?m?\.?/i},Jt={},Qt={};function Kt(t){return t?t.toLowerCase().replace("_","-"):t}function te(e){var n=null;if(!Jt[e]&&void 0!==t&&t&&t.exports)try{n=qt._abbr,r(376)("./"+e),ee(n)}catch(e){}return Jt[e]}function ee(t,e){var r;return t&&((r=s(e)?ne(t):re(t,e))?qt=r:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),qt._abbr}function re(t,e){if(null===e)return delete Jt[t],null;var r,n=Zt;if(e.abbr=t,null!=Jt[t])A("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Jt[t]._config;else if(null!=e.parentLocale)if(null!=Jt[e.parentLocale])n=Jt[e.parentLocale]._config;else{if(null==(r=te(e.parentLocale)))return Qt[e.parentLocale]||(Qt[e.parentLocale]=[]),Qt[e.parentLocale].push({name:t,config:e}),null;n=r._config}return Jt[t]=new B(D(n,e)),Qt[t]&&Qt[t].forEach((function(t){re(t.name,t.config)})),ee(t),Jt[t]}function ne(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return qt;if(!a(t)){if(e=te(t))return e;t=[t]}return function(t){for(var e,r,n,i,a=0;a<t.length;){for(e=(i=Kt(t[a]).split("-")).length,r=(r=Kt(t[a+1]))?r.split("-"):null;0<e;){if(n=te(i.slice(0,e).join("-")))return n;if(r&&r.length>=e&&E(i,r,!0)>=e-1)break;e--}a++}return qt}(t)}function ie(t){var e,r=t._a;return r&&-2===p(t).overflow&&(e=r[1]<0||11<r[1]?1:r[2]<1||r[2]>_t(r[0],r[1])?2:r[3]<0||24<r[3]||24===r[3]&&(0!==r[4]||0!==r[5]||0!==r[6])?3:r[4]<0||59<r[4]?4:r[5]<0||59<r[5]?5:r[6]<0||999<r[6]?6:-1,p(t)._overflowDayOfYear&&(e<0||2<e)&&(e=2),p(t)._overflowWeeks&&-1===e&&(e=7),p(t)._overflowWeekday&&-1===e&&(e=8),p(t).overflow=e),t}function ae(t,e,r){return null!=t?t:null!=e?e:r}function oe(t){var e,r,n,a,o,s=[];if(!t._d){var c,l;for(c=t,l=new Date(i.now()),n=c._useUTC?[l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()]:[l.getFullYear(),l.getMonth(),l.getDate()],t._w&&null==t._a[2]&&null==t._a[1]&&function(t){var e,r,n,i,a,o,s,c;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)a=1,o=4,r=ae(e.GG,t._a[0],Lt(xe(),1,4).year),n=ae(e.W,1),((i=ae(e.E,1))<1||7<i)&&(c=!0);else{a=t._locale._week.dow,o=t._locale._week.doy;var l=Lt(xe(),a,o);r=ae(e.gg,t._a[0],l.year),n=ae(e.w,l.week),null!=e.d?((i=e.d)<0||6<i)&&(c=!0):null!=e.e?(i=e.e+a,(e.e<0||6<e.e)&&(c=!0)):i=a}n<1||n>It(r,a,o)?p(t)._overflowWeeks=!0:null!=c?p(t)._overflowWeekday=!0:(s=Mt(r,n,i,a,o),t._a[0]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=ae(t._a[0],n[0]),(t._dayOfYear>yt(o)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),r=Bt(o,0,t._dayOfYear),t._a[1]=r.getUTCMonth(),t._a[2]=r.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=n[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?Bt:function(t,e,r,n,i,a,o){var s;return t<100&&0<=t?(s=new Date(t+400,e,r,n,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,r,n,i,a,o),s}).apply(null,s),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(p(t).weekdayMismatch=!0)}}var se=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ce=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,le=/Z|[+-]\d\d(?::?\d\d)?/,ue=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],de=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],he=/^\/?Date\((\-?\d+)/i;function fe(t){var e,r,n,i,a,o,s=t._i,c=se.exec(s)||ce.exec(s);if(c){for(p(t).iso=!0,e=0,r=ue.length;e<r;e++)if(ue[e][1].exec(c[1])){i=ue[e][0],n=!1!==ue[e][2];break}if(null==i)return void(t._isValid=!1);if(c[3]){for(e=0,r=de.length;e<r;e++)if(de[e][1].exec(c[3])){a=(c[2]||" ")+de[e][0];break}if(null==a)return void(t._isValid=!1)}if(!n&&null!=a)return void(t._isValid=!1);if(c[4]){if(!le.exec(c[4]))return void(t._isValid=!1);o="Z"}t._f=i+(a||"")+(o||""),me(t)}else t._isValid=!1}var pe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,ge={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ye(t){var e,r,n,i=pe.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(i){var a=function(t,e,r,n,i,a){var o=[function(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}(t),Tt.indexOf(e),parseInt(r,10),parseInt(n,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}(i[4],i[3],i[2],i[5],i[6],i[7]);if(r=a,n=t,(e=i[1])&&Rt.indexOf(e)!==new Date(r[0],r[1],r[2]).getDay()&&(p(n).weekdayMismatch=!0,!(n._isValid=!1)))return;t._a=a,t._tzm=function(t,e,r){if(t)return ge[t];if(e)return 0;var n=parseInt(r,10),i=n%100;return(n-i)/100*60+i}(i[8],i[9],i[10]),t._d=Bt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),p(t).rfc2822=!0}else t._isValid=!1}function me(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],p(t).empty=!0;var e,r,n,a,o,s,c,l,u=""+t._i,h=u.length,f=0;for(n=G(t._f,t._locale).match(Y)||[],e=0;e<n.length;e++)a=n[e],(r=(u.match(dt(a,t))||[])[0])&&(0<(o=u.substr(0,u.indexOf(r))).length&&p(t).unusedInput.push(o),u=u.slice(u.indexOf(r)+r.length),f+=r.length),z[a]?(r?p(t).empty=!1:p(t).unusedTokens.push(a),s=a,l=t,null!=(c=r)&&d(ft,s)&&ft[s](c,l._a,l,s)):t._strict&&!r&&p(t).unusedTokens.push(a);p(t).charsLeftOver=h-f,0<u.length&&p(t).unusedInput.push(u),t._a[3]<=12&&!0===p(t).bigHour&&0<t._a[3]&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[3]=function(t,e,r){var n;return null==r?e:null!=t.meridiemHour?t.meridiemHour(e,r):(null!=t.isPM&&((n=t.isPM(r))&&e<12&&(e+=12),n||12!==e||(e=0)),e)}(t._locale,t._a[3],t._meridiem),oe(t),ie(t)}else ye(t);else fe(t)}function ve(t){var e,r,n,d,f=t._i,m=t._f;return t._locale=t._locale||ne(t._l),null===f||void 0===m&&""===f?y({nullInput:!0}):("string"==typeof f&&(t._i=f=t._locale.preparse(f)),k(f)?new x(ie(f)):(l(f)?t._d=f:a(m)?function(t){var e,r,n,i,a;if(0===t._f.length)return p(t).invalidFormat=!0,t._d=new Date(NaN);for(i=0;i<t._f.length;i++)a=0,e=v({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],me(e),g(e)&&(a+=p(e).charsLeftOver,a+=10*p(e).unusedTokens.length,p(e).score=a,(null==n||a<n)&&(n=a,r=e));h(t,r||e)}(t):m?me(t):s(r=(e=t)._i)?e._d=new Date(i.now()):l(r)?e._d=new Date(r.valueOf()):"string"==typeof r?(n=e,null===(d=he.exec(n._i))?(fe(n),!1===n._isValid&&(delete n._isValid,ye(n),!1===n._isValid&&(delete n._isValid,i.createFromInputFallback(n)))):n._d=new Date(+d[1])):a(r)?(e._a=u(r.slice(0),(function(t){return parseInt(t,10)})),oe(e)):o(r)?function(t){if(!t._d){var e=I(t._i);t._a=u([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),oe(t)}}(e):c(r)?e._d=new Date(r):i.createFromInputFallback(e),g(t)||(t._d=null),t))}function be(t,e,r,n,i){var s,c={};return!0!==r&&!1!==r||(n=r,r=void 0),(o(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||a(t)&&0===t.length)&&(t=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=i,c._l=r,c._i=t,c._f=e,c._strict=n,(s=new x(ie(ve(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function xe(t,e,r,n){return be(t,e,r,n,!1)}i.createFromInputFallback=T("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var ke=T("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=xe.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:y()})),we=T("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=xe.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:y()}));function _e(t,e){var r,n;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return xe();for(r=e[0],n=1;n<e.length;++n)e[n].isValid()&&!e[n][t](r)||(r=e[n]);return r}var Ee=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ce(t){var e=I(t),r=e.year||0,n=e.quarter||0,i=e.month||0,a=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,c=e.minute||0,l=e.second||0,u=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===vt.call(Ee,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var r=!1,n=0;n<Ee.length;++n)if(t[Ee[n]]){if(r)return!1;parseFloat(t[Ee[n]])!==_(t[Ee[n]])&&(r=!0)}return!0}(e),this._milliseconds=+u+1e3*l+6e4*c+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*n+12*r,this._data={},this._locale=ne(),this._bubble()}function Te(t){return t instanceof Ce}function Oe(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Se(t,e){$(t,0,0,(function(){var t=this.utcOffset(),r="+";return t<0&&(t=-t,r="-"),r+R(~~(t/60),2)+e+R(~~t%60,2)}))}Se("Z",":"),Se("ZZ",""),ut("Z",st),ut("ZZ",st),pt(["Z","ZZ"],(function(t,e,r){r._useUTC=!0,r._tzm=je(st,t)}));var Ae=/([\+\-]|\d\d)/gi;function je(t,e){var r=(e||"").match(t);if(null===r)return null;var n=((r[r.length-1]||[])+"").match(Ae)||["-",0,0],i=60*n[1]+_(n[2]);return 0===i?0:"+"===n[0]?i:-i}function De(t,e){var r,n;return e._isUTC?(r=e.clone(),n=(k(t)||l(t)?t.valueOf():xe(t).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),i.updateOffset(r,!1),r):xe(t).local()}function Be(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Ne(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Me=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Le=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ie(t,e){var r,n,i,a=t,o=null;return Te(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:c(t)?(a={},e?a[e]=t:a.milliseconds=t):(o=Me.exec(t))?(r="-"===o[1]?-1:1,a={y:0,d:_(o[2])*r,h:_(o[3])*r,m:_(o[4])*r,s:_(o[5])*r,ms:_(Oe(1e3*o[6]))*r}):(o=Le.exec(t))?(r="-"===o[1]?-1:1,a={y:Pe(o[2],r),M:Pe(o[3],r),w:Pe(o[4],r),d:Pe(o[5],r),h:Pe(o[6],r),m:Pe(o[7],r),s:Pe(o[8],r)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=function(t,e){var r;return t.isValid()&&e.isValid()?(e=De(e,t),t.isBefore(e)?r=Fe(t,e):((r=Fe(e,t)).milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}(xe(a.from),xe(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),n=new Ce(a),Te(t)&&d(t,"_locale")&&(n._locale=t._locale),n}function Pe(t,e){var r=t&&parseFloat(t.replace(",","."));return(isNaN(r)?0:r)*e}function Fe(t,e){var r={};return r.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(r.months,"M").isAfter(e)&&--r.months,r.milliseconds=+e-+t.clone().add(r.months,"M"),r}function Re(t,e){return function(r,n){var i;return null===n||isNaN(+n)||(A(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=r,r=n,n=i),Ye(this,Ie(r="string"==typeof r?+r:r,n),t),this}}function Ye(t,e,r,n){var a=e._milliseconds,o=Oe(e._days),s=Oe(e._months);t.isValid()&&(n=null==n||n,s&&Ot(t,kt(t,"Month")+s*r),o&&wt(t,"Date",kt(t,"Date")+o*r),a&&t._d.setTime(t._d.valueOf()+a*r),n&&i.updateOffset(t,o||s))}Ie.fn=Ce.prototype,Ie.invalid=function(){return Ie(NaN)};var Ve=Re(1,"add"),We=Re(-1,"subtract");function ze(t,e){var r=12*(e.year()-t.year())+(e.month()-t.month()),n=t.clone().add(r,"months");return-(r+(e-n<0?(e-n)/(n-t.clone().add(r-1,"months")):(e-n)/(t.clone().add(r+1,"months")-n)))||0}function $e(t){var e;return void 0===t?this._locale._abbr:(null!=(e=ne(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ue=T("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)}));function Ge(){return this._locale}var He=126227808e5;function qe(t,e){return(t%e+e)%e}function Xe(t,e,r){return t<100&&0<=t?new Date(t+400,e,r)-He:new Date(t,e,r).valueOf()}function Ze(t,e,r){return t<100&&0<=t?Date.UTC(t+400,e,r)-He:Date.UTC(t,e,r)}function Je(t,e){$(0,[t,t.length],0,e)}function Qe(t,e,r,n,i){var a;return null==t?Lt(this,n,i).year:((a=It(t,n,i))<e&&(e=a),function(t,e,r,n,i){var a=Mt(t,e,r,n,i),o=Bt(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,t,e,r,n,i))}$(0,["gg",2],0,(function(){return this.weekYear()%100})),$(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Je("gggg","weekYear"),Je("ggggg","weekYear"),Je("GGGG","isoWeekYear"),Je("GGGGG","isoWeekYear"),M("weekYear","gg"),M("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),ut("G",at),ut("g",at),ut("GG",Q,q),ut("gg",Q,q),ut("GGGG",rt,Z),ut("gggg",rt,Z),ut("GGGGG",nt,J),ut("ggggg",nt,J),gt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,r,n){e[n.substr(0,2)]=_(t)})),gt(["gg","GG"],(function(t,e,r,n){e[n]=i.parseTwoDigitYear(t)})),$("Q",0,"Qo","quarter"),M("quarter","Q"),F("quarter",7),ut("Q",H),pt("Q",(function(t,e){e[1]=3*(_(t)-1)})),$("D",["DD",2],"Do","date"),M("date","D"),F("date",9),ut("D",Q),ut("DD",Q,q),ut("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),pt(["D","DD"],2),pt("Do",(function(t,e){e[2]=_(t.match(Q)[0])}));var Ke=xt("Date",!0);$("DDD",["DDDD",3],"DDDo","dayOfYear"),M("dayOfYear","DDD"),F("dayOfYear",4),ut("DDD",et),ut("DDDD",X),pt(["DDD","DDDD"],(function(t,e,r){r._dayOfYear=_(t)})),$("m",["mm",2],0,"minute"),M("minute","m"),F("minute",14),ut("m",Q),ut("mm",Q,q),pt(["m","mm"],4);var tr=xt("Minutes",!1);$("s",["ss",2],0,"second"),M("second","s"),F("second",15),ut("s",Q),ut("ss",Q,q),pt(["s","ss"],5);var er,rr=xt("Seconds",!1);for($("S",0,0,(function(){return~~(this.millisecond()/100)})),$(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),$(0,["SSS",3],0,"millisecond"),$(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),$(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),$(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),$(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),$(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),$(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),M("millisecond","ms"),F("millisecond",16),ut("S",et,H),ut("SS",et,q),ut("SSS",et,X),er="SSSS";er.length<=9;er+="S")ut(er,it);function nr(t,e){e[6]=_(1e3*("0."+t))}for(er="S";er.length<=9;er+="S")pt(er,nr);var ir=xt("Milliseconds",!1);$("z",0,0,"zoneAbbr"),$("zz",0,0,"zoneName");var ar=x.prototype;function or(t){return t}ar.add=Ve,ar.calendar=function(t,e){var r=t||xe(),n=De(r,this).startOf("day"),a=i.calendarFormat(this,n)||"sameElse",o=e&&(j(e[a])?e[a].call(this,r):e[a]);return this.format(o||this.localeData().calendar(a,this,xe(r)))},ar.clone=function(){return new x(this)},ar.diff=function(t,e,r){var n,i,a;if(!this.isValid())return NaN;if(!(n=De(t,this)).isValid())return NaN;switch(i=6e4*(n.utcOffset()-this.utcOffset()),e=L(e)){case"year":a=ze(this,n)/12;break;case"month":a=ze(this,n);break;case"quarter":a=ze(this,n)/3;break;case"second":a=(this-n)/1e3;break;case"minute":a=(this-n)/6e4;break;case"hour":a=(this-n)/36e5;break;case"day":a=(this-n-i)/864e5;break;case"week":a=(this-n-i)/6048e5;break;default:a=this-n}return r?a:w(a)},ar.endOf=function(t){var e;if(void 0===(t=L(t))||"millisecond"===t||!this.isValid())return this;var r=this._isUTC?Ze:Xe;switch(t){case"year":e=r(this.year()+1,0,1)-1;break;case"quarter":e=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=r(this.year(),this.month()+1,1)-1;break;case"week":e=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-qe(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-qe(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-qe(e,1e3)-1}return this._d.setTime(e),i.updateOffset(this,!0),this},ar.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=U(this,t);return this.localeData().postformat(e)},ar.from=function(t,e){return this.isValid()&&(k(t)&&t.isValid()||xe(t).isValid())?Ie({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},ar.fromNow=function(t){return this.from(xe(),t)},ar.to=function(t,e){return this.isValid()&&(k(t)&&t.isValid()||xe(t).isValid())?Ie({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},ar.toNow=function(t){return this.to(xe(),t)},ar.get=function(t){return j(this[t=L(t)])?this[t]():this},ar.invalidAt=function(){return p(this).overflow},ar.isAfter=function(t,e){var r=k(t)?t:xe(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=L(e)||"millisecond")?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(e).valueOf())},ar.isBefore=function(t,e){var r=k(t)?t:xe(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=L(e)||"millisecond")?this.valueOf()<r.valueOf():this.clone().endOf(e).valueOf()<r.valueOf())},ar.isBetween=function(t,e,r,n){var i=k(t)?t:xe(t),a=k(e)?e:xe(e);return!!(this.isValid()&&i.isValid()&&a.isValid())&&("("===(n=n||"()")[0]?this.isAfter(i,r):!this.isBefore(i,r))&&(")"===n[1]?this.isBefore(a,r):!this.isAfter(a,r))},ar.isSame=function(t,e){var r,n=k(t)?t:xe(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=L(e)||"millisecond")?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(e).valueOf()<=r&&r<=this.clone().endOf(e).valueOf()))},ar.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},ar.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},ar.isValid=function(){return g(this)},ar.lang=Ue,ar.locale=$e,ar.localeData=Ge,ar.max=we,ar.min=ke,ar.parsingFlags=function(){return h({},p(this))},ar.set=function(t,e){if("object"==typeof t)for(var r=function(t){var e=[];for(var r in t)e.push({unit:r,priority:P[r]});return e.sort((function(t,e){return t.priority-e.priority})),e}(t=I(t)),n=0;n<r.length;n++)this[r[n].unit](t[r[n].unit]);else if(j(this[t=L(t)]))return this[t](e);return this},ar.startOf=function(t){var e;if(void 0===(t=L(t))||"millisecond"===t||!this.isValid())return this;var r=this._isUTC?Ze:Xe;switch(t){case"year":e=r(this.year(),0,1);break;case"quarter":e=r(this.year(),this.month()-this.month()%3,1);break;case"month":e=r(this.year(),this.month(),1);break;case"week":e=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=r(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=qe(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=qe(e,6e4);break;case"second":e=this._d.valueOf(),e-=qe(e,1e3)}return this._d.setTime(e),i.updateOffset(this,!0),this},ar.subtract=We,ar.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},ar.toObject=function(){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()}},ar.toDate=function(){return new Date(this.valueOf())},ar.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,r=e?this.clone().utc():this;return r.year()<0||9999<r.year()?U(r,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):j(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",U(r,"Z")):U(r,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},ar.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var r="["+t+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=e+'[")]';return this.format(r+n+"-MM-DD[T]HH:mm:ss.SSS"+i)},ar.toJSON=function(){return this.isValid()?this.toISOString():null},ar.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},ar.unix=function(){return Math.floor(this.valueOf()/1e3)},ar.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},ar.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},ar.year=bt,ar.isLeapYear=function(){return mt(this.year())},ar.weekYear=function(t){return Qe.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},ar.isoWeekYear=function(t){return Qe.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},ar.quarter=ar.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},ar.month=St,ar.daysInMonth=function(){return _t(this.year(),this.month())},ar.week=ar.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},ar.isoWeek=ar.isoWeeks=function(t){var e=Lt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},ar.weeksInYear=function(){var t=this.localeData()._week;return It(this.year(),t.dow,t.doy)},ar.isoWeeksInYear=function(){return It(this.year(),1,4)},ar.date=Ke,ar.day=ar.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,r,n=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,r=this.localeData(),t="string"!=typeof e?e:isNaN(e)?"number"==typeof(e=r.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-n,"d")):n},ar.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},ar.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null==t)return this.day()||7;var e,r,n=(e=t,r=this.localeData(),"string"==typeof e?r.weekdaysParse(e)%7||7:isNaN(e)?null:e);return this.day(this.day()%7?n:n-7)},ar.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},ar.hour=ar.hours=Xt,ar.minute=ar.minutes=tr,ar.second=ar.seconds=rr,ar.millisecond=ar.milliseconds=ir,ar.utcOffset=function(t,e,r){var n,a=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null==t)return this._isUTC?a:Be(this);if("string"==typeof t){if(null===(t=je(st,t)))return this}else Math.abs(t)<16&&!r&&(t*=60);return!this._isUTC&&e&&(n=Be(this)),this._offset=t,this._isUTC=!0,null!=n&&this.add(n,"m"),a!==t&&(!e||this._changeInProgress?Ye(this,Ie(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this},ar.utc=function(t){return this.utcOffset(0,t)},ar.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Be(this),"m")),this},ar.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=je(ot,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},ar.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?xe(t).utcOffset():0,(this.utcOffset()-t)%60==0)},ar.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ar.isLocal=function(){return!!this.isValid()&&!this._isUTC},ar.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ar.isUtc=Ne,ar.isUTC=Ne,ar.zoneAbbr=function(){return this._isUTC?"UTC":""},ar.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ar.dates=T("dates accessor is deprecated. Use date instead.",Ke),ar.months=T("months accessor is deprecated. Use month instead",St),ar.years=T("years accessor is deprecated. Use year instead",bt),ar.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),ar.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),(t=ve(t))._a){var e=t._isUTC?f(t._a):xe(t._a);this._isDSTShifted=this.isValid()&&0<E(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted}));var sr=B.prototype;function cr(t,e,r,n){var i=ne(),a=f().set(n,e);return i[r](a,t)}function lr(t,e,r){if(c(t)&&(e=t,t=void 0),t=t||"",null!=e)return cr(t,e,r,"month");var n,i=[];for(n=0;n<12;n++)i[n]=cr(t,n,r,"month");return i}function ur(t,e,r,n){"boolean"==typeof t?c(e)&&(r=e,e=void 0):(e=t,t=!1,c(r=e)&&(r=e,e=void 0)),e=e||"";var i,a=ne(),o=t?a._week.dow:0;if(null!=r)return cr(e,(r+o)%7,n,"day");var s=[];for(i=0;i<7;i++)s[i]=cr(e,(i+o)%7,n,"day");return s}sr.calendar=function(t,e,r){var n=this._calendar[t]||this._calendar.sameElse;return j(n)?n.call(e,r):n},sr.longDateFormat=function(t){var e=this._longDateFormat[t],r=this._longDateFormat[t.toUpperCase()];return e||!r?e:(this._longDateFormat[t]=r.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},sr.invalidDate=function(){return this._invalidDate},sr.ordinal=function(t){return this._ordinal.replace("%d",t)},sr.preparse=or,sr.postformat=or,sr.relativeTime=function(t,e,r,n){var i=this._relativeTime[r];return j(i)?i(t,e,r,n):i.replace(/%d/i,t)},sr.pastFuture=function(t,e){var r=this._relativeTime[0<t?"future":"past"];return j(r)?r(e):r.replace(/%s/i,e)},sr.set=function(t){var e,r;for(r in t)j(e=t[r])?this[r]=e:this["_"+r]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},sr.months=function(t,e){return t?a(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Et).test(e)?"format":"standalone"][t.month()]:a(this._months)?this._months:this._months.standalone},sr.monthsShort=function(t,e){return t?a(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Et.test(e)?"format":"standalone"][t.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},sr.monthsParse=function(t,e,r){var n,i,a;if(this._monthsParseExact)return function(t,e,r){var n,i,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)a=f([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(a,"").toLocaleLowerCase();return r?"MMM"===e?-1!==(i=vt.call(this._shortMonthsParse,o))?i:null:-1!==(i=vt.call(this._longMonthsParse,o))?i:null:"MMM"===e?-1!==(i=vt.call(this._shortMonthsParse,o))||-1!==(i=vt.call(this._longMonthsParse,o))?i:null:-1!==(i=vt.call(this._longMonthsParse,o))||-1!==(i=vt.call(this._shortMonthsParse,o))?i:null}.call(this,t,e,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(i=f([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),r||this._monthsParse[n]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[n]=new RegExp(a.replace(".",""),"i")),r&&"MMMM"===e&&this._longMonthsParse[n].test(t))return n;if(r&&"MMM"===e&&this._shortMonthsParse[n].test(t))return n;if(!r&&this._monthsParse[n].test(t))return n}},sr.monthsRegex=function(t){return this._monthsParseExact?(d(this,"_monthsRegex")||Dt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=jt),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},sr.monthsShortRegex=function(t){return this._monthsParseExact?(d(this,"_monthsRegex")||Dt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=At),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},sr.week=function(t){return Lt(t,this._week.dow,this._week.doy).week},sr.firstDayOfYear=function(){return this._week.doy},sr.firstDayOfWeek=function(){return this._week.dow},sr.weekdays=function(t,e){var r=a(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Pt(r,this._week.dow):t?r[t.day()]:r},sr.weekdaysMin=function(t){return!0===t?Pt(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},sr.weekdaysShort=function(t){return!0===t?Pt(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},sr.weekdaysParse=function(t,e,r){var n,i,a;if(this._weekdaysParseExact)return function(t,e,r){var n,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)a=f([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(a,"").toLocaleLowerCase();return r?"dddd"===e?-1!==(i=vt.call(this._weekdaysParse,o))?i:null:"ddd"===e?-1!==(i=vt.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=vt.call(this._minWeekdaysParse,o))?i:null:"dddd"===e?-1!==(i=vt.call(this._weekdaysParse,o))||-1!==(i=vt.call(this._shortWeekdaysParse,o))||-1!==(i=vt.call(this._minWeekdaysParse,o))?i:null:"ddd"===e?-1!==(i=vt.call(this._shortWeekdaysParse,o))||-1!==(i=vt.call(this._weekdaysParse,o))||-1!==(i=vt.call(this._minWeekdaysParse,o))?i:null:-1!==(i=vt.call(this._minWeekdaysParse,o))||-1!==(i=vt.call(this._weekdaysParse,o))||-1!==(i=vt.call(this._shortWeekdaysParse,o))?i:null}.call(this,t,e,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(i=f([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=new RegExp(a.replace(".",""),"i")),r&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(r&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(r&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!r&&this._weekdaysParse[n].test(t))return n}},sr.weekdaysRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||$t.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=Vt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},sr.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||$t.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Wt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},sr.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||$t.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=zt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},sr.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},sr.meridiem=function(t,e,r){return 11<t?r?"pm":"PM":r?"am":"AM"},ee("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===_(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=T("moment.lang is deprecated. Use moment.locale instead.",ee),i.langData=T("moment.langData is deprecated. Use moment.localeData instead.",ne);var dr=Math.abs;function hr(t,e,r,n){var i=Ie(e,r);return t._milliseconds+=n*i._milliseconds,t._days+=n*i._days,t._months+=n*i._months,t._bubble()}function fr(t){return t<0?Math.floor(t):Math.ceil(t)}function pr(t){return 4800*t/146097}function gr(t){return 146097*t/4800}function yr(t){return function(){return this.as(t)}}var mr=yr("ms"),vr=yr("s"),br=yr("m"),xr=yr("h"),kr=yr("d"),wr=yr("w"),_r=yr("M"),Er=yr("Q"),Cr=yr("y");function Tr(t){return function(){return this.isValid()?this._data[t]:NaN}}var Or=Tr("milliseconds"),Sr=Tr("seconds"),Ar=Tr("minutes"),jr=Tr("hours"),Dr=Tr("days"),Br=Tr("months"),Nr=Tr("years"),Mr=Math.round,Lr={ss:44,s:45,m:45,h:22,d:26,M:11},Ir=Math.abs;function Pr(t){return(0<t)-(t<0)||+t}function Fr(){if(!this.isValid())return this.localeData().invalidDate();var t,e,r=Ir(this._milliseconds)/1e3,n=Ir(this._days),i=Ir(this._months);e=w((t=w(r/60))/60),r%=60,t%=60;var a=w(i/12),o=i%=12,s=n,c=e,l=t,u=r?r.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var h=d<0?"-":"",f=Pr(this._months)!==Pr(d)?"-":"",p=Pr(this._days)!==Pr(d)?"-":"",g=Pr(this._milliseconds)!==Pr(d)?"-":"";return h+"P"+(a?f+a+"Y":"")+(o?f+o+"M":"")+(s?p+s+"D":"")+(c||l||u?"T":"")+(c?g+c+"H":"")+(l?g+l+"M":"")+(u?g+u+"S":"")}var Rr=Ce.prototype;return Rr.isValid=function(){return this._isValid},Rr.abs=function(){var t=this._data;return this._milliseconds=dr(this._milliseconds),this._days=dr(this._days),this._months=dr(this._months),t.milliseconds=dr(t.milliseconds),t.seconds=dr(t.seconds),t.minutes=dr(t.minutes),t.hours=dr(t.hours),t.months=dr(t.months),t.years=dr(t.years),this},Rr.add=function(t,e){return hr(this,t,e,1)},Rr.subtract=function(t,e){return hr(this,t,e,-1)},Rr.as=function(t){if(!this.isValid())return NaN;var e,r,n=this._milliseconds;if("month"===(t=L(t))||"quarter"===t||"year"===t)switch(e=this._days+n/864e5,r=this._months+pr(e),t){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(e=this._days+Math.round(gr(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}},Rr.asMilliseconds=mr,Rr.asSeconds=vr,Rr.asMinutes=br,Rr.asHours=xr,Rr.asDays=kr,Rr.asWeeks=wr,Rr.asMonths=_r,Rr.asQuarters=Er,Rr.asYears=Cr,Rr.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*_(this._months/12):NaN},Rr._bubble=function(){var t,e,r,n,i,a=this._milliseconds,o=this._days,s=this._months,c=this._data;return 0<=a&&0<=o&&0<=s||a<=0&&o<=0&&s<=0||(a+=864e5*fr(gr(s)+o),s=o=0),c.milliseconds=a%1e3,t=w(a/1e3),c.seconds=t%60,e=w(t/60),c.minutes=e%60,r=w(e/60),c.hours=r%24,s+=i=w(pr(o+=w(r/24))),o-=fr(gr(i)),n=w(s/12),s%=12,c.days=o,c.months=s,c.years=n,this},Rr.clone=function(){return Ie(this)},Rr.get=function(t){return t=L(t),this.isValid()?this[t+"s"]():NaN},Rr.milliseconds=Or,Rr.seconds=Sr,Rr.minutes=Ar,Rr.hours=jr,Rr.days=Dr,Rr.weeks=function(){return w(this.days()/7)},Rr.months=Br,Rr.years=Nr,Rr.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e,r,n,i,a,o,s,c,l,u,d=this.localeData(),h=(e=!t,r=d,n=Ie(this).abs(),i=Mr(n.as("s")),a=Mr(n.as("m")),o=Mr(n.as("h")),s=Mr(n.as("d")),c=Mr(n.as("M")),l=Mr(n.as("y")),(u=i<=Lr.ss&&["s",i]||i<Lr.s&&["ss",i]||a<=1&&["m"]||a<Lr.m&&["mm",a]||o<=1&&["h"]||o<Lr.h&&["hh",o]||s<=1&&["d"]||s<Lr.d&&["dd",s]||c<=1&&["M"]||c<Lr.M&&["MM",c]||l<=1&&["y"]||["yy",l])[2]=e,u[3]=0<+this,u[4]=r,function(t,e,r,n,i){return i.relativeTime(e||1,!!r,t,n)}.apply(null,u));return t&&(h=d.pastFuture(+this,h)),d.postformat(h)},Rr.toISOString=Fr,Rr.toString=Fr,Rr.toJSON=Fr,Rr.locale=$e,Rr.localeData=Ge,Rr.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Fr),Rr.lang=Ue,$("X",0,0,"unix"),$("x",0,0,"valueOf"),ut("x",at),ut("X",/[+-]?\d+(\.\d{1,3})?/),pt("X",(function(t,e,r){r._d=new Date(1e3*parseFloat(t,10))})),pt("x",(function(t,e,r){r._d=new Date(_(t))})),i.version="2.24.0",e=xe,i.fn=ar,i.min=function(){return _e("isBefore",[].slice.call(arguments,0))},i.max=function(){return _e("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=f,i.unix=function(t){return xe(1e3*t)},i.months=function(t,e){return lr(t,e,"months")},i.isDate=l,i.locale=ee,i.invalid=y,i.duration=Ie,i.isMoment=k,i.weekdays=function(t,e,r){return ur(t,e,r,"weekdays")},i.parseZone=function(){return xe.apply(null,arguments).parseZone()},i.localeData=ne,i.isDuration=Te,i.monthsShort=function(t,e){return lr(t,e,"monthsShort")},i.weekdaysMin=function(t,e,r){return ur(t,e,r,"weekdaysMin")},i.defineLocale=re,i.updateLocale=function(t,e){if(null!=e){var r,n,i=Zt;null!=(n=te(t))&&(i=n._config),(r=new B(e=D(i,e))).parentLocale=Jt[t],Jt[t]=r,ee(t)}else null!=Jt[t]&&(null!=Jt[t].parentLocale?Jt[t]=Jt[t].parentLocale:null!=Jt[t]&&delete Jt[t]);return Jt[t]},i.locales=function(){return O(Jt)},i.weekdaysShort=function(t,e,r){return ur(t,e,r,"weekdaysShort")},i.normalizeUnits=L,i.relativeTimeRounding=function(t){return void 0===t?Mr:"function"==typeof t&&(Mr=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==Lr[t]&&(void 0===e?Lr[t]:(Lr[t]=e,"s"===t&&(Lr.ss=e-1),!0))},i.calendarFormat=function(t,e){var r=t.diff(e,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"},i.prototype=ar,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}).call(this,r(47)(t))},function(t,e,r){var n={"./locale":160,"./locale.js":160};function i(t){var e=a(t);return r(e)}function a(t){if(!r.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}i.keys=function(){return Object.keys(n)},i.resolve=a,t.exports=i,i.id=376},function(t,e,r){t.exports=function t(e){"use strict";var r=/^\0+/g,n=/[\0\r\f]/g,i=/: */g,a=/zoo|gra/,o=/([,: ])(transform)/g,s=/,+\s*(?![^(]*[)])/g,c=/ +\s*(?![^(]*[)])/g,l=/ *[\0] */g,u=/,\r+?/g,d=/([\t\r\n ])*\f?&/g,h=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,f=/\W+/g,p=/@(k\w+)\s*(\S*)\s*/,g=/::(place)/g,y=/:(read-only)/g,m=/\s+(?=[{\];=:>])/g,v=/([[}=:>])\s+/g,b=/(\{[^{]+?);(?=\})/g,x=/\s{2,}/g,k=/([^\(])(:+) */g,w=/[svh]\w+-[tblr]{2}/,_=/\(\s*(.*)\s*\)/g,E=/([\s\S]*?);/g,C=/-self|flex-/g,T=/[^]*?(:[rp][el]a[\w-]+)[^]*/,O=/stretch|:\s*\w+\-(?:conte|avail)/,S=/([^-])(image-set\()/,A="-webkit-",j="-moz-",D="-ms-",B=1,N=1,M=0,L=1,I=1,P=1,F=0,R=0,Y=0,V=[],W=[],z=0,$=null,U=0,G=1,H="",q="",X="";function Z(t,e,i,a,o){for(var s,c,u=0,d=0,h=0,f=0,m=0,v=0,b=0,x=0,w=0,E=0,C=0,T=0,O=0,S=0,j=0,D=0,F=0,W=0,$=0,Q=i.length,it=Q-1,at="",ot="",st="",ct="",lt="",ut="";j<Q;){if(b=i.charCodeAt(j),j===it&&d+f+h+u!==0&&(0!==d&&(b=47===d?10:47),f=h=u=0,Q++,it++),d+f+h+u===0){if(j===it&&(D>0&&(ot=ot.replace(n,"")),ot.trim().length>0)){switch(b){case 32:case 9:case 59:case 13:case 10:break;default:ot+=i.charAt(j)}b=59}if(1===F)switch(b){case 123:case 125:case 59:case 34:case 39:case 40:case 41:case 44:F=0;case 9:case 13:case 10:case 32:break;default:for(F=0,$=j,m=b,j--,b=59;$<Q;)switch(i.charCodeAt($++)){case 10:case 13:case 59:++j,b=m,$=Q;break;case 58:D>0&&(++j,b=m);case 123:$=Q}}switch(b){case 123:for(m=(ot=ot.trim()).charCodeAt(0),C=1,$=++j;j<Q;){switch(b=i.charCodeAt(j)){case 123:C++;break;case 125:C--;break;case 47:switch(v=i.charCodeAt(j+1)){case 42:case 47:j=nt(v,j,it,i)}break;case 91:b++;case 40:b++;case 34:case 39:for(;j++<it&&i.charCodeAt(j)!==b;);}if(0===C)break;j++}switch(st=i.substring($,j),0===m&&(m=(ot=ot.replace(r,"").trim()).charCodeAt(0)),m){case 64:switch(D>0&&(ot=ot.replace(n,"")),v=ot.charCodeAt(1)){case 100:case 109:case 115:case 45:s=e;break;default:s=V}if($=(st=Z(e,s,st,v,o+1)).length,Y>0&&0===$&&($=ot.length),z>0&&(c=rt(3,st,s=J(V,ot,W),e,N,B,$,v,o,a),ot=s.join(""),void 0!==c&&0===($=(st=c.trim()).length)&&(v=0,st="")),$>0)switch(v){case 115:ot=ot.replace(_,et);case 100:case 109:case 45:st=ot+"{"+st+"}";break;case 107:st=(ot=ot.replace(p,"$1 $2"+(G>0?H:"")))+"{"+st+"}",st=1===I||2===I&&tt("@"+st,3)?"@"+A+st+"@"+st:"@"+st;break;default:st=ot+st,112===a&&(ct+=st,st="")}else st="";break;default:st=Z(e,J(e,ot,W),st,a,o+1)}lt+=st,T=0,F=0,S=0,D=0,W=0,O=0,ot="",st="",b=i.charCodeAt(++j);break;case 125:case 59:if(($=(ot=(D>0?ot.replace(n,""):ot).trim()).length)>1)switch(0===S&&(45===(m=ot.charCodeAt(0))||m>96&&m<123)&&($=(ot=ot.replace(" ",":")).length),z>0&&void 0!==(c=rt(1,ot,e,t,N,B,ct.length,a,o,a))&&0===($=(ot=c.trim()).length)&&(ot="\0\0"),m=ot.charCodeAt(0),v=ot.charCodeAt(1),m){case 0:break;case 64:if(105===v||99===v){ut+=ot+i.charAt(j);break}default:if(58===ot.charCodeAt($-1))break;ct+=K(ot,m,v,ot.charCodeAt(2))}T=0,F=0,S=0,D=0,W=0,ot="",b=i.charCodeAt(++j)}}switch(b){case 13:case 10:if(d+f+h+u+R===0)switch(E){case 41:case 39:case 34:case 64:case 126:case 62:case 42:case 43:case 47:case 45:case 58:case 44:case 59:case 123:case 125:break;default:S>0&&(F=1)}47===d?d=0:L+T===0&&107!==a&&ot.length>0&&(D=1,ot+="\0"),z*U>0&&rt(0,ot,e,t,N,B,ct.length,a,o,a),B=1,N++;break;case 59:case 125:if(d+f+h+u===0){B++;break}default:switch(B++,at=i.charAt(j),b){case 9:case 32:if(f+u+d===0)switch(x){case 44:case 58:case 9:case 32:at="";break;default:32!==b&&(at=" ")}break;case 0:at="\\0";break;case 12:at="\\f";break;case 11:at="\\v";break;case 38:f+d+u===0&&L>0&&(W=1,D=1,at="\f"+at);break;case 108:if(f+d+u+M===0&&S>0)switch(j-S){case 2:112===x&&58===i.charCodeAt(j-3)&&(M=x);case 8:111===w&&(M=w)}break;case 58:f+d+u===0&&(S=j);break;case 44:d+h+f+u===0&&(D=1,at+="\r");break;case 34:case 39:0===d&&(f=f===b?0:0===f?b:f);break;case 91:f+d+h===0&&u++;break;case 93:f+d+h===0&&u--;break;case 41:f+d+u===0&&h--;break;case 40:if(f+d+u===0){if(0===T)switch(2*x+3*w){case 533:break;default:C=0,T=1}h++}break;case 64:d+h+f+u+S+O===0&&(O=1);break;case 42:case 47:if(f+u+h>0)break;switch(d){case 0:switch(2*b+3*i.charCodeAt(j+1)){case 235:d=47;break;case 220:$=j,d=42}break;case 42:47===b&&42===x&&$+2!==j&&(33===i.charCodeAt($+2)&&(ct+=i.substring($,j+1)),at="",d=0)}}if(0===d){if(L+f+u+O===0&&107!==a&&59!==b)switch(b){case 44:case 126:case 62:case 43:case 41:case 40:if(0===T){switch(x){case 9:case 32:case 10:case 13:at+="\0";break;default:at="\0"+at+(44===b?"":"\0")}D=1}else switch(b){case 40:S+7===j&&108===x&&(S=0),T=++C;break;case 41:0==(T=--C)&&(D=1,at+="\0")}break;case 9:case 32:switch(x){case 0:case 123:case 125:case 59:case 44:case 12:case 9:case 32:case 10:case 13:break;default:0===T&&(D=1,at+="\0")}}ot+=at,32!==b&&9!==b&&(E=b)}}w=x,x=b,j++}if($=ct.length,Y>0&&0===$&&0===lt.length&&0===e[0].length==0&&(109!==a||1===e.length&&(L>0?q:X)===e[0])&&($=e.join(",").length+2),$>0){if(s=0===L&&107!==a?function(t){for(var e,r,i=0,a=t.length,o=Array(a);i<a;++i){for(var s=t[i].split(l),c="",u=0,d=0,h=0,f=0,p=s.length;u<p;++u)if(!(0===(d=(r=s[u]).length)&&p>1)){if(h=c.charCodeAt(c.length-1),f=r.charCodeAt(0),e="",0!==u)switch(h){case 42:case 126:case 62:case 43:case 32:case 40:break;default:e=" "}switch(f){case 38:r=e+q;case 126:case 62:case 43:case 32:case 41:case 40:break;case 91:r=e+r+q;break;case 58:switch(2*r.charCodeAt(1)+3*r.charCodeAt(2)){case 530:if(P>0){r=e+r.substring(8,d-1);break}default:(u<1||s[u-1].length<1)&&(r=e+q+r)}break;case 44:e="";default:r=d>1&&r.indexOf(":")>0?e+r.replace(k,"$1"+q+"$2"):e+r+q}c+=r}o[i]=c.replace(n,"").trim()}return o}(e):e,z>0&&void 0!==(c=rt(2,ct,s,t,N,B,$,a,o,a))&&0===(ct=c).length)return ut+ct+lt;if(ct=s.join(",")+"{"+ct+"}",I*M!=0){switch(2!==I||tt(ct,2)||(M=0),M){case 111:ct=ct.replace(y,":-moz-$1")+ct;break;case 112:ct=ct.replace(g,"::"+A+"input-$1")+ct.replace(g,"::-moz-$1")+ct.replace(g,":-ms-input-$1")+ct}M=0}}return ut+ct+lt}function J(t,e,r){var n=e.trim().split(u),i=n,a=n.length,o=t.length;switch(o){case 0:case 1:for(var s=0,c=0===o?"":t[0]+" ";s<a;++s)i[s]=Q(c,i[s],r,o).trim();break;default:s=0;var l=0;for(i=[];s<a;++s)for(var d=0;d<o;++d)i[l++]=Q(t[d]+" ",n[s],r,o).trim()}return i}function Q(t,e,r,n){var i=e,a=i.charCodeAt(0);switch(a<33&&(a=(i=i.trim()).charCodeAt(0)),a){case 38:switch(L+n){case 0:case 1:if(0===t.trim().length)break;default:return i.replace(d,"$1"+t.trim())}break;case 58:switch(i.charCodeAt(1)){case 103:if(P>0&&L>0)return i.replace(h,"$1").replace(d,"$1"+X);break;default:return t.trim()+i.replace(d,"$1"+t.trim())}default:if(r*L>0&&i.indexOf("\f")>0)return i.replace(d,(58===t.charCodeAt(0)?"":"$1")+t.trim())}return t+i}function K(t,e,r,n){var l,u=0,d=t+";",h=2*e+3*r+4*n;if(944===h)return function(t){var e=t.length,r=t.indexOf(":",9)+1,n=t.substring(0,r).trim(),i=t.substring(r,e-1).trim();switch(t.charCodeAt(9)*G){case 0:break;case 45:if(110!==t.charCodeAt(10))break;default:var a=i.split((i="",s)),o=0;for(r=0,e=a.length;o<e;r=0,++o){for(var l=a[o],u=l.split(c);l=u[r];){var d=l.charCodeAt(0);if(1===G&&(d>64&&d<90||d>96&&d<123||95===d||45===d&&45!==l.charCodeAt(1)))switch(isNaN(parseFloat(l))+(-1!==l.indexOf("("))){case 1:switch(l){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:l+=H}}u[r++]=l}i+=(0===o?"":",")+u.join(" ")}}return i=n+i+";",1===I||2===I&&tt(i,1)?A+i+i:i}(d);if(0===I||2===I&&!tt(d,1))return d;switch(h){case 1015:return 97===d.charCodeAt(10)?A+d+d:d;case 951:return 116===d.charCodeAt(3)?A+d+d:d;case 963:return 110===d.charCodeAt(5)?A+d+d:d;case 1009:if(100!==d.charCodeAt(4))break;case 969:case 942:return A+d+d;case 978:return A+d+j+d+d;case 1019:case 983:return A+d+j+d+D+d+d;case 883:return 45===d.charCodeAt(8)?A+d+d:d.indexOf("image-set(",11)>0?d.replace(S,"$1"+A+"$2")+d:d;case 932:if(45===d.charCodeAt(4))switch(d.charCodeAt(5)){case 103:return A+"box-"+d.replace("-grow","")+A+d+D+d.replace("grow","positive")+d;case 115:return A+d+D+d.replace("shrink","negative")+d;case 98:return A+d+D+d.replace("basis","preferred-size")+d}return A+d+D+d+d;case 964:return A+d+D+"flex-"+d+d;case 1023:if(99!==d.charCodeAt(8))break;return l=d.substring(d.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),A+"box-pack"+l+A+d+D+"flex-pack"+l+d;case 1005:return a.test(d)?d.replace(i,":"+A)+d.replace(i,":"+j)+d:d;case 1e3:switch(u=(l=d.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(u)){case 226:l=d.replace(w,"tb");break;case 232:l=d.replace(w,"tb-rl");break;case 220:l=d.replace(w,"lr");break;default:return d}return A+d+D+l+d;case 1017:if(-1===d.indexOf("sticky",9))return d;case 975:switch(u=(d=t).length-10,h=(l=(33===d.charCodeAt(u)?d.substring(0,u):d).substring(t.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(l.charCodeAt(8)<111)break;case 115:d=d.replace(l,A+l)+";"+d;break;case 207:case 102:d=d.replace(l,A+(h>102?"inline-":"")+"box")+";"+d.replace(l,A+l)+";"+d.replace(l,D+l+"box")+";"+d}return d+";";case 938:if(45===d.charCodeAt(5))switch(d.charCodeAt(6)){case 105:return l=d.replace("-items",""),A+d+A+"box-"+l+D+"flex-"+l+d;case 115:return A+d+D+"flex-item-"+d.replace(C,"")+d;default:return A+d+D+"flex-line-pack"+d.replace("align-content","").replace(C,"")+d}break;case 973:case 989:if(45!==d.charCodeAt(3)||122===d.charCodeAt(4))break;case 931:case 953:if(!0===O.test(t))return 115===(l=t.substring(t.indexOf(":")+1)).charCodeAt(0)?K(t.replace("stretch","fill-available"),e,r,n).replace(":fill-available",":stretch"):d.replace(l,A+l)+d.replace(l,j+l.replace("fill-",""))+d;break;case 962:if(d=A+d+(102===d.charCodeAt(5)?D+d:"")+d,r+n===211&&105===d.charCodeAt(13)&&d.indexOf("transform",10)>0)return d.substring(0,d.indexOf(";",27)+1).replace(o,"$1"+A+"$2")+d}return d}function tt(t,e){var r=t.indexOf(1===e?":":"{"),n=t.substring(0,3!==e?r:10),i=t.substring(r+1,t.length-1);return $(2!==e?n:n.replace(T,"$1"),i,e)}function et(t,e){var r=K(e,e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2));return r!==e+";"?r.replace(E," or ($1)").substring(4):"("+e+")"}function rt(t,e,r,n,i,a,o,s,c,l){for(var u,d=0,h=e;d<z;++d)switch(u=W[d].call(at,t,h,r,n,i,a,o,s,c,l)){case void 0:case!1:case!0:case null:break;default:h=u}if(h!==e)return h}function nt(t,e,r,n){for(var i=e+1;i<r;++i)switch(n.charCodeAt(i)){case 47:if(42===t&&42===n.charCodeAt(i-1)&&e+2!==i)return i+1;break;case 10:if(47===t)return i+1}return i}function it(t){for(var e in t){var r=t[e];switch(e){case"keyframe":G=0|r;break;case"global":P=0|r;break;case"cascade":L=0|r;break;case"compress":F=0|r;break;case"semicolon":R=0|r;break;case"preserve":Y=0|r;break;case"prefix":$=null,r?"function"!=typeof r?I=1:(I=2,$=r):I=0}}return it}function at(e,r){if(void 0!==this&&this.constructor===at)return t(e);var i=e,a=i.charCodeAt(0);a<33&&(a=(i=i.trim()).charCodeAt(0)),G>0&&(H=i.replace(f,91===a?"":"-")),a=1,1===L?X=i:q=i;var o,s=[X];z>0&&void 0!==(o=rt(-1,r,s,s,N,B,0,0,0,0))&&"string"==typeof o&&(r=o);var c=Z(V,s,r,0,0);return z>0&&void 0!==(o=rt(-2,c,s,s,N,B,c.length,0,0,0))&&"string"!=typeof(c=o)&&(a=0),H="",X="",q="",M=0,N=1,B=1,F*a==0?c:function(t){return t.replace(n,"").replace(m,"").replace(v,"$1").replace(b,"$1").replace(x," ")}(c)}return at.use=function t(e){switch(e){case void 0:case null:z=W.length=0;break;default:if("function"==typeof e)W[z++]=e;else if("object"==typeof e)for(var r=0,n=e.length;r<n;++r)t(e[r]);else U=0|!!e}return t},at.set=it,void 0!==e&&it(e),at}(null)},function(t,e,r){"use strict";r.r(e);var n=r(1),i=r(3),a={securityLevel:"loose",logLevel:3,startOnLoad:!1,arrowMarkerAbsolute:!0,flowchart:{curve:"linear",htmlLabels:!0,useMaxWidth:!0},sequence:{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,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:3}},o={common:{fontFamily:"Roboto,Helvetica Neue,Arial,sans-serif"},classDiagram:{},flowChart:{},sequenceDiagram:{},stateDiagram:{},userJourneyDiagram:{}},s={pluginVersion:"",anonymousTracking:!0,nodeSize:{minWidth:30,minHeight:40},composites:[],metricCharacterReplacements:[],style:"",legend:{show:!0,stats:["mean","last","min","max","sum"],asTable:!0,hideEmpty:!1,hideZero:!1,placement:"under",displayMode:i.LegendDisplayMode.Table,sortBy:"last",sortDesc:!0,gradient:{enabled:!0,show:!0}},maxWidth:!0,moddedSeriesVal:0,valueName:"last",content:"graph LR\n      A --\x3e B\n    ",mode:"content",mermaidServiceUrl:"",useBasicAuth:!1,authUsername:"",authPassword:"",mermaidThemeVariablesDark:o,mermaidThemeVariablesLight:o,useBackground:!1},c=function(t){return t.options=s,t.options.pluginVersion=t.pluginVersion||"",t.options},l=function(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var u=function(){return(u=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function d(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,a=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o}function f(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var p,g,y,m,v,b,x,k,w,_=r(0),E=r.n(_),C=function(t){var e=t.value,r=t.onChange,n=t.context,a=(t.item,h(Object(_.useState)(e),2)),o=a[0],s=a[1],c=function(){r(o)};o||(s([]),c());var l=function(t){return t.members.map((function(e,r){return E.a.createElement("div",{className:"gf-form-inline"},E.a.createElement("div",{className:"gf-form"},E.a.createElement("label",{className:"gf-form-label"},E.a.createElement("i",{className:"fa fa-trash pointer",onClick:function(){return function(t,e){t.members.splice(t.members.indexOf(e)),c()}(t,e)}}))),E.a.createElement("div",{className:"gf-form"},E.a.createElement("select",{value:e,onChange:function(e){return function(t,e,r){r.members[e]=t.currentTarget.value,c()}(e,r,t)}},E.a.createElement("option",null),function(t){var e;return null===(e=n.data)||void 0===e?void 0:e.map((function(e){return E.a.createElement("option",{selected:e.name===t,value:e.name},e.name)}))}(e))))}))},u=function(t){return E.a.createElement("div",null,E.a.createElement("hr",null),E.a.createElement("div",{className:"gf-form"},E.a.createElement("label",{className:"gf-form-label"},E.a.createElement("i",{className:"fa fa-trash pointer",onClick:function(){return function(t){o.splice(o.indexOf(t)),c()}(t)}})),E.a.createElement("div",{className:"gf-form"},E.a.createElement("label",{className:"gf-form-label"},"Name")),E.a.createElement("div",{className:"gf-form"},E.a.createElement("input",{value:t.name,onChange:function(e){return function(t,e){e.name=t.currentTarget.value,c()}(e,t)},type:"text",className:"gf-form-input width-15"}))),E.a.createElement("div",{className:"gf-form"},E.a.createElement(i.Checkbox,{css:"",value:t.showLowestValue,onChange:function(e){return function(t,e){e.showLowestValue=!e.showLowestValue,c()}(0,t)},label:"Show lowest metric"})),E.a.createElement("div",null,l(t)),E.a.createElement("div",{className:"gf-form"},E.a.createElement("button",{className:"btn btn-inverse gf-form-input",onClick:function(){return function(t){t.members.push(""),c()}(t)}},E.a.createElement("i",{className:"fa fa-plus pointer"})," Add member to composite")))},d=o.map((function(t){return E.a.createElement("div",null,u(t))}));return E.a.createElement("div",{className:"gf-form-group"},E.a.createElement("div",{className:"edit-tab-content"},E.a.createElement("div",{className:"gf-form-group"},d),E.a.createElement("hr",null)),E.a.createElement("button",{className:"btn btn-inverse gf-form-input",onClick:function(){o.push({name:"new-composite",members:[],valueName:"last",showLowestValue:!1}),c()}},E.a.createElement("i",{className:"fa fa-plus pointer"})," Add Composite"))},T=function(t){var e=t.options||s;return e.pluginVersion=t.pluginVersion||"latest",e},O=r(4),S=r(60),A=function(t){var e=t.item,r=t.onLabelClick,a=Object(_.useContext)(i.ThemeContext);return E.a.createElement(E.a.Fragment,null,E.a.createElement("div",{onClick:function(t){r&&r(e,t)},className:Object(O.css)(p||(p=f(["\n          cursor: pointer;\n          white-space: pre-wrap;\n          color: ",";\n        "],["\n          cursor: pointer;\n          white-space: pre-wrap;\n          color: ",";\n        "])),!e.isVisible&&a.colors.linkDisabled)},e.label),e.displayValues&&E.a.createElement("div",{className:Object(O.css)(g||(g=f(["\n            margin-left: 6px;\n          "],["\n            margin-left: 6px;\n          "])))}," ",e.displayValues.forEach((function(t){E.a.createElement("div",null,t.title&&Object(S.capitalize)(t.title)+":"," ",Object(n.formattedValueToString)(t))}))))},j=Object(i.stylesFactory)((function(t){return{row:Object(O.css)(y||(y=f(["\n      font-size: ",";\n      td {\n        padding: "," ",";\n        white-space: nowrap;\n      }\n    "],["\n      font-size: ",";\n      td {\n        padding: "," ",";\n        white-space: nowrap;\n      }\n    "])),t.typography.size.sm,t.spacing.xxs,t.spacing.sm),label:Object(O.css)(m||(m=f(["\n      cursor: pointer;\n      white-space: nowrap;\n    "],["\n      cursor: pointer;\n      white-space: nowrap;\n    "]))),itemWrapper:Object(O.css)(v||(v=f(["\n      display: flex;\n      white-space: nowrap;\n    "],["\n      display: flex;\n      white-space: nowrap;\n    "]))),value:Object(O.css)(b||(b=f(["\n      text-align: right;\n    "],["\n      text-align: right;\n    "]))),yAxisLabel:Object(O.css)(x||(x=f(["\n      color: ",";\n    "],["\n      color: ",";\n    "])),t.palette.gray2)}})),D=function(t){var e=t.item,r=t.onLabelClick,a=t.className,o=Object(_.useContext)(i.ThemeContext),s=j(o);return E.a.createElement("tr",{className:Object(O.cx)(s.row,a)},E.a.createElement("td",null,E.a.createElement("span",{className:s.itemWrapper},E.a.createElement("div",{onClick:function(t){r&&r(e,t)},className:s.label},e.label," ",2===e.yAxis&&E.a.createElement("span",{className:s.yAxisLabel},"(right y-axis)")))),e.displayValues&&e.displayValues.map((function(t,e){return E.a.createElement("td",{className:s.value,key:t.title+"-"+e},Object(n.formattedValueToString)(t))})))},B=r(85),N=r.n(B),M=r(86),L=r.n(M),I=function(t){var e=t.items,r=t.displayMode,n=t.sortBy,a=t.sortDesc,o=t.onToggleSort,s=t.placement,c=(t.className,function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}(t,["items","displayMode","sortBy","sortDesc","onToggleSort","placement","className"])),l=Object(_.useContext)(i.ThemeContext);if(r===i.LegendDisplayMode.Table){var d=e.map((function(t){return t.displayValues?t.displayValues.map((function(t){return t.title})):[]})).reduce((function(t,e){return N()(t,e.filter((function(t){return!!t})))}),[""]),h=n?L()(e,(function(t){if(t.displayValues){var e=t.displayValues.filter((function(t){return t.title===n}))[0];return e&&e.numeric}})):e,p=Object(i.selectThemeVariant)({dark:l.palette.dark6,light:l.palette.gray5},l.type);return E.a.createElement(i.LegendTable,{className:Object(O.css)(k||(k=f(["\n          font-size: ",";\n          th {\n            padding: "," ",";\n          }\n        "],["\n          font-size: ",";\n          th {\n            padding: "," ",";\n          }\n        "])),l.typography.size.sm,l.spacing.xxs,l.spacing.sm),items:a?h.reverse():h,columns:d,placement:s,sortBy:n,sortDesc:a,itemRenderer:function(t,e){return E.a.createElement(D,u({key:t.label+"-"+e,item:t,className:Object(O.css)(w||(w=f(["\n              background: ",";\n            "],["\n              background: ",";\n            "])),e%2==0?p:"none")},c))},onToggleSort:o})}return E.a.createElement(i.LegendList,{items:e,placement:s,itemRenderer:function(t){return E.a.createElement(A,u({item:t},c))}})};I.displayName="DiagramLegend";var P=r(162),F=r.n(P),R=r(6);var Y,V,W,z=function(t,e){if(t){var r=t.node().closest("g"),n=t.node().closest("g.label"),i=t.node().closest("foreignObject");if(r&&n&&i){r.setAttribute("transform","");var a=Math.max(Number.parseInt(i.getAttribute("width")||"1",10),e.minWidth),o=Math.max(Number.parseInt(i.getAttribute("height")||"1",10),e.minHeight);i.setAttribute("height",o.toString()),i.setAttribute("width",a.toString()),n.setAttribute("transform","translate(-"+a/2+",-"+o/2+")")}}},$=function(t,e,r,i){var a=t.selectAll("rect,circle,polygon,path"),o=t.select("div");if(o.classed("diagram-value",!0),o.node()){var s=o.node();z(o,i);var c=s.innerText+"<br/> "+Object(n.formattedValueToString)(e);e.isComposite&&(c+="<br/>"+e.originalName,s.style.marginTop="-"+i.minHeight/4+"px"),s.innerHTML='<div style="margin:auto">'+c+"</div>"}e.color&&(r?a.style("fill",e.color):o.style("color",e.color))},U=function(t,e,r){var i=e.metricName,a=function(t,e){return Object(R.select)(t.querySelector("#"+e))}(t,i);a.empty()?(a=function(t,e){return Object(R.select)(t).selectAll("span").filter((function(){return Object(R.select)(this).text()===e}))}(t,i)).empty()?(a=function(t,e){var r=Object(R.select)(t).selectAll("div").filter((function(){return Object(R.select)(this).text()===e})).node();if(null!=r){var n=r.closest(".node");if(null!=n)return Object(R.select)(n)}return Object(R.select)(null)}(t,i)).empty()?(a=function(t,e){return Object(R.select)(t).selectAll("text").filter((function(){return Object(R.select)(this).text()===e}))}(t,i)).empty()?console.log("could not find a diagram node with id/text: "+i):function(t,e,r){t.each((function(t){var i={x:t.getBBox().x,y:t.getBBox().y+t.getBBox().height+10,width:t.getBBox().width,height:t.getBBox().height};if(e.color){var a=Object(R.select)(t.parentNode).insert("rect").attr("x",i.x).attr("y",i.y).attr("width",i.width).attr("height",i.height),o=Object(R.select)(t.parentNode).insert("text").text(Object(n.formattedValueToString)(e)).attr("x",i.x+i.width/2).attr("y",i.y+i.height-1).attr("width",i.width).attr("height",i.height).style("text-anchor","middle");e.color&&(r?a.style("fill",e.color):o.style("color",e.color))}}))}(a,e,r.useBackground):$(a,e,r.useBackground,r.nodeSize):function(t,e,r,i){var a=Object(R.select)(t.node().parentNode);a.append("br");var o=a.append("span");o.classed("diagram-value",!0),o.html(Object(n.formattedValueToString)(e)),z(a,i),e.color&&(r?o.style("background-color",e.color):o.style("color",e.color))}(a,e,r.useBackground,r.nodeSize):$(a,e,r.useBackground,r.nodeSize)},G=function(t,e,r,n){var i=function(t){return t.filter((function(t){return t.valueField.config.custom})).flatMap((function(t){var e,r=null===(e=t.info)||void 0===e?void 0:e.find((function(e){return e.title===t.valueField.config.custom.valueName}));return r?u(u({},r),{metricName:t.label,valueName:r.title}):null})).filter((function(t){return null!=t}))}(e),a=Object(R.select)(t).select("svg").node();if(null!=a){var o=a;r.maxWidth&&Object(R.select)(o).style("max-width","100%").style("max-height","100%"),i.forEach((function(t){U(o,t,r)})),function(t,e){return e.map((function(e){var r=e.members.flatMap((function(e){return t.filter((function(t){return t.metricName===e}))}));if(r.length>0){var n=r.reduce((function(t,r){var n=isNaN(t.numeric)?0:t.numeric,i=(isNaN(r.numeric)?0:r.numeric)<n;return e.showLowestValue?i?r:t:i?t:r}));return n.isComposite=!0,n.originalName=n.metricName,n.metricName=e.name,n}return null})).filter((function(t){return null!=t}))}(i,r.composites).forEach((function(t){U(o,t,r)})),function(t,e,r){Object(R.select)(t).append("style").text(function(t,e){return"\n\t#"+e+" .badge, #"+e+" .label {\n\t\ttext-shadow: none;\n\t}\n\n\t#"+e+" foreignObject {\n\t\toverflow: visible;\n\t}\n\t\n\t#"+e+" .edgeLabel, #"+e+" .edgeLabel rect {\n\t\tbackground-color: transparent;\n\t\tfill: transparent;\n\t}\n\n\t"+t+"\n\t"}(e,r))}(t,r.style,n)}},H=F.a.mermaidAPI,q=Object(i.stylesFactory)((function(t){var e=t.options;return{wrapper:Object(O.css)(Y||(Y=f(["\n    display: flex;\n    flex-direction: ",";\n    height: 100%;\n  "],["\n    display: flex;\n    flex-direction: ",";\n    height: 100%;\n  "])),"under"===e.legend.placement?"column":"row"),diagramContainer:Object(O.css)(V||(V=f(["\n    min-height: 65%;\n    flex-grow: 1;\n  "],["\n    min-height: 65%;\n    flex-grow: 1;\n  "]))),legendContainer:Object(O.css)(W||(W=f(["\n    padding: 10px 0;\n    max-height: ",";\n  "],["\n    padding: 10px 0;\n    max-height: ",";\n  "])),"under"===e.legend.placement?"35%":"none")}})),X=function(t){function e(e){var r=t.call(this,e)||this;return r.legendStyles={position:"absolute",bottom:0,width:"100%"},r.shouldHideLegendItem=function(t,e,r){void 0===e&&(e=!1),void 0===r&&(r=!1);var n=0===t.reduce((function(t,e){return t+(e[1]||0)}),0),i=!t.reduce((function(t,e){return t&&null!==e[1]}),!0);return e&&i||r&&n},r.getLegendItems=function(){return r.props.data.reduce((function(t,e){return r.shouldHideLegendItem(e.data,r.props.options.legend.hideEmpty,r.props.options.legend.hideZero)?t:t.concat([{label:e.label,color:"",isVisible:e.isVisible,yAxis:0,displayValues:e.info||[]}])}),[])},r.onToggleSort=r.onToggleSort.bind(r),r.setDiagramRef=r.setDiagramRef.bind(r),r.renderCallback=r.renderCallback.bind(r),r}return function(t,e){function r(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.getDerivedStateFromProps=function(t,e){var r=q(t),n=r.diagramContainer,i=r.wrapper,a=r.legendContainer;return e?null:{diagramContainer:n,wrapper:i,legendContainer:a}},e.prototype.setDiagramRef=function(t){this.diagramRef=t},e.prototype.componentDidMount=function(){this.initializeMermaid()},e.prototype.componentDidUpdate=function(t){t.options===this.props.options&&t.fieldConfig===this.props.fieldConfig&&t.theme===this.props.theme&&t.data===this.props.data||this.initializeMermaid()},e.prototype.contentProcessor=function(t){var e=this.props.theme.isDark?"dark":"base",r=t.match("%%{.*}%%");if(r&&r.length>0)return t;var n=void 0;return n=this.props.theme.isDark?u(u(u(u(u(u({},this.props.options.mermaidThemeVariablesDark.common),this.props.options.mermaidThemeVariablesDark.classDiagram),this.props.options.mermaidThemeVariablesDark.flowChart),this.props.options.mermaidThemeVariablesDark.sequenceDiagram),this.props.options.mermaidThemeVariablesDark.stateDiagram),this.props.options.mermaidThemeVariablesDark.userJourneyDiagram):u(u(u(u(u(u({},this.props.options.mermaidThemeVariablesLight.common),this.props.options.mermaidThemeVariablesLight.classDiagram),this.props.options.mermaidThemeVariablesLight.flowChart),this.props.options.mermaidThemeVariablesLight.sequenceDiagram),this.props.options.mermaidThemeVariablesLight.stateDiagram),this.props.options.mermaidThemeVariablesLight.userJourneyDiagram),"%%{init: {'theme': '"+e+"', 'themeVariables': "+JSON.stringify(n)+"}}%%\n"+t},e.prototype.initializeMermaid=function(){var t=Object(S.merge)({},a,{theme:this.props.theme.isDark?"dark":"base"});if(H.initialize(t),this.diagramRef)try{var e="diagram-"+this.props.id,r=this.props.replaceVariables(this.contentProcessor(this.props.options.content));this.diagramRef.innerHTML=H.render(e,r,this.renderCallback),G(this.diagramRef,this.props.data,this.props.options,e),this.bindFunctions&&this.bindFunctions(this.diagramRef)}catch(t){this.diagramRef.innerHTML="<div><p>Error rendering diagram. Check the diagram definition</p><p>"+t+"</p></div>"}},e.prototype.onToggleSort=function(t){var e=this.props,r=e.onOptionsChange,n=e.options;r(u(u({},n),{legend:u(u({},n.legend),{sortBy:t,sortDesc:t===n.legend.sortBy&&!n.legend.sortDesc})}))},e.prototype.renderCallback=function(t,e){this&&e&&(console.log("binding diagram functions"),this.bindFunctions=e)},e.prototype.render=function(){return E.a.createElement("div",{className:this.state.wrapper},E.a.createElement("div",{ref:this.setDiagramRef,className:this.state.diagramContainer}),this.props.options.legend.show&&E.a.createElement("div",{className:this.state.legendContainer},E.a.createElement(i.CustomScrollbar,{hideHorizontalTrack:!0},E.a.createElement(I,{items:this.getLegendItems(),displayMode:this.props.options.legend.displayMode,placement:this.props.options.legend.placement,sortBy:this.props.options.legend.sortBy,sortDesc:this.props.options.legend.sortDesc,onLabelClick:function(t,e){},onToggleSort:this.onToggleSort}))))},e}(E.a.Component),Z=function(t,e){if("string"!=typeof t)return"DATASOURCE_SENT_INVALID_METRIC_TARGET";var r=t.replace(/"|,|;|=|:|{|}/g,"_");for(var i in e){var a=e[i],o=a.replacementPattern;0!==o.toString().length&&("/"===o.toString()[0]&&(o=Object(n.stringToJsRegex)(a.replacementPattern.toString())),r=r.replace(o,a.replaceWithText))}return r},J=["min","max","mean","last","sum"],Q=r(161),K=r.n(Q),tt=r(22);function et(t){return(et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rt(t){return"function"==typeof t}function nt(t){return"string"==typeof t}function it(t){if("object"!==et(t)||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function at(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}var ot="undefined"!=typeof document;function st(t){var e=function(t){if(t){var e=t.match(/\?(.*)/);return e&&e[1]?e[1].split("#")[0]:""}return ot&&window.location.search.substring(1)}(t);return e?function(t){var e,r=/([^&=]+)=?([^&]*)/g,n={};for(;e=r.exec(t);){var i=at(e[1]),a=at(e[2]);if("[]"===i.substring(i.length-2))i=i.substring(0,i.length-2),(n[i]||(n[i]=[])).push(a);else{var o=""===a||a;n[i]=o}}for(var s in n){var c=s.split("[");if(c.length>1){var l=[];c.forEach((function(t,e){var r=t.replace(/[?[\]\\ ]/g,"");l.push(r)})),ct(n,l,n[s]),delete n[s]}}return n}(e):{}}function ct(t,e,r){for(var n=e.length-1,i=0;i<n;++i){var a=e[i];a in t||(t[a]={}),t=t[a]}t[e[n]]=r}function lt(){for(var t,e,r,n,i=[],a=0;a<256;a++)i[a]=(a<16?"0":"")+a.toString(16);return t=ut(),e=ut(),r=ut(),n=ut(),"".concat(i[255&t]+i[t>>8&255]+i[t>>16&255]+i[t>>24&255],"-").concat(i[255&e]).concat(i[e>>8&255],"-").concat(i[e>>16&15|64]).concat(i[e>>24&255],"-").concat(i[63&r|128]).concat(i[r>>8&255],"-").concat(i[r>>16&255]).concat(i[r>>24&255]).concat(i[255&n]).concat(i[n>>8&255]).concat(i[n>>16&255]).concat(i[n>>24&255])}function ut(){return 4294967295*Math.random()|0}var dt=function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}};var ht=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)};var ft=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var pt=function(t){return dt(t)||ht(t)||ft()};function gt(t,e){return t(e={exports:{}},e.exports),e.exports}var yt=gt((function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(n){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?t.exports=r=function(t){return e(t)}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},r(n)}t.exports=r}));var mt=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t};function vt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}var bt=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?vt(r,!0).forEach((function(e){mt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vt(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t},xt="function",kt="undefined",wt="@@redux/"+Math.random().toString(36),_t=function(){return("undefined"==typeof Symbol?"undefined":yt(Symbol))===xt&&Symbol.observable||"@@observable"}(),Et=" != "+xt;function Ct(t,e,r){if(yt(e)===xt&&yt(r)===kt&&(r=e,e=void 0),yt(r)!==kt){if(yt(r)!==xt)throw new Error("enhancer"+Et);return r(Ct)(t,e)}if(yt(t)!==xt)throw new Error("reducer"+Et);var n=t,i=e,a=[],o=a,s=!1;function c(){o===a&&(o=a.slice())}function l(){return i}function u(t){if(yt(t)!==xt)throw new Error("Listener"+Et);var e=!0;return c(),o.push(t),function(){if(e){e=!1,c();var r=o.indexOf(t);o.splice(r,1)}}}function d(t){if(!it(t))throw new Error("Act != obj");if(yt(t.type)===kt)throw new Error("ActType "+kt);if(s)throw new Error("Dispatch in reducer");try{s=!0,i=n(i,t)}finally{s=!1}for(var e=a=o,r=0;r<e.length;r++){(0,e[r])()}return t}return d({type:"@@redux/INIT"}),mt({dispatch:d,subscribe:u,getState:l,replaceReducer:function(t){if(yt(t)!==xt)throw new Error("next reducer"+Et);n=t,d({type:"@@redux/INIT"})}},_t,(function(){var t=u;return mt({subscribe:function(e){if("object"!==yt(e))throw new TypeError("Observer != obj");function r(){e.next&&e.next(l())}return r(),{unsubscribe:t(r)}}},_t,(function(){return this}))}))}function Tt(t,e){var r=e&&e.type;return"action "+(r&&r.toString()||"?")+"reducer "+t+" returns "+kt}function Ot(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var i=e[n];yt(t[i])===xt&&(r[i]=t[i])}var a,o=Object.keys(r);try{!function(t){Object.keys(t).forEach((function(e){var r=t[e],n=r(void 0,{type:"@@redux/INIT"});if(yt(n)===kt||yt(r(void 0,{type:wt}))===kt)throw new Error("reducer "+e+" "+kt)}))}(r)}catch(t){a=t}return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;if(a)throw a;for(var n=!1,i={},s=0;s<o.length;s++){var c=o[s],l=r[c],u=t[c],d=l(u,e);if(yt(d)===kt){var h=Tt(c,e);throw new Error(h)}i[c]=d,n=n||d!==u}return n?i:t}}function St(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function At(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t){return function(r,n,i){var a,o=t(r,n,i),s=o.dispatch,c={getState:o.getState,dispatch:function(t){return s(t)}};return a=e.map((function(t){return t(c)})),s=St.apply(void 0,pt(a))(o.dispatch),bt(bt({},o),{},{dispatch:s})}}}var jt=["bootstrap","params","campaign","initializeStart","initialize","initializeEnd","ready","resetStart","reset","resetEnd","pageStart","page","pageEnd","pageAborted","trackStart","track","trackEnd","trackAborted","identifyStart","identify","identifyEnd","identifyAborted","userIdChanged","registerPlugins","enablePlugin","disablePlugin","loadPlugin","online","offline","setItemStart","setItem","setItemEnd","setItemAborted","removeItemStart","removeItem","removeItemEnd","removeItemAborted"],Dt=["name","EVENTS","config","loaded"],Bt=jt.reduce((function(t,e){return t[e]=e,t}),{registerPluginType:function(t){return"registerPlugin:".concat(t)},pluginReadyType:function(t){return"ready:".concat(t)}});function Nt(t){return jt.includes(t)}var Mt="__anon_id",Lt="__user_id",It="__user_traits",Pt=/^utm_/,Ft=/^an_prop_/,Rt=/^an_trait_/;function Yt(t){var e=t.storage,r=e.setItem,n=e.getItem;return function(e){return function(i){return function(a){if(a.type===Bt.bootstrap){var o=a.params,s=a.user;n(Mt)||r(Mt,s.anonymousId);var c=Object.keys(a.params);if(c.length){var l=o.an_uid,u=o.an_event,d=c.reduce((function(t,e){if(e.match(Pt)||e.match(/^(d|g)clid/)){var r=e.replace(Pt,""),n="campaign"===r?"name":r;t.campaign[n]=o[e]}return e.match(Ft)&&(t.props[e.replace(Ft,"")]=o[e]),e.match(Rt)&&(t.traits[e.replace(Rt,"")]=o[e]),t}),{campaign:{},props:{},traits:{}});e.dispatch(bt(bt({type:Bt.params,raw:o},d),l?{userId:l}:{})),l&&setTimeout((function(){return t.identify(l,d.traits)}),0),u&&setTimeout((function(){return t.track(u,d.props)}),0),Object.keys(d.campaign).length&&e.dispatch({type:Bt.campaign,campaign:d.campaign})}}return i(a)}}}}var Vt="userId",Wt="anonymousId",zt=["enable","disable","load"];function $t(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(r&&r.type===Bt.setItemEnd&&r.key===Mt)return Object.assign({},e,{anonymousId:r.value});switch(r.type){case Bt.identify:return Object.assign({},e,{userId:r.userId,traits:bt(bt({},e.traits),r.traits)});case Bt.reset:return[Vt,Wt,"traits"].forEach((function(t){tt.b[Gt(t)]=null})),[Lt,Mt,It].forEach((function(e){t.removeItem(e)})),Object.assign({},e,{userId:null,anonymousId:null,traits:{}});default:return e}}}function Ut(t,e){return{userId:e.getItem(Lt)||t.an_uid,anonymousId:e.getItem(Mt)||t.an_aid||lt(),traits:e.getItem(It)||{}}}var Gt=function(t){return"__TEMP__"+t};function Ht(t){return function(e,r,n){var i=r.getState("user")[e];if(i)return i;if(n&&it(n)&&n[e])return n[e];var a=Ut({},t)[e];return a||(tt.b[Gt(e)]?tt.b[Gt(e)]:null)}}function qt(t){var e=t.storage,r=e.setItem,n=e.removeItem,i=e.getItem;return function(t){return function(e){return function(a){var o=a.userId,s=a.traits,c=a.options,l=a.callback;if(a.type===Bt.reset&&([Lt,It,Mt].forEach((function(t){return n(t)})),[Vt,Wt,"traits"].forEach((function(t){tt.b[Gt(t)]=void 0})),rt(l)&&l()),a.type===Bt.identify){i(Mt)||r(Mt,lt());var u=i(Lt),d=i(It)||{};u&&u!==o&&t.dispatch({type:Bt.userIdChanged,old:{userId:u,traits:d},new:{userId:o,traits:s},options:c}),o&&r(Lt,o),s&&r(It,bt(bt({},d),s))}return e(a)}}}}var Xt=gt((function(t){var e=function(t){var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",o=n.toStringTag||"@@toStringTag";function s(t,e,r,n){var i=e&&e.prototype instanceof u?e:u,a=Object.create(i.prototype),o=new w(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(i,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw a;return E()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=b(o,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,o),a}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function u(){}function d(){}function h(){}var f={};f[i]=function(){return this};var p=Object.getPrototypeOf,g=p&&p(p(_([])));g&&g!==e&&r.call(g,i)&&(f=g);var y=h.prototype=u.prototype=Object.create(f);function m(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function v(t,e){var n;this._invoke=function(i,a){function o(){return new e((function(n,o){!function n(i,a,o,s){var l=c(t[i],t,a);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,o,s)}),(function(t){n("throw",t,o,s)})):e.resolve(d).then((function(t){u.value=t,o(u)}),(function(t){return n("throw",t,o,s)}))}s(l.arg)}(i,a,n,o)}))}return n=n?n.then(o,o):o()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function _(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:E}}function E(){return{value:void 0,done:!0}}return d.prototype=y.constructor=h,h.constructor=d,h[o]=d.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,o in t||(t[o]="GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},m(v.prototype),v.prototype[a]=function(){return this},t.AsyncIterator=v,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new v(s(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},m(y),y[o]="Generator",y[i]=function(){return this},y.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return o.type="throw",o.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,l):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;k(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}));function Zt(t,e,r,n,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}var Jt=function(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){Zt(a,n,i,o,s,"next",t)}function s(t){Zt(a,n,i,o,s,"throw",t)}o(void 0)}))}};function Qt(t,e,r){return new Promise((function(n,i){return e()?n(t):r<1?i(bt(bt({},t),{},{queue:!0})):(a=10,new Promise((function(t){return setTimeout(t,a)}))).then((function(a){return Qt(t,e,r-10).then(n,i)}));var a}))}function Kt(t,e,r){var n=e(),i=t.getState(),a=i.plugins,o=i.context,s=i.queue,c=i.user;if(!o.offline&&s&&s.actions&&s.actions.length){var l=s.actions.reduce((function(t,e,r){return a[e.plugin].loaded?(t.process.push(e),t.processIndex.push(r)):(t.requeue.push(e),t.requeueIndex.push(r)),t}),{processIndex:[],process:[],requeue:[],requeueIndex:[]});if(l.processIndex&&l.processIndex.length){l.processIndex.forEach((function(e){var i=s.actions[e],o=i.plugin,l=i.payload.type,u=n[o][l];if(u&&rt(u)){var d=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return[Vt,Wt].reduce((function(t,r){return ee(t,e,r)}),t)}(i.payload,c);u({payload:d,config:a[o].config,instance:r});var h="".concat(l,":").concat(o);t.dispatch(bt(bt({},d),{},{type:h,_:{called:h,from:"queueDrain"}}))}}));var u=s.actions.filter((function(t,e){return!~l.processIndex.indexOf(e)}));s.actions=u}}}function te(t,e,r){return setInterval((function(){return Kt(t,e,r)}),3e3)}function ee(t,e,r){return t.hasOwnProperty(r)&&!t[r]&&e[r]?Object.assign({},t,mt({},"".concat(r),e[r])):t}var re=function(t){if(Array.isArray(t))return t};var ne=function(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r};var ie=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")};var ae=function(t,e){return re(t)||ne(t,e)||ie()};function oe(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(t).filter((function(t){var n=r.plugins||{};return!1!==n[t]&&(!0===n[t]||!1!==n.all&&(!e[t]||!1!==e[t].enabled))})).map((function(e){return t[e]}))}var se=/Start$/,ce=/^bootstrap/,le=/^ready/;function ue(t,e,r,n,i){return de.apply(this,arguments)}function de(){return(de=Jt(Xt.mark((function t(e,r,n,i,a){var o,s,c,l,u,d,h,f,p,g,y,m;return Xt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=rt(r)?r():r,s=e.type,c=s.replace(se,""),!e._||!e._.called){t.next=5;break}return t.abrupt("return",e);case 5:return l=n.getState(),u=oe(o,l.plugins,e.options),d=u.map((function(t){return t.name})),h=be(s,u,o),t.next=11,fe({action:e,data:{exact:h.before,namespaced:h.beforeNS},state:l,allPlugins:o,allMatches:h,instance:n,store:i,EVENTS:a});case 11:if(!ke(f=t.sent,d.length)){t.next=14;break}return t.abrupt("return",f);case 14:if(s!==c){t.next=18;break}p=f,t.next=21;break;case 18:return t.next=20,fe({action:bt(bt({},f),{},{type:c}),data:{exact:h.during,namespaced:h.duringNS},state:l,allPlugins:o,allMatches:h,instance:n,store:i,EVENTS:a});case 20:p=t.sent;case 21:if(!s.match(se)){t.next=28;break}return g="".concat(c,"End"),t.next=25,fe({action:bt(bt({},p),{},{type:g}),data:{exact:h.after,namespaced:h.afterNS},state:l,allPlugins:o,allMatches:h,instance:n,store:i,EVENTS:a});case 25:y=t.sent,(m=he(y))&&m({payload:y});case 28:return t.abrupt("return",f);case 29:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function he(t){return!!t.meta&&Object.keys(t.meta).reduce((function(e,r){var n=t.meta[r];return rt(n)?n:e}),!1)}function fe(t){return pe.apply(this,arguments)}function pe(){return(pe=Jt(Xt.mark((function t(e){var r,n,i,a,o,s,c,l,u,d,h,f,p,g,y,m,v,b;return Xt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.data,n=e.action,i=e.instance,a=e.state,o=e.allPlugins,s=e.allMatches,c=e.store,l=e.EVENTS,u=a.plugins,d=a.context,h=n.type,f=h.match(se),p=r.exact.map((function(t){return t.pluginName})),f&&(p=s.during.map((function(t){return t.pluginName}))),g=Ee(i,p),y=r.exact.reduce((function(t,e){var r=e.pluginName,n=e.methodName,i=!1;return n.match(/^initialize/)||n.match(/^reset/)||(i=!u[r].loaded),d.offline&&n.match(/^(page|track|identify)/)&&(i=!0),t["".concat(r)]=i,t}),{}),t.next=10,r.exact.reduce(function(){var t=Jt(Xt.mark((function t(e,a,s){var c,l,d;return Xt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=a.pluginName,t.next=3,e;case 3:if(l=t.sent,!r.namespaced||!r.namespaced[c]){t.next=11;break}return t.next=7,r.namespaced[c].reduce(function(){var t=Jt(Xt.mark((function t(e,r,n){var a,s,l,d;return Xt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=function(t,e,r){return function(n,i){var a=r||e;return bt(bt({},t),{},{abort:{reason:n,plugins:i||[e],caller:h,from:a}})}},t.next=3,e;case 3:if(a=t.sent,r.method&&rt(r.method)){t.next=6;break}return t.abrupt("return",a);case 6:return Ce(r.methodName,r.pluginName),t.next=9,r.method({payload:a,instance:i,abort:s(a,c,r.pluginName),config:ye(r.pluginName,u,o),plugins:u});case 9:return l=t.sent,d=it(l)?l:{},t.abrupt("return",Promise.resolve(bt(bt({},a),d)));case 12:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),Promise.resolve(n));case 7:d=t.sent,l[c]=d,t.next=12;break;case 11:l[c]=n;case 12:return t.abrupt("return",Promise.resolve(l));case 13:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),Promise.resolve({}));case 10:return m=t.sent,t.next=13,r.exact.reduce(function(){var t=Jt(Xt.mark((function t(e,n,a){var s,l,d,p,v,b,x,k,w,_,E,C;return Xt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=r.exact.length===a+1,l=n.pluginName,d=o[l],t.next=5,e;case 5:if(p=t.sent,v=m[l]?m[l]:{},f&&(v=p),!xe(v,l)){t.next=11;break}return ge({data:v,method:h,instance:i,pluginName:l,store:c}),t.abrupt("return",Promise.resolve(p));case 11:if(!xe(p,l)){t.next=14;break}return s&&ge({data:p,method:h,instance:i,store:c}),t.abrupt("return",Promise.resolve(p));case 14:if(!y.hasOwnProperty(l)||!0!==y[l]){t.next=17;break}return c.dispatch({type:"queue",plugin:l,payload:v,_:{called:"queue",from:"queueMechanism"}}),t.abrupt("return",Promise.resolve(p));case 17:return b=g(m[l],o[l]),t.next=20,d[h]({hello:l,abort:b.abort,payload:v,instance:i,config:ye(l,u,o),plugins:u});case 20:return x=t.sent,k=it(x)?x:{},w=bt(bt({},p),k),xe(_=m[l],l)?ge({data:_,method:h,instance:i,pluginName:l,store:c}):(E="".concat(h,":").concat(l),(E.match(/:/g)||[]).length<2&&!h.match(ce)&&!h.match(le)&&(C=f?w:v,i.dispatch(bt(bt({},C),{},{type:E,_:{called:E,from:"submethod"}})))),t.abrupt("return",Promise.resolve(w));case 26:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),Promise.resolve(n));case 13:if(v=t.sent,h.match(se)||h.match(/^registerPlugin/)||h.match(le)||h.match(ce)||h.match(/^params/)||h.match(/^userIdChanged/)){t.next=21;break}if(l.plugins.includes(h),!v._||v._.originalAction!==h){t.next=18;break}return t.abrupt("return",v);case 18:b=bt(bt({},v),{_:{originalAction:v.type,called:v.type,from:"engineEnd"}}),ke(v,r.exact.length)&&!h.match(/End$/)&&(b=bt(bt({},b),{type:v.type+"Aborted"})),c.dispatch(b);case 21:return t.abrupt("return",v);case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ge(t){var e=t.data,r=t.method,n=(t.instance,t.pluginName),i=r+"Aborted"+(n?":"+n:"");t.store.dispatch(bt(bt({},e),{},{type:i,_:{called:i,from:"abort"}}))}function ye(t,e,r){var n=e[t]||r[t];return n&&n.config?n.config:{}}function me(t,e){return e.reduce((function(e,r){return r[t]?e.concat({methodName:t,pluginName:r.name,method:r[t]}):e}),[])}function ve(t,e){var r=function(t){return t.replace(se,"")}(t),n=e?":".concat(e):"";return["".concat(t).concat(n),"".concat(r).concat(n),"".concat(r,"End").concat(n)]}function be(t,e,r){var n=ve(t).map((function(t){return me(t,e)}));return e.reduce((function(r,n){var i=n.name,a=ve(t,i).map((function(t){return me(t,e)})),o=ae(a,3),s=o[0],c=o[1],l=o[2];return s.length&&(r.beforeNS[i]=s),c.length&&(r.duringNS[i]=c),l.length&&(r.afterNS[i]=l),r}),{before:n[0],beforeNS:{},during:n[1],duringNS:{},after:n[2],afterNS:{}})}function xe(t,e){var r=t.abort;return!!r&&(!0===r||(_e(r,e)||r&&_e(r.plugins,e)))}function ke(t,e){var r=t.abort;if(!r)return!1;if(!0===r||nt(r))return!0;var n=r.plugins;return we(r)&&r.length===e||we(n)&&n.length===e}function we(t){return Array.isArray(t)}function _e(t,e){return!(!t||!we(t))&&t.includes(e)}function Ee(t,e){return function(r,n,i){var a=n.config,o=n.name,s="".concat(o,".").concat(r.type);i&&(s=i.event);var c=r.type.match(se)?function(t,e,r,n,i){return function(a,o){var s=n?n.name:t,c=o&&we(o)?o:r;if(n&&(!(c=o&&we(o)?o:[t]).includes(t)||1!==c.length))throw new Error("Method ".concat(e," can only abort ").concat(t," plugin. ").concat(JSON.stringify(c)," input valid"));return bt(bt({},i),{},{abort:{reason:a,plugins:c,caller:e,_:s}})}}(o,s,e,i,r):function(t,e){return function(){throw new Error(t.type+" action not cancellable. Remove abort in "+e)}}(r,s);return{payload:Oe(r),instance:t,config:a||{},abort:c}}}function Ce(t,e){var r=Te(t);if(r&&r.name===e){var n=Te(r.method),i=n?"or "+n.method:"";throw new Error([e+" plugin is calling method "+t,"Plugins cant call themselves","Use ".concat(r.method," ").concat(i," in ").concat(e," plugin insteadof ").concat(t)].join("\n"))}}function Te(t){var e=t.match(/(.*):(.*)/);return!!e&&{method:e[1],name:e[2]}}function Oe(t){return Object.keys(t).reduce((function(e,r){return"type"===r||(it(t[r])?e[r]=Object.assign({},t[r]):e[r]=t[r]),e}),{})}function Se(t,e,r){var n={};return function(i){return function(a){return function(){var o=Jt(Xt.mark((function o(s){var c,l,u,d,h,f,p,g,y,m,v,b,x,k,w;return Xt.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(c=s.type,l=s.name,u=s.callback,d=s,!s.abort){o.next=4;break}return o.abrupt("return",a(s));case 4:if(c!==Bt.disablePlugin&&c!==Bt.enablePlugin||rt(u)&&u(l),c!==Bt.loadPlugin){o.next=13;break}return h=e(),f=Object.keys(h).filter((function(t){return s.plugins.includes(t)})).reduce((function(t,e){return t[e]=h[e],t}),{}),p={type:Bt.initializeStart,plugins:s.plugins},o.next=11,ue(p,f,t,i,r);case 11:return g=o.sent,o.abrupt("return",a(g));case 13:if(c===Bt.initializeEnd&&(y=e(),m=Object.keys(y),v=m.filter((function(t){return s.plugins.includes(t)})).map((function(t){return y[t]})),b=[],x=[],k=v.map((function(t){var e=t.loaded,r=t.name;return Qt(t,e,1e4).then((function(e){n[r]||(i.dispatch({type:Bt.pluginReadyType(r),name:r,events:Object.keys(t).filter((function(t){return!Dt.includes(t)}))}),n[r]=!0),b=b.concat(r)})).catch((function(t){if(t instanceof Error)throw new Error(t);return x=x.concat(t.name),t}))})),Promise.all(k).then((function(t){setTimeout((function(){m.length===k.length&&i.dispatch({type:Bt.ready,plugins:b,failed:x})}),0)}))),c===Bt.bootstrap){o.next=20;break}return/^ready:([^:]*)$/.test(c)&&setTimeout((function(){return Kt(i,e,t)}),0),o.next=18,ue(s,e,t,i,r);case 18:return w=o.sent,o.abrupt("return",a(w));case 20:return o.abrupt("return",a(d));case 21:case"end":return o.stop()}}),o)})));return function(t){return o.apply(this,arguments)}}()}}}function Ae(){return(new Date).getTime()}function je(t){return function(e){return function(e){return function(r){var n=r.type,i=r.key,a=r.value,o=r.options;if(n===Bt.setItem||n===Bt.removeItem){if(r.abort)return e(r);n===Bt.setItem?t.setItem(i,a,o):t.removeItem(i,o)}return e(r)}}}}var De=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Be=function t(){var e=this;De(this,t),mt(this,"before",[]),mt(this,"after",[]),mt(this,"addMiddleware",(function(t,r){e[r]=e[r].concat(t)})),mt(this,"removeMiddleware",(function(t,r){var n=e[r].findIndex((function(e){return e===t}));-1!==n&&(e[r]=[].concat(pt(e[r].slice(0,n)),pt(e[r].slice(n+1))))})),mt(this,"dynamicMiddlewares",(function(t){return function(r){return function(n){return function(i){var a={getState:r.getState,dispatch:function(t){return r.dispatch(t)}},o=e[t].map((function(t){return t(a)}));return St.apply(void 0,pt(o))(n)(i)}}}}))},Ne={};function Me(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ne,r=arguments.length>1?arguments[1]:void 0,n={};if("initialize:aborted"===r.type)return e;if(/^registerPlugin:([^:]*)$/.test(r.type)){var i=r.type.split(":")[1],a=t()[i];return a&&i?(n[i]={enabled:!0,initialized:!a.initialize,loaded:Boolean(a.loaded()),config:a.config||{}},bt(bt({},e),n)):e}if(/^initialize:([^:]*)$/.test(r.type)){var o=r.type.split(":")[1],s=t()[o];return s&&o?(n[o]=bt(bt({},e[o]),{initialized:!0,loaded:Boolean(s.loaded())}),bt(bt({},e),n)):e}if(/^ready:([^:]*)$/.test(r.type))return n[r.name]=bt(bt({},e[r.name]),{loaded:!0}),bt(bt({},e),n);switch(r.type){case Bt.disablePlugin:return Array.isArray(r.name)?(n=r.name.reduce((function(t,r){return t[r]=bt(bt({},e[r]),{enabled:!1}),t}),e),bt(bt({},e),n)):(n[r.name]=bt(bt({},e[r.name]),{enabled:!1}),bt(bt({},e),n));case Bt.enablePlugin:return Array.isArray(r.name)?(n=r.name.reduce((function(t,r){return t[r]=bt(bt({},e[r]),{enabled:!0}),t}),e),bt(bt({},e),n)):(n[r.name]=bt(bt({},e[r.name]),{enabled:!0}),bt(bt({},e),n));default:return e}}}var Le,Ie,Pe,Fe,Re=function(t,e){return{type:Bt.enablePlugin,name:t,callback:e,_:{originalAction:Bt.enablePlugin}}},Ye=function(t,e){return{type:Bt.disablePlugin,name:t,callback:e,_:{originalAction:Bt.disablePlugin}}};Le=function(){if(!ot)return!1;var t=navigator.appVersion;return~t.indexOf("Win")?"Windows":~t.indexOf("Mac")?"MacOS":~t.indexOf("X11")?"UNIX":~t.indexOf("Linux")?"Linux":"Unknown OS"}(),Ie=ot?document.referrer:null,Pe=function(){if(!ot)return null;var t=navigator,e=t.language,r=t.languages,n=t.userLanguage;return r&&r.length?r[0]:n||e}(),Fe="undefined"==typeof Intl||"function"!=typeof Intl.DateTimeFormat||"function"!=typeof Intl.DateTimeFormat().resolvedOptions?null:Intl.DateTimeFormat().resolvedOptions().timeZone;var Ve={initialized:!1,sessionId:lt(),app:null,version:null,debug:!1,offline:!!ot&&!navigator.onLine,os:{name:Le},userAgent:ot?navigator.userAgent:"node",library:{name:"analytics",version:"0.6.1"},timezone:Fe,locale:Pe,campaign:{},referrer:Ie};function We(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ve,e=arguments.length>1?arguments[1]:void 0,r=t.initialized,n=e.type,i=e.campaign;switch(n){case Bt.campaign:return bt(bt({},t),{campaign:i});case Bt.offline:return bt(bt({},t),{offline:!0});case Bt.online:return bt(bt({},t),{offline:!1});default:return r?t:bt(bt(bt({},Ve),t),{initialized:!0})}}var ze=["plugins","reducers","storage"];function $e(t){return Object.keys(t).reduce((function(e,r){return ze.includes(r)||(e[r]=t[r]),e}),{})}function Ue(t){var e=t;try{e=JSON.parse(JSON.stringify(t))}catch(t){}return e}var Ge=/#.*$/;function He(t){var e=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(t);return"/"+(e&&e[3]?e[3].split("?")[0].replace(Ge,""):"")}function qe(t){var e=function(){if(ot)for(var t,e=document.getElementsByTagName("link"),r=0;t=e[r];r++)if("canonical"===t.getAttribute("rel"))return t.getAttribute("href")}();return e?e.match(/\?/)?e:e+t:window.location.href.replace(Ge,"")}var Xe=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ot)return t;var e=document,r=e.title,n=e.referrer,i=window,a=i.location,o=i.innerWidth,s=i.innerHeight,c=a.hash,l=a.search,u=qe(l),d={title:r,url:u,path:He(u),hash:c,search:l,width:o,height:s};return n&&""!==n&&(d.referrer=n),bt(bt({},d),t)},Ze={last:{},history:[]};function Je(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ze,e=arguments.length>1?arguments[1]:void 0,r=e.properties,n=e.options,i=e.meta;switch(e.type){case Bt.page:var a=Ue(bt({properties:r,meta:i},Object.keys(n).length&&{options:n}));return bt(bt({},t),{last:a,history:t.history.concat(a)});default:return t}}var Qe={last:{},history:[]};function Ke(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Qe,e=arguments.length>1?arguments[1]:void 0,r=e.type,n=e.meta,i=e.options,a=e.event,o=e.properties;switch(r){case Bt.track:var s=Ue(bt(bt({event:a,properties:o},Object.keys(i).length&&{options:i}),{},{meta:n}));return bt(bt({},t),{last:s,history:t.history.concat(s)});default:return t}}var tr={actions:[]};function er(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tr,e=arguments.length>1?arguments[1]:void 0,r=e.type,n=e.payload;switch(r){case"queue":var i;return i=n&&n.type&&n.type===Bt.identify?[e].concat(t.actions):t.actions.concat(e),bt(bt({},t),{},{actions:i});case"dequeue":return[];default:return t}}function rr(t,e,r){if(!ot)return!1;var n=window[(r?"add":"remove")+"EventListener"];t.split(" ").forEach((function(t){n(t,e)}))}function nr(t){var e=rr.bind(null,"online offline",(function(e){return Promise.resolve(!navigator.onLine).then(t)}));return e(!0),function(t){return e(!1)}}function ir(){return Array.prototype.slice.call(arguments).reduce((function(t,e){return t||(rt(e)?e:t)}),!1)}function ar(){return tt.b.__analytics__=[],function(t){return function(e,r,n){var i=t(e,r,n),a=i.dispatch;return Object.assign(i,{dispatch:function(t){var e=t.action||t;return tt.b.__analytics__.push(e),a(t)}})}}}function or(t){return function(){return St(St.apply(null,arguments),ar())}}var sr=function(t,e,r){return{type:Bt.setItemStart,timestamp:Ae(),key:t,value:e,options:r}},cr=function(t,e){return{type:Bt.removeItemStart,timestamp:Ae(),key:t,options:e}};var lr="before",ur="after",dr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.reducers||{},r=(t.plugins||[]).reduce((function(t,e){if(!rt(e)){if(e.NAMESPACE&&(e.name=e.NAMESPACE),!e.name)throw new Error("https://lytics.dev/errors/1");var r=e.EVENTS?Object.keys(e.EVENTS).map((function(t){return e.EVENTS[t]})):[];if(e.methods){if(zt.includes(e.name))throw new Error(e.name+" is reserved pluginName");t.methods[e.name]=Object.keys(e.methods).reduce((function(t,r){return t[r]=j(e.methods[r]),t}),{}),delete e.methods}var n=Object.keys(e).concat(r),i=new Set(t.events.concat(n));if(t.events=Array.from(i),t.pluginsArray=t.pluginsArray.concat(e),t.plugins[e.name])throw new Error(e.name+" already loaded");return t.plugins[e.name]=e,t.plugins[e.name].loaded||(t.plugins[e.name].loaded=function(){return!0}),t}return t.middlewares=t.middlewares.concat(e),t}),{plugins:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),n=t.storage?t.storage:{getItem:function(t){return tt.b[t]},setItem:function(t,e){return tt.b[t]=e},removeItem:function(t){return tt.b[t]=void 0}},i=Ht(n),a=r.plugins,o=r.events.filter((function(t){return!Dt.includes(t)})),s=new Set(o.concat(jt).filter((function(t){return!Dt.includes(t)}))),c=Array.from(s).sort(),l=o.sort(),u=function(){return a},d=new Be,h=d.addMiddleware,f=d.removeMiddleware,p=d.dynamicMiddlewares,g=function(){throw new Error("Abort disabled in listener")},y=function(t,e){return function(r){e&&e(r),t(r)}},m=st(),v=Ut(m,n),b=bt({enable:function(t,e){S.dispatch(Re(t,e))},disable:function(t,e){S.dispatch(Ye(t,e))},load:function(t){S.dispatch({type:Bt.loadPlugin,plugins:t?[t]:Object.keys(u())})}},r.methods),x={identify:function(t,e,r,n){var a=nt(t)?t:null,o=it(t)?t:e,s=r||{},c=x.user();tt.b[Gt(Vt)]=a;var l=a||o.userId||i(Vt,x,o);return new Promise((function(t,i){S.dispatch(bt(bt({type:Bt.identifyStart,userId:l,traits:o||{},options:s,anonymousId:c.anonymousId},c.id&&c.id!==a&&{previousId:c.id}),{},{meta:{timestamp:Ae(),callback:y(t,ir(e,r,n))}}))}))},track:function(t,e,r,n){var a=it(t)?t.event:t;if(!a||!nt(a))throw new Error("Event missing");var o=it(t)?t:e||{},s=it(r)?r:{};return new Promise((function(t,c){S.dispatch({type:Bt.trackStart,event:a,properties:o,options:s,userId:i(Vt,x,e),anonymousId:i(Wt,x,e),meta:{timestamp:Ae(),callback:y(t,ir(e,r,n))}})}))},page:function(t,e,r){var n=it(t)?t:{},a=it(e)?e:{};return new Promise((function(o,s){S.dispatch({type:Bt.pageStart,properties:Xe(n),options:a,userId:i(Vt,x,n),anonymousId:i(Wt,x,n),meta:{timestamp:Ae(),callback:y(o,ir(t,e,r))}})}))},user:function(t){if(t===Vt||"id"===t)return i(Vt,x);var e=x.getState("user");return t?K()(e,t):e},reset:function(t){return new Promise((function(e,r){S.dispatch({type:Bt.resetStart,timestamp:Ae(),callback:y(e,t)})}))},ready:function(t){return x.on(Bt.ready,t)},on:function(t,e){if(!t||!rt(e))return!1;if(t===Bt.bootstrap)throw new Error(".on disabled for "+t);var r=/Start$|Start:/;if("*"===t){var n=function(t){return function(t){return function(n){return n.type.match(r)&&e({payload:n,instance:x,plugins:a}),t(n)}}},i=function(t){return function(t){return function(n){return n.type.match(r)||e({payload:n,instance:x,plugins:a}),t(n)}}};return h(n,lr),h(i,ur),function(){f(n,lr),f(i,ur)}}var o=t.match(r)?lr:ur,s=function(r){return function(r){return function(n){return n.type===t&&e({payload:n,instance:x,plugins:a,abort:g}),r(n)}}};return h(s,o),function(){return f(s,o)}},once:function(t,e){if(!t||!rt(e))return!1;if(t===Bt.bootstrap)throw new Error(".once disabled for "+t);var r=x.on(t,(function(t){var n=t.payload;e({payload:n,instance:x,plugins:a,abort:g}),r()}));return r},getState:function(t){var e=S.getState();return t?K()(e,t):Object.assign({},e)},dispatch:function(t){var e=nt(t)?{type:t}:t;if(Nt(e.type))throw new Error("reserved action "+e.type);var r=e.meta||{},n=t._||{},i=bt(bt({},e),{},{meta:bt({timestamp:Ae()},r),_:bt({originalAction:e.type},n)});S.dispatch(i)},enablePlugin:b.enable,disablePlugin:b.disable,loadPlugin:b.load,plugins:b,storage:{getItem:n.getItem,setItem:function(t,e,r){S.dispatch(sr(t,e,r))},removeItem:function(t,e){S.dispatch(cr(t,e))}},setAnonymousId:function(t,e){x.storage.setItem(Mt,t,e)},events:{all:c,core:jt,plugins:l}},k=r.middlewares.concat([p(lr),Se(x,u,{all:c,plugins:l}),je(n),Yt(x),qt(x),p(ur)]),w={context:We,user:$t(n),page:Je,track:Ke,plugins:Me(u),queue:er},_=St,E=St;if(ot&&t.debug){var C=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;C&&(_=C({trace:!0,traceLimit:25})),E=function(){return 0===arguments.length?ar():it(yt(arguments[0]))?or():or().apply(null,arguments)}}var T=$e(t),O={context:T,user:v,plugins:r.pluginsArray.reduce((function(t,e){var r=e.name,n=e.config,i=e.loaded;return t[r]={enabled:!0,initialized:Boolean(!e.initialize),loaded:Boolean(i()),config:n||{}},t}),{})},S=Ct(Ot(bt(bt({},w),e)),O,E(_(At.apply(void 0,pt(k))))),A=Object.keys(a);function j(t){return function(){var e=Array.prototype.slice.call(arguments),r=Array.apply(null,Array(t.length)).map((function(){})).map((function(t,r){if(e[r]||!1===e[r]||null===e[r])return e[r]})).concat(x);return t.apply({instance:x},r)}}return S.dispatch({type:Bt.bootstrap,plugins:A,config:T,params:m,user:v}),S.dispatch({type:Bt.registerPlugins,plugins:A}),r.pluginsArray.map((function(t,e){var n=t.bootstrap,i=t.config;n&&rt(n)&&n({instance:x,config:i,payload:t});var a=r.pluginsArray.length===e+1;S.dispatch({type:Bt.registerPluginType(t.name),name:t.name,plugin:t}),a&&S.dispatch({type:Bt.initializeStart,plugins:A})})),nr((function(t){S.dispatch({type:t?Bt.offline:Bt.online})})),te(S,u,x),x};var hr=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t};function fr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}var pr=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?fr(r,!0).forEach((function(e){hr(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fr(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t};function gr(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={storage:tt.a};return dr(pr(pr({},e),t))}function yr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mr(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){yr(t,e,r[e])}))}return t}var vr={trackingId:null,debug:!1,anonymizeIp:!1,customDimensions:{},resetCustomDimensionsOnPage:[],setCustomDimensionsToPage:!0},br={};function xr(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=!1,r=wr(t),n=r.instanceName,i=r.instancePrefix;return{name:"google-analytics",config:mr({},vr,t),initialize:function(t){var e=t.config,r=t.instance;if(!e.trackingId)throw new Error("No GA trackingId defined");var a,o,s,c,l,u,d,h=e.customScriptSrc||"https://www.google-analytics.com/analytics.js";if(kr(h)&&(a=window,o=document,s="script",c=h,l="ga",a.GoogleAnalyticsObject=l,a.ga=a.ga||function(){(a.ga.q=a.ga.q||[]).push(arguments)},a.ga.l=1*new Date,u=o.createElement(s),d=o.getElementsByTagName(s)[0],u.async=1,u.src=c,d.parentNode.insertBefore(u,d)),!br[n]){var f=mr({cookieDomain:e.domain||"auto",siteSpeedSampleRate:e.siteSpeedSampleRate||1,sampleRate:e.sampleRate||100,allowLinker:!0},e.cookieConfig);if(n&&(f.name=n),ga("create",e.trackingId,f),e.debug&&(ga("".concat(i,"set"),"sendHitTask",null),window.ga_debug={trace:!0}),e.anonymizeIp&&ga("".concat(i,"set"),"anonymizeIp",!0),e.tasks){["customTask","previewTask","checkProtocolTask","validationTask","checkStorageTask","historyImportTask","samplerTask","buildHitTask","sendHitTask","timingTask","displayFeaturesTask"].forEach((function(t){if(e.tasks.hasOwnProperty(t)){var r=e.tasks[t];"function"==typeof r?ga(e.tasks[t]):null===r&&ga("".concat(i,"set"),t,r)}}))}var p=(r.user()||{}).traits||{};if(Object.keys(p).length){var g=Cr(p,e);ga("".concat(i,"set"),g)}br[n]=!0}},page:function(t){var r=t.payload,n=t.config,a=t.instance,o=r.properties,s=n.resetCustomDimensionsOnPage,c=n.customDimensions,l=a.getState("context.campaign");if(!kr()){if(s&&s.length){var u=s.reduce((function(t,e){return c[e]&&(t[c[e]]=null),t}),{});Object.keys(u).length&&ga("".concat(i,"set"),u)}var d=o.path||document.location.pathname,h={page:d,title:o.title,location:o.url},f={page:d,title:o.title};o.referrer!==document.referrer&&(f.referrer=o.referrer);var p=mr({},h,Er(l),Or(o,n,i));ga("".concat(i,"set"),f),e&&delete p.location,ga("".concat(i,"send"),"pageview",p),e=!0}},track:function(t){var e=t.payload,r=t.config,n=t.instance,i=e.properties,a=e.event,o=i.label,s=i.value;_r({hitType:"event",event:a,label:o,category:i.category||"All",value:s,nonInteraction:i.nonInteraction,campaign:n.getState("context.campaign")},r,e)},identify:function(t){var e=t.payload,r=t.config;Sr(e.userId,e.traits,r)},loaded:function(){return!!window.gaplugins}}}function kr(t){return t?!function(t){var e=document.querySelectorAll("script[src]");return!!Object.keys(e).filter((function(r){return(e[r].src||"")===t})).length}(t):"undefined"==typeof ga}function wr(t){var e=t.instanceName;return{instancePrefix:e?"".concat(e,"."):"",instanceName:e}}function _r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(!kr()){var n=wr(e),i=n.instancePrefix,a={hitType:t.hitType||"event",eventAction:t.event,eventLabel:t.label,eventCategory:t.category||"All",nonInteraction:void 0!==t.nonInteraction&&!!t.nonInteraction};t.value&&(a.eventValue=Ar(t.value));var o=Er(t),s=Or(r.properties,e,i),c=mr({},a,o,s);return ga("".concat(i,"send"),"event",c),c}}function Er(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={},r=t.name,n=t.source,i=t.medium,a=t.content,o=t.keyword;return r&&(e.campaignName=r),n&&(e.campaignSource=n),i&&(e.campaignMedium=i),a&&(e.campaignContent=a),o&&(e.campaignKeyword=o),e}function Cr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.customDimensions;return Object.keys(r).reduce((function(e,n){var i=r[n],a=Tr(t,n)||t[n];return"boolean"==typeof a&&(a=a.toString()),a||0===a?(e[i]=a,e):e}),{})}function Tr(t,e,r,n,i){for(e=e.split?e.split("."):e,n=0;n<e.length;n++)t=t?t[e[n]]:i;return t===i?r:t}function Or(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=Cr(t,e);return Object.keys(n).length?e.setCustomDimensionsToPage?(ga("".concat(r,"set"),n),{}):n:{}}function Sr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!kr()){var n=wr(r),i=n.instancePrefix;if(t&&ga("".concat(i,"set"),"userId",t),Object.keys(e).length){var a=Cr(e,r);ga("".concat(i,"set"),a)}}}function Ar(t){return!t||t<0?0:Math.round(t)}var jr=xr,Dr=function(){function t(t,e){t&&(this._analytics=t,this._options=e)}return t.prototype.track=function(t,e){var r;this._analytics&&((e=e||{}).pluginVersion=null===(r=this._options)||void 0===r?void 0:r.version,this._analytics.track(t,e))},t}();function Br(t){return t.enabled?new Dr(function(t){return gr({app:"diagram-plugin",version:t.version,plugins:[jr({trackingId:"UA-178409998-1",anonymizeIp:!0,instanceName:"gaDiagram",cookieConfig:{cookieName:"_gaDiagram"},customDimensions:{pluginVersion:"dimension1"}},{name:"diagram-analytics"})]})}(t),t):new Dr}var Nr,Mr,Lr=function(t){var e=t.id,r=t.data,a=t.timeZone,o=t.width,s=t.height,c=t.options,l=t.fieldConfig,h=t.replaceVariables,p=t.onOptionsChange,g=t.onChangeTimeRange,y=Object(i.useTheme)(),m=Ir();if(!r)return E.a.createElement("div",{className:"panel-empty"},E.a.createElement("p",null,"No data found in response"));var v=E.a.useMemo((function(){return function(t,e,r,i){var a,o,s,c,l,h,f,p=[],g=Object(n.getDisplayProcessor)({field:{config:{decimals:null===(l=null==i?void 0:i.defaults)||void 0===l?void 0:l.decimals,unit:null===(h=null==i?void 0:i.defaults)||void 0===h?void 0:h.unit,thresholds:null===(f=null==i?void 0:i.defaults)||void 0===f?void 0:f.thresholds}},timeZone:e}),y=-1;try{for(var m=d(t),v=m.next();!v.done;v=m.next()){var b=v.value,x=Object(n.getTimeField)(b).timeField;if(x){var k=function(i){if(i.type!==n.FieldType.number)return"continue";y++;var a=Object(n.getFlotPairs)({xField:x,yField:i,nullValueMode:n.NullValueMode.Null});if(a.length>0){var o,s=Object(n.reduceField)({field:i,reducers:J});o=J.map((function(t){var e=i.display?i.display(s[t]):g(s[t]);return u(u({},e),{title:t})}));var c=Object(n.getSeriesTimeStep)(x),l=Object(n.hasMsResolution)(x);x.display=Object(n.getDisplayProcessor)({timeZone:e,field:u(u({},x),{type:x.type,config:{unit:"time:"+(l?n.MS_DATE_TIME_FORMAT:n.DEFAULT_DATE_TIME_FORMAT)}})}),p.push({label:Z(Object(n.getFieldDisplayName)(i,b,t),r.metricCharacterReplacements),data:a,info:o,isVisible:!0,seriesIndex:y,timeField:u({},x),valueField:u({},i),timeStep:c})}};try{for(var w=(s=void 0,d(b.fields)),_=w.next();!_.done;_=w.next()){k(_.value)}}catch(t){s={error:t}}finally{try{_&&!_.done&&(c=w.return)&&c.call(w)}finally{if(s)throw s.error}}}}}catch(t){a={error:t}}finally{try{v&&!v.done&&(o=m.return)&&o.call(m)}finally{if(a)throw a.error}}return console.log("generated models:"),console.log(p),p}(r.series,a,c,l)}),[r.series,a,c,l]),b=E.a.useMemo((function(){return Br({enabled:c.anonymousTracking,version:c.pluginVersion})}),[c]);return E.a.useMemo((function(){return b.track("loaded panel")}),[1]),E.a.createElement("div",{className:Object(O.cx)(m.wrapper,Object(O.css)(Nr||(Nr=f(["\n          width: ","px;\n          height: ","px;\n        "],["\n          width: ","px;\n          height: ","px;\n        "])),o,s))},E.a.createElement(X,{theme:y,id:e,data:v,timeZone:a,width:o,height:s,options:c,fieldConfig:l,replaceVariables:h,onOptionsChange:p,onChangeTimeRange:g}))},Ir=Object(i.stylesFactory)((function(){return{wrapper:Object(O.css)(Mr||(Mr=f(["\n      position: relative;\n    "],["\n      position: relative;\n    "])))}})),Pr=function(t){var e=t.value,r=t.onChange,n=(t.context,t.item,h(Object(_.useState)(e),2)),a=n[0],o=n[1];a||r(!0);return E.a.createElement("div",{className:"gf-form-group"},E.a.createElement("div",{className:"edit-tab-content"},E.a.createElement("div",{className:"gf-form"},E.a.createElement("button",{className:"btn btn-secondary gf-form-input",onClick:function(){window.open("https://github.com/jdbranham/grafana-diagram/issues","_github")}},E.a.createElement("i",{className:"fa fa-help pointer"})," Community Support")),E.a.createElement("div",{className:"gf-form"},E.a.createElement("button",{className:"btn btn-primary gf-form-input",onClick:function(){window.open("https://github.com/sponsors/jdbranham","_github")}},E.a.createElement("i",{className:"fa fa-help pointer"})," Sponsors")),E.a.createElement("div",{className:"gf-form"},E.a.createElement("button",{className:"btn btn-primary gf-form-input",onClick:function(){window.open("https://patreon.com/savantly","_patreon")}},E.a.createElement("i",{className:"fa fa-help pointer"})," Vote for features")),E.a.createElement("div",null,E.a.createElement("p",null,"This plugin uses anonymous reporting to improve development/features. You may opt-out by disabling this."),E.a.createElement(i.Checkbox,{css:"",value:a,onChange:function(t){o(!a)},label:"Enable"}))))};r.d(e,"plugin",(function(){return Wr}));var Fr=[{key:"fontFamily",name:"Font Family",description:"CSS Font Family"}],Rr=[{key:"mainBkg",name:"Shape Background Color",description:"Background in flowchart objects like rects/circles, class diagram classes, sequence diagram etc"},{key:"lineColor",name:"Line Color",description:"Default color of Lines"},{key:"textColor",name:"Text Color",description:"Text in diagram over the background for instance text on labels and on signals in sequence diagram or the title in gantt diagram"}],Yr=[{key:"nodeBorder",name:"Shape Border Color",description:"Border color of shapes"}],Vr=[{label:"mean",value:"mean",description:"Use the mean value of all datapoints"},{label:"min",value:"min",description:"Use the minimum datapoint value"},{label:"max",value:"max",description:"Use the maximum datapoint value"},{label:"sum",value:"sum",description:"Use the summation of all datapoints"},{label:"last",value:"last",description:"Use the last datapoint value"}],Wr=new n.PanelPlugin(Lr).setMigrationHandler(T).setPanelChangeHandler(c).useFieldConfig({standardOptions:[n.FieldConfigProperty.Unit,n.FieldConfigProperty.Decimals,n.FieldConfigProperty.Thresholds,n.FieldConfigProperty.Mappings,n.FieldConfigProperty.NoValue],useCustomConfig:function(t){t.addSelect({name:"Value By",path:"valueName",description:"Use this reduction function on each series to determine the value of the metric indicator",defaultValue:s.valueName,category:["Indicator"],settings:{options:Vr}})}}).setPanelOptions((function(t){return t.addBooleanSwitch({path:"useBackground",name:"Use shape background for metric indicator",defaultValue:s.useBackground}).addTextInput({name:"Diagram Definition",path:"content",description:"(This area uses Mermaid syntax - http://knsv.github.io/mermaid/)",defaultValue:s.content,settings:{rows:10,useTextarea:!0}}).addNumberInput({name:"Min Text Node Width",path:"nodeSize.minWidth",defaultValue:s.nodeSize.minWidth,description:"The minimum width a matched diagram text node should be"}).addNumberInput({name:"Min Text Node Height",path:"nodeSize.minHeight",defaultValue:s.nodeSize.minHeight,description:"The minimum height a matched diagram text node should be"}).addBooleanSwitch({name:"Show Legend",path:"legend.show",description:"Show the legend",category:["Legend"],defaultValue:s.legend.show}).addCustomEditor({editor:C,id:"composites",path:"composites",name:"Composite Metrics",category:["Composites"],description:"Combine series into a composite metric"}),(t=function(t){return Fr.forEach((function(e){t.addTextInput({name:e.name,path:"mermaidThemeVariablesDark.common."+e.key,category:["Style Common: Dark"],description:e.description,defaultValue:s.mermaidThemeVariablesDark.common[e.key],settings:{}})})),Fr.forEach((function(e){t.addTextInput({name:e.name,path:"mermaidThemeVariablesLight.common."+e.key,category:["Style Common: Light"],description:e.description,defaultValue:s.mermaidThemeVariablesLight.common[e.key],settings:{}})})),Rr.forEach((function(e){t.addColorPicker({name:e.name,path:"mermaidThemeVariablesDark.common."+e.key,category:["Style Common: Dark"],description:e.description,defaultValue:s.mermaidThemeVariablesDark.common[e.key],settings:{disableNamedColors:!0,allowUndefined:!0,textWhenUndefined:"default"}})})),Rr.forEach((function(e){t.addColorPicker({name:e.name,path:"mermaidThemeVariablesLight.common."+e.key,category:["Style Common: Light"],description:e.description,defaultValue:s.mermaidThemeVariablesLight.common[e.key],settings:{disableNamedColors:!0,allowUndefined:!0,textWhenUndefined:"default"}})})),Yr.forEach((function(e){t.addColorPicker({name:e.name,path:"mermaidThemeVariablesDark.flowChart."+e.key,category:["Style FlowChart: Dark"],description:e.description,defaultValue:s.mermaidThemeVariablesDark.flowChart[e.key],settings:{disableNamedColors:!0,allowUndefined:!0,textWhenUndefined:"default"}})})),Yr.forEach((function(e){t.addColorPicker({name:e.name,path:"mermaidThemeVariablesLight.flowChart."+e.key,category:["Style FlowChart: Light"],description:e.description,defaultValue:s.mermaidThemeVariablesLight.flowChart[e.key],settings:{disableNamedColors:!0,allowUndefined:!0,textWhenUndefined:"default"}})})),t.addTextInput({name:"Custom CSS",path:"style",category:["Advanced"],defaultValue:s.style,description:"Applied after other styles and overrides",settings:{useTextarea:!0,rows:10}}),t}(t)).addCustomEditor({editor:Pr,id:"anonymousTracking",path:"anonymousTracking",name:"Support",category:["Help"]}),t}))}])}));
  //# sourceMappingURL=module.js.map