livebook/static/js/643.js
2022-12-01 14:53:04 +00:00

2 lines
1.1 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! For license information please see 643.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([[643],{17967:(t,e)=>{"use strict";e.N=void 0;var n=/^([^\w]*)(javascript|data|vbscript)/im,r=/&#(\w+)(^\w|;)?/g,i=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,a=/^([^:]+):/gm,o=[".","/"];e.N=function(t){var e,s=(e=t||"",e.replace(r,(function(t,e){return String.fromCharCode(e)}))).replace(i,"").trim();if(!s)return"about:blank";if(function(t){return o.indexOf(t[0])>-1}(s))return s;var c=s.match(a);if(!c)return s;var l=c[0];return n.test(l)?"about:blank":s}},44949:(t,e,n)=>{t.exports={graphlib:n(66614),dagre:n(51463),intersect:n(78114),render:n(95787),util:n(28355),version:n(55689)}},39144:(t,e,n)=>{var r=n(28355);function i(t,e,n,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");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])}t.exports={default:i,normal:i,vee:function(t,e,n,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");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])},undirected:function(t,e,n,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");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])}}},85632:(t,e,n)=>{var r=n(28355),i=n(24322),a=n(61322);t.exports=function(t,e){var n,o=e.nodes().filter((function(t){return r.isSubgraph(e,t)})),s=t.selectAll("g.cluster").data(o,(function(t){return t}));return 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"),r.applyTransition(s,e).style("opacity",1),s.each((function(t){var n=e.node(t),r=i.select(this);i.select(this).append("rect");var o=r.append("g").attr("class","label");a(o,n,n.clusterLabelPos)})),s.selectAll("rect").each((function(t){var n=e.node(t),a=i.select(this);r.applyStyle(a,n.style)})),n=s.exit?s.exit():s.selectAll(null),r.applyTransition(n,e).style("opacity",0).remove(),s}},16315:(t,e,n)=>{"use strict";var r=n(91034),i=n(61322),a=n(28355),o=n(24322);t.exports=function(t,e){var n,s=t.selectAll("g.edgeLabel").data(e.edges(),(function(t){return a.edgeToId(t)})).classed("update",!0);return s.exit().remove(),s.enter().append("g").classed("edgeLabel",!0).style("opacity",0),(s=t.selectAll("g.edgeLabel")).each((function(t){var n=o.select(this);n.select(".label").remove();var a=e.edge(t),s=i(n,e.edge(t),0,0).classed("label",!0),c=s.node().getBBox();a.labelId&&s.attr("id",a.labelId),r.has(a,"width")||(a.width=c.width),r.has(a,"height")||(a.height=c.height)})),n=s.exit?s.exit():s.selectAll(null),a.applyTransition(n,e).style("opacity",0).remove(),s}},70940:(t,e,n)=>{"use strict";var r=n(91034),i=n(13042),a=n(28355),o=n(24322);function s(t,e){var n=(o.line||o.svg.line)().x((function(t){return t.x})).y((function(t){return t.y}));return(n.curve||n.interpolate)(t.curve),n(e)}t.exports=function(t,e,n){var c=t.selectAll("g.edgePath").data(e.edges(),(function(t){return a.edgeToId(t)})).classed("update",!0),l=function(t,e){var n=t.enter().append("g").attr("class","edgePath").style("opacity",0);return n.append("path").attr("class","path").attr("d",(function(t){var n=e.edge(t),i=e.node(t.v).elem;return s(n,r.range(n.points.length).map((function(){return e=(t=i).getBBox(),{x:(n=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2)).e,y:n.f};var t,e,n})))})),n.append("defs"),n}(c,e);!function(t,e){var n=t.exit();a.applyTransition(n,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 n=o.select(this),r=e.edge(t);r.elem=this,r.id&&n.attr("id",r.id),a.applyClass(n,r.class,(n.classed("update")?"update ":"")+"edgePath")})),u.selectAll("path.path").each((function(t){var n=e.edge(t);n.arrowheadId=r.uniqueId("arrowhead");var c=o.select(this).attr("marker-end",(function(){return"url("+(t=location.href,e=n.arrowheadId,t.split("#")[0]+"#"+e+")");var t,e})).style("fill","none");a.applyTransition(c,e).attr("d",(function(t){return function(t,e){var n=t.edge(e),r=t.node(e.v),a=t.node(e.w),o=n.points.slice(1,n.points.length-1);return o.unshift(i(r,o[0])),o.push(i(a,o[o.length-1])),s(n,o)}(e,t)})),a.applyStyle(c,n.style)})),u.selectAll("defs *").remove(),u.selectAll("defs").each((function(t){var r=e.edge(t);(0,n[r.arrowhead])(o.select(this),r.arrowheadId,r,"arrowhead")})),u}},10607:(t,e,n)=>{"use strict";var r=n(91034),i=n(61322),a=n(28355),o=n(24322);t.exports=function(t,e,n){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);return 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),h=n[s.shape],f=r.pick(u.node().getBBox(),"width","height");s.elem=this,s.id&&c.attr("id",s.id),s.labelId&&l.attr("id",s.labelId),r.has(s,"width")&&(f.width=s.width),r.has(s,"height")&&(f.height=s.height),f.width+=s.paddingLeft+s.paddingRight,f.height+=s.paddingTop+s.paddingBottom,l.attr("transform","translate("+(s.paddingLeft-s.paddingRight)/2+","+(s.paddingTop-s.paddingBottom)/2+")");var d=o.select(this);d.select(".label-container").remove();var p=h(d,f,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),a.applyTransition(s,e).style("opacity",0).remove(),l}},24322:(t,e,n)=>{var r;if(!r)try{r=n(38811)}catch(t){}r||(r=window.d3),t.exports=r},51463:(t,e,n)=>{var r;try{r=n(70681)}catch(t){}r||(r=window.dagre),t.exports=r},66614:(t,e,n)=>{var r;try{r=n(28282)}catch(t){}r||(r=window.graphlib),t.exports=r},78114:(t,e,n)=>{t.exports={node:n(13042),circle:n(56587),ellipse:n(3260),polygon:n(5337),rect:n(98049)}},56587:(t,e,n)=>{var r=n(3260);t.exports=function(t,e,n){return r(t,e,e,n)}},3260:t=>{t.exports=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),l=Math.abs(e*n*o/c);r.x<i&&(l=-l);var u=Math.abs(e*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}},36808:t=>{function e(t,e){return t*e>0}t.exports=function(t,n,r,i){var a,o,s,c,l,u,h,f,d,p,g,y,m;if(!(a=n.y-t.y,s=t.x-n.x,l=n.x*t.y-t.x*n.y,d=a*r.x+s*r.y+l,p=a*i.x+s*i.y+l,0!==d&&0!==p&&e(d,p)||(o=i.y-r.y,c=r.x-i.x,u=i.x*r.y-r.x*i.y,h=o*t.x+c*t.y+u,f=o*n.x+c*n.y+u,0!==h&&0!==f&&e(h,f)||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}}},13042:t=>{t.exports=function(t,e){return t.intersect(e)}},5337:(t,e,n)=>{var r=n(36808);t.exports=function(t,e,n){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,h=0;h<e.length;h++){var f=e[h],d=e[h<e.length-1?h+1:0],p=r(t,n,{x:l+f.x,y:u+f.y},{x:l+d.x,y:u+d.y});p&&o.push(p)}return o.length?(o.length>1&&o.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1})),o[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}},98049:t=>{t.exports=function(t,e){var n,r,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),n=0===s?0:l*o/s,r=l):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o),{x:i+n,y:a+r}}},88284:(t,e,n)=>{var r=n(28355);t.exports=function(t,e){var n=t.append("foreignObject").attr("width","100000"),i=n.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)}r.applyStyle(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var o=i.node().getBoundingClientRect();return n.attr("width",o.width).attr("height",o.height),n}},61322:(t,e,n)=>{var r=n(67318),i=n(88284),a=n(98287);t.exports=function(t,e,n){var o=e.label,s=t.append("g");"svg"===e.labelType?a(s,e):"string"!=typeof o||"html"===e.labelType?i(s,e):r(s,e);var c,l=s.node().getBBox();switch(n){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}},98287:(t,e,n)=>{var r=n(28355);t.exports=function(t,e){var n=t;return n.node().appendChild(e.label),r.applyStyle(n,e.labelStyle),n}},67318:(t,e,n)=>{var r=n(28355);t.exports=function(t,e){for(var n=t.append("text"),i=function(t){for(var e,n="",r=!1,i=0;i<t.length;++i)e=t[i],r?(n+="n"===e?"\n":e,r=!1):"\\"===e?r=!0:n+=e;return n}(e.label).split("\n"),a=0;a<i.length;a++)n.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(i[a]);return r.applyStyle(n,e.labelStyle),n}},91034:(t,e,n)=>{var r;try{r={defaults:n(91747),each:n(66073),isFunction:n(23560),isPlainObject:n(68630),pick:n(78718),has:n(18721),range:n(96026),uniqueId:n(73955)}}catch(t){}r||(r=window._),t.exports=r},26381:(t,e,n)=>{"use strict";var r=n(28355),i=n(24322);t.exports=function(t,e){var n=t.filter((function(){return!i.select(this).classed("update")}));function a(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}n.attr("transform",a),r.applyTransition(t,e).style("opacity",1).attr("transform",a),r.applyTransition(n.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}))}},44577:(t,e,n)=>{"use strict";var r=n(28355),i=n(24322),a=n(91034);t.exports=function(t,e){function n(t){var n=e.edge(t);return a.has(n,"x")?"translate("+n.x+","+n.y+")":""}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},54849:(t,e,n)=>{"use strict";var r=n(28355),i=n(24322);t.exports=function(t,e){function n(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},95787:(t,e,n)=>{var r=n(91034),i=n(24322),a=n(51463).layout;t.exports=function(){var t=n(10607),e=n(85632),i=n(16315),l=n(70940),u=n(54849),h=n(44577),f=n(26381),d=n(54418),p=n(39144),g=function(n,g){!function(t){t.nodes().forEach((function(e){var n=t.node(e);r.has(n,"label")||t.children(e).length||(n.label=e),r.has(n,"paddingX")&&r.defaults(n,{paddingLeft:n.paddingX,paddingRight:n.paddingX}),r.has(n,"paddingY")&&r.defaults(n,{paddingTop:n.paddingY,paddingBottom:n.paddingY}),r.has(n,"padding")&&r.defaults(n,{paddingLeft:n.padding,paddingRight:n.padding,paddingTop:n.padding,paddingBottom:n.padding}),r.defaults(n,o),r.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],(function(t){n[t]=Number(n[t])})),r.has(n,"width")&&(n._prevWidth=n.width),r.has(n,"height")&&(n._prevHeight=n.height)})),t.edges().forEach((function(e){var n=t.edge(e);r.has(n,"label")||(n.label=""),r.defaults(n,s)}))}(g);var y=c(n,"output"),m=c(y,"clusters"),b=c(y,"edgePaths"),_=i(c(y,"edgeLabels"),g),v=t(c(y,"nodes"),g,d);a(g),u(v,g),h(_,g),l(b,g,p);var x=e(m,g);f(x,g),function(t){r.each(t.nodes(),(function(e){var n=t.node(e);r.has(n,"_prevWidth")?n.width=n._prevWidth:delete n.width,r.has(n,"_prevHeight")?n.height=n._prevHeight:delete n.height,delete n._prevWidth,delete n._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?(d=t,g):d},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 n=t.select("g."+e);return n.empty()&&(n=t.append("g").attr("class",e)),n}},54418:(t,e,n)=>{"use strict";var r=n(98049),i=n(3260),a=n(56587),o=n(5337);t.exports={rect:function(t,e,n){var i=t.insert("rect",":first-child").attr("rx",n.rx).attr("ry",n.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return n.intersect=function(t){return r(n,t)},i},ellipse:function(t,e,n){var r=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",r).attr("ry",a);return n.intersect=function(t){return i(n,r,a,t)},o},circle:function(t,e,n){var r=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",r);return n.intersect=function(t){return a(n,r,t)},i},diamond:function(t,e,n){var r=e.width*Math.SQRT2/2,i=e.height*Math.SQRT2/2,a=[{x:0,y:-i},{x:-r,y:0},{x:0,y:i},{x:r,y:0}],s=t.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" "));return n.intersect=function(t){return o(n,a,t)},s}}},28355:(t,e,n)=>{var r=n(91034);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,n){e&&t.attr("class",e).attr("class",n+" "+t.attr("class"))},applyTransition:function(t,e){var n=e.graph();if(r.isPlainObject(n)){var i=n.transition;if(r.isFunction(i))return i(t)}return t}};var i=/:/g;function a(t){return t?String(t).replace(i,"\\:"):""}},55689:t=>{t.exports="0.6.4"},38811:(t,e,n)=>{"use strict";n.r(e),n.d(e,{FormatSpecifier:()=>lc,active:()=>Jr,arc:()=>fx,area:()=>bx,areaRadial:()=>Sx,ascending:()=>i,autoType:()=>Ro,axisBottom:()=>it,axisLeft:()=>at,axisRight:()=>rt,axisTop:()=>nt,bisect:()=>l,bisectLeft:()=>c,bisectRight:()=>s,bisector:()=>a,blob:()=>ms,brush:()=>Ai,brushSelection:()=>Ei,brushX:()=>Ci,brushY:()=>Si,buffer:()=>_s,chord:()=>Ri,clientPoint:()=>Dn,cluster:()=>Sd,color:()=>Ve,contourDensity:()=>oo,contours:()=>to,create:()=>$v,creator:()=>ie,cross:()=>f,csv:()=>Ts,csvFormat:()=>To,csvFormatBody:()=>Eo,csvFormatRow:()=>So,csvFormatRows:()=>Co,csvFormatValue:()=>Ao,csvParse:()=>ko,csvParseRows:()=>wo,cubehelix:()=>qa,curveBasis:()=>sk,curveBasisClosed:()=>lk,curveBasisOpen:()=>hk,curveBundle:()=>dk,curveCardinal:()=>yk,curveCardinalClosed:()=>bk,curveCardinalOpen:()=>vk,curveCatmullRom:()=>wk,curveCatmullRomClosed:()=>Ek,curveCatmullRomOpen:()=>Sk,curveLinear:()=>px,curveLinearClosed:()=>Mk,curveMonotoneX:()=>Rk,curveMonotoneY:()=>Pk,curveNatural:()=>Yk,curveStep:()=>Uk,curveStepAfter:()=>Wk,curveStepBefore:()=>qk,customEvent:()=>ye,descending:()=>d,deviation:()=>y,dispatch:()=>ft,drag:()=>po,dragDisable:()=>Se,dragEnable:()=>Ae,dsv:()=>ws,dsvFormat:()=>vo,easeBack:()=>hs,easeBackIn:()=>ls,easeBackInOut:()=>hs,easeBackOut:()=>us,easeBounce:()=>os,easeBounceIn:()=>as,easeBounceInOut:()=>ss,easeBounceOut:()=>os,easeCircle:()=>rs,easeCircleIn:()=>es,easeCircleInOut:()=>rs,easeCircleOut:()=>ns,easeCubic:()=>Xr,easeCubicIn:()=>Vr,easeCubicInOut:()=>Xr,easeCubicOut:()=>Gr,easeElastic:()=>ps,easeElasticIn:()=>ds,easeElasticInOut:()=>gs,easeElasticOut:()=>ps,easeExp:()=>ts,easeExpIn:()=>Ko,easeExpInOut:()=>ts,easeExpOut:()=>Jo,easeLinear:()=>$o,easePoly:()=>Wo,easePolyIn:()=>Uo,easePolyInOut:()=>Wo,easePolyOut:()=>qo,easeQuad:()=>zo,easeQuadIn:()=>jo,easeQuadInOut:()=>zo,easeQuadOut:()=>Yo,easeSin:()=>Zo,easeSinIn:()=>Go,easeSinInOut:()=>Zo,easeSinOut:()=>Xo,entries:()=>pa,event:()=>ue,extent:()=>m,forceCenter:()=>Os,forceCollide:()=>Hs,forceLink:()=>Xs,forceManyBody:()=>tc,forceRadial:()=>ec,forceSimulation:()=>Js,forceX:()=>nc,forceY:()=>rc,format:()=>pc,formatDefaultLocale:()=>_c,formatLocale:()=>bc,formatPrefix:()=>gc,formatSpecifier:()=>cc,geoAlbers:()=>zf,geoAlbersUsa:()=>Uf,geoArea:()=>gl,geoAzimuthalEqualArea:()=>Vf,geoAzimuthalEqualAreaRaw:()=>Hf,geoAzimuthalEquidistant:()=>Xf,geoAzimuthalEquidistantRaw:()=>Gf,geoBounds:()=>su,geoCentroid:()=>_u,geoCircle:()=>Nu,geoClipAntimeridian:()=>zu,geoClipCircle:()=>Uu,geoClipExtent:()=>Vu,geoClipRectangle:()=>Hu,geoConicConformal:()=>ed,geoConicConformalRaw:()=>td,geoConicEqualArea:()=>Yf,geoConicEqualAreaRaw:()=>jf,geoConicEquidistant:()=>ad,geoConicEquidistantRaw:()=>id,geoContains:()=>ph,geoDistance:()=>ah,geoEqualEarth:()=>fd,geoEqualEarthRaw:()=>hd,geoEquirectangular:()=>rd,geoEquirectangularRaw:()=>nd,geoGnomonic:()=>pd,geoGnomonicRaw:()=>dd,geoGraticule:()=>mh,geoGraticule10:()=>bh,geoIdentity:()=>gd,geoInterpolate:()=>_h,geoLength:()=>nh,geoMercator:()=>Qf,geoMercatorRaw:()=>Zf,geoNaturalEarth1:()=>md,geoNaturalEarth1Raw:()=>yd,geoOrthographic:()=>_d,geoOrthographicRaw:()=>bd,geoPath:()=>wf,geoProjection:()=>Rf,geoProjectionMutator:()=>Pf,geoRotation:()=>Su,geoStereographic:()=>xd,geoStereographicRaw:()=>vd,geoStream:()=>nl,geoTransform:()=>Tf,geoTransverseMercator:()=>wd,geoTransverseMercatorRaw:()=>kd,gray:()=>wa,hcl:()=>La,hierarchy:()=>Md,histogram:()=>D,hsl:()=>an,html:()=>Ds,image:()=>Cs,interpolate:()=>Mn,interpolateArray:()=>xn,interpolateBasis:()=>ln,interpolateBasisClosed:()=>un,interpolateBlues:()=>fv,interpolateBrBG:()=>T_,interpolateBuGn:()=>z_,interpolateBuPu:()=>q_,interpolateCividis:()=>wv,interpolateCool:()=>Cv,interpolateCubehelix:()=>Yp,interpolateCubehelixDefault:()=>Tv,interpolateCubehelixLong:()=>zp,interpolateDate:()=>wn,interpolateDiscrete:()=>Sp,interpolateGnBu:()=>H_,interpolateGreens:()=>pv,interpolateGreys:()=>yv,interpolateHcl:()=>Pp,interpolateHclLong:()=>$p,interpolateHsl:()=>Bp,interpolateHslLong:()=>Ip,interpolateHue:()=>Ap,interpolateInferno:()=>Rv,interpolateLab:()=>Fp,interpolateMagma:()=>Fv,interpolateNumber:()=>Tn,interpolateNumberArray:()=>_n,interpolateObject:()=>En,interpolateOrRd:()=>G_,interpolateOranges:()=>kv,interpolatePRGn:()=>C_,interpolatePiYG:()=>A_,interpolatePlasma:()=>Pv,interpolatePuBu:()=>K_,interpolatePuBuGn:()=>Z_,interpolatePuOr:()=>N_,interpolatePuRd:()=>tv,interpolatePurples:()=>bv,interpolateRainbow:()=>Av,interpolateRdBu:()=>L_,interpolateRdGy:()=>B_,interpolateRdPu:()=>nv,interpolateRdYlBu:()=>F_,interpolateRdYlGn:()=>P_,interpolateReds:()=>vv,interpolateRgb:()=>gn,interpolateRgbBasis:()=>mn,interpolateRgbBasisClosed:()=>bn,interpolateRound:()=>Mp,interpolateSinebow:()=>Lv,interpolateSpectral:()=>j_,interpolateString:()=>An,interpolateTransformCss:()=>pr,interpolateTransformSvg:()=>gr,interpolateTurbo:()=>Ov,interpolateViridis:()=>Iv,interpolateWarm:()=>Ev,interpolateYlGn:()=>ov,interpolateYlGnBu:()=>iv,interpolateYlOrBr:()=>cv,interpolateYlOrRd:()=>uv,interpolateZoom:()=>Lp,interrupt:()=>ar,interval:()=>fw,isoFormat:()=>lw,isoParse:()=>hw,json:()=>As,keys:()=>fa,lab:()=>Ta,lch:()=>Da,line:()=>mx,lineRadial:()=>Cx,linkHorizontal:()=>Fx,linkRadial:()=>Px,linkVertical:()=>Rx,local:()=>Yv,map:()=>na,matcher:()=>mt,max:()=>I,mean:()=>F,median:()=>R,merge:()=>P,min:()=>$,mouse:()=>On,namespace:()=>Et,namespaces:()=>Tt,nest:()=>ra,now:()=>qn,pack:()=>tp,packEnclose:()=>Id,packSiblings:()=>Gd,pairs:()=>u,partition:()=>op,path:()=>Hi,permute:()=>j,pie:()=>xx,piecewise:()=>Up,pointRadial:()=>Ax,polygonArea:()=>Wp,polygonCentroid:()=>Hp,polygonContains:()=>Qp,polygonHull:()=>Zp,polygonLength:()=>Kp,precisionFixed:()=>vc,precisionPrefix:()=>xc,precisionRound:()=>kc,quadtree:()=>js,quantile:()=>L,quantize:()=>qp,radialArea:()=>Sx,radialLine:()=>Cx,randomBates:()=>ig,randomExponential:()=>ag,randomIrwinHall:()=>rg,randomLogNormal:()=>ng,randomNormal:()=>eg,randomUniform:()=>tg,range:()=>w,rgb:()=>Qe,ribbon:()=>Ki,scaleBand:()=>dg,scaleDiverging:()=>o_,scaleDivergingLog:()=>s_,scaleDivergingPow:()=>l_,scaleDivergingSqrt:()=>u_,scaleDivergingSymlog:()=>c_,scaleIdentity:()=>Mg,scaleImplicit:()=>hg,scaleLinear:()=>Ag,scaleLog:()=>Pg,scaleOrdinal:()=>fg,scalePoint:()=>gg,scalePow:()=>Vg,scaleQuantile:()=>Xg,scaleQuantize:()=>Zg,scaleSequential:()=>Jb,scaleSequentialLog:()=>t_,scaleSequentialPow:()=>n_,scaleSequentialQuantile:()=>i_,scaleSequentialSqrt:()=>r_,scaleSequentialSymlog:()=>e_,scaleSqrt:()=>Gg,scaleSymlog:()=>zg,scaleThreshold:()=>Qg,scaleTime:()=>jb,scaleUtc:()=>Zb,scan:()=>Y,schemeAccent:()=>d_,schemeBlues:()=>hv,schemeBrBG:()=>w_,schemeBuGn:()=>Y_,schemeBuPu:()=>U_,schemeCategory10:()=>f_,schemeDark2:()=>p_,schemeGnBu:()=>W_,schemeGreens:()=>dv,schemeGreys:()=>gv,schemeOrRd:()=>V_,schemeOranges:()=>xv,schemePRGn:()=>E_,schemePaired:()=>g_,schemePastel1:()=>y_,schemePastel2:()=>m_,schemePiYG:()=>S_,schemePuBu:()=>Q_,schemePuBuGn:()=>X_,schemePuOr:()=>M_,schemePuRd:()=>J_,schemePurples:()=>mv,schemeRdBu:()=>D_,schemeRdGy:()=>O_,schemeRdPu:()=>ev,schemeRdYlBu:()=>I_,schemeRdYlGn:()=>R_,schemeReds:()=>_v,schemeSet1:()=>b_,schemeSet2:()=>__,schemeSet3:()=>v_,schemeSpectral:()=>$_,schemeTableau10:()=>x_,schemeYlGn:()=>av,schemeYlGnBu:()=>rv,schemeYlOrBr:()=>sv,schemeYlOrRd:()=>lv,select:()=>Te,selectAll:()=>Uv,selection:()=>we,selector:()=>pt,selectorAll:()=>yt,set:()=>ha,shuffle:()=>z,stack:()=>Xk,stackOffsetDiverging:()=>Qk,stackOffsetExpand:()=>Zk,stackOffsetNone:()=>Hk,stackOffsetSilhouette:()=>Kk,stackOffsetWiggle:()=>Jk,stackOrderAppearance:()=>tw,stackOrderAscending:()=>nw,stackOrderDescending:()=>iw,stackOrderInsideOut:()=>aw,stackOrderNone:()=>Vk,stackOrderReverse:()=>ow,stratify:()=>hp,style:()=>Ft,sum:()=>U,svg:()=>Ls,symbol:()=>rk,symbolCircle:()=>$x,symbolCross:()=>jx,symbolDiamond:()=>Ux,symbolSquare:()=>Gx,symbolStar:()=>Vx,symbolTriangle:()=>Zx,symbolWye:()=>ek,symbols:()=>nk,text:()=>xs,thresholdFreedmanDiaconis:()=>O,thresholdScott:()=>B,thresholdSturges:()=>N,tickFormat:()=>Cg,tickIncrement:()=>A,tickStep:()=>M,ticks:()=>S,timeDay:()=>Ay,timeDays:()=>My,timeFormat:()=>pm,timeFormatDefaultLocale:()=>Ib,timeFormatLocale:()=>fm,timeFriday:()=>by,timeFridays:()=>Ey,timeHour:()=>Dy,timeHours:()=>Ly,timeInterval:()=>ty,timeMillisecond:()=>jy,timeMilliseconds:()=>Yy,timeMinute:()=>By,timeMinutes:()=>Iy,timeMonday:()=>py,timeMondays:()=>xy,timeMonth:()=>ay,timeMonths:()=>oy,timeParse:()=>gm,timeSaturday:()=>_y,timeSaturdays:()=>Cy,timeSecond:()=>Ry,timeSeconds:()=>Py,timeSunday:()=>dy,timeSundays:()=>vy,timeThursday:()=>my,timeThursdays:()=>Ty,timeTuesday:()=>gy,timeTuesdays:()=>ky,timeWednesday:()=>yy,timeWednesdays:()=>wy,timeWeek:()=>dy,timeWeeks:()=>vy,timeYear:()=>ny,timeYears:()=>ry,timeout:()=>Kn,timer:()=>Vn,timerFlush:()=>Gn,touch:()=>Ln,touches:()=>qv,transition:()=>qr,transpose:()=>q,tree:()=>bp,treemap:()=>wp,treemapBinary:()=>Tp,treemapDice:()=>ap,treemapResquarify:()=>Cp,treemapSlice:()=>_p,treemapSliceDice:()=>Ep,treemapSquarify:()=>kp,tsv:()=>Es,tsvFormat:()=>Lo,tsvFormatBody:()=>Oo,tsvFormatRow:()=>Io,tsvFormatRows:()=>Bo,tsvFormatValue:()=>Fo,tsvParse:()=>No,tsvParseRows:()=>Do,utcDay:()=>im,utcDays:()=>am,utcFormat:()=>ym,utcFriday:()=>Gy,utcFridays:()=>em,utcHour:()=>Wb,utcHours:()=>Hb,utcMillisecond:()=>jy,utcMilliseconds:()=>Yy,utcMinute:()=>Gb,utcMinutes:()=>Xb,utcMonday:()=>qy,utcMondays:()=>Qy,utcMonth:()=>zb,utcMonths:()=>Ub,utcParse:()=>mm,utcSaturday:()=>Xy,utcSaturdays:()=>nm,utcSecond:()=>Ry,utcSeconds:()=>Py,utcSunday:()=>Uy,utcSundays:()=>Zy,utcThursday:()=>Vy,utcThursdays:()=>tm,utcTuesday:()=>Wy,utcTuesdays:()=>Ky,utcWednesday:()=>Hy,utcWednesdays:()=>Jy,utcWeek:()=>Uy,utcWeeks:()=>Zy,utcYear:()=>sm,utcYears:()=>cm,values:()=>da,variance:()=>g,version:()=>r,voronoi:()=>Kw,window:()=>Lt,xml:()=>Ns,zip:()=>H,zoom:()=>fT,zoomIdentity:()=>nT,zoomTransform:()=>rT});var r="5.16.0";function i(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function a(t){var e;return 1===t.length&&(e=t,t=function(t,n){return i(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}var o=a(i),s=o.right,c=o.left;const l=s;function u(t,e){null==e&&(e=h);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return a}function h(t,e){return[t,e]}function f(t,e,n){var r,i,a,o,s=t.length,c=e.length,l=new Array(s*c);for(null==n&&(n=h),r=a=0;r<s;++r)for(o=t[r],i=0;i<c;++i,++a)l[a]=n(o,e[i]);return l}function d(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function p(t){return null===t?NaN:+t}function g(t,e){var n,r,i=t.length,a=0,o=-1,s=0,c=0;if(null==e)for(;++o<i;)isNaN(n=p(t[o]))||(c+=(r=n-s)*(n-(s+=r/++a)));else for(;++o<i;)isNaN(n=p(e(t[o],o,t)))||(c+=(r=n-s)*(n-(s+=r/++a)));if(a>1)return c/(a-1)}function y(t,e){var n=g(t,e);return n?Math.sqrt(n):n}function m(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}var b=Array.prototype,_=b.slice,v=b.map;function x(t){return function(){return t}}function k(t){return t}function w(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}var T=Math.sqrt(50),E=Math.sqrt(10),C=Math.sqrt(2);function S(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=A(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(t-s)/o;return r&&a.reverse(),a}function A(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=T?10:a>=E?5:a>=C?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=T?10:a>=E?5:a>=C?2:1)}function M(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=T?i*=10:a>=E?i*=5:a>=C&&(i*=2),e<t?-i:i}function N(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}function D(){var t=k,e=m,n=N;function r(r){var i,a,o=r.length,s=new Array(o);for(i=0;i<o;++i)s[i]=t(r[i],i,r);var c=e(s),u=c[0],h=c[1],f=n(s,u,h);Array.isArray(f)||(f=M(u,h,f),f=w(Math.ceil(u/f)*f,h,f));for(var d=f.length;f[0]<=u;)f.shift(),--d;for(;f[d-1]>h;)f.pop(),--d;var p,g=new Array(d+1);for(i=0;i<=d;++i)(p=g[i]=[]).x0=i>0?f[i-1]:u,p.x1=i<d?f[i]:h;for(i=0;i<o;++i)u<=(a=s[i])&&a<=h&&g[l(f,a,0,d)].push(r[i]);return g}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:x(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:x([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?x(_.call(t)):x(t),r):n},r}function L(t,e,n){if(null==n&&(n=p),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}}function O(t,e,n){return t=v.call(t,p).sort(i),Math.ceil((n-e)/(2*(L(t,.75)-L(t,.25))*Math.pow(t.length,-1/3)))}function B(t,e,n){return Math.ceil((n-e)/(3.5*y(t)*Math.pow(t.length,-1/3)))}function I(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r}function F(t,e){var n,r=t.length,i=r,a=-1,o=0;if(null==e)for(;++a<r;)isNaN(n=p(t[a]))?--i:o+=n;else for(;++a<r;)isNaN(n=p(e(t[a],a,t)))?--i:o+=n;if(i)return o/i}function R(t,e){var n,r=t.length,a=-1,o=[];if(null==e)for(;++a<r;)isNaN(n=p(t[a]))||o.push(n);else for(;++a<r;)isNaN(n=p(e(t[a],a,t)))||o.push(n);return L(o.sort(i),.5)}function P(t){for(var e,n,r,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(n=new Array(o);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n}function $(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&r>n&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&r>n&&(r=n);return r}function j(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r}function Y(t,e){if(n=t.length){var n,r,a=0,o=0,s=t[o];for(null==e&&(e=i);++a<n;)(e(r=t[a],s)<0||0!==e(s,s))&&(s=r,o=a);return 0===e(s,s)?o:void 0}}function z(t,e,n){for(var r,i,a=(null==n?t.length:n)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,r=t[a+e],t[a+e]=t[i+e],t[i+e]=r;return t}function U(t,e){var n,r=t.length,i=-1,a=0;if(null==e)for(;++i<r;)(n=+t[i])&&(a+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(a+=n);return a}function q(t){if(!(i=t.length))return[];for(var e=-1,n=$(t,W),r=new Array(n);++e<n;)for(var i,a=-1,o=r[e]=new Array(i);++a<i;)o[a]=t[a][e];return r}function W(t){return t.length}function H(){return q(arguments)}var V=Array.prototype.slice;function G(t){return t}var X=1e-6;function Z(t){return"translate("+(t+.5)+",0)"}function Q(t){return"translate(0,"+(t+.5)+")"}function K(t){return function(e){return+t(e)}}function J(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function tt(){return!this.__axis}function et(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,c=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",u=1===t||3===t?Z:Q;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):G:i,p=Math.max(a,0)+s,g=e.range(),y=+g[0]+.5,m=+g[g.length-1]+.5,b=(e.bandwidth?J:K)(e.copy()),_=h.selection?h.selection():h,v=_.selectAll(".domain").data([null]),x=_.selectAll(".tick").data(f,e).order(),k=x.exit(),w=x.enter().append("g").attr("class","tick"),T=x.select("line"),E=x.select("text");v=v.merge(v.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(w),T=T.merge(w.append("line").attr("stroke","currentColor").attr(l+"2",c*a)),E=E.merge(w.append("text").attr("fill","currentColor").attr(l,c*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==_&&(v=v.transition(h),x=x.transition(h),T=T.transition(h),E=E.transition(h),k=k.transition(h).attr("opacity",X).attr("transform",(function(t){return isFinite(t=b(t))?u(t):this.getAttribute("transform")})),w.attr("opacity",X).attr("transform",(function(t){var e=this.parentNode.__axis;return u(e&&isFinite(e=e(t))?e:b(t))}))),k.remove(),v.attr("d",4===t||2==t?o?"M"+c*o+","+y+"H0.5V"+m+"H"+c*o:"M0.5,"+y+"V"+m:o?"M"+y+","+c*o+"V0.5H"+m+"V"+c*o:"M"+y+",0.5H"+m),x.attr("opacity",1).attr("transform",(function(t){return u(b(t))})),T.attr(l+"2",c*a),E.attr(l,c*p).text(d),_.filter(tt).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),_.each((function(){this.__axis=b}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=V.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:V.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:V.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=o=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(o=+t,h):o},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function nt(t){return et(1,t)}function rt(t){return et(2,t)}function it(t){return et(3,t)}function at(t){return et(4,t)}var ot={value:function(){}};function st(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ct(r)}function ct(t){this._=t}function lt(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function ut(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function ht(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=ot,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ct.prototype=st.prototype={constructor:ct,on:function(t,e){var n,r=this._,i=lt(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=ht(r[n],t.name,e);else if(null==e)for(n in r)r[n]=ht(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=ut(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ct(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};const ft=st;function dt(){}function pt(t){return null==t?dt:function(){return this.querySelector(t)}}function gt(){return[]}function yt(t){return null==t?gt:function(){return this.querySelectorAll(t)}}function mt(t){return function(){return this.matches(t)}}function bt(t){return new Array(t.length)}function _t(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function vt(t,e,n,r,i,a){for(var o,s=0,c=e.length,l=a.length;s<l;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new _t(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function xt(t,e,n,r,i,a,o){var s,c,l,u={},h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(d[s]=l="$"+o.call(c,c.__data__,s,e),l in u?i[s]=c:u[l]=c);for(s=0;s<f;++s)(c=u[l="$"+o.call(t,a[s],s,a)])?(r[s]=c,c.__data__=a[s],u[l]=null):n[s]=new _t(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&u[d[s]]===c&&(i[s]=c)}function kt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}_t.prototype={constructor:_t,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var wt="http://www.w3.org/1999/xhtml";const Tt={svg:"http://www.w3.org/2000/svg",xhtml:wt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Et(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Tt.hasOwnProperty(e)?{space:Tt[e],local:t}:t}function Ct(t){return function(){this.removeAttribute(t)}}function St(t){return function(){this.removeAttributeNS(t.space,t.local)}}function At(t,e){return function(){this.setAttribute(t,e)}}function Mt(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Nt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Dt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Lt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ot(t){return function(){this.style.removeProperty(t)}}function Bt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function It(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Ft(t,e){return t.style.getPropertyValue(e)||Lt(t).getComputedStyle(t,null).getPropertyValue(e)}function Rt(t){return function(){delete this[t]}}function Pt(t,e){return function(){this[t]=e}}function $t(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function jt(t){return t.trim().split(/^|\s+/)}function Yt(t){return t.classList||new zt(t)}function zt(t){this._node=t,this._names=jt(t.getAttribute("class")||"")}function Ut(t,e){for(var n=Yt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function qt(t,e){for(var n=Yt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Wt(t){return function(){Ut(this,t)}}function Ht(t){return function(){qt(this,t)}}function Vt(t,e){return function(){(e.apply(this,arguments)?Ut:qt)(this,t)}}function Gt(){this.textContent=""}function Xt(t){return function(){this.textContent=t}}function Zt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Qt(){this.innerHTML=""}function Kt(t){return function(){this.innerHTML=t}}function Jt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function te(){this.nextSibling&&this.parentNode.appendChild(this)}function ee(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ne(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===wt&&e.documentElement.namespaceURI===wt?e.createElement(t):e.createElementNS(n,t)}}function re(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ie(t){var e=Et(t);return(e.local?re:ne)(e)}function ae(){return null}function oe(){var t=this.parentNode;t&&t.removeChild(this)}function se(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ce(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}zt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var le={},ue=null;function he(t,e,n){return t=fe(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function fe(t,e,n){return function(r){var i=ue;ue=r;try{t.call(this,this.__data__,e,n)}finally{ue=i}}}function de(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function pe(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function ge(t,e,n){var r=le.hasOwnProperty(t.type)?he:fe;return function(i,a,o){var s,c=this.__on,l=r(e,a,o);if(c)for(var u=0,h=c.length;u<h;++u)if((s=c[u]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=l,s.capture=n),void(s.value=e);this.addEventListener(t.type,l,n),s={type:t.type,name:t.name,value:e,listener:l,capture:n},c?c.push(s):this.__on=[s]}}function ye(t,e,n,r){var i=ue;t.sourceEvent=ue,ue=t;try{return e.apply(n,r)}finally{ue=i}}function me(t,e,n){var r=Lt(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function be(t,e){return function(){return me(this,t,e)}}function _e(t,e){return function(){return me(this,t,e.apply(this,arguments))}}"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(le={mouseenter:"mouseover",mouseleave:"mouseout"}));var ve=[null];function xe(t,e){this._groups=t,this._parents=e}function ke(){return new xe([[document.documentElement]],ve)}xe.prototype=ke.prototype={constructor:xe,select:function(t){"function"!=typeof t&&(t=pt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],c=s.length,l=r[i]=new Array(c),u=0;u<c;++u)(a=s[u])&&(o=t.call(a,a.__data__,u,s))&&("__data__"in a&&(o.__data__=a.__data__),l[u]=o);return new xe(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=yt(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,l=0;l<c;++l)(o=s[l])&&(r.push(t.call(o,o.__data__,l,s)),i.push(o));return new xe(r,i)},filter:function(t){"function"!=typeof t&&(t=mt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&c.push(a);return new xe(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),u=-1,this.each((function(t){p[++u]=t})),p;var n,r=e?xt:vt,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,s=new Array(o),c=new Array(o),l=new Array(o),u=0;u<o;++u){var h=i[u],f=a[u],d=f.length,p=t.call(h,h&&h.__data__,u,i),g=p.length,y=c[u]=new Array(g),m=s[u]=new Array(g);r(h,f,y,m,l[u]=new Array(d),p,e);for(var b,_,v=0,x=0;v<g;++v)if(b=y[v]){for(v>=x&&(x=v+1);!(_=m[x])&&++x<g;);b._next=_||null}}return(s=new xe(s,i))._enter=c,s._exit=l,s},enter:function(){return new xe(this._enter||this._groups.map(bt),this._parents)},exit:function(){return new xe(this._exit||this._groups.map(bt),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,l=e[s],u=n[s],h=l.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=l[d]||u[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new xe(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=kt);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,l=i[a]=new Array(c),u=0;u<c;++u)(o=s[u])&&(l[u]=o);l.sort(e)}return new xe(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=Et(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?St:Ct:"function"==typeof e?n.local?Dt:Nt:n.local?Mt:At)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Ot:"function"==typeof e?It:Bt)(t,e,null==n?"":n)):Ft(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Rt:"function"==typeof e?$t:Pt)(t,e)):this.node()[t]},classed:function(t,e){var n=jt(t+"");if(arguments.length<2){for(var r=Yt(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Vt:e?Wt:Ht)(n,e))},text:function(t){return arguments.length?this.each(null==t?Gt:("function"==typeof t?Zt:Xt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Qt:("function"==typeof t?Jt:Kt)(t)):this.node().innerHTML},raise:function(){return this.each(te)},lower:function(){return this.each(ee)},append:function(t){var e="function"==typeof t?t:ie(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ie(t),r=null==e?ae:"function"==typeof e?e:pt(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(oe)},clone:function(t){return this.select(t?ce:se)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=de(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?ge:pe,null==n&&(n=!1),r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var c,l=0,u=s.length;l<u;++l)for(r=0,c=s[l];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?_e:be)(t,e))}};const we=ke;function Te(t){return"string"==typeof t?new xe([[document.querySelector(t)]],[document.documentElement]):new xe([[t]],ve)}function Ee(){ue.stopImmediatePropagation()}function Ce(){ue.preventDefault(),ue.stopImmediatePropagation()}function Se(t){var e=t.document.documentElement,n=Te(t).on("dragstart.drag",Ce,!0);"onselectstart"in e?n.on("selectstart.drag",Ce,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Ae(t,e){var n=t.document.documentElement,r=Te(t).on("dragstart.drag",null);e&&(r.on("click.drag",Ce,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Me(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ne(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function De(){}var Le=.7,Oe=1/Le,Be="\\s*([+-]?\\d+)\\s*",Ie="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Re=/^#([0-9a-f]{3,8})$/,Pe=new RegExp("^rgb\\("+[Be,Be,Be]+"\\)$"),$e=new RegExp("^rgb\\("+[Fe,Fe,Fe]+"\\)$"),je=new RegExp("^rgba\\("+[Be,Be,Be,Ie]+"\\)$"),Ye=new RegExp("^rgba\\("+[Fe,Fe,Fe,Ie]+"\\)$"),ze=new RegExp("^hsl\\("+[Ie,Fe,Fe]+"\\)$"),Ue=new RegExp("^hsla\\("+[Ie,Fe,Fe,Ie]+"\\)$"),qe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function We(){return this.rgb().formatHex()}function He(){return this.rgb().formatRgb()}function Ve(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Re.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ge(e):3===n?new Ke(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Xe(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Xe(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Pe.exec(t))?new Ke(e[1],e[2],e[3],1):(e=$e.exec(t))?new Ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=je.exec(t))?Xe(e[1],e[2],e[3],e[4]):(e=Ye.exec(t))?Xe(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ze.exec(t))?nn(e[1],e[2]/100,e[3]/100,1):(e=Ue.exec(t))?nn(e[1],e[2]/100,e[3]/100,e[4]):qe.hasOwnProperty(t)?Ge(qe[t]):"transparent"===t?new Ke(NaN,NaN,NaN,0):null}function Ge(t){return new Ke(t>>16&255,t>>8&255,255&t,1)}function Xe(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ke(t,e,n,r)}function Ze(t){return t instanceof De||(t=Ve(t)),t?new Ke((t=t.rgb()).r,t.g,t.b,t.opacity):new Ke}function Qe(t,e,n,r){return 1===arguments.length?Ze(t):new Ke(t,e,n,null==r?1:r)}function Ke(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Je(){return"#"+en(this.r)+en(this.g)+en(this.b)}function tn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function en(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function nn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new on(t,e,n,r)}function rn(t){if(t instanceof on)return new on(t.h,t.s,t.l,t.opacity);if(t instanceof De||(t=Ve(t)),!t)return new on;if(t instanceof on)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new on(o,s,c,t.opacity)}function an(t,e,n,r){return 1===arguments.length?rn(t):new on(t,e,n,null==r?1:r)}function on(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function sn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function cn(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}function ln(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return cn((n-r/e)*e,o,i,a,s)}}function un(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return cn((n-r/e)*e,i,a,o,s)}}function hn(t){return function(){return t}}function fn(t,e){return function(n){return t+n*e}}function dn(t,e){var n=e-t;return n?fn(t,n>180||n<-180?n-360*Math.round(n/360):n):hn(isNaN(t)?e:t)}function pn(t,e){var n=e-t;return n?fn(t,n):hn(isNaN(t)?e:t)}Me(De,Ve,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:We,formatHex:We,formatHsl:function(){return rn(this).formatHsl()},formatRgb:He,toString:He}),Me(Ke,Qe,Ne(De,{brighter:function(t){return t=null==t?Oe:Math.pow(Oe,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Le:Math.pow(Le,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Je,formatHex:Je,formatRgb:tn,toString:tn})),Me(on,an,Ne(De,{brighter:function(t){return t=null==t?Oe:Math.pow(Oe,t),new on(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Le:Math.pow(Le,t),new on(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ke(sn(t>=240?t-240:t+120,i,r),sn(t,i,r),sn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const gn=function t(e){var n=function(t){return 1==(t=+t)?pn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):hn(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=Qe(t)).r,(e=Qe(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=pn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function yn(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=Qe(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}var mn=yn(ln),bn=yn(un);function _n(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function vn(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function xn(t,e){return(vn(e)?_n:kn)(t,e)}function kn(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=Mn(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function wn(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Tn(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function En(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=Mn(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var Cn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Sn=new RegExp(Cn.source,"g");function An(t,e){var n,r,i,a=Cn.lastIndex=Sn.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=Cn.exec(t))&&(r=Sn.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:Tn(n,r)})),a=Sn.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})}function Mn(t,e){var n,r=typeof e;return null==e||"boolean"===r?hn(e):("number"===r?Tn:"string"===r?(n=Ve(e))?(e=n,gn):An:e instanceof Ve?gn:e instanceof Date?wn:vn(e)?_n:Array.isArray(e)?kn:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?En:Tn)(t,e)}function Nn(){for(var t,e=ue;t=e.sourceEvent;)e=t;return e}function Dn(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}function Ln(t,e,n){arguments.length<3&&(n=e,e=Nn().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return Dn(t,r);return null}function On(t){var e=Nn();return e.changedTouches&&(e=e.changedTouches[0]),Dn(t,e)}var Bn,In,Fn=0,Rn=0,Pn=0,$n=0,jn=0,Yn=0,zn="object"==typeof performance&&performance.now?performance:Date,Un="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function qn(){return jn||(Un(Wn),jn=zn.now()+Yn)}function Wn(){jn=0}function Hn(){this._call=this._time=this._next=null}function Vn(t,e,n){var r=new Hn;return r.restart(t,e,n),r}function Gn(){qn(),++Fn;for(var t,e=Bn;e;)(t=jn-e._time)>=0&&e._call.call(null,t),e=e._next;--Fn}function Xn(){jn=($n=zn.now())+Yn,Fn=Rn=0;try{Gn()}finally{Fn=0,function(){for(var t,e,n=Bn,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Bn=e);In=t,Qn(r)}(),jn=0}}function Zn(){var t=zn.now(),e=t-$n;e>1e3&&(Yn-=e,$n=t)}function Qn(t){Fn||(Rn&&(Rn=clearTimeout(Rn)),t-jn>24?(t<1/0&&(Rn=setTimeout(Xn,t-zn.now()-Yn)),Pn&&(Pn=clearInterval(Pn))):(Pn||($n=zn.now(),Pn=setInterval(Zn,1e3)),Fn=1,Un(Xn)))}function Kn(t,e,n){var r=new Hn;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Hn.prototype=Vn.prototype={constructor:Hn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?qn():+n)+(null==e?0:+e),this._next||In===this||(In?In._next=this:Bn=this,In=this),this._call=t,this._time=n,Qn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qn())}};var Jn=ft("start","end","cancel","interrupt"),tr=[];function er(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(c){var l,u,h,f;if(1!==n.state)return s();for(l in i)if((f=i[l]).name===n.name){if(3===f.state)return Kn(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+l<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[l])}if(Kn((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),l=0,u=-1;l<h;++l)(f=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(r[++u]=f);r.length=u+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Vn((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Jn,tween:tr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function nr(t,e){var n=ir(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function rr(t,e){var n=ir(t,e);if(n.state>3)throw new Error("too late; already running");return n}function ir(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ar(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}var or,sr,cr,lr,ur=180/Math.PI,hr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fr(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*ur,skewX:Math.atan(c)*ur,scaleX:o,scaleY:s}}function dr(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:Tn(t,i)},{i:c-2,x:Tn(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Tn(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Tn(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Tn(t,n)},{i:s-2,x:Tn(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var pr=dr((function(t){return"none"===t?hr:(or||(or=document.createElement("DIV"),sr=document.documentElement,cr=document.defaultView),or.style.transform=t,t=cr.getComputedStyle(sr.appendChild(or),null).getPropertyValue("transform"),sr.removeChild(or),fr(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),gr=dr((function(t){return null==t?hr:(lr||(lr=document.createElementNS("http://www.w3.org/2000/svg","g")),lr.setAttribute("transform",t),(t=lr.transform.baseVal.consolidate())?fr((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):hr)}),", ",")",")");function yr(t,e){var n,r;return function(){var i=rr(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function mr(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=rr(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===e){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function br(t,e,n){var r=t._id;return t.each((function(){var t=rr(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return ir(t,r).value[e]}}function _r(t,e){var n;return("number"==typeof e?Tn:e instanceof Ve?gn:(n=Ve(e))?(e=n,gn):An)(t,e)}function vr(t){return function(){this.removeAttribute(t)}}function xr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function kr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function wr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function Tr(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t)}}function Er(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function Cr(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Sr(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Ar(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Sr(t,i)),n}return i._value=e,i}function Mr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Cr(t,i)),n}return i._value=e,i}function Nr(t,e){return function(){nr(this,t).delay=+e.apply(this,arguments)}}function Dr(t,e){return e=+e,function(){nr(this,t).delay=e}}function Lr(t,e){return function(){rr(this,t).duration=+e.apply(this,arguments)}}function Or(t,e){return e=+e,function(){rr(this,t).duration=e}}function Br(t,e){if("function"!=typeof e)throw new Error;return function(){rr(this,t).ease=e}}function Ir(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?nr:rr;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Fr=we.prototype.constructor;function Rr(t){return function(){this.style.removeProperty(t)}}function Pr(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function $r(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Pr(t,a,n)),r}return a._value=e,a}function jr(t){return function(e){this.textContent=t.call(this,e)}}function Yr(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&jr(r)),e}return r._value=t,r}var zr=0;function Ur(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function qr(t){return we().transition(t)}function Wr(){return++zr}var Hr=we.prototype;function Vr(t){return t*t*t}function Gr(t){return--t*t*t+1}function Xr(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Ur.prototype=qr.prototype={constructor:Ur,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=pt(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,l=r[o],u=l.length,h=a[o]=new Array(u),f=0;f<u;++f)(s=l[f])&&(c=t.call(s,s.__data__,f,l))&&("__data__"in s&&(c.__data__=s.__data__),h[f]=c,er(h[f],e,n,f,h,ir(s,n)));return new Ur(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=yt(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,l=r[s],u=l.length,h=0;h<u;++h)if(c=l[h]){for(var f,d=t.call(c,c.__data__,h,l),p=ir(c,n),g=0,y=d.length;g<y;++g)(f=d[g])&&er(f,e,n,g,d,p);a.push(d),o.push(c)}return new Ur(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=mt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&c.push(a);return new Ur(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,l=e[s],u=n[s],h=l.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=l[d]||u[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new Ur(o,this._parents,this._name,this._id)},selection:function(){return new Fr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Wr(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,l=0;l<c;++l)if(o=s[l]){var u=ir(o,e);er(o,t,n,l,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Ur(r,this._parents,t,n)},call:Hr.call,nodes:Hr.nodes,node:Hr.node,size:Hr.size,empty:Hr.empty,each:Hr.each,on:function(t,e){var n=this._id;return arguments.length<2?ir(this.node(),n).on.on(t):this.each(Ir(n,t,e))},attr:function(t,e){var n=Et(t),r="transform"===n?gr:_r;return this.attrTween(t,"function"==typeof e?(n.local?Er:Tr)(n,r,br(this,"attr."+t,e)):null==e?(n.local?xr:vr)(n):(n.local?wr:kr)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Et(t);return this.tween(n,(r.local?Ar:Mr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?pr:_r;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Ft(this,t),o=(this.style.removeProperty(t),Ft(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Rr(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Ft(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=Ft(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,br(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var c=rr(this,t),l=c.on,u=null==c.value[o]?a||(a=Rr(e)):void 0;l===n&&i===u||(r=(n=l).copy()).on(s,i=u),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Ft(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,$r(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(br(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Yr(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=ir(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?yr:mr)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Nr:Dr)(e,t)):ir(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Lr:Or)(e,t)):ir(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Br(e,t)):ir(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--i&&a()}};n.each((function(){var n=rr(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e}))}))}};var Zr={time:null,delay:0,duration:250,ease:Xr};function Qr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Zr.time=qn(),Zr;return n}we.prototype.interrupt=function(t){return this.each((function(){ar(this,t)}))},we.prototype.transition=function(t){var e,n;t instanceof Ur?(e=t._id,t=t._name):(e=Wr(),(n=Zr).time=qn(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,l=0;l<c;++l)(o=s[l])&&er(o,t,e,l,s,n||Qr(o,e));return new Ur(r,this._parents,t,e)};var Kr=[null];function Jr(t,e){var n,r,i=t.__transition;if(i)for(r in e=null==e?null:e+"",i)if((n=i[r]).state>1&&n.name===e)return new Ur([[t]],Kr,e,+r);return null}function ti(t){return function(){return t}}function ei(t,e,n){this.target=t,this.type=e,this.selection=n}function ni(){ue.stopImmediatePropagation()}function ri(){ue.preventDefault(),ue.stopImmediatePropagation()}var ii={name:"drag"},ai={name:"space"},oi={name:"handle"},si={name:"center"};function ci(t){return[+t[0],+t[1]]}function li(t){return[ci(t[0]),ci(t[1])]}function ui(t){return function(e){return Ln(e,ue.touches,t)}}var hi={name:"x",handles:["w","e"].map(_i),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},fi={name:"y",handles:["n","s"].map(_i),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},di={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(_i),input:function(t){return null==t?null:li(t)},output:function(t){return t}},pi={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},gi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},yi={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},mi={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},bi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function _i(t){return{type:t}}function vi(){return!ue.ctrlKey&&!ue.button}function xi(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function ki(){return navigator.maxTouchPoints||"ontouchstart"in this}function wi(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Ti(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Ei(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function Ci(){return Mi(hi)}function Si(){return Mi(fi)}function Ai(){return Mi(di)}function Mi(t){var e,n=xi,r=vi,i=ki,a=!0,o=ft("start","brush","end"),s=6;function c(e){var n=e.property("__brush",g).selectAll(".overlay").data([_i("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",pi.overlay).merge(n).each((function(){var t=wi(this).extent;Te(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([_i("selection")]).enter().append("rect").attr("class","selection").attr("cursor",pi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return pi[t.type]})),e.each(l).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(i).on("touchstart.brush",f).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function l(){var t=Te(this),e=wi(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new h(t,e,n):r}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function f(){if((!e||ue.touches)&&r.apply(this,arguments)){var n,i,o,s,c,h,f,d,p,g,y,m=this,b=ue.target.__data__.type,_="selection"===(a&&ue.metaKey?b="overlay":b)?ii:a&&ue.altKey?si:oi,v=t===fi?null:mi[b],x=t===hi?null:bi[b],k=wi(m),w=k.extent,T=k.selection,E=w[0][0],C=w[0][1],S=w[1][0],A=w[1][1],M=0,N=0,D=v&&x&&a&&ue.shiftKey,L=ue.touches?ui(ue.changedTouches[0].identifier):On,O=L(m),B=O,I=u(m,arguments,!0).beforestart();"overlay"===b?(T&&(p=!0),k.selection=T=[[n=t===fi?E:O[0],o=t===hi?C:O[1]],[c=t===fi?S:n,f=t===hi?A:o]]):(n=T[0][0],o=T[0][1],c=T[1][0],f=T[1][1]),i=n,s=o,h=c,d=f;var F=Te(m).attr("pointer-events","none"),R=F.selectAll(".overlay").attr("cursor",pi[b]);if(ue.touches)I.moved=$,I.ended=Y;else{var P=Te(ue.view).on("mousemove.brush",$,!0).on("mouseup.brush",Y,!0);a&&P.on("keydown.brush",z,!0).on("keyup.brush",U,!0),Se(ue.view)}ni(),ar(m),l.call(m),I.start()}function $(){var t=L(m);!D||g||y||(Math.abs(t[0]-B[0])>Math.abs(t[1]-B[1])?y=!0:g=!0),B=t,p=!0,ri(),j()}function j(){var t;switch(M=B[0]-O[0],N=B[1]-O[1],_){case ai:case ii:v&&(M=Math.max(E-n,Math.min(S-c,M)),i=n+M,h=c+M),x&&(N=Math.max(C-o,Math.min(A-f,N)),s=o+N,d=f+N);break;case oi:v<0?(M=Math.max(E-n,Math.min(S-n,M)),i=n+M,h=c):v>0&&(M=Math.max(E-c,Math.min(S-c,M)),i=n,h=c+M),x<0?(N=Math.max(C-o,Math.min(A-o,N)),s=o+N,d=f):x>0&&(N=Math.max(C-f,Math.min(A-f,N)),s=o,d=f+N);break;case si:v&&(i=Math.max(E,Math.min(S,n-M*v)),h=Math.max(E,Math.min(S,c+M*v))),x&&(s=Math.max(C,Math.min(A,o-N*x)),d=Math.max(C,Math.min(A,f+N*x)))}h<i&&(v*=-1,t=n,n=c,c=t,t=i,i=h,h=t,b in gi&&R.attr("cursor",pi[b=gi[b]])),d<s&&(x*=-1,t=o,o=f,f=t,t=s,s=d,d=t,b in yi&&R.attr("cursor",pi[b=yi[b]])),k.selection&&(T=k.selection),g&&(i=T[0][0],h=T[1][0]),y&&(s=T[0][1],d=T[1][1]),T[0][0]===i&&T[0][1]===s&&T[1][0]===h&&T[1][1]===d||(k.selection=[[i,s],[h,d]],l.call(m),I.brush())}function Y(){if(ni(),ue.touches){if(ue.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else Ae(ue.view,p),P.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);F.attr("pointer-events","all"),R.attr("cursor",pi.overlay),k.selection&&(T=k.selection),Ti(T)&&(k.selection=null,l.call(m)),I.end()}function z(){switch(ue.keyCode){case 16:D=v&&x;break;case 18:_===oi&&(v&&(c=h-M*v,n=i+M*v),x&&(f=d-N*x,o=s+N*x),_=si,j());break;case 32:_!==oi&&_!==si||(v<0?c=h-M:v>0&&(n=i-M),x<0?f=d-N:x>0&&(o=s-N),_=ai,R.attr("cursor",pi.selection),j());break;default:return}ri()}function U(){switch(ue.keyCode){case 16:D&&(g=y=D=!1,j());break;case 18:_===si&&(v<0?c=h:v>0&&(n=i),x<0?f=d:x>0&&(o=s),_=oi,j());break;case 32:_===ai&&(ue.altKey?(v&&(c=h-M*v,n=i+M*v),x&&(f=d-N*x,o=s+N*x),_=si):(v<0?c=h:v>0&&(n=i),x<0?f=d:x>0&&(o=s),_=oi),R.attr("cursor",pi[b]),j());break;default:return}ri()}}function d(){u(this,arguments).moved()}function p(){u(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=li(n.apply(this,arguments)),e.dim=t,e}return c.move=function(e,n){e.selection?e.on("start.brush",(function(){u(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){u(this,arguments).end()})).tween("brush",(function(){var e=this,r=e.__brush,i=u(e,arguments),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=Mn(a,o);function c(t){r.selection=1===t&&null===o?null:s(t),l.call(e),i.brush()}return null!==a&&null!==o?c:c(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,a=t.input("function"==typeof n?n.apply(e,r):n,i.extent),o=u(e,r).beforestart();ar(e),i.selection=null===a?null:a,l.call(e),o.start().brush().end()}))},c.clear=function(t){c.move(t,null)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){ye(new ei(c,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},c.extent=function(t){return arguments.length?(n="function"==typeof t?t:ti(li(t)),c):n},c.filter=function(t){return arguments.length?(r="function"==typeof t?t:ti(!!t),c):r},c.touchable=function(t){return arguments.length?(i="function"==typeof t?t:ti(!!t),c):i},c.handleSize=function(t){return arguments.length?(s=+t,c):s},c.keyModifiers=function(t){return arguments.length?(a=!!t,c):a},c.on=function(){var t=o.on.apply(o,arguments);return t===o?c:t},c}var Ni=Math.cos,Di=Math.sin,Li=Math.PI,Oi=Li/2,Bi=2*Li,Ii=Math.max;function Fi(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function Ri(){var t=0,e=null,n=null,r=null;function i(i){var a,o,s,c,l,u,h=i.length,f=[],d=w(h),p=[],g=[],y=g.groups=new Array(h),m=new Array(h*h);for(a=0,l=-1;++l<h;){for(o=0,u=-1;++u<h;)o+=i[l][u];f.push(o),p.push(w(h)),a+=o}for(e&&d.sort((function(t,n){return e(f[t],f[n])})),n&&p.forEach((function(t,e){t.sort((function(t,r){return n(i[e][t],i[e][r])}))})),c=(a=Ii(0,Bi-t*h)/a)?t:Bi/h,o=0,l=-1;++l<h;){for(s=o,u=-1;++u<h;){var b=d[l],_=p[b][u],v=i[b][_],x=o,k=o+=v*a;m[_*h+b]={index:b,subindex:_,startAngle:x,endAngle:k,value:v}}y[b]={index:b,startAngle:s,endAngle:o,value:f[b]},o+=c}for(l=-1;++l<h;)for(u=l-1;++u<h;){var T=m[u*h+l],E=m[l*h+u];(T.value||E.value)&&g.push(T.value<E.value?{source:E,target:T}:{source:T,target:E})}return r?g.sort(r):g}return i.padAngle=function(e){return arguments.length?(t=Ii(0,e),i):t},i.sortGroups=function(t){return arguments.length?(e=t,i):e},i.sortSubgroups=function(t){return arguments.length?(n=t,i):n},i.sortChords=function(t){return arguments.length?(null==t?r=null:(r=Fi(t))._=t,i):r&&r._},i}var Pi=Array.prototype.slice;function $i(t){return function(){return t}}var ji=Math.PI,Yi=2*ji,zi=1e-6,Ui=Yi-zi;function qi(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Wi(){return new qi}qi.prototype=Wi.prototype={constructor:qi,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,c=r-e,l=a-t,u=o-e,h=l*l+u*u;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>zi)if(Math.abs(u*s-c*l)>zi&&i){var f=n-a,d=r-o,p=s*s+c*c,g=f*f+d*d,y=Math.sqrt(p),m=Math.sqrt(h),b=i*Math.tan((ji-Math.acos((p+h-g)/(2*y*m)))/2),_=b/m,v=b/y;Math.abs(_-1)>zi&&(this._+="L"+(t+_*l)+","+(e+_*u)),this._+="A"+i+","+i+",0,0,"+ +(u*f>l*d)+","+(this._x1=t+v*s)+","+(this._y1=e+v*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),c=t+o,l=e+s,u=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+l:(Math.abs(this._x1-c)>zi||Math.abs(this._y1-l)>zi)&&(this._+="L"+c+","+l),n&&(h<0&&(h=h%Yi+Yi),h>Ui?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=c)+","+(this._y1=l):h>zi&&(this._+="A"+n+","+n+",0,"+ +(h>=ji)+","+u+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const Hi=Wi;function Vi(t){return t.source}function Gi(t){return t.target}function Xi(t){return t.radius}function Zi(t){return t.startAngle}function Qi(t){return t.endAngle}function Ki(){var t=Vi,e=Gi,n=Xi,r=Zi,i=Qi,a=null;function o(){var o,s=Pi.call(arguments),c=t.apply(this,s),l=e.apply(this,s),u=+n.apply(this,(s[0]=c,s)),h=r.apply(this,s)-Oi,f=i.apply(this,s)-Oi,d=u*Ni(h),p=u*Di(h),g=+n.apply(this,(s[0]=l,s)),y=r.apply(this,s)-Oi,m=i.apply(this,s)-Oi;if(a||(a=o=Hi()),a.moveTo(d,p),a.arc(0,0,u,h,f),h===y&&f===m||(a.quadraticCurveTo(0,0,g*Ni(y),g*Di(y)),a.arc(0,0,g,y,m)),a.quadraticCurveTo(0,0,d,p),a.closePath(),o)return a=null,o+""||null}return o.radius=function(t){return arguments.length?(n="function"==typeof t?t:$i(+t),o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:$i(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:$i(+t),o):i},o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(t){return arguments.length?(e=t,o):e},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}var Ji="$";function ta(){}function ea(t,e){var n=new ta;if(t instanceof ta)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}ta.prototype=ea.prototype={constructor:ta,has:function(t){return Ji+t in this},get:function(t){return this[Ji+t]},set:function(t,e){return this[Ji+t]=e,this},remove:function(t){var e=Ji+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===Ji&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===Ji&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===Ji&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===Ji&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===Ji&&++t;return t},empty:function(){for(var t in this)if(t[0]===Ji)return!1;return!0},each:function(t){for(var e in this)e[0]===Ji&&t(this[e],e.slice(1),this)}};const na=ea;function ra(){var t,e,n,r=[],i=[];function a(n,i,o,s){if(i>=r.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var c,l,u,h=-1,f=n.length,d=r[i++],p=na(),g=o();++h<f;)(u=p.get(c=d(l=n[h])+""))?u.push(l):p.set(c,[l]);return p.each((function(t,e){s(g,e,a(t,i,o,s))})),g}function o(t,n){if(++n>r.length)return t;var a,s=i[n-1];return null!=e&&n>=r.length?a=t.entries():(a=[],t.each((function(t,e){a.push({key:e,values:o(t,n)})}))),null!=s?a.sort((function(t,e){return s(t.key,e.key)})):a}return n={object:function(t){return a(t,0,ia,aa)},map:function(t){return a(t,0,oa,sa)},entries:function(t){return o(a(t,0,oa,sa),0)},key:function(t){return r.push(t),n},sortKeys:function(t){return i[r.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}}function ia(){return{}}function aa(t,e,n){t[e]=n}function oa(){return na()}function sa(t,e,n){t.set(e,n)}function ca(){}var la=na.prototype;function ua(t,e){var n=new ca;if(t instanceof ca)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}ca.prototype=ua.prototype={constructor:ca,has:la.has,add:function(t){return this[Ji+(t+="")]=t,this},remove:la.remove,clear:la.clear,values:la.keys,size:la.size,empty:la.empty,each:la.each};const ha=ua;function fa(t){var e=[];for(var n in t)e.push(n);return e}function da(t){var e=[];for(var n in t)e.push(t[n]);return e}function pa(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e}var ga=Math.PI/180,ya=180/Math.PI,ma=.96422,ba=.82521,_a=4/29,va=6/29,xa=3*va*va;function ka(t){if(t instanceof Ea)return new Ea(t.l,t.a,t.b,t.opacity);if(t instanceof Oa)return Ba(t);t instanceof Ke||(t=Ze(t));var e,n,r=Ma(t.r),i=Ma(t.g),a=Ma(t.b),o=Ca((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=Ca((.4360747*r+.3850649*i+.1430804*a)/ma),n=Ca((.0139322*r+.0971045*i+.7141733*a)/ba)),new Ea(116*o-16,500*(e-o),200*(o-n),t.opacity)}function wa(t,e){return new Ea(t,0,0,null==e?1:e)}function Ta(t,e,n,r){return 1===arguments.length?ka(t):new Ea(t,e,n,null==r?1:r)}function Ea(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Ca(t){return t>.008856451679035631?Math.pow(t,1/3):t/xa+_a}function Sa(t){return t>va?t*t*t:xa*(t-_a)}function Aa(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ma(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Na(t){if(t instanceof Oa)return new Oa(t.h,t.c,t.l,t.opacity);if(t instanceof Ea||(t=ka(t)),0===t.a&&0===t.b)return new Oa(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*ya;return new Oa(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Da(t,e,n,r){return 1===arguments.length?Na(t):new Oa(n,e,t,null==r?1:r)}function La(t,e,n,r){return 1===arguments.length?Na(t):new Oa(t,e,n,null==r?1:r)}function Oa(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Ba(t){if(isNaN(t.h))return new Ea(t.l,0,0,t.opacity);var e=t.h*ga;return new Ea(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Me(Ea,Ta,Ne(De,{brighter:function(t){return new Ea(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Ea(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Ke(Aa(3.1338561*(e=ma*Sa(e))-1.6168667*(t=1*Sa(t))-.4906146*(n=ba*Sa(n))),Aa(-.9787684*e+1.9161415*t+.033454*n),Aa(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Me(Oa,La,Ne(De,{brighter:function(t){return new Oa(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Oa(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Ba(this).rgb()}}));var Ia=-.14861,Fa=1.78277,Ra=-.29227,Pa=-.90649,$a=1.97294,ja=$a*Pa,Ya=$a*Fa,za=Fa*Ra-Pa*Ia;function Ua(t){if(t instanceof Wa)return new Wa(t.h,t.s,t.l,t.opacity);t instanceof Ke||(t=Ze(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(za*r+ja*e-Ya*n)/(za+ja-Ya),a=r-i,o=($a*(n-i)-Ra*a)/Pa,s=Math.sqrt(o*o+a*a)/($a*i*(1-i)),c=s?Math.atan2(o,a)*ya-120:NaN;return new Wa(c<0?c+360:c,s,i,t.opacity)}function qa(t,e,n,r){return 1===arguments.length?Ua(t):new Wa(t,e,n,null==r?1:r)}function Wa(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Me(Wa,qa,Ne(De,{brighter:function(t){return t=null==t?Oe:Math.pow(Oe,t),new Wa(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Le:Math.pow(Le,t),new Wa(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*ga,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Ke(255*(e+n*(Ia*r+Fa*i)),255*(e+n*(Ra*r+Pa*i)),255*(e+n*($a*r)),this.opacity)}}));var Ha=Array.prototype.slice;function Va(t,e){return t-e}function Ga(t){return function(){return t}}function Xa(t,e){for(var n,r=-1,i=e.length;++r<i;)if(n=Za(t,e[r]))return n;return 0}function Za(t,e){for(var n=e[0],r=e[1],i=-1,a=0,o=t.length,s=o-1;a<o;s=a++){var c=t[a],l=c[0],u=c[1],h=t[s],f=h[0],d=h[1];if(Qa(c,h,e))return 0;u>r!=d>r&&n<(f-l)*(r-u)/(d-u)+l&&(i=-i)}return i}function Qa(t,e,n){var r,i,a,o;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],a=n[r],o=e[r],i<=a&&a<=o||o<=a&&a<=i)}function Ka(){}var Ja=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function to(){var t=1,e=1,n=N,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(Va);else{var r=m(t),i=r[0],o=r[1];e=M(i,o,e),e=w(Math.floor(i/e)*e,Math.floor(o/e)*e,e)}return e.map((function(e){return a(t,e)}))}function a(n,i){var a=[],s=[];return function(n,r,i){var a,s,c,l,u,h,f=new Array,d=new Array;for(a=s=-1,l=n[0]>=r,Ja[l<<1].forEach(p);++a<t-1;)c=l,l=n[a+1]>=r,Ja[c|l<<1].forEach(p);for(Ja[l<<0].forEach(p);++s<e-1;){for(a=-1,l=n[s*t+t]>=r,u=n[s*t]>=r,Ja[l<<1|u<<2].forEach(p);++a<t-1;)c=l,l=n[s*t+t+a+1]>=r,h=u,u=n[s*t+a+1]>=r,Ja[c|l<<1|u<<2|h<<3].forEach(p);Ja[l|u<<3].forEach(p)}for(a=-1,u=n[s*t]>=r,Ja[u<<2].forEach(p);++a<t-1;)h=u,u=n[s*t+a+1]>=r,Ja[u<<2|h<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+a,t[0][1]+s],c=[t[1][0]+a,t[1][1]+s],l=o(r),u=o(c);(e=d[l])?(n=f[u])?(delete d[e.end],delete f[n.start],e===n?(e.ring.push(c),i(e.ring)):f[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete d[e.end],e.ring.push(c),d[e.end=u]=e):(e=f[u])?(n=d[l])?(delete f[e.start],delete d[n.end],e===n?(e.ring.push(c),i(e.ring)):f[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete f[e.start],e.ring.unshift(r),f[e.start=l]=e):f[l]=d[u]={start:l,end:u,ring:[r,c]}}Ja[u<<3].forEach(p)}(n,i,(function(t){r(t,n,i),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?a.push([t]):s.push(t)})),s.forEach((function(t){for(var e,n=0,r=a.length;n<r;++n)if(-1!==Xa((e=a[n])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:i,coordinates:a}}function o(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,i){n.forEach((function(n){var a,o=n[0],s=n[1],c=0|o,l=0|s,u=r[l*t+c];o>0&&o<t&&c===o&&(a=r[l*t+c-1],n[0]=o+(i-a)/(u-a)-.5),s>0&&s<e&&l===s&&(a=r[(l-1)*t+c],n[1]=s+(i-a)/(u-a)-.5)}))}return i.contour=a,i.size=function(n){if(!arguments.length)return[t,e];var r=Math.ceil(n[0]),a=Math.ceil(n[1]);if(!(r>0&&a>0))throw new Error("invalid size");return t=r,e=a,i},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Ga(Ha.call(t)):Ga(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:Ka,i):r===s},i}function eo(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<i;++o)for(var s=0,c=0;s<r+n;++s)s<r&&(c+=t.data[s+o*r]),s>=n&&(s>=a&&(c-=t.data[s-a+o*r]),e.data[s-n+o*r]=c/Math.min(s+1,r-1+a-s,a))}function no(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<r;++o)for(var s=0,c=0;s<i+n;++s)s<i&&(c+=t.data[o+s*r]),s>=n&&(s>=a&&(c-=t.data[o+(s-a)*r]),e.data[o+(s-n)*r]=c/Math.min(s+1,i-1+a-s,a))}function ro(t){return t[0]}function io(t){return t[1]}function ao(){return 1}function oo(){var t=ro,e=io,n=ao,r=960,i=500,a=20,o=2,s=3*a,c=r+2*s>>o,l=i+2*s>>o,u=Ga(20);function h(r){var i=new Float32Array(c*l),h=new Float32Array(c*l);r.forEach((function(r,a,u){var h=+t(r,a,u)+s>>o,f=+e(r,a,u)+s>>o,d=+n(r,a,u);h>=0&&h<c&&f>=0&&f<l&&(i[h+f*c]+=d)})),eo({width:c,height:l,data:i},{width:c,height:l,data:h},a>>o),no({width:c,height:l,data:h},{width:c,height:l,data:i},a>>o),eo({width:c,height:l,data:i},{width:c,height:l,data:h},a>>o),no({width:c,height:l,data:h},{width:c,height:l,data:i},a>>o),eo({width:c,height:l,data:i},{width:c,height:l,data:h},a>>o),no({width:c,height:l,data:h},{width:c,height:l,data:i},a>>o);var d=u(i);if(!Array.isArray(d)){var p=I(i);d=M(0,p,d),(d=w(0,Math.floor(p/d)*d,d)).shift()}return to().thresholds(d).size([c,l])(i).map(f)}function f(t){return t.value*=Math.pow(2,-2*o),t.coordinates.forEach(d),t}function d(t){t.forEach(p)}function p(t){t.forEach(g)}function g(t){t[0]=t[0]*Math.pow(2,o)-s,t[1]=t[1]*Math.pow(2,o)-s}function y(){return c=r+2*(s=3*a)>>o,l=i+2*s>>o,h}return h.x=function(e){return arguments.length?(t="function"==typeof e?e:Ga(+e),h):t},h.y=function(t){return arguments.length?(e="function"==typeof t?t:Ga(+t),h):e},h.weight=function(t){return arguments.length?(n="function"==typeof t?t:Ga(+t),h):n},h.size=function(t){if(!arguments.length)return[r,i];var e=Math.ceil(t[0]),n=Math.ceil(t[1]);if(!(e>=0||e>=0))throw new Error("invalid size");return r=e,i=n,y()},h.cellSize=function(t){if(!arguments.length)return 1<<o;if(!((t=+t)>=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(t)/Math.LN2),y()},h.thresholds=function(t){return arguments.length?(u="function"==typeof t?t:Array.isArray(t)?Ga(Ha.call(t)):Ga(t),h):u},h.bandwidth=function(t){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return a=Math.round((Math.sqrt(4*t*t+1)-1)/2),y()},h}function so(t){return function(){return t}}function co(t,e,n,r,i,a,o,s,c,l){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=a,this.y=o,this.dx=s,this.dy=c,this._=l}function lo(){return!ue.ctrlKey&&!ue.button}function uo(){return this.parentNode}function ho(t){return null==t?{x:ue.x,y:ue.y}:t}function fo(){return navigator.maxTouchPoints||"ontouchstart"in this}function po(){var t,e,n,r,i=lo,a=uo,o=ho,s=fo,c={},l=ft("start","drag","end"),u=0,h=0;function f(t){t.on("mousedown.drag",d).filter(s).on("touchstart.drag",y).on("touchmove.drag",m).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(){if(!r&&i.apply(this,arguments)){var o=_("mouse",a.apply(this,arguments),On,this,arguments);o&&(Te(ue.view).on("mousemove.drag",p,!0).on("mouseup.drag",g,!0),Se(ue.view),Ee(),n=!1,t=ue.clientX,e=ue.clientY,o("start"))}}function p(){if(Ce(),!n){var r=ue.clientX-t,i=ue.clientY-e;n=r*r+i*i>h}c.mouse("drag")}function g(){Te(ue.view).on("mousemove.drag mouseup.drag",null),Ae(ue.view,n),Ce(),c.mouse("end")}function y(){if(i.apply(this,arguments)){var t,e,n=ue.changedTouches,r=a.apply(this,arguments),o=n.length;for(t=0;t<o;++t)(e=_(n[t].identifier,r,Ln,this,arguments))&&(Ee(),e("start"))}}function m(){var t,e,n=ue.changedTouches,r=n.length;for(t=0;t<r;++t)(e=c[n[t].identifier])&&(Ce(),e("drag"))}function b(){var t,e,n=ue.changedTouches,i=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(e=c[n[t].identifier])&&(Ee(),e("end"))}function _(t,e,n,r,i){var a,s,h,d=n(e,t),p=l.copy();if(ye(new co(f,"beforestart",a,t,u,d[0],d[1],0,0,p),(function(){return null!=(ue.subject=a=o.apply(r,i))&&(s=a.x-d[0]||0,h=a.y-d[1]||0,!0)})))return function o(l){var g,y=d;switch(l){case"start":c[t]=o,g=u++;break;case"end":delete c[t],--u;case"drag":d=n(e,t),g=u}ye(new co(f,l,a,t,g,d[0]+s,d[1]+h,d[0]-y[0],d[1]-y[1],p),p.apply,p,[l,r,i])}}return f.filter=function(t){return arguments.length?(i="function"==typeof t?t:so(!!t),f):i},f.container=function(t){return arguments.length?(a="function"==typeof t?t:so(t),f):a},f.subject=function(t){return arguments.length?(o="function"==typeof t?t:so(t),f):o},f.touchable=function(t){return arguments.length?(s="function"==typeof t?t:so(!!t),f):s},f.on=function(){var t=l.on.apply(l,arguments);return t===l?f:t},f.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,f):Math.sqrt(h)},f}co.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var go={},yo={};function mo(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function bo(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function _o(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function vo(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,s=0,c=a<=0,l=!1;function u(){if(c)return yo;if(l)return l=!1,go;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?c=!0:10===(r=t.charCodeAt(o++))?l=!0:13===r&&(l=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(r=t.charCodeAt(e=o++)))l=!0;else if(13===r)l=!0,10===t.charCodeAt(o)&&++o;else if(r!==n)continue;return t.slice(i,e)}return c=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=u())!==yo;){for(var h=[];r!==go&&r!==yo;)h.push(r),r=u();e&&null==(h=e(h,s++))||i.push(h)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?function(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":function(t){return t<0?"-"+_o(-t,6):t>9999?"+"+_o(t,6):_o(t,4)}(t.getUTCFullYear())+"-"+_o(t.getUTCMonth()+1,2)+"-"+_o(t.getUTCDate(),2)+(i?"T"+_o(e,2)+":"+_o(n,2)+":"+_o(r,2)+"."+_o(i,3)+"Z":r?"T"+_o(e,2)+":"+_o(n,2)+":"+_o(r,2)+"Z":n||e?"T"+_o(e,2)+":"+_o(n,2)+"Z":"")}(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=mo(t);return function(r,i){return e(n(r),i,t)}}(t,e):mo(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=bo(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=bo(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}var xo=vo(","),ko=xo.parse,wo=xo.parseRows,To=xo.format,Eo=xo.formatBody,Co=xo.formatRows,So=xo.formatRow,Ao=xo.formatValue,Mo=vo("\t"),No=Mo.parse,Do=Mo.parseRows,Lo=Mo.format,Oo=Mo.formatBody,Bo=Mo.formatRows,Io=Mo.formatRow,Fo=Mo.formatValue;function Ro(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;Po&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}var Po=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function $o(t){return+t}function jo(t){return t*t}function Yo(t){return t*(2-t)}function zo(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var Uo=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),qo=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),Wo=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Ho=Math.PI,Vo=Ho/2;function Go(t){return 1==+t?1:1-Math.cos(t*Vo)}function Xo(t){return Math.sin(t*Vo)}function Zo(t){return(1-Math.cos(Ho*t))/2}function Qo(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function Ko(t){return Qo(1-+t)}function Jo(t){return 1-Qo(t)}function ts(t){return((t*=2)<=1?Qo(1-t):2-Qo(t-1))/2}function es(t){return 1-Math.sqrt(1-t*t)}function ns(t){return Math.sqrt(1- --t*t)}function rs(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var is=7.5625;function as(t){return 1-os(1-t)}function os(t){return(t=+t)<.36363636363636365?is*t*t:t<.7272727272727273?is*(t-=.5454545454545454)*t+.75:t<.9090909090909091?is*(t-=.8181818181818182)*t+.9375:is*(t-=.9545454545454546)*t+.984375}function ss(t){return((t*=2)<=1?1-os(1-t):os(t-1)+1)/2}var cs=1.70158,ls=function t(e){function n(t){return(t=+t)*t*(e*(t-1)+t)}return e=+e,n.overshoot=t,n}(cs),us=function t(e){function n(t){return--t*t*((t+1)*e+t)+1}return e=+e,n.overshoot=t,n}(cs),hs=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(cs),fs=2*Math.PI,ds=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=fs);function i(t){return e*Qo(- --t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*fs)},i.period=function(n){return t(e,n)},i}(1,.3),ps=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=fs);function i(t){return 1-e*Qo(t=+t)*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*fs)},i.period=function(n){return t(e,n)},i}(1,.3),gs=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=fs);function i(t){return((t=2*t-1)<0?e*Qo(-t)*Math.sin((r-t)/n):2-e*Qo(t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*fs)},i.period=function(n){return t(e,n)},i}(1,.3);function ys(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function ms(t,e){return fetch(t,e).then(ys)}function bs(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function _s(t,e){return fetch(t,e).then(bs)}function vs(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function xs(t,e){return fetch(t,e).then(vs)}function ks(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),xs(e,n).then((function(e){return t(e,r)}))}}function ws(t,e,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=vo(t);return xs(e,n).then((function(t){return i.parse(t,r)}))}var Ts=ks(ko),Es=ks(No);function Cs(t,e){return new Promise((function(n,r){var i=new Image;for(var a in e)i[a]=e[a];i.onerror=r,i.onload=function(){n(i)},i.src=t}))}function Ss(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function As(t,e){return fetch(t,e).then(Ss)}function Ms(t){return function(e,n){return xs(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}const Ns=Ms("application/xml");var Ds=Ms("text/html"),Ls=Ms("image/svg+xml");function Os(t,e){var n;function r(){var r,i,a=n.length,o=0,s=0;for(r=0;r<a;++r)o+=(i=n[r]).x,s+=i.y;for(o=o/a-t,s=s/a-e,r=0;r<a;++r)(i=n[r]).x-=o,i.y-=s}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r}function Bs(t){return function(){return t}}function Is(){return 1e-6*(Math.random()-.5)}function Fs(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,s,c,l,u,h,f,d=t._root,p={data:r},g=t._x0,y=t._y0,m=t._x1,b=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((l=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+b)/2))?y=o:b=o,i=d,!(d=d[h=u<<1|l]))return i[h]=p,t;if(s=+t._x.call(null,d.data),c=+t._y.call(null,d.data),e===s&&n===c)return p.next=d,i?i[h]=p:t._root=p,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(l=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+b)/2))?y=o:b=o}while((h=u<<1|l)==(f=(c>=o)<<1|s>=a));return i[f]=d,i[h]=p,t}function Rs(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function Ps(t){return t[0]}function $s(t){return t[1]}function js(t,e,n){var r=new Ys(null==e?Ps:e,null==n?$s:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Ys(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function zs(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Us=js.prototype=Ys.prototype;function qs(t){return t.x+t.vx}function Ws(t){return t.y+t.vy}function Hs(t){var e,n,r=1,i=1;function a(){for(var t,a,s,c,l,u,h,f=e.length,d=0;d<i;++d)for(a=js(e,qs,Ws).visitAfter(o),t=0;t<f;++t)s=e[t],u=n[s.index],h=u*u,c=s.x+s.vx,l=s.y+s.vy,a.visit(p);function p(t,e,n,i,a){var o=t.data,f=t.r,d=u+f;if(!o)return e>c+d||i<c-d||n>l+d||a<l-d;if(o.index>s.index){var p=c-o.x-o.vx,g=l-o.y-o.vy,y=p*p+g*g;y<d*d&&(0===p&&(y+=(p=Is())*p),0===g&&(y+=(g=Is())*g),y=(d-(y=Math.sqrt(y)))/y*r,s.vx+=(p*=y)*(d=(f*=f)/(h+f)),s.vy+=(g*=y)*d,o.vx-=p*(d=1-d),o.vy-=g*d)}}}function o(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function s(){if(e){var r,i,a=e.length;for(n=new Array(a),r=0;r<a;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=Bs(null==t?1:+t)),a.initialize=function(t){e=t,s()},a.iterations=function(t){return arguments.length?(i=+t,a):i},a.strength=function(t){return arguments.length?(r=+t,a):r},a.radius=function(e){return arguments.length?(t="function"==typeof e?e:Bs(+e),s(),a):t},a}function Vs(t){return t.index}function Gs(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function Xs(t){var e,n,r,i,a,o=Vs,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},c=Bs(30),l=1;function u(r){for(var i=0,o=t.length;i<l;++i)for(var s,c,u,h,f,d,p,g=0;g<o;++g)c=(s=t[g]).source,h=(u=s.target).x+u.vx-c.x-c.vx||Is(),f=u.y+u.vy-c.y-c.vy||Is(),h*=d=((d=Math.sqrt(h*h+f*f))-n[g])/d*r*e[g],f*=d,u.vx-=h*(p=a[g]),u.vy-=f*p,c.vx+=h*(p=1-p),c.vy+=f*p}function h(){if(r){var s,c,l=r.length,u=t.length,h=na(r,o);for(s=0,i=new Array(l);s<u;++s)(c=t[s]).index=s,"object"!=typeof c.source&&(c.source=Gs(h,c.source)),"object"!=typeof c.target&&(c.target=Gs(h,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(s=0,a=new Array(u);s<u;++s)c=t[s],a[s]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);e=new Array(u),f(),n=new Array(u),d()}}function f(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+s(t[n],n,t)}function d(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+c(t[e],e,t)}return null==t&&(t=[]),u.initialize=function(t){r=t,h()},u.links=function(e){return arguments.length?(t=e,h(),u):t},u.id=function(t){return arguments.length?(o=t,u):o},u.iterations=function(t){return arguments.length?(l=+t,u):l},u.strength=function(t){return arguments.length?(s="function"==typeof t?t:Bs(+t),f(),u):s},u.distance=function(t){return arguments.length?(c="function"==typeof t?t:Bs(+t),d(),u):c},u}function Zs(t){return t.x}function Qs(t){return t.y}Us.copy=function(){var t,e,n=new Ys(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=zs(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=zs(e));return n},Us.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Fs(this.cover(e,n),e,n,t)},Us.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),s=new Array(a),c=1/0,l=1/0,u=-1/0,h=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(o[n]=r,s[n]=i,r<c&&(c=r),r>u&&(u=r),i<l&&(l=i),i>h&&(h=i));if(c>u||l>h)return this;for(this.cover(c,l).cover(u,h),n=0;n<a;++n)Fs(this,o[n],s[n],t[n]);return this},Us.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,c=i-n,l=this._root;n>t||t>=i||r>e||e>=a;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=l,l=o,c*=2,s){case 0:i=n+c,a=r+c;break;case 1:n=i-c,a=r+c;break;case 2:i=n+c,r=a-c;break;case 3:n=i-c,r=a-c}this._root&&this._root.length&&(this._root=l)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},Us.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},Us.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Us.find=function(t,e,n){var r,i,a,o,s,c,l,u=this._x0,h=this._y0,f=this._x1,d=this._y1,p=[],g=this._root;for(g&&p.push(new Rs(g,u,h,f,d)),null==n?n=1/0:(u=t-n,h=e-n,f=t+n,d=e+n,n*=n);c=p.pop();)if(!(!(g=c.node)||(i=c.x0)>f||(a=c.y0)>d||(o=c.x1)<u||(s=c.y1)<h))if(g.length){var y=(i+o)/2,m=(a+s)/2;p.push(new Rs(g[3],y,m,o,s),new Rs(g[2],i,m,y,s),new Rs(g[1],y,a,o,m),new Rs(g[0],i,a,y,m)),(l=(e>=m)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-l],p[p.length-1-l]=c)}else{var b=t-+this._x.call(null,g.data),_=e-+this._y.call(null,g.data),v=b*b+_*_;if(v<n){var x=Math.sqrt(n=v);u=t-x,h=e-x,f=t+x,d=e+x,r=g.data}}return r},Us.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,s,c,l,u,h,f,d=this._root,p=this._x0,g=this._y0,y=this._x1,m=this._y1;if(!d)return this;if(d.length)for(;;){if((l=a>=(s=(p+y)/2))?p=s:y=s,(u=o>=(c=(g+m)/2))?g=c:m=c,e=d,!(d=d[h=u<<1|l]))return this;if(!d.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,f=h)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[h]=i:delete e[h],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[f]=d:this._root=d),this):(this._root=i,this)},Us.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Us.root=function(){return this._root},Us.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},Us.visit=function(t){var e,n,r,i,a,o,s=[],c=this._root;for(c&&s.push(new Rs(c,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(c=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&c.length){var l=(r+a)/2,u=(i+o)/2;(n=c[3])&&s.push(new Rs(n,l,u,a,o)),(n=c[2])&&s.push(new Rs(n,r,u,l,o)),(n=c[1])&&s.push(new Rs(n,l,i,a,u)),(n=c[0])&&s.push(new Rs(n,r,i,l,u))}return this},Us.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new Rs(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,s=e.y0,c=e.x1,l=e.y1,u=(o+c)/2,h=(s+l)/2;(a=i[0])&&n.push(new Rs(a,o,s,u,h)),(a=i[1])&&n.push(new Rs(a,u,s,c,h)),(a=i[2])&&n.push(new Rs(a,o,h,u,l)),(a=i[3])&&n.push(new Rs(a,u,h,c,l))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},Us.x=function(t){return arguments.length?(this._x=t,this):this._x},Us.y=function(t){return arguments.length?(this._y=t,this):this._y};var Ks=Math.PI*(3-Math.sqrt(5));function Js(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=na(),c=Vn(u),l=ft("tick","end");function u(){h(),l.call("tick",e),n<r&&(c.stop(),l.call("end",e))}function h(r){var c,l,u=t.length;void 0===r&&(r=1);for(var h=0;h<r;++h)for(n+=(a-n)*i,s.each((function(t){t(n)})),c=0;c<u;++c)null==(l=t[c]).fx?l.x+=l.vx*=o:(l.x=l.fx,l.vx=0),null==l.fy?l.y+=l.vy*=o:(l.y=l.fy,l.vy=0);return e}function f(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(n),a=n*Ks;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function d(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),f(),e={tick:h,restart:function(){return c.restart(u),e},stop:function(){return c.stop(),e},nodes:function(n){return arguments.length?(t=n,f(),s.each(d),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(a=+t,e):a},velocityDecay:function(t){return arguments.length?(o=1-t,e):1-o},force:function(t,n){return arguments.length>1?(null==n?s.remove(t):s.set(t,d(n)),e):s.get(t)},find:function(e,n,r){var i,a,o,s,c,l=0,u=t.length;for(null==r?r=1/0:r*=r,l=0;l<u;++l)(o=(i=e-(s=t[l]).x)*i+(a=n-s.y)*a)<r&&(c=s,r=o);return c},on:function(t,n){return arguments.length>1?(l.on(t,n),e):l.on(t)}}}function tc(){var t,e,n,r,i=Bs(-30),a=1,o=1/0,s=.81;function c(r){var i,a=t.length,o=js(t,Zs,Qs).visitAfter(u);for(n=r,i=0;i<a;++i)e=t[i],o.visit(h)}function l(){if(t){var e,n,a=t.length;for(r=new Array(a),e=0;e<a;++e)n=t[e],r[n.index]=+i(n,e,t)}}function u(t){var e,n,i,a,o,s=0,c=0;if(t.length){for(i=a=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(s+=e.value,c+=n,i+=n*e.x,a+=n*e.y);t.x=i/c,t.y=a/c}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=r[e.data.index]}while(e=e.next)}t.value=s}function h(t,i,c,l){if(!t.value)return!0;var u=t.x-e.x,h=t.y-e.y,f=l-i,d=u*u+h*h;if(f*f/s<d)return d<o&&(0===u&&(d+=(u=Is())*u),0===h&&(d+=(h=Is())*h),d<a&&(d=Math.sqrt(a*d)),e.vx+=u*t.value*n/d,e.vy+=h*t.value*n/d),!0;if(!(t.length||d>=o)){(t.data!==e||t.next)&&(0===u&&(d+=(u=Is())*u),0===h&&(d+=(h=Is())*h),d<a&&(d=Math.sqrt(a*d)));do{t.data!==e&&(f=r[t.data.index]*n/d,e.vx+=u*f,e.vy+=h*f)}while(t=t.next)}}return c.initialize=function(e){t=e,l()},c.strength=function(t){return arguments.length?(i="function"==typeof t?t:Bs(+t),l(),c):i},c.distanceMin=function(t){return arguments.length?(a=t*t,c):Math.sqrt(a)},c.distanceMax=function(t){return arguments.length?(o=t*t,c):Math.sqrt(o)},c.theta=function(t){return arguments.length?(s=t*t,c):Math.sqrt(s)},c}function ec(t,e,n){var r,i,a,o=Bs(.1);function s(t){for(var o=0,s=r.length;o<s;++o){var c=r[o],l=c.x-e||1e-6,u=c.y-n||1e-6,h=Math.sqrt(l*l+u*u),f=(a[o]-h)*i[o]*t/h;c.vx+=l*f,c.vy+=u*f}}function c(){if(r){var e,n=r.length;for(i=new Array(n),a=new Array(n),e=0;e<n;++e)a[e]=+t(r[e],e,r),i[e]=isNaN(a[e])?0:+o(r[e],e,r)}}return"function"!=typeof t&&(t=Bs(+t)),null==e&&(e=0),null==n&&(n=0),s.initialize=function(t){r=t,c()},s.strength=function(t){return arguments.length?(o="function"==typeof t?t:Bs(+t),c(),s):o},s.radius=function(e){return arguments.length?(t="function"==typeof e?e:Bs(+e),c(),s):t},s.x=function(t){return arguments.length?(e=+t,s):e},s.y=function(t){return arguments.length?(n=+t,s):n},s}function nc(t){var e,n,r,i=Bs(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vx+=(r[a]-i.x)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=Bs(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:Bs(+t),o(),a):i},a.x=function(e){return arguments.length?(t="function"==typeof e?e:Bs(+e),o(),a):t},a}function rc(t){var e,n,r,i=Bs(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vy+=(r[a]-i.y)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=Bs(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:Bs(+t),o(),a):i},a.y=function(e){return arguments.length?(t="function"==typeof e?e:Bs(+e),o(),a):t},a}function ic(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function ac(t){return(t=ic(Math.abs(t)))?t[1]:NaN}var oc,sc=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function cc(t){if(!(e=sc.exec(t)))throw new Error("invalid format: "+t);var e;return new lc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function lc(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function uc(t,e){var n=ic(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}cc.prototype=lc.prototype,lc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const hc={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return uc(100*t,e)},r:uc,s:function(t,e){var n=ic(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(oc=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+ic(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function fc(t){return t}var dc,pc,gc,yc=Array.prototype.map,mc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function bc(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?fc:(e=yc.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(t.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?fc:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(yc.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"-":t.minus+"",u=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=cc(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,y=t.precision,m=t.trim,b=t.type;"n"===b?(g=!0,b="g"):hc[b]||(void 0===y&&(y=12),m=!0,b="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var _="$"===f?i:"#"===f&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",v="$"===f?a:/[%p]/.test(b)?c:"",x=hc[b],k=/[defgprs%]/.test(b);function w(t){var i,a,c,f=_,w=v;if("c"===b)w=x(t)+w,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?u:x(Math.abs(t),y),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==h&&(T=!1),f=(T?"("===h?h:l:"-"===h||"("===h?"":h)+f,w=("s"===b?mc[8+oc/3]:"")+w+(T&&"("===h?")":""),k)for(i=-1,a=t.length;++i<a;)if(48>(c=t.charCodeAt(i))||c>57){w=(46===c?o+t.slice(i+1):t.slice(i))+w,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var E=f.length+t.length+w.length,C=E<p?new Array(p-E+1).join(e):"";switch(g&&d&&(t=r(C+t,C.length?p-w.length:1/0),C=""),n){case"<":t=f+t+w+C;break;case"=":t=f+C+t+w;break;case"^":t=C.slice(0,E=C.length>>1)+f+t+w+C.slice(E);break;default:t=C+f+t+w}return s(t)}return y=void 0===y?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),w.toString=function(){return t+""},w}return{format:h,formatPrefix:function(t,e){var n=h(((t=cc(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(ac(e)/3))),i=Math.pow(10,-r),a=mc[8+r/3];return function(t){return n(i*t)+a}}}}function _c(t){return dc=bc(t),pc=dc.format,gc=dc.formatPrefix,dc}function vc(t){return Math.max(0,-ac(Math.abs(t)))}function xc(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ac(e)/3)))-ac(Math.abs(t)))}function kc(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ac(e)-ac(t))+1}function wc(){return new Tc}function Tc(){this.reset()}_c({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Tc.prototype={constructor:Tc,reset:function(){this.s=this.t=0},add:function(t){Cc(Ec,t,this.t),Cc(this,Ec.s,this.s),this.s?this.t+=Ec.t:this.s=Ec.t},valueOf:function(){return this.s}};var Ec=new Tc;function Cc(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var Sc=1e-6,Ac=1e-12,Mc=Math.PI,Nc=Mc/2,Dc=Mc/4,Lc=2*Mc,Oc=180/Mc,Bc=Mc/180,Ic=Math.abs,Fc=Math.atan,Rc=Math.atan2,Pc=Math.cos,$c=Math.ceil,jc=Math.exp,Yc=(Math.floor,Math.log),zc=Math.pow,Uc=Math.sin,qc=Math.sign||function(t){return t>0?1:t<0?-1:0},Wc=Math.sqrt,Hc=Math.tan;function Vc(t){return t>1?0:t<-1?Mc:Math.acos(t)}function Gc(t){return t>1?Nc:t<-1?-Nc:Math.asin(t)}function Xc(t){return(t=Uc(t/2))*t}function Zc(){}function Qc(t,e){t&&Jc.hasOwnProperty(t.type)&&Jc[t.type](t,e)}var Kc={Feature:function(t,e){Qc(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Qc(n[r].geometry,e)}},Jc={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){tl(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)tl(n[r],e,0)},Polygon:function(t,e){el(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)el(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Qc(n[r],e)}};function tl(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function el(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)tl(t[n],e,1);e.polygonEnd()}function nl(t,e){t&&Kc.hasOwnProperty(t.type)?Kc[t.type](t,e):Qc(t,e)}var rl,il,al,ol,sl,cl=wc(),ll=wc(),ul={point:Zc,lineStart:Zc,lineEnd:Zc,polygonStart:function(){cl.reset(),ul.lineStart=hl,ul.lineEnd=fl},polygonEnd:function(){var t=+cl;ll.add(t<0?Lc+t:t),this.lineStart=this.lineEnd=this.point=Zc},sphere:function(){ll.add(Lc)}};function hl(){ul.point=dl}function fl(){pl(rl,il)}function dl(t,e){ul.point=pl,rl=t,il=e,al=t*=Bc,ol=Pc(e=(e*=Bc)/2+Dc),sl=Uc(e)}function pl(t,e){var n=(t*=Bc)-al,r=n>=0?1:-1,i=r*n,a=Pc(e=(e*=Bc)/2+Dc),o=Uc(e),s=sl*o,c=ol*a+s*Pc(i),l=s*r*Uc(i);cl.add(Rc(l,c)),al=t,ol=a,sl=o}function gl(t){return ll.reset(),nl(t,ul),2*ll}function yl(t){return[Rc(t[1],t[0]),Gc(t[2])]}function ml(t){var e=t[0],n=t[1],r=Pc(n);return[r*Pc(e),r*Uc(e),Uc(n)]}function bl(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function _l(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function vl(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function xl(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function kl(t){var e=Wc(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var wl,Tl,El,Cl,Sl,Al,Ml,Nl,Dl,Ll,Ol,Bl,Il,Fl,Rl,Pl,$l,jl,Yl,zl,Ul,ql,Wl,Hl,Vl,Gl,Xl=wc(),Zl={point:Ql,lineStart:Jl,lineEnd:tu,polygonStart:function(){Zl.point=eu,Zl.lineStart=nu,Zl.lineEnd=ru,Xl.reset(),ul.polygonStart()},polygonEnd:function(){ul.polygonEnd(),Zl.point=Ql,Zl.lineStart=Jl,Zl.lineEnd=tu,cl<0?(wl=-(El=180),Tl=-(Cl=90)):Xl>Sc?Cl=90:Xl<-1e-6&&(Tl=-90),Ll[0]=wl,Ll[1]=El},sphere:function(){wl=-(El=180),Tl=-(Cl=90)}};function Ql(t,e){Dl.push(Ll=[wl=t,El=t]),e<Tl&&(Tl=e),e>Cl&&(Cl=e)}function Kl(t,e){var n=ml([t*Bc,e*Bc]);if(Nl){var r=_l(Nl,n),i=_l([r[1],-r[0],0],r);kl(i),i=yl(i);var a,o=t-Sl,s=o>0?1:-1,c=i[0]*Oc*s,l=Ic(o)>180;l^(s*Sl<c&&c<s*t)?(a=i[1]*Oc)>Cl&&(Cl=a):l^(s*Sl<(c=(c+360)%360-180)&&c<s*t)?(a=-i[1]*Oc)<Tl&&(Tl=a):(e<Tl&&(Tl=e),e>Cl&&(Cl=e)),l?t<Sl?iu(wl,t)>iu(wl,El)&&(El=t):iu(t,El)>iu(wl,El)&&(wl=t):El>=wl?(t<wl&&(wl=t),t>El&&(El=t)):t>Sl?iu(wl,t)>iu(wl,El)&&(El=t):iu(t,El)>iu(wl,El)&&(wl=t)}else Dl.push(Ll=[wl=t,El=t]);e<Tl&&(Tl=e),e>Cl&&(Cl=e),Nl=n,Sl=t}function Jl(){Zl.point=Kl}function tu(){Ll[0]=wl,Ll[1]=El,Zl.point=Ql,Nl=null}function eu(t,e){if(Nl){var n=t-Sl;Xl.add(Ic(n)>180?n+(n>0?360:-360):n)}else Al=t,Ml=e;ul.point(t,e),Kl(t,e)}function nu(){ul.lineStart()}function ru(){eu(Al,Ml),ul.lineEnd(),Ic(Xl)>Sc&&(wl=-(El=180)),Ll[0]=wl,Ll[1]=El,Nl=null}function iu(t,e){return(e-=t)<0?e+360:e}function au(t,e){return t[0]-e[0]}function ou(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function su(t){var e,n,r,i,a,o,s;if(Cl=El=-(wl=Tl=1/0),Dl=[],nl(t,Zl),n=Dl.length){for(Dl.sort(au),e=1,a=[r=Dl[0]];e<n;++e)ou(r,(i=Dl[e])[0])||ou(r,i[1])?(iu(r[0],i[1])>iu(r[0],r[1])&&(r[1]=i[1]),iu(i[0],r[1])>iu(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,e=0,r=a[n=a.length-1];e<=n;r=i,++e)i=a[e],(s=iu(r[1],i[0]))>o&&(o=s,wl=i[0],El=r[1])}return Dl=Ll=null,wl===1/0||Tl===1/0?[[NaN,NaN],[NaN,NaN]]:[[wl,Tl],[El,Cl]]}var cu={sphere:Zc,point:lu,lineStart:hu,lineEnd:pu,polygonStart:function(){cu.lineStart=gu,cu.lineEnd=yu},polygonEnd:function(){cu.lineStart=hu,cu.lineEnd=pu}};function lu(t,e){t*=Bc;var n=Pc(e*=Bc);uu(n*Pc(t),n*Uc(t),Uc(e))}function uu(t,e,n){++Ol,Il+=(t-Il)/Ol,Fl+=(e-Fl)/Ol,Rl+=(n-Rl)/Ol}function hu(){cu.point=fu}function fu(t,e){t*=Bc;var n=Pc(e*=Bc);Hl=n*Pc(t),Vl=n*Uc(t),Gl=Uc(e),cu.point=du,uu(Hl,Vl,Gl)}function du(t,e){t*=Bc;var n=Pc(e*=Bc),r=n*Pc(t),i=n*Uc(t),a=Uc(e),o=Rc(Wc((o=Vl*a-Gl*i)*o+(o=Gl*r-Hl*a)*o+(o=Hl*i-Vl*r)*o),Hl*r+Vl*i+Gl*a);Bl+=o,Pl+=o*(Hl+(Hl=r)),$l+=o*(Vl+(Vl=i)),jl+=o*(Gl+(Gl=a)),uu(Hl,Vl,Gl)}function pu(){cu.point=lu}function gu(){cu.point=mu}function yu(){bu(ql,Wl),cu.point=lu}function mu(t,e){ql=t,Wl=e,t*=Bc,e*=Bc,cu.point=bu;var n=Pc(e);Hl=n*Pc(t),Vl=n*Uc(t),Gl=Uc(e),uu(Hl,Vl,Gl)}function bu(t,e){t*=Bc;var n=Pc(e*=Bc),r=n*Pc(t),i=n*Uc(t),a=Uc(e),o=Vl*a-Gl*i,s=Gl*r-Hl*a,c=Hl*i-Vl*r,l=Wc(o*o+s*s+c*c),u=Gc(l),h=l&&-u/l;Yl+=h*o,zl+=h*s,Ul+=h*c,Bl+=u,Pl+=u*(Hl+(Hl=r)),$l+=u*(Vl+(Vl=i)),jl+=u*(Gl+(Gl=a)),uu(Hl,Vl,Gl)}function _u(t){Ol=Bl=Il=Fl=Rl=Pl=$l=jl=Yl=zl=Ul=0,nl(t,cu);var e=Yl,n=zl,r=Ul,i=e*e+n*n+r*r;return i<Ac&&(e=Pl,n=$l,r=jl,Bl<Sc&&(e=Il,n=Fl,r=Rl),(i=e*e+n*n+r*r)<Ac)?[NaN,NaN]:[Rc(n,e)*Oc,Gc(r/Wc(i))*Oc]}function vu(t){return function(){return t}}function xu(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function ku(t,e){return[Ic(t)>Mc?t+Math.round(-t/Lc)*Lc:t,e]}function wu(t,e,n){return(t%=Lc)?e||n?xu(Eu(t),Cu(e,n)):Eu(t):e||n?Cu(e,n):ku}function Tu(t){return function(e,n){return[(e+=t)>Mc?e-Lc:e<-Mc?e+Lc:e,n]}}function Eu(t){var e=Tu(t);return e.invert=Tu(-t),e}function Cu(t,e){var n=Pc(t),r=Uc(t),i=Pc(e),a=Uc(e);function o(t,e){var o=Pc(e),s=Pc(t)*o,c=Uc(t)*o,l=Uc(e),u=l*n+s*r;return[Rc(c*i-u*a,s*n-l*r),Gc(u*i+c*a)]}return o.invert=function(t,e){var o=Pc(e),s=Pc(t)*o,c=Uc(t)*o,l=Uc(e),u=l*i-c*a;return[Rc(c*i+l*a,s*n+u*r),Gc(u*n-s*r)]},o}function Su(t){function e(e){return(e=t(e[0]*Bc,e[1]*Bc))[0]*=Oc,e[1]*=Oc,e}return t=wu(t[0]*Bc,t[1]*Bc,t.length>2?t[2]*Bc:0),e.invert=function(e){return(e=t.invert(e[0]*Bc,e[1]*Bc))[0]*=Oc,e[1]*=Oc,e},e}function Au(t,e,n,r,i,a){if(n){var o=Pc(e),s=Uc(e),c=r*n;null==i?(i=e+r*Lc,a=e-c/2):(i=Mu(o,i),a=Mu(o,a),(r>0?i<a:i>a)&&(i+=r*Lc));for(var l,u=i;r>0?u>a:u<a;u-=c)l=yl([o,-s*Pc(u),-s*Uc(u)]),t.point(l[0],l[1])}}function Mu(t,e){(e=ml(e))[0]-=t,kl(e);var n=Vc(-e[1]);return((-e[2]<0?-n:n)+Lc-Sc)%Lc}function Nu(){var t,e,n=vu([0,0]),r=vu(90),i=vu(6),a={point:function(n,r){t.push(n=e(n,r)),n[0]*=Oc,n[1]*=Oc}};function o(){var o=n.apply(this,arguments),s=r.apply(this,arguments)*Bc,c=i.apply(this,arguments)*Bc;return t=[],e=wu(-o[0]*Bc,-o[1]*Bc,0).invert,Au(a,s,c,1),o={type:"Polygon",coordinates:[t]},t=e=null,o}return o.center=function(t){return arguments.length?(n="function"==typeof t?t:vu([+t[0],+t[1]]),o):n},o.radius=function(t){return arguments.length?(r="function"==typeof t?t:vu(+t),o):r},o.precision=function(t){return arguments.length?(i="function"==typeof t?t:vu(+t),o):i},o}function Du(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:Zc,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Lu(t,e){return Ic(t[0]-e[0])<Sc&&Ic(t[1]-e[1])<Sc}function Ou(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Bu(t,e,n,r,i){var a,o,s=[],c=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(Lu(r,o)){if(!r[2]&&!o[2]){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);return void i.lineEnd()}o[0]+=2e-6}s.push(n=new Ou(r,t,null,!0)),c.push(n.o=new Ou(r,null,n,!1)),s.push(n=new Ou(o,t,null,!1)),c.push(n.o=new Ou(o,null,n,!0))}})),s.length){for(c.sort(e),Iu(s),Iu(c),a=0,o=c.length;a<o;++a)c[a].e=n=!n;for(var l,u,h=s[0];;){for(var f=h,d=!0;f.v;)if((f=f.n)===h)return;l=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(a=0,o=l.length;a<o;++a)i.point((u=l[a])[0],u[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(d)for(l=f.p.z,a=l.length-1;a>=0;--a)i.point((u=l[a])[0],u[1]);else r(f.x,f.p.x,-1,i);f=f.p}l=(f=f.o).z,d=!d}while(!f.v);i.lineEnd()}}}function Iu(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}ku.invert=ku;var Fu=wc();function Ru(t){return Ic(t[0])<=Mc?t[0]:qc(t[0])*((Ic(t[0])+Mc)%Lc-Mc)}function Pu(t,e){var n=Ru(e),r=e[1],i=Uc(r),a=[Uc(n),-Pc(n),0],o=0,s=0;Fu.reset(),1===i?r=Nc+Sc:-1===i&&(r=-Nc-Sc);for(var c=0,l=t.length;c<l;++c)if(h=(u=t[c]).length)for(var u,h,f=u[h-1],d=Ru(f),p=f[1]/2+Dc,g=Uc(p),y=Pc(p),m=0;m<h;++m,d=_,g=x,y=k,f=b){var b=u[m],_=Ru(b),v=b[1]/2+Dc,x=Uc(v),k=Pc(v),w=_-d,T=w>=0?1:-1,E=T*w,C=E>Mc,S=g*x;if(Fu.add(Rc(S*T*Uc(E),y*k+S*Pc(E))),o+=C?w+T*Lc:w,C^d>=n^_>=n){var A=_l(ml(f),ml(b));kl(A);var M=_l(a,A);kl(M);var N=(C^w>=0?-1:1)*Gc(M[2]);(r>N||r===N&&(A[0]||A[1]))&&(s+=C^w>=0?1:-1)}}return(o<-1e-6||o<Sc&&Fu<-1e-6)^1&s}function $u(t,e,n,r){return function(i){var a,o,s,c=e(i),l=Du(),u=e(l),h=!1,f={point:d,lineStart:g,lineEnd:y,polygonStart:function(){f.point=m,f.lineStart=b,f.lineEnd=_,o=[],a=[]},polygonEnd:function(){f.point=d,f.lineStart=g,f.lineEnd=y,o=P(o);var t=Pu(a,r);o.length?(h||(i.polygonStart(),h=!0),Bu(o,Yu,t,n,i)):t&&(h||(i.polygonStart(),h=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),h&&(i.polygonEnd(),h=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(e,n){t(e,n)&&i.point(e,n)}function p(t,e){c.point(t,e)}function g(){f.point=p,c.lineStart()}function y(){f.point=d,c.lineEnd()}function m(t,e){s.push([t,e]),u.point(t,e)}function b(){u.lineStart(),s=[]}function _(){m(s[0][0],s[0][1]),u.lineEnd();var t,e,n,r,c=u.clean(),f=l.result(),d=f.length;if(s.pop(),a.push(s),s=null,d)if(1&c){if((e=(n=f[0]).length-1)>0){for(h||(i.polygonStart(),h=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else d>1&&2&c&&f.push(f.pop().concat(f.shift())),o.push(f.filter(ju))}return f}}function ju(t){return t.length>1}function Yu(t,e){return((t=t.x)[0]<0?t[1]-Nc-Sc:Nc-t[1])-((e=e.x)[0]<0?e[1]-Nc-Sc:Nc-e[1])}const zu=$u((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?Mc:-Mc,c=Ic(a-n);Ic(c-Mc)<Sc?(t.point(n,r=(r+o)/2>0?Nc:-Nc),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(a,r),e=0):i!==s&&c>=Mc&&(Ic(n-i)<Sc&&(n-=i*Sc),Ic(a-s)<Sc&&(a-=s*Sc),r=function(t,e,n,r){var i,a,o=Uc(t-n);return Ic(o)>Sc?Fc((Uc(e)*(a=Pc(r))*Uc(n)-Uc(r)*(i=Pc(e))*Uc(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=a,r=o),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*Nc,r.point(-Mc,i),r.point(0,i),r.point(Mc,i),r.point(Mc,0),r.point(Mc,-i),r.point(0,-i),r.point(-Mc,-i),r.point(-Mc,0),r.point(-Mc,i);else if(Ic(t[0]-e[0])>Sc){var a=t[0]<e[0]?Mc:-Mc;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}),[-Mc,-Nc]);function Uu(t){var e=Pc(t),n=6*Bc,r=e>0,i=Ic(e)>Sc;function a(t,n){return Pc(t)*Pc(n)>e}function o(t,n,r){var i=[1,0,0],a=_l(ml(t),ml(n)),o=bl(a,a),s=a[0],c=o-s*s;if(!c)return!r&&t;var l=e*o/c,u=-e*s/c,h=_l(i,a),f=xl(i,l);vl(f,xl(a,u));var d=h,p=bl(f,d),g=bl(d,d),y=p*p-g*(bl(f,f)-1);if(!(y<0)){var m=Wc(y),b=xl(d,(-p-m)/g);if(vl(b,f),b=yl(b),!r)return b;var _,v=t[0],x=n[0],k=t[1],w=n[1];x<v&&(_=v,v=x,x=_);var T=x-v,E=Ic(T-Mc)<Sc;if(!E&&w<k&&(_=k,k=w,w=_),E||T<Sc?E?k+w>0^b[1]<(Ic(b[0]-v)<Sc?k:w):k<=b[1]&&b[1]<=w:T>Mc^(v<=b[0]&&b[0]<=x)){var C=xl(d,(-p+m)/g);return vl(C,f),[b,yl(C)]}}}function s(e,n){var i=r?t:Mc-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return $u(a,(function(t){var e,n,c,l,u;return{lineStart:function(){l=c=!1,u=1},point:function(h,f){var d,p=[h,f],g=a(h,f),y=r?g?0:s(h,f):g?s(h+(h<0?Mc:-Mc),f):0;if(!e&&(l=c=g)&&t.lineStart(),g!==c&&(!(d=o(e,p))||Lu(e,d)||Lu(p,d))&&(p[2]=1),g!==c)u=0,g?(t.lineStart(),d=o(p,e),t.point(d[0],d[1])):(d=o(e,p),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&r^g){var m;y&n||!(m=o(p,e,!0))||(u=0,r?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1],3)))}!g||e&&Lu(e,p)||t.point(p[0],p[1]),e=p,c=g,n=y},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return u|(l&&c)<<1}}}),(function(e,r,i,a){Au(a,t,n,i,e,r)}),r?[0,-t]:[-Mc,t-Mc])}var qu=1e9,Wu=-qu;function Hu(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,s,l){var u=0,h=0;if(null==i||(u=o(i,s))!==(h=o(a,s))||c(i,a)<0^s>0)do{l.point(0===u||3===u?t:n,u>1?r:e)}while((u=(u+s+4)%4)!==h);else l.point(a[0],a[1])}function o(r,i){return Ic(r[0]-t)<Sc?i>0?0:3:Ic(r[0]-n)<Sc?i>0?2:1:Ic(r[1]-e)<Sc?i>0?1:0:i>0?3:2}function s(t,e){return c(t.x,e.x)}function c(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var c,l,u,h,f,d,p,g,y,m,b,_=o,v=Du(),x={point:k,lineStart:function(){x.point=w,l&&l.push(u=[]),m=!0,y=!1,p=g=NaN},lineEnd:function(){c&&(w(h,f),d&&y&&v.rejoin(),c.push(v.result())),x.point=k,y&&_.lineEnd()},polygonStart:function(){_=v,c=[],l=[],b=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=l.length;n<i;++n)for(var a,o,s=l[n],c=1,u=s.length,h=s[0],f=h[0],d=h[1];c<u;++c)a=f,o=d,f=(h=s[c])[0],d=h[1],o<=r?d>r&&(f-a)*(r-o)>(d-o)*(t-a)&&++e:d<=r&&(f-a)*(r-o)<(d-o)*(t-a)&&--e;return e}(),n=b&&e,i=(c=P(c)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&Bu(c,s,e,a,o),o.polygonEnd()),_=o,c=l=u=null}};function k(t,e){i(t,e)&&_.point(t,e)}function w(a,o){var s=i(a,o);if(l&&u.push([a,o]),m)h=a,f=o,d=s,m=!1,s&&(_.lineStart(),_.point(a,o));else if(s&&y)_.point(a,o);else{var c=[p=Math.max(Wu,Math.min(qu,p)),g=Math.max(Wu,Math.min(qu,g))],v=[a=Math.max(Wu,Math.min(qu,a)),o=Math.max(Wu,Math.min(qu,o))];!function(t,e,n,r,i,a){var o,s=t[0],c=t[1],l=0,u=1,h=e[0]-s,f=e[1]-c;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o<l)return;o<u&&(u=o)}else if(h>0){if(o>u)return;o>l&&(l=o)}if(o=i-s,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>l&&(l=o)}else if(h>0){if(o<l)return;o<u&&(u=o)}if(o=r-c,f||!(o>0)){if(o/=f,f<0){if(o<l)return;o<u&&(u=o)}else if(f>0){if(o>u)return;o>l&&(l=o)}if(o=a-c,f||!(o<0)){if(o/=f,f<0){if(o>u)return;o>l&&(l=o)}else if(f>0){if(o<l)return;o<u&&(u=o)}return l>0&&(t[0]=s+l*h,t[1]=c+l*f),u<1&&(e[0]=s+u*h,e[1]=c+u*f),!0}}}}}(c,v,t,e,n,r)?s&&(_.lineStart(),_.point(a,o),b=!1):(y||(_.lineStart(),_.point(c[0],c[1])),_.point(v[0],v[1]),s||_.lineEnd(),b=!1)}p=a,g=o,y=s}return x}}function Vu(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=Hu(r,i,a,o)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],a=+s[1][0],o=+s[1][1],t=e=null,n):[[r,i],[a,o]]}}}var Gu,Xu,Zu,Qu=wc(),Ku={sphere:Zc,point:Zc,lineStart:function(){Ku.point=th,Ku.lineEnd=Ju},lineEnd:Zc,polygonStart:Zc,polygonEnd:Zc};function Ju(){Ku.point=Ku.lineEnd=Zc}function th(t,e){Gu=t*=Bc,Xu=Uc(e*=Bc),Zu=Pc(e),Ku.point=eh}function eh(t,e){t*=Bc;var n=Uc(e*=Bc),r=Pc(e),i=Ic(t-Gu),a=Pc(i),o=r*Uc(i),s=Zu*n-Xu*r*a,c=Xu*n+Zu*r*a;Qu.add(Rc(Wc(o*o+s*s),c)),Gu=t,Xu=n,Zu=r}function nh(t){return Qu.reset(),nl(t,Ku),+Qu}var rh=[null,null],ih={type:"LineString",coordinates:rh};function ah(t,e){return rh[0]=t,rh[1]=e,nh(ih)}var oh={Feature:function(t,e){return ch(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(ch(n[r].geometry,e))return!0;return!1}},sh={Sphere:function(){return!0},Point:function(t,e){return lh(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(lh(n[r],e))return!0;return!1},LineString:function(t,e){return uh(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(uh(n[r],e))return!0;return!1},Polygon:function(t,e){return hh(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(hh(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(ch(n[r],e))return!0;return!1}};function ch(t,e){return!(!t||!sh.hasOwnProperty(t.type))&&sh[t.type](t,e)}function lh(t,e){return 0===ah(t,e)}function uh(t,e){for(var n,r,i,a=0,o=t.length;a<o;a++){if(0===(r=ah(t[a],e)))return!0;if(a>0&&(i=ah(t[a],t[a-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Ac*i)return!0;n=r}return!1}function hh(t,e){return!!Pu(t.map(fh),dh(e))}function fh(t){return(t=t.map(dh)).pop(),t}function dh(t){return[t[0]*Bc,t[1]*Bc]}function ph(t,e){return(t&&oh.hasOwnProperty(t.type)?oh[t.type]:ch)(t,e)}function gh(t,e,n){var r=w(t,e-Sc,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function yh(t,e,n){var r=w(t,e-Sc,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function mh(){var t,e,n,r,i,a,o,s,c,l,u,h,f=10,d=f,p=90,g=360,y=2.5;function m(){return{type:"MultiLineString",coordinates:b()}}function b(){return w($c(r/p)*p,n,p).map(u).concat(w($c(s/g)*g,o,g).map(h)).concat(w($c(e/f)*f,t,f).filter((function(t){return Ic(t%p)>Sc})).map(c)).concat(w($c(a/d)*d,i,d).filter((function(t){return Ic(t%g)>Sc})).map(l))}return m.lines=function(){return b().map((function(t){return{type:"LineString",coordinates:t}}))},m.outline=function(){return{type:"Polygon",coordinates:[u(r).concat(h(o).slice(1),u(n).reverse().slice(1),h(s).reverse().slice(1))]}},m.extent=function(t){return arguments.length?m.extentMajor(t).extentMinor(t):m.extentMinor()},m.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),s>o&&(t=s,s=o,o=t),m.precision(y)):[[r,s],[n,o]]},m.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),m.precision(y)):[[e,a],[t,i]]},m.step=function(t){return arguments.length?m.stepMajor(t).stepMinor(t):m.stepMinor()},m.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],m):[p,g]},m.stepMinor=function(t){return arguments.length?(f=+t[0],d=+t[1],m):[f,d]},m.precision=function(f){return arguments.length?(y=+f,c=gh(a,i,90),l=yh(e,t,y),u=gh(s,o,90),h=yh(r,n,y),m):y},m.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function bh(){return mh()()}function _h(t,e){var n=t[0]*Bc,r=t[1]*Bc,i=e[0]*Bc,a=e[1]*Bc,o=Pc(r),s=Uc(r),c=Pc(a),l=Uc(a),u=o*Pc(n),h=o*Uc(n),f=c*Pc(i),d=c*Uc(i),p=2*Gc(Wc(Xc(a-r)+o*c*Xc(i-n))),g=Uc(p),y=p?function(t){var e=Uc(t*=p)/g,n=Uc(p-t)/g,r=n*u+e*f,i=n*h+e*d,a=n*s+e*l;return[Rc(i,r)*Oc,Rc(a,Wc(r*r+i*i))*Oc]}:function(){return[n*Oc,r*Oc]};return y.distance=p,y}function vh(t){return t}var xh,kh,wh,Th,Eh=wc(),Ch=wc(),Sh={point:Zc,lineStart:Zc,lineEnd:Zc,polygonStart:function(){Sh.lineStart=Ah,Sh.lineEnd=Dh},polygonEnd:function(){Sh.lineStart=Sh.lineEnd=Sh.point=Zc,Eh.add(Ic(Ch)),Ch.reset()},result:function(){var t=Eh/2;return Eh.reset(),t}};function Ah(){Sh.point=Mh}function Mh(t,e){Sh.point=Nh,xh=wh=t,kh=Th=e}function Nh(t,e){Ch.add(Th*t-wh*e),wh=t,Th=e}function Dh(){Nh(xh,kh)}const Lh=Sh;var Oh=1/0,Bh=Oh,Ih=-Oh,Fh=Ih,Rh={point:function(t,e){t<Oh&&(Oh=t),t>Ih&&(Ih=t),e<Bh&&(Bh=e),e>Fh&&(Fh=e)},lineStart:Zc,lineEnd:Zc,polygonStart:Zc,polygonEnd:Zc,result:function(){var t=[[Oh,Bh],[Ih,Fh]];return Ih=Fh=-(Bh=Oh=1/0),t}};const Ph=Rh;var $h,jh,Yh,zh,Uh=0,qh=0,Wh=0,Hh=0,Vh=0,Gh=0,Xh=0,Zh=0,Qh=0,Kh={point:Jh,lineStart:tf,lineEnd:rf,polygonStart:function(){Kh.lineStart=af,Kh.lineEnd=of},polygonEnd:function(){Kh.point=Jh,Kh.lineStart=tf,Kh.lineEnd=rf},result:function(){var t=Qh?[Xh/Qh,Zh/Qh]:Gh?[Hh/Gh,Vh/Gh]:Wh?[Uh/Wh,qh/Wh]:[NaN,NaN];return Uh=qh=Wh=Hh=Vh=Gh=Xh=Zh=Qh=0,t}};function Jh(t,e){Uh+=t,qh+=e,++Wh}function tf(){Kh.point=ef}function ef(t,e){Kh.point=nf,Jh(Yh=t,zh=e)}function nf(t,e){var n=t-Yh,r=e-zh,i=Wc(n*n+r*r);Hh+=i*(Yh+t)/2,Vh+=i*(zh+e)/2,Gh+=i,Jh(Yh=t,zh=e)}function rf(){Kh.point=Jh}function af(){Kh.point=sf}function of(){cf($h,jh)}function sf(t,e){Kh.point=cf,Jh($h=Yh=t,jh=zh=e)}function cf(t,e){var n=t-Yh,r=e-zh,i=Wc(n*n+r*r);Hh+=i*(Yh+t)/2,Vh+=i*(zh+e)/2,Gh+=i,Xh+=(i=zh*t-Yh*e)*(Yh+t),Zh+=i*(zh+e),Qh+=3*i,Jh(Yh=t,zh=e)}const lf=Kh;function uf(t){this._context=t}uf.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Lc)}},result:Zc};var hf,ff,df,pf,gf,yf=wc(),mf={point:Zc,lineStart:function(){mf.point=bf},lineEnd:function(){hf&&_f(ff,df),mf.point=Zc},polygonStart:function(){hf=!0},polygonEnd:function(){hf=null},result:function(){var t=+yf;return yf.reset(),t}};function bf(t,e){mf.point=_f,ff=pf=t,df=gf=e}function _f(t,e){pf-=t,gf-=e,yf.add(Wc(pf*pf+gf*gf)),pf=t,gf=e}const vf=mf;function xf(){this._string=[]}function kf(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function wf(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),nl(t,n(r))),r.result()}return a.area=function(t){return nl(t,n(Lh)),Lh.result()},a.measure=function(t){return nl(t,n(vf)),vf.result()},a.bounds=function(t){return nl(t,n(Ph)),Ph.result()},a.centroid=function(t){return nl(t,n(lf)),lf.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,vh):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new xf):new uf(e=t),"function"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.projection(t).context(e)}function Tf(t){return{stream:Ef(t)}}function Ef(t){return function(e){var n=new Cf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Cf(){}function Sf(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),nl(n,t.stream(Ph)),e(Ph.result()),null!=r&&t.clipExtent(r),t}function Af(t,e,n){return Sf(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,s])}),n)}function Mf(t,e,n){return Af(t,[[0,0],e],n)}function Nf(t,e,n){return Sf(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])}),n)}function Df(t,e,n){return Sf(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])}),n)}xf.prototype={_radius:4.5,_circle:kf(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=kf(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},Cf.prototype={constructor:Cf,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Lf=Pc(30*Bc);function Of(t,e){return+e?function(t,e){function n(r,i,a,o,s,c,l,u,h,f,d,p,g,y){var m=l-r,b=u-i,_=m*m+b*b;if(_>4*e&&g--){var v=o+f,x=s+d,k=c+p,w=Wc(v*v+x*x+k*k),T=Gc(k/=w),E=Ic(Ic(k)-1)<Sc||Ic(a-h)<Sc?(a+h)/2:Rc(x,v),C=t(E,T),S=C[0],A=C[1],M=S-r,N=A-i,D=b*M-m*N;(D*D/_>e||Ic((m*M+b*N)/_-.5)>.3||o*f+s*d+c*p<Lf)&&(n(r,i,a,o,s,c,S,A,E,v/=w,x/=w,k,g,y),y.point(S,A),n(S,A,E,v,x,k,l,u,h,f,d,p,g,y))}}return function(e){var r,i,a,o,s,c,l,u,h,f,d,p,g={point:y,lineStart:m,lineEnd:_,polygonStart:function(){e.polygonStart(),g.lineStart=v},polygonEnd:function(){e.polygonEnd(),g.lineStart=m}};function y(n,r){n=t(n,r),e.point(n[0],n[1])}function m(){u=NaN,g.point=b,e.lineStart()}function b(r,i){var a=ml([r,i]),o=t(r,i);n(u,h,l,f,d,p,u=o[0],h=o[1],l=r,f=a[0],d=a[1],p=a[2],16,e),e.point(u,h)}function _(){g.point=y,e.lineEnd()}function v(){m(),g.point=x,g.lineEnd=k}function x(t,e){b(r=t,e),i=u,a=h,o=f,s=d,c=p,g.point=b}function k(){n(u,h,l,f,d,p,i,a,r,o,s,c,16,e),g.lineEnd=_,_()}return g}}(t,e):function(t){return Ef({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var Bf=Ef({point:function(t,e){this.stream.point(t*Bc,e*Bc)}});function If(t,e,n,r,i){function a(a,o){return[e+t*(a*=r),n-t*(o*=i)]}return a.invert=function(a,o){return[(a-e)/t*r,(n-o)/t*i]},a}function Ff(t,e,n,r,i,a){var o=Pc(a),s=Uc(a),c=o*t,l=s*t,u=o/t,h=s/t,f=(s*n-o*e)/t,d=(s*e+o*n)/t;function p(t,a){return[c*(t*=r)-l*(a*=i)+e,n-l*t-c*a]}return p.invert=function(t,e){return[r*(u*t-h*e+f),i*(d-h*t-u*e)]},p}function Rf(t){return Pf((function(){return t}))()}function Pf(t){var e,n,r,i,a,o,s,c,l,u,h=150,f=480,d=250,p=0,g=0,y=0,m=0,b=0,_=0,v=1,x=1,k=null,w=zu,T=null,E=vh,C=.5;function S(t){return c(t[0]*Bc,t[1]*Bc)}function A(t){return(t=c.invert(t[0],t[1]))&&[t[0]*Oc,t[1]*Oc]}function M(){var t=Ff(h,0,0,v,x,_).apply(null,e(p,g)),r=(_?Ff:If)(h,f-t[0],d-t[1],v,x,_);return n=wu(y,m,b),s=xu(e,r),c=xu(n,s),o=Of(s,C),N()}function N(){return l=u=null,S}return S.stream=function(t){return l&&u===t?l:l=Bf(function(t){return Ef({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(w(o(E(u=t)))))},S.preclip=function(t){return arguments.length?(w=t,k=void 0,N()):w},S.postclip=function(t){return arguments.length?(E=t,T=r=i=a=null,N()):E},S.clipAngle=function(t){return arguments.length?(w=+t?Uu(k=t*Bc):(k=null,zu),N()):k*Oc},S.clipExtent=function(t){return arguments.length?(E=null==t?(T=r=i=a=null,vh):Hu(T=+t[0][0],r=+t[0][1],i=+t[1][0],a=+t[1][1]),N()):null==T?null:[[T,r],[i,a]]},S.scale=function(t){return arguments.length?(h=+t,M()):h},S.translate=function(t){return arguments.length?(f=+t[0],d=+t[1],M()):[f,d]},S.center=function(t){return arguments.length?(p=t[0]%360*Bc,g=t[1]%360*Bc,M()):[p*Oc,g*Oc]},S.rotate=function(t){return arguments.length?(y=t[0]%360*Bc,m=t[1]%360*Bc,b=t.length>2?t[2]%360*Bc:0,M()):[y*Oc,m*Oc,b*Oc]},S.angle=function(t){return arguments.length?(_=t%360*Bc,M()):_*Oc},S.reflectX=function(t){return arguments.length?(v=t?-1:1,M()):v<0},S.reflectY=function(t){return arguments.length?(x=t?-1:1,M()):x<0},S.precision=function(t){return arguments.length?(o=Of(s,C=t*t),N()):Wc(C)},S.fitExtent=function(t,e){return Af(S,t,e)},S.fitSize=function(t,e){return Mf(S,t,e)},S.fitWidth=function(t,e){return Nf(S,t,e)},S.fitHeight=function(t,e){return Df(S,t,e)},function(){return e=t.apply(this,arguments),S.invert=e.invert&&A,M()}}function $f(t){var e=0,n=Mc/3,r=Pf(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*Bc,n=t[1]*Bc):[e*Oc,n*Oc]},i}function jf(t,e){var n=Uc(t),r=(n+Uc(e))/2;if(Ic(r)<Sc)return function(t){var e=Pc(t);function n(t,n){return[t*e,Uc(n)/e]}return n.invert=function(t,n){return[t/e,Gc(n*e)]},n}(t);var i=1+n*(2*r-n),a=Wc(i)/r;function o(t,e){var n=Wc(i-2*r*Uc(e))/r;return[n*Uc(t*=r),a-n*Pc(t)]}return o.invert=function(t,e){var n=a-e,o=Rc(t,Ic(n))*qc(n);return n*r<0&&(o-=Mc*qc(t)*qc(n)),[o/r,Gc((i-(t*t+n*n)*r*r)/(2*r))]},o}function Yf(){return $f(jf).scale(155.424).center([0,33.6442])}function zf(){return Yf().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Uf(){var t,e,n,r,i,a,o=zf(),s=Yf().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=Yf().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,e){a=[t,e]}};function u(t){var e=t[0],o=t[1];return a=null,n.point(e,o),a||(r.point(e,o),a)||(i.point(e,o),a)}function h(){return t=e=null,u}return u.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:o).invert(t)},u.stream=function(n){return t&&e===n?t:(r=[o.stream(e=n),s.stream(n),c.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},u.precision=function(t){return arguments.length?(o.precision(t),s.precision(t),c.precision(t),h()):o.precision()},u.scale=function(t){return arguments.length?(o.scale(t),s.scale(.35*t),c.scale(t),u.translate(o.translate())):o.scale()},u.translate=function(t){if(!arguments.length)return o.translate();var e=o.scale(),a=+t[0],u=+t[1];return n=o.translate(t).clipExtent([[a-.455*e,u-.238*e],[a+.455*e,u+.238*e]]).stream(l),r=s.translate([a-.307*e,u+.201*e]).clipExtent([[a-.425*e+Sc,u+.12*e+Sc],[a-.214*e-Sc,u+.234*e-Sc]]).stream(l),i=c.translate([a-.205*e,u+.212*e]).clipExtent([[a-.214*e+Sc,u+.166*e+Sc],[a-.115*e-Sc,u+.234*e-Sc]]).stream(l),h()},u.fitExtent=function(t,e){return Af(u,t,e)},u.fitSize=function(t,e){return Mf(u,t,e)},u.fitWidth=function(t,e){return Nf(u,t,e)},u.fitHeight=function(t,e){return Df(u,t,e)},u.scale(1070)}function qf(t){return function(e,n){var r=Pc(e),i=Pc(n),a=t(r*i);return[a*i*Uc(e),a*Uc(n)]}}function Wf(t){return function(e,n){var r=Wc(e*e+n*n),i=t(r),a=Uc(i),o=Pc(i);return[Rc(e*a,r*o),Gc(r&&n*a/r)]}}var Hf=qf((function(t){return Wc(2/(1+t))}));function Vf(){return Rf(Hf).scale(124.75).clipAngle(179.999)}Hf.invert=Wf((function(t){return 2*Gc(t/2)}));var Gf=qf((function(t){return(t=Vc(t))&&t/Uc(t)}));function Xf(){return Rf(Gf).scale(79.4188).clipAngle(179.999)}function Zf(t,e){return[t,Yc(Hc((Nc+e)/2))]}function Qf(){return Kf(Zf).scale(961/Lc)}function Kf(t){var e,n,r,i=Rf(t),a=i.center,o=i.scale,s=i.translate,c=i.clipExtent,l=null;function u(){var a=Mc*o(),s=i(Su(i.rotate()).invert([0,0]));return c(null==l?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:t===Zf?[[Math.max(s[0]-a,l),e],[Math.min(s[0]+a,n),r]]:[[l,Math.max(s[1]-a,e)],[n,Math.min(s[1]+a,r)]])}return i.scale=function(t){return arguments.length?(o(t),u()):o()},i.translate=function(t){return arguments.length?(s(t),u()):s()},i.center=function(t){return arguments.length?(a(t),u()):a()},i.clipExtent=function(t){return arguments.length?(null==t?l=e=n=r=null:(l=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),u()):null==l?null:[[l,e],[n,r]]},u()}function Jf(t){return Hc((Nc+t)/2)}function td(t,e){var n=Pc(t),r=t===e?Uc(t):Yc(n/Pc(e))/Yc(Jf(e)/Jf(t)),i=n*zc(Jf(t),r)/r;if(!r)return Zf;function a(t,e){i>0?e<-Nc+Sc&&(e=-Nc+Sc):e>Nc-Sc&&(e=Nc-Sc);var n=i/zc(Jf(e),r);return[n*Uc(r*t),i-n*Pc(r*t)]}return a.invert=function(t,e){var n=i-e,a=qc(r)*Wc(t*t+n*n),o=Rc(t,Ic(n))*qc(n);return n*r<0&&(o-=Mc*qc(t)*qc(n)),[o/r,2*Fc(zc(i/a,1/r))-Nc]},a}function ed(){return $f(td).scale(109.5).parallels([30,30])}function nd(t,e){return[t,e]}function rd(){return Rf(nd).scale(152.63)}function id(t,e){var n=Pc(t),r=t===e?Uc(t):(n-Pc(e))/(e-t),i=n/r+t;if(Ic(r)<Sc)return nd;function a(t,e){var n=i-e,a=r*t;return[n*Uc(a),i-n*Pc(a)]}return a.invert=function(t,e){var n=i-e,a=Rc(t,Ic(n))*qc(n);return n*r<0&&(a-=Mc*qc(t)*qc(n)),[a/r,i-qc(r)*Wc(t*t+n*n)]},a}function ad(){return $f(id).scale(131.154).center([0,13.9389])}Gf.invert=Wf((function(t){return t})),Zf.invert=function(t,e){return[t,2*Fc(jc(e))-Nc]},nd.invert=nd;var od=1.340264,sd=-.081106,cd=893e-6,ld=.003796,ud=Wc(3)/2;function hd(t,e){var n=Gc(ud*Uc(e)),r=n*n,i=r*r*r;return[t*Pc(n)/(ud*(od+3*sd*r+i*(7*cd+9*ld*r))),n*(od+sd*r+i*(cd+ld*r))]}function fd(){return Rf(hd).scale(177.158)}function dd(t,e){var n=Pc(e),r=Pc(t)*n;return[n*Uc(t)/r,Uc(e)/r]}function pd(){return Rf(dd).scale(144.049).clipAngle(60)}function gd(){var t,e,n,r,i,a,o,s=1,c=0,l=0,u=1,h=1,f=0,d=null,p=1,g=1,y=Ef({point:function(t,e){var n=_([t,e]);this.stream.point(n[0],n[1])}}),m=vh;function b(){return p=s*u,g=s*h,a=o=null,_}function _(n){var r=n[0]*p,i=n[1]*g;if(f){var a=i*t-r*e;r=r*t+i*e,i=a}return[r+c,i+l]}return _.invert=function(n){var r=n[0]-c,i=n[1]-l;if(f){var a=i*t+r*e;r=r*t-i*e,i=a}return[r/p,i/g]},_.stream=function(t){return a&&o===t?a:a=y(m(o=t))},_.postclip=function(t){return arguments.length?(m=t,d=n=r=i=null,b()):m},_.clipExtent=function(t){return arguments.length?(m=null==t?(d=n=r=i=null,vh):Hu(d=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),b()):null==d?null:[[d,n],[r,i]]},_.scale=function(t){return arguments.length?(s=+t,b()):s},_.translate=function(t){return arguments.length?(c=+t[0],l=+t[1],b()):[c,l]},_.angle=function(n){return arguments.length?(e=Uc(f=n%360*Bc),t=Pc(f),b()):f*Oc},_.reflectX=function(t){return arguments.length?(u=t?-1:1,b()):u<0},_.reflectY=function(t){return arguments.length?(h=t?-1:1,b()):h<0},_.fitExtent=function(t,e){return Af(_,t,e)},_.fitSize=function(t,e){return Mf(_,t,e)},_.fitWidth=function(t,e){return Nf(_,t,e)},_.fitHeight=function(t,e){return Df(_,t,e)},_}function yd(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function md(){return Rf(yd).scale(175.295)}function bd(t,e){return[Pc(e)*Uc(t),Uc(e)]}function _d(){return Rf(bd).scale(249.5).clipAngle(90.000001)}function vd(t,e){var n=Pc(e),r=1+Pc(t)*n;return[n*Uc(t)/r,Uc(e)/r]}function xd(){return Rf(vd).scale(250).clipAngle(142)}function kd(t,e){return[Yc(Hc((Nc+e)/2)),-t]}function wd(){var t=Kf(kd),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}function Td(t,e){return t.parent===e.parent?1:2}function Ed(t,e){return t+e.x}function Cd(t,e){return Math.max(t,e.y)}function Sd(){var t=Td,e=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(Ed,0)/t.length}(n),e.y=function(t){return 1+t.reduce(Cd,0)}(n)):(e.x=a?o+=t(e,a):0,e.y=0,a=e)}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),l=s.x-t(s,c)/2,u=c.x+t(c,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-l)/(u-l)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function Ad(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function Md(t,e){var n,r,i,a,o,s=new Od(t),c=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=Nd);n=l.pop();)if(c&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)l.push(r=n.children[a]=new Od(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Ld)}function Nd(t){return t.children}function Dd(t){t.data=t.data.data}function Ld(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Od(t){this.data=t,this.depth=this.height=0,this.parent=null}hd.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(od+sd*i+a*(cd+ld*i))-e)/(od+3*sd*i+a*(7*cd+9*ld*i)))*r)*i*i,!(Ic(n)<Ac));++o);return[ud*t*(od+3*sd*i+a*(7*cd+9*ld*i))/Pc(r),Gc(Uc(r)/ud)]},dd.invert=Wf(Fc),yd.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(Ic(n)>Sc&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]},bd.invert=Wf(Gc),vd.invert=Wf((function(t){return 2*Fc(t)})),kd.invert=function(t,e){return[-e,2*Fc(jc(t))-Nc]},Od.prototype=Md.prototype={constructor:Od,count:function(){return this.eachAfter(Ad)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);for(;i=o.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return Md(this).eachBefore(Dd)}};var Bd=Array.prototype.slice;function Id(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(Bd.call(t))).length,a=[];r<i;)e=t[r],n&&Pd(n,e)?++r:(n=jd(a=Fd(a,e)),r=0);return n}function Fd(t,e){var n,r;if($d(e,t))return[e];for(n=0;n<t.length;++n)if(Rd(e,t[n])&&$d(Yd(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(Rd(Yd(t[n],t[r]),e)&&Rd(Yd(t[n],e),t[r])&&Rd(Yd(t[r],e),t[n])&&$d(zd(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Rd(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function Pd(t,e){var n=t.r-e.r+1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function $d(t,e){for(var n=0;n<e.length;++n)if(!Pd(t,e[n]))return!1;return!0}function jd(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return Yd(t[0],t[1]);case 3:return zd(t[0],t[1],t[2])}}function Yd(t,e){var n=t.x,r=t.y,i=t.r,a=e.x,o=e.y,s=e.r,c=a-n,l=o-r,u=s-i,h=Math.sqrt(c*c+l*l);return{x:(n+a+c/h*u)/2,y:(r+o+l/h*u)/2,r:(h+i+s)/2}}function zd(t,e,n){var r=t.x,i=t.y,a=t.r,o=e.x,s=e.y,c=e.r,l=n.x,u=n.y,h=n.r,f=r-o,d=r-l,p=i-s,g=i-u,y=c-a,m=h-a,b=r*r+i*i-a*a,_=b-o*o-s*s+c*c,v=b-l*l-u*u+h*h,x=d*p-f*g,k=(p*v-g*_)/(2*x)-r,w=(g*y-p*m)/x,T=(d*_-f*v)/(2*x)-i,E=(f*m-d*y)/x,C=w*w+E*E-1,S=2*(a+k*w+T*E),A=k*k+T*T-a*a,M=-(C?(S+Math.sqrt(S*S-4*C*A))/(2*C):A/S);return{x:r+k+w*M,y:i+T+E*M,r:M}}function Ud(t,e,n){var r,i,a,o,s=t.x-e.x,c=t.y-e.y,l=s*s+c*c;l?(i=e.r+n.r,i*=i,o=t.r+n.r,i>(o*=o)?(r=(l+o-i)/(2*l),a=Math.sqrt(Math.max(0,o/l-r*r)),n.x=t.x-r*s-a*c,n.y=t.y-r*c+a*s):(r=(l+i-o)/(2*l),a=Math.sqrt(Math.max(0,i/l-r*r)),n.x=e.x+r*s-a*c,n.y=e.y+r*c+a*s)):(n.x=e.x+n.r,n.y=e.y)}function qd(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Wd(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function Hd(t){this._=t,this.next=null,this.previous=null}function Vd(t){if(!(i=t.length))return 0;var e,n,r,i,a,o,s,c,l,u,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;Ud(n,e,r=t[2]),e=new Hd(e),n=new Hd(n),r=new Hd(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){Ud(e._,n._,r=t[s]),r=new Hd(r),c=n.next,l=e.previous,u=n._.r,h=e._.r;do{if(u<=h){if(qd(c._,r._)){n=c,e.next=n,n.previous=e,--s;continue t}u+=c._.r,c=c.next}else{if(qd(l._,r._)){(e=l).next=n,n.previous=e,--s;continue t}h+=l._.r,l=l.previous}}while(c!==l.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,a=Wd(e);(r=r.next)!==n;)(o=Wd(r))<a&&(e=r,a=o);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=Id(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}function Gd(t){return Vd(t),t}function Xd(t){return null==t?null:Zd(t)}function Zd(t){if("function"!=typeof t)throw new Error;return t}function Qd(){return 0}function Kd(t){return function(){return t}}function Jd(t){return Math.sqrt(t.value)}function tp(){var t=null,e=1,n=1,r=Qd;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(ep(t)).eachAfter(np(r,.5)).eachBefore(rp(1)):i.eachBefore(ep(Jd)).eachAfter(np(Qd,1)).eachAfter(np(r,i.r/Math.min(e,n))).eachBefore(rp(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=Xd(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:Kd(+t),i):r},i}function ep(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function np(t,e){return function(n){if(r=n.children){var r,i,a,o=r.length,s=t(n)*e||0;if(s)for(i=0;i<o;++i)r[i].r+=s;if(a=Vd(r),s)for(i=0;i<o;++i)r[i].r-=s;n.r=a+s}}}function rp(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function ip(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function ap(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,l=t.value&&(r-e)/t.value;++s<c;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*l}function op(){var t=1,e=1,n=0,r=!1;function i(i){var a=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(r){r.children&&ap(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,a=r.y0,o=r.x1-n,s=r.y1-n;o<i&&(i=o=(i+o)/2),s<a&&(a=s=(a+s)/2),r.x0=i,r.y0=a,r.x1=o,r.y1=s}}(e,a)),r&&i.eachBefore(ip),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i}var sp={depth:-1},cp={};function lp(t){return t.id}function up(t){return t.parentId}function hp(){var t=lp,e=up;function n(n){var r,i,a,o,s,c,l,u=n.length,h=new Array(u),f={};for(i=0;i<u;++i)r=n[i],s=h[i]=new Od(r),null!=(c=t(r,i,n))&&(c+="")&&(f[l="$"+(s.id=c)]=l in f?cp:s);for(i=0;i<u;++i)if(s=h[i],null!=(c=e(n[i],i,n))&&(c+="")){if(!(o=f["$"+c]))throw new Error("missing: "+c);if(o===cp)throw new Error("ambiguous: "+c);o.children?o.children.push(s):o.children=[s],s.parent=o}else{if(a)throw new Error("multiple roots");a=s}if(!a)throw new Error("no root");if(a.parent=sp,a.eachBefore((function(t){t.depth=t.parent.depth+1,--u})).eachBefore(Ld),a.parent=null,u>0)throw new Error("cycle");return a}return n.id=function(e){return arguments.length?(t=Zd(e),n):t},n.parentId=function(t){return arguments.length?(e=Zd(t),n):e},n}function fp(t,e){return t.parent===e.parent?1:2}function dp(t){var e=t.children;return e?e[0]:t.t}function pp(t){var e=t.children;return e?e[e.length-1]:t.t}function gp(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function yp(t,e,n){return t.a.parent===e.parent?t.a:n}function mp(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function bp(){var t=fp,e=1,n=1,r=null;function i(i){var c=function(t){for(var e,n,r,i,a,o=new mp(t,0),s=[o];e=s.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=e.children[i]=new mp(r[i],i)),n.parent=e;return(o.parent=new mp(null,0)).children=[o],o}(i);if(c.eachAfter(a),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(s);else{var l=i,u=i,h=i;i.eachBefore((function(t){t.x<l.x&&(l=t),t.x>u.x&&(u=t),t.depth>h.depth&&(h=t)}));var f=l===u?1:t(l,u)/2,d=f-l.x,p=e/(u.x+f+d),g=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*g}))}return i}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,a=e,o=e,s=n,c=a.parent.children[0],l=a.m,u=o.m,h=s.m,f=c.m;s=pp(s),a=dp(a),s&&a;)c=dp(c),(o=pp(o)).a=e,(i=s.z+h-a.z-l+t(s._,a._))>0&&(gp(yp(s,e,r),e,i),l+=i,u+=i),h+=s.m,l+=a.m,f+=c.m,u+=o.m;s&&!pp(o)&&(o.t=s,o.m+=h-u),a&&!dp(c)&&(c.t=a,c.m+=l-f,r=e)}return r}(e,i,e.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function _p(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,l=t.value&&(i-n)/t.value;++s<c;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*l}mp.prototype=Object.create(Od.prototype);var vp=(1+Math.sqrt(5))/2;function xp(t,e,n,r,i,a){for(var o,s,c,l,u,h,f,d,p,g,y,m=[],b=e.children,_=0,v=0,x=b.length,k=e.value;_<x;){c=i-n,l=a-r;do{u=b[v++].value}while(!u&&v<x);for(h=f=u,y=u*u*(g=Math.max(l/c,c/l)/(k*t)),p=Math.max(f/y,y/h);v<x;++v){if(u+=s=b[v].value,s<h&&(h=s),s>f&&(f=s),y=u*u*g,(d=Math.max(f/y,y/h))>p){u-=s;break}p=d}m.push(o={value:u,dice:c<l,children:b.slice(_,v)}),o.dice?ap(o,n,r,i,k?r+=l*u/k:a):_p(o,n,r,k?n+=c*u/k:i,a),k-=u,_=v}return m}const kp=function t(e){function n(t,n,r,i,a){xp(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(vp);function wp(){var t=kp,e=!1,n=1,r=1,i=[0],a=Qd,o=Qd,s=Qd,c=Qd,l=Qd;function u(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(ip),t}function h(e){var n=i[e.depth],r=e.x0+n,u=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<u&&(u=f=(u+f)/2),e.x0=r,e.y0=u,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=a(e)/2,r+=l(e)-n,u+=o(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=c(e)-n)<u&&(u=f=(u+f)/2),t(e,r,u,h,f))}return u.round=function(t){return arguments.length?(e=!!t,u):e},u.size=function(t){return arguments.length?(n=+t[0],r=+t[1],u):[n,r]},u.tile=function(e){return arguments.length?(t=Zd(e),u):t},u.padding=function(t){return arguments.length?u.paddingInner(t).paddingOuter(t):u.paddingInner()},u.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:Kd(+t),u):a},u.paddingOuter=function(t){return arguments.length?u.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):u.paddingTop()},u.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:Kd(+t),u):o},u.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Kd(+t),u):s},u.paddingBottom=function(t){return arguments.length?(c="function"==typeof t?t:Kd(+t),u):c},u.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:Kd(+t),u):l},u}function Tp(t,e,n,r,i){var a,o,s=t.children,c=s.length,l=new Array(c+1);for(l[0]=o=a=0;a<c;++a)l[a+1]=o+=s[a].value;!function t(e,n,r,i,a,o,c){if(e>=n-1){var u=s[e];return u.x0=i,u.y0=a,u.x1=o,void(u.y1=c)}for(var h=l[e],f=r/2+h,d=e+1,p=n-1;d<p;){var g=d+p>>>1;l[g]<f?d=g+1:p=g}f-l[d-1]<l[d]-f&&e+1<d&&--d;var y=l[d]-h,m=r-y;if(o-i>c-a){var b=(i*m+o*y)/r;t(e,d,y,i,a,b,c),t(d,n,m,b,a,o,c)}else{var _=(a*m+c*y)/r;t(e,d,y,i,a,o,_),t(d,n,m,i,_,o,c)}}(0,c,t.value,e,n,r,i)}function Ep(t,e,n,r,i){(1&t.depth?_p:ap)(t,e,n,r,i)}const Cp=function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,c,l,u,h=-1,f=o.length,d=t.value;++h<f;){for(c=(s=o[h]).children,l=s.value=0,u=c.length;l<u;++l)s.value+=c[l].value;s.dice?ap(s,n,r,i,r+=(a-r)*s.value/d):_p(s,n,r,n+=(i-n)*s.value/d,a),d-=s.value}else t._squarify=o=xp(e,t,n,r,i,a),o.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(vp);function Sp(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function Ap(t,e){var n=dn(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}}function Mp(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Np=Math.SQRT2;function Dp(t){return((t=Math.exp(t))+1/t)/2}function Lp(t,e){var n,r,i=t[0],a=t[1],o=t[2],s=e[0],c=e[1],l=e[2],u=s-i,h=c-a,f=u*u+h*h;if(f<1e-12)r=Math.log(l/o)/Np,n=function(t){return[i+t*u,a+t*h,o*Math.exp(Np*t*r)]};else{var d=Math.sqrt(f),p=(l*l-o*o+4*f)/(2*o*2*d),g=(l*l-o*o-4*f)/(2*l*2*d),y=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(g*g+1)-g);r=(m-y)/Np,n=function(t){var e,n=t*r,s=Dp(y),c=o/(2*d)*(s*(e=Np*n+y,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[i+c*u,a+c*h,o*s/Dp(Np*n+y)]}}return n.duration=1e3*r,n}function Op(t){return function(e,n){var r=t((e=an(e)).h,(n=an(n)).h),i=pn(e.s,n.s),a=pn(e.l,n.l),o=pn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=a(t),e.opacity=o(t),e+""}}}const Bp=Op(dn);var Ip=Op(pn);function Fp(t,e){var n=pn((t=Ta(t)).l,(e=Ta(e)).l),r=pn(t.a,e.a),i=pn(t.b,e.b),a=pn(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=a(e),t+""}}function Rp(t){return function(e,n){var r=t((e=La(e)).h,(n=La(n)).h),i=pn(e.c,n.c),a=pn(e.l,n.l),o=pn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}const Pp=Rp(dn);var $p=Rp(pn);function jp(t){return function e(n){function r(e,r){var i=t((e=qa(e)).h,(r=qa(r)).h),a=pn(e.s,r.s),o=pn(e.l,r.l),s=pn(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}const Yp=jp(dn);var zp=jp(pn);function Up(t,e){for(var n=0,r=e.length-1,i=e[0],a=new Array(r<0?0:r);n<r;)a[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return a[e](t-e)}}function qp(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}function Wp(t){for(var e,n=-1,r=t.length,i=t[r-1],a=0;++n<r;)e=i,i=t[n],a+=e[1]*i[0]-e[0]*i[1];return a/2}function Hp(t){for(var e,n,r=-1,i=t.length,a=0,o=0,s=t[i-1],c=0;++r<i;)e=s,s=t[r],c+=n=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*n,o+=(e[1]+s[1])*n;return[a/(c*=3),o/c]}function Vp(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function Gp(t,e){return t[0]-e[0]||t[1]-e[1]}function Xp(t){for(var e=t.length,n=[0,1],r=2,i=2;i<e;++i){for(;r>1&&Vp(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function Zp(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(Gp),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var a=Xp(r),o=Xp(i),s=o[0]===a[0],c=o[o.length-1]===a[a.length-1],l=[];for(e=a.length-1;e>=0;--e)l.push(t[r[a[e]][2]]);for(e=+s;e<o.length-c;++e)l.push(t[r[o[e]][2]]);return l}function Qp(t,e){for(var n,r,i=t.length,a=t[i-1],o=e[0],s=e[1],c=a[0],l=a[1],u=!1,h=0;h<i;++h)n=(a=t[h])[0],(r=a[1])>s!=l>s&&o<(c-n)*(s-r)/(l-r)+n&&(u=!u),c=n,l=r;return u}function Kp(t){for(var e,n,r=-1,i=t.length,a=t[i-1],o=a[0],s=a[1],c=0;++r<i;)e=o,n=s,e-=o=(a=t[r])[0],n-=s=a[1],c+=Math.sqrt(e*e+n*n);return c}function Jp(){return Math.random()}const tg=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(Jp),eg=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*e()-1,a=2*e()-1,i=r*r+a*a}while(!i||i>1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(Jp),ng=function t(e){function n(){var t=eg.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(Jp),rg=function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(Jp),ig=function t(e){function n(t){var n=rg.source(e)(t);return function(){return n()/t}}return n.source=t,n}(Jp),ag=function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(Jp);function og(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function sg(t,e){switch(arguments.length){case 0:break;case 1:this.interpolator(t);break;default:this.interpolator(e).domain(t)}return this}var cg=Array.prototype,lg=cg.map,ug=cg.slice,hg={name:"implicit"};function fg(){var t=na(),e=[],n=[],r=hg;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==hg)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=na();for(var r,a,o=-1,s=n.length;++o<s;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=ug.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return fg(e,n).unknown(r)},og.apply(i,arguments),i}function dg(){var t,e,n=fg().unknown(void 0),r=n.domain,i=n.range,a=[0,1],o=!1,s=0,c=0,l=.5;function u(){var n=r().length,u=a[1]<a[0],h=a[u-0],f=a[1-u];t=(f-h)/Math.max(1,n-s+2*c),o&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*l,e=t*(1-s),o&&(h=Math.round(h),e=Math.round(e));var d=w(n).map((function(e){return h+t*e}));return i(u?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),u()):r()},n.range=function(t){return arguments.length?(a=[+t[0],+t[1]],u()):a.slice()},n.rangeRound=function(t){return a=[+t[0],+t[1]],o=!0,u()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,u()):o},n.padding=function(t){return arguments.length?(s=Math.min(1,c=+t),u()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),u()):s},n.paddingOuter=function(t){return arguments.length?(c=+t,u()):c},n.align=function(t){return arguments.length?(l=Math.max(0,Math.min(1,t)),u()):l},n.copy=function(){return dg(r(),a).round(o).paddingInner(s).paddingOuter(c).align(l)},og.apply(u(),arguments)}function pg(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return pg(e())},t}function gg(){return pg(dg.apply(null,arguments).paddingInner(1))}function yg(t){return+t}var mg=[0,1];function bg(t){return t}function _g(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function vg(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function xg(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=_g(i,r),a=n(o,a)):(r=_g(r,i),a=n(a,o)),function(t){return a(r(t))}}function kg(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=_g(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=l(t,e,1,r)-1;return a[n](i[n](e))}}function wg(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Tg(){var t,e,n,r,i,a,o=mg,s=mg,c=Mn,l=bg;function u(){return r=Math.min(o.length,s.length)>2?kg:xg,i=a=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,c)))(t(l(e)))}return h.invert=function(n){return l(e((a||(a=r(s,o.map(t),Tn)))(n)))},h.domain=function(t){return arguments.length?(o=lg.call(t,yg),l===bg||(l=vg(o)),u()):o.slice()},h.range=function(t){return arguments.length?(s=ug.call(t),u()):s.slice()},h.rangeRound=function(t){return s=ug.call(t),c=Mp,u()},h.clamp=function(t){return arguments.length?(l=t?vg(o):bg,h):l!==bg},h.interpolate=function(t){return arguments.length?(c=t,u()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,u()}}function Eg(t,e){return Tg()(t,e)}function Cg(t,e,n,r){var i,a=M(t,e,n);switch((r=cc(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=xc(a,o))||(r.precision=i),gc(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=kc(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=vc(a))||(r.precision=i-2*("%"===r.type))}return pc(r)}function Sg(t){var e=t.domain;return t.ticks=function(t){var n=e();return S(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Cg(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,s=i[a],c=i[o];return c<s&&(r=s,s=c,c=r,r=a,a=o,o=r),(r=A(s,c,n))>0?r=A(s=Math.floor(s/r)*r,c=Math.ceil(c/r)*r,n):r<0&&(r=A(s=Math.ceil(s*r)/r,c=Math.floor(c*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(c/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(c*r)/r,e(i)),t},t}function Ag(){var t=Eg(bg,bg);return t.copy=function(){return wg(t,Ag())},og.apply(t,arguments),Sg(t)}function Mg(t){var e;function n(t){return isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=lg.call(e,yg),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return Mg(t).unknown(e)},t=arguments.length?lg.call(t,yg):[0,1],Sg(n)}function Ng(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}function Dg(t){return Math.log(t)}function Lg(t){return Math.exp(t)}function Og(t){return-Math.log(-t)}function Bg(t){return-Math.exp(-t)}function Ig(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Fg(t){return function(e){return-t(-e)}}function Rg(t){var e,n,r=t(Dg,Lg),i=r.domain,a=10;function o(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(a),n=function(t){return 10===t?Ig:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=Fg(e),n=Fg(n),t(Og,Bg)):t(Dg,Lg),r}return r.base=function(t){return arguments.length?(a=+t,o()):a},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),s=o[0],c=o[o.length-1];(r=c<s)&&(f=s,s=c,c=f);var l,u,h,f=e(s),d=e(c),p=null==t?10:+t,g=[];if(!(a%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(u=1,l=n(f);u<a;++u)if(!((h=l*u)<s)){if(h>c)break;g.push(h)}}else for(;f<d;++f)for(u=a-1,l=n(f);u>=1;--u)if(!((h=l*u)<s)){if(h>c)break;g.push(h)}}else g=S(f,d,Math.min(d-f,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=pc(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a<a-.5&&(r*=a),r<=o?i(t):""}},r.nice=function(){return i(Ng(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}function Pg(){var t=Rg(Tg()).domain([1,10]);return t.copy=function(){return wg(t,Pg()).base(t.base())},og.apply(t,arguments),t}function $g(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function jg(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Yg(t){var e=1,n=t($g(e),jg(e));return n.constant=function(n){return arguments.length?t($g(e=+n),jg(e)):e},Sg(n)}function zg(){var t=Yg(Tg());return t.copy=function(){return wg(t,zg()).constant(t.constant())},og.apply(t,arguments)}function Ug(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function qg(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Wg(t){return t<0?-t*t:t*t}function Hg(t){var e=t(bg,bg),n=1;function r(){return 1===n?t(bg,bg):.5===n?t(qg,Wg):t(Ug(n),Ug(1/n))}return e.exponent=function(t){return arguments.length?(n=+t,r()):n},Sg(e)}function Vg(){var t=Hg(Tg());return t.copy=function(){return wg(t,Vg()).exponent(t.exponent())},og.apply(t,arguments),t}function Gg(){return Vg.apply(null,arguments).exponent(.5)}function Xg(){var t,e=[],n=[],r=[];function a(){var t=0,i=Math.max(1,n.length);for(r=new Array(i-1);++t<i;)r[t-1]=L(e,t/i);return o}function o(e){return isNaN(e=+e)?t:n[l(r,e)]}return o.invertExtent=function(t){var i=n.indexOf(t);return i<0?[NaN,NaN]:[i>0?r[i-1]:e[0],i<r.length?r[i]:e[e.length-1]]},o.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var n,r=0,o=t.length;r<o;++r)null==(n=t[r])||isNaN(n=+n)||e.push(n);return e.sort(i),a()},o.range=function(t){return arguments.length?(n=ug.call(t),a()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return r.slice()},o.copy=function(){return Xg().domain(e).range(n).unknown(t)},og.apply(o,arguments)}function Zg(){var t,e=0,n=1,r=1,i=[.5],a=[0,1];function o(e){return e<=e?a[l(i,e,0,r)]:t}function s(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*n-(t-r)*e)/(r+1);return o}return o.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],s()):[e,n]},o.range=function(t){return arguments.length?(r=(a=ug.call(t)).length-1,s()):a.slice()},o.invertExtent=function(t){var o=a.indexOf(t);return o<0?[NaN,NaN]:o<1?[e,i[0]]:o>=r?[i[r-1],n]:[i[o-1],i[o]]},o.unknown=function(e){return arguments.length?(t=e,o):o},o.thresholds=function(){return i.slice()},o.copy=function(){return Zg().domain([e,n]).range(a).unknown(t)},og.apply(Sg(o),arguments)}function Qg(){var t,e=[.5],n=[0,1],r=1;function i(i){return i<=i?n[l(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=ug.call(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=ug.call(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return Qg().domain(e).range(n).unknown(t)},og.apply(i,arguments)}var Kg=new Date,Jg=new Date;function ty(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return ty((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Kg.setTime(+e),Jg.setTime(+r),t(Kg),t(Jg),Math.floor(n(Kg,Jg))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var ey=ty((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));ey.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ty((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};const ny=ey;var ry=ey.range,iy=ty((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}));const ay=iy;var oy=iy.range,sy=1e3,cy=6e4,ly=36e5,uy=864e5,hy=6048e5;function fy(t){return ty((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*cy)/hy}))}var dy=fy(0),py=fy(1),gy=fy(2),yy=fy(3),my=fy(4),by=fy(5),_y=fy(6),vy=dy.range,xy=py.range,ky=gy.range,wy=yy.range,Ty=my.range,Ey=by.range,Cy=_y.range,Sy=ty((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*cy)/uy}),(function(t){return t.getDate()-1}));const Ay=Sy;var My=Sy.range,Ny=ty((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*sy-t.getMinutes()*cy)}),(function(t,e){t.setTime(+t+e*ly)}),(function(t,e){return(e-t)/ly}),(function(t){return t.getHours()}));const Dy=Ny;var Ly=Ny.range,Oy=ty((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*sy)}),(function(t,e){t.setTime(+t+e*cy)}),(function(t,e){return(e-t)/cy}),(function(t){return t.getMinutes()}));const By=Oy;var Iy=Oy.range,Fy=ty((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*sy)}),(function(t,e){return(e-t)/sy}),(function(t){return t.getUTCSeconds()}));const Ry=Fy;var Py=Fy.range,$y=ty((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));$y.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ty((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):$y:null};const jy=$y;var Yy=$y.range;function zy(t){return ty((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/hy}))}var Uy=zy(0),qy=zy(1),Wy=zy(2),Hy=zy(3),Vy=zy(4),Gy=zy(5),Xy=zy(6),Zy=Uy.range,Qy=qy.range,Ky=Wy.range,Jy=Hy.range,tm=Vy.range,em=Gy.range,nm=Xy.range,rm=ty((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/uy}),(function(t){return t.getUTCDate()-1}));const im=rm;var am=rm.range,om=ty((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));om.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ty((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};const sm=om;var cm=om.range;function lm(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function um(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function hm(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function fm(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,l=Tm(i),u=Em(i),h=Tm(a),f=Em(a),d=Tm(o),p=Em(o),g=Tm(s),y=Em(s),m=Tm(c),b=Em(c),_={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Hm,e:Hm,f:Qm,g:cb,G:ub,H:Vm,I:Gm,j:Xm,L:Zm,m:Km,M:Jm,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Ob,s:Bb,S:tb,u:eb,U:nb,V:ib,w:ab,W:ob,x:null,X:null,y:sb,Y:lb,Z:hb,"%":Lb},v={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:fb,e:fb,f:mb,g:Ab,G:Nb,H:db,I:pb,j:gb,L:yb,m:bb,M:_b,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Ob,s:Bb,S:vb,u:xb,U:kb,V:Tb,w:Eb,W:Cb,x:null,X:null,y:Sb,Y:Mb,Z:Db,"%":Lb},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=b[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return T(t,e,n,r)},d:Fm,e:Fm,f:zm,g:Lm,G:Dm,H:Pm,I:Pm,j:Rm,L:Ym,m:Im,M:$m,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=u[r[0].toLowerCase()],n+r[0].length):-1},q:Bm,Q:qm,s:Wm,S:jm,u:Sm,U:Am,V:Mm,w:Cm,W:Nm,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:Lm,Y:Dm,Z:Om,"%":Um};function k(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===t.charCodeAt(s)&&(o.push(t.slice(c,s)),null!=(i=bm[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),c=s+1);return o.push(t.slice(c,s)),o.join("")}}function w(t,e){return function(n){var r,i,a=hm(1900,void 0,1);if(T(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=um(hm(a.y,0,1))).getUTCDay(),r=i>4||0===i?qy.ceil(r):qy(r),r=im.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=lm(hm(a.y,0,1))).getDay(),r=i>4||0===i?py.ceil(r):py(r),r=Ay.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?um(hm(a.y,0,1)).getUTCDay():lm(hm(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,um(a)):lm(a)}}function T(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o<s;){if(r>=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=x[i in bm?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return _.x=k(n,_),_.X=k(r,_),_.c=k(e,_),v.x=k(n,v),v.X=k(r,v),v.c=k(e,v),{format:function(t){var e=k(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=w(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=k(t+="",v);return e.toString=function(){return t},e},utcParse:function(t){var e=w(t+="",!0);return e.toString=function(){return t},e}}}var dm,pm,gm,ym,mm,bm={"-":"",_:" ",0:"0"},_m=/^\s*\d+/,vm=/^%/,xm=/[\\^$*+?|[\]().{}]/g;function km(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function wm(t){return t.replace(xm,"\\$&")}function Tm(t){return new RegExp("^(?:"+t.map(wm).join("|")+")","i")}function Em(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function Cm(t,e,n){var r=_m.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Sm(t,e,n){var r=_m.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Am(t,e,n){var r=_m.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Mm(t,e,n){var r=_m.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Nm(t,e,n){var r=_m.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Dm(t,e,n){var r=_m.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Lm(t,e,n){var r=_m.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Om(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Bm(t,e,n){var r=_m.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Im(t,e,n){var r=_m.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Fm(t,e,n){var r=_m.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rm(t,e,n){var r=_m.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Pm(t,e,n){var r=_m.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function $m(t,e,n){var r=_m.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function jm(t,e,n){var r=_m.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Ym(t,e,n){var r=_m.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function zm(t,e,n){var r=_m.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Um(t,e,n){var r=vm.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function qm(t,e,n){var r=_m.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Wm(t,e,n){var r=_m.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Hm(t,e){return km(t.getDate(),e,2)}function Vm(t,e){return km(t.getHours(),e,2)}function Gm(t,e){return km(t.getHours()%12||12,e,2)}function Xm(t,e){return km(1+Ay.count(ny(t),t),e,3)}function Zm(t,e){return km(t.getMilliseconds(),e,3)}function Qm(t,e){return Zm(t,e)+"000"}function Km(t,e){return km(t.getMonth()+1,e,2)}function Jm(t,e){return km(t.getMinutes(),e,2)}function tb(t,e){return km(t.getSeconds(),e,2)}function eb(t){var e=t.getDay();return 0===e?7:e}function nb(t,e){return km(dy.count(ny(t)-1,t),e,2)}function rb(t){var e=t.getDay();return e>=4||0===e?my(t):my.ceil(t)}function ib(t,e){return t=rb(t),km(my.count(ny(t),t)+(4===ny(t).getDay()),e,2)}function ab(t){return t.getDay()}function ob(t,e){return km(py.count(ny(t)-1,t),e,2)}function sb(t,e){return km(t.getFullYear()%100,e,2)}function cb(t,e){return km((t=rb(t)).getFullYear()%100,e,2)}function lb(t,e){return km(t.getFullYear()%1e4,e,4)}function ub(t,e){var n=t.getDay();return km((t=n>=4||0===n?my(t):my.ceil(t)).getFullYear()%1e4,e,4)}function hb(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+km(e/60|0,"0",2)+km(e%60,"0",2)}function fb(t,e){return km(t.getUTCDate(),e,2)}function db(t,e){return km(t.getUTCHours(),e,2)}function pb(t,e){return km(t.getUTCHours()%12||12,e,2)}function gb(t,e){return km(1+im.count(sm(t),t),e,3)}function yb(t,e){return km(t.getUTCMilliseconds(),e,3)}function mb(t,e){return yb(t,e)+"000"}function bb(t,e){return km(t.getUTCMonth()+1,e,2)}function _b(t,e){return km(t.getUTCMinutes(),e,2)}function vb(t,e){return km(t.getUTCSeconds(),e,2)}function xb(t){var e=t.getUTCDay();return 0===e?7:e}function kb(t,e){return km(Uy.count(sm(t)-1,t),e,2)}function wb(t){var e=t.getUTCDay();return e>=4||0===e?Vy(t):Vy.ceil(t)}function Tb(t,e){return t=wb(t),km(Vy.count(sm(t),t)+(4===sm(t).getUTCDay()),e,2)}function Eb(t){return t.getUTCDay()}function Cb(t,e){return km(qy.count(sm(t)-1,t),e,2)}function Sb(t,e){return km(t.getUTCFullYear()%100,e,2)}function Ab(t,e){return km((t=wb(t)).getUTCFullYear()%100,e,2)}function Mb(t,e){return km(t.getUTCFullYear()%1e4,e,4)}function Nb(t,e){var n=t.getUTCDay();return km((t=n>=4||0===n?Vy(t):Vy.ceil(t)).getUTCFullYear()%1e4,e,4)}function Db(){return"+0000"}function Lb(){return"%"}function Ob(t){return+t}function Bb(t){return Math.floor(+t/1e3)}function Ib(t){return dm=fm(t),pm=dm.format,gm=dm.parse,ym=dm.utcFormat,mm=dm.utcParse,dm}Ib({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Fb=31536e6;function Rb(t){return new Date(t)}function Pb(t){return t instanceof Date?+t:+new Date(+t)}function $b(t,e,n,r,i,o,s,c,l){var u=Eg(bg,bg),h=u.invert,f=u.domain,d=l(".%L"),p=l(":%S"),g=l("%I:%M"),y=l("%I %p"),m=l("%a %d"),b=l("%b %d"),_=l("%B"),v=l("%Y"),x=[[s,1,1e3],[s,5,5e3],[s,15,15e3],[s,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,Fb]];function k(a){return(s(a)<a?d:o(a)<a?p:i(a)<a?g:r(a)<a?y:e(a)<a?n(a)<a?m:b:t(a)<a?_:v)(a)}function w(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,s=a((function(t){return t[2]})).right(x,o);s===x.length?(i=M(n/Fb,r/Fb,e),e=t):s?(i=(s=x[o/x[s-1][2]<x[s][2]/o?s-1:s])[1],e=s[0]):(i=Math.max(M(n,r,e),1),e=c)}return null==i?e:e.every(i)}return u.invert=function(t){return new Date(h(t))},u.domain=function(t){return arguments.length?f(lg.call(t,Pb)):f().map(Rb)},u.ticks=function(t,e){var n,r=f(),i=r[0],a=r[r.length-1],o=a<i;return o&&(n=i,i=a,a=n),n=(n=w(t,i,a,e))?n.range(i,a+1):[],o?n.reverse():n},u.tickFormat=function(t,e){return null==e?k:l(e)},u.nice=function(t,e){var n=f();return(t=w(t,n[0],n[n.length-1],e))?f(Ng(n,t)):u},u.copy=function(){return wg(u,$b(t,e,n,r,i,o,s,c,l))},u}function jb(){return og.apply($b(ny,ay,dy,Ay,Dy,By,Ry,jy,pm).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var Yb=ty((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}));const zb=Yb;var Ub=Yb.range,qb=ty((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*ly)}),(function(t,e){return(e-t)/ly}),(function(t){return t.getUTCHours()}));const Wb=qb;var Hb=qb.range,Vb=ty((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*cy)}),(function(t,e){return(e-t)/cy}),(function(t){return t.getUTCMinutes()}));const Gb=Vb;var Xb=Vb.range;function Zb(){return og.apply($b(sm,zb,Uy,im,Wb,Gb,Ry,jy,ym).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Qb(){var t,e,n,r,i,a=0,o=1,s=bg,c=!1;function l(e){return isNaN(e=+e)?i:s(0===n?.5:(e=(r(e)-t)*n,c?Math.max(0,Math.min(1,e)):e))}return l.domain=function(i){return arguments.length?(t=r(a=+i[0]),e=r(o=+i[1]),n=t===e?0:1/(e-t),l):[a,o]},l.clamp=function(t){return arguments.length?(c=!!t,l):c},l.interpolator=function(t){return arguments.length?(s=t,l):s},l.unknown=function(t){return arguments.length?(i=t,l):i},function(i){return r=i,t=i(a),e=i(o),n=t===e?0:1/(e-t),l}}function Kb(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Jb(){var t=Sg(Qb()(bg));return t.copy=function(){return Kb(t,Jb())},sg.apply(t,arguments)}function t_(){var t=Rg(Qb()).domain([1,10]);return t.copy=function(){return Kb(t,t_()).base(t.base())},sg.apply(t,arguments)}function e_(){var t=Yg(Qb());return t.copy=function(){return Kb(t,e_()).constant(t.constant())},sg.apply(t,arguments)}function n_(){var t=Hg(Qb());return t.copy=function(){return Kb(t,n_()).exponent(t.exponent())},sg.apply(t,arguments)}function r_(){return n_.apply(null,arguments).exponent(.5)}function i_(){var t=[],e=bg;function n(n){if(!isNaN(n=+n))return e((l(t,n)-1)/(t.length-1))}return n.domain=function(e){if(!arguments.length)return t.slice();t=[];for(var r,a=0,o=e.length;a<o;++a)null==(r=e[a])||isNaN(r=+r)||t.push(r);return t.sort(i),n},n.interpolator=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return i_(e).domain(t)},sg.apply(n,arguments)}function a_(){var t,e,n,r,i,a,o,s=0,c=.5,l=1,u=bg,h=!1;function f(t){return isNaN(t=+t)?o:(t=.5+((t=+a(t))-e)*(t<e?r:i),u(h?Math.max(0,Math.min(1,t)):t))}return f.domain=function(o){return arguments.length?(t=a(s=+o[0]),e=a(c=+o[1]),n=a(l=+o[2]),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),f):[s,c,l]},f.clamp=function(t){return arguments.length?(h=!!t,f):h},f.interpolator=function(t){return arguments.length?(u=t,f):u},f.unknown=function(t){return arguments.length?(o=t,f):o},function(o){return a=o,t=o(s),e=o(c),n=o(l),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),f}}function o_(){var t=Sg(a_()(bg));return t.copy=function(){return Kb(t,o_())},sg.apply(t,arguments)}function s_(){var t=Rg(a_()).domain([.1,1,10]);return t.copy=function(){return Kb(t,s_()).base(t.base())},sg.apply(t,arguments)}function c_(){var t=Yg(a_());return t.copy=function(){return Kb(t,c_()).constant(t.constant())},sg.apply(t,arguments)}function l_(){var t=Hg(a_());return t.copy=function(){return Kb(t,l_()).exponent(t.exponent())},sg.apply(t,arguments)}function u_(){return l_.apply(null,arguments).exponent(.5)}function h_(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}const f_=h_("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),d_=h_("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),p_=h_("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),g_=h_("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),y_=h_("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),m_=h_("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),b_=h_("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),__=h_("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),v_=h_("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),x_=h_("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function k_(t){return mn(t[t.length-1])}var w_=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(h_);const T_=k_(w_);var E_=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(h_);const C_=k_(E_);var S_=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(h_);const A_=k_(S_);var M_=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(h_);const N_=k_(M_);var D_=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(h_);const L_=k_(D_);var O_=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(h_);const B_=k_(O_);var I_=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(h_);const F_=k_(I_);var R_=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(h_);const P_=k_(R_);var $_=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(h_);const j_=k_($_);var Y_=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(h_);const z_=k_(Y_);var U_=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(h_);const q_=k_(U_);var W_=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(h_);const H_=k_(W_);var V_=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(h_);const G_=k_(V_);var X_=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(h_);const Z_=k_(X_);var Q_=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(h_);const K_=k_(Q_);var J_=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(h_);const tv=k_(J_);var ev=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(h_);const nv=k_(ev);var rv=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(h_);const iv=k_(rv);var av=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(h_);const ov=k_(av);var sv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(h_);const cv=k_(sv);var lv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(h_);const uv=k_(lv);var hv=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(h_);const fv=k_(hv);var dv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(h_);const pv=k_(dv);var gv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(h_);const yv=k_(gv);var mv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(h_);const bv=k_(mv);var _v=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(h_);const vv=k_(_v);var xv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(h_);const kv=k_(xv);function wv(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"}const Tv=zp(qa(300,.5,0),qa(-240,.5,1));var Ev=zp(qa(-100,.75,.35),qa(80,1.5,.8)),Cv=zp(qa(260,.75,.35),qa(80,1.5,.8)),Sv=qa();function Av(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Sv.h=360*t-100,Sv.s=1.5-1.5*e,Sv.l=.8-.9*e,Sv+""}var Mv=Qe(),Nv=Math.PI/3,Dv=2*Math.PI/3;function Lv(t){var e;return t=(.5-t)*Math.PI,Mv.r=255*(e=Math.sin(t))*e,Mv.g=255*(e=Math.sin(t+Nv))*e,Mv.b=255*(e=Math.sin(t+Dv))*e,Mv+""}function Ov(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"}function Bv(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const Iv=Bv(h_("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var Fv=Bv(h_("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Rv=Bv(h_("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Pv=Bv(h_("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function $v(t){return Te(ie(t).call(document.documentElement))}var jv=0;function Yv(){return new zv}function zv(){this._="@"+(++jv).toString(36)}function Uv(t){return"string"==typeof t?new xe([document.querySelectorAll(t)],[document.documentElement]):new xe([null==t?[]:t],ve)}function qv(t,e){null==e&&(e=Nn().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n<r;++n)i[n]=Dn(t,e[n]);return i}function Wv(t){return function(){return t}}zv.prototype=Yv.prototype={constructor:zv,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var Hv=Math.abs,Vv=Math.atan2,Gv=Math.cos,Xv=Math.max,Zv=Math.min,Qv=Math.sin,Kv=Math.sqrt,Jv=1e-12,tx=Math.PI,ex=tx/2,nx=2*tx;function rx(t){return t>1?0:t<-1?tx:Math.acos(t)}function ix(t){return t>=1?ex:t<=-1?-ex:Math.asin(t)}function ax(t){return t.innerRadius}function ox(t){return t.outerRadius}function sx(t){return t.startAngle}function cx(t){return t.endAngle}function lx(t){return t&&t.padAngle}function ux(t,e,n,r,i,a,o,s){var c=n-t,l=r-e,u=o-i,h=s-a,f=h*c-u*l;if(!(f*f<Jv))return[t+(f=(u*(e-a)-h*(t-i))/f)*c,e+f*l]}function hx(t,e,n,r,i,a,o){var s=t-n,c=e-r,l=(o?a:-a)/Kv(s*s+c*c),u=l*c,h=-l*s,f=t+u,d=e+h,p=n+u,g=r+h,y=(f+p)/2,m=(d+g)/2,b=p-f,_=g-d,v=b*b+_*_,x=i-a,k=f*g-p*d,w=(_<0?-1:1)*Kv(Xv(0,x*x*v-k*k)),T=(k*_-b*w)/v,E=(-k*b-_*w)/v,C=(k*_+b*w)/v,S=(-k*b+_*w)/v,A=T-y,M=E-m,N=C-y,D=S-m;return A*A+M*M>N*N+D*D&&(T=C,E=S),{cx:T,cy:E,x01:-u,y01:-h,x11:T*(i/x-1),y11:E*(i/x-1)}}function fx(){var t=ax,e=ox,n=Wv(0),r=null,i=sx,a=cx,o=lx,s=null;function c(){var c,l,u=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-ex,d=a.apply(this,arguments)-ex,p=Hv(d-f),g=d>f;if(s||(s=c=Hi()),h<u&&(l=h,h=u,u=l),h>Jv)if(p>nx-Jv)s.moveTo(h*Gv(f),h*Qv(f)),s.arc(0,0,h,f,d,!g),u>Jv&&(s.moveTo(u*Gv(d),u*Qv(d)),s.arc(0,0,u,d,f,g));else{var y,m,b=f,_=d,v=f,x=d,k=p,w=p,T=o.apply(this,arguments)/2,E=T>Jv&&(r?+r.apply(this,arguments):Kv(u*u+h*h)),C=Zv(Hv(h-u)/2,+n.apply(this,arguments)),S=C,A=C;if(E>Jv){var M=ix(E/u*Qv(T)),N=ix(E/h*Qv(T));(k-=2*M)>Jv?(v+=M*=g?1:-1,x-=M):(k=0,v=x=(f+d)/2),(w-=2*N)>Jv?(b+=N*=g?1:-1,_-=N):(w=0,b=_=(f+d)/2)}var D=h*Gv(b),L=h*Qv(b),O=u*Gv(x),B=u*Qv(x);if(C>Jv){var I,F=h*Gv(_),R=h*Qv(_),P=u*Gv(v),$=u*Qv(v);if(p<tx&&(I=ux(D,L,P,$,F,R,O,B))){var j=D-I[0],Y=L-I[1],z=F-I[0],U=R-I[1],q=1/Qv(rx((j*z+Y*U)/(Kv(j*j+Y*Y)*Kv(z*z+U*U)))/2),W=Kv(I[0]*I[0]+I[1]*I[1]);S=Zv(C,(u-W)/(q-1)),A=Zv(C,(h-W)/(q+1))}}w>Jv?A>Jv?(y=hx(P,$,D,L,h,A,g),m=hx(F,R,O,B,h,A,g),s.moveTo(y.cx+y.x01,y.cy+y.y01),A<C?s.arc(y.cx,y.cy,A,Vv(y.y01,y.x01),Vv(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,A,Vv(y.y01,y.x01),Vv(y.y11,y.x11),!g),s.arc(0,0,h,Vv(y.cy+y.y11,y.cx+y.x11),Vv(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,Vv(m.y11,m.x11),Vv(m.y01,m.x01),!g))):(s.moveTo(D,L),s.arc(0,0,h,b,_,!g)):s.moveTo(D,L),u>Jv&&k>Jv?S>Jv?(y=hx(O,B,F,R,u,-S,g),m=hx(D,L,P,$,u,-S,g),s.lineTo(y.cx+y.x01,y.cy+y.y01),S<C?s.arc(y.cx,y.cy,S,Vv(y.y01,y.x01),Vv(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,S,Vv(y.y01,y.x01),Vv(y.y11,y.x11),!g),s.arc(0,0,u,Vv(y.cy+y.y11,y.cx+y.x11),Vv(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,S,Vv(m.y11,m.x11),Vv(m.y01,m.x01),!g))):s.arc(0,0,u,x,v,g):s.lineTo(O,B)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-tx/2;return[Gv(r)*n,Qv(r)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Wv(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Wv(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Wv(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Wv(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Wv(+t),c):i},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:Wv(+t),c):a},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Wv(+t),c):o},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c}function dx(t){this._context=t}function px(t){return new dx(t)}function gx(t){return t[0]}function yx(t){return t[1]}function mx(){var t=gx,e=yx,n=Wv(!0),r=null,i=px,a=null;function o(o){var s,c,l,u=o.length,h=!1;for(null==r&&(a=i(l=Hi())),s=0;s<=u;++s)!(s<u&&n(c=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(c,s,o),+e(c,s,o));if(l)return a=null,l+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:Wv(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:Wv(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:Wv(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o}function bx(){var t=gx,e=null,n=Wv(0),r=yx,i=Wv(!0),a=null,o=px,s=null;function c(c){var l,u,h,f,d,p=c.length,g=!1,y=new Array(p),m=new Array(p);for(null==a&&(s=o(d=Hi())),l=0;l<=p;++l){if(!(l<p&&i(f=c[l],l,c))===g)if(g=!g)u=l,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=l-1;h>=u;--h)s.point(y[h],m[h]);s.lineEnd(),s.areaEnd()}g&&(y[l]=+t(f,l,c),m[l]=+n(f,l,c),s.point(e?+e(f,l,c):y[l],r?+r(f,l,c):m[l]))}if(d)return s=null,d+""||null}function l(){return mx().defined(i).curve(o).context(a)}return c.x=function(n){return arguments.length?(t="function"==typeof n?n:Wv(+n),e=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:Wv(+e),c):t},c.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:Wv(+t),c):e},c.y=function(t){return arguments.length?(n="function"==typeof t?t:Wv(+t),r=null,c):n},c.y0=function(t){return arguments.length?(n="function"==typeof t?t:Wv(+t),c):n},c.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Wv(+t),c):r},c.lineX0=c.lineY0=function(){return l().x(t).y(n)},c.lineY1=function(){return l().x(t).y(r)},c.lineX1=function(){return l().x(e).y(n)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:Wv(!!t),c):i},c.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),c):o},c.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),c):a},c}function _x(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function vx(t){return t}function xx(){var t=vx,e=_x,n=null,r=Wv(0),i=Wv(nx),a=Wv(0);function o(o){var s,c,l,u,h,f=o.length,d=0,p=new Array(f),g=new Array(f),y=+r.apply(this,arguments),m=Math.min(nx,Math.max(-nx,i.apply(this,arguments)-y)),b=Math.min(Math.abs(m)/f,a.apply(this,arguments)),_=b*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(o[s],s,o))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),s=0,l=d?(m-f*_)/d:0;s<f;++s,y=u)c=p[s],u=y+((h=g[c])>0?h*l:0)+_,g[c]={data:o[c],index:s,value:h,startAngle:y,endAngle:u,padAngle:b};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:Wv(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Wv(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Wv(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Wv(+t),o):a},o}dx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var kx=Tx(px);function wx(t){this._curve=t}function Tx(t){function e(e){return new wx(t(e))}return e._curve=t,e}function Ex(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(Tx(t)):e()._curve},t}function Cx(){return Ex(mx().curve(kx))}function Sx(){var t=bx().curve(kx),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Ex(n())},delete t.lineX0,t.lineEndAngle=function(){return Ex(r())},delete t.lineX1,t.lineInnerRadius=function(){return Ex(i())},delete t.lineY0,t.lineOuterRadius=function(){return Ex(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(Tx(t)):e()._curve},t}function Ax(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}wx.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var Mx=Array.prototype.slice;function Nx(t){return t.source}function Dx(t){return t.target}function Lx(t){var e=Nx,n=Dx,r=gx,i=yx,a=null;function o(){var o,s=Mx.call(arguments),c=e.apply(this,s),l=n.apply(this,s);if(a||(a=o=Hi()),t(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=l,s)),+i.apply(this,s)),o)return a=null,o+""||null}return o.source=function(t){return arguments.length?(e=t,o):e},o.target=function(t){return arguments.length?(n=t,o):n},o.x=function(t){return arguments.length?(r="function"==typeof t?t:Wv(+t),o):r},o.y=function(t){return arguments.length?(i="function"==typeof t?t:Wv(+t),o):i},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}function Ox(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function Bx(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function Ix(t,e,n,r,i){var a=Ax(e,n),o=Ax(e,n=(n+i)/2),s=Ax(r,n),c=Ax(r,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],c[0],c[1])}function Fx(){return Lx(Ox)}function Rx(){return Lx(Bx)}function Px(){var t=Lx(Ix);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const $x={draw:function(t,e){var n=Math.sqrt(e/tx);t.moveTo(n,0),t.arc(0,0,n,0,nx)}},jx={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}};var Yx=Math.sqrt(1/3),zx=2*Yx;const Ux={draw:function(t,e){var n=Math.sqrt(e/zx),r=n*Yx;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}};var qx=Math.sin(tx/10)/Math.sin(7*tx/10),Wx=Math.sin(nx/10)*qx,Hx=-Math.cos(nx/10)*qx;const Vx={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=Wx*n,i=Hx*n;t.moveTo(0,-n),t.lineTo(r,i);for(var a=1;a<5;++a){var o=nx*a/5,s=Math.cos(o),c=Math.sin(o);t.lineTo(c*n,-s*n),t.lineTo(s*r-c*i,c*r+s*i)}t.closePath()}},Gx={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}};var Xx=Math.sqrt(3);const Zx={draw:function(t,e){var n=-Math.sqrt(e/(3*Xx));t.moveTo(0,2*n),t.lineTo(-Xx*n,-n),t.lineTo(Xx*n,-n),t.closePath()}};var Qx=-.5,Kx=Math.sqrt(3)/2,Jx=1/Math.sqrt(12),tk=3*(Jx/2+1);const ek={draw:function(t,e){var n=Math.sqrt(e/tk),r=n/2,i=n*Jx,a=r,o=n*Jx+n,s=-a,c=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,c),t.lineTo(Qx*r-Kx*i,Kx*r+Qx*i),t.lineTo(Qx*a-Kx*o,Kx*a+Qx*o),t.lineTo(Qx*s-Kx*c,Kx*s+Qx*c),t.lineTo(Qx*r+Kx*i,Qx*i-Kx*r),t.lineTo(Qx*a+Kx*o,Qx*o-Kx*a),t.lineTo(Qx*s+Kx*c,Qx*c-Kx*s),t.closePath()}};var nk=[$x,jx,Ux,Gx,Vx,Zx,ek];function rk(){var t=Wv($x),e=Wv(64),n=null;function r(){var r;if(n||(n=r=Hi()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(e){return arguments.length?(t="function"==typeof e?e:Wv(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:Wv(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r}function ik(){}function ak(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function ok(t){this._context=t}function sk(t){return new ok(t)}function ck(t){this._context=t}function lk(t){return new ck(t)}function uk(t){this._context=t}function hk(t){return new uk(t)}function fk(t,e){this._basis=new ok(t),this._beta=e}ok.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ak(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ak(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ck.prototype={areaStart:ik,areaEnd:ik,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:ak(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},uk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:ak(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},fk.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,s=e[n]-a,c=-1;++c<=n;)r=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*e[c]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const dk=function t(e){function n(t){return 1===e?new ok(t):new fk(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function pk(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function gk(t,e){this._context=t,this._k=(1-e)/6}gk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:pk(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:pk(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const yk=function t(e){function n(t){return new gk(t,e)}return n.tension=function(e){return t(+e)},n}(0);function mk(t,e){this._context=t,this._k=(1-e)/6}mk.prototype={areaStart:ik,areaEnd:ik,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:pk(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const bk=function t(e){function n(t){return new mk(t,e)}return n.tension=function(e){return t(+e)},n}(0);function _k(t,e){this._context=t,this._k=(1-e)/6}_k.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:pk(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const vk=function t(e){function n(t){return new _k(t,e)}return n.tension=function(e){return t(+e)},n}(0);function xk(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Jv){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Jv){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*l+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*l+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function kk(t,e){this._context=t,this._alpha=e}kk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:xk(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const wk=function t(e){function n(t){return e?new kk(t,e):new gk(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Tk(t,e){this._context=t,this._alpha=e}Tk.prototype={areaStart:ik,areaEnd:ik,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:xk(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ek=function t(e){function n(t){return e?new Tk(t,e):new mk(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ck(t,e){this._context=t,this._alpha=e}Ck.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:xk(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Sk=function t(e){function n(t){return e?new Ck(t,e):new _k(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ak(t){this._context=t}function Mk(t){return new Ak(t)}function Nk(t){return t<0?-1:1}function Dk(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Nk(a)+Nk(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Lk(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Ok(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function Bk(t){this._context=t}function Ik(t){this._context=new Fk(t)}function Fk(t){this._context=t}function Rk(t){return new Bk(t)}function Pk(t){return new Ik(t)}function $k(t){this._context=t}function jk(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function Yk(t){return new $k(t)}function zk(t,e){this._context=t,this._t=e}function Uk(t){return new zk(t,.5)}function qk(t){return new zk(t,0)}function Wk(t){return new zk(t,1)}function Hk(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a<i;++a)for(r=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Vk(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Gk(t,e){return t[e]}function Xk(){var t=Wv([]),e=Vk,n=Hk,r=Gk;function i(i){var a,o,s=t.apply(this,arguments),c=i.length,l=s.length,u=new Array(l);for(a=0;a<l;++a){for(var h,f=s[a],d=u[a]=new Array(c),p=0;p<c;++p)d[p]=h=[0,+r(i[p],f,p,i)],h.data=i[p];d.key=f}for(a=0,o=e(u);a<l;++a)u[o[a]].index=a;return n(u,o),u}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:Wv(Mx.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:Wv(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?Vk:"function"==typeof t?t:Wv(Mx.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?Hk:t,i):n},i}function Zk(t,e){if((r=t.length)>0){for(var n,r,i,a=0,o=t[0].length;a<o;++a){for(i=n=0;n<r;++n)i+=t[n][a][1]||0;if(i)for(n=0;n<r;++n)t[n][a][1]/=i}Hk(t,e)}}function Qk(t,e){if((s=t.length)>0)for(var n,r,i,a,o,s,c=0,l=t[e[0]].length;c<l;++c)for(a=o=0,n=0;n<s;++n)(i=(r=t[e[n]][c])[1]-r[0])>0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)}function Kk(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],a=i.length;r<a;++r){for(var o=0,s=0;o<n;++o)s+=t[o][r][1]||0;i[r][1]+=i[r][0]=-s/2}Hk(t,e)}}function Jk(t,e){if((i=t.length)>0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,a=0,o=1;o<r;++o){for(var s=0,c=0,l=0;s<i;++s){for(var u=t[e[s]],h=u[o][1]||0,f=(h-(u[o-1][1]||0))/2,d=0;d<s;++d){var p=t[e[d]];f+=(p[o][1]||0)-(p[o-1][1]||0)}c+=h,l+=f*h}n[o-1][1]+=n[o-1][0]=a,c&&(a-=l/c)}n[o-1][1]+=n[o-1][0]=a,Hk(t,e)}}function tw(t){var e=t.map(ew);return Vk(t).sort((function(t,n){return e[t]-e[n]}))}function ew(t){for(var e,n=-1,r=0,i=t.length,a=-1/0;++n<i;)(e=+t[n][1])>a&&(a=e,r=n);return r}function nw(t){var e=t.map(rw);return Vk(t).sort((function(t,n){return e[t]-e[n]}))}function rw(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}function iw(t){return nw(t).reverse()}function aw(t){var e,n,r=t.length,i=t.map(rw),a=tw(t),o=0,s=0,c=[],l=[];for(e=0;e<r;++e)n=a[e],o<s?(o+=i[n],c.push(n)):(s+=i[n],l.push(n));return l.reverse().concat(c)}function ow(t){return Vk(t).reverse()}Ak.prototype={areaStart:ik,areaEnd:ik,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},Bk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ok(this,this._t0,Lk(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Ok(this,Lk(this,n=Dk(this,t,e)),n);break;default:Ok(this,this._t0,n=Dk(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Ik.prototype=Object.create(Bk.prototype)).point=function(t,e){Bk.prototype.point.call(this,e,t)},Fk.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},$k.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=jk(t),i=jk(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},zk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var sw="%Y-%m-%dT%H:%M:%S.%LZ",cw=Date.prototype.toISOString?function(t){return t.toISOString()}:ym(sw);const lw=cw;var uw=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:mm(sw);const hw=uw;function fw(t,e,n){var r=new Hn,i=e;return null==e?(r.restart(t,e,n),r):(e=+e,n=null==n?qn():+n,r.restart((function a(o){o+=i,r.restart(a,i+=e,n),t(o)}),e,n),r)}function dw(t){return function(){return t}}function pw(t){return t[0]}function gw(t){return t[1]}function yw(){this._=null}function mw(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function bw(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function _w(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function vw(t){for(;t.L;)t=t.L;return t}yw.prototype={constructor:yw,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=vw(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(bw(this,n),n=(t=n).U),n.C=!1,r.C=!0,_w(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(_w(this,n),n=(t=n).U),n.C=!1,r.C=!0,bw(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,a=t.L,o=t.R;if(n=a?o?vw(o):a:o,i?i.L===t?i.L=n:i.R=n:this._=n,a&&o?(r=n.C,n.C=t.C,n.L=a,a.U=n,n!==o?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=o,o.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,bw(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,_w(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,bw(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,_w(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,bw(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,_w(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};const xw=yw;function kw(t,e,n,r){var i=[null,null],a=Hw.push(i)-1;return i.left=t,i.right=e,n&&Tw(i,t,e,n),r&&Tw(i,e,t,r),qw[t.index].halfedges.push(a),qw[e.index].halfedges.push(a),i}function ww(t,e,n){var r=[e,n];return r.left=t,r}function Tw(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function Ew(t,e,n,r,i){var a,o=t[0],s=t[1],c=o[0],l=o[1],u=0,h=1,f=s[0]-c,d=s[1]-l;if(a=e-c,f||!(a>0)){if(a/=f,f<0){if(a<u)return;a<h&&(h=a)}else if(f>0){if(a>h)return;a>u&&(u=a)}if(a=r-c,f||!(a<0)){if(a/=f,f<0){if(a>h)return;a>u&&(u=a)}else if(f>0){if(a<u)return;a<h&&(h=a)}if(a=n-l,d||!(a>0)){if(a/=d,d<0){if(a<u)return;a<h&&(h=a)}else if(d>0){if(a>h)return;a>u&&(u=a)}if(a=i-l,d||!(a<0)){if(a/=d,d<0){if(a>h)return;a>u&&(u=a)}else if(d>0){if(a<u)return;a<h&&(h=a)}return!(u>0||h<1)||(u>0&&(t[0]=[c+u*f,l+u*d]),h<1&&(t[1]=[c+h*f,l+h*d]),!0)}}}}}function Cw(t,e,n,r,i){var a=t[1];if(a)return!0;var o,s,c=t[0],l=t.left,u=t.right,h=l[0],f=l[1],d=u[0],p=u[1],g=(h+d)/2,y=(f+p)/2;if(p===f){if(g<e||g>=r)return;if(h>d){if(c){if(c[1]>=i)return}else c=[g,n];a=[g,i]}else{if(c){if(c[1]<n)return}else c=[g,i];a=[g,n]}}else if(s=y-(o=(h-d)/(p-f))*g,o<-1||o>1)if(h>d){if(c){if(c[1]>=i)return}else c=[(n-s)/o,n];a=[(i-s)/o,i]}else{if(c){if(c[1]<n)return}else c=[(i-s)/o,i];a=[(n-s)/o,n]}else if(f<p){if(c){if(c[0]>=r)return}else c=[e,o*e+s];a=[r,o*r+s]}else{if(c){if(c[0]<e)return}else c=[r,o*r+s];a=[e,o*e+s]}return t[0]=c,t[1]=a,!0}function Sw(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function Aw(t,e){return e[+(e.left!==t.site)]}function Mw(t,e){return e[+(e.left===t.site)]}var Nw,Dw=[];function Lw(){mw(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ow(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,a=n.site;if(r!==a){var o=i[0],s=i[1],c=r[0]-o,l=r[1]-s,u=a[0]-o,h=a[1]-s,f=2*(c*h-l*u);if(!(f>=-Gw)){var d=c*c+l*l,p=u*u+h*h,g=(h*d-l*p)/f,y=(c*p-u*d)/f,m=Dw.pop()||new Lw;m.arc=t,m.site=i,m.x=g+o,m.y=(m.cy=y+s)+Math.sqrt(g*g+y*y),t.circle=m;for(var b=null,_=Ww._;_;)if(m.y<_.y||m.y===_.y&&m.x<=_.x){if(!_.L){b=_.P;break}_=_.L}else{if(!_.R){b=_;break}_=_.R}Ww.insert(b,m),b||(Nw=m)}}}}function Bw(t){var e=t.circle;e&&(e.P||(Nw=e.N),Ww.remove(e),Dw.push(e),mw(e),t.circle=null)}var Iw=[];function Fw(){mw(this),this.edge=this.site=this.circle=null}function Rw(t){var e=Iw.pop()||new Fw;return e.site=t,e}function Pw(t){Bw(t),Uw.remove(t),Iw.push(t),mw(t)}function $w(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,o=t.N,s=[t];Pw(t);for(var c=a;c.circle&&Math.abs(n-c.circle.x)<Vw&&Math.abs(r-c.circle.cy)<Vw;)a=c.P,s.unshift(c),Pw(c),c=a;s.unshift(c),Bw(c);for(var l=o;l.circle&&Math.abs(n-l.circle.x)<Vw&&Math.abs(r-l.circle.cy)<Vw;)o=l.N,s.push(l),Pw(l),l=o;s.push(l),Bw(l);var u,h=s.length;for(u=1;u<h;++u)l=s[u],c=s[u-1],Tw(l.edge,c.site,l.site,i);c=s[0],(l=s[h-1]).edge=kw(c.site,l.site,null,i),Ow(c),Ow(l)}function jw(t){for(var e,n,r,i,a=t[0],o=t[1],s=Uw._;s;)if((r=Yw(s,o)-a)>Vw)s=s.L;else{if(!((i=a-zw(s,o))>Vw)){r>-Vw?(e=s.P,n=s):i>-Vw?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){qw[t.index]={site:t,halfedges:[]}}(t);var c=Rw(t);if(Uw.insert(e,c),e||n){if(e===n)return Bw(e),n=Rw(e.site),Uw.insert(c,n),c.edge=n.edge=kw(e.site,c.site),Ow(e),void Ow(n);if(n){Bw(e),Bw(n);var l=e.site,u=l[0],h=l[1],f=t[0]-u,d=t[1]-h,p=n.site,g=p[0]-u,y=p[1]-h,m=2*(f*y-d*g),b=f*f+d*d,_=g*g+y*y,v=[(y*b-d*_)/m+u,(f*_-g*b)/m+h];Tw(n.edge,l,p,v),c.edge=kw(l,t,null,v),n.edge=kw(t,p,null,v),Ow(e),Ow(n)}else c.edge=kw(e.site,c.site)}}function Yw(t,e){var n=t.site,r=n[0],i=n[1],a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;var s=(n=o.site)[0],c=n[1],l=c-e;if(!l)return s;var u=s-r,h=1/a-1/l,f=u/l;return h?(-f+Math.sqrt(f*f-2*h*(u*u/(-2*l)-c+l/2+i-a/2)))/h+r:(r+s)/2}function zw(t,e){var n=t.N;if(n)return Yw(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var Uw,qw,Ww,Hw,Vw=1e-6,Gw=1e-12;function Xw(t,e,n){return(t[0]-n[0])*(e[1]-t[1])-(t[0]-e[0])*(n[1]-t[1])}function Zw(t,e){return e[1]-t[1]||e[0]-t[0]}function Qw(t,e){var n,r,i,a=t.sort(Zw).pop();for(Hw=[],qw=new Array(t.length),Uw=new xw,Ww=new xw;;)if(i=Nw,a&&(!i||a[1]<i.y||a[1]===i.y&&a[0]<i.x))a[0]===n&&a[1]===r||(jw(a),n=a[0],r=a[1]),a=t.pop();else{if(!i)break;$w(i.arc)}if(function(){for(var t,e,n,r,i=0,a=qw.length;i<a;++i)if((t=qw[i])&&(r=(e=t.halfedges).length)){var o=new Array(r),s=new Array(r);for(n=0;n<r;++n)o[n]=n,s[n]=Sw(t,Hw[e[n]]);for(o.sort((function(t,e){return s[e]-s[t]})),n=0;n<r;++n)s[n]=e[o[n]];for(n=0;n<r;++n)e[n]=s[n]}}(),e){var o=+e[0][0],s=+e[0][1],c=+e[1][0],l=+e[1][1];!function(t,e,n,r){for(var i,a=Hw.length;a--;)Cw(i=Hw[a],t,e,n,r)&&Ew(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>Vw||Math.abs(i[0][1]-i[1][1])>Vw)||delete Hw[a]}(o,s,c,l),function(t,e,n,r){var i,a,o,s,c,l,u,h,f,d,p,g,y=qw.length,m=!0;for(i=0;i<y;++i)if(a=qw[i]){for(o=a.site,s=(c=a.halfedges).length;s--;)Hw[c[s]]||c.splice(s,1);for(s=0,l=c.length;s<l;)p=(d=Mw(a,Hw[c[s]]))[0],g=d[1],h=(u=Aw(a,Hw[c[++s%l]]))[0],f=u[1],(Math.abs(p-h)>Vw||Math.abs(g-f)>Vw)&&(c.splice(s,0,Hw.push(ww(o,d,Math.abs(p-t)<Vw&&r-g>Vw?[t,Math.abs(h-t)<Vw?f:r]:Math.abs(g-r)<Vw&&n-p>Vw?[Math.abs(f-r)<Vw?h:n,r]:Math.abs(p-n)<Vw&&g-e>Vw?[n,Math.abs(h-n)<Vw?f:e]:Math.abs(g-e)<Vw&&p-t>Vw?[Math.abs(f-e)<Vw?h:t,e]:null))-1),++l);l&&(m=!1)}if(m){var b,_,v,x=1/0;for(i=0,m=null;i<y;++i)(a=qw[i])&&(v=(b=(o=a.site)[0]-t)*b+(_=o[1]-e)*_)<x&&(x=v,m=a);if(m){var k=[t,e],w=[t,r],T=[n,r],E=[n,e];m.halfedges.push(Hw.push(ww(o=m.site,k,w))-1,Hw.push(ww(o,w,T))-1,Hw.push(ww(o,T,E))-1,Hw.push(ww(o,E,k))-1)}}for(i=0;i<y;++i)(a=qw[i])&&(a.halfedges.length||delete qw[i])}(o,s,c,l)}this.edges=Hw,this.cells=qw,Uw=Ww=Hw=qw=null}function Kw(){var t=pw,e=gw,n=null;function r(r){return new Qw(r.map((function(n,i){var a=[Math.round(t(n,i,r)/Vw)*Vw,Math.round(e(n,i,r)/Vw)*Vw];return a.index=i,a.data=n,a})),n)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(e){return arguments.length?(t="function"==typeof e?e:dw(+e),r):t},r.y=function(t){return arguments.length?(e="function"==typeof t?t:dw(+t),r):e},r.extent=function(t){return arguments.length?(n=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(t){return arguments.length?(n=null==t?null:[[0,0],[+t[0],+t[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r}function Jw(t){return function(){return t}}function tT(t,e,n){this.target=t,this.type=e,this.transform=n}function eT(t,e,n){this.k=t,this.x=e,this.y=n}Qw.prototype={constructor:Qw,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return Aw(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(a=(i=n.halfedges).length)for(var i,a,o,s=n.site,c=-1,l=e[i[a-1]],u=l.left===s?l.right:l.left;++c<a;)o=u,u=(l=e[i[c]]).left===s?l.right:l.left,o&&u&&r<o.index&&r<u.index&&Xw(s,o,u)<0&&t.push([s.data,o.data,u.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,a=this,o=a._found||0,s=a.cells.length;!(i=a.cells[o]);)if(++o>=s)return null;var c=t-i.site[0],l=e-i.site[1],u=c*c+l*l;do{i=a.cells[r=o],o=null,i.halfedges.forEach((function(n){var r=a.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var c=t-s[0],l=e-s[1],h=c*c+l*l;h<u&&(u=h,o=s.index)}}))}while(null!==o);return a._found=r,null==n||u<=n*n?i.site:null}},eT.prototype={constructor:eT,scale:function(t){return 1===t?this:new eT(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new eT(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var nT=new eT(1,0,0);function rT(t){for(;!t.__zoom;)if(!(t=t.parentNode))return nT;return t.__zoom}function iT(){ue.stopImmediatePropagation()}function aT(){ue.preventDefault(),ue.stopImmediatePropagation()}function oT(){return!ue.ctrlKey&&!ue.button}function sT(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function cT(){return this.__zoom||nT}function lT(){return-ue.deltaY*(1===ue.deltaMode?.05:ue.deltaMode?1:.002)}function uT(){return navigator.maxTouchPoints||"ontouchstart"in this}function hT(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function fT(){var t,e,n=oT,r=sT,i=hT,a=lT,o=uT,s=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],l=250,u=Lp,h=ft("start","zoom","end"),f=500,d=0;function p(t){t.property("__zoom",cT).on("wheel.zoom",x).on("mousedown.zoom",k).on("dblclick.zoom",w).filter(o).on("touchstart.zoom",T).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new eT(e,t.x,t.y)}function y(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new eT(t.k,r,i)}function m(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function b(t,e,n){t.on("start.zoom",(function(){_(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){_(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,a=_(t,i),o=r.apply(t,i),s=null==n?m(o):"function"==typeof n?n.apply(t,i):n,c=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),l=t.__zoom,h="function"==typeof e?e.apply(t,i):e,f=u(l.invert(s).concat(c/l.k),h.invert(s).concat(c/h.k));return function(t){if(1===t)t=h;else{var e=f(t),n=c/e[2];t=new eT(n,s[0]-e[0]*n,s[1]-e[1]*n)}a.zoom(null,t)}}))}function _(t,e,n){return!n&&t.__zooming||new v(t,e)}function v(t,e){this.that=t,this.args=e,this.active=0,this.extent=r.apply(t,e),this.taps=0}function x(){if(n.apply(this,arguments)){var t=_(this,arguments),e=this.__zoom,r=Math.max(s[0],Math.min(s[1],e.k*Math.pow(2,a.apply(this,arguments)))),o=On(this);if(t.wheel)t.mouse[0][0]===o[0]&&t.mouse[0][1]===o[1]||(t.mouse[1]=e.invert(t.mouse[0]=o)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[o,e.invert(o)],ar(this),t.start()}aT(),t.wheel=setTimeout(l,150),t.zoom("mouse",i(y(g(e,r),t.mouse[0],t.mouse[1]),t.extent,c))}function l(){t.wheel=null,t.end()}}function k(){if(!e&&n.apply(this,arguments)){var t=_(this,arguments,!0),r=Te(ue.view).on("mousemove.zoom",l,!0).on("mouseup.zoom",u,!0),a=On(this),o=ue.clientX,s=ue.clientY;Se(ue.view),iT(),t.mouse=[a,this.__zoom.invert(a)],ar(this),t.start()}function l(){if(aT(),!t.moved){var e=ue.clientX-o,n=ue.clientY-s;t.moved=e*e+n*n>d}t.zoom("mouse",i(y(t.that.__zoom,t.mouse[0]=On(t.that),t.mouse[1]),t.extent,c))}function u(){r.on("mousemove.zoom mouseup.zoom",null),Ae(ue.view,t.moved),aT(),t.end()}}function w(){if(n.apply(this,arguments)){var t=this.__zoom,e=On(this),a=t.invert(e),o=t.k*(ue.shiftKey?.5:2),s=i(y(g(t,o),e,a),r.apply(this,arguments),c);aT(),l>0?Te(this).transition().duration(l).call(b,s,e):Te(this).call(p.transform,s)}}function T(){if(n.apply(this,arguments)){var e,r,i,a,o=ue.touches,s=o.length,c=_(this,arguments,ue.changedTouches.length===s);for(iT(),r=0;r<s;++r)a=[a=Ln(this,o,(i=o[r]).identifier),this.__zoom.invert(a),i.identifier],c.touch0?c.touch1||c.touch0[2]===a[2]||(c.touch1=a,c.taps=0):(c.touch0=a,e=!0,c.taps=1+!!t);t&&(t=clearTimeout(t)),e&&(c.taps<2&&(t=setTimeout((function(){t=null}),f)),ar(this),c.start())}}function E(){if(this.__zooming){var e,n,r,a,o=_(this,arguments),s=ue.changedTouches,l=s.length;for(aT(),t&&(t=clearTimeout(t)),o.taps=0,e=0;e<l;++e)r=Ln(this,s,(n=s[e]).identifier),o.touch0&&o.touch0[2]===n.identifier?o.touch0[0]=r:o.touch1&&o.touch1[2]===n.identifier&&(o.touch1[0]=r);if(n=o.that.__zoom,o.touch1){var u=o.touch0[0],h=o.touch0[1],f=o.touch1[0],d=o.touch1[1],p=(p=f[0]-u[0])*p+(p=f[1]-u[1])*p,m=(m=d[0]-h[0])*m+(m=d[1]-h[1])*m;n=g(n,Math.sqrt(p/m)),r=[(u[0]+f[0])/2,(u[1]+f[1])/2],a=[(h[0]+d[0])/2,(h[1]+d[1])/2]}else{if(!o.touch0)return;r=o.touch0[0],a=o.touch0[1]}o.zoom("touch",i(y(n,r,a),o.extent,c))}}function C(){if(this.__zooming){var t,n,r=_(this,arguments),i=ue.changedTouches,a=i.length;for(iT(),e&&clearTimeout(e),e=setTimeout((function(){e=null}),f),t=0;t<a;++t)n=i[t],r.touch0&&r.touch0[2]===n.identifier?delete r.touch0:r.touch1&&r.touch1[2]===n.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),2===r.taps){var o=Te(this).on("dblclick.zoom");o&&o.apply(this,arguments)}}}return p.transform=function(t,e,n){var r=t.selection?t.selection():t;r.property("__zoom",cT),t!==r?b(t,e,n):r.interrupt().each((function(){_(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},p.scaleBy=function(t,e,n){p.scaleTo(t,(function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n}),n)},p.scaleTo=function(t,e,n){p.transform(t,(function(){var t=r.apply(this,arguments),a=this.__zoom,o=null==n?m(t):"function"==typeof n?n.apply(this,arguments):n,s=a.invert(o),l="function"==typeof e?e.apply(this,arguments):e;return i(y(g(a,l),o,s),t,c)}),n)},p.translateBy=function(t,e,n){p.transform(t,(function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),c)}))},p.translateTo=function(t,e,n,a){p.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,s=null==a?m(t):"function"==typeof a?a.apply(this,arguments):a;return i(nT.translate(s[0],s[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,c)}),a)},v.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){ye(new tT(p,t,this.that.__zoom),h.apply,h,[t,this.that,this.args])}},p.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:Jw(+t),p):a},p.filter=function(t){return arguments.length?(n="function"==typeof t?t:Jw(!!t),p):n},p.touchable=function(t){return arguments.length?(o="function"==typeof t?t:Jw(!!t),p):o},p.extent=function(t){return arguments.length?(r="function"==typeof t?t:Jw([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),p):r},p.scaleExtent=function(t){return arguments.length?(s[0]=+t[0],s[1]=+t[1],p):[s[0],s[1]]},p.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],p):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},p.constrain=function(t){return arguments.length?(i=t,p):i},p.duration=function(t){return arguments.length?(l=+t,p):l},p.interpolate=function(t){return arguments.length?(u=t,p):u},p.on=function(){var t=h.on.apply(h,arguments);return t===h?p:t},p.clickDistance=function(t){return arguments.length?(d=(t=+t)*t,p):Math.sqrt(d)},p}rT.prototype=eT.prototype},70681:(t,e,n)=>{t.exports={graphlib:n(70574),layout:n(98123),debug:n(27570),util:{time:n(11138).time,notime:n(11138).notime},version:n(88177)}},92188:(t,e,n)=>{"use strict";var r=n(38436),i=n(74079);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=[],n={},i={};return r.forEach(t.nodes(),(function a(o){r.has(i,o)||(i[o]=!0,n[o]=!0,r.forEach(t.outEdges(o),(function(t){r.has(n,t.w)?e.push(t):a(t.w)})),delete n[o])})),e}(t);r.forEach(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.uniqueId("rev"))}))},undo:function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}}},61133:(t,e,n)=>{var r=n(38436),i=n(11138);function a(t,e,n,r,a,o){var s={width:0,height:0,rank:o,borderType:e},c=a[e][o-1],l=i.addDummyNode(t,"border",s,n);a[e][o]=l,t.setParent(l,r),c&&t.setEdge(c,l,{weight:1})}t.exports=function(t){r.forEach(t.children(),(function e(n){var i=t.children(n),o=t.node(n);if(i.length&&r.forEach(i,e),r.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var s=o.minRank,c=o.maxRank+1;s<c;++s)a(t,"borderLeft","_bl",n,o,s),a(t,"borderRight","_br",n,o,s)}}))}},53258:(t,e,n)=>{"use strict";var r=n(38436);function i(t){r.forEach(t.nodes(),(function(e){a(t.node(e))})),r.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){r.forEach(t.nodes(),(function(e){o(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,o),r.has(n,"y")&&o(n)}))}(t),"lr"!==e&&"rl"!==e||(function(t){r.forEach(t.nodes(),(function(e){s(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,s),r.has(n,"x")&&s(n)}))}(t),i(t))}}},77822:t=>{function e(){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 r(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=e,e.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return n(e),e},e.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},e.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,r)),n=n._prev;return"["+t.join(", ")+"]"}},27570:(t,e,n)=>{var r=n(38436),i=n(11138),a=n(70574).Graph;t.exports={debugOrdering:function(t){var e=i.buildLayerMatrix(t),n=new a({compound:!0,multigraph:!0}).setGraph({});return r.forEach(t.nodes(),(function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),r.forEach(t.edges(),(function(t){n.setEdge(t.v,t.w,{},t.name)})),r.forEach(e,(function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,(function(t,e){return n.setEdge(t,e,{style:"invis"}),e}))})),n}}},70574:(t,e,n)=>{var r;try{r=n(28282)}catch(t){}r||(r=window.graphlib),t.exports=r},74079:(t,e,n)=>{var r=n(38436),i=n(70574).Graph,a=n(77822);t.exports=function(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new i,o=0,s=0;r.forEach(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),r.forEach(t.edges(),(function(t){var r=n.edge(t.v,t.w)||0,i=e(t),a=r+i;n.setEdge(t.v,t.w,a),s=Math.max(s,n.node(t.v).out+=i),o=Math.max(o,n.node(t.w).in+=i)}));var l=r.range(s+o+3).map((function(){return new a})),u=o+1;return r.forEach(n.nodes(),(function(t){c(l,u,n.node(t))})),{graph:n,buckets:l,zeroIdx:u}}(t,e||o),l=function(t,e,n){for(var r,i=[],a=e[e.length-1],o=e[0];t.nodeCount();){for(;r=o.dequeue();)s(t,e,n,r);for(;r=a.dequeue();)s(t,e,n,r);if(t.nodeCount())for(var c=e.length-2;c>0;--c)if(r=e[c].dequeue()){i=i.concat(s(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(l,(function(e){return t.outEdges(e.v,e.w)})),!0)};var o=r.constant(1);function s(t,e,n,i,a){var o=a?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),s=t.node(r.v);a&&o.push({v:r.v,w:r.w}),s.out-=i,c(e,n,s)})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),a=r.w,o=t.node(a);o.in-=i,c(e,n,o)})),t.removeNode(i.v),o}function c(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},98123:(t,e,n)=>{"use strict";var r=n(38436),i=n(92188),a=n(45995),o=n(78093),s=n(11138).normalizeRanks,c=n(24219),l=n(11138).removeEmptyRanks,u=n(72981),h=n(61133),f=n(53258),d=n(53408),p=n(17873),g=n(11138),y=n(70574).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?g.time:g.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new y({multigraph:!0,compound:!0}),n=C(t.graph());return e.setGraph(r.merge({},b,E(n,m),r.pick(n,_))),r.forEach(t.nodes(),(function(n){var i=C(t.node(n));e.setNode(n,r.defaults(E(i,v),x)),e.setParent(n,t.parent(n))})),r.forEach(t.edges(),(function(n){var i=C(t.edge(n));e.setEdge(n,r.merge({},w,E(i,k),r.pick(i,T)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){r.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({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){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,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;r.forEach(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){a.run(t)})),e(" parentDummyChains",(function(){c(t)})),e(" addBorderSegments",(function(){h(t)})),e(" order",(function(){d(t)})),e(" insertSelfEdges",(function(){!function(t){var e=g.buildLayerMatrix(t);r.forEach(e,(function(e){var n=0;r.forEach(e,(function(e,i){var a=t.node(e);a.order=i+n,r.forEach(a.selfEdges,(function(e){g.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:a.rank,order:i+ ++n,e:e.e,label:e.label},"_se")})),delete a.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){f.adjust(t)})),e(" position",(function(){p(t)})),e(" positionSelfEdges",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.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}],n.label.x=n.x,n.label.y=n.y}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){r.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),a=t.node(n.borderBottom),o=t.node(r.last(n.borderLeft)),s=t.node(r.last(n.borderRight));n.width=Math.abs(s.x-o.x),n.height=Math.abs(a.y-i.y),n.x=o.x+n.width/2,n.y=i.y+n.height/2}})),r.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){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t)})),e(" undoCoordinateSystem",(function(){f.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,a=0,o=t.graph(),s=o.marginx||0,c=o.marginy||0;function l(t){var r=t.x,o=t.y,s=t.width,c=t.height;e=Math.min(e,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}r.forEach(t.nodes(),(function(e){l(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,"x")&&l(n)})),e-=s,i-=c,r.forEach(t.nodes(),(function(n){var r=t.node(n);r.x-=e,r.y-=i})),r.forEach(t.edges(),(function(n){var a=t.edge(n);r.forEach(a.points,(function(t){t.x-=e,t.y-=i})),r.has(a,"x")&&(a.x-=e),r.has(a,"y")&&(a.y-=i)})),o.width=n-e+s,o.height=a-i+c}(t)})),e(" assignNodeIntersects",(function(){!function(t){r.forEach(t.edges(),(function(e){var n,r,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=o,r=a),i.points.unshift(g.intersectRect(a,n)),i.points.push(g.intersectRect(o,r))}))}(t)})),e(" reversePoints",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){i.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){r.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(t.edges(),(function(n){var i=t.edge(n),a=e.edge(n);i.points=a.points,r.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"],b={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],v=["width","height"],x={width:0,height:0},k=["minlen","weight","width","height","labeloffset"],w={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},T=["labelpos"];function E(t,e){return r.mapValues(r.pick(t,e),Number)}function C(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}},38436:(t,e,n)=>{var r;try{r={cloneDeep:n(50361),constant:n(75703),defaults:n(91747),each:n(66073),filter:n(63105),find:n(13311),flatten:n(85564),forEach:n(84486),forIn:n(62620),has:n(18721),isUndefined:n(52353),last:n(10928),map:n(35161),mapValues:n(66604),max:n(6162),merge:n(82492),min:n(53632),minBy:n(22762),now:n(7771),pick:n(78718),range:n(96026),reduce:n(54061),sortBy:n(89734),uniqueId:n(73955),values:n(52628),zipObject:n(7287)}}catch(t){}r||(r=window._),t.exports=r},72981:(t,e,n)=>{var r=n(38436),i=n(11138);function a(t,e,n,o,s,c,l){var u=t.children(l);if(u.length){var h=i.addBorderNode(t,"_bt"),f=i.addBorderNode(t,"_bb"),d=t.node(l);t.setParent(h,l),d.borderTop=h,t.setParent(f,l),d.borderBottom=f,r.forEach(u,(function(r){a(t,e,n,o,s,c,r);var i=t.node(r),u=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,p=i.borderTop?o:2*o,g=u!==d?1:s-c[l]+1;t.setEdge(h,u,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(d,f,{weight:p,minlen:g,nestingEdge:!0})})),t.parent(l)||t.setEdge(e,h,{weight:0,minlen:s+c[l]})}else l!==e&&t.setEdge(e,l,{weight:0,minlen:n})}t.exports={run:function(t){var e=i.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};function n(i,a){var o=t.children(i);o&&o.length&&r.forEach(o,(function(t){n(t,a+1)})),e[i]=a}return r.forEach(t.children(),(function(t){n(t,1)})),e}(t),o=r.max(r.values(n))-1,s=2*o+1;t.graph().nestingRoot=e,r.forEach(t.edges(),(function(e){t.edge(e).minlen*=s}));var c=function(t){return r.reduce(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;r.forEach(t.children(),(function(r){a(t,e,s,c,o,n,r)})),t.graph().nodeRankFactor=s},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},45995:(t,e,n)=>{"use strict";var r=n(38436),i=n(11138);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(e){!function(t,e){var n,r,a,o=e.v,s=t.node(o).rank,c=e.w,l=t.node(c).rank,u=e.name,h=t.edge(e),f=h.labelRank;if(l!==s+1){for(t.removeEdge(e),a=0,++s;s<l;++a,++s)h.points=[],r={width:0,height:0,edgeLabel:h,edgeObj:e,rank:s},n=i.addDummyNode(t,"edge",r,"_d"),s===f&&(r.width=h.width,r.height=h.height,r.dummy="edge-label",r.labelpos=h.labelpos),t.setEdge(o,n,{weight:h.weight},u),0===a&&t.graph().dummyChains.push(n),o=n;t.setEdge(o,c,{weight:h.weight},u)}}(t,e)}))},undo:function(t){r.forEach(t.graph().dummyChains,(function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)}))}}},55093:(t,e,n)=>{var r=n(38436);t.exports=function(t,e,n){var i,a={};r.forEach(n,(function(n){for(var r,o,s=t.parent(n);s;){if((r=t.parent(s))?(o=a[r],a[r]=s):(o=i,i=s),o&&o!==s)return void e.setEdge(o,s);s=r}}))}},35439:(t,e,n)=>{var r=n(38436);t.exports=function(t,e){return r.map(e,(function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,(function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}}))}},23128:(t,e,n)=>{var r=n(38436),i=n(70574).Graph;t.exports=function(t,e,n){var a=function(t){for(var e;t.hasNode(e=r.uniqueId("_root")););return e}(t),o=new i({compound:!0}).setGraph({root:a}).setDefaultNodeLabel((function(e){return t.node(e)}));return r.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),r.forEach(t[n](i),(function(e){var n=e.v===i?e.w:e.v,a=o.edge(n,i),s=r.isUndefined(a)?0:a.weight;o.setEdge(n,i,{weight:t.edge(e).weight+s})})),r.has(s,"minRank")&&o.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))})),o}},56630:(t,e,n)=>{"use strict";var r=n(38436);function i(t,e,n){for(var i=r.zipObject(n,r.map(n,(function(t,e){return e}))),a=r.flatten(r.map(e,(function(e){return r.sortBy(r.map(t.outEdges(e),(function(e){return{pos:i[e.w],weight:t.edge(e).weight}})),"pos")})),!0),o=1;o<n.length;)o<<=1;var s=2*o-1;o-=1;var c=r.map(new Array(s),(function(){return 0})),l=0;return r.forEach(a.forEach((function(t){var e=t.pos+o;c[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=c[e+1]),c[e=e-1>>1]+=t.weight;l+=t.weight*n}))),l}t.exports=function(t,e){for(var n=0,r=1;r<e.length;++r)n+=i(t,e[r-1],e[r]);return n}},53408:(t,e,n)=>{"use strict";var r=n(38436),i=n(2588),a=n(56630),o=n(61026),s=n(23128),c=n(55093),l=n(70574).Graph,u=n(11138);function h(t,e,n){return r.map(e,(function(e){return s(t,e,n)}))}function f(t,e){var n=new l;r.forEach(t,(function(t){var i=t.graph().root,a=o(t,i,n,e);r.forEach(a.vs,(function(e,n){t.node(e).order=n})),c(t,n,a.vs)}))}function d(t,e){r.forEach(e,(function(e){r.forEach(e,(function(e,n){t.node(e).order=n}))}))}t.exports=function(t){var e=u.maxRank(t),n=h(t,r.range(1,e+1),"inEdges"),o=h(t,r.range(e-1,-1,-1),"outEdges"),s=i(t);d(t,s);for(var c,l=Number.POSITIVE_INFINITY,p=0,g=0;g<4;++p,++g){f(p%2?n:o,p%4>=2),s=u.buildLayerMatrix(t);var y=a(t,s);y<l&&(g=0,c=r.cloneDeep(s),l=y)}d(t,c)}},2588:(t,e,n)=>{"use strict";var r=n(38436);t.exports=function(t){var e={},n=r.filter(t.nodes(),(function(e){return!t.children(e).length})),i=r.max(r.map(n,(function(e){return t.node(e).rank}))),a=r.map(r.range(i+1),(function(){return[]})),o=r.sortBy(n,(function(e){return t.node(e).rank}));return r.forEach(o,(function n(i){if(!r.has(e,i)){e[i]=!0;var o=t.node(i);a[o.rank].push(i),r.forEach(t.successors(i),n)}})),a}},83678:(t,e,n)=>{"use strict";var r=n(38436);t.exports=function(t,e){var n={};return r.forEach(t,(function(t,e){var i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};r.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)})),r.forEach(e.edges(),(function(t){var e=n[t.v],i=n[t.w];r.isUndefined(e)||r.isUndefined(i)||(i.indegree++,e.out.push(n[t.w]))})),function(t){var e=[];function n(t){return function(e){var n,i,a,o;e.merged||(r.isUndefined(e.barycenter)||r.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&(i=e,a=0,o=0,(n=t).weight&&(a+=n.barycenter*n.weight,o+=n.weight),i.weight&&(a+=i.barycenter*i.weight,o+=i.weight),n.vs=i.vs.concat(n.vs),n.barycenter=a/o,n.weight=o,n.i=Math.min(i.i,n.i),i.merged=!0)}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var a=t.pop();e.push(a),r.forEach(a.in.reverse(),n(a)),r.forEach(a.out,i(a))}return r.map(r.filter(e,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(t){return!t.indegree})))}},61026:(t,e,n)=>{var r=n(38436),i=n(35439),a=n(83678),o=n(87304);t.exports=function t(e,n,s,c){var l=e.children(n),u=e.node(n),h=u?u.borderLeft:void 0,f=u?u.borderRight:void 0,d={};h&&(l=r.filter(l,(function(t){return t!==h&&t!==f})));var p=i(e,l);r.forEach(p,(function(n){if(e.children(n.v).length){var i=t(e,n.v,s,c);d[n.v]=i,r.has(i,"barycenter")&&(a=n,o=i,r.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){r.forEach(t,(function(t){t.vs=r.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(g,d);var y=o(g,c);if(h&&(y.vs=r.flatten([h,y.vs,f],!0),e.predecessors(h).length)){var m=e.node(e.predecessors(h)[0]),b=e.node(e.predecessors(f)[0]);r.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+m.order+b.order)/(y.weight+2),y.weight+=2}return y}},87304:(t,e,n)=>{var r=n(38436),i=n(11138);function a(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}t.exports=function(t,e){var n,o=i.partition(t,(function(t){return r.has(t,"barycenter")})),s=o.lhs,c=r.sortBy(o.rhs,(function(t){return-t.i})),l=[],u=0,h=0,f=0;s.sort((n=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:n?e.i-t.i:t.i-e.i})),f=a(l,c,f),r.forEach(s,(function(t){f+=t.vs.length,l.push(t.vs),u+=t.barycenter*t.weight,h+=t.weight,f=a(l,c,f)}));var d={vs:r.flatten(l,!0)};return h&&(d.barycenter=u/h,d.weight=h),d}},24219:(t,e,n)=>{var r=n(38436);t.exports=function(t){var e=function(t){var e={},n=0;return r.forEach(t.children(),(function i(a){var o=n;r.forEach(t.children(a),i),e[a]={low:o,lim:n++}})),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,a=function(t,e,n,r){var i,a,o=[],s=[],c=Math.min(e[n].low,e[r].low),l=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),o.push(i)}while(i&&(e[i].low>c||l>e[i].lim));for(a=i,i=r;(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;n!==i.w;){if(r=t.node(n),u){for(;(l=o[c])!==s&&t.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&t.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c]}t.setParent(n,l),n=t.successors(n)[0]}}))}},3573:(t,e,n)=>{"use strict";var r=n(38436),i=n(70574).Graph,a=n(11138);function o(t,e){var n={};return r.reduce(e,(function(e,i){var a=0,o=0,s=e.length,l=r.last(i);return r.forEach(i,(function(e,u){var h=function(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),f=h?t.node(h).order:s;(h||e===l)&&(r.forEach(i.slice(o,u+1),(function(e){r.forEach(t.predecessors(e),(function(r){var i=t.node(r),o=i.order;!(o<a||f<o)||i.dummy&&t.node(e).dummy||c(n,r,e)}))})),o=u+1,a=f)})),i})),n}function s(t,e){var n={};function i(e,i,a,o,s){var l;r.forEach(r.range(i,a),(function(i){l=e[i],t.node(l).dummy&&r.forEach(t.predecessors(l),(function(e){var r=t.node(e);r.dummy&&(r.order<o||r.order>s)&&c(n,e,l)}))}))}return r.reduce(e,(function(e,n){var a,o=-1,s=0;return r.forEach(n,(function(r,c){if("border"===t.node(r).dummy){var l=t.predecessors(r);l.length&&(a=t.node(l[0]).order,i(n,s,c,o,a),s=c,o=a)}i(n,s,n.length,a,e.length)})),n})),n}function c(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function l(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function u(t,e,n,i){var a={},o={},s={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){a[t]=t,o[t]=t,s[t]=e}))})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var c=i(t);if(c.length){c=r.sortBy(c,(function(t){return s[t]}));for(var u=(c.length-1)/2,h=Math.floor(u),f=Math.ceil(u);h<=f;++h){var d=c[h];o[t]===t&&e<s[d]&&!l(n,t,d)&&(o[d]=t,o[t]=a[t]=a[d],e=s[d])}}}))})),{root:a,align:o}}function h(t,e,n,a,o){var s={},c=function(t,e,n,a){var o=new i,s=t.graph(),c=function(t,e,n){return function(i,a,o){var s,c=i.node(a),l=i.node(o),u=0;if(u+=c.width/2,r.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":s=-c.width/2;break;case"r":s=c.width/2}if(s&&(u+=n?s:-s),s=0,u+=(c.dummy?e:t)/2,u+=(l.dummy?e:t)/2,u+=l.width/2,r.has(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":s=l.width/2;break;case"r":s=-l.width/2}return s&&(u+=n?s:-s),s=0,u}}(s.nodesep,s.edgesep,a);return r.forEach(e,(function(e){var i;r.forEach(e,(function(e){var r=n[e];if(o.setNode(r),i){var a=n[i],s=o.edge(a,r);o.setEdge(a,r,Math.max(c(t,e,i),s||0))}i=e}))})),o}(t,e,n,o),l=o?"borderLeft":"borderRight";function u(t,e){for(var n=c.nodes(),r=n.pop(),i={};r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.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 n=c.outEdges(e).reduce((function(t,e){return Math.min(t,s[e.w]-c.edge(e))}),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==l&&(s[e]=Math.max(s[e],n))}),c.successors.bind(c)),r.forEach(a,(function(t){s[t]=s[n[t]]})),s}function f(t,e){return r.minBy(r.values(e),(function(e){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return r.forIn(e,(function(e,r){var a=function(t,e){return t.node(e).width}(t,r)/2;n=Math.max(e+a,n),i=Math.min(e-a,i)})),n-i}))}function d(t,e){var n=r.values(e),i=r.min(n),a=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(o){var s,c=n+o,l=t[c];if(l!==e){var u=r.values(l);(s="l"===o?i-r.min(u):a-r.max(u))&&(t[c]=r.mapValues(l,(function(t){return t+s})))}}))}))}function p(t,e){return r.mapValues(t.ul,(function(n,i){if(e)return t[e.toLowerCase()][i];var a=r.sortBy(r.map(t,i));return(a[1]+a[2])/2}))}t.exports={positionX:function(t){var e,n=a.buildLayerMatrix(t),i=r.merge(o(t,n),s(t,n)),c={};r.forEach(["u","d"],(function(a){e="u"===a?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(e=r.map(e,(function(t){return r.values(t).reverse()})));var o=("u"===a?t.predecessors:t.successors).bind(t),s=u(0,e,i,o),l=h(t,e,s.root,s.align,"r"===n);"r"===n&&(l=r.mapValues(l,(function(t){return-t}))),c[a+n]=l}))}));var l=f(t,c);return d(c,l),p(c,t.graph().align)},findType1Conflicts:o,findType2Conflicts:s,addConflict:c,hasConflict:l,verticalAlignment:u,horizontalCompaction:h,alignCoordinates:d,findSmallestWidthAlignment:f,balance:p}},17873:(t,e,n)=>{"use strict";var r=n(38436),i=n(11138),a=n(3573).positionX;t.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),n=t.graph().ranksep,a=0;r.forEach(e,(function(e){var i=r.max(r.map(e,(function(e){return t.node(e).height})));r.forEach(e,(function(e){t.node(e).y=a+i/2})),a+=i+n}))})(t=i.asNonCompoundGraph(t)),r.forEach(a(t),(function(e,n){t.node(n).x=e}))}},20300:(t,e,n)=>{"use strict";var r=n(38436),i=n(70574).Graph,a=n(76681).slack;function o(t,e){return r.forEach(t.nodes(),(function n(i){r.forEach(e.nodeEdges(i),(function(r){var o=r.v,s=i===o?r.w:o;t.hasNode(s)||a(e,r)||(t.setNode(s,{}),t.setEdge(i,s,{}),n(s))}))})),t.nodeCount()}function s(t,e){return r.minBy(e.edges(),(function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return a(e,n)}))}function c(t,e,n){r.forEach(t.nodes(),(function(t){e.node(t).rank+=n}))}t.exports=function(t){var e,n,r=new i({directed:!1}),l=t.nodes()[0],u=t.nodeCount();for(r.setNode(l,{});o(r,t)<u;)e=s(r,t),n=r.hasNode(e.v)?a(t,e):-a(t,e),c(r,t,n);return r}},78093:(t,e,n)=>{"use strict";var r=n(76681).longestPath,i=n(20300),a=n(42472);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":default:!function(t){a(t)}(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":o(t)}};var o=r},42472:(t,e,n)=>{"use strict";var r=n(38436),i=n(20300),a=n(76681).slack,o=n(76681).longestPath,s=n(70574).alg.preorder,c=n(70574).alg.postorder,l=n(11138).simplify;function u(t){t=l(t),o(t);var e,n=i(t);for(d(n),h(n,t);e=g(n);)m(n,t,e,y(n,t,e))}function h(t,e){var n=c(t,t.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=f(t,e,n)}(t,e,n)}))}function f(t,e,n){var i=t.node(n).parent,a=!0,o=e.edge(n,i),s=0;return o||(a=!1,o=e.edge(i,n)),s=o.weight,r.forEach(e.nodeEdges(n),(function(r){var o,c,l=r.v===n,u=l?r.w:r.v;if(u!==i){var h=l===a,f=e.edge(r).weight;if(s+=h?f:-f,o=n,c=u,t.hasEdge(o,c)){var d=t.edge(n,u).cutvalue;s+=h?-d:d}}})),s}function d(t,e){arguments.length<2&&(e=t.nodes()[0]),p(t,{},1,e)}function p(t,e,n,i,a){var o=n,s=t.node(i);return e[i]=!0,r.forEach(t.neighbors(i),(function(a){r.has(e,a)||(n=p(t,e,n,a,i))})),s.low=o,s.lim=n++,a?s.parent=a:delete s.parent,n}function g(t){return r.find(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function y(t,e,n){var i=n.v,o=n.w;e.hasEdge(i,o)||(i=n.w,o=n.v);var s=t.node(i),c=t.node(o),l=s,u=!1;s.lim>c.lim&&(l=c,u=!0);var h=r.filter(e.edges(),(function(e){return u===b(0,t.node(e.v),l)&&u!==b(0,t.node(e.w),l)}));return r.minBy(h,(function(t){return a(e,t)}))}function m(t,e,n,i){var a=n.v,o=n.w;t.removeEdge(a,o),t.setEdge(i.v,i.w,{}),d(t),h(t,e),function(t,e){var n=r.find(t.nodes(),(function(t){return!e.node(t).parent})),i=s(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)}))}(t,e)}function b(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=u,u.initLowLimValues=d,u.initCutValues=h,u.calcCutValue=f,u.leaveEdge=g,u.enterEdge=y,u.exchangeEdges=m},76681:(t,e,n)=>{"use strict";var r=n(38436);t.exports={longestPath:function(t){var e={};r.forEach(t.sources(),(function n(i){var a=t.node(i);if(r.has(e,i))return a.rank;e[i]=!0;var o=r.min(r.map(t.outEdges(i),(function(e){return n(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}}},11138:(t,e,n)=>{"use strict";var r=n(38436),i=n(70574).Graph;function a(t,e,n,i){var a;do{a=r.uniqueId(i)}while(t.hasNode(a));return n.dummy=e,t.setNode(a,n),a}function o(t){return r.max(r.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n})))}t.exports={addDummyNode:a,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,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");return Math.abs(s)*c>Math.abs(o)*l?(s<0&&(l=-l),n=l*o/s,r=l):(o<0&&(c=-c),n=c,r=c*s/o),{x:i+n,y:a+r}},buildLayerMatrix:function(t){var e=r.map(r.range(o(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),a=i.rank;r.isUndefined(a)||(e[a][i.order]=n)})),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,a=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%a!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),a(t,"border",i,e)},maxRank:o,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},88177:t=>{t.exports="0.8.5"},27856:function(t){t.exports=function(){"use strict";function t(e){return t="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(e)}function e(t,n){return e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(t,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function r(t,i,a){return r=n()?Reflect.construct:function(t,n,r){var i=[null];i.push.apply(i,n);var a=new(Function.bind.apply(t,i));return r&&e(a,r.prototype),a},r.apply(null,arguments)}function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var o=Object.hasOwnProperty,s=Object.setPrototypeOf,c=Object.isFrozen,l=Object.getPrototypeOf,u=Object.getOwnPropertyDescriptor,h=Object.freeze,f=Object.seal,d=Object.create,p="undefined"!=typeof Reflect&&Reflect,g=p.apply,y=p.construct;g||(g=function(t,e,n){return t.apply(e,n)}),h||(h=function(t){return t}),f||(f=function(t){return t}),y||(y=function(t,e){return r(t,i(e))});var m,b=A(Array.prototype.forEach),_=A(Array.prototype.pop),v=A(Array.prototype.push),x=A(String.prototype.toLowerCase),k=A(String.prototype.match),w=A(String.prototype.replace),T=A(String.prototype.indexOf),E=A(String.prototype.trim),C=A(RegExp.prototype.test),S=(m=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return y(m,e)});function A(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return g(t,e,r)}}function M(t,e,n){n=n||x,s&&s(t,null);for(var r=e.length;r--;){var i=e[r];if("string"==typeof i){var a=n(i);a!==i&&(c(e)||(e[r]=a),i=a)}t[i]=!0}return t}function N(t){var e,n=d(null);for(e in t)g(o,t,[e])&&(n[e]=t[e]);return n}function D(t,e){for(;null!==t;){var n=u(t,e);if(n){if(n.get)return A(n.get);if("function"==typeof n.value)return A(n.value)}t=l(t)}return function(t){return console.warn("fallback value for",t),null}}var L=h(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),O=h(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),B=h(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),I=h(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),F=h(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),R=h(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),P=h(["#text"]),$=h(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),j=h(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Y=h(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),z=h(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),U=f(/\{\{[\w\W]*|[\w\W]*\}\}/gm),q=f(/<%[\w\W]*|[\w\W]*%>/gm),W=f(/^data-[\-\w.\u00B7-\uFFFF]/),H=f(/^aria-[\-\w]+$/),V=f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=f(/^(?:\w+script|data):/i),X=f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Z=f(/^html$/i),Q=function(){return"undefined"==typeof window?null:window},K=function(e,n){if("object"!==t(e)||"function"!=typeof e.createPolicy)return null;var r=null,i="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(i)&&(r=n.currentScript.getAttribute(i));var a="dompurify"+(r?"#"+r:"");try{return e.createPolicy(a,{createHTML:function(t){return t},createScriptURL:function(t){return t}})}catch(t){return console.warn("TrustedTypes policy "+a+" could not be created."),null}};return function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q(),r=function(t){return e(t)};if(r.version="2.4.0",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;var a=n.document,o=n.document,s=n.DocumentFragment,c=n.HTMLTemplateElement,l=n.Node,u=n.Element,f=n.NodeFilter,d=n.NamedNodeMap,p=void 0===d?n.NamedNodeMap||n.MozNamedAttrMap:d,g=n.HTMLFormElement,y=n.DOMParser,m=n.trustedTypes,A=u.prototype,J=D(A,"cloneNode"),tt=D(A,"nextSibling"),et=D(A,"childNodes"),nt=D(A,"parentNode");if("function"==typeof c){var rt=o.createElement("template");rt.content&&rt.content.ownerDocument&&(o=rt.content.ownerDocument)}var it=K(m,a),at=it?it.createHTML(""):"",ot=o,st=ot.implementation,ct=ot.createNodeIterator,lt=ot.createDocumentFragment,ut=ot.getElementsByTagName,ht=a.importNode,ft={};try{ft=N(o).documentMode?o.documentMode:{}}catch(t){}var dt={};r.isSupported="function"==typeof nt&&st&&void 0!==st.createHTMLDocument&&9!==ft;var pt,gt,yt=U,mt=q,bt=W,_t=H,vt=G,xt=X,kt=V,wt=null,Tt=M({},[].concat(i(L),i(O),i(B),i(F),i(P))),Et=null,Ct=M({},[].concat(i($),i(j),i(Y),i(z))),St=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),At=null,Mt=null,Nt=!0,Dt=!0,Lt=!1,Ot=!1,Bt=!1,It=!1,Ft=!1,Rt=!1,Pt=!1,$t=!1,jt=!0,Yt=!1,zt="user-content-",Ut=!0,qt=!1,Wt={},Ht=null,Vt=M({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Gt=null,Xt=M({},["audio","video","img","source","image","track"]),Zt=null,Qt=M({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Kt="http://www.w3.org/1998/Math/MathML",Jt="http://www.w3.org/2000/svg",te="http://www.w3.org/1999/xhtml",ee=te,ne=!1,re=["application/xhtml+xml","text/html"],ie="text/html",ae=null,oe=o.createElement("form"),se=function(t){return t instanceof RegExp||t instanceof Function},ce=function(e){ae&&ae===e||(e&&"object"===t(e)||(e={}),e=N(e),pt=pt=-1===re.indexOf(e.PARSER_MEDIA_TYPE)?ie:e.PARSER_MEDIA_TYPE,gt="application/xhtml+xml"===pt?function(t){return t}:x,wt="ALLOWED_TAGS"in e?M({},e.ALLOWED_TAGS,gt):Tt,Et="ALLOWED_ATTR"in e?M({},e.ALLOWED_ATTR,gt):Ct,Zt="ADD_URI_SAFE_ATTR"in e?M(N(Qt),e.ADD_URI_SAFE_ATTR,gt):Qt,Gt="ADD_DATA_URI_TAGS"in e?M(N(Xt),e.ADD_DATA_URI_TAGS,gt):Xt,Ht="FORBID_CONTENTS"in e?M({},e.FORBID_CONTENTS,gt):Vt,At="FORBID_TAGS"in e?M({},e.FORBID_TAGS,gt):{},Mt="FORBID_ATTR"in e?M({},e.FORBID_ATTR,gt):{},Wt="USE_PROFILES"in e&&e.USE_PROFILES,Nt=!1!==e.ALLOW_ARIA_ATTR,Dt=!1!==e.ALLOW_DATA_ATTR,Lt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ot=e.SAFE_FOR_TEMPLATES||!1,Bt=e.WHOLE_DOCUMENT||!1,Rt=e.RETURN_DOM||!1,Pt=e.RETURN_DOM_FRAGMENT||!1,$t=e.RETURN_TRUSTED_TYPE||!1,Ft=e.FORCE_BODY||!1,jt=!1!==e.SANITIZE_DOM,Yt=e.SANITIZE_NAMED_PROPS||!1,Ut=!1!==e.KEEP_CONTENT,qt=e.IN_PLACE||!1,kt=e.ALLOWED_URI_REGEXP||kt,ee=e.NAMESPACE||te,e.CUSTOM_ELEMENT_HANDLING&&se(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(St.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&se(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(St.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(St.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ot&&(Dt=!1),Pt&&(Rt=!0),Wt&&(wt=M({},i(P)),Et=[],!0===Wt.html&&(M(wt,L),M(Et,$)),!0===Wt.svg&&(M(wt,O),M(Et,j),M(Et,z)),!0===Wt.svgFilters&&(M(wt,B),M(Et,j),M(Et,z)),!0===Wt.mathMl&&(M(wt,F),M(Et,Y),M(Et,z))),e.ADD_TAGS&&(wt===Tt&&(wt=N(wt)),M(wt,e.ADD_TAGS,gt)),e.ADD_ATTR&&(Et===Ct&&(Et=N(Et)),M(Et,e.ADD_ATTR,gt)),e.ADD_URI_SAFE_ATTR&&M(Zt,e.ADD_URI_SAFE_ATTR,gt),e.FORBID_CONTENTS&&(Ht===Vt&&(Ht=N(Ht)),M(Ht,e.FORBID_CONTENTS,gt)),Ut&&(wt["#text"]=!0),Bt&&M(wt,["html","head","body"]),wt.table&&(M(wt,["tbody"]),delete At.tbody),h&&h(e),ae=e)},le=M({},["mi","mo","mn","ms","mtext"]),ue=M({},["foreignobject","desc","title","annotation-xml"]),he=M({},["title","style","font","a","script"]),fe=M({},O);M(fe,B),M(fe,I);var de=M({},F);M(de,R);var pe=function(t){var e=nt(t);e&&e.tagName||(e={namespaceURI:te,tagName:"template"});var n=x(t.tagName),r=x(e.tagName);return t.namespaceURI===Jt?e.namespaceURI===te?"svg"===n:e.namespaceURI===Kt?"svg"===n&&("annotation-xml"===r||le[r]):Boolean(fe[n]):t.namespaceURI===Kt?e.namespaceURI===te?"math"===n:e.namespaceURI===Jt?"math"===n&&ue[r]:Boolean(de[n]):t.namespaceURI===te&&!(e.namespaceURI===Jt&&!ue[r])&&!(e.namespaceURI===Kt&&!le[r])&&!de[n]&&(he[n]||!fe[n])},ge=function(t){v(r.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){try{t.outerHTML=at}catch(e){t.remove()}}},ye=function(t,e){try{v(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){v(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!Et[t])if(Rt||Pt)try{ge(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},me=function(t){var e,n;if(Ft)t="<remove></remove>"+t;else{var r=k(t,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===pt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");var i=it?it.createHTML(t):t;if(ee===te)try{e=(new y).parseFromString(i,pt)}catch(t){}if(!e||!e.documentElement){e=st.createDocument(ee,"template",null);try{e.documentElement.innerHTML=ne?"":i}catch(t){}}var a=e.body||e.documentElement;return t&&n&&a.insertBefore(o.createTextNode(n),a.childNodes[0]||null),ee===te?ut.call(e,Bt?"html":"body")[0]:Bt?e.documentElement:a},be=function(t){return ct.call(t.ownerDocument||t,t,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT,null,!1)},_e=function(t){return t instanceof g&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof p)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore)},ve=function(e){return"object"===t(l)?e instanceof l:e&&"object"===t(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},xe=function(t,e,n){dt[t]&&b(dt[t],(function(t){t.call(r,e,n,ae)}))},ke=function(t){var e;if(xe("beforeSanitizeElements",t,null),_e(t))return ge(t),!0;if(C(/[\u0080-\uFFFF]/,t.nodeName))return ge(t),!0;var n=gt(t.nodeName);if(xe("uponSanitizeElement",t,{tagName:n,allowedTags:wt}),t.hasChildNodes()&&!ve(t.firstElementChild)&&(!ve(t.content)||!ve(t.content.firstElementChild))&&C(/<[/\w]/g,t.innerHTML)&&C(/<[/\w]/g,t.textContent))return ge(t),!0;if("select"===n&&C(/<template/i,t.innerHTML))return ge(t),!0;if(!wt[n]||At[n]){if(!At[n]&&Te(n)){if(St.tagNameCheck instanceof RegExp&&C(St.tagNameCheck,n))return!1;if(St.tagNameCheck instanceof Function&&St.tagNameCheck(n))return!1}if(Ut&&!Ht[n]){var i=nt(t)||t.parentNode,a=et(t)||t.childNodes;if(a&&i)for(var o=a.length-1;o>=0;--o)i.insertBefore(J(a[o],!0),tt(t))}return ge(t),!0}return t instanceof u&&!pe(t)?(ge(t),!0):"noscript"!==n&&"noembed"!==n||!C(/<\/no(script|embed)/i,t.innerHTML)?(Ot&&3===t.nodeType&&(e=t.textContent,e=w(e,yt," "),e=w(e,mt," "),t.textContent!==e&&(v(r.removed,{element:t.cloneNode()}),t.textContent=e)),xe("afterSanitizeElements",t,null),!1):(ge(t),!0)},we=function(t,e,n){if(jt&&("id"===e||"name"===e)&&(n in o||n in oe))return!1;if(Dt&&!Mt[e]&&C(bt,e));else if(Nt&&C(_t,e));else if(!Et[e]||Mt[e]){if(!(Te(t)&&(St.tagNameCheck instanceof RegExp&&C(St.tagNameCheck,t)||St.tagNameCheck instanceof Function&&St.tagNameCheck(t))&&(St.attributeNameCheck instanceof RegExp&&C(St.attributeNameCheck,e)||St.attributeNameCheck instanceof Function&&St.attributeNameCheck(e))||"is"===e&&St.allowCustomizedBuiltInElements&&(St.tagNameCheck instanceof RegExp&&C(St.tagNameCheck,n)||St.tagNameCheck instanceof Function&&St.tagNameCheck(n))))return!1}else if(Zt[e]);else if(C(kt,w(n,xt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==T(n,"data:")||!Gt[t])if(Lt&&!C(vt,w(n,xt,"")));else if(n)return!1;return!0},Te=function(t){return t.indexOf("-")>0},Ee=function(e){var n,i,a,o;xe("beforeSanitizeAttributes",e,null);var s=e.attributes;if(s){var c={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Et};for(o=s.length;o--;){var l=n=s[o],u=l.name,h=l.namespaceURI;if(i="value"===u?n.value:E(n.value),a=gt(u),c.attrName=a,c.attrValue=i,c.keepAttr=!0,c.forceKeepAttr=void 0,xe("uponSanitizeAttribute",e,c),i=c.attrValue,!c.forceKeepAttr&&(ye(u,e),c.keepAttr))if(C(/\/>/i,i))ye(u,e);else{Ot&&(i=w(i,yt," "),i=w(i,mt," "));var f=gt(e.nodeName);if(we(f,a,i)){if(!Yt||"id"!==a&&"name"!==a||(ye(u,e),i=zt+i),it&&"object"===t(m)&&"function"==typeof m.getAttributeType)if(h);else switch(m.getAttributeType(f,a)){case"TrustedHTML":i=it.createHTML(i);break;case"TrustedScriptURL":i=it.createScriptURL(i)}try{h?e.setAttributeNS(h,u,i):e.setAttribute(u,i),_(r.removed)}catch(t){}}}}xe("afterSanitizeAttributes",e,null)}},Ce=function t(e){var n,r=be(e);for(xe("beforeSanitizeShadowDOM",e,null);n=r.nextNode();)xe("uponSanitizeShadowNode",n,null),ke(n)||(n.content instanceof s&&t(n.content),Ee(n));xe("afterSanitizeShadowDOM",e,null)};return r.sanitize=function(e){var i,o,c,u,h,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((ne=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ve(e)){if("function"!=typeof e.toString)throw S("toString is not a function");if("string"!=typeof(e=e.toString()))throw S("dirty is not a string, aborting")}if(!r.isSupported){if("object"===t(n.toStaticHTML)||"function"==typeof n.toStaticHTML){if("string"==typeof e)return n.toStaticHTML(e);if(ve(e))return n.toStaticHTML(e.outerHTML)}return e}if(It||ce(f),r.removed=[],"string"==typeof e&&(qt=!1),qt){if(e.nodeName){var d=gt(e.nodeName);if(!wt[d]||At[d])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)1===(o=(i=me("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?i=o:i.appendChild(o);else{if(!Rt&&!Ot&&!Bt&&-1===e.indexOf("<"))return it&&$t?it.createHTML(e):e;if(!(i=me(e)))return Rt?null:$t?at:""}i&&Ft&&ge(i.firstChild);for(var p=be(qt?e:i);c=p.nextNode();)3===c.nodeType&&c===u||ke(c)||(c.content instanceof s&&Ce(c.content),Ee(c),u=c);if(u=null,qt)return e;if(Rt){if(Pt)for(h=lt.call(i.ownerDocument);i.firstChild;)h.appendChild(i.firstChild);else h=i;return Et.shadowroot&&(h=ht.call(a,h,!0)),h}var g=Bt?i.outerHTML:i.innerHTML;return Bt&&wt["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&C(Z,i.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+g),Ot&&(g=w(g,yt," "),g=w(g,mt," ")),it&&$t?it.createHTML(g):g},r.setConfig=function(t){ce(t),It=!0},r.clearConfig=function(){ae=null,It=!1},r.isValidAttribute=function(t,e,n){ae||ce({});var r=gt(t),i=gt(e);return we(r,i,n)},r.addHook=function(t,e){"function"==typeof e&&(dt[t]=dt[t]||[],v(dt[t],e))},r.removeHook=function(t){if(dt[t])return _(dt[t])},r.removeHooks=function(t){dt[t]&&(dt[t]=[])},r.removeAllHooks=function(){dt={}},r}()}()},28282:(t,e,n)=>{var r=n(82354);t.exports={Graph:r.Graph,json:n(28974),alg:n(12440),version:r.version}},2842:(t,e,n)=>{var r=n(89126);t.exports=function(t){var e,n={},i=[];function a(i){r.has(n,i)||(n[i]=!0,e.push(i),r.each(t.successors(i),a),r.each(t.predecessors(i),a))}return r.each(t.nodes(),(function(t){e=[],a(t),e.length&&i.push(e)})),i}},53984:(t,e,n)=>{var r=n(89126);function i(t,e,n,a,o,s){r.has(a,e)||(a[e]=!0,n||s.push(e),r.each(o(e),(function(e){i(t,e,n,a,o,s)})),n&&s.push(e))}t.exports=function(t,e,n){r.isArray(e)||(e=[e]);var a=(t.isDirected()?t.successors:t.neighbors).bind(t),o=[],s={};return r.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);i(t,e,"post"===n,s,a,o)})),o}},84847:(t,e,n)=>{var r=n(63763),i=n(89126);t.exports=function(t,e,n){return i.transform(t.nodes(),(function(i,a){i[a]=r(t,a,e,n)}),{})}},63763:(t,e,n)=>{var r=n(89126),i=n(75639);t.exports=function(t,e,n,r){return function(t,e,n,r){var a,o,s={},c=new i,l=function(t){var e=t.v!==a?t.v:t.w,r=s[e],i=n(t),l=o.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);l<r.distance&&(r.distance=l,r.predecessor=a,c.decrease(e,l))};for(t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;s[t]={distance:n},c.add(t,n)}));c.size()>0&&(a=c.removeMin(),(o=s[a]).distance!==Number.POSITIVE_INFINITY);)r(a).forEach(l);return s}(t,String(e),n||a,r||function(e){return t.outEdges(e)})};var a=r.constant(1)},9096:(t,e,n)=>{var r=n(89126),i=n(5023);t.exports=function(t){return r.filter(i(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},38924:(t,e,n)=>{var r=n(89126);t.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,a=e(n);r[t][i]={distance:a,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var a=r[n];i.forEach((function(n){var r=a[t],i=e[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)}))}))})),r}(t,e||i,n||function(e){return t.outEdges(e)})};var i=r.constant(1)},12440:(t,e,n)=>{t.exports={components:n(2842),dijkstra:n(63763),dijkstraAll:n(84847),findCycles:n(9096),floydWarshall:n(38924),isAcyclic:n(62707),postorder:n(58828),preorder:n(92648),prim:n(80514),tarjan:n(5023),topsort:n(2166)}},62707:(t,e,n)=>{var r=n(2166);t.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},58828:(t,e,n)=>{var r=n(53984);t.exports=function(t,e){return r(t,e,"post")}},92648:(t,e,n)=>{var r=n(53984);t.exports=function(t,e){return r(t,e,"pre")}},80514:(t,e,n)=>{var r=n(89126),i=n(30771),a=n(75639);t.exports=function(t,e){var n,o=new i,s={},c=new a;function l(t){var r=t.v===n?t.w:t.v,i=c.priority(r);if(void 0!==i){var a=e(t);a<i&&(s[r]=n,c.decrease(r,a))}}if(0===t.nodeCount())return o;r.each(t.nodes(),(function(t){c.add(t,Number.POSITIVE_INFINITY),o.setNode(t)})),c.decrease(t.nodes()[0],0);for(var u=!1;c.size()>0;){if(n=c.removeMin(),r.has(s,n))o.setEdge(n,s[n]);else{if(u)throw new Error("Input graph is not connected: "+t);u=!0}t.nodeEdges(n).forEach(l)}return o}},5023:(t,e,n)=>{var r=n(89126);t.exports=function(t){var e=0,n=[],i={},a=[];function o(s){var c=i[s]={onStack:!0,lowlink:e,index:e++};if(n.push(s),t.successors(s).forEach((function(t){r.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=n.pop(),i[l].onStack=!1,u.push(l)}while(s!==l);a.push(u)}}return t.nodes().forEach((function(t){r.has(i,t)||o(t)})),a}},2166:(t,e,n)=>{var r=n(89126);function i(t){var e={},n={},i=[];if(r.each(t.sinks(),(function o(s){if(r.has(n,s))throw new a;r.has(e,s)||(n[s]=!0,e[s]=!0,r.each(t.predecessors(s),o),delete n[s],i.push(s))})),r.size(e)!==t.nodeCount())throw new a;return i}function a(){}t.exports=i,i.CycleException=a,a.prototype=new Error},75639:(t,e,n)=>{var r=n(89126);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 r.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 n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,a=i.length;return n[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 n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},i.prototype._decrease=function(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e},i.prototype._swap=function(t,e){var n=this._arr,r=this._keyIndices,i=n[t],a=n[e];n[t]=a,n[e]=i,r[a.key]=t,r[i.key]=e}},30771:(t,e,n)=>{"use strict";var r=n(89126);t.exports=a;var i="\0";function a(t){this._isDirected=!r.has(t,"directed")||t.directed,this._isMultigraph=!!r.has(t,"multigraph")&&t.multigraph,this._isCompound=!!r.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.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 o(t,e){t[e]?t[e]++:t[e]=1}function s(t,e){--t[e]||delete t[e]}function c(t,e,n,i){var a=""+e,o=""+n;if(!t&&a>o){var s=a;a=o,o=s}return a+""+o+""+(r.isUndefined(i)?"\0":i)}function l(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function u(t,e){return c(t,e.v,e.w,e.name)}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(t){return this._label=t,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultNodeLabelFn=t,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return r.keys(this._nodes)},a.prototype.sources=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._in[e])}))},a.prototype.sinks=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._out[e])}))},a.prototype.setNodes=function(t,e){var n=arguments,i=this;return r.each(t,(function(t){n.length>1?i.setNode(t,e):i.setNode(t)})),this},a.prototype.setNode=function(t,e){return r.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]=i,this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},a.prototype.node=function(t){return this._nodes[t]},a.prototype.hasNode=function(t){return r.has(this._nodes,t)},a.prototype.removeNode=function(t){var e=this;if(r.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],r.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),r.each(r.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],r.each(r.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},a.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(e))e=i;else{for(var n=e+="";!r.isUndefined(n);n=this.parent(n))if(n===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},a.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},a.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==i)return e}},a.prototype.children=function(t){if(r.isUndefined(t)&&(t=i),this._isCompound){var e=this._children[t];if(e)return r.keys(e)}else{if(t===i)return this.nodes();if(this.hasNode(t))return[]}},a.prototype.predecessors=function(t){var e=this._preds[t];if(e)return r.keys(e)},a.prototype.successors=function(t){var e=this._sucs[t];if(e)return r.keys(e)},a.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return r.union(e,this.successors(t))},a.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},a.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),r.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var i={};function a(t){var r=n.parent(t);return void 0===r||e.hasNode(r)?(i[t]=r,r):r in i?i[r]:a(r)}return this._isCompound&&r.each(e.nodes(),(function(t){e.setParent(t,a(t))})),e},a.prototype.setDefaultEdgeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultEdgeLabelFn=t,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return r.values(this._edgeObjs)},a.prototype.setPath=function(t,e){var n=this,i=arguments;return r.reduce(t,(function(t,r){return i.length>1?n.setEdge(t,r,e):n.setEdge(t,r),r})),this},a.prototype.setEdge=function(){var t,e,n,i,a=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(t=s.v,e=s.w,n=s.name,2===arguments.length&&(i=arguments[1],a=!0)):(t=s,e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),t=""+t,e=""+e,r.isUndefined(n)||(n=""+n);var u=c(this._isDirected,t,e,n);if(r.has(this._edgeLabels,u))return a&&(this._edgeLabels[u]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[u]=a?i:this._defaultEdgeLabelFn(t,e,n);var h=l(this._isDirected,t,e,n);return t=h.v,e=h.w,Object.freeze(h),this._edgeObjs[u]=h,o(this._preds[e],t),o(this._sucs[t],e),this._in[e][u]=h,this._out[t][u]=h,this._edgeCount++,this},a.prototype.edge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return this._edgeLabels[r]},a.prototype.hasEdge=function(t,e,n){var i=1===arguments.length?u(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return r.has(this._edgeLabels,i)},a.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):c(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[e],t),s(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},a.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.v===e})):i}},a.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.w===e})):i}},a.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},82354:(t,e,n)=>{t.exports={Graph:n(30771),version:n(49631)}},28974:(t,e,n)=>{var r=n(89126),i=n(30771);function a(t){return r.map(t.nodes(),(function(e){var n=t.node(e),i=t.parent(e),a={v:e};return r.isUndefined(n)||(a.value=n),r.isUndefined(i)||(a.parent=i),a}))}function o(t){return r.map(t.edges(),(function(e){var n=t.edge(e),i={v:e.v,w:e.w};return r.isUndefined(e.name)||(i.name=e.name),r.isUndefined(n)||(i.value=n),i}))}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:a(t),edges:o(t)};return r.isUndefined(t.graph())||(e.value=r.clone(t.graph())),e},read:function(t){var e=new i(t.options).setGraph(t.value);return r.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),r.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}}},89126:(t,e,n)=>{var r;try{r={clone:n(66678),constant:n(75703),each:n(66073),filter:n(63105),has:n(18721),isArray:n(1469),isEmpty:n(41609),isFunction:n(23560),isUndefined:n(52353),keys:n(3674),map:n(35161),reduce:n(54061),size:n(84238),transform:n(68718),union:n(93386),values:n(52628)}}catch(t){}r||(r=window._),t.exports=r},49631:t=>{t.exports="2.1.8"},18552:(t,e,n)=>{var r=n(10852)(n(55639),"DataView");t.exports=r},1989:(t,e,n)=>{var r=n(51789),i=n(80401),a=n(57667),o=n(21327),s=n(81866);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},38407:(t,e,n)=>{var r=n(27040),i=n(14125),a=n(82117),o=n(67518),s=n(54705);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},57071:(t,e,n)=>{var r=n(10852)(n(55639),"Map");t.exports=r},83369:(t,e,n)=>{var r=n(24785),i=n(11285),a=n(96e3),o=n(49916),s=n(95265);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},53818:(t,e,n)=>{var r=n(10852)(n(55639),"Promise");t.exports=r},58525:(t,e,n)=>{var r=n(10852)(n(55639),"Set");t.exports=r},88668:(t,e,n)=>{var r=n(83369),i=n(90619),a=n(72385);function o(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}o.prototype.add=o.prototype.push=i,o.prototype.has=a,t.exports=o},46384:(t,e,n)=>{var r=n(38407),i=n(37465),a=n(63779),o=n(67599),s=n(44758),c=n(34309);function l(t){var e=this.__data__=new r(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},62705:(t,e,n)=>{var r=n(55639).Symbol;t.exports=r},11149:(t,e,n)=>{var r=n(55639).Uint8Array;t.exports=r},70577:(t,e,n)=>{var r=n(10852)(n(55639),"WeakMap");t.exports=r},96874:t=>{t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},77412:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},34963:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}},47443:(t,e,n)=>{var r=n(42118);t.exports=function(t,e){return!(null==t||!t.length)&&r(t,e,0)>-1}},1196:t=>{t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}},14636:(t,e,n)=>{var r=n(22545),i=n(35694),a=n(1469),o=n(44144),s=n(65776),c=n(36719),l=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=a(t),u=!n&&i(t),h=!n&&!u&&o(t),f=!n&&!u&&!h&&c(t),d=n||u||h||f,p=d?r(t.length,String):[],g=p.length;for(var y in t)!e&&!l.call(t,y)||d&&("length"==y||h&&("offset"==y||"parent"==y)||f&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,g))||p.push(y);return p}},29932:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},62488:t=>{t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},62663:t=>{t.exports=function(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}},82908:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},48983:(t,e,n)=>{var r=n(40371)("length");t.exports=r},86556:(t,e,n)=>{var r=n(89465),i=n(77813);t.exports=function(t,e,n){(void 0!==n&&!i(t[e],n)||void 0===n&&!(e in t))&&r(t,e,n)}},34865:(t,e,n)=>{var r=n(89465),i=n(77813),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var o=t[e];a.call(t,e)&&i(o,n)&&(void 0!==n||e in t)||r(t,e,n)}},18470:(t,e,n)=>{var r=n(77813);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},44037:(t,e,n)=>{var r=n(98363),i=n(3674);t.exports=function(t,e){return t&&r(e,i(e),t)}},63886:(t,e,n)=>{var r=n(98363),i=n(23360);t.exports=function(t,e){return t&&r(e,i(e),t)}},89465:(t,e,n)=>{var r=n(38777);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},85990:(t,e,n)=>{var r=n(46384),i=n(77412),a=n(34865),o=n(44037),s=n(63886),c=n(64626),l=n(278),u=n(18805),h=n(1911),f=n(58234),d=n(46904),p=n(64160),g=n(43824),y=n(29148),m=n(38517),b=n(1469),_=n(44144),v=n(56688),x=n(13218),k=n(72928),w=n(3674),T=n(23360),E="[object Arguments]",C="[object Function]",S="[object Object]",A={};A[E]=A["[object Array]"]=A["[object ArrayBuffer]"]=A["[object DataView]"]=A["[object Boolean]"]=A["[object Date]"]=A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Map]"]=A["[object Number]"]=A[S]=A["[object RegExp]"]=A["[object Set]"]=A["[object String]"]=A["[object Symbol]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A["[object Error]"]=A[C]=A["[object WeakMap]"]=!1,t.exports=function t(e,n,M,N,D,L){var O,B=1&n,I=2&n,F=4&n;if(M&&(O=D?M(e,N,D,L):M(e)),void 0!==O)return O;if(!x(e))return e;var R=b(e);if(R){if(O=g(e),!B)return l(e,O)}else{var P=p(e),$=P==C||"[object GeneratorFunction]"==P;if(_(e))return c(e,B);if(P==S||P==E||$&&!D){if(O=I||$?{}:m(e),!B)return I?h(e,s(O,e)):u(e,o(O,e))}else{if(!A[P])return D?e:{};O=y(e,P,B)}}L||(L=new r);var j=L.get(e);if(j)return j;L.set(e,O),k(e)?e.forEach((function(r){O.add(t(r,n,M,r,e,L))})):v(e)&&e.forEach((function(r,i){O.set(i,t(r,n,M,i,e,L))}));var Y=R?void 0:(F?I?d:f:I?T:w)(e);return i(Y||e,(function(r,i){Y&&(r=e[i=r]),a(O,i,t(r,n,M,i,e,L))})),O}},3118:(t,e,n)=>{var r=n(13218),i=Object.create,a=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=a},89881:(t,e,n)=>{var r=n(47816),i=n(99291)(r);t.exports=i},56029:(t,e,n)=>{var r=n(33448);t.exports=function(t,e,n){for(var i=-1,a=t.length;++i<a;){var o=t[i],s=e(o);if(null!=s&&(void 0===c?s==s&&!r(s):n(s,c)))var c=s,l=o}return l}},80760:(t,e,n)=>{var r=n(89881);t.exports=function(t,e){var n=[];return r(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}},41848:t=>{t.exports=function(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}},21078:(t,e,n)=>{var r=n(62488),i=n(37285);t.exports=function t(e,n,a,o,s){var c=-1,l=e.length;for(a||(a=i),s||(s=[]);++c<l;){var u=e[c];n>0&&a(u)?n>1?t(u,n-1,a,o,s):r(s,u):o||(s[s.length]=u)}return s}},28483:(t,e,n)=>{var r=n(25063)();t.exports=r},47816:(t,e,n)=>{var r=n(28483),i=n(3674);t.exports=function(t,e){return t&&r(t,e,i)}},97786:(t,e,n)=>{var r=n(71811),i=n(40327);t.exports=function(t,e){for(var n=0,a=(e=r(e,t)).length;null!=t&&n<a;)t=t[i(e[n++])];return n&&n==a?t:void 0}},68866:(t,e,n)=>{var r=n(62488),i=n(1469);t.exports=function(t,e,n){var a=e(t);return i(t)?a:r(a,n(t))}},44239:(t,e,n)=>{var r=n(62705),i=n(89607),a=n(2333),o=r?r.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)}},53325:t=>{t.exports=function(t,e){return t>e}},78565:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&e.call(t,n)}},13:t=>{t.exports=function(t,e){return null!=t&&e in Object(t)}},42118:(t,e,n)=>{var r=n(41848),i=n(62722),a=n(42351);t.exports=function(t,e,n){return e==e?a(t,e,n):r(t,i,n)}},9454:(t,e,n)=>{var r=n(44239),i=n(37005);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},90939:(t,e,n)=>{var r=n(2492),i=n(37005);t.exports=function t(e,n,a,o,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,a,o,t,s))}},2492:(t,e,n)=>{var r=n(46384),i=n(67114),a=n(18351),o=n(16096),s=n(64160),c=n(1469),l=n(44144),u=n(36719),h="[object Arguments]",f="[object Array]",d="[object Object]",p=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,g,y,m){var b=c(t),_=c(e),v=b?f:s(t),x=_?f:s(e),k=(v=v==h?d:v)==d,w=(x=x==h?d:x)==d,T=v==x;if(T&&l(t)){if(!l(e))return!1;b=!0,k=!1}if(T&&!k)return m||(m=new r),b||u(t)?i(t,e,n,g,y,m):a(t,e,v,n,g,y,m);if(!(1&n)){var E=k&&p.call(t,"__wrapped__"),C=w&&p.call(e,"__wrapped__");if(E||C){var S=E?t.value():t,A=C?e.value():e;return m||(m=new r),y(S,A,n,g,m)}}return!!T&&(m||(m=new r),o(t,e,n,g,y,m))}},25588:(t,e,n)=>{var r=n(64160),i=n(37005);t.exports=function(t){return i(t)&&"[object Map]"==r(t)}},2958:(t,e,n)=>{var r=n(46384),i=n(90939);t.exports=function(t,e,n,a){var o=n.length,s=o,c=!a;if(null==t)return!s;for(t=Object(t);o--;){var l=n[o];if(c&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++o<s;){var u=(l=n[o])[0],h=t[u],f=l[1];if(c&&l[2]){if(void 0===h&&!(u in t))return!1}else{var d=new r;if(a)var p=a(h,f,u,t,e,d);if(!(void 0===p?i(f,h,3,a,d):p))return!1}}return!0}},62722:t=>{t.exports=function(t){return t!=t}},28458:(t,e,n)=>{var r=n(23560),i=n(15346),a=n(13218),o=n(80346),s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,h=l.hasOwnProperty,f=RegExp("^"+u.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!a(t)||i(t))&&(r(t)?f:s).test(o(t))}},29221:(t,e,n)=>{var r=n(64160),i=n(37005);t.exports=function(t){return i(t)&&"[object Set]"==r(t)}},38749:(t,e,n)=>{var r=n(44239),i=n(41780),a=n(37005),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[r(t)]}},67206:(t,e,n)=>{var r=n(91573),i=n(16432),a=n(6557),o=n(1469),s=n(39601);t.exports=function(t){return"function"==typeof t?t:null==t?a:"object"==typeof t?o(t)?i(t[0],t[1]):r(t):s(t)}},280:(t,e,n)=>{var r=n(25726),i=n(86916),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}},10313:(t,e,n)=>{var r=n(13218),i=n(25726),a=n(33498),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return a(t);var e=i(t),n=[];for(var s in t)("constructor"!=s||!e&&o.call(t,s))&&n.push(s);return n}},70433:t=>{t.exports=function(t,e){return t<e}},69199:(t,e,n)=>{var r=n(89881),i=n(98612);t.exports=function(t,e){var n=-1,a=i(t)?Array(t.length):[];return r(t,(function(t,r,i){a[++n]=e(t,r,i)})),a}},91573:(t,e,n)=>{var r=n(2958),i=n(1499),a=n(42634);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?a(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},16432:(t,e,n)=>{var r=n(90939),i=n(27361),a=n(79095),o=n(15403),s=n(89162),c=n(42634),l=n(40327);t.exports=function(t,e){return o(t)&&s(e)?c(l(t),e):function(n){var o=i(n,t);return void 0===o&&o===e?a(n,t):r(e,o,3)}}},42980:(t,e,n)=>{var r=n(46384),i=n(86556),a=n(28483),o=n(59783),s=n(13218),c=n(23360),l=n(36390);t.exports=function t(e,n,u,h,f){e!==n&&a(n,(function(a,c){if(f||(f=new r),s(a))o(e,n,c,u,t,h,f);else{var d=h?h(l(e,c),a,c+"",e,n,f):void 0;void 0===d&&(d=a),i(e,c,d)}}),c)}},59783:(t,e,n)=>{var r=n(86556),i=n(64626),a=n(77133),o=n(278),s=n(38517),c=n(35694),l=n(1469),u=n(29246),h=n(44144),f=n(23560),d=n(13218),p=n(68630),g=n(36719),y=n(36390),m=n(59881);t.exports=function(t,e,n,b,_,v,x){var k=y(t,n),w=y(e,n),T=x.get(w);if(T)r(t,n,T);else{var E=v?v(k,w,n+"",t,e,x):void 0,C=void 0===E;if(C){var S=l(w),A=!S&&h(w),M=!S&&!A&&g(w);E=w,S||A||M?l(k)?E=k:u(k)?E=o(k):A?(C=!1,E=i(w,!0)):M?(C=!1,E=a(w,!0)):E=[]:p(w)||c(w)?(E=k,c(k)?E=m(k):d(k)&&!f(k)||(E=s(w))):C=!1}C&&(x.set(w,E),_(E,w,b,v,x),x.delete(w)),r(t,n,E)}}},82689:(t,e,n)=>{var r=n(29932),i=n(97786),a=n(67206),o=n(69199),s=n(71131),c=n(7518),l=n(85022),u=n(6557),h=n(1469);t.exports=function(t,e,n){e=e.length?r(e,(function(t){return h(t)?function(e){return i(e,1===t.length?t[0]:t)}:t})):[u];var f=-1;e=r(e,c(a));var d=o(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++f,value:t}}));return s(d,(function(t,e){return l(t,e,n)}))}},25970:(t,e,n)=>{var r=n(63012),i=n(79095);t.exports=function(t,e){return r(t,e,(function(e,n){return i(t,n)}))}},63012:(t,e,n)=>{var r=n(97786),i=n(10611),a=n(71811);t.exports=function(t,e,n){for(var o=-1,s=e.length,c={};++o<s;){var l=e[o],u=r(t,l);n(u,l)&&i(c,a(l,t),u)}return c}},40371:t=>{t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},79152:(t,e,n)=>{var r=n(97786);t.exports=function(t){return function(e){return r(e,t)}}},40098:t=>{var e=Math.ceil,n=Math.max;t.exports=function(t,r,i,a){for(var o=-1,s=n(e((r-t)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=t,t+=i;return c}},10107:t=>{t.exports=function(t,e,n,r,i){return i(t,(function(t,i,a){n=r?(r=!1,t):e(n,t,i,a)})),n}},18460:(t,e,n)=>{var r=n(6557),i=n(45357),a=n(30061);t.exports=function(t,e){return a(i(t,e,r),t+"")}},10611:(t,e,n)=>{var r=n(34865),i=n(71811),a=n(65776),o=n(13218),s=n(40327);t.exports=function(t,e,n,c){if(!o(t))return t;for(var l=-1,u=(e=i(e,t)).length,h=u-1,f=t;null!=f&&++l<u;){var d=s(e[l]),p=n;if("__proto__"===d||"constructor"===d||"prototype"===d)return t;if(l!=h){var g=f[d];void 0===(p=c?c(g,d,f):void 0)&&(p=o(g)?g:a(e[l+1])?[]:{})}r(f,d,p),f=f[d]}return t}},56560:(t,e,n)=>{var r=n(75703),i=n(38777),a=n(6557),o=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:a;t.exports=o},71131:t=>{t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},22545:t=>{t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},80531:(t,e,n)=>{var r=n(62705),i=n(29932),a=n(1469),o=n(33448),s=r?r.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 n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},27561:(t,e,n)=>{var r=n(67990),i=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(i,""):t}},7518:t=>{t.exports=function(t){return function(e){return t(e)}}},45652:(t,e,n)=>{var r=n(88668),i=n(47443),a=n(1196),o=n(74757),s=n(23593),c=n(21814);t.exports=function(t,e,n){var l=-1,u=i,h=t.length,f=!0,d=[],p=d;if(n)f=!1,u=a;else if(h>=200){var g=e?null:s(t);if(g)return c(g);f=!1,u=o,p=new r}else p=e?[]:d;t:for(;++l<h;){var y=t[l],m=e?e(y):y;if(y=n||0!==y?y:0,f&&m==m){for(var b=p.length;b--;)if(p[b]===m)continue t;e&&p.push(m),d.push(y)}else u(p,m,n)||(p!==d&&p.push(m),d.push(y))}return d}},47415:(t,e,n)=>{var r=n(29932);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},1757:t=>{t.exports=function(t,e,n){for(var r=-1,i=t.length,a=e.length,o={};++r<i;){var s=r<a?e[r]:void 0;n(o,t[r],s)}return o}},74757:t=>{t.exports=function(t,e){return t.has(e)}},54290:(t,e,n)=>{var r=n(6557);t.exports=function(t){return"function"==typeof t?t:r}},71811:(t,e,n)=>{var r=n(1469),i=n(15403),a=n(55514),o=n(79833);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:a(o(t))}},74318:(t,e,n)=>{var r=n(11149);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},64626:(t,e,n)=>{t=n.nmd(t);var r=n(55639),i=e&&!e.nodeType&&e,a=i&&t&&!t.nodeType&&t,o=a&&a.exports===i?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}},57157:(t,e,n)=>{var r=n(74318);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},93147:t=>{var e=/\w*$/;t.exports=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}},40419:(t,e,n)=>{var r=n(62705),i=r?r.prototype:void 0,a=i?i.valueOf:void 0;t.exports=function(t){return a?Object(a.call(t)):{}}},77133:(t,e,n)=>{var r=n(74318);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},26393:(t,e,n)=>{var r=n(33448);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,a=t==t,o=r(t),s=void 0!==e,c=null===e,l=e==e,u=r(e);if(!c&&!u&&!o&&t>e||o&&s&&l&&!c&&!u||i&&s&&l||!n&&l||!a)return 1;if(!i&&!o&&!u&&t<e||u&&n&&a&&!i&&!o||c&&n&&a||!s&&a||!l)return-1}return 0}},85022:(t,e,n)=>{var r=n(26393);t.exports=function(t,e,n){for(var i=-1,a=t.criteria,o=e.criteria,s=a.length,c=n.length;++i<s;){var l=r(a[i],o[i]);if(l)return i>=c?l:l*("desc"==n[i]?-1:1)}return t.index-e.index}},278:t=>{t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},98363:(t,e,n)=>{var r=n(34865),i=n(89465);t.exports=function(t,e,n,a){var o=!n;n||(n={});for(var s=-1,c=e.length;++s<c;){var l=e[s],u=a?a(n[l],t[l],l,n,t):void 0;void 0===u&&(u=t[l]),o?i(n,l,u):r(n,l,u)}return n}},18805:(t,e,n)=>{var r=n(98363),i=n(99551);t.exports=function(t,e){return r(t,i(t),e)}},1911:(t,e,n)=>{var r=n(98363),i=n(51442);t.exports=function(t,e){return r(t,i(t),e)}},14429:(t,e,n)=>{var r=n(55639)["__core-js_shared__"];t.exports=r},21463:(t,e,n)=>{var r=n(18460),i=n(16612);t.exports=function(t){return r((function(e,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,s&&i(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++r<a;){var c=n[r];c&&t(e,c,r,o)}return e}))}},99291:(t,e,n)=>{var r=n(98612);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var a=n.length,o=e?a:-1,s=Object(n);(e?o--:++o<a)&&!1!==i(s[o],o,s););return n}}},25063:t=>{t.exports=function(t){return function(e,n,r){for(var i=-1,a=Object(e),o=r(e),s=o.length;s--;){var c=o[t?s:++i];if(!1===n(a[c],c,a))break}return e}}},67740:(t,e,n)=>{var r=n(67206),i=n(98612),a=n(3674);t.exports=function(t){return function(e,n,o){var s=Object(e);if(!i(e)){var c=r(n,3);e=a(e),n=function(t){return c(s[t],t,s)}}var l=t(e,n,o);return l>-1?s[c?e[l]:l]:void 0}}},47445:(t,e,n)=>{var r=n(40098),i=n(16612),a=n(18601);t.exports=function(t){return function(e,n,o){return o&&"number"!=typeof o&&i(e,n,o)&&(n=o=void 0),e=a(e),void 0===n?(n=e,e=0):n=a(n),o=void 0===o?e<n?1:-1:a(o),r(e,n,o,t)}}},23593:(t,e,n)=>{var r=n(58525),i=n(50308),a=n(21814),o=r&&1/a(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=o},38777:(t,e,n)=>{var r=n(10852),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},67114:(t,e,n)=>{var r=n(88668),i=n(82908),a=n(74757);t.exports=function(t,e,n,o,s,c){var l=1&n,u=t.length,h=e.length;if(u!=h&&!(l&&h>u))return!1;var f=c.get(t),d=c.get(e);if(f&&d)return f==e&&d==t;var p=-1,g=!0,y=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++p<u;){var m=t[p],b=e[p];if(o)var _=l?o(b,m,p,e,t,c):o(m,b,p,t,e,c);if(void 0!==_){if(_)continue;g=!1;break}if(y){if(!i(e,(function(t,e){if(!a(y,e)&&(m===t||s(m,t,n,o,c)))return y.push(e)}))){g=!1;break}}else if(m!==b&&!s(m,b,n,o,c)){g=!1;break}}return c.delete(t),c.delete(e),g}},18351:(t,e,n)=>{var r=n(62705),i=n(11149),a=n(77813),o=n(67114),s=n(68776),c=n(21814),l=r?r.prototype:void 0,u=l?l.valueOf:void 0;t.exports=function(t,e,n,r,l,h,f){switch(n){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||!h(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 d=s;case"[object Set]":var p=1&r;if(d||(d=c),t.size!=e.size&&!p)return!1;var g=f.get(t);if(g)return g==e;r|=2,f.set(t,e);var y=o(d(t),d(e),r,l,h,f);return f.delete(t),y;case"[object Symbol]":if(u)return u.call(t)==u.call(e)}return!1}},16096:(t,e,n)=>{var r=n(58234),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,a,o,s){var c=1&n,l=r(t),u=l.length;if(u!=r(e).length&&!c)return!1;for(var h=u;h--;){var f=l[h];if(!(c?f in e:i.call(e,f)))return!1}var d=s.get(t),p=s.get(e);if(d&&p)return d==e&&p==t;var g=!0;s.set(t,e),s.set(e,t);for(var y=c;++h<u;){var m=t[f=l[h]],b=e[f];if(a)var _=c?a(b,m,f,e,t,s):a(m,b,f,t,e,s);if(!(void 0===_?m===b||o(m,b,n,a,s):_)){g=!1;break}y||(y="constructor"==f)}if(g&&!y){var v=t.constructor,x=e.constructor;v==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof v&&v instanceof v&&"function"==typeof x&&x instanceof x||(g=!1)}return s.delete(t),s.delete(e),g}},99021:(t,e,n)=>{var r=n(85564),i=n(45357),a=n(30061);t.exports=function(t){return a(i(t,void 0,r),t+"")}},31957:(t,e,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},58234:(t,e,n)=>{var r=n(68866),i=n(99551),a=n(3674);t.exports=function(t){return r(t,a,i)}},46904:(t,e,n)=>{var r=n(68866),i=n(51442),a=n(23360);t.exports=function(t){return r(t,a,i)}},45050:(t,e,n)=>{var r=n(37019);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},1499:(t,e,n)=>{var r=n(89162),i=n(3674);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var a=e[n],o=t[a];e[n]=[a,o,r(o)]}return e}},10852:(t,e,n)=>{var r=n(28458),i=n(47801);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},85924:(t,e,n)=>{var r=n(5569)(Object.getPrototypeOf,Object);t.exports=r},89607:(t,e,n)=>{var r=n(62705),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=a.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=o.call(t);return r&&(e?t[s]=n:delete t[s]),i}},99551:(t,e,n)=>{var r=n(34963),i=n(70479),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(t){return null==t?[]:(t=Object(t),r(o(t),(function(e){return a.call(t,e)})))}:i;t.exports=s},51442:(t,e,n)=>{var r=n(62488),i=n(85924),a=n(99551),o=n(70479),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,a(t)),t=i(t);return e}:o;t.exports=s},64160:(t,e,n)=>{var r=n(18552),i=n(57071),a=n(53818),o=n(58525),s=n(70577),c=n(44239),l=n(80346),u="[object Map]",h="[object Promise]",f="[object Set]",d="[object WeakMap]",p="[object DataView]",g=l(r),y=l(i),m=l(a),b=l(o),_=l(s),v=c;(r&&v(new r(new ArrayBuffer(1)))!=p||i&&v(new i)!=u||a&&v(a.resolve())!=h||o&&v(new o)!=f||s&&v(new s)!=d)&&(v=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,r=n?l(n):"";if(r)switch(r){case g:return p;case y:return u;case m:return h;case b:return f;case _:return d}return e}),t.exports=v},47801:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},222:(t,e,n)=>{var r=n(71811),i=n(35694),a=n(1469),o=n(65776),s=n(41780),c=n(40327);t.exports=function(t,e,n){for(var l=-1,u=(e=r(e,t)).length,h=!1;++l<u;){var f=c(e[l]);if(!(h=null!=t&&n(t,f)))break;t=t[f]}return h||++l!=u?h:!!(u=null==t?0:t.length)&&s(u)&&o(f,u)&&(a(t)||i(t))}},62689:t=>{var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return e.test(t)}},51789:(t,e,n)=>{var r=n(94536);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},80401:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},57667:(t,e,n)=>{var r=n(94536),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},21327:(t,e,n)=>{var r=n(94536),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},81866:(t,e,n)=>{var r=n(94536);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},43824:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},29148:(t,e,n)=>{var r=n(74318),i=n(57157),a=n(93147),o=n(40419),s=n(77133);t.exports=function(t,e,n){var c=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new c(+t);case"[object DataView]":return i(t,n);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,n);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(t);case"[object RegExp]":return a(t);case"[object Symbol]":return o(t)}}},38517:(t,e,n)=>{var r=n(3118),i=n(85924),a=n(25726);t.exports=function(t){return"function"!=typeof t.constructor||a(t)?{}:r(i(t))}},37285:(t,e,n)=>{var r=n(62705),i=n(35694),a=n(1469),o=r?r.isConcatSpreadable:void 0;t.exports=function(t){return a(t)||i(t)||!!(o&&t&&t[o])}},65776:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}},16612:(t,e,n)=>{var r=n(77813),i=n(98612),a=n(65776),o=n(13218);t.exports=function(t,e,n){if(!o(n))return!1;var s=typeof e;return!!("number"==s?i(n)&&a(e,n.length):"string"==s&&e in n)&&r(n[e],t)}},15403:(t,e,n)=>{var r=n(1469),i=n(33448),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||o.test(t)||!a.test(t)||null!=e&&t in Object(e)}},37019:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},15346:(t,e,n)=>{var r,i=n(14429),a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!a&&a in t}},25726:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},89162:(t,e,n)=>{var r=n(13218);t.exports=function(t){return t==t&&!r(t)}},27040:t=>{t.exports=function(){this.__data__=[],this.size=0}},14125:(t,e,n)=>{var r=n(18470),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))}},82117:(t,e,n)=>{var r=n(18470);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},67518:(t,e,n)=>{var r=n(18470);t.exports=function(t){return r(this.__data__,t)>-1}},54705:(t,e,n)=>{var r=n(18470);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},24785:(t,e,n)=>{var r=n(1989),i=n(38407),a=n(57071);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},11285:(t,e,n)=>{var r=n(45050);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},96e3:(t,e,n)=>{var r=n(45050);t.exports=function(t){return r(this,t).get(t)}},49916:(t,e,n)=>{var r=n(45050);t.exports=function(t){return r(this,t).has(t)}},95265:(t,e,n)=>{var r=n(45050);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},68776:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},42634:t=>{t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},24523:(t,e,n)=>{var r=n(88306);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},94536:(t,e,n)=>{var r=n(10852)(Object,"create");t.exports=r},86916:(t,e,n)=>{var r=n(5569)(Object.keys,Object);t.exports=r},33498:t=>{t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},31167:(t,e,n)=>{t=n.nmd(t);var r=n(31957),i=e&&!e.nodeType&&e,a=i&&t&&!t.nodeType&&t,o=a&&a.exports===i&&r.process,s=function(){try{return a&&a.require&&a.require("util").types||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=s},2333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},5569:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},45357:(t,e,n)=>{var r=n(96874),i=Math.max;t.exports=function(t,e,n){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]=n(c),r(t,this,l)}}},55639:(t,e,n)=>{var r=n(31957),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();t.exports=a},36390:t=>{t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},90619:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},72385:t=>{t.exports=function(t){return this.__data__.has(t)}},21814:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},30061:(t,e,n)=>{var r=n(56560),i=n(21275)(r);t.exports=i},21275:t=>{var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var i=e(),a=16-(i-r);if(r=i,a>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},37465:(t,e,n)=>{var r=n(38407);t.exports=function(){this.__data__=new r,this.size=0}},63779:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},67599:t=>{t.exports=function(t){return this.__data__.get(t)}},44758:t=>{t.exports=function(t){return this.__data__.has(t)}},34309:(t,e,n)=>{var r=n(38407),i=n(57071),a=n(83369);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new a(o)}return n.set(t,e),this.size=n.size,this}},42351:t=>{t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}},88016:(t,e,n)=>{var r=n(48983),i=n(62689),a=n(21903);t.exports=function(t){return i(t)?a(t):r(t)}},55514:(t,e,n)=>{var r=n(24523),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(a,"$1"):n||t)})),e}));t.exports=o},40327:(t,e,n)=>{var r=n(33448);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},80346:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},67990:t=>{var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},21903:t=>{var e="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\\ud83c[\\udffb-\\udfff]",r="[^\\ud800-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",o="(?:"+e+"|"+n+")?",s="[\\ufe0e\\ufe0f]?",c=s+o+"(?:\\u200d(?:"+[r,i,a].join("|")+")"+s+o+")*",l="(?:"+[r+e+"?",e,i,a,"[\\ud800-\\udfff]"].join("|")+")",u=RegExp(n+"(?="+n+")|"+l+c,"g");t.exports=function(t){for(var e=u.lastIndex=0;u.test(t);)++e;return e}},66678:(t,e,n)=>{var r=n(85990);t.exports=function(t){return r(t,4)}},50361:(t,e,n)=>{var r=n(85990);t.exports=function(t){return r(t,5)}},75703:t=>{t.exports=function(t){return function(){return t}}},91747:(t,e,n)=>{var r=n(18460),i=n(77813),a=n(16612),o=n(23360),s=Object.prototype,c=s.hasOwnProperty,l=r((function(t,e){t=Object(t);var n=-1,r=e.length,l=r>2?e[2]:void 0;for(l&&a(e[0],e[1],l)&&(r=1);++n<r;)for(var u=e[n],h=o(u),f=-1,d=h.length;++f<d;){var p=h[f],g=t[p];(void 0===g||i(g,s[p])&&!c.call(t,p))&&(t[p]=u[p])}return t}));t.exports=l},66073:(t,e,n)=>{t.exports=n(84486)},77813:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},63105:(t,e,n)=>{var r=n(34963),i=n(80760),a=n(67206),o=n(1469);t.exports=function(t,e){return(o(t)?r:i)(t,a(e,3))}},13311:(t,e,n)=>{var r=n(67740)(n(30998));t.exports=r},30998:(t,e,n)=>{var r=n(41848),i=n(67206),a=n(40554),o=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return-1;var c=null==n?0:a(n);return c<0&&(c=o(s+c,0)),r(t,i(e,3),c)}},85564:(t,e,n)=>{var r=n(21078);t.exports=function(t){return null!=t&&t.length?r(t,1):[]}},84486:(t,e,n)=>{var r=n(77412),i=n(89881),a=n(54290),o=n(1469);t.exports=function(t,e){return(o(t)?r:i)(t,a(e))}},62620:(t,e,n)=>{var r=n(28483),i=n(54290),a=n(23360);t.exports=function(t,e){return null==t?t:r(t,i(e),a)}},27361:(t,e,n)=>{var r=n(97786);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},18721:(t,e,n)=>{var r=n(78565),i=n(222);t.exports=function(t,e){return null!=t&&i(t,e,r)}},79095:(t,e,n)=>{var r=n(13),i=n(222);t.exports=function(t,e){return null!=t&&i(t,e,r)}},6557:t=>{t.exports=function(t){return t}},35694:(t,e,n)=>{var r=n(9454),i=n(37005),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return i(t)&&o.call(t,"callee")&&!s.call(t,"callee")};t.exports=c},1469:t=>{var e=Array.isArray;t.exports=e},98612:(t,e,n)=>{var r=n(23560),i=n(41780);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},29246:(t,e,n)=>{var r=n(98612),i=n(37005);t.exports=function(t){return i(t)&&r(t)}},44144:(t,e,n)=>{t=n.nmd(t);var r=n(55639),i=n(95062),a=e&&!e.nodeType&&e,o=a&&t&&!t.nodeType&&t,s=o&&o.exports===a?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||i;t.exports=c},41609:(t,e,n)=>{var r=n(280),i=n(64160),a=n(35694),o=n(1469),s=n(98612),c=n(44144),l=n(25726),u=n(36719),h=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!r(t).length;for(var n in t)if(h.call(t,n))return!1;return!0}},23560:(t,e,n)=>{var r=n(44239),i=n(13218);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},41780:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},56688:(t,e,n)=>{var r=n(25588),i=n(7518),a=n(31167),o=a&&a.isMap,s=o?i(o):r;t.exports=s},13218:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},37005:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},68630:(t,e,n)=>{var r=n(44239),i=n(85924),a=n(37005),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]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=l.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==u}},72928:(t,e,n)=>{var r=n(29221),i=n(7518),a=n(31167),o=a&&a.isSet,s=o?i(o):r;t.exports=s},47037:(t,e,n)=>{var r=n(44239),i=n(1469),a=n(37005);t.exports=function(t){return"string"==typeof t||!i(t)&&a(t)&&"[object String]"==r(t)}},33448:(t,e,n)=>{var r=n(44239),i=n(37005);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},36719:(t,e,n)=>{var r=n(38749),i=n(7518),a=n(31167),o=a&&a.isTypedArray,s=o?i(o):r;t.exports=s},52353:t=>{t.exports=function(t){return void 0===t}},3674:(t,e,n)=>{var r=n(14636),i=n(280),a=n(98612);t.exports=function(t){return a(t)?r(t):i(t)}},23360:(t,e,n)=>{var r=n(14636),i=n(10313),a=n(98612);t.exports=function(t){return a(t)?r(t,!0):i(t)}},10928:t=>{t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},35161:(t,e,n)=>{var r=n(29932),i=n(67206),a=n(69199),o=n(1469);t.exports=function(t,e){return(o(t)?r:a)(t,i(e,3))}},66604:(t,e,n)=>{var r=n(89465),i=n(47816),a=n(67206);t.exports=function(t,e){var n={};return e=a(e,3),i(t,(function(t,i,a){r(n,i,e(t,i,a))})),n}},6162:(t,e,n)=>{var r=n(56029),i=n(53325),a=n(6557);t.exports=function(t){return t&&t.length?r(t,a,i):void 0}},88306:(t,e,n)=>{var r=n(83369);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},82492:(t,e,n)=>{var r=n(42980),i=n(21463)((function(t,e,n){r(t,e,n)}));t.exports=i},53632:(t,e,n)=>{var r=n(56029),i=n(70433),a=n(6557);t.exports=function(t){return t&&t.length?r(t,a,i):void 0}},22762:(t,e,n)=>{var r=n(56029),i=n(67206),a=n(70433);t.exports=function(t,e){return t&&t.length?r(t,i(e,2),a):void 0}},50308:t=>{t.exports=function(){}},7771:(t,e,n)=>{var r=n(55639);t.exports=function(){return r.Date.now()}},78718:(t,e,n)=>{var r=n(25970),i=n(99021)((function(t,e){return null==t?{}:r(t,e)}));t.exports=i},39601:(t,e,n)=>{var r=n(40371),i=n(79152),a=n(15403),o=n(40327);t.exports=function(t){return a(t)?r(o(t)):i(t)}},96026:(t,e,n)=>{var r=n(47445)();t.exports=r},54061:(t,e,n)=>{var r=n(62663),i=n(89881),a=n(67206),o=n(10107),s=n(1469);t.exports=function(t,e,n){var c=s(t)?r:o,l=arguments.length<3;return c(t,a(e,4),n,l,i)}},84238:(t,e,n)=>{var r=n(280),i=n(64160),a=n(98612),o=n(47037),s=n(88016);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:r(t).length}},89734:(t,e,n)=>{var r=n(21078),i=n(82689),a=n(18460),o=n(16612),s=a((function(t,e){if(null==t)return[];var n=e.length;return n>1&&o(t,e[0],e[1])?e=[]:n>2&&o(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=s},70479:t=>{t.exports=function(){return[]}},95062:t=>{t.exports=function(){return!1}},18601:(t,e,n)=>{var r=n(14841);t.exports=function(t){return t?Infinity===(t=r(t))||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},40554:(t,e,n)=>{var r=n(18601);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},14841:(t,e,n)=>{var r=n(27561),i=n(13218),a=n(33448),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(a(t))return NaN;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=s.test(t);return n||c.test(t)?l(t.slice(2),n?2:8):o.test(t)?NaN:+t}},59881:(t,e,n)=>{var r=n(98363),i=n(23360);t.exports=function(t){return r(t,i(t))}},79833:(t,e,n)=>{var r=n(80531);t.exports=function(t){return null==t?"":r(t)}},68718:(t,e,n)=>{var r=n(77412),i=n(3118),a=n(47816),o=n(67206),s=n(85924),c=n(1469),l=n(44144),u=n(23560),h=n(13218),f=n(36719);t.exports=function(t,e,n){var d=c(t),p=d||l(t)||f(t);if(e=o(e,4),null==n){var g=t&&t.constructor;n=p?d?new g:[]:h(t)&&u(g)?i(s(t)):{}}return(p?r:a)(t,(function(t,r,i){return e(n,t,r,i)})),n}},93386:(t,e,n)=>{var r=n(21078),i=n(18460),a=n(45652),o=n(29246),s=i((function(t){return a(r(t,1,o,!0))}));t.exports=s},73955:(t,e,n)=>{var r=n(79833),i=0;t.exports=function(t){var e=++i;return r(t)+e}},52628:(t,e,n)=>{var r=n(47415),i=n(3674);t.exports=function(t){return null==t?[]:r(t,i(t))}},7287:(t,e,n)=>{var r=n(34865),i=n(1757);t.exports=function(t,e){return i(t||[],e||[],r)}},89234:()=>{},11941:function(t,e,n){(t=n.nmd(t)).exports=function(){"use strict";var e,r;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 n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function f(t,e){for(var n in e)h(e,n)&&(t[n]=e[n]);return h(e,"toString")&&(t.toString=e.toString),h(e,"valueOf")&&(t.valueOf=e.valueOf),t}function d(t,e,n,r){return _e(t,e,n,r,!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),n=r.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&&n);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=d(NaN);return null!=t?f(p(e),t):p(e).userInvalidated=!0,e}r=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};var m=i.momentProperties=[];function b(t,e){var n,r,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(n=0;n<m.length;n++)s(i=e[r=m[n]])||(t[r]=i);return t}var _=!1;function v(t){b(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===_&&(_=!0,i.updateOffset(this),_=!1)}function x(t){return t instanceof v||null!=t&&null!=t._isAMomentObject}function k(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function w(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=k(e)),n}function T(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;r<i;r++)(n&&t[r]!==e[r]||!n&&w(t[r])!==w(e[r]))&&o++;return o+a}function E(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function C(t,e){var n=!0;return f((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var r,a=[],o=0;o<arguments.length;o++){if(r="","object"==typeof arguments[o]){for(var s in r+="\n["+o+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[o];a.push(r)}E(t+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var S,A={};function M(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),A[t]||(E(e),A[t]=!0)}function N(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function D(t,e){var n,r=f({},t);for(n in e)h(e,n)&&(o(t[n])&&o(e[n])?(r[n]={},f(r[n],t[n]),f(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);for(n in t)h(t,n)&&!h(e,n)&&o(t[n])&&(r[n]=f({},r[n]));return r}function L(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,S=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)h(t,e)&&n.push(e);return n};var O={};function B(t,e){var n=t.toLowerCase();O[n]=O[n+"s"]=O[e]=t}function I(t){return"string"==typeof t?O[t]||O[t.toLowerCase()]:void 0}function F(t){var e,n,r={};for(n in t)h(t,n)&&(e=I(n))&&(r[e]=t[n]);return r}var R={};function P(t,e){R[t]=e}function $(t,e,n){var r=""+Math.abs(t),i=e-r.length;return(0<=t?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var j=/(\[[^\[]*\])|(\\)?([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,Y=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,z={},U={};function q(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&(U[t]=i),e&&(U[e[0]]=function(){return $(i.apply(this,arguments),e[1],e[2])}),n&&(U[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function W(t,e){return t.isValid()?(e=H(e,t.localeData()),z[e]=z[e]||function(t){var e,n,r,i=t.match(j);for(e=0,n=i.length;e<n;e++)U[i[e]]?i[e]=U[i[e]]:i[e]=(r=i[e]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(e){var r,a="";for(r=0;r<n;r++)a+=N(i[r])?i[r].call(e,t):i[r];return a}}(e),z[e](t)):t.localeData().invalidDate()}function H(t,e){var n=5;function r(t){return e.longDateFormat(t)||t}for(Y.lastIndex=0;0<=n&&Y.test(t);)t=t.replace(Y,r),Y.lastIndex=0,n-=1;return t}var V=/\d/,G=/\d\d/,X=/\d{3}/,Z=/\d{4}/,Q=/[+-]?\d{6}/,K=/\d\d?/,J=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,et=/\d{1,3}/,nt=/\d{1,4}/,rt=/[+-]?\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,n){lt[t]=N(e)?e:function(t,r){return t&&n?n:e}}function ht(t,e){return h(lt,t)?lt[t](e._strict,e._locale):new RegExp(ft(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,r,i){return e||n||r||i}))))}function ft(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var dt={};function pt(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),c(e)&&(r=function(t,n){n[e]=w(t)}),n=0;n<t.length;n++)dt[t[n]]=r}function gt(t,e){pt(t,(function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)}))}function yt(t){return mt(t)?366:365}function mt(t){return t%4==0&&t%100!=0||t%400==0}q("Y",0,0,(function(){var t=this.year();return t<=9999?""+t:"+"+t})),q(0,["YY",2],0,(function(){return this.year()%100})),q(0,["YYYY",4],0,"year"),q(0,["YYYYY",5],0,"year"),q(0,["YYYYYY",6,!0],0,"year"),B("year","y"),P("year",1),ut("Y",at),ut("YY",K,G),ut("YYYY",nt,Z),ut("YYYYY",rt,Q),ut("YYYYYY",rt,Q),pt(["YYYYY","YYYYYY"],0),pt("YYYY",(function(t,e){e[0]=2===t.length?i.parseTwoDigitYear(t):w(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 w(t)+(68<w(t)?1900:2e3)};var bt,_t=vt("FullYear",!0);function vt(t,e){return function(n){return null!=n?(kt(this,t,n),i.updateOffset(this,e),this):xt(this,t)}}function xt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function kt(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&mt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),wt(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function wt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=(e%12+12)%12;return t+=(e-n)/12,1===n?mt(t)?29:28:31-n%7%2}bt=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},q("M",["MM",2],"Mo",(function(){return this.month()+1})),q("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),q("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),B("month","M"),P("month",8),ut("M",K),ut("MM",K,G),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]=w(t)-1})),pt(["MMM","MMMM"],(function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[1]=i:p(n).invalidMonth=t}));var Tt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Et="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ct="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function St(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=w(e);else if(!c(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),wt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function At(t){return null!=t?(St(this,t),i.updateOffset(this,!0),this):xt(this,"Month")}var Mt=ct,Nt=ct;function Dt(){function t(t,e){return e.length-t.length}var e,n,r=[],i=[],a=[];for(e=0;e<12;e++)n=d([2e3,e]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(t),i.sort(t),a.sort(t),e=0;e<12;e++)r[e]=ft(r[e]),i[e]=ft(i[e]);for(e=0;e<24;e++)a[e]=ft(a[e]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Lt(t){var e;if(t<100&&0<=t){var n=Array.prototype.slice.call(arguments);n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function Ot(t,e,n){var r=7+e-n;return-(7+Lt(t,0,r).getUTCDay()-e)%7+r-1}function Bt(t,e,n,r,i){var a,o,s=1+7*(e-1)+(7+n-r)%7+Ot(t,r,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 It(t,e,n){var r,i,a=Ot(t.year(),e,n),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?r=o+Ft(i=t.year()-1,e,n):o>Ft(t.year(),e,n)?(r=o-Ft(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function Ft(t,e,n){var r=Ot(t,e,n),i=Ot(t+1,e,n);return(yt(t)-r+i)/7}function Rt(t,e){return t.slice(e,7).concat(t.slice(0,e))}q("w",["ww",2],"wo","week"),q("W",["WW",2],"Wo","isoWeek"),B("week","w"),B("isoWeek","W"),P("week",5),P("isoWeek",5),ut("w",K),ut("ww",K,G),ut("W",K),ut("WW",K,G),gt(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=w(t)})),q("d",0,"do","day"),q("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),q("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),q("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),q("e",0,0,"weekday"),q("E",0,0,"isoWeekday"),B("day","d"),B("weekday","e"),B("isoWeekday","E"),P("day",11),P("weekday",11),P("isoWeekday",11),ut("d",K),ut("e",K),ut("E",K),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,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:p(n).invalidWeekday=t})),gt(["d","e","E"],(function(t,e,n,r){e[r]=w(t)}));var Pt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),$t="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),jt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Yt=ct,zt=ct,Ut=ct;function qt(){function t(t,e){return e.length-t.length}var e,n,r,i,a,o=[],s=[],c=[],l=[];for(e=0;e<7;e++)n=d([2e3,1]).day(e),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),a=this.weekdays(n,""),o.push(r),s.push(i),c.push(a),l.push(r),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]=ft(s[e]),c[e]=ft(c[e]),l[e]=ft(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 Wt(){return this.hours()%12||12}function Ht(t,e){q(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Vt(t,e){return e._meridiemParse}q("H",["HH",2],0,"hour"),q("h",["hh",2],0,Wt),q("k",["kk",2],0,(function(){return this.hours()||24})),q("hmm",0,0,(function(){return""+Wt.apply(this)+$(this.minutes(),2)})),q("hmmss",0,0,(function(){return""+Wt.apply(this)+$(this.minutes(),2)+$(this.seconds(),2)})),q("Hmm",0,0,(function(){return""+this.hours()+$(this.minutes(),2)})),q("Hmmss",0,0,(function(){return""+this.hours()+$(this.minutes(),2)+$(this.seconds(),2)})),Ht("a",!0),Ht("A",!1),B("hour","h"),P("hour",13),ut("a",Vt),ut("A",Vt),ut("H",K),ut("h",K),ut("k",K),ut("HH",K,G),ut("hh",K,G),ut("kk",K,G),ut("hmm",J),ut("hmmss",tt),ut("Hmm",J),ut("Hmmss",tt),pt(["H","HH"],3),pt(["k","kk"],(function(t,e,n){var r=w(t);e[3]=24===r?0:r})),pt(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),pt(["h","hh"],(function(t,e,n){e[3]=w(t),p(n).bigHour=!0})),pt("hmm",(function(t,e,n){var r=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r)),p(n).bigHour=!0})),pt("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r,2)),e[5]=w(t.substr(i)),p(n).bigHour=!0})),pt("Hmm",(function(t,e,n){var r=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r))})),pt("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r,2)),e[5]=w(t.substr(i))}));var Gt,Xt=vt("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:Et,monthsShort:Ct,week:{dow:0,doy:6},weekdays:Pt,weekdaysMin:jt,weekdaysShort:$t,meridiemParse:/[ap]\.?m?\.?/i},Qt={},Kt={};function Jt(t){return t?t.toLowerCase().replace("_","-"):t}function te(e){var r=null;if(!Qt[e]&&t&&t.exports)try{r=Gt._abbr,n(11748)("./"+e),ee(r)}catch(e){}return Qt[e]}function ee(t,e){var n;return t&&((n=s(e)?re(t):ne(t,e))?Gt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Gt._abbr}function ne(t,e){if(null===e)return delete Qt[t],null;var n,r=Zt;if(e.abbr=t,null!=Qt[t])M("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."),r=Qt[t]._config;else if(null!=e.parentLocale)if(null!=Qt[e.parentLocale])r=Qt[e.parentLocale]._config;else{if(null==(n=te(e.parentLocale)))return Kt[e.parentLocale]||(Kt[e.parentLocale]=[]),Kt[e.parentLocale].push({name:t,config:e}),null;r=n._config}return Qt[t]=new L(D(r,e)),Kt[t]&&Kt[t].forEach((function(t){ne(t.name,t.config)})),ee(t),Qt[t]}function re(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Gt;if(!a(t)){if(e=te(t))return e;t=[t]}return function(t){for(var e,n,r,i,a=0;a<t.length;){for(e=(i=Jt(t[a]).split("-")).length,n=(n=Jt(t[a+1]))?n.split("-"):null;0<e;){if(r=te(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&T(i,n,!0)>=e-1)break;e--}a++}return Gt}(t)}function ie(t){var e,n=t._a;return n&&-2===p(t).overflow&&(e=n[1]<0||11<n[1]?1:n[2]<1||n[2]>wt(n[0],n[1])?2:n[3]<0||24<n[3]||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||59<n[4]?4:n[5]<0||59<n[5]?5:n[6]<0||999<n[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,n){return null!=t?t:null!=e?e:n}function oe(t){var e,n,r,a,o,s=[];if(!t._d){var c,l;for(c=t,l=new Date(i.now()),r=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,n,r,i,a,o,s,c;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)a=1,o=4,n=ae(e.GG,t._a[0],It(ve(),1,4).year),r=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=It(ve(),a,o);n=ae(e.gg,t._a[0],l.year),r=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}r<1||r>Ft(n,a,o)?p(t)._overflowWeeks=!0:null!=c?p(t)._overflowWeekday=!0:(s=Bt(n,r,i,a,o),t._a[0]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=ae(t._a[0],r[0]),(t._dayOfYear>yt(o)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),n=Lt(o,0,t._dayOfYear),t._a[1]=n.getUTCMonth(),t._a[2]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=r[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?Lt:function(t,e,n,r,i,a,o){var s;return t<100&&0<=t?(s=new Date(t+400,e,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,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}/]],he=[["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/]],fe=/^\/?Date\((\-?\d+)/i;function de(t){var e,n,r,i,a,o,s=t._i,c=se.exec(s)||ce.exec(s);if(c){for(p(t).iso=!0,e=0,n=ue.length;e<n;e++)if(ue[e][1].exec(c[1])){i=ue[e][0],r=!1!==ue[e][2];break}if(null==i)return void(t._isValid=!1);if(c[3]){for(e=0,n=he.length;e<n;e++)if(he[e][1].exec(c[3])){a=(c[2]||" ")+he[e][0];break}if(null==a)return void(t._isValid=!1)}if(!r&&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}))$/;var 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,n,r,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,n,r,i,a){var o=[function(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}(t),Ct.indexOf(e),parseInt(n,10),parseInt(r,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(n=a,r=t,(e=i[1])&&$t.indexOf(e)!==new Date(n[0],n[1],n[2]).getDay()&&(p(r).weekdayMismatch=!0,!(r._isValid=!1)))return;t._a=a,t._tzm=function(t,e,n){if(t)return ge[t];if(e)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(i[8],i[9],i[10]),t._d=Lt.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,n,r,a,o,s,c,l,u=""+t._i,f=u.length,d=0;for(r=H(t._f,t._locale).match(j)||[],e=0;e<r.length;e++)a=r[e],(n=(u.match(ht(a,t))||[])[0])&&(0<(o=u.substr(0,u.indexOf(n))).length&&p(t).unusedInput.push(o),u=u.slice(u.indexOf(n)+n.length),d+=n.length),U[a]?(n?p(t).empty=!1:p(t).unusedTokens.push(a),s=a,l=t,null!=(c=n)&&h(dt,s)&&dt[s](c,l._a,l,s)):t._strict&&!n&&p(t).unusedTokens.push(a);p(t).charsLeftOver=f-d,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,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):(null!=t.isPM&&((r=t.isPM(n))&&e<12&&(e+=12),r||12!==e||(e=0)),e)}(t._locale,t._a[3],t._meridiem),oe(t),ie(t)}else ye(t);else de(t)}function be(t){var e,n,r,h,d=t._i,m=t._f;return t._locale=t._locale||re(t._l),null===d||void 0===m&&""===d?y({nullInput:!0}):("string"==typeof d&&(t._i=d=t._locale.preparse(d)),x(d)?new v(ie(d)):(l(d)?t._d=d:a(m)?function(t){var e,n,r,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=b({},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==r||a<r)&&(r=a,n=e));f(t,n||e)}(t):m?me(t):s(n=(e=t)._i)?e._d=new Date(i.now()):l(n)?e._d=new Date(n.valueOf()):"string"==typeof n?(r=e,null===(h=fe.exec(r._i))?(de(r),!1===r._isValid&&(delete r._isValid,ye(r),!1===r._isValid&&(delete r._isValid,i.createFromInputFallback(r)))):r._d=new Date(+h[1])):a(n)?(e._a=u(n.slice(0),(function(t){return parseInt(t,10)})),oe(e)):o(n)?function(t){if(!t._d){var e=F(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(n)?e._d=new Date(n):i.createFromInputFallback(e),g(t)||(t._d=null),t))}function _e(t,e,n,r,i){var s,c={};return!0!==n&&!1!==n||(r=n,n=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=n,c._i=t,c._f=e,c._strict=r,(s=new v(ie(be(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function ve(t,e,n,r){return _e(t,e,n,r,!1)}i.createFromInputFallback=C("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 xe=C("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=ve.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:y()})),ke=C("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=ve.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:y()}));function we(t,e){var n,r;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return ve();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}var Te=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ee(t){var e=F(t),n=e.year||0,r=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===bt.call(Te,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,r=0;r<Te.length;++r)if(t[Te[r]]){if(n)return!1;parseFloat(t[Te[r]])!==w(t[Te[r]])&&(n=!0)}return!0}(e),this._milliseconds=+u+1e3*l+6e4*c+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=re(),this._bubble()}function Ce(t){return t instanceof Ee}function Se(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Ae(t,e){q(t,0,0,(function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+$(~~(t/60),2)+e+$(~~t%60,2)}))}Ae("Z",":"),Ae("ZZ",""),ut("Z",st),ut("ZZ",st),pt(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=Ne(st,t)}));var Me=/([\+\-]|\d\d)/gi;function Ne(t,e){var n=(e||"").match(t);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Me)||["-",0,0],i=60*r[1]+w(r[2]);return 0===i?0:"+"===r[0]?i:-i}function De(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(x(t)||l(t)?t.valueOf():ve(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):ve(t).local()}function Le(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Oe(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Be=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ie=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Fe(t,e){var n,r,i,a=t,o=null;return Ce(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:c(t)?(a={},e?a[e]=t:a.milliseconds=t):(o=Be.exec(t))?(n="-"===o[1]?-1:1,a={y:0,d:w(o[2])*n,h:w(o[3])*n,m:w(o[4])*n,s:w(o[5])*n,ms:w(Se(1e3*o[6]))*n}):(o=Ie.exec(t))?(n="-"===o[1]?-1:1,a={y:Re(o[2],n),M:Re(o[3],n),w:Re(o[4],n),d:Re(o[5],n),h:Re(o[6],n),m:Re(o[7],n),s:Re(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=function(t,e){var n;return t.isValid()&&e.isValid()?(e=De(e,t),t.isBefore(e)?n=Pe(t,e):((n=Pe(e,t)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}(ve(a.from),ve(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new Ee(a),Ce(t)&&h(t,"_locale")&&(r._locale=t._locale),r}function Re(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Pe(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function $e(t,e){return function(n,r){var i;return null===r||isNaN(+r)||(M(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=n,n=r,r=i),je(this,Fe(n="string"==typeof n?+n:n,r),t),this}}function je(t,e,n,r){var a=e._milliseconds,o=Se(e._days),s=Se(e._months);t.isValid()&&(r=null==r||r,s&&St(t,xt(t,"Month")+s*n),o&&kt(t,"Date",xt(t,"Date")+o*n),a&&t._d.setTime(t._d.valueOf()+a*n),r&&i.updateOffset(t,o||s))}Fe.fn=Ee.prototype,Fe.invalid=function(){return Fe(NaN)};var Ye=$e(1,"add"),ze=$e(-1,"subtract");function Ue(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,"months");return-(n+(e-r<0?(e-r)/(r-t.clone().add(n-1,"months")):(e-r)/(t.clone().add(n+1,"months")-r)))||0}function qe(t){var e;return void 0===t?this._locale._abbr:(null!=(e=re(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var We=C("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 He(){return this._locale}var Ve=126227808e5;function Ge(t,e){return(t%e+e)%e}function Xe(t,e,n){return t<100&&0<=t?new Date(t+400,e,n)-Ve:new Date(t,e,n).valueOf()}function Ze(t,e,n){return t<100&&0<=t?Date.UTC(t+400,e,n)-Ve:Date.UTC(t,e,n)}function Qe(t,e){q(0,[t,t.length],0,e)}function Ke(t,e,n,r,i){var a;return null==t?It(this,r,i).year:((a=Ft(t,r,i))<e&&(e=a),function(t,e,n,r,i){var a=Bt(t,e,n,r,i),o=Lt(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,t,e,n,r,i))}q(0,["gg",2],0,(function(){return this.weekYear()%100})),q(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Qe("gggg","weekYear"),Qe("ggggg","weekYear"),Qe("GGGG","isoWeekYear"),Qe("GGGGG","isoWeekYear"),B("weekYear","gg"),B("isoWeekYear","GG"),P("weekYear",1),P("isoWeekYear",1),ut("G",at),ut("g",at),ut("GG",K,G),ut("gg",K,G),ut("GGGG",nt,Z),ut("gggg",nt,Z),ut("GGGGG",rt,Q),ut("ggggg",rt,Q),gt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,r){e[r.substr(0,2)]=w(t)})),gt(["gg","GG"],(function(t,e,n,r){e[r]=i.parseTwoDigitYear(t)})),q("Q",0,"Qo","quarter"),B("quarter","Q"),P("quarter",7),ut("Q",V),pt("Q",(function(t,e){e[1]=3*(w(t)-1)})),q("D",["DD",2],"Do","date"),B("date","D"),P("date",9),ut("D",K),ut("DD",K,G),ut("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),pt(["D","DD"],2),pt("Do",(function(t,e){e[2]=w(t.match(K)[0])}));var Je=vt("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear"),B("dayOfYear","DDD"),P("dayOfYear",4),ut("DDD",et),ut("DDDD",X),pt(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=w(t)})),q("m",["mm",2],0,"minute"),B("minute","m"),P("minute",14),ut("m",K),ut("mm",K,G),pt(["m","mm"],4);var tn=vt("Minutes",!1);q("s",["ss",2],0,"second"),B("second","s"),P("second",15),ut("s",K),ut("ss",K,G),pt(["s","ss"],5);var en,nn=vt("Seconds",!1);for(q("S",0,0,(function(){return~~(this.millisecond()/100)})),q(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),q(0,["SSS",3],0,"millisecond"),q(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),q(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),q(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),q(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),q(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),q(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),B("millisecond","ms"),P("millisecond",16),ut("S",et,V),ut("SS",et,G),ut("SSS",et,X),en="SSSS";en.length<=9;en+="S")ut(en,it);function rn(t,e){e[6]=w(1e3*("0."+t))}for(en="S";en.length<=9;en+="S")pt(en,rn);var an=vt("Milliseconds",!1);q("z",0,0,"zoneAbbr"),q("zz",0,0,"zoneName");var on=v.prototype;function sn(t){return t}on.add=Ye,on.calendar=function(t,e){var n=t||ve(),r=De(n,this).startOf("day"),a=i.calendarFormat(this,r)||"sameElse",o=e&&(N(e[a])?e[a].call(this,n):e[a]);return this.format(o||this.localeData().calendar(a,this,ve(n)))},on.clone=function(){return new v(this)},on.diff=function(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=De(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=I(e)){case"year":a=Ue(this,r)/12;break;case"month":a=Ue(this,r);break;case"quarter":a=Ue(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:k(a)},on.endOf=function(t){var e;if(void 0===(t=I(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?Ze:Xe;switch(t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-Ge(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-Ge(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-Ge(e,1e3)-1}return this._d.setTime(e),i.updateOffset(this,!0),this},on.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=W(this,t);return this.localeData().postformat(e)},on.from=function(t,e){return this.isValid()&&(x(t)&&t.isValid()||ve(t).isValid())?Fe({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},on.fromNow=function(t){return this.from(ve(),t)},on.to=function(t,e){return this.isValid()&&(x(t)&&t.isValid()||ve(t).isValid())?Fe({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},on.toNow=function(t){return this.to(ve(),t)},on.get=function(t){return N(this[t=I(t)])?this[t]():this},on.invalidAt=function(){return p(this).overflow},on.isAfter=function(t,e){var n=x(t)?t:ve(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},on.isBefore=function(t,e){var n=x(t)?t:ve(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},on.isBetween=function(t,e,n,r){var i=x(t)?t:ve(t),a=x(e)?e:ve(e);return!!(this.isValid()&&i.isValid()&&a.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n))},on.isSame=function(t,e){var n,r=x(t)?t:ve(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},on.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},on.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},on.isValid=function(){return g(this)},on.lang=We,on.locale=qe,on.localeData=He,on.max=ke,on.min=xe,on.parsingFlags=function(){return f({},p(this))},on.set=function(t,e){if("object"==typeof t)for(var n=function(t){var e=[];for(var n in t)e.push({unit:n,priority:R[n]});return e.sort((function(t,e){return t.priority-e.priority})),e}(t=F(t)),r=0;r<n.length;r++)this[n[r].unit](t[n[r].unit]);else if(N(this[t=I(t)]))return this[t](e);return this},on.startOf=function(t){var e;if(void 0===(t=I(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?Ze:Xe;switch(t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Ge(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=Ge(e,6e4);break;case"second":e=this._d.valueOf(),e-=Ge(e,1e3)}return this._d.setTime(e),i.updateOffset(this,!0),this},on.subtract=ze,on.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},on.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()}},on.toDate=function(){return new Date(this.valueOf())},on.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||9999<n.year()?W(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):N(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(n,"Z")):W(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},on.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 n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=e+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},on.toJSON=function(){return this.isValid()?this.toISOString():null},on.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},on.unix=function(){return Math.floor(this.valueOf()/1e3)},on.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},on.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},on.year=_t,on.isLeapYear=function(){return mt(this.year())},on.weekYear=function(t){return Ke.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},on.isoWeekYear=function(t){return Ke.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},on.quarter=on.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},on.month=At,on.daysInMonth=function(){return wt(this.year(),this.month())},on.week=on.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},on.isoWeek=on.isoWeeks=function(t){var e=It(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},on.weeksInYear=function(){var t=this.localeData()._week;return Ft(this.year(),t.dow,t.doy)},on.isoWeeksInYear=function(){return Ft(this.year(),1,4)},on.date=Je,on.day=on.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,n,r=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,n=this.localeData(),t="string"!=typeof e?e:isNaN(e)?"number"==typeof(e=n.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-r,"d")):r},on.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")},on.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null==t)return this.day()||7;var e,n,r=(e=t,n=this.localeData(),"string"==typeof e?n.weekdaysParse(e)%7||7:isNaN(e)?null:e);return this.day(this.day()%7?r:r-7)},on.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")},on.hour=on.hours=Xt,on.minute=on.minutes=tn,on.second=on.seconds=nn,on.millisecond=on.milliseconds=an,on.utcOffset=function(t,e,n){var r,a=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null==t)return this._isUTC?a:Le(this);if("string"==typeof t){if(null===(t=Ne(st,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(r=Le(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),a!==t&&(!e||this._changeInProgress?je(this,Fe(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this},on.utc=function(t){return this.utcOffset(0,t)},on.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Le(this),"m")),this},on.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Ne(ot,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},on.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?ve(t).utcOffset():0,(this.utcOffset()-t)%60==0)},on.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},on.isLocal=function(){return!!this.isValid()&&!this._isUTC},on.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},on.isUtc=Oe,on.isUTC=Oe,on.zoneAbbr=function(){return this._isUTC?"UTC":""},on.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},on.dates=C("dates accessor is deprecated. Use date instead.",Je),on.months=C("months accessor is deprecated. Use month instead",At),on.years=C("years accessor is deprecated. Use year instead",_t),on.zone=C("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()})),on.isDSTShifted=C("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(b(t,this),(t=be(t))._a){var e=t._isUTC?d(t._a):ve(t._a);this._isDSTShifted=this.isValid()&&0<T(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted}));var cn=L.prototype;function ln(t,e,n,r){var i=re(),a=d().set(r,e);return i[n](a,t)}function un(t,e,n){if(c(t)&&(e=t,t=void 0),t=t||"",null!=e)return ln(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=ln(t,r,n,"month");return i}function hn(t,e,n,r){"boolean"==typeof t?c(e)&&(n=e,e=void 0):(e=t,t=!1,c(n=e)&&(n=e,e=void 0)),e=e||"";var i,a=re(),o=t?a._week.dow:0;if(null!=n)return ln(e,(n+o)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=ln(e,(i+o)%7,r,"day");return s}cn.calendar=function(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return N(r)?r.call(e,n):r},cn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},cn.invalidDate=function(){return this._invalidDate},cn.ordinal=function(t){return this._ordinal.replace("%d",t)},cn.preparse=sn,cn.postformat=sn,cn.relativeTime=function(t,e,n,r){var i=this._relativeTime[n];return N(i)?i(t,e,n,r):i.replace(/%d/i,t)},cn.pastFuture=function(t,e){var n=this._relativeTime[0<t?"future":"past"];return N(n)?n(e):n.replace(/%s/i,e)},cn.set=function(t){var e,n;for(n in t)N(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},cn.months=function(t,e){return t?a(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Tt).test(e)?"format":"standalone"][t.month()]:a(this._months)?this._months:this._months.standalone},cn.monthsShort=function(t,e){return t?a(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Tt.test(e)?"format":"standalone"][t.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},cn.monthsParse=function(t,e,n){var r,i,a;if(this._monthsParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=d([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(i=bt.call(this._shortMonthsParse,o))?i:null:-1!==(i=bt.call(this._longMonthsParse,o))?i:null:"MMM"===e?-1!==(i=bt.call(this._shortMonthsParse,o))||-1!==(i=bt.call(this._longMonthsParse,o))?i:null:-1!==(i=bt.call(this._longMonthsParse,o))||-1!==(i=bt.call(this._shortMonthsParse,o))?i:null}.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=d([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},cn.monthsRegex=function(t){return this._monthsParseExact?(h(this,"_monthsRegex")||Dt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=Nt),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},cn.monthsShortRegex=function(t){return this._monthsParseExact?(h(this,"_monthsRegex")||Dt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Mt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},cn.week=function(t){return It(t,this._week.dow,this._week.doy).week},cn.firstDayOfYear=function(){return this._week.doy},cn.firstDayOfWeek=function(){return this._week.dow},cn.weekdays=function(t,e){var n=a(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Rt(n,this._week.dow):t?n[t.day()]:n},cn.weekdaysMin=function(t){return!0===t?Rt(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},cn.weekdaysShort=function(t){return!0===t?Rt(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},cn.weekdaysParse=function(t,e,n){var r,i,a;if(this._weekdaysParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=d([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=bt.call(this._weekdaysParse,o))?i:null:"ddd"===e?-1!==(i=bt.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=bt.call(this._minWeekdaysParse,o))?i:null:"dddd"===e?-1!==(i=bt.call(this._weekdaysParse,o))||-1!==(i=bt.call(this._shortWeekdaysParse,o))||-1!==(i=bt.call(this._minWeekdaysParse,o))?i:null:"ddd"===e?-1!==(i=bt.call(this._shortWeekdaysParse,o))||-1!==(i=bt.call(this._weekdaysParse,o))||-1!==(i=bt.call(this._minWeekdaysParse,o))?i:null:-1!==(i=bt.call(this._minWeekdaysParse,o))||-1!==(i=bt.call(this._weekdaysParse,o))||-1!==(i=bt.call(this._shortWeekdaysParse,o))?i:null}.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=d([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}},cn.weekdaysRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=Yt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},cn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=zt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},cn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ut),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},cn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},cn.meridiem=function(t,e,n){return 11<t?n?"pm":"PM":n?"am":"AM"},ee("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===w(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=C("moment.lang is deprecated. Use moment.locale instead.",ee),i.langData=C("moment.langData is deprecated. Use moment.localeData instead.",re);var fn=Math.abs;function dn(t,e,n,r){var i=Fe(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function pn(t){return t<0?Math.floor(t):Math.ceil(t)}function gn(t){return 4800*t/146097}function yn(t){return 146097*t/4800}function mn(t){return function(){return this.as(t)}}var bn=mn("ms"),_n=mn("s"),vn=mn("m"),xn=mn("h"),kn=mn("d"),wn=mn("w"),Tn=mn("M"),En=mn("Q"),Cn=mn("y");function Sn(t){return function(){return this.isValid()?this._data[t]:NaN}}var An=Sn("milliseconds"),Mn=Sn("seconds"),Nn=Sn("minutes"),Dn=Sn("hours"),Ln=Sn("days"),On=Sn("months"),Bn=Sn("years"),In=Math.round,Fn={ss:44,s:45,m:45,h:22,d:26,M:11},Rn=Math.abs;function Pn(t){return(0<t)-(t<0)||+t}function $n(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=Rn(this._milliseconds)/1e3,r=Rn(this._days),i=Rn(this._months);e=k((t=k(n/60))/60),n%=60,t%=60;var a=k(i/12),o=i%=12,s=r,c=e,l=t,u=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var f=h<0?"-":"",d=Pn(this._months)!==Pn(h)?"-":"",p=Pn(this._days)!==Pn(h)?"-":"",g=Pn(this._milliseconds)!==Pn(h)?"-":"";return f+"P"+(a?d+a+"Y":"")+(o?d+o+"M":"")+(s?p+s+"D":"")+(c||l||u?"T":"")+(c?g+c+"H":"")+(l?g+l+"M":"")+(u?g+u+"S":"")}var jn=Ee.prototype;return jn.isValid=function(){return this._isValid},jn.abs=function(){var t=this._data;return this._milliseconds=fn(this._milliseconds),this._days=fn(this._days),this._months=fn(this._months),t.milliseconds=fn(t.milliseconds),t.seconds=fn(t.seconds),t.minutes=fn(t.minutes),t.hours=fn(t.hours),t.months=fn(t.months),t.years=fn(t.years),this},jn.add=function(t,e){return dn(this,t,e,1)},jn.subtract=function(t,e){return dn(this,t,e,-1)},jn.as=function(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=I(t))||"quarter"===t||"year"===t)switch(e=this._days+r/864e5,n=this._months+gn(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(yn(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}},jn.asMilliseconds=bn,jn.asSeconds=_n,jn.asMinutes=vn,jn.asHours=xn,jn.asDays=kn,jn.asWeeks=wn,jn.asMonths=Tn,jn.asQuarters=En,jn.asYears=Cn,jn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN},jn._bubble=function(){var t,e,n,r,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*pn(yn(s)+o),s=o=0),c.milliseconds=a%1e3,t=k(a/1e3),c.seconds=t%60,e=k(t/60),c.minutes=e%60,n=k(e/60),c.hours=n%24,s+=i=k(gn(o+=k(n/24))),o-=pn(yn(i)),r=k(s/12),s%=12,c.days=o,c.months=s,c.years=r,this},jn.clone=function(){return Fe(this)},jn.get=function(t){return t=I(t),this.isValid()?this[t+"s"]():NaN},jn.milliseconds=An,jn.seconds=Mn,jn.minutes=Nn,jn.hours=Dn,jn.days=Ln,jn.weeks=function(){return k(this.days()/7)},jn.months=On,jn.years=Bn,jn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e,n,r,i,a,o,s,c,l,u,h=this.localeData(),f=(e=!t,n=h,r=Fe(this).abs(),i=In(r.as("s")),a=In(r.as("m")),o=In(r.as("h")),s=In(r.as("d")),c=In(r.as("M")),l=In(r.as("y")),(u=i<=Fn.ss&&["s",i]||i<Fn.s&&["ss",i]||a<=1&&["m"]||a<Fn.m&&["mm",a]||o<=1&&["h"]||o<Fn.h&&["hh",o]||s<=1&&["d"]||s<Fn.d&&["dd",s]||c<=1&&["M"]||c<Fn.M&&["MM",c]||l<=1&&["y"]||["yy",l])[2]=e,u[3]=0<+this,u[4]=n,function(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}.apply(null,u));return t&&(f=h.pastFuture(+this,f)),h.postformat(f)},jn.toISOString=$n,jn.toString=$n,jn.toJSON=$n,jn.locale=qe,jn.localeData=He,jn.toIsoString=C("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",$n),jn.lang=We,q("X",0,0,"unix"),q("x",0,0,"valueOf"),ut("x",at),ut("X",/[+-]?\d+(\.\d{1,3})?/),pt("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))})),pt("x",(function(t,e,n){n._d=new Date(w(t))})),i.version="2.24.0",e=ve,i.fn=on,i.min=function(){return we("isBefore",[].slice.call(arguments,0))},i.max=function(){return we("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=d,i.unix=function(t){return ve(1e3*t)},i.months=function(t,e){return un(t,e,"months")},i.isDate=l,i.locale=ee,i.invalid=y,i.duration=Fe,i.isMoment=x,i.weekdays=function(t,e,n){return hn(t,e,n,"weekdays")},i.parseZone=function(){return ve.apply(null,arguments).parseZone()},i.localeData=re,i.isDuration=Ce,i.monthsShort=function(t,e){return un(t,e,"monthsShort")},i.weekdaysMin=function(t,e,n){return hn(t,e,n,"weekdaysMin")},i.defineLocale=ne,i.updateLocale=function(t,e){if(null!=e){var n,r,i=Zt;null!=(r=te(t))&&(i=r._config),(n=new L(e=D(i,e))).parentLocale=Qt[t],Qt[t]=n,ee(t)}else null!=Qt[t]&&(null!=Qt[t].parentLocale?Qt[t]=Qt[t].parentLocale:null!=Qt[t]&&delete Qt[t]);return Qt[t]},i.locales=function(){return S(Qt)},i.weekdaysShort=function(t,e,n){return hn(t,e,n,"weekdaysShort")},i.normalizeUnits=I,i.relativeTimeRounding=function(t){return void 0===t?In:"function"==typeof t&&(In=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==Fn[t]&&(void 0===e?Fn[t]:(Fn[t]=e,"s"===t&&(Fn.ss=e-1),!0))},i.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=on,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}()},11392:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>Xk});var r=n(11941),i=n(17967);function a(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function o(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function s(t){return t}var l=1e-6;function u(t){return"translate("+t+",0)"}function h(t){return"translate(0,"+t+")"}function f(t){return e=>+t(e)}function d(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function p(){return!this.__axis}function g(t,e){var n=[],r=null,i=null,a=6,o=6,c=3,g="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,y=1===t||4===t?-1:1,m=4===t||2===t?"x":"y",b=1===t||3===t?u:h;function _(u){var h=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,_=null==i?e.tickFormat?e.tickFormat.apply(e,n):s:i,v=Math.max(a,0)+c,x=e.range(),k=+x[0]+g,w=+x[x.length-1]+g,T=(e.bandwidth?d:f)(e.copy(),g),E=u.selection?u.selection():u,C=E.selectAll(".domain").data([null]),S=E.selectAll(".tick").data(h,e).order(),A=S.exit(),M=S.enter().append("g").attr("class","tick"),N=S.select("line"),D=S.select("text");C=C.merge(C.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge(M),N=N.merge(M.append("line").attr("stroke","currentColor").attr(m+"2",y*a)),D=D.merge(M.append("text").attr("fill","currentColor").attr(m,y*v).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),u!==E&&(C=C.transition(u),S=S.transition(u),N=N.transition(u),D=D.transition(u),A=A.transition(u).attr("opacity",l).attr("transform",(function(t){return isFinite(t=T(t))?b(t+g):this.getAttribute("transform")})),M.attr("opacity",l).attr("transform",(function(t){var e=this.parentNode.__axis;return b((e&&isFinite(e=e(t))?e:T(t))+g)}))),A.remove(),C.attr("d",4===t||2===t?o?"M"+y*o+","+k+"H"+g+"V"+w+"H"+y*o:"M"+g+","+k+"V"+w:o?"M"+k+","+y*o+"V"+g+"H"+w+"V"+y*o:"M"+k+","+g+"H"+w),S.attr("opacity",1).attr("transform",(function(t){return b(T(t)+g)})),N.attr(m+"2",y*a),D.attr(m,y*v).text(_),E.filter(p).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),E.each((function(){this.__axis=T}))}return _.scale=function(t){return arguments.length?(e=t,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),_):n.slice()},_.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),_):r&&r.slice()},_.tickFormat=function(t){return arguments.length?(i=t,_):i},_.tickSize=function(t){return arguments.length?(a=o=+t,_):a},_.tickSizeInner=function(t){return arguments.length?(a=+t,_):a},_.tickSizeOuter=function(t){return arguments.length?(o=+t,_):o},_.tickPadding=function(t){return arguments.length?(c=+t,_):c},_.offset=function(t){return arguments.length?(g=+t,_):g},_}function y(){}function m(t){return null==t?y:function(){return this.querySelector(t)}}function b(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function _(){return[]}function v(t){return null==t?_:function(){return this.querySelectorAll(t)}}function x(t){return function(){return this.matches(t)}}function k(t){return function(e){return e.matches(t)}}var w=Array.prototype.find;function T(){return this.firstElementChild}var E=Array.prototype.filter;function C(){return Array.from(this.children)}function S(t){return new Array(t.length)}function A(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function M(t){return function(){return t}}function N(t,e,n,r,i,a){for(var o,s=0,c=e.length,l=a.length;s<l;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new A(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function D(t,e,n,r,i,a,o){var s,c,l,u=new Map,h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(d[s]=l=o.call(c,c.__data__,s,e)+"",u.has(l)?i[s]=c:u.set(l,c));for(s=0;s<f;++s)l=o.call(t,a[s],s,a)+"",(c=u.get(l))?(r[s]=c,c.__data__=a[s],u.delete(l)):n[s]=new A(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&u.get(d[s])===c&&(i[s]=c)}function L(t){return t.__data__}function O(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function B(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}A.prototype={constructor:A,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var I="http://www.w3.org/1999/xhtml";const F={svg:"http://www.w3.org/2000/svg",xhtml:I,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function R(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),F.hasOwnProperty(e)?{space:F[e],local:t}:t}function P(t){return function(){this.removeAttribute(t)}}function $(t){return function(){this.removeAttributeNS(t.space,t.local)}}function j(t,e){return function(){this.setAttribute(t,e)}}function Y(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function z(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function U(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function q(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function W(t){return function(){this.style.removeProperty(t)}}function H(t,e,n){return function(){this.style.setProperty(t,e,n)}}function V(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function G(t,e){return t.style.getPropertyValue(e)||q(t).getComputedStyle(t,null).getPropertyValue(e)}function X(t){return function(){delete this[t]}}function Z(t,e){return function(){this[t]=e}}function Q(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function K(t){return t.trim().split(/^|\s+/)}function J(t){return t.classList||new tt(t)}function tt(t){this._node=t,this._names=K(t.getAttribute("class")||"")}function et(t,e){for(var n=J(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function nt(t,e){for(var n=J(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function rt(t){return function(){et(this,t)}}function it(t){return function(){nt(this,t)}}function at(t,e){return function(){(e.apply(this,arguments)?et:nt)(this,t)}}function ot(){this.textContent=""}function st(t){return function(){this.textContent=t}}function ct(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function lt(){this.innerHTML=""}function ut(t){return function(){this.innerHTML=t}}function ht(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ft(){this.nextSibling&&this.parentNode.appendChild(this)}function dt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function pt(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===I&&e.documentElement.namespaceURI===I?e.createElement(t):e.createElementNS(n,t)}}function gt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function yt(t){var e=R(t);return(e.local?gt:pt)(e)}function mt(){return null}function bt(){var t=this.parentNode;t&&t.removeChild(this)}function _t(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function vt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function xt(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function kt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function wt(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function Tt(t,e,n){var r=q(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Et(t,e){return function(){return Tt(this,t,e)}}function Ct(t,e){return function(){return Tt(this,t,e.apply(this,arguments))}}tt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var St=[null];function At(t,e){this._groups=t,this._parents=e}function Mt(){return new At([[document.documentElement]],St)}At.prototype=Mt.prototype={constructor:At,select:function(t){"function"!=typeof t&&(t=m(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],c=s.length,l=r[i]=new Array(c),u=0;u<c;++u)(a=s[u])&&(o=t.call(a,a.__data__,u,s))&&("__data__"in a&&(o.__data__=a.__data__),l[u]=o);return new At(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return b(t.apply(this,arguments))}}(t):v(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,l=0;l<c;++l)(o=s[l])&&(r.push(t.call(o,o.__data__,l,s)),i.push(o));return new At(r,i)},selectChild:function(t){return this.select(null==t?T:function(t){return function(){return w.call(this.children,t)}}("function"==typeof t?t:k(t)))},selectChildren:function(t){return this.selectAll(null==t?C:function(t){return function(){return E.call(this.children,t)}}("function"==typeof t?t:k(t)))},filter:function(t){"function"!=typeof t&&(t=x(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&c.push(a);return new At(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,L);var n=e?D:N,r=this._parents,i=this._groups;"function"!=typeof t&&(t=M(t));for(var a=i.length,o=new Array(a),s=new Array(a),c=new Array(a),l=0;l<a;++l){var u=r[l],h=i[l],f=h.length,d=O(t.call(u,u&&u.__data__,l,r)),p=d.length,g=s[l]=new Array(p),y=o[l]=new Array(p),m=c[l]=new Array(f);n(u,h,g,y,m,d,e);for(var b,_,v=0,x=0;v<p;++v)if(b=g[v]){for(v>=x&&(x=v+1);!(_=y[x])&&++x<p;);b._next=_||null}}return(o=new At(o,r))._enter=s,o._exit=c,o},enter:function(){return new At(this._enter||this._groups.map(S),this._parents)},exit:function(){return new At(this._exit||this._groups.map(S),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),s=new Array(i),c=0;c<o;++c)for(var l,u=n[c],h=r[c],f=u.length,d=s[c]=new Array(f),p=0;p<f;++p)(l=u[p]||h[p])&&(d[p]=l);for(;c<i;++c)s[c]=n[c];return new At(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=B);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,l=i[a]=new Array(c),u=0;u<c;++u)(o=s[u])&&(l[u]=o);l.sort(e)}return new At(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=R(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?$:P:"function"==typeof e?n.local?U:z:n.local?Y:j)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?W:"function"==typeof e?V:H)(t,e,null==n?"":n)):G(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?X:"function"==typeof e?Q:Z)(t,e)):this.node()[t]},classed:function(t,e){var n=K(t+"");if(arguments.length<2){for(var r=J(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?at:e?rt:it)(n,e))},text:function(t){return arguments.length?this.each(null==t?ot:("function"==typeof t?ct:st)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?lt:("function"==typeof t?ht:ut)(t)):this.node().innerHTML},raise:function(){return this.each(ft)},lower:function(){return this.each(dt)},append:function(t){var e="function"==typeof t?t:yt(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:yt(t),r=null==e?mt:"function"==typeof e?e:m(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(bt)},clone:function(t){return this.select(t?vt:_t)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=xt(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?wt:kt,r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var c,l=0,u=s.length;l<u;++l)for(r=0,c=s[l];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?Ct:Et)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r)}};const Nt=Mt;var Dt={value:()=>{}};function Lt(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Ot(r)}function Ot(t){this._=t}function Bt(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function It(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Ft(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Dt,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Ot.prototype=Lt.prototype={constructor:Ot,on:function(t,e){var n,r=this._,i=Bt(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=Ft(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Ft(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=It(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Ot(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};const Rt=Lt;var Pt,$t,jt=0,Yt=0,zt=0,Ut=0,qt=0,Wt=0,Ht="object"==typeof performance&&performance.now?performance:Date,Vt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Gt(){return qt||(Vt(Xt),qt=Ht.now()+Wt)}function Xt(){qt=0}function Zt(){this._call=this._time=this._next=null}function Qt(t,e,n){var r=new Zt;return r.restart(t,e,n),r}function Kt(){qt=(Ut=Ht.now())+Wt,jt=Yt=0;try{!function(){Gt(),++jt;for(var t,e=Pt;e;)(t=qt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--jt}()}finally{jt=0,function(){for(var t,e,n=Pt,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Pt=e);$t=t,te(r)}(),qt=0}}function Jt(){var t=Ht.now(),e=t-Ut;e>1e3&&(Wt-=e,Ut=t)}function te(t){jt||(Yt&&(Yt=clearTimeout(Yt)),t-qt>24?(t<1/0&&(Yt=setTimeout(Kt,t-Ht.now()-Wt)),zt&&(zt=clearInterval(zt))):(zt||(Ut=Ht.now(),zt=setInterval(Jt,1e3)),jt=1,Vt(Kt)))}function ee(t,e,n){var r=new Zt;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}Zt.prototype=Qt.prototype={constructor:Zt,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Gt():+n)+(null==e?0:+e),this._next||$t===this||($t?$t._next=this:Pt=this,$t=this),this._call=t,this._time=n,te()},stop:function(){this._call&&(this._call=null,this._time=1/0,te())}};var ne=Rt("start","end","cancel","interrupt"),re=[];function ie(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(c){var l,u,h,f;if(1!==n.state)return s();for(l in i)if((f=i[l]).name===n.name){if(3===f.state)return ee(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+l<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[l])}if(ee((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),l=0,u=-1;l<h;++l)(f=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(r[++u]=f);r.length=u+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Qt((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:ne,tween:re,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function ae(t,e){var n=se(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function oe(t,e){var n=se(t,e);if(n.state>3)throw new Error("too late; already running");return n}function se(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ce(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var le,ue=180/Math.PI,he={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fe(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*ue,skewX:Math.atan(c)*ue,scaleX:o,scaleY:s}}function de(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:ce(t,i)},{i:c-2,x:ce(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:ce(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:ce(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:ce(t,n)},{i:s-2,x:ce(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var pe=de((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?he:fe(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),ge=de((function(t){return null==t?he:(le||(le=document.createElementNS("http://www.w3.org/2000/svg","g")),le.setAttribute("transform",t),(t=le.transform.baseVal.consolidate())?fe((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):he)}),", ",")",")");function ye(t,e){var n,r;return function(){var i=oe(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function me(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=oe(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===e){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function be(t,e,n){var r=t._id;return t.each((function(){var t=oe(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return se(t,r).value[e]}}function _e(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ve(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function xe(){}var ke=.7,we=1/ke,Te="\\s*([+-]?\\d+)\\s*",Ee="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ce="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Se=/^#([0-9a-f]{3,8})$/,Ae=new RegExp(`^rgb\\(${Te},${Te},${Te}\\)$`),Me=new RegExp(`^rgb\\(${Ce},${Ce},${Ce}\\)$`),Ne=new RegExp(`^rgba\\(${Te},${Te},${Te},${Ee}\\)$`),De=new RegExp(`^rgba\\(${Ce},${Ce},${Ce},${Ee}\\)$`),Le=new RegExp(`^hsl\\(${Ee},${Ce},${Ce}\\)$`),Oe=new RegExp(`^hsla\\(${Ee},${Ce},${Ce},${Ee}\\)$`),Be={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ie(){return this.rgb().formatHex()}function Fe(){return this.rgb().formatRgb()}function Re(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Se.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Pe(e):3===n?new ze(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?$e(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?$e(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Ae.exec(t))?new ze(e[1],e[2],e[3],1):(e=Me.exec(t))?new ze(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ne.exec(t))?$e(e[1],e[2],e[3],e[4]):(e=De.exec(t))?$e(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Le.exec(t))?Ge(e[1],e[2]/100,e[3]/100,1):(e=Oe.exec(t))?Ge(e[1],e[2]/100,e[3]/100,e[4]):Be.hasOwnProperty(t)?Pe(Be[t]):"transparent"===t?new ze(NaN,NaN,NaN,0):null}function Pe(t){return new ze(t>>16&255,t>>8&255,255&t,1)}function $e(t,e,n,r){return r<=0&&(t=e=n=NaN),new ze(t,e,n,r)}function je(t){return t instanceof xe||(t=Re(t)),t?new ze((t=t.rgb()).r,t.g,t.b,t.opacity):new ze}function Ye(t,e,n,r){return 1===arguments.length?je(t):new ze(t,e,n,null==r?1:r)}function ze(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ue(){return`#${Ve(this.r)}${Ve(this.g)}${Ve(this.b)}`}function qe(){const t=We(this.opacity);return`${1===t?"rgb(":"rgba("}${He(this.r)}, ${He(this.g)}, ${He(this.b)}${1===t?")":`, ${t})`}`}function We(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function He(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ve(t){return((t=He(t))<16?"0":"")+t.toString(16)}function Ge(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ze(t,e,n,r)}function Xe(t){if(t instanceof Ze)return new Ze(t.h,t.s,t.l,t.opacity);if(t instanceof xe||(t=Re(t)),!t)return new Ze;if(t instanceof Ze)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Ze(o,s,c,t.opacity)}function Ze(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Qe(t){return(t=(t||0)%360)<0?t+360:t}function Ke(t){return Math.max(0,Math.min(1,t||0))}function Je(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function tn(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}_e(xe,Re,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Ie,formatHex:Ie,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Xe(this).formatHsl()},formatRgb:Fe,toString:Fe}),_e(ze,Ye,ve(xe,{brighter(t){return t=null==t?we:Math.pow(we,t),new ze(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?ke:Math.pow(ke,t),new ze(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ze(He(this.r),He(this.g),He(this.b),We(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ue,formatHex:Ue,formatHex8:function(){return`#${Ve(this.r)}${Ve(this.g)}${Ve(this.b)}${Ve(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:qe,toString:qe})),_e(Ze,(function(t,e,n,r){return 1===arguments.length?Xe(t):new Ze(t,e,n,null==r?1:r)}),ve(xe,{brighter(t){return t=null==t?we:Math.pow(we,t),new Ze(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?ke:Math.pow(ke,t),new Ze(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ze(Je(t>=240?t-240:t+120,i,r),Je(t,i,r),Je(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ze(Qe(this.h),Ke(this.s),Ke(this.l),We(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=We(this.opacity);return`${1===t?"hsl(":"hsla("}${Qe(this.h)}, ${100*Ke(this.s)}%, ${100*Ke(this.l)}%${1===t?")":`, ${t})`}`}}));const en=t=>()=>t;function nn(t,e){return function(n){return t+n*e}}function rn(t,e){var n=e-t;return n?nn(t,n):en(isNaN(t)?e:t)}const an=function t(e){var n=function(t){return 1==(t=+t)?rn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):en(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=Ye(t)).r,(e=Ye(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=rn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function on(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=Ye(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}on((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return tn((n-r/e)*e,o,i,a,s)}})),on((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return tn((n-r/e)*e,i,a,o,s)}}));var sn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,cn=new RegExp(sn.source,"g");function ln(t,e){var n,r,i,a=sn.lastIndex=cn.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=sn.exec(t))&&(r=cn.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:ce(n,r)})),a=cn.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})}function un(t,e){var n;return("number"==typeof e?ce:e instanceof Re?an:(n=Re(e))?(e=n,an):ln)(t,e)}function hn(t){return function(){this.removeAttribute(t)}}function fn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function dn(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function pn(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function gn(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t)}}function yn(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function mn(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function bn(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function _n(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&bn(t,i)),n}return i._value=e,i}function vn(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&mn(t,i)),n}return i._value=e,i}function xn(t,e){return function(){ae(this,t).delay=+e.apply(this,arguments)}}function kn(t,e){return e=+e,function(){ae(this,t).delay=e}}function wn(t,e){return function(){oe(this,t).duration=+e.apply(this,arguments)}}function Tn(t,e){return e=+e,function(){oe(this,t).duration=e}}function En(t,e){if("function"!=typeof e)throw new Error;return function(){oe(this,t).ease=e}}function Cn(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?ae:oe;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Sn=Nt.prototype.constructor;function An(t){return function(){this.style.removeProperty(t)}}function Mn(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Nn(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Mn(t,a,n)),r}return a._value=e,a}function Dn(t){return function(e){this.textContent=t.call(this,e)}}function Ln(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Dn(r)),e}return r._value=t,r}var On=0;function Bn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function In(){return++On}var Fn=Nt.prototype;Bn.prototype=function(t){return Nt().transition(t)}.prototype={constructor:Bn,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=m(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,l=r[o],u=l.length,h=a[o]=new Array(u),f=0;f<u;++f)(s=l[f])&&(c=t.call(s,s.__data__,f,l))&&("__data__"in s&&(c.__data__=s.__data__),h[f]=c,ie(h[f],e,n,f,h,se(s,n)));return new Bn(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=v(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,l=r[s],u=l.length,h=0;h<u;++h)if(c=l[h]){for(var f,d=t.call(c,c.__data__,h,l),p=se(c,n),g=0,y=d.length;g<y;++g)(f=d[g])&&ie(f,e,n,g,d,p);a.push(d),o.push(c)}return new Bn(a,o,e,n)},selectChild:Fn.selectChild,selectChildren:Fn.selectChildren,filter:function(t){"function"!=typeof t&&(t=x(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&c.push(a);return new Bn(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,l=e[s],u=n[s],h=l.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=l[d]||u[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new Bn(o,this._parents,this._name,this._id)},selection:function(){return new Sn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=In(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,l=0;l<c;++l)if(o=s[l]){var u=se(o,e);ie(o,t,n,l,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Bn(r,this._parents,t,n)},call:Fn.call,nodes:Fn.nodes,node:Fn.node,size:Fn.size,empty:Fn.empty,each:Fn.each,on:function(t,e){var n=this._id;return arguments.length<2?se(this.node(),n).on.on(t):this.each(Cn(n,t,e))},attr:function(t,e){var n=R(t),r="transform"===n?ge:un;return this.attrTween(t,"function"==typeof e?(n.local?yn:gn)(n,r,be(this,"attr."+t,e)):null==e?(n.local?fn:hn)(n):(n.local?pn:dn)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=R(t);return this.tween(n,(r.local?_n:vn)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?pe:un;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=G(this,t),o=(this.style.removeProperty(t),G(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,An(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=G(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=G(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,be(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var c=oe(this,t),l=c.on,u=null==c.value[o]?a||(a=An(e)):void 0;l===n&&i===u||(r=(n=l).copy()).on(s,i=u),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=G(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Nn(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(be(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Ln(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=se(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?ye:me)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?xn:kn)(e,t)):se(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?wn:Tn)(e,t)):se(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(En(e,t)):se(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;oe(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--i&&a()}};n.each((function(){var n=oe(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e})),0===i&&a()}))},[Symbol.iterator]:Fn[Symbol.iterator]};var Rn={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Pn(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}Nt.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}(this,t)}))},Nt.prototype.transition=function(t){var e,n;t instanceof Bn?(e=t._id,t=t._name):(e=In(),(n=Rn).time=Gt(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,l=0;l<c;++l)(o=s[l])&&ie(o,t,e,l,s,n||Pn(o,e));return new Bn(r,this._parents,t,e)};const{abs:$n,max:jn,min:Yn}=Math;function zn(t){return{type:t}}["w","e"].map(zn),["n","s"].map(zn),["n","w","e","s","nw","ne","sw","se"].map(zn);const Un=Math.PI/180,qn=180/Math.PI,Wn=.96422,Hn=.82521,Vn=4/29,Gn=6/29,Xn=3*Gn*Gn;function Zn(t){if(t instanceof Qn)return new Qn(t.l,t.a,t.b,t.opacity);if(t instanceof ir)return ar(t);t instanceof ze||(t=je(t));var e,n,r=er(t.r),i=er(t.g),a=er(t.b),o=Kn((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=Kn((.4360747*r+.3850649*i+.1430804*a)/Wn),n=Kn((.0139322*r+.0971045*i+.7141733*a)/Hn)),new Qn(116*o-16,500*(e-o),200*(o-n),t.opacity)}function Qn(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Kn(t){return t>.008856451679035631?Math.pow(t,1/3):t/Xn+Vn}function Jn(t){return t>Gn?t*t*t:Xn*(t-Vn)}function tr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function er(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function nr(t){if(t instanceof ir)return new ir(t.h,t.c,t.l,t.opacity);if(t instanceof Qn||(t=Zn(t)),0===t.a&&0===t.b)return new ir(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*qn;return new ir(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function rr(t,e,n,r){return 1===arguments.length?nr(t):new ir(t,e,n,null==r?1:r)}function ir(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function ar(t){if(isNaN(t.h))return new Qn(t.l,0,0,t.opacity);var e=t.h*Un;return new Qn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function or(t){return function(e,n){var r=t((e=rr(e)).h,(n=rr(n)).h),i=rn(e.c,n.c),a=rn(e.l,n.l),o=rn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}_e(Qn,(function(t,e,n,r){return 1===arguments.length?Zn(t):new Qn(t,e,n,null==r?1:r)}),ve(xe,{brighter(t){return new Qn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new Qn(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new ze(tr(3.1338561*(e=Wn*Jn(e))-1.6168667*(t=1*Jn(t))-.4906146*(n=Hn*Jn(n))),tr(-.9787684*e+1.9161415*t+.033454*n),tr(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),_e(ir,rr,ve(xe,{brighter(t){return new ir(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new ir(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return ar(this).rgb()}}));const sr=or((function(t,e){var n=e-t;return n?nn(t,n>180||n<-180?n-360*Math.round(n/360):n):en(isNaN(t)?e:t)}));or(rn);var cr=Math.sqrt(50),lr=Math.sqrt(10),ur=Math.sqrt(2);function hr(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=cr?10:a>=lr?5:a>=ur?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=cr?10:a>=lr?5:a>=ur?2:1)}function fr(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=cr?i*=10:a>=lr?i*=5:a>=ur&&(i*=2),e<t?-i:i}function dr(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function pr(t){let e=t,n=t,r=t;function i(t,e,i=0,a=t.length){if(i<a){if(0!==n(e,e))return a;do{const n=i+a>>>1;r(t[n],e)<0?i=n+1:a=n}while(i<a)}return i}return 2!==t.length&&(e=(e,n)=>t(e)-n,n=dr,r=(e,n)=>dr(t(e),n)),{left:i,center:function(t,n,r=0,a=t.length){const o=i(t,n,r,a-1);return o>r&&e(t[o-1],n)>-e(t[o],n)?o-1:o},right:function(t,e,i=0,a=t.length){if(i<a){if(0!==n(e,e))return a;do{const n=i+a>>>1;r(t[n],e)<=0?i=n+1:a=n}while(i<a)}return i}}}const gr=pr(dr),yr=gr.right,mr=(gr.left,pr((function(t){return null===t?NaN:+t})).center,yr);function br(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=kr(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function _r(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function vr(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=kr(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}function xr(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function kr(t,e){var n,r,i=typeof e;return null==e||"boolean"===i?en(e):("number"===i?ce:"string"===i?(n=Re(e))?(e=n,an):ln:e instanceof Re?an:e instanceof Date?_r:(r=e,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(e)?br:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?vr:ce:xr))(t,e)}function wr(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Tr(t){return+t}var Er=[0,1];function Cr(t){return t}function Sr(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function Ar(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=Sr(i,r),a=n(o,a)):(r=Sr(r,i),a=n(a,o)),function(t){return a(r(t))}}function Mr(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=Sr(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=mr(t,e,1,r)-1;return a[n](i[n](e))}}function Nr(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Dr(){return function(){var t,e,n,r,i,a,o=Er,s=Er,c=kr,l=Cr;function u(){var t,e,n,c=Math.min(o.length,s.length);return l!==Cr&&(t=o[0],e=o[c-1],t>e&&(n=t,t=e,e=n),l=function(n){return Math.max(t,Math.min(e,n))}),r=c>2?Mr:Ar,i=a=null,h}function h(e){return null==e||isNaN(e=+e)?n:(i||(i=r(o.map(t),s,c)))(t(l(e)))}return h.invert=function(n){return l(e((a||(a=r(s,o.map(t),ce)))(n)))},h.domain=function(t){return arguments.length?(o=Array.from(t,Tr),u()):o.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),u()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),c=wr,u()},h.clamp=function(t){return arguments.length?(l=!!t||Cr,u()):l!==Cr},h.interpolate=function(t){return arguments.length?(c=t,u()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,u()}}()(Cr,Cr)}function Lr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var Or,Br=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ir(t){if(!(e=Br.exec(t)))throw new Error("invalid format: "+t);var e;return new Fr({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Fr(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Rr(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Pr(t){return(t=Rr(Math.abs(t)))?t[1]:NaN}function $r(t,e){var n=Rr(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Ir.prototype=Fr.prototype,Fr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const jr={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>$r(100*t,e),r:$r,s:function(t,e){var n=Rr(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Or=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Rr(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Yr(t){return t}var zr,Ur,qr,Wr=Array.prototype.map,Hr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Vr(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=hr(t,e,n))||!isFinite(o))return[];if(o>0){let n=Math.round(t/o),r=Math.round(e/o);for(n*o<t&&++n,r*o>e&&--r,a=new Array(i=r-n+1);++s<i;)a[s]=(n+s)*o}else{o=-o;let n=Math.round(t*o),r=Math.round(e*o);for(n/o<t&&++n,r/o>e&&--r,a=new Array(i=r-n+1);++s<i;)a[s]=(n+s)/o}return r&&a.reverse(),a}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return function(t,e,n,r){var i,a=fr(t,e,n);switch((r=Ir(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Pr(e)/3)))-Pr(Math.abs(t)))}(a,o))||(r.precision=i),qr(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Pr(e)-Pr(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-Pr(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return Ur(r)}(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,a=e(),o=0,s=a.length-1,c=a[o],l=a[s],u=10;for(l<c&&(i=c,c=l,l=i,i=o,o=s,s=i);u-- >0;){if((i=hr(c,l,n))===r)return a[o]=c,a[s]=l,e(a);if(i>0)c=Math.floor(c/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;c=Math.ceil(c*i)/i,l=Math.floor(l*i)/i}r=i}return t},t}function Gr(){var t=Dr();return t.copy=function(){return Nr(t,Gr())},Lr.apply(t,arguments),Vr(t)}zr=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Yr:(e=Wr.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(t.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Yr:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Wr.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"":t.minus+"",u=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Ir(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,y=t.precision,m=t.trim,b=t.type;"n"===b?(g=!0,b="g"):jr[b]||(void 0===y&&(y=12),m=!0,b="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var _="$"===f?i:"#"===f&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",v="$"===f?a:/[%p]/.test(b)?c:"",x=jr[b],k=/[defgprs%]/.test(b);function w(t){var i,a,c,f=_,w=v;if("c"===b)w=x(t)+w,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?u:x(Math.abs(t),y),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==h&&(T=!1),f=(T?"("===h?h:l:"-"===h||"("===h?"":h)+f,w=("s"===b?Hr[8+Or/3]:"")+w+(T&&"("===h?")":""),k)for(i=-1,a=t.length;++i<a;)if(48>(c=t.charCodeAt(i))||c>57){w=(46===c?o+t.slice(i+1):t.slice(i))+w,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var E=f.length+t.length+w.length,C=E<p?new Array(p-E+1).join(e):"";switch(g&&d&&(t=r(C+t,C.length?p-w.length:1/0),C=""),n){case"<":t=f+t+w+C;break;case"=":t=f+C+t+w;break;case"^":t=C.slice(0,E=C.length>>1)+f+t+w+C.slice(E);break;default:t=C+f+t+w}return s(t)}return y=void 0===y?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),w.toString=function(){return t+""},w}return{format:h,formatPrefix:function(t,e){var n=h(((t=Ir(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Pr(e)/3))),i=Math.pow(10,-r),a=Hr[8+r/3];return function(t){return n(i*t)+a}}}}({thousands:",",grouping:[3],currency:["$",""]}),Ur=zr.format,qr=zr.formatPrefix;class Xr extends Map{constructor(t,e=Qr){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(Zr(this,t))}has(t){return super.has(Zr(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}(this,t))}}function Zr({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Qr(t){return null!==t&&"object"==typeof t?t.valueOf():t}Set;const Kr=Symbol("implicit");function Jr(){var t=new Xr,e=[],n=[],r=Kr;function i(i){let a=t.get(i);if(void 0===a){if(r!==Kr)return r;t.set(i,a=e.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new Xr;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Jr(e,n).unknown(r)},Lr.apply(i,arguments),i}const ti=1e3,ei=6e4,ni=36e5,ri=864e5,ii=6048e5,ai=31536e6;var oi=new Date,si=new Date;function ci(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return ci((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return oi.setTime(+e),si.setTime(+r),t(oi),t(si),Math.floor(n(oi,si))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var li=ci((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));li.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ci((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):li:null};const ui=li;li.range;var hi=ci((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*ti)}),(function(t,e){return(e-t)/ti}),(function(t){return t.getUTCSeconds()}));const fi=hi;hi.range;var di=ci((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*ti)}),(function(t,e){t.setTime(+t+e*ei)}),(function(t,e){return(e-t)/ei}),(function(t){return t.getMinutes()}));const pi=di;di.range;var gi=ci((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*ti-t.getMinutes()*ei)}),(function(t,e){t.setTime(+t+e*ni)}),(function(t,e){return(e-t)/ni}),(function(t){return t.getHours()}));const yi=gi;gi.range;var mi=ci((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ei)/ri),(t=>t.getDate()-1));const bi=mi;function _i(t){return ci((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ei)/ii}))}mi.range;var vi=_i(0),xi=_i(1),ki=_i(2),wi=_i(3),Ti=_i(4),Ei=_i(5),Ci=_i(6),Si=(vi.range,xi.range,ki.range,wi.range,Ti.range,Ei.range,Ci.range,ci((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})));const Ai=Si;Si.range;var Mi=ci((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Mi.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ci((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};const Ni=Mi;Mi.range;var Di=ci((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*ei)}),(function(t,e){return(e-t)/ei}),(function(t){return t.getUTCMinutes()}));const Li=Di;Di.range;var Oi=ci((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*ni)}),(function(t,e){return(e-t)/ni}),(function(t){return t.getUTCHours()}));const Bi=Oi;Oi.range;var Ii=ci((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/ri}),(function(t){return t.getUTCDate()-1}));const Fi=Ii;function Ri(t){return ci((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/ii}))}Ii.range;var Pi=Ri(0),$i=Ri(1),ji=Ri(2),Yi=Ri(3),zi=Ri(4),Ui=Ri(5),qi=Ri(6),Wi=(Pi.range,$i.range,ji.range,Yi.range,zi.range,Ui.range,qi.range,ci((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})));const Hi=Wi;Wi.range;var Vi=ci((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));Vi.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ci((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};const Gi=Vi;function Xi(t,e,n,r,i,a){const o=[[fi,1,ti],[fi,5,5e3],[fi,15,15e3],[fi,30,3e4],[a,1,ei],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,ni],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,ri],[r,2,1728e5],[n,1,ii],[e,1,2592e6],[e,3,7776e6],[t,1,ai]];function s(e,n,r){const i=Math.abs(n-e)/r,a=pr((([,,t])=>t)).right(o,i);if(a===o.length)return t.every(fr(e/ai,n/ai,r));if(0===a)return ui.every(Math.max(fr(e,n,r),1));const[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[function(t,e,n){const r=e<t;r&&([t,e]=[e,t]);const i=n&&"function"==typeof n.range?n:s(t,e,n),a=i?i.range(t,+e+1):[];return r?a.reverse():a},s]}Vi.range;const[Zi,Qi]=Xi(Gi,Hi,Pi,Fi,Bi,Li),[Ki,Ji]=Xi(Ni,Ai,vi,bi,yi,pi);function ta(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ea(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function na(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var ra,ia,aa={"-":"",_:" ",0:"0"},oa=/^\s*\d+/,sa=/^%/,ca=/[\\^$*+?|[\]().{}]/g;function la(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function ua(t){return t.replace(ca,"\\$&")}function ha(t){return new RegExp("^(?:"+t.map(ua).join("|")+")","i")}function fa(t){return new Map(t.map(((t,e)=>[t.toLowerCase(),e])))}function da(t,e,n){var r=oa.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function pa(t,e,n){var r=oa.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function ga(t,e,n){var r=oa.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function ya(t,e,n){var r=oa.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function ma(t,e,n){var r=oa.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ba(t,e,n){var r=oa.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function _a(t,e,n){var r=oa.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function va(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function xa(t,e,n){var r=oa.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function ka(t,e,n){var r=oa.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function wa(t,e,n){var r=oa.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Ta(t,e,n){var r=oa.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ea(t,e,n){var r=oa.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ca(t,e,n){var r=oa.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Sa(t,e,n){var r=oa.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Aa(t,e,n){var r=oa.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Ma(t,e,n){var r=oa.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Na(t,e,n){var r=sa.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Da(t,e,n){var r=oa.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function La(t,e,n){var r=oa.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Oa(t,e){return la(t.getDate(),e,2)}function Ba(t,e){return la(t.getHours(),e,2)}function Ia(t,e){return la(t.getHours()%12||12,e,2)}function Fa(t,e){return la(1+bi.count(Ni(t),t),e,3)}function Ra(t,e){return la(t.getMilliseconds(),e,3)}function Pa(t,e){return Ra(t,e)+"000"}function $a(t,e){return la(t.getMonth()+1,e,2)}function ja(t,e){return la(t.getMinutes(),e,2)}function Ya(t,e){return la(t.getSeconds(),e,2)}function za(t){var e=t.getDay();return 0===e?7:e}function Ua(t,e){return la(vi.count(Ni(t)-1,t),e,2)}function qa(t){var e=t.getDay();return e>=4||0===e?Ti(t):Ti.ceil(t)}function Wa(t,e){return t=qa(t),la(Ti.count(Ni(t),t)+(4===Ni(t).getDay()),e,2)}function Ha(t){return t.getDay()}function Va(t,e){return la(xi.count(Ni(t)-1,t),e,2)}function Ga(t,e){return la(t.getFullYear()%100,e,2)}function Xa(t,e){return la((t=qa(t)).getFullYear()%100,e,2)}function Za(t,e){return la(t.getFullYear()%1e4,e,4)}function Qa(t,e){var n=t.getDay();return la((t=n>=4||0===n?Ti(t):Ti.ceil(t)).getFullYear()%1e4,e,4)}function Ka(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+la(e/60|0,"0",2)+la(e%60,"0",2)}function Ja(t,e){return la(t.getUTCDate(),e,2)}function to(t,e){return la(t.getUTCHours(),e,2)}function eo(t,e){return la(t.getUTCHours()%12||12,e,2)}function no(t,e){return la(1+Fi.count(Gi(t),t),e,3)}function ro(t,e){return la(t.getUTCMilliseconds(),e,3)}function io(t,e){return ro(t,e)+"000"}function ao(t,e){return la(t.getUTCMonth()+1,e,2)}function oo(t,e){return la(t.getUTCMinutes(),e,2)}function so(t,e){return la(t.getUTCSeconds(),e,2)}function co(t){var e=t.getUTCDay();return 0===e?7:e}function lo(t,e){return la(Pi.count(Gi(t)-1,t),e,2)}function uo(t){var e=t.getUTCDay();return e>=4||0===e?zi(t):zi.ceil(t)}function ho(t,e){return t=uo(t),la(zi.count(Gi(t),t)+(4===Gi(t).getUTCDay()),e,2)}function fo(t){return t.getUTCDay()}function po(t,e){return la($i.count(Gi(t)-1,t),e,2)}function go(t,e){return la(t.getUTCFullYear()%100,e,2)}function yo(t,e){return la((t=uo(t)).getUTCFullYear()%100,e,2)}function mo(t,e){return la(t.getUTCFullYear()%1e4,e,4)}function bo(t,e){var n=t.getUTCDay();return la((t=n>=4||0===n?zi(t):zi.ceil(t)).getUTCFullYear()%1e4,e,4)}function _o(){return"+0000"}function vo(){return"%"}function xo(t){return+t}function ko(t){return Math.floor(+t/1e3)}function wo(t){return new Date(t)}function To(t){return t instanceof Date?+t:+new Date(+t)}function Eo(t,e,n,r,i,a,o,s,c,l){var u=Dr(),h=u.invert,f=u.domain,d=l(".%L"),p=l(":%S"),g=l("%I:%M"),y=l("%I %p"),m=l("%a %d"),b=l("%b %d"),_=l("%B"),v=l("%Y");function x(t){return(c(t)<t?d:s(t)<t?p:o(t)<t?g:a(t)<t?y:r(t)<t?i(t)<t?m:b:n(t)<t?_:v)(t)}return u.invert=function(t){return new Date(h(t))},u.domain=function(t){return arguments.length?f(Array.from(t,To)):f().map(wo)},u.ticks=function(e){var n=f();return t(n[0],n[n.length-1],null==e?10:e)},u.tickFormat=function(t,e){return null==e?x:l(e)},u.nice=function(t){var n=f();return t&&"function"==typeof t.range||(t=e(n[0],n[n.length-1],null==t?10:t)),t?f(function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}(n,t)):u},u.copy=function(){return Nr(u,Eo(t,e,n,r,i,a,o,s,c,l))},u}function Co(t){return"string"==typeof t?new At([[document.querySelector(t)]],[document.documentElement]):new At([[t]],St)}function So(t){return"string"==typeof t?new At([document.querySelectorAll(t)],[document.documentElement]):new At([b(t)],St)}ra=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,l=ha(i),u=fa(i),h=ha(a),f=fa(a),d=ha(o),p=fa(o),g=ha(s),y=fa(s),m=ha(c),b=fa(c),_={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Oa,e:Oa,f:Pa,g:Xa,G:Qa,H:Ba,I:Ia,j:Fa,L:Ra,m:$a,M:ja,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:xo,s:ko,S:Ya,u:za,U:Ua,V:Wa,w:Ha,W:Va,x:null,X:null,y:Ga,Y:Za,Z:Ka,"%":vo},v={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Ja,e:Ja,f:io,g:yo,G:bo,H:to,I:eo,j:no,L:ro,m:ao,M:oo,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:xo,s:ko,S:so,u:co,U:lo,V:ho,w:fo,W:po,x:null,X:null,y:go,Y:mo,Z:_o,"%":vo},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return T(t,e,n,r)},d:wa,e:wa,f:Ma,g:_a,G:ba,H:Ea,I:Ea,j:Ta,L:Aa,m:ka,M:Ca,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:xa,Q:Da,s:La,S:Sa,u:pa,U:ga,V:ya,w:da,W:ma,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:_a,Y:ba,Z:va,"%":Na};function k(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===t.charCodeAt(s)&&(o.push(t.slice(c,s)),null!=(i=aa[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),c=s+1);return o.push(t.slice(c,s)),o.join("")}}function w(t,e){return function(n){var r,i,a=na(1900,void 0,1);if(T(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=ea(na(a.y,0,1))).getUTCDay(),r=i>4||0===i?$i.ceil(r):$i(r),r=Fi.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=ta(na(a.y,0,1))).getDay(),r=i>4||0===i?xi.ceil(r):xi(r),r=bi.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?ea(na(a.y,0,1)).getUTCDay():ta(na(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,ea(a)):ta(a)}}function T(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o<s;){if(r>=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=x[i in aa?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return _.x=k(n,_),_.X=k(r,_),_.c=k(e,_),v.x=k(n,v),v.X=k(r,v),v.c=k(e,v),{format:function(t){var e=k(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=w(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=k(t+="",v);return e.toString=function(){return t},e},utcParse:function(t){var e=w(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),ia=ra.format,ra.parse,ra.utcFormat,ra.utcParse;const Ao=Math.PI,Mo=2*Ao,No=1e-6,Do=Mo-No;function Lo(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Oo(){return new Lo}Lo.prototype=Oo.prototype={constructor:Lo,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,c=r-e,l=a-t,u=o-e,h=l*l+u*u;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>No)if(Math.abs(u*s-c*l)>No&&i){var f=n-a,d=r-o,p=s*s+c*c,g=f*f+d*d,y=Math.sqrt(p),m=Math.sqrt(h),b=i*Math.tan((Ao-Math.acos((p+h-g)/(2*y*m)))/2),_=b/m,v=b/y;Math.abs(_-1)>No&&(this._+="L"+(t+_*l)+","+(e+_*u)),this._+="A"+i+","+i+",0,0,"+ +(u*f>l*d)+","+(this._x1=t+v*s)+","+(this._y1=e+v*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),c=t+o,l=e+s,u=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+l:(Math.abs(this._x1-c)>No||Math.abs(this._y1-l)>No)&&(this._+="L"+c+","+l),n&&(h<0&&(h=h%Mo+Mo),h>Do?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=c)+","+(this._y1=l):h>No&&(this._+="A"+n+","+n+",0,"+ +(h>=Ao)+","+u+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const Bo=Oo;function Io(t){return function(){return t}}const Fo=Math.abs,Ro=Math.atan2,Po=Math.cos,$o=Math.max,jo=Math.min,Yo=Math.sin,zo=Math.sqrt,Uo=1e-12,qo=Math.PI,Wo=qo/2,Ho=2*qo;function Vo(t){return t>1?0:t<-1?qo:Math.acos(t)}function Go(t){return t>=1?Wo:t<=-1?-Wo:Math.asin(t)}function Xo(t){return t.innerRadius}function Zo(t){return t.outerRadius}function Qo(t){return t.startAngle}function Ko(t){return t.endAngle}function Jo(t){return t&&t.padAngle}function ts(t,e,n,r,i,a,o,s){var c=n-t,l=r-e,u=o-i,h=s-a,f=h*c-u*l;if(!(f*f<Uo))return[t+(f=(u*(e-a)-h*(t-i))/f)*c,e+f*l]}function es(t,e,n,r,i,a,o){var s=t-n,c=e-r,l=(o?a:-a)/zo(s*s+c*c),u=l*c,h=-l*s,f=t+u,d=e+h,p=n+u,g=r+h,y=(f+p)/2,m=(d+g)/2,b=p-f,_=g-d,v=b*b+_*_,x=i-a,k=f*g-p*d,w=(_<0?-1:1)*zo($o(0,x*x*v-k*k)),T=(k*_-b*w)/v,E=(-k*b-_*w)/v,C=(k*_+b*w)/v,S=(-k*b+_*w)/v,A=T-y,M=E-m,N=C-y,D=S-m;return A*A+M*M>N*N+D*D&&(T=C,E=S),{cx:T,cy:E,x01:-u,y01:-h,x11:T*(i/x-1),y11:E*(i/x-1)}}function ns(){var t=Xo,e=Zo,n=Io(0),r=null,i=Qo,a=Ko,o=Jo,s=null;function c(){var c,l,u=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-Wo,d=a.apply(this,arguments)-Wo,p=Fo(d-f),g=d>f;if(s||(s=c=Bo()),h<u&&(l=h,h=u,u=l),h>Uo)if(p>Ho-Uo)s.moveTo(h*Po(f),h*Yo(f)),s.arc(0,0,h,f,d,!g),u>Uo&&(s.moveTo(u*Po(d),u*Yo(d)),s.arc(0,0,u,d,f,g));else{var y,m,b=f,_=d,v=f,x=d,k=p,w=p,T=o.apply(this,arguments)/2,E=T>Uo&&(r?+r.apply(this,arguments):zo(u*u+h*h)),C=jo(Fo(h-u)/2,+n.apply(this,arguments)),S=C,A=C;if(E>Uo){var M=Go(E/u*Yo(T)),N=Go(E/h*Yo(T));(k-=2*M)>Uo?(v+=M*=g?1:-1,x-=M):(k=0,v=x=(f+d)/2),(w-=2*N)>Uo?(b+=N*=g?1:-1,_-=N):(w=0,b=_=(f+d)/2)}var D=h*Po(b),L=h*Yo(b),O=u*Po(x),B=u*Yo(x);if(C>Uo){var I,F=h*Po(_),R=h*Yo(_),P=u*Po(v),$=u*Yo(v);if(p<qo&&(I=ts(D,L,P,$,F,R,O,B))){var j=D-I[0],Y=L-I[1],z=F-I[0],U=R-I[1],q=1/Yo(Vo((j*z+Y*U)/(zo(j*j+Y*Y)*zo(z*z+U*U)))/2),W=zo(I[0]*I[0]+I[1]*I[1]);S=jo(C,(u-W)/(q-1)),A=jo(C,(h-W)/(q+1))}}w>Uo?A>Uo?(y=es(P,$,D,L,h,A,g),m=es(F,R,O,B,h,A,g),s.moveTo(y.cx+y.x01,y.cy+y.y01),A<C?s.arc(y.cx,y.cy,A,Ro(y.y01,y.x01),Ro(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,A,Ro(y.y01,y.x01),Ro(y.y11,y.x11),!g),s.arc(0,0,h,Ro(y.cy+y.y11,y.cx+y.x11),Ro(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,Ro(m.y11,m.x11),Ro(m.y01,m.x01),!g))):(s.moveTo(D,L),s.arc(0,0,h,b,_,!g)):s.moveTo(D,L),u>Uo&&k>Uo?S>Uo?(y=es(O,B,F,R,u,-S,g),m=es(D,L,P,$,u,-S,g),s.lineTo(y.cx+y.x01,y.cy+y.y01),S<C?s.arc(y.cx,y.cy,S,Ro(y.y01,y.x01),Ro(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,S,Ro(y.y01,y.x01),Ro(y.y11,y.x11),!g),s.arc(0,0,u,Ro(y.cy+y.y11,y.cx+y.x11),Ro(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,S,Ro(m.y11,m.x11),Ro(m.y01,m.x01),!g))):s.arc(0,0,u,x,v,g):s.lineTo(O,B)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-qo/2;return[Po(r)*n,Yo(r)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Io(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Io(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Io(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Io(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Io(+t),c):i},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:Io(+t),c):a},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Io(+t),c):o},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c}function rs(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function is(t){this._context=t}function as(t){return new is(t)}function os(t){return t[0]}function ss(t){return t[1]}function cs(t,e){var n=Io(!0),r=null,i=as,a=null;function o(o){var s,c,l,u=(o=rs(o)).length,h=!1;for(null==r&&(a=i(l=Bo())),s=0;s<=u;++s)!(s<u&&n(c=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(c,s,o),+e(c,s,o));if(l)return a=null,l+""||null}return t="function"==typeof t?t:void 0===t?os:Io(t),e="function"==typeof e?e:void 0===e?ss:Io(e),o.x=function(e){return arguments.length?(t="function"==typeof e?e:Io(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:Io(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:Io(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o}function ls(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function us(t){return t}function hs(){}function fs(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function ds(t){this._context=t}function ps(t){return new ds(t)}function gs(t){this._context=t}function ys(t){this._context=t}function ms(t){this._context=t}function bs(t){return t<0?-1:1}function _s(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(bs(a)+bs(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function vs(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function xs(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function ks(t){this._context=t}function ws(t){this._context=new Ts(t)}function Ts(t){this._context=t}function Es(t){this._context=t}function Cs(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function Ss(t,e){this._context=t,this._t=e}function As(t,e,n){this.k=t,this.x=e,this.y=n}Array.prototype.slice,is.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},ds.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:fs(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:fs(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},gs.prototype={areaStart:hs,areaEnd:hs,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:fs(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ys.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:fs(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ms.prototype={areaStart:hs,areaEnd:hs,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},ks.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:xs(this,this._t0,vs(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,xs(this,vs(this,n=_s(this,t,e)),n);break;default:xs(this,this._t0,n=_s(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(ws.prototype=Object.create(ks.prototype)).point=function(t,e){ks.prototype.point.call(this,e,t)},Ts.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},Es.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=Cs(t),i=Cs(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},Ss.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}},As.prototype={constructor:As,scale:function(t){return 1===t?this:new As(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new As(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new As(1,0,0),As.prototype;var Ms=n(27856);const Ns={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:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t),hsl2rgb:({h:t,s:e,l:n},r)=>{if(!e)return 2.55*n;t/=360,e/=100;const i=(n/=100)<.5?n*(1+e):n+e-n*e,a=2*n-i;switch(r){case"r":return 255*Ns.hue2rgb(a,i,t+1/3);case"g":return 255*Ns.hue2rgb(a,i,t);case"b":return 255*Ns.hue2rgb(a,i,t-1/3)}},rgb2hsl:({r:t,g:e,b:n},r)=>{t/=255,e/=255,n/=255;const i=Math.max(t,e,n),a=Math.min(t,e,n),o=(i+a)/2;if("l"===r)return 100*o;if(i===a)return 0;const s=i-a;if("s"===r)return 100*(o>.5?s/(2-i-a):s/(i+a));switch(i){case t:return 60*((e-n)/s+(e<n?6:0));case e:return 60*((n-t)/s+2);case n:return 60*((t-e)/s+4);default:return-1}}},Ds={clamp:(t,e,n)=>e>n?Math.min(e,Math.max(n,t)):Math.min(n,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},Ls={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},Os={channel:Ns,lang:Ds,unit:Ls},Bs={};for(let t=0;t<=255;t++)Bs[t]=Os.unit.dec2hex(t);const Is=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new class{constructor(){this.type=0}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=0}is(t){return this.type===t}}}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=0,this}_ensureHSL(){const t=this.data,{h:e,s:n,l:r}=t;void 0===e&&(t.h=Os.channel.rgb2hsl(t,"h")),void 0===n&&(t.s=Os.channel.rgb2hsl(t,"s")),void 0===r&&(t.l=Os.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:n,b:r}=t;void 0===e&&(t.r=Os.channel.hsl2rgb(t,"r")),void 0===n&&(t.g=Os.channel.hsl2rgb(t,"g")),void 0===r&&(t.b=Os.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(2)||void 0===e?(this._ensureHSL(),Os.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(2)||void 0===e?(this._ensureHSL(),Os.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(2)||void 0===e?(this._ensureHSL(),Os.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(1)||void 0===e?(this._ensureRGB(),Os.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(1)||void 0===e?(this._ensureRGB(),Os.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(1)||void 0===e?(this._ensureRGB(),Os.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(1),this.changed=!0,this.data.r=t}set g(t){this.type.set(1),this.changed=!0,this.data.g=t}set b(t){this.type.set(1),this.changed=!0,this.data.b=t}set h(t){this.type.set(2),this.changed=!0,this.data.h=t}set s(t){this.type.set(2),this.changed=!0,this.data.s=t}set l(t){this.type.set(2),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent"),Fs={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(Fs.re);if(!e)return;const n=e[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,c=o?8:4,l=a?0:-1,u=o?255:15;return Is.set({r:(r>>c*(l+3)&u)*s,g:(r>>c*(l+2)&u)*s,b:(r>>c*(l+1)&u)*s,a:a?(r&u)*s/255:1},t)},stringify:t=>{const{r:e,g:n,b:r,a:i}=t;return i<1?`#${Bs[Math.round(e)]}${Bs[Math.round(n)]}${Bs[Math.round(r)]}${Bs[Math.round(255*i)]}`:`#${Bs[Math.round(e)]}${Bs[Math.round(n)]}${Bs[Math.round(r)]}`}},Rs=Fs,Ps={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:t=>{const e=t.match(Ps.hueRe);if(e){const[,t,n]=e;switch(n){case"grad":return Os.channel.clamp.h(.9*parseFloat(t));case"rad":return Os.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return Os.channel.clamp.h(360*parseFloat(t))}}return Os.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const n=t.match(Ps.re);if(!n)return;const[,r,i,a,o,s]=n;return Is.set({h:Ps._hue2deg(r),s:Os.channel.clamp.s(parseFloat(i)),l:Os.channel.clamp.l(parseFloat(a)),a:o?Os.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},t)},stringify:t=>{const{h:e,s:n,l:r,a:i}=t;return i<1?`hsla(${Os.lang.round(e)}, ${Os.lang.round(n)}%, ${Os.lang.round(r)}%, ${i})`:`hsl(${Os.lang.round(e)}, ${Os.lang.round(n)}%, ${Os.lang.round(r)}%)`}},$s=Ps,js={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:t=>{t=t.toLowerCase();const e=js.colors[t];if(e)return Rs.parse(e)},stringify:t=>{const e=Rs.stringify(t);for(const t in js.colors)if(js.colors[t]===e)return t}},Ys=js,zs={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:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const n=t.match(zs.re);if(!n)return;const[,r,i,a,o,s,c,l,u]=n;return Is.set({r:Os.channel.clamp.r(i?2.55*parseFloat(r):parseFloat(r)),g:Os.channel.clamp.g(o?2.55*parseFloat(a):parseFloat(a)),b:Os.channel.clamp.b(c?2.55*parseFloat(s):parseFloat(s)),a:l?Os.channel.clamp.a(u?parseFloat(l)/100:parseFloat(l)):1},t)},stringify:t=>{const{r:e,g:n,b:r,a:i}=t;return i<1?`rgba(${Os.lang.round(e)}, ${Os.lang.round(n)}, ${Os.lang.round(r)}, ${Os.lang.round(i)})`:`rgb(${Os.lang.round(e)}, ${Os.lang.round(n)}, ${Os.lang.round(r)})`}},Us=zs,qs={format:{keyword:Ys,hex:Rs,rgb:Us,rgba:Us,hsl:$s,hsla:$s},parse:t=>{if("string"!=typeof t)return t;const e=Rs.parse(t)||Us.parse(t)||$s.parse(t)||Ys.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(2)||void 0===t.data.r?$s.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Us.stringify(t):Rs.stringify(t)},Ws=qs,Hs=(t,e)=>{const n=Ws.parse(t);for(const t in e)n[t]=Os.channel.clamp[t](e[t]);return Ws.stringify(n)},Vs=(t,e)=>{const n=Ws.parse(t),r={};for(const t in e)e[t]&&(r[t]=n[t]+e[t]);return Hs(t,r)},Gs=(t,e,n=0,r=1)=>{if("number"!=typeof t)return Hs(t,{a:e});const i=Is.set({r:Os.channel.clamp.r(t),g:Os.channel.clamp.g(e),b:Os.channel.clamp.b(n),a:Os.channel.clamp.a(r)});return Ws.stringify(i)},Xs=(t,e=100)=>{const n=Ws.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,((t,e,n=50)=>{const{r,g:i,b:a,a:o}=Ws.parse(t),{r:s,g:c,b:l,a:u}=Ws.parse(e),h=n/100,f=2*h-1,d=o-u,p=((f*d==-1?f:(f+d)/(1+f*d))+1)/2,g=1-p;return Gs(r*p+s*g,i*p+c*g,a*p+l*g,o*h+u*(1-h))})(n,t,e)},Zs=(t,e,n)=>{const r=Ws.parse(t),i=r[e],a=Os.channel.clamp[e](i+n);return i!==a&&(r[e]=a),Ws.stringify(r)},Qs=(t,e)=>Zs(t,"l",-e),Ks=(t,e)=>Zs(t,"l",e);var Js="comm",tc="rule",ec="decl",nc=Math.abs,rc=String.fromCharCode;function ic(t){return t.trim()}function ac(t,e,n){return t.replace(e,n)}function oc(t,e){return t.indexOf(e)}function sc(t,e){return 0|t.charCodeAt(e)}function cc(t,e,n){return t.slice(e,n)}function lc(t){return t.length}function uc(t){return t.length}function hc(t,e){return e.push(t),t}function fc(t,e){for(var n="",r=uc(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function dc(t,e,n,r){switch(t.type){case"@import":case ec:return t.return=t.return||t.value;case Js:return"";case"@keyframes":return t.return=t.value+"{"+fc(t.children,r)+"}";case tc:t.value=t.props.join(",")}return lc(n=fc(t.children,r))?t.return=t.value+"{"+n+"}":""}Object.assign;var pc=1,gc=1,yc=0,mc=0,bc=0,_c="";function vc(t,e,n,r,i,a,o){return{value:t,root:e,parent:n,type:r,props:i,children:a,line:pc,column:gc,length:o,return:""}}function xc(){return bc=mc>0?sc(_c,--mc):0,gc--,10===bc&&(gc=1,pc--),bc}function kc(){return bc=mc<yc?sc(_c,mc++):0,gc++,10===bc&&(gc=1,pc++),bc}function wc(){return sc(_c,mc)}function Tc(){return mc}function Ec(t,e){return cc(_c,t,e)}function Cc(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Sc(t){return ic(Ec(mc-1,Nc(91===t?t+2:40===t?t+1:t)))}function Ac(t){for(;(bc=wc())&&bc<33;)kc();return Cc(t)>2||Cc(bc)>3?"":" "}function Mc(t,e){for(;--e&&kc()&&!(bc<48||bc>102||bc>57&&bc<65||bc>70&&bc<97););return Ec(t,Tc()+(e<6&&32==wc()&&32==kc()))}function Nc(t){for(;kc();)switch(bc){case t:return mc;case 34:case 39:34!==t&&39!==t&&Nc(bc);break;case 40:41===t&&Nc(t);break;case 92:kc()}return mc}function Dc(t,e){for(;kc()&&t+bc!==57&&(t+bc!==84||47!==wc()););return"/*"+Ec(e,mc-1)+"*"+rc(47===t?t:kc())}function Lc(t){for(;!Cc(wc());)kc();return Ec(t,mc)}function Oc(t){return function(t){return _c="",t}(Bc("",null,null,null,[""],t=function(t){return pc=gc=1,yc=lc(_c=t),mc=0,[]}(t),0,[0],t))}function Bc(t,e,n,r,i,a,o,s,c){for(var l=0,u=0,h=o,f=0,d=0,p=0,g=1,y=1,m=1,b=0,_="",v=i,x=a,k=r,w=_;y;)switch(p=b,b=kc()){case 40:if(108!=p&&58==sc(w,h-1)){-1!=oc(w+=ac(Sc(b),"&","&\f"),"&\f")&&(m=-1);break}case 34:case 39:case 91:w+=Sc(b);break;case 9:case 10:case 13:case 32:w+=Ac(p);break;case 92:w+=Mc(Tc()-1,7);continue;case 47:switch(wc()){case 42:case 47:hc(Fc(Dc(kc(),Tc()),e,n),c);break;default:w+="/"}break;case 123*g:s[l++]=lc(w)*m;case 125*g:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+u:d>0&&lc(w)-h&&hc(d>32?Rc(w+";",r,n,h-1):Rc(ac(w," ","")+";",r,n,h-2),c);break;case 59:w+=";";default:if(hc(k=Ic(w,e,n,l,u,i,s,_,v=[],x=[],h),a),123===b)if(0===u)Bc(w,e,k,k,v,a,h,s,x);else switch(99===f&&110===sc(w,3)?100:f){case 100:case 109:case 115:Bc(t,k,k,r&&hc(Ic(t,k,k,0,0,i,s,_,i,v=[],h),x),i,x,h,s,r?v:x);break;default:Bc(w,k,k,k,[""],x,0,s,x)}}l=u=d=0,g=m=1,_=w="",h=o;break;case 58:h=1+lc(w),d=p;default:if(g<1)if(123==b)--g;else if(125==b&&0==g++&&125==xc())continue;switch(w+=rc(b),b*g){case 38:m=u>0?1:(w+="\f",-1);break;case 44:s[l++]=(lc(w)-1)*m,m=1;break;case 64:45===wc()&&(w+=Sc(kc())),f=wc(),u=h=lc(_=w+=Lc(Tc())),b++;break;case 45:45===p&&2==lc(w)&&(g=0)}}return a}function Ic(t,e,n,r,i,a,o,s,c,l,u){for(var h=i-1,f=0===i?a:[""],d=uc(f),p=0,g=0,y=0;p<r;++p)for(var m=0,b=cc(t,h+1,h=nc(g=o[p])),_=t;m<d;++m)(_=ic(g>0?f[m]+" "+b:ac(b,/&\f/g,f[m])))&&(c[y++]=_);return vc(t,e,n,0===i?tc:s,c,l,u)}function Fc(t,e,n){return vc(t,e,n,Js,rc(bc),cc(t,2,-2),0)}function Rc(t,e,n,r){return vc(t,e,n,ec,cc(t,0,r),cc(t,r+1,-1),r)}var Pc=n(70681),$c=n(28282);const jc={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Yc;const zc=new Uint8Array(16);function Uc(){if(!Yc&&(Yc="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Yc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yc(zc)}const qc=[];for(let t=0;t<256;++t)qc.push((t+256).toString(16).slice(1));const Wc=function(t,e,n){if(jc.randomUUID&&!e&&!t)return jc.randomUUID();const r=(t=t||{}).random||(t.rng||Uc)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=r[t];return e}return function(t,e=0){return(qc[t[e+0]]+qc[t[e+1]]+qc[t[e+2]]+qc[t[e+3]]+"-"+qc[t[e+4]]+qc[t[e+5]]+"-"+qc[t[e+6]]+qc[t[e+7]]+"-"+qc[t[e+8]]+qc[t[e+9]]+"-"+qc[t[e+10]]+qc[t[e+11]]+qc[t[e+12]]+qc[t[e+13]]+qc[t[e+14]]+qc[t[e+15]]).toLowerCase()}(r)};n(44949);var Hc=Object.defineProperty,Vc=(t,e,n)=>(((t,e,n)=>{e in t?Hc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(t,"symbol"!=typeof e?e+"":e,n),n);const Gc={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Xc={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},Zc=function(t="fatal"){let e=Gc.fatal;"string"==typeof t?(t=t.toLowerCase())in Gc&&(e=Gc[t]):"number"==typeof t&&(e=t),Xc.trace=()=>{},Xc.debug=()=>{},Xc.info=()=>{},Xc.warn=()=>{},Xc.error=()=>{},Xc.fatal=()=>{},e<=Gc.fatal&&(Xc.fatal=console.error?console.error.bind(console,Qc("FATAL"),"color: orange"):console.log.bind(console,"",Qc("FATAL"))),e<=Gc.error&&(Xc.error=console.error?console.error.bind(console,Qc("ERROR"),"color: orange"):console.log.bind(console,"",Qc("ERROR"))),e<=Gc.warn&&(Xc.warn=console.warn?console.warn.bind(console,Qc("WARN"),"color: orange"):console.log.bind(console,"",Qc("WARN"))),e<=Gc.info&&(Xc.info=console.info?console.info.bind(console,Qc("INFO"),"color: lightblue"):console.log.bind(console,"",Qc("INFO"))),e<=Gc.debug&&(Xc.debug=console.debug?console.debug.bind(console,Qc("DEBUG"),"color: lightgreen"):console.log.bind(console,"",Qc("DEBUG"))),e<=Gc.trace&&(Xc.trace=console.debug?console.debug.bind(console,Qc("TRACE"),"color: lightgreen"):console.log.bind(console,"",Qc("TRACE")))},Qc=t=>`%c${r().format("ss.SSS")} : ${t} : `,Kc=t=>Ms.sanitize(t),Jc=(t,e)=>{var n;if(!1!==(null==(n=e.flowchart)?void 0:n.htmlLabels)){const n=e.securityLevel;"antiscript"===n||"strict"===n?t=Kc(t):"loose"!==n&&(t=(t=(t=rl(t)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),t=nl(t))}return t},tl=(t,e)=>t?t=e.dompurifyConfig?Ms.sanitize(Jc(t,e),e.dompurifyConfig).toString():Ms.sanitize(Jc(t,e)):t,el=/<br\s*\/?>/gi,nl=t=>t.replace(/#br#/g,"<br/>"),rl=t=>t.replace(el,"#br#"),il=t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),al=function(t){let e=t;return-1!==t.indexOf("~")?(e=e.replace(/~([^~].*)/,"<$1"),e=e.replace(/~([^~]*)$/,">$1"),al(e)):e},ol={getRows:t=>t?rl(t).replace(/\\n/g,"#br#").split("#br#"):[""],sanitizeText:tl,sanitizeTextOrArray:(t,e)=>"string"==typeof t?tl(t,e):t.flat().map((t=>tl(t,e))),hasBreaks:t=>el.test(t),splitBreaks:t=>t.split(el),lineBreakRegex:el,removeScript:Kc,getUrl:t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},evaluate:il},sl=(t,e)=>Vs(t,e?{s:-40,l:10}:{s:-40,l:-10}),cl="#ffffff",ll="#f2f2f2";class ul{constructor(){this.background="#f4f4f4",this.darkMode=!1,this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Vs(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Vs(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||sl(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||sl(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||sl(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||sl(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Xs(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Xs(this.tertiaryColor),this.lineColor=this.lineColor||Xs(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?Qs(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||Qs(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Xs(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.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Ks(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.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Vs(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Vs(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Vs(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Vs(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Vs(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Vs(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Vs(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Vs(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Vs(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=Qs(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=Qs(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Xs(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||Ks(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||Qs(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Vs(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Vs(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Vs(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Vs(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Vs(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Vs(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Vs(this.primaryColor,{l:-10}),this.pie5=this.pie5||Vs(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Vs(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Vs(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Vs(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Vs(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Vs(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Vs(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Vs(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Qs(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Vs(this.primaryColor,{h:-30}),this.git4=this.git4||Vs(this.primaryColor,{h:-60}),this.git5=this.git5||Vs(this.primaryColor,{h:-90}),this.git6=this.git6||Vs(this.primaryColor,{h:60}),this.git7=this.git7||Vs(this.primaryColor,{h:120}),this.darkMode?(this.git0=Ks(this.git0,25),this.git1=Ks(this.git1,25),this.git2=Ks(this.git2,25),this.git3=Ks(this.git3,25),this.git4=Ks(this.git4,25),this.git5=Ks(this.git5,25),this.git6=Ks(this.git6,25),this.git7=Ks(this.git7,25)):(this.git0=Qs(this.git0,25),this.git1=Qs(this.git1,25),this.git2=Qs(this.git2,25),this.git3=Qs(this.git3,25),this.git4=Qs(this.git4,25),this.git5=Qs(this.git5,25),this.git6=Qs(this.git6,25),this.git7=Qs(this.git7,25)),this.gitInv0=this.gitInv0||Xs(this.git0),this.gitInv1=this.gitInv1||Xs(this.git1),this.gitInv2=this.gitInv2||Xs(this.git2),this.gitInv3=this.gitInv3||Xs(this.git3),this.gitInv4=this.gitInv4||Xs(this.git4),this.gitInv5=this.gitInv5||Xs(this.git5),this.gitInv6=this.gitInv6||Xs(this.git6),this.gitInv7=this.gitInv7||Xs(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||cl,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ll}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}}class hl{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Ks(this.primaryColor,16),this.tertiaryColor=Vs(this.primaryColor,{h:-160}),this.primaryBorderColor=Xs(this.background),this.secondaryBorderColor=sl(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=sl(this.tertiaryColor,this.darkMode),this.primaryTextColor=Xs(this.primaryColor),this.secondaryTextColor=Xs(this.secondaryColor),this.tertiaryTextColor=Xs(this.tertiaryColor),this.lineColor=Xs(this.background),this.textColor=Xs(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Ks(Xs("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=Gs(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,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=Qs("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=Gs(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Gs(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.personBorder="calculated",this.personBkg="calculated",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=Ks(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=Ks(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.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=Ks(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.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Vs(this.primaryColor,{h:64}),this.fillType3=Vs(this.secondaryColor,{h:64}),this.fillType4=Vs(this.primaryColor,{h:-64}),this.fillType5=Vs(this.secondaryColor,{h:-64}),this.fillType6=Vs(this.primaryColor,{h:128}),this.fillType7=Vs(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Vs(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Vs(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Vs(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Vs(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Vs(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Vs(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Vs(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Vs(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Vs(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Xs(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||Ks(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Qs(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Ks(this.secondaryColor,20),this.git1=Ks(this.pie2||this.secondaryColor,20),this.git2=Ks(this.pie3||this.tertiaryColor,20),this.git3=Ks(this.pie4||Vs(this.primaryColor,{h:-30}),20),this.git4=Ks(this.pie5||Vs(this.primaryColor,{h:-60}),20),this.git5=Ks(this.pie6||Vs(this.primaryColor,{h:-90}),10),this.git6=Ks(this.pie7||Vs(this.primaryColor,{h:60}),10),this.git7=Ks(this.pie8||Vs(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Xs(this.git0),this.gitInv1=this.gitInv1||Xs(this.git1),this.gitInv2=this.gitInv2||Xs(this.git2),this.gitInv3=this.gitInv3||Xs(this.git3),this.gitInv4=this.gitInv4||Xs(this.git4),this.gitInv5=this.gitInv5||Xs(this.git5),this.gitInv6=this.gitInv6||Xs(this.git6),this.gitInv7=this.gitInv7||Xs(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ks(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ks(this.background,2)}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}}class fl{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Vs(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Vs(this.primaryColor,{h:-160}),this.primaryBorderColor=sl(this.primaryColor,this.darkMode),this.secondaryBorderColor=sl(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=sl(this.tertiaryColor,this.darkMode),this.primaryTextColor=Xs(this.primaryColor),this.secondaryTextColor=Xs(this.secondaryColor),this.tertiaryTextColor=Xs(this.tertiaryColor),this.lineColor=Xs(this.background),this.textColor=Xs(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, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,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.excludeBkgColor="#eeeeee",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=Gs(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.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Vs(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Vs(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Vs(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Vs(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Vs(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Vs(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Vs(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Vs(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Vs(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Qs(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Qs(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=Qs(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||Qs(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Vs(this["cScale"+t],{h:180});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||Xs(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Xs(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}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=Ks(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.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Vs(this.primaryColor,{h:64}),this.fillType3=Vs(this.secondaryColor,{h:64}),this.fillType4=Vs(this.primaryColor,{h:-64}),this.fillType5=Vs(this.secondaryColor,{h:-64}),this.fillType6=Vs(this.primaryColor,{h:128}),this.fillType7=Vs(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||Vs(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||Vs(this.primaryColor,{l:-10}),this.pie5=this.pie5||Vs(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Vs(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||Vs(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||Vs(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||Vs(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||Vs(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||Vs(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||Vs(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Vs(this.primaryColor,{h:-30}),this.git4=this.git4||Vs(this.primaryColor,{h:-60}),this.git5=this.git5||Vs(this.primaryColor,{h:-90}),this.git6=this.git6||Vs(this.primaryColor,{h:60}),this.git7=this.git7||Vs(this.primaryColor,{h:120}),this.darkMode?(this.git0=Ks(this.git0,25),this.git1=Ks(this.git1,25),this.git2=Ks(this.git2,25),this.git3=Ks(this.git3,25),this.git4=Ks(this.git4,25),this.git5=Ks(this.git5,25),this.git6=Ks(this.git6,25),this.git7=Ks(this.git7,25)):(this.git0=Qs(this.git0,25),this.git1=Qs(this.git1,25),this.git2=Qs(this.git2,25),this.git3=Qs(this.git3,25),this.git4=Qs(this.git4,25),this.git5=Qs(this.git5,25),this.git6=Qs(this.git6,25),this.git7=Qs(this.git7,25)),this.gitInv0=this.gitInv0||Qs(Xs(this.git0),25),this.gitInv1=this.gitInv1||Xs(this.git1),this.gitInv2=this.gitInv2||Xs(this.git2),this.gitInv3=this.gitInv3||Xs(this.git3),this.gitInv4=this.gitInv4||Xs(this.git4),this.gitInv5=this.gitInv5||Xs(this.git5),this.gitInv6=this.gitInv6||Xs(this.git6),this.gitInv7=this.gitInv7||Xs(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Xs(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Xs(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||cl,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ll}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}}class dl{constructor(){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, sans-serif',this.fontSize="16px",this.tertiaryColor=Ks("#cde498",10),this.primaryBorderColor=sl(this.primaryColor,this.darkMode),this.secondaryBorderColor=sl(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=sl(this.tertiaryColor,this.darkMode),this.primaryTextColor=Xs(this.primaryColor),this.secondaryTextColor=Xs(this.secondaryColor),this.tertiaryTextColor=Xs(this.primaryColor),this.lineColor=Xs(this.background),this.textColor=Xs(this.background),this.THEME_COLOR_LIMIT=12,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.excludeBkgColor="#eeeeee",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.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Vs(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Vs(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Vs(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Vs(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Vs(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Vs(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Vs(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Vs(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Vs(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Qs(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Qs(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=Qs(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||Qs(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Vs(this["cScale"+t],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=Qs(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.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Vs(this.primaryColor,{h:64}),this.fillType3=Vs(this.secondaryColor,{h:64}),this.fillType4=Vs(this.primaryColor,{h:-64}),this.fillType5=Vs(this.secondaryColor,{h:-64}),this.fillType6=Vs(this.primaryColor,{h:128}),this.fillType7=Vs(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Vs(this.primaryColor,{l:-30}),this.pie5=this.pie5||Vs(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Vs(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||Vs(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Vs(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Vs(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Vs(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||Vs(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||Vs(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Vs(this.primaryColor,{h:-30}),this.git4=this.git4||Vs(this.primaryColor,{h:-60}),this.git5=this.git5||Vs(this.primaryColor,{h:-90}),this.git6=this.git6||Vs(this.primaryColor,{h:60}),this.git7=this.git7||Vs(this.primaryColor,{h:120}),this.darkMode?(this.git0=Ks(this.git0,25),this.git1=Ks(this.git1,25),this.git2=Ks(this.git2,25),this.git3=Ks(this.git3,25),this.git4=Ks(this.git4,25),this.git5=Ks(this.git5,25),this.git6=Ks(this.git6,25),this.git7=Ks(this.git7,25)):(this.git0=Qs(this.git0,25),this.git1=Qs(this.git1,25),this.git2=Qs(this.git2,25),this.git3=Qs(this.git3,25),this.git4=Qs(this.git4,25),this.git5=Qs(this.git5,25),this.git6=Qs(this.git6,25),this.git7=Qs(this.git7,25)),this.gitInv0=this.gitInv0||Xs(this.git0),this.gitInv1=this.gitInv1||Xs(this.git1),this.gitInv2=this.gitInv2||Xs(this.git2),this.gitInv3=this.gitInv3||Xs(this.git3),this.gitInv4=this.gitInv4||Xs(this.git4),this.gitInv5=this.gitInv5||Xs(this.git5),this.gitInv6=this.gitInv6||Xs(this.git6),this.gitInv7=this.gitInv7||Xs(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||cl,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ll}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}}class pl{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Ks(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Vs(this.primaryColor,{h:-160}),this.primaryBorderColor=sl(this.primaryColor,this.darkMode),this.secondaryBorderColor=sl(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=sl(this.tertiaryColor,this.darkMode),this.primaryTextColor=Xs(this.primaryColor),this.secondaryTextColor=Xs(this.secondaryColor),this.tertiaryTextColor=Xs(this.tertiaryColor),this.lineColor=Xs(this.background),this.textColor=Xs(this.background),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, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,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.excludeBkgColor="#eeeeee",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.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=Ks(this.contrast,55),this.border2=this.contrast,this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Xs(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||Ks(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||Qs(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;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=Ks(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="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.sectionBkgColor=Ks(this.contrast,30),this.sectionBkgColor2=Ks(this.contrast,30),this.taskBorderColor=Qs(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=Ks(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Qs(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Vs(this.primaryColor,{h:64}),this.fillType3=Vs(this.secondaryColor,{h:64}),this.fillType4=Vs(this.primaryColor,{h:-64}),this.fillType5=Vs(this.secondaryColor,{h:-64}),this.fillType6=Vs(this.primaryColor,{h:128}),this.fillType7=Vs(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Qs(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||Vs(this.primaryColor,{h:-30}),this.git4=this.pie5||Vs(this.primaryColor,{h:-60}),this.git5=this.pie6||Vs(this.primaryColor,{h:-90}),this.git6=this.pie7||Vs(this.primaryColor,{h:60}),this.git7=this.pie8||Vs(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Xs(this.git0),this.gitInv1=this.gitInv1||Xs(this.git1),this.gitInv2=this.gitInv2||Xs(this.git2),this.gitInv3=this.gitInv3||Xs(this.git3),this.gitInv4=this.gitInv4||Xs(this.git4),this.gitInv5=this.gitInv5||Xs(this.git5),this.gitInv6=this.gitInv6||Xs(this.git6),this.gitInv7=this.gitInv7||Xs(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||cl,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ll}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}}const gl={base:{getThemeVariables:t=>{const e=new ul;return e.calculate(t),e}},dark:{getThemeVariables:t=>{const e=new hl;return e.calculate(t),e}},default:{getThemeVariables:t=>{const e=new fl;return e.calculate(t),e}},forest:{getThemeVariables:t=>{const e=new dl;return e.calculate(t),e}},neutral:{getThemeVariables:t=>{const e=new pl;return e.calculate(t),e}}},yl={theme:"default",themeVariables:gl.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},sequence:{hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',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,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},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,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},er:{diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},gitGraph:{diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0},c4:{useWidth:void 0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,useMaxWidth:!0,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},fontSize:16};yl.class&&(yl.class.arrowMarkerAbsolute=yl.arrowMarkerAbsolute),yl.gitGraph&&(yl.gitGraph.arrowMarkerAbsolute=yl.arrowMarkerAbsolute);const ml=(t,e="")=>Object.keys(t).reduce(((n,r)=>Array.isArray(t[r])?n:"object"==typeof t[r]&&null!==t[r]?[...n,e+r,...ml(t[r],"")]:[...n,e+r]),[]),bl=ml(yl,""),_l=/[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,vl=/\s*%%.*\n/gm,xl={},kl=function(t,e){t=t.replace(_l,"").replace(vl,"\n");for(const[n,{detector:r}]of Object.entries(xl))if(r(t,e))return n;throw new Error(`No diagram type detected for text: ${t}`)},wl=(t,e,n)=>{if(xl[t])throw new Error(`Detector with key ${t} already exists`);xl[t]={detector:e,loader:n},Xc.debug(`Detector with key ${t} added${n?" with loader":""}`)},Tl=function(t,e,n){const{depth:r,clobber:i}=Object.assign({depth:2,clobber:!1},n);return Array.isArray(e)&&!Array.isArray(t)?(e.forEach((e=>Tl(t,e,n))),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach((e=>{-1===t.indexOf(e)&&t.push(e)})),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach((n=>{"object"!=typeof e[n]||void 0!==t[n]&&"object"!=typeof t[n]?(i||"object"!=typeof t[n]&&"object"!=typeof e[n])&&(t[n]=e[n]):(void 0===t[n]&&(t[n]=Array.isArray(e[n])?[]:{}),t[n]=Tl(t[n],e[n],{depth:r-1,clobber:i}))})),t)};var El,Cl,Sl,Al,Ml,Nl,Dl,Ll,Ol,Bl,Il,Fl,Rl,Pl,$l,jl,Yl,zl,Ul,ql,Wl,Hl,Vl,Gl,Xl,Zl,Ql,Kl,Jl="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function tu(){if(Cl)return El;Cl=1;var t="object"==typeof Jl&&Jl&&Jl.Object===Object&&Jl;return El=t}function eu(){if(Al)return Sl;Al=1;var t=tu(),e="object"==typeof self&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return Sl=n}function nu(){if(Nl)return Ml;Nl=1;var t=eu().Symbol;return Ml=t}function ru(){if(Fl)return Il;Fl=1;var t=nu(),e=function(){if(Ll)return Dl;Ll=1;var t=nu(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,i=t?t.toStringTag:void 0;return Dl=function(t){var e=n.call(t,i),a=t[i];try{t[i]=void 0;var o=!0}catch(t){}var s=r.call(t);return o&&(e?t[i]=a:delete t[i]),s},Dl}(),n=function(){if(Bl)return Ol;Bl=1;var t=Object.prototype.toString;return Ol=function(e){return t.call(e)},Ol}(),r=t?t.toStringTag:void 0;return Il=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":r&&r in Object(t)?e(t):n(t)},Il}function iu(){return Pl||(Pl=1,Rl=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}),Rl}function au(){if(jl)return $l;jl=1;var t=ru(),e=iu();return $l=function(n){if(!e(n))return!1;var r=t(n);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r},$l}function ou(){if(Gl)return Vl;Gl=1;var t=au(),e=function(){if(ql)return Ul;ql=1;var t,e=function(){if(zl)return Yl;zl=1;var t=eu()["__core-js_shared__"];return Yl=t}(),n=(t=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return Ul=function(t){return!!n&&n in t}}(),n=iu(),r=function(){if(Hl)return Wl;Hl=1;var t=Function.prototype.toString;return Wl=function(e){if(null!=e){try{return t.call(e)}catch(t){}try{return e+""}catch(t){}}return""}}(),i=/^\[object .+?Constructor\]$/,a=Function.prototype,o=Object.prototype,s=a.toString,c=o.hasOwnProperty,l=RegExp("^"+s.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return Vl=function(a){return!(!n(a)||e(a))&&(t(a)?l:i).test(r(a))},Vl}function su(){if(Kl)return Ql;Kl=1;var t=ou(),e=(Zl||(Zl=1,Xl=function(t,e){return null==t?void 0:t[e]}),Xl);return Ql=function(n,r){var i=e(n,r);return t(i)?i:void 0},Ql}var cu=su()(Object,"create"),lu=cu,uu=cu,hu=Object.prototype.hasOwnProperty,fu=cu,du=Object.prototype.hasOwnProperty,pu=cu,gu=function(){this.__data__=lu?lu(null):{},this.size=0},yu=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},mu=function(t){var e=this.__data__;if(uu){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return hu.call(e,t)?e[t]:void 0},bu=function(t){var e=this.__data__;return fu?void 0!==e[t]:du.call(e,t)},_u=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=pu&&void 0===e?"__lodash_hash_undefined__":e,this};function vu(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}vu.prototype.clear=gu,vu.prototype.delete=yu,vu.prototype.get=mu,vu.prototype.has=bu,vu.prototype.set=_u;var xu,ku,wu=vu;function Tu(){return ku||(ku=1,xu=function(t,e){return t===e||t!=t&&e!=e}),xu}var Eu=Tu(),Cu=function(t,e){for(var n=t.length;n--;)if(Eu(t[n][0],e))return n;return-1},Su=Cu,Au=Array.prototype.splice,Mu=Cu,Nu=Cu,Du=Cu,Lu=function(){this.__data__=[],this.size=0},Ou=function(t){var e=this.__data__,n=Su(e,t);return!(n<0||(n==e.length-1?e.pop():Au.call(e,n,1),--this.size,0))},Bu=function(t){var e=this.__data__,n=Mu(e,t);return n<0?void 0:e[n][1]},Iu=function(t,e){var n=this.__data__,r=Du(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function Fu(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Fu.prototype.clear=Lu,Fu.prototype.delete=Ou,Fu.prototype.get=Bu,Fu.prototype.has=function(t){return Nu(this.__data__,t)>-1},Fu.prototype.set=Iu;var Ru=Fu,Pu=su()(eu(),"Map"),$u=wu,ju=Ru,Yu=Pu,zu=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t},Uu=function(t,e){var n=t.__data__;return zu(e)?n["string"==typeof e?"string":"hash"]:n.map},qu=Uu,Wu=Uu,Hu=Uu,Vu=Uu,Gu=function(t,e){var n=Vu(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Xu(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Xu.prototype.clear=function(){this.size=0,this.__data__={hash:new $u,map:new(Yu||ju),string:new $u}},Xu.prototype.delete=function(t){var e=qu(this,t).delete(t);return this.size-=e?1:0,e},Xu.prototype.get=function(t){return Wu(this,t).get(t)},Xu.prototype.has=function(t){return Hu(this,t).has(t)},Xu.prototype.set=Gu;var Zu=Xu;function Qu(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Qu.Cache||Zu),n}Qu.Cache=Zu;var Ku=Qu;const Ju={curveBasis:ps,curveBasisClosed:function(t){return new gs(t)},curveBasisOpen:function(t){return new ys(t)},curveLinear:as,curveLinearClosed:function(t){return new ms(t)},curveMonotoneX:function(t){return new ks(t)},curveMonotoneY:function(t){return new ws(t)},curveNatural:function(t){return new Es(t)},curveStep:function(t){return new Ss(t,.5)},curveStepAfter:function(t){return new Ss(t,1)},curveStepBefore:function(t){return new Ss(t,0)}},th=/[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,eh=/\s*(?:(?:(\w+)(?=:):|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,nh=function(t,e=null){try{const n=new RegExp(`[%]{2}(?![{]${eh.source})(?=[}][%]{2}).*\n`,"ig");let r;t=t.trim().replace(n,"").replace(/'/gm,'"'),Xc.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const i=[];for(;null!==(r=th.exec(t));)if(r.index===th.lastIndex&&th.lastIndex++,r&&!e||e&&r[1]&&r[1].match(e)||e&&r[2]&&r[2].match(e)){const t=r[1]?r[1]:r[2],e=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:t,args:e})}return 0===i.length&&i.push({type:t,args:null}),1===i.length?i[0]:i}catch(n){return Xc.error(`ERROR: ${n.message} - Unable to parse directive\n ${null!==e?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}},rh=(t,e)=>{if(!t)return e;const n=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return Ju[n]||e},ih=(t,e)=>t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0,ah=t=>{let e="",n="";for(let r=0;r<t.length;r++)void 0!==t[r]&&(t[r].startsWith("color:")||t[r].startsWith("text-align:")?n=n+t[r]+";":e=e+t[r]+";");return{style:e,labelStyle:n}};let oh=0;const sh=()=>(oh++,"id-"+Math.random().toString(36).substr(2,12)+"-"+oh),ch=t=>function(t){let e="";const n="0123456789abcdef",r=n.length;for(let i=0;i<t;i++)e+=n.charAt(Math.floor(Math.random()*r));return e}(t.length),lh=function(t,e){const n=e.text.replace(ol.lineBreakRegex," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.style("text-anchor",e.anchor),r.style("font-family",e.fontFamily),r.style("font-size",e.fontSize),r.style("font-weight",e.fontWeight),r.attr("fill",e.fill),void 0!==e.class&&r.attr("class",e.class);const i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.attr("fill",e.fill),i.text(n),r},uh=Ku(((t,e,n)=>{if(!t)return t;if(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},n),ol.lineBreakRegex.test(t))return t;const r=t.split(" "),i=[];let a="";return r.forEach(((t,o)=>{const s=dh(`${t} `,n),c=dh(a,n);if(s>e){const{hyphenatedStrings:r,remainingWord:o}=hh(t,e,"-",n);i.push(a,...r),a=o}else c+s>=e?(i.push(a),a=t):a=[a,t].filter(Boolean).join(" ");o+1===r.length&&i.push(a)})),i.filter((t=>""!==t)).join(n.joinWith)}),((t,e,n)=>`${t}${e}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`)),hh=Ku(((t,e,n="-",r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);const i=t.split(""),a=[];let o="";return i.forEach(((t,s)=>{const c=`${o}${t}`;if(dh(c,r)>=e){const t=s+1,e=i.length===t,r=`${c}${n}`;a.push(e?c:r),o=""}else o=c})),{hyphenatedStrings:a,remainingWord:o}}),((t,e,n="-",r)=>`${t}${e}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`)),fh=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),ph(t,e).height},dh=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),ph(t,e).width},ph=Ku((function(t,e){e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e);const{fontSize:n,fontFamily:r,fontWeight:i}=e;if(!t)return{width:0,height:0};const a=["sans-serif",r],o=t.split(ol.lineBreakRegex),s=[],c=Co("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const l=c.append("svg");for(const t of a){let e=0;const r={width:0,height:0,lineHeight:0};for(const a of o){const o={x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0};o.text=a;const s=lh(l,o).style("font-size",n).style("font-weight",i).style("font-family",t),c=(s._groups||s)[0][0].getBBox();r.width=Math.round(Math.max(r.width,c.width)),e=Math.round(c.height),r.height+=e,r.lineHeight=Math.round(Math.max(r.lineHeight,e))}s.push(r)}return l.remove(),s[isNaN(s[1].height)||isNaN(s[1].width)||isNaN(s[1].lineHeight)||s[0].height>s[1].height&&s[0].width>s[1].width&&s[0].lineHeight>s[1].lineHeight?0:1]}),((t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`));let gh;const yh=t=>{if(Xc.debug("directiveSanitizer called with",t),"object"==typeof t&&(t.length?t.forEach((t=>yh(t))):Object.keys(t).forEach((e=>{Xc.debug("Checking key",e),0===e.indexOf("__")&&(Xc.debug("sanitize deleting __ option",e),delete t[e]),e.indexOf("proto")>=0&&(Xc.debug("sanitize deleting proto option",e),delete t[e]),e.indexOf("constr")>=0&&(Xc.debug("sanitize deleting constr option",e),delete t[e]),e.indexOf("themeCSS")>=0&&(Xc.debug("sanitizing themeCss option"),t[e]=mh(t[e])),e.indexOf("fontFamily")>=0&&(Xc.debug("sanitizing fontFamily option"),t[e]=mh(t[e])),e.indexOf("altFontFamily")>=0&&(Xc.debug("sanitizing altFontFamily option"),t[e]=mh(t[e])),bl.indexOf(e)<0?(Xc.debug("sanitize deleting option",e),delete t[e]):"object"==typeof t[e]&&(Xc.debug("sanitize deleting object",e),yh(t[e]))}))),t.themeVariables){const e=Object.keys(t.themeVariables);for(let n=0;n<e.length;n++){const r=e[n],i=t.themeVariables[r];i&&i.match&&!i.match(/^[a-zA-Z0-9#,";()%. ]+$/)&&(t.themeVariables[r]="")}}Xc.debug("After sanitization",t)},mh=t=>{let e=0,n=0;for(let r=0;r<t.length;r++){if(e<n)return"{ /* ERROR: Unbalanced CSS */ }";"{"===t[r]?e++:"}"===t[r]&&n++}return e!==n?"{ /* ERROR: Unbalanced CSS */ }":t};function bh(t){return"str"in t}const _h={assignWithDepth:Tl,wrapLabel:uh,calculateTextHeight:fh,calculateTextWidth:dh,calculateTextDimensions:ph,detectInit:function(t,e){const n=nh(t,/(?:init\b)|(?:initialize\b)/);let r={};if(Array.isArray(n)){const t=n.map((t=>t.args));yh(t),r=Tl(r,[...t])}else r=n.args;if(r){let n=kl(t,e);["config"].forEach((t=>{void 0!==r[t]&&("flowchart-v2"===n&&(n="flowchart"),r[n]=r[t],delete r[t])}))}return r},detectDirective:nh,isSubstringInArray:function(t,e){for(let n=0;n<e.length;n++)if(e[n].match(t))return n;return-1},interpolateToCurve:rh,calcLabelPosition:t=>1===t.length?t[0]:(t=>{let e,n=0;t.forEach((t=>{n+=ih(t,e),e=t}));let r,i=n/2;return e=void 0,t.forEach((t=>{if(e&&!r){const n=ih(t,e);if(n<i)i-=n;else{const a=i/n;a<=0&&(r=e),a>=1&&(r={x:t.x,y:t.y}),a>0&&a<1&&(r={x:(1-a)*e.x+a*t.x,y:(1-a)*e.y+a*t.y})}}e=t})),r})(t),calcCardinalityPosition:(t,e,n)=>{let r;Xc.info("our points",e),e[0]!==n&&(e=e.reverse()),e.forEach((t=>{totalDistance+=ih(t,r),r=t}));let i,a=25;r=void 0,e.forEach((t=>{if(r&&!i){const e=ih(t,r);if(e<a)a-=e;else{const n=a/e;n<=0&&(i=r),n>=1&&(i={x:t.x,y:t.y}),n>0&&n<1&&(i={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));const 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},calcTerminalLabelPosition:(t,e,n)=>{let r,i=JSON.parse(JSON.stringify(n));Xc.info("our points",i),"start_left"!==e&&"start_right"!==e&&(i=i.reverse()),i.forEach((t=>{r=t}));let a,o=25+t;r=void 0,i.forEach((t=>{if(r&&!a){const e=ih(t,r);if(e<o)o-=e;else{const n=o/e;n<=0&&(a=r),n>=1&&(a={x:t.x,y:t.y}),n>0&&n<1&&(a={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));const s=10+.5*t,c=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return l.x=Math.sin(c)*s+(i[0].x+a.x)/2,l.y=-Math.cos(c)*s+(i[0].y+a.y)/2,"start_left"===e&&(l.x=Math.sin(c+Math.PI)*s+(i[0].x+a.x)/2,l.y=-Math.cos(c+Math.PI)*s+(i[0].y+a.y)/2),"end_right"===e&&(l.x=Math.sin(c-Math.PI)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(c-Math.PI)*s+(i[0].y+a.y)/2-5),"end_left"===e&&(l.x=Math.sin(c)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(c)*s+(i[0].y+a.y)/2-5),l},formatUrl:(t,e)=>{const n=t.trim();if(n)return"loose"!==e.securityLevel?(0,i.N)(n):n},getStylesFromArray:ah,generateId:sh,random:ch,runFunc:(t,...e)=>{const n=t.split("."),r=n.length-1,i=n[r];let a=window;for(let t=0;t<r;t++)if(a=a[n[t]],!a)return;a[i](...e)},entityDecode:function(t){return gh=gh||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),gh.innerHTML=t,unescape(gh.textContent)},initIdGenerator:class{constructor(t,e){this.deterministic=t,this.seed=e,this.count=e?e.length:0}next(){return this.deterministic?this.count++:Date.now()}},directiveSanitizer:yh,sanitizeCss:mh},vh="9.2.2",xh=Object.freeze(yl);let kh,wh=Tl({},xh),Th=[],Eh=Tl({},xh);const Ch=(t,e)=>{let n=Tl({},t),r={};for(let t=0;t<e.length;t++){const n=e[t];Nh(n),r=Tl(r,n)}if(n=Tl(n,r),r.theme&&r.theme in gl){const t=Tl({},kh),e=Tl(t.themeVariables||{},r.themeVariables);n.theme&&n.theme in gl&&(n.themeVariables=gl[n.theme].getThemeVariables(e))}return Eh=n,Ih(Eh),Eh},Sh=()=>Tl({},wh),Ah=t=>(Ih(t),Tl(Eh,t),Mh()),Mh=()=>Tl({},Eh),Nh=t=>{var e;["secure",...null!=(e=wh.secure)?e:[]].forEach((e=>{void 0!==t[e]&&(Xc.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])})),Object.keys(t).forEach((e=>{0===e.indexOf("__")&&delete t[e]})),Object.keys(t).forEach((e=>{"string"==typeof t[e]&&(t[e].indexOf("<")>-1||t[e].indexOf(">")>-1||t[e].indexOf("url(data:")>-1)&&delete t[e],"object"==typeof t[e]&&Nh(t[e])}))},Dh=t=>{t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),Th.push(t),Ch(wh,Th)},Lh=(t=wh)=>{Th=[],Ch(t,Th)};var Oh=(t=>(t.LAZY_LOAD_DEPRECATED="The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",t))(Oh||{});const Bh={},Ih=t=>{var e;t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&(Bh[e="LAZY_LOAD_DEPRECATED"]||(Xc.warn(Oh[e]),Bh[e]=!0))},Fh=function(t,e,n,r){const i=function(t,e,n){let r=new Map;return n?(r.set("width","100%"),r.set("style",`max-width: ${e}px;`)):r.set("width",e),r}(0,n,r);!function(t,e){for(let n of e)t.attr(n[0],n[1])}(t,i)},Rh=function(t,e,n,r){const i=e.node().getBBox(),a=i.width,o=i.height;Xc.info(`SVG bounds: ${a}x${o}`,i);let s=0,c=0;Xc.info(`Graph bounds: ${s}x${c}`,t),s=a+2*n,c=o+2*n,Xc.info(`Calculated bounds: ${s}x${c}`),Fh(e,0,s,r);const l=`${i.x-n} ${i.y-n} ${i.width+2*n} ${i.height+2*n}`;e.attr("viewBox",l)},Ph=t=>`g.classGroup text {\n fill: ${t.nodeBorder};\n fill: ${t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${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: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopStart, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopEnd, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n}\n\n`,$h=t=>`\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxOdd {\n fill: ${t.attributeBackgroundColorOdd};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxEven {\n fill: ${t.attributeBackgroundColorEven};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n }\n`,jh=()=>"",Yh=t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n\n .label text,span {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${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: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n`,zh=t=>`\n .mermaid-main-font {\n font-family: "trebuchet ms", verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n .exclude-range {\n fill: ${t.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${t.sectionBkgColor};\n }\n\n .section2 {\n fill: ${t.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${t.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n // font-size: ${t.ganttFontSize};\n // text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n text {\n font-family: ${t.fontFamily};\n fill: ${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: ${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, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n // .taskText:not([font-size]) {\n // font-size: ${t.ganttFontSize};\n // }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n // font-size: ${t.ganttFontSize};\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n // font-size: ${t.ganttFontSize};\n }\n\n /* Special case clickable */\n .task.clickable {\n cursor: pointer;\n }\n .taskText.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${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: ${t.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${t.taskBkgColor};\n stroke: ${t.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${t.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${t.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${t.activeTaskBkgColor};\n stroke: ${t.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${t.doneTaskBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${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: ${t.taskTextDarkColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor} ;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n`,Uh=()=>"",qh=t=>`\n .pieCircle{\n stroke: ${t.pieStrokeColor};\n stroke-width : ${t.pieStrokeWidth};\n opacity : ${t.pieOpacity};\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${t.pieTitleTextSize};\n fill: ${t.pieTitleTextColor};\n font-family: ${t.fontFamily};\n }\n .slice {\n font-family: ${t.fontFamily};\n fill: ${t.pieSectionTextColor};\n font-size:${t.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${t.pieLegendTextColor};\n font-family: ${t.fontFamily};\n font-size: ${t.pieLegendTextSize};\n }\n`,Wh=t=>`\n\n marker {\n fill: ${t.relationColor};\n stroke: ${t.relationColor};\n }\n\n marker.cross {\n stroke: ${t.lineColor};\n }\n\n svg {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n }\n\n .reqBox {\n fill: ${t.requirementBackground};\n fill-opacity: 100%;\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${t.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${t.relationLabelBackground};\n fill-opacity: 100%;\n }\n\n .req-title-line {\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${t.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${t.relationLabelColor};\n }\n\n`,Hh=t=>`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n #arrowhead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${t.signalColor};\n }\n\n #crosshead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n`,Vh=t=>`\ndefs #statediagram-barbEnd {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${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: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\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: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n`,Gh=t=>`.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${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: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${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: ${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, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n`,Xh=t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`,Zh={flowchart:Yh,"flowchart-v2":Yh,sequence:Hh,gantt:zh,classDiagram:Ph,"classDiagram-v2":Ph,class:Ph,stateDiagram:Vh,state:Vh,info:Uh,pie:qh,er:$h,error:jh,journey:Gh,requirement:Wh,c4:Xh},Qh=(t,e,n)=>{let r="";return t in Zh&&Zh[t]?r=Zh[t](n):Xc.warn(`No theme found for ${t}`),` {\n font-family: ${n.fontFamily};\n font-size: ${n.fontSize};\n fill: ${n.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n .error-icon {\n fill: ${n.errorBkgColor};\n }\n .error-text {\n fill: ${n.errorTextColor};\n stroke: ${n.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: ${n.lineColor};\n stroke: ${n.lineColor};\n }\n .marker.cross {\n stroke: ${n.lineColor};\n }\n\n svg {\n font-family: ${n.fontFamily};\n font-size: ${n.fontSize};\n }\n\n ${r}\n\n ${e}\n`},Kh=Xc,Jh=Zc,tf=Mh,ef=t=>tl(t,tf()),nf=Rh,rf={},af=(t,e,n)=>{var r,i;Kh.debug(`Registering diagram ${t}`),rf[t]&&Kh.warn(`Diagram ${t} already registered.`),rf[t]=e,n&&wl(t,n),r=t,i=e.styles,Zh[r]=i,e.injectUtils&&e.injectUtils(Kh,Jh,tf,ef,nf),Kh.debug(`Registered diagram ${t}. ${Object.keys(rf).join(", ")} diagrams registered.`)},of=t=>{if(Kh.debug(`Getting diagram ${t}. ${Object.keys(rf).join(", ")} diagrams registered.`),t in rf)return rf[t];throw new sf(t)};class sf extends Error{constructor(t){super(`Diagram ${t} not found.`)}}var cf=function(){var t,e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,4],r=[1,7],i=[1,5],a=[1,9],o=[1,6],s=[2,6],c=[1,16],l=[6,8,14,20,22,24,25,27,29,32,37,40,50,54],u=[8,14,20,22,24,25,27,29,32,37,40],h=[8,13,14,20,22,24,25,27,29,32,37,40],f=[1,26],d=[6,8,14,50,54],p=[8,14,54],g=[1,65],y=[1,66],m=[1,67],b=[8,14,33,35,42,54],_={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,cherryPickStatement:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,branchStatement:26,CHECKOUT:27,ID:28,BRANCH:29,ORDER:30,NUM:31,CHERRY_PICK:32,COMMIT_ID:33,STR:34,COMMIT_TAG:35,EMPTYSTR:36,MERGE:37,COMMIT_TYPE:38,commitType:39,COMMIT:40,commit_arg:41,COMMIT_MSG:42,NORMAL:43,REVERSE:44,HIGHLIGHT:45,openDirective:46,typeDirective:47,closeDirective:48,argDirective:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,";":54,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"CHECKOUT",28:"ID",29:"BRANCH",30:"ORDER",31:"NUM",32:"CHERRY_PICK",33:"COMMIT_ID",34:"STR",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive",54:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[26,2],[26,4],[19,3],[19,5],[19,5],[19,5],[19,5],[18,2],[18,4],[18,4],[18,4],[18,6],[18,6],[18,6],[18,6],[18,6],[18,6],[18,8],[18,8],[18,8],[18,8],[18,8],[18,8],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[41,0],[41,1],[39,1],[39,1],[39,1],[5,3],[5,5],[46,1],[47,1],[49,1],[48,1],[4,1],[4,1],[4,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return a[s];case 4:return a[s-1];case 5:return r.setDirection(a[s-3]),a[s-1];case 7:r.setOptions(a[s-1]),this.$=a[s];break;case 8:a[s-1]+=a[s],this.$=a[s-1];break;case 10:this.$=[];break;case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 12:this.$=a[s-1];break;case 17:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 18:case 19:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 20:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 22:r.checkout(a[s]);break;case 23:r.branch(a[s]);break;case 24:r.branch(a[s-2],a[s]);break;case 25:r.cherryPick(a[s],"",void 0);break;case 26:r.cherryPick(a[s-2],"",a[s]);break;case 27:case 29:r.cherryPick(a[s-2],"","");break;case 28:r.cherryPick(a[s],"",a[s-2]);break;case 30:r.merge(a[s],"","","");break;case 31:r.merge(a[s-2],a[s],"","");break;case 32:r.merge(a[s-2],"",a[s],"");break;case 33:r.merge(a[s-2],"","",a[s]);break;case 34:r.merge(a[s-4],a[s],"",a[s-2]);break;case 35:r.merge(a[s-4],"",a[s],a[s-2]);break;case 36:r.merge(a[s-4],"",a[s-2],a[s]);break;case 37:r.merge(a[s-4],a[s-2],a[s],"");break;case 38:r.merge(a[s-4],a[s-2],"",a[s]);break;case 39:r.merge(a[s-4],a[s],a[s-2],"");break;case 40:r.merge(a[s-6],a[s-4],a[s-2],a[s]);break;case 41:r.merge(a[s-6],a[s],a[s-4],a[s-2]);break;case 42:r.merge(a[s-6],a[s-4],a[s],a[s-2]);break;case 43:r.merge(a[s-6],a[s-2],a[s-4],a[s]);break;case 44:r.merge(a[s-6],a[s],a[s-2],a[s-4]);break;case 45:r.merge(a[s-6],a[s-2],a[s],a[s-4]);break;case 46:r.commit(a[s]);break;case 47:r.commit("","",r.commitType.NORMAL,a[s]);break;case 48:r.commit("","",a[s],"");break;case 49:r.commit("","",a[s],a[s-2]);break;case 50:r.commit("","",a[s-2],a[s]);break;case 51:r.commit("",a[s],r.commitType.NORMAL,"");break;case 52:r.commit("",a[s-2],r.commitType.NORMAL,a[s]);break;case 53:r.commit("",a[s],r.commitType.NORMAL,a[s-2]);break;case 54:r.commit("",a[s-2],a[s],"");break;case 55:r.commit("",a[s],a[s-2],"");break;case 56:r.commit("",a[s-4],a[s-2],a[s]);break;case 57:r.commit("",a[s-4],a[s],a[s-2]);break;case 58:r.commit("",a[s-2],a[s-4],a[s]);break;case 59:r.commit("",a[s],a[s-4],a[s-2]);break;case 60:r.commit("",a[s],a[s-2],a[s-4]);break;case 61:r.commit("",a[s-2],a[s],a[s-4]);break;case 62:r.commit(a[s],"",r.commitType.NORMAL,"");break;case 63:r.commit(a[s],"",r.commitType.NORMAL,a[s-2]);break;case 64:r.commit(a[s-2],"",r.commitType.NORMAL,a[s]);break;case 65:r.commit(a[s-2],"",a[s],"");break;case 66:r.commit(a[s],"",a[s-2],"");break;case 67:r.commit(a[s],a[s-2],r.commitType.NORMAL,"");break;case 68:r.commit(a[s-2],a[s],r.commitType.NORMAL,"");break;case 69:r.commit(a[s-4],"",a[s-2],a[s]);break;case 70:r.commit(a[s-4],"",a[s],a[s-2]);break;case 71:r.commit(a[s-2],"",a[s-4],a[s]);break;case 72:r.commit(a[s],"",a[s-4],a[s-2]);break;case 73:r.commit(a[s],"",a[s-2],a[s-4]);break;case 74:r.commit(a[s-2],"",a[s],a[s-4]);break;case 75:r.commit(a[s-4],a[s],a[s-2],"");break;case 76:r.commit(a[s-4],a[s-2],a[s],"");break;case 77:r.commit(a[s-2],a[s],a[s-4],"");break;case 78:r.commit(a[s],a[s-2],a[s-4],"");break;case 79:r.commit(a[s],a[s-4],a[s-2],"");break;case 80:r.commit(a[s-2],a[s-4],a[s],"");break;case 81:r.commit(a[s-4],a[s],r.commitType.NORMAL,a[s-2]);break;case 82:r.commit(a[s-4],a[s-2],r.commitType.NORMAL,a[s]);break;case 83:r.commit(a[s-2],a[s],r.commitType.NORMAL,a[s-4]);break;case 84:r.commit(a[s],a[s-2],r.commitType.NORMAL,a[s-4]);break;case 85:r.commit(a[s],a[s-4],r.commitType.NORMAL,a[s-2]);break;case 86:r.commit(a[s-2],a[s-4],r.commitType.NORMAL,a[s]);break;case 87:r.commit(a[s-6],a[s-4],a[s-2],a[s]);break;case 88:r.commit(a[s-6],a[s-4],a[s],a[s-2]);break;case 89:r.commit(a[s-6],a[s-2],a[s-4],a[s]);break;case 90:r.commit(a[s-6],a[s],a[s-4],a[s-2]);break;case 91:r.commit(a[s-6],a[s-2],a[s],a[s-4]);break;case 92:r.commit(a[s-6],a[s],a[s-2],a[s-4]);break;case 93:r.commit(a[s-4],a[s-6],a[s-2],a[s]);break;case 94:r.commit(a[s-4],a[s-6],a[s],a[s-2]);break;case 95:r.commit(a[s-2],a[s-6],a[s-4],a[s]);break;case 96:r.commit(a[s],a[s-6],a[s-4],a[s-2]);break;case 97:r.commit(a[s-2],a[s-6],a[s],a[s-4]);break;case 98:r.commit(a[s],a[s-6],a[s-2],a[s-4]);break;case 99:r.commit(a[s],a[s-4],a[s-2],a[s-6]);break;case 100:r.commit(a[s-2],a[s-4],a[s],a[s-6]);break;case 101:r.commit(a[s],a[s-2],a[s-4],a[s-6]);break;case 102:r.commit(a[s-2],a[s],a[s-4],a[s-6]);break;case 103:r.commit(a[s-4],a[s-2],a[s],a[s-6]);break;case 104:r.commit(a[s-4],a[s],a[s-2],a[s-6]);break;case 105:r.commit(a[s-2],a[s-4],a[s-6],a[s]);break;case 106:r.commit(a[s],a[s-4],a[s-6],a[s-2]);break;case 107:r.commit(a[s-2],a[s],a[s-6],a[s-4]);break;case 108:r.commit(a[s],a[s-2],a[s-6],a[s-4]);break;case 109:r.commit(a[s-4],a[s-2],a[s-6],a[s]);break;case 110:r.commit(a[s-4],a[s],a[s-6],a[s-2]);break;case 111:this.$="";break;case 112:this.$=a[s];break;case 113:this.$=r.commitType.NORMAL;break;case 114:this.$=r.commitType.REVERSE;break;case 115:this.$=r.commitType.HIGHLIGHT;break;case 118:r.parseDirective("%%{","open_directive");break;case 119:r.parseDirective(a[s],"type_directive");break;case 120:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 121:r.parseDirective("}%%","close_directive","gitGraph")}},table:[{3:1,4:2,5:3,6:n,8:r,14:i,46:8,50:a,54:o},{1:[3]},{3:10,4:2,5:3,6:n,8:r,14:i,46:8,50:a,54:o},{3:11,4:2,5:3,6:n,8:r,14:i,46:8,50:a,54:o},{7:12,8:s,9:[1,13],10:[1,14],11:15,14:c},e(l,[2,122]),e(l,[2,123]),e(l,[2,124]),{47:17,51:[1,18]},{51:[2,118]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:s,11:15,14:c},{9:[1,21]},e(u,[2,10],{12:22,13:[1,23]}),e(h,[2,9]),{9:[1,25],48:24,53:f},e([9,53],[2,119]),{1:[2,3]},{8:[1,27]},{7:28,8:s,11:15,14:c},{8:[2,7],14:[1,31],15:29,16:30,17:32,18:33,19:34,20:[1,35],22:[1,36],24:[1,37],25:[1,38],26:39,27:[1,40],29:[1,44],32:[1,43],37:[1,42],40:[1,41]},e(h,[2,8]),e(d,[2,116]),{49:45,52:[1,46]},e(d,[2,121]),{1:[2,4]},{8:[1,47]},e(u,[2,11]),{4:48,8:r,14:i,54:o},e(u,[2,13]),e(p,[2,14]),e(p,[2,15]),e(p,[2,16]),{21:[1,49]},{23:[1,50]},e(p,[2,19]),e(p,[2,20]),e(p,[2,21]),{28:[1,51]},e(p,[2,111],{41:52,33:[1,55],34:[1,57],35:[1,53],38:[1,54],42:[1,56]}),{28:[1,58]},{33:[1,59],35:[1,60]},{28:[1,61]},{48:62,53:f},{53:[2,120]},{1:[2,5]},e(u,[2,12]),e(p,[2,17]),e(p,[2,18]),e(p,[2,22]),e(p,[2,46]),{34:[1,63]},{39:64,43:g,44:y,45:m},{34:[1,68]},{34:[1,69]},e(p,[2,112]),e(p,[2,30],{33:[1,70],35:[1,72],38:[1,71]}),{34:[1,73]},{34:[1,74],36:[1,75]},e(p,[2,23],{30:[1,76]}),e(d,[2,117]),e(p,[2,47],{33:[1,78],38:[1,77],42:[1,79]}),e(p,[2,48],{33:[1,81],35:[1,80],42:[1,82]}),e(b,[2,113]),e(b,[2,114]),e(b,[2,115]),e(p,[2,51],{35:[1,83],38:[1,84],42:[1,85]}),e(p,[2,62],{33:[1,88],35:[1,86],38:[1,87]}),{34:[1,89]},{39:90,43:g,44:y,45:m},{34:[1,91]},e(p,[2,25],{35:[1,92]}),{33:[1,93]},{33:[1,94]},{31:[1,95]},{39:96,43:g,44:y,45:m},{34:[1,97]},{34:[1,98]},{34:[1,99]},{34:[1,100]},{34:[1,101]},{34:[1,102]},{39:103,43:g,44:y,45:m},{34:[1,104]},{34:[1,105]},{39:106,43:g,44:y,45:m},{34:[1,107]},e(p,[2,31],{35:[1,109],38:[1,108]}),e(p,[2,32],{33:[1,111],35:[1,110]}),e(p,[2,33],{33:[1,112],38:[1,113]}),{34:[1,114],36:[1,115]},{34:[1,116]},{34:[1,117]},e(p,[2,24]),e(p,[2,49],{33:[1,118],42:[1,119]}),e(p,[2,53],{38:[1,120],42:[1,121]}),e(p,[2,63],{33:[1,123],38:[1,122]}),e(p,[2,50],{33:[1,124],42:[1,125]}),e(p,[2,55],{35:[1,126],42:[1,127]}),e(p,[2,66],{33:[1,129],35:[1,128]}),e(p,[2,52],{38:[1,130],42:[1,131]}),e(p,[2,54],{35:[1,132],42:[1,133]}),e(p,[2,67],{35:[1,135],38:[1,134]}),e(p,[2,64],{33:[1,137],38:[1,136]}),e(p,[2,65],{33:[1,139],35:[1,138]}),e(p,[2,68],{35:[1,141],38:[1,140]}),{39:142,43:g,44:y,45:m},{34:[1,143]},{34:[1,144]},{34:[1,145]},{34:[1,146]},{39:147,43:g,44:y,45:m},e(p,[2,26]),e(p,[2,27]),e(p,[2,28]),e(p,[2,29]),{34:[1,148]},{34:[1,149]},{39:150,43:g,44:y,45:m},{34:[1,151]},{39:152,43:g,44:y,45:m},{34:[1,153]},{34:[1,154]},{34:[1,155]},{34:[1,156]},{34:[1,157]},{34:[1,158]},{34:[1,159]},{39:160,43:g,44:y,45:m},{34:[1,161]},{34:[1,162]},{34:[1,163]},{39:164,43:g,44:y,45:m},{34:[1,165]},{39:166,43:g,44:y,45:m},{34:[1,167]},{34:[1,168]},{34:[1,169]},{39:170,43:g,44:y,45:m},{34:[1,171]},e(p,[2,37],{35:[1,172]}),e(p,[2,38],{38:[1,173]}),e(p,[2,36],{33:[1,174]}),e(p,[2,39],{35:[1,175]}),e(p,[2,34],{38:[1,176]}),e(p,[2,35],{33:[1,177]}),e(p,[2,60],{42:[1,178]}),e(p,[2,73],{33:[1,179]}),e(p,[2,61],{42:[1,180]}),e(p,[2,84],{38:[1,181]}),e(p,[2,74],{33:[1,182]}),e(p,[2,83],{38:[1,183]}),e(p,[2,59],{42:[1,184]}),e(p,[2,72],{33:[1,185]}),e(p,[2,58],{42:[1,186]}),e(p,[2,78],{35:[1,187]}),e(p,[2,71],{33:[1,188]}),e(p,[2,77],{35:[1,189]}),e(p,[2,57],{42:[1,190]}),e(p,[2,85],{38:[1,191]}),e(p,[2,56],{42:[1,192]}),e(p,[2,79],{35:[1,193]}),e(p,[2,80],{35:[1,194]}),e(p,[2,86],{38:[1,195]}),e(p,[2,70],{33:[1,196]}),e(p,[2,81],{38:[1,197]}),e(p,[2,69],{33:[1,198]}),e(p,[2,75],{35:[1,199]}),e(p,[2,76],{35:[1,200]}),e(p,[2,82],{38:[1,201]}),{34:[1,202]},{39:203,43:g,44:y,45:m},{34:[1,204]},{34:[1,205]},{39:206,43:g,44:y,45:m},{34:[1,207]},{34:[1,208]},{34:[1,209]},{34:[1,210]},{39:211,43:g,44:y,45:m},{34:[1,212]},{39:213,43:g,44:y,45:m},{34:[1,214]},{34:[1,215]},{34:[1,216]},{34:[1,217]},{34:[1,218]},{34:[1,219]},{34:[1,220]},{39:221,43:g,44:y,45:m},{34:[1,222]},{34:[1,223]},{34:[1,224]},{39:225,43:g,44:y,45:m},{34:[1,226]},{39:227,43:g,44:y,45:m},{34:[1,228]},{34:[1,229]},{34:[1,230]},{39:231,43:g,44:y,45:m},e(p,[2,40]),e(p,[2,42]),e(p,[2,41]),e(p,[2,43]),e(p,[2,45]),e(p,[2,44]),e(p,[2,101]),e(p,[2,102]),e(p,[2,99]),e(p,[2,100]),e(p,[2,104]),e(p,[2,103]),e(p,[2,108]),e(p,[2,107]),e(p,[2,106]),e(p,[2,105]),e(p,[2,110]),e(p,[2,109]),e(p,[2,98]),e(p,[2,97]),e(p,[2,96]),e(p,[2,95]),e(p,[2,93]),e(p,[2,94]),e(p,[2,92]),e(p,[2,91]),e(p,[2,90]),e(p,[2,89]),e(p,[2,87]),e(p,[2,88])],defaultActions:{9:[2,118],10:[2,1],11:[2,2],19:[2,3],27:[2,4],46:[2,120],47:[2,5]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,f=a.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;a.push(y);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||d.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,v,x,k,w,T,E,C,S={};;){if(v=n[n.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null==_&&(_=b()),x=o[v]&&o[v][_]),void 0===x||!x.length||!x[0]){var A="";for(w in C=[],o[v])this.terminals_[w]&&w>u&&C.push("'"+this.terminals_[w]+"'");A=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:y,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+_);switch(x[0]){case 1:n.push(_),i.push(d.yytext),a.push(d.yylloc),n.push(x[1]),_=null,l=d.yyleng,s=d.yytext,c=d.yylineno,y=d.yylloc;break;case 2:if(T=this.productions_[x[1]][1],S.$=i[i.length-T],S._$={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},m&&(S._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[s,l,c,p.yy,x[1],i,a].concat(f))))return k;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[x[1]][0]),i.push(S.$),a.push(S._$),E=o[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0}},v=(t={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,n=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 r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[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 n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;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,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,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[r]))&&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(){return this.next()||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,n,r){switch(n){case 0:return this.begin("open_directive"),50;case 1:return this.begin("type_directive"),51;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),53;case 4:return 52;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:case 34:case 38:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:case 14:break;case 15:return 6;case 16:return 40;case 17:return 33;case 18:return 38;case 19:return 42;case 20:return 43;case 21:return 44;case 22:return 45;case 23:return 35;case 24:return 29;case 25:return 30;case 26:return 37;case 27:return 32;case 28:return 27;case 29:case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 35:return 13;case 36:return 36;case 37:this.begin("string");break;case 39:return 34;case 40:return 31;case 41:return 28;case 42:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},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},options:{rules:[34,35],inclusive:!1},string:{rules:[38,39],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,37,40,41,42,43],inclusive:!0}}},t);function x(){this.yy={}}return _.lexer=v,x.prototype=_,_.Parser=x,new x}();cf.parser=cf;const lf=t=>null!==t.match(/^\s*gitGraph/);let uf="",hf="",ff="";const df=t=>tl(t,Mh()),pf=function(){uf="",ff="",hf=""},gf=function(t){uf=df(t).replace(/^\s+/g,"")},yf=function(){return uf||hf},mf=function(t){ff=df(t).replace(/\n\s+/g,"\n")},bf=function(){return ff},_f=function(t){hf=df(t)},vf=function(){return hf};let xf=Mh().gitGraph.mainBranchName,kf=Mh().gitGraph.mainBranchOrder,wf={},Tf=null,Ef={};Ef[xf]={name:xf,order:kf};let Cf={};Cf[xf]=Tf;let Sf=xf,Af="LR",Mf=0;function Nf(){return ch({length:7})}let Df={};const Lf=function(t){if(t=ol.sanitizeText(t,Mh()),void 0===Cf[t]){let e=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+t+'")');throw e.hash={text:"checkout "+t,token:"checkout "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+t+'"']},e}{Sf=t;const e=Cf[Sf];Tf=wf[e]}};function Of(t,e,n){const r=t.indexOf(e);-1===r?t.push(n):t.splice(r,1,n)}function Bf(t){const e=t.reduce(((t,e)=>t.seq>e.seq?t:e),t[0]);let n="";t.forEach((function(t){n+=t===e?"\t*":"\t|"}));const r=[n,e.id,e.seq];for(let t in Cf)Cf[t]===e.id&&r.push(t);if(Xc.debug(r.join(" ")),e.parents&&2==e.parents.length){const n=wf[e.parents[0]];Of(t,e,n),t.push(wf[e.parents[1]])}else{if(0==e.parents.length)return;{const n=wf[e.parents];Of(t,e,n)}}Bf(t=function(t,e){const n=Object.create(null);return t.reduce(((t,e)=>{const r=e.id;return n[r]||(n[r]=!0,t.push(e)),t}),[])}(t))}const If=function(){const t=Object.keys(wf).map((function(t){return wf[t]}));return t.forEach((function(t){Xc.debug(t.id)})),t.sort(((t,e)=>t.seq-e.seq)),t},Ff={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Rf={parseDirective:function(t,e,n){jk.parseDirective(this,t,e,n)},getConfig:()=>Mh().gitGraph,setDirection:function(t){Af=t},setOptions:function(t){Xc.debug("options str",t),t=(t=t&&t.trim())||"{}";try{Df=JSON.parse(t)}catch(t){Xc.error("error while parsing gitGraph options",t.message)}},getOptions:function(){return Df},commit:function(t,e,n,r){Xc.debug("Entering commit:",t,e,n,r),e=ol.sanitizeText(e,Mh()),t=ol.sanitizeText(t,Mh()),r=ol.sanitizeText(r,Mh());const i={id:e||Mf+"-"+Nf(),message:t,seq:Mf++,type:n||Ff.NORMAL,tag:r||"",parents:null==Tf?[]:[Tf.id],branch:Sf};Tf=i,wf[i.id]=i,Cf[Sf]=i.id,Xc.debug("in pushCommit "+i.id)},branch:function(t,e){if(t=ol.sanitizeText(t,Mh()),void 0!==Cf[t]){let e=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+t+'")');throw e.hash={text:"branch "+t,token:"branch "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+t+'"']},e}Cf[t]=null!=Tf?Tf.id:null,Ef[t]={name:t,order:e?parseInt(e,10):null},Lf(t),Xc.debug("in createBranch")},merge:function(t,e,n,r){t=ol.sanitizeText(t,Mh()),e=ol.sanitizeText(e,Mh());const i=wf[Cf[Sf]],a=wf[Cf[t]];if(Sf===t){let e=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},e}if(void 0===i||!i){let e=new Error('Incorrect usage of "merge". Current branch ('+Sf+")has no commits");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},e}if(void 0===Cf[t]){let e=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+t]},e}if(void 0===a||!a){let e=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},e}if(i===a){let e=new Error('Incorrect usage of "merge". Both branches have same head');throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},e}if(e&&void 0!==wf[e]){let i=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw i.hash={text:"merge "+t+e+n+r,token:"merge "+t+e+n+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+t+" "+e+"_UNIQUE "+n+" "+r]},i}const o={id:e||Mf+"-"+Nf(),message:"merged branch "+t+" into "+Sf,seq:Mf++,parents:[null==Tf?null:Tf.id,Cf[t]],branch:Sf,type:Ff.MERGE,customType:n,customId:!!e,tag:r||""};Tf=o,wf[o.id]=o,Cf[Sf]=o.id,Xc.debug(Cf),Xc.debug("in mergeBranch")},cherryPick:function(t,e,n){if(Xc.debug("Entering cherryPick:",t,e,n),t=ol.sanitizeText(t,Mh()),e=ol.sanitizeText(e,Mh()),n=ol.sanitizeText(n,Mh()),!t||void 0===wf[t]){let n=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw n.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},n}let r=wf[t],i=r.branch;if(r.type===Ff.MERGE){let n=new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');throw n.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},n}if(!e||void 0===wf[e]){if(i===Sf){let n=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw n.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},n}const a=wf[Cf[Sf]];if(void 0===a||!a){let n=new Error('Incorrect usage of "cherry-pick". Current branch ('+Sf+")has no commits");throw n.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},n}const o={id:Mf+"-"+Nf(),message:"cherry-picked "+r+" into "+Sf,seq:Mf++,parents:[null==Tf?null:Tf.id,r.id],branch:Sf,type:Ff.CHERRY_PICK,tag:null!=n?n:"cherry-pick:"+r.id};Tf=o,wf[o.id]=o,Cf[Sf]=o.id,Xc.debug(Cf),Xc.debug("in cherryPick")}},checkout:Lf,prettyPrint:function(){Xc.debug(wf),Bf([If()[0]])},clear:function(){wf={},Tf=null;let t=Mh().gitGraph.mainBranchName,e=Mh().gitGraph.mainBranchOrder;Cf={},Cf[t]=null,Ef={},Ef[t]={name:t,order:e},Sf=t,Mf=0,pf()},getBranchesAsObjArray:function(){return Object.values(Ef).map(((t,e)=>null!==t.order?t:{...t,order:parseFloat(`0.${e}`,10)})).sort(((t,e)=>t.order-e.order)).map((({name:t})=>({name:t})))},getBranches:function(){return Cf},getCommits:function(){return wf},getCommitsArray:If,getCurrentBranch:function(){return Sf},getDirection:function(){return Af},getHead:function(){return Tf},setAccTitle:gf,getAccTitle:yf,getAccDescription:bf,setAccDescription:mf,commitType:Ff};function Pf(t,e,n){if(void 0===e.insert)return;let r=t.getAccTitle(),i=t.getAccDescription();e.attr("role","img").attr("aria-labelledby","chart-title-"+n+" chart-desc-"+n),e.insert("desc",":first-child").attr("id","chart-desc-"+n).text(i),e.insert("title",":first-child").attr("id","chart-title-"+n).text(r)}let $f={};let jf={},Yf={},zf=[],Uf=0;const qf=(t,e,n)=>{const r=tf().gitGraph,i=t.append("g").attr("class","commit-bullets"),a=t.append("g").attr("class","commit-labels");let o=0;Object.keys(e).sort(((t,n)=>e[t].seq-e[n].seq)).forEach((t=>{const s=e[t],c=jf[s.branch].pos,l=o+10;if(n){let t,e=void 0!==s.customType&&""!==s.customType?s.customType:s.type;switch(e){case 0:default:t="commit-normal";break;case 1:t="commit-reverse";break;case 2:t="commit-highlight";break;case 3:t="commit-merge";break;case 4:t="commit-cherry-pick"}if(2===e){const e=i.append("rect");e.attr("x",l-10),e.attr("y",c-10),e.attr("height",20),e.attr("width",20),e.attr("class",`commit ${s.id} commit-highlight${jf[s.branch].index%8} ${t}-outer`),i.append("rect").attr("x",l-6).attr("y",c-6).attr("height",12).attr("width",12).attr("class",`commit ${s.id} commit${jf[s.branch].index%8} ${t}-inner`)}else if(4===e)i.append("circle").attr("cx",l).attr("cy",c).attr("r",10).attr("class",`commit ${s.id} ${t}`),i.append("circle").attr("cx",l-3).attr("cy",c+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${s.id} ${t}`),i.append("circle").attr("cx",l+3).attr("cy",c+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${s.id} ${t}`),i.append("line").attr("x1",l+3).attr("y1",c+1).attr("x2",l).attr("y2",c-5).attr("stroke","#fff").attr("class",`commit ${s.id} ${t}`),i.append("line").attr("x1",l-3).attr("y1",c+1).attr("x2",l).attr("y2",c-5).attr("stroke","#fff").attr("class",`commit ${s.id} ${t}`);else{const n=i.append("circle");if(n.attr("cx",l),n.attr("cy",c),n.attr("r",3===s.type?9:10),n.attr("class",`commit ${s.id} commit${jf[s.branch].index%8}`),3===e){const e=i.append("circle");e.attr("cx",l),e.attr("cy",c),e.attr("r",6),e.attr("class",`commit ${t} ${s.id} commit${jf[s.branch].index%8}`)}1===e&&i.append("path").attr("d",`M ${l-5},${c-5}L${l+5},${c+5}M${l-5},${c+5}L${l+5},${c-5}`).attr("class",`commit ${t} ${s.id} commit${jf[s.branch].index%8}`)}}if(Yf[s.id]={x:o+10,y:c},n){const t=4,e=2;if(4!==s.type&&(s.customId&&3===s.type||3!==s.type)&&r.showCommitLabel){const t=a.append("g"),n=t.insert("rect").attr("class","commit-label-bkg"),i=t.append("text").attr("x",o).attr("y",c+25).attr("class","commit-label").text(s.id);let l=i.node().getBBox();if(n.attr("x",o+10-l.width/2-e).attr("y",c+13.5).attr("width",l.width+2*e).attr("height",l.height+2*e),i.attr("x",o+10-l.width/2),r.rotateCommitLabel){let e=-7.5-(l.width+10)/25*9.5,n=10+l.width/25*8.5;t.attr("transform","translate("+e+", "+n+") rotate(-45, "+o+", "+c+")")}}if(s.tag){const n=a.insert("polygon"),r=a.append("circle"),i=a.append("text").attr("y",c-16).attr("class","tag-label").text(s.tag);let l=i.node().getBBox();i.attr("x",o+10-l.width/2);const u=l.height/2,h=c-19.2;n.attr("class","tag-label-bkg").attr("points",`\n ${o-l.width/2-t/2},${h+e}\n ${o-l.width/2-t/2},${h-e}\n ${o+10-l.width/2-t},${h-u-e}\n ${o+10+l.width/2+t},${h-u-e}\n ${o+10+l.width/2+t},${h+u+e}\n ${o+10-l.width/2-t},${h+u+e}`),r.attr("cx",o-l.width/2+t/2).attr("cy",h).attr("r",1.5).attr("class","tag-hole")}}o+=50,o>Uf&&(Uf=o)}))},Wf=(t,e,n)=>{const r=n||0,i=t+Math.abs(t-e)/2;if(r>5)return i;let a=!0;for(let t=0;t<zf.length;t++)Math.abs(zf[t]-i)<10&&(a=!1);if(a)return zf.push(i),i;const o=Math.abs(t-e);return Wf(t,e-o/5,r+1)},Hf={draw:function(t,e,n,r){jf={},Yf={},$f={},Uf=0,zf=[];const i=tf(),a=tf().gitGraph;Xc.debug("in gitgraph renderer",t+"\n","id:",e,n),$f=r.db.getCommits();const o=r.db.getBranchesAsObjArray();let s=0;o.forEach(((t,e)=>{jf[t.name]={pos:s,index:e},s+=50+(a.rotateCommitLabel?40:0)}));const c=Co(`[id="${e}"]`);Pf(r.db,c,e),qf(c,$f,!1),a.showBranches&&((t,e)=>{const n=tf().gitGraph,r=t.append("g");e.forEach(((t,e)=>{const i=e%8,a=jf[t.name].pos,o=r.append("line");o.attr("x1",0),o.attr("y1",a),o.attr("x2",Uf),o.attr("y2",a),o.attr("class","branch branch"+i),zf.push(a);const s=(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");let n=[];n="string"==typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(t)?t:[];for(let t=0;t<n.length;t++){const r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),r.setAttribute("class","row"),r.textContent=n[t].trim(),e.appendChild(r)}return e})(t.name),c=r.insert("rect"),l=r.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+i);l.node().appendChild(s);let u=s.getBBox();c.attr("class","branchLabelBkg label"+i).attr("rx",4).attr("ry",4).attr("x",-u.width-4-(!0===n.rotateCommitLabel?30:0)).attr("y",-u.height/2+8).attr("width",u.width+18).attr("height",u.height+4),l.attr("transform","translate("+(-u.width-14-(!0===n.rotateCommitLabel?30:0))+", "+(a-u.height/2-1)+")"),c.attr("transform","translate(-19, "+(a-u.height/2)+")")}))})(c,o),((t,e)=>{const n=t.append("g").attr("class","commit-arrows");Object.keys(e).forEach((t=>{const r=e[t];r.parents&&r.parents.length>0&&r.parents.forEach((t=>{((t,e,n,r)=>{const i=Yf[e.id],a=Yf[n.id],o=((t,e,n)=>Object.keys(n).filter((r=>n[r].branch===e.branch&&n[r].seq>t.seq&&n[r].seq<e.seq)).length>0)(e,n,r);let s,c="",l="",u=0,h=0,f=jf[n.branch].index;if(o){c="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",u=10,h=10,f=jf[n.branch].index;const t=i.y<a.y?Wf(i.y,a.y):Wf(a.y,i.y);s=i.y<a.y?`M ${i.x} ${i.y} L ${i.x} ${t-u} ${c} ${i.x+h} ${t} L ${a.x-u} ${t} ${l} ${a.x} ${t+h} L ${a.x} ${a.y}`:`M ${i.x} ${i.y} L ${i.x} ${t+u} ${l} ${i.x+h} ${t} L ${a.x-u} ${t} ${c} ${a.x} ${t-h} L ${a.x} ${a.y}`}else i.y<a.y&&(c="A 20 20, 0, 0, 0,",u=20,h=20,f=jf[n.branch].index,s=`M ${i.x} ${i.y} L ${i.x} ${a.y-u} ${c} ${i.x+h} ${a.y} L ${a.x} ${a.y}`),i.y>a.y&&(c="A 20 20, 0, 0, 0,",u=20,h=20,f=jf[e.branch].index,s=`M ${i.x} ${i.y} L ${a.x-u} ${i.y} ${c} ${a.x} ${i.y-h} L ${a.x} ${a.y}`),i.y===a.y&&(f=jf[e.branch].index,s=`M ${i.x} ${i.y} L ${i.x} ${a.y-u} ${c} ${i.x+h} ${a.y} L ${a.x} ${a.y}`);t.append("path").attr("d",s).attr("class","arrow arrow"+f%8)})(n,e[t],r,e)}))}))})(c,$f),qf(c,$f,!0),nf(void 0,c,a.diagramPadding,i.useMaxWidth)}},Vf=t=>`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0,1,2,3,4,5,6,7].map((e=>`\n .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; }\n .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }\n .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }\n .label${e} { fill: ${t["git"+e]}; }\n .arrow${e} { stroke: ${t["git"+e]}; }\n `)).join("\n")}\n\n .branch {\n stroke-width: 1;\n stroke: ${t.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n .commit-reverse {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n }\n`;var Gf=function(){var t,e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,6],r=[1,7],i=[1,8],a=[1,9],o=[1,16],s=[1,11],l=[1,12],u=[1,13],h=[1,14],f=[1,15],d=[1,27],p=[1,33],g=[1,34],y=[1,35],m=[1,36],b=[1,37],_=[1,72],v=[1,73],x=[1,74],k=[1,75],w=[1,76],T=[1,77],E=[1,78],C=[1,38],S=[1,39],A=[1,40],M=[1,41],N=[1,42],D=[1,43],L=[1,44],O=[1,45],B=[1,46],I=[1,47],F=[1,48],R=[1,49],P=[1,50],$=[1,51],j=[1,52],Y=[1,53],z=[1,54],U=[1,55],q=[1,56],W=[1,57],H=[1,59],V=[1,60],G=[1,61],X=[1,62],Z=[1,63],Q=[1,64],K=[1,65],J=[1,66],tt=[1,67],et=[1,68],nt=[1,69],rt=[24,52],it=[24,44,46,47,48,49,50,51,52,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],at=[15,24,44,46,47,48,49,50,51,52,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],ot=[1,94],st=[1,95],ct=[1,96],lt=[1,97],ut=[15,24,52],ht=[7,8,9,10,18,22,25,26,27,28],ft=[15,24,43,52],dt=[15,24,43,52,86,87,89,90],pt=[15,43],gt=[44,46,47,48,49,50,51,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],yt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,directive:6,direction_tb:7,direction_bt:8,direction_rl:9,direction_lr:10,graphConfig:11,openDirective:12,typeDirective:13,closeDirective:14,NEWLINE:15,":":16,argDirective:17,open_directive:18,type_directive:19,arg_directive:20,close_directive:21,C4_CONTEXT:22,statements:23,EOF:24,C4_CONTAINER:25,C4_COMPONENT:26,C4_DYNAMIC:27,C4_DEPLOYMENT:28,otherStatements:29,diagramStatements:30,otherStatement:31,title:32,accDescription:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,boundaryStatement:39,boundaryStartStatement:40,boundaryStopStatement:41,boundaryStart:42,LBRACE:43,ENTERPRISE_BOUNDARY:44,attributes:45,SYSTEM_BOUNDARY:46,BOUNDARY:47,CONTAINER_BOUNDARY:48,NODE:49,NODE_L:50,NODE_R:51,RBRACE:52,diagramStatement:53,PERSON:54,PERSON_EXT:55,SYSTEM:56,SYSTEM_DB:57,SYSTEM_QUEUE:58,SYSTEM_EXT:59,SYSTEM_EXT_DB:60,SYSTEM_EXT_QUEUE:61,CONTAINER:62,CONTAINER_DB:63,CONTAINER_QUEUE:64,CONTAINER_EXT:65,CONTAINER_EXT_DB:66,CONTAINER_EXT_QUEUE:67,COMPONENT:68,COMPONENT_DB:69,COMPONENT_QUEUE:70,COMPONENT_EXT:71,COMPONENT_EXT_DB:72,COMPONENT_EXT_QUEUE:73,REL:74,BIREL:75,REL_U:76,REL_D:77,REL_L:78,REL_R:79,REL_B:80,REL_INDEX:81,UPDATE_EL_STYLE:82,UPDATE_REL_STYLE:83,UPDATE_LAYOUT_CONFIG:84,attribute:85,STR:86,STR_KEY:87,STR_VALUE:88,ATTRIBUTE:89,ATTRIBUTE_EMPTY:90,$accept:0,$end:1},terminals_:{2:"error",7:"direction_tb",8:"direction_bt",9:"direction_rl",10:"direction_lr",15:"NEWLINE",16:":",18:"open_directive",19:"type_directive",20:"arg_directive",21:"close_directive",22:"C4_CONTEXT",24:"EOF",25:"C4_CONTAINER",26:"C4_COMPONENT",27:"C4_DYNAMIC",28:"C4_DEPLOYMENT",32:"title",33:"accDescription",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",43:"LBRACE",44:"ENTERPRISE_BOUNDARY",46:"SYSTEM_BOUNDARY",47:"BOUNDARY",48:"CONTAINER_BOUNDARY",49:"NODE",50:"NODE_L",51:"NODE_R",52:"RBRACE",54:"PERSON",55:"PERSON_EXT",56:"SYSTEM",57:"SYSTEM_DB",58:"SYSTEM_QUEUE",59:"SYSTEM_EXT",60:"SYSTEM_EXT_DB",61:"SYSTEM_EXT_QUEUE",62:"CONTAINER",63:"CONTAINER_DB",64:"CONTAINER_QUEUE",65:"CONTAINER_EXT",66:"CONTAINER_EXT_DB",67:"CONTAINER_EXT_QUEUE",68:"COMPONENT",69:"COMPONENT_DB",70:"COMPONENT_QUEUE",71:"COMPONENT_EXT",72:"COMPONENT_EXT_DB",73:"COMPONENT_EXT_QUEUE",74:"REL",75:"BIREL",76:"REL_U",77:"REL_D",78:"REL_L",79:"REL_R",80:"REL_B",81:"REL_INDEX",82:"UPDATE_EL_STYLE",83:"UPDATE_REL_STYLE",84:"UPDATE_LAYOUT_CONFIG",86:"STR",87:"STR_KEY",88:"STR_VALUE",89:"ATTRIBUTE",90:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[3,2],[5,1],[5,1],[5,1],[5,1],[4,1],[6,4],[6,6],[12,1],[13,1],[17,1],[14,1],[11,4],[11,4],[11,4],[11,4],[11,4],[23,1],[23,1],[23,2],[29,1],[29,2],[29,3],[31,1],[31,1],[31,2],[31,2],[31,1],[39,3],[40,3],[40,3],[40,4],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[41,1],[30,1],[30,2],[30,3],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,1],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[45,1],[45,2],[85,1],[85,2],[85,1],[85,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.setDirection("TB");break;case 5:r.setDirection("BT");break;case 6:r.setDirection("RL");break;case 7:r.setDirection("LR");break;case 11:r.parseDirective("%%{","open_directive");break;case 12:break;case 13:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 14:r.parseDirective("}%%","close_directive","c4Context");break;case 15:case 16:case 17:case 18:case 19:r.setC4Type(a[s-3]);break;case 26:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 27:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 28:this.$=a[s].trim(),r.setTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 35:case 36:a[s].splice(2,0,"ENTERPRISE"),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 37:r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 38:a[s].splice(2,0,"CONTAINER"),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 39:r.addDeploymentNode("node",...a[s]),this.$=a[s];break;case 40:r.addDeploymentNode("nodeL",...a[s]),this.$=a[s];break;case 41:r.addDeploymentNode("nodeR",...a[s]),this.$=a[s];break;case 42:r.popBoundaryParseStack();break;case 46:r.addPersonOrSystem("person",...a[s]),this.$=a[s];break;case 47:r.addPersonOrSystem("external_person",...a[s]),this.$=a[s];break;case 48:r.addPersonOrSystem("system",...a[s]),this.$=a[s];break;case 49:r.addPersonOrSystem("system_db",...a[s]),this.$=a[s];break;case 50:r.addPersonOrSystem("system_queue",...a[s]),this.$=a[s];break;case 51:r.addPersonOrSystem("external_system",...a[s]),this.$=a[s];break;case 52:r.addPersonOrSystem("external_system_db",...a[s]),this.$=a[s];break;case 53:r.addPersonOrSystem("external_system_queue",...a[s]),this.$=a[s];break;case 54:r.addContainer("container",...a[s]),this.$=a[s];break;case 55:r.addContainer("container_db",...a[s]),this.$=a[s];break;case 56:r.addContainer("container_queue",...a[s]),this.$=a[s];break;case 57:r.addContainer("external_container",...a[s]),this.$=a[s];break;case 58:r.addContainer("external_container_db",...a[s]),this.$=a[s];break;case 59:r.addContainer("external_container_queue",...a[s]),this.$=a[s];break;case 60:r.addComponent("component",...a[s]),this.$=a[s];break;case 61:r.addComponent("component_db",...a[s]),this.$=a[s];break;case 62:r.addComponent("component_queue",...a[s]),this.$=a[s];break;case 63:r.addComponent("external_component",...a[s]),this.$=a[s];break;case 64:r.addComponent("external_component_db",...a[s]),this.$=a[s];break;case 65:r.addComponent("external_component_queue",...a[s]),this.$=a[s];break;case 67:r.addRel("rel",...a[s]),this.$=a[s];break;case 68:r.addRel("birel",...a[s]),this.$=a[s];break;case 69:r.addRel("rel_u",...a[s]),this.$=a[s];break;case 70:r.addRel("rel_d",...a[s]),this.$=a[s];break;case 71:r.addRel("rel_l",...a[s]),this.$=a[s];break;case 72:r.addRel("rel_r",...a[s]),this.$=a[s];break;case 73:r.addRel("rel_b",...a[s]),this.$=a[s];break;case 74:a[s].splice(0,1),r.addRel("rel",...a[s]),this.$=a[s];break;case 75:r.updateElStyle("update_el_style",...a[s]),this.$=a[s];break;case 76:r.updateRelStyle("update_rel_style",...a[s]),this.$=a[s];break;case 77:r.updateLayoutConfig("update_layout_config",...a[s]),this.$=a[s];break;case 78:this.$=[a[s]];break;case 79:a[s].unshift(a[s-1]),this.$=a[s];break;case 80:case 82:this.$=a[s].trim();break;case 81:let t={};t[a[s-1].trim()]=a[s].trim(),this.$=t;break;case 83:this.$=""}},table:[{3:1,4:2,5:3,6:4,7:n,8:r,9:i,10:a,11:5,12:10,18:o,22:s,25:l,26:u,27:h,28:f},{1:[3]},{1:[2,1]},{1:[2,2]},{3:17,4:2,5:3,6:4,7:n,8:r,9:i,10:a,11:5,12:10,18:o,22:s,25:l,26:u,27:h,28:f},{1:[2,8]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{1:[2,7]},{13:18,19:[1,19]},{15:[1,20]},{15:[1,21]},{15:[1,22]},{15:[1,23]},{15:[1,24]},{19:[2,11]},{1:[2,3]},{14:25,16:[1,26],21:d},e([16,21],[2,12]),{23:28,29:29,30:30,31:31,32:p,33:g,34:y,36:m,38:b,39:58,40:70,42:71,44:_,46:v,47:x,48:k,49:w,50:T,51:E,53:32,54:C,55:S,56:A,57:M,58:N,59:D,60:L,61:O,62:B,63:I,64:F,65:R,66:P,67:$,68:j,69:Y,70:z,71:U,72:q,73:W,74:H,75:V,76:G,77:X,78:Z,79:Q,80:K,81:J,82:tt,83:et,84:nt},{23:79,29:29,30:30,31:31,32:p,33:g,34:y,36:m,38:b,39:58,40:70,42:71,44:_,46:v,47:x,48:k,49:w,50:T,51:E,53:32,54:C,55:S,56:A,57:M,58:N,59:D,60:L,61:O,62:B,63:I,64:F,65:R,66:P,67:$,68:j,69:Y,70:z,71:U,72:q,73:W,74:H,75:V,76:G,77:X,78:Z,79:Q,80:K,81:J,82:tt,83:et,84:nt},{23:80,29:29,30:30,31:31,32:p,33:g,34:y,36:m,38:b,39:58,40:70,42:71,44:_,46:v,47:x,48:k,49:w,50:T,51:E,53:32,54:C,55:S,56:A,57:M,58:N,59:D,60:L,61:O,62:B,63:I,64:F,65:R,66:P,67:$,68:j,69:Y,70:z,71:U,72:q,73:W,74:H,75:V,76:G,77:X,78:Z,79:Q,80:K,81:J,82:tt,83:et,84:nt},{23:81,29:29,30:30,31:31,32:p,33:g,34:y,36:m,38:b,39:58,40:70,42:71,44:_,46:v,47:x,48:k,49:w,50:T,51:E,53:32,54:C,55:S,56:A,57:M,58:N,59:D,60:L,61:O,62:B,63:I,64:F,65:R,66:P,67:$,68:j,69:Y,70:z,71:U,72:q,73:W,74:H,75:V,76:G,77:X,78:Z,79:Q,80:K,81:J,82:tt,83:et,84:nt},{23:82,29:29,30:30,31:31,32:p,33:g,34:y,36:m,38:b,39:58,40:70,42:71,44:_,46:v,47:x,48:k,49:w,50:T,51:E,53:32,54:C,55:S,56:A,57:M,58:N,59:D,60:L,61:O,62:B,63:I,64:F,65:R,66:P,67:$,68:j,69:Y,70:z,71:U,72:q,73:W,74:H,75:V,76:G,77:X,78:Z,79:Q,80:K,81:J,82:tt,83:et,84:nt},{15:[1,83]},{17:84,20:[1,85]},{15:[2,14]},{24:[1,86]},e(rt,[2,20],{53:32,39:58,40:70,42:71,30:87,44:_,46:v,47:x,48:k,49:w,50:T,51:E,54:C,55:S,56:A,57:M,58:N,59:D,60:L,61:O,62:B,63:I,64:F,65:R,66:P,67:$,68:j,69:Y,70:z,71:U,72:q,73:W,74:H,75:V,76:G,77:X,78:Z,79:Q,80:K,81:J,82:tt,83:et,84:nt}),e(rt,[2,21]),e(it,[2,23],{15:[1,88]}),e(rt,[2,43],{15:[1,89]}),e(at,[2,26]),e(at,[2,27]),{35:[1,90]},{37:[1,91]},e(at,[2,30]),{45:92,85:93,86:ot,87:st,89:ct,90:lt},{45:98,85:93,86:ot,87:st,89:ct,90:lt},{45:99,85:93,86:ot,87:st,89:ct,90:lt},{45:100,85:93,86:ot,87:st,89:ct,90:lt},{45:101,85:93,86:ot,87:st,89:ct,90:lt},{45:102,85:93,86:ot,87:st,89:ct,90:lt},{45:103,85:93,86:ot,87:st,89:ct,90:lt},{45:104,85:93,86:ot,87:st,89:ct,90:lt},{45:105,85:93,86:ot,87:st,89:ct,90:lt},{45:106,85:93,86:ot,87:st,89:ct,90:lt},{45:107,85:93,86:ot,87:st,89:ct,90:lt},{45:108,85:93,86:ot,87:st,89:ct,90:lt},{45:109,85:93,86:ot,87:st,89:ct,90:lt},{45:110,85:93,86:ot,87:st,89:ct,90:lt},{45:111,85:93,86:ot,87:st,89:ct,90:lt},{45:112,85:93,86:ot,87:st,89:ct,90:lt},{45:113,85:93,86:ot,87:st,89:ct,90:lt},{45:114,85:93,86:ot,87:st,89:ct,90:lt},{45:115,85:93,86:ot,87:st,89:ct,90:lt},{45:116,85:93,86:ot,87:st,89:ct,90:lt},e(ut,[2,66]),{45:117,85:93,86:ot,87:st,89:ct,90:lt},{45:118,85:93,86:ot,87:st,89:ct,90:lt},{45:119,85:93,86:ot,87:st,89:ct,90:lt},{45:120,85:93,86:ot,87:st,89:ct,90:lt},{45:121,85:93,86:ot,87:st,89:ct,90:lt},{45:122,85:93,86:ot,87:st,89:ct,90:lt},{45:123,85:93,86:ot,87:st,89:ct,90:lt},{45:124,85:93,86:ot,87:st,89:ct,90:lt},{45:125,85:93,86:ot,87:st,89:ct,90:lt},{45:126,85:93,86:ot,87:st,89:ct,90:lt},{45:127,85:93,86:ot,87:st,89:ct,90:lt},{30:128,39:58,40:70,42:71,44:_,46:v,47:x,48:k,49:w,50:T,51:E,53:32,54:C,55:S,56:A,57:M,58:N,59:D,60:L,61:O,62:B,63:I,64:F,65:R,66:P,67:$,68:j,69:Y,70:z,71:U,72:q,73:W,74:H,75:V,76:G,77:X,78:Z,79:Q,80:K,81:J,82:tt,83:et,84:nt},{15:[1,130],43:[1,129]},{45:131,85:93,86:ot,87:st,89:ct,90:lt},{45:132,85:93,86:ot,87:st,89:ct,90:lt},{45:133,85:93,86:ot,87:st,89:ct,90:lt},{45:134,85:93,86:ot,87:st,89:ct,90:lt},{45:135,85:93,86:ot,87:st,89:ct,90:lt},{45:136,85:93,86:ot,87:st,89:ct,90:lt},{45:137,85:93,86:ot,87:st,89:ct,90:lt},{24:[1,138]},{24:[1,139]},{24:[1,140]},{24:[1,141]},e(ht,[2,9]),{14:142,21:d},{21:[2,13]},{1:[2,15]},e(rt,[2,22]),e(it,[2,24],{31:31,29:143,32:p,33:g,34:y,36:m,38:b}),e(rt,[2,44],{29:29,30:30,31:31,53:32,39:58,40:70,42:71,23:144,32:p,33:g,34:y,36:m,38:b,44:_,46:v,47:x,48:k,49:w,50:T,51:E,54:C,55:S,56:A,57:M,58:N,59:D,60:L,61:O,62:B,63:I,64:F,65:R,66:P,67:$,68:j,69:Y,70:z,71:U,72:q,73:W,74:H,75:V,76:G,77:X,78:Z,79:Q,80:K,81:J,82:tt,83:et,84:nt}),e(at,[2,28]),e(at,[2,29]),e(ut,[2,46]),e(ft,[2,78],{85:93,45:145,86:ot,87:st,89:ct,90:lt}),e(dt,[2,80]),{88:[1,146]},e(dt,[2,82]),e(dt,[2,83]),e(ut,[2,47]),e(ut,[2,48]),e(ut,[2,49]),e(ut,[2,50]),e(ut,[2,51]),e(ut,[2,52]),e(ut,[2,53]),e(ut,[2,54]),e(ut,[2,55]),e(ut,[2,56]),e(ut,[2,57]),e(ut,[2,58]),e(ut,[2,59]),e(ut,[2,60]),e(ut,[2,61]),e(ut,[2,62]),e(ut,[2,63]),e(ut,[2,64]),e(ut,[2,65]),e(ut,[2,67]),e(ut,[2,68]),e(ut,[2,69]),e(ut,[2,70]),e(ut,[2,71]),e(ut,[2,72]),e(ut,[2,73]),e(ut,[2,74]),e(ut,[2,75]),e(ut,[2,76]),e(ut,[2,77]),{41:147,52:[1,148]},{15:[1,149]},{43:[1,150]},e(pt,[2,35]),e(pt,[2,36]),e(pt,[2,37]),e(pt,[2,38]),e(pt,[2,39]),e(pt,[2,40]),e(pt,[2,41]),{1:[2,16]},{1:[2,17]},{1:[2,18]},{1:[2,19]},{15:[1,151]},e(it,[2,25]),e(rt,[2,45]),e(ft,[2,79]),e(dt,[2,81]),e(ut,[2,31]),e(ut,[2,42]),e(gt,[2,32]),e(gt,[2,33],{15:[1,152]}),e(ht,[2,10]),e(gt,[2,34])],defaultActions:{2:[2,1],3:[2,2],5:[2,8],6:[2,4],7:[2,5],8:[2,6],9:[2,7],16:[2,11],17:[2,3],27:[2,14],85:[2,13],86:[2,15],138:[2,16],139:[2,17],140:[2,18],141:[2,19]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,f=a.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;a.push(y);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||d.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,v,x,k,w,T,E,C,S={};;){if(v=n[n.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null==_&&(_=b()),x=o[v]&&o[v][_]),void 0===x||!x.length||!x[0]){var A="";for(w in C=[],o[v])this.terminals_[w]&&w>u&&C.push("'"+this.terminals_[w]+"'");A=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:y,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+_);switch(x[0]){case 1:n.push(_),i.push(d.yytext),a.push(d.yylloc),n.push(x[1]),_=null,l=d.yyleng,s=d.yytext,c=d.yylineno,y=d.yylloc;break;case 2:if(T=this.productions_[x[1]][1],S.$=i[i.length-T],S._$={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},m&&(S._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[s,l,c,p.yy,x[1],i,a].concat(f))))return k;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[x[1]][0]),i.push(S.$),a.push(S._$),E=o[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0}},mt=(t={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,n=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 r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[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 n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;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,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,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[r]))&&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(){return this.next()||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,n,r){switch(n){case 0:return this.begin("open_directive"),18;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 10;case 5:return this.begin("type_directive"),19;case 6:return this.popState(),this.begin("arg_directive"),16;case 7:return this.popState(),this.popState(),21;case 8:return 20;case 9:return 32;case 10:return 33;case 11:return this.begin("acc_title"),34;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),36;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:case 78:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:case 21:case 75:break;case 19:c;break;case 20:return 15;case 22:return 22;case 23:return 25;case 24:return 26;case 25:return 27;case 26:return 28;case 27:return this.begin("person_ext"),55;case 28:return this.begin("person"),54;case 29:return this.begin("system_ext_queue"),61;case 30:return this.begin("system_ext_db"),60;case 31:return this.begin("system_ext"),59;case 32:return this.begin("system_queue"),58;case 33:return this.begin("system_db"),57;case 34:return this.begin("system"),56;case 35:return this.begin("boundary"),47;case 36:return this.begin("enterprise_boundary"),44;case 37:return this.begin("system_boundary"),46;case 38:return this.begin("container_ext_queue"),67;case 39:return this.begin("container_ext_db"),66;case 40:return this.begin("container_ext"),65;case 41:return this.begin("container_queue"),64;case 42:return this.begin("container_db"),63;case 43:return this.begin("container"),62;case 44:return this.begin("container_boundary"),48;case 45:return this.begin("component_ext_queue"),73;case 46:return this.begin("component_ext_db"),72;case 47:return this.begin("component_ext"),71;case 48:return this.begin("component_queue"),70;case 49:return this.begin("component_db"),69;case 50:return this.begin("component"),68;case 51:case 52:return this.begin("node"),49;case 53:return this.begin("node_l"),50;case 54:return this.begin("node_r"),51;case 55:return this.begin("rel"),74;case 56:return this.begin("birel"),75;case 57:case 58:return this.begin("rel_u"),76;case 59:case 60:return this.begin("rel_d"),77;case 61:case 62:return this.begin("rel_l"),78;case 63:case 64:return this.begin("rel_r"),79;case 65:return this.begin("rel_b"),80;case 66:return this.begin("rel_index"),81;case 67:return this.begin("update_el_style"),82;case 68:return this.begin("update_rel_style"),83;case 69:return this.begin("update_layout_config"),84;case 70:return"EOF_IN_STRUCT";case 71:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 72:this.begin("attribute");break;case 73:case 84:this.popState(),this.popState();break;case 74:case 76:return 90;case 77:this.begin("string");break;case 79:case 85:return"STR";case 80:this.begin("string_kv");break;case 81:return this.begin("string_kv_key"),"STR_KEY";case 82:this.popState(),this.begin("string_kv_value");break;case 83:return"STR_VALUE";case 86:return"LBRACE";case 87:return"RBRACE";case 88:return"SPACE";case 89:return"EOL";case 90:return 24}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},string_kv_value:{rules:[83,84],inclusive:!1},string_kv_key:{rules:[82],inclusive:!1},string_kv:{rules:[81],inclusive:!1},string:{rules:[78,79],inclusive:!1},attribute:{rules:[73,74,75,76,77,80,85],inclusive:!1},update_layout_config:{rules:[70,71,72,73],inclusive:!1},update_rel_style:{rules:[70,71,72,73],inclusive:!1},update_el_style:{rules:[70,71,72,73],inclusive:!1},rel_b:{rules:[70,71,72,73],inclusive:!1},rel_r:{rules:[70,71,72,73],inclusive:!1},rel_l:{rules:[70,71,72,73],inclusive:!1},rel_d:{rules:[70,71,72,73],inclusive:!1},rel_u:{rules:[70,71,72,73],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[70,71,72,73],inclusive:!1},node_r:{rules:[70,71,72,73],inclusive:!1},node_l:{rules:[70,71,72,73],inclusive:!1},node:{rules:[70,71,72,73],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[70,71,72,73],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[70,71,72,73],inclusive:!1},component_ext:{rules:[70,71,72,73],inclusive:!1},component_queue:{rules:[70,71,72,73],inclusive:!1},component_db:{rules:[70,71,72,73],inclusive:!1},component:{rules:[70,71,72,73],inclusive:!1},container_boundary:{rules:[70,71,72,73],inclusive:!1},container_ext_queue:{rules:[],inclusive:!1},container_ext_db:{rules:[70,71,72,73],inclusive:!1},container_ext:{rules:[70,71,72,73],inclusive:!1},container_queue:{rules:[70,71,72,73],inclusive:!1},container_db:{rules:[70,71,72,73],inclusive:!1},container:{rules:[70,71,72,73],inclusive:!1},birel:{rules:[70,71,72,73],inclusive:!1},system_boundary:{rules:[70,71,72,73],inclusive:!1},enterprise_boundary:{rules:[70,71,72,73],inclusive:!1},boundary:{rules:[70,71,72,73],inclusive:!1},system_ext_queue:{rules:[70,71,72,73],inclusive:!1},system_ext_db:{rules:[70,71,72,73],inclusive:!1},system_ext:{rules:[70,71,72,73],inclusive:!1},system_queue:{rules:[70,71,72,73],inclusive:!1},system_db:{rules:[70,71,72,73],inclusive:!1},system:{rules:[70,71,72,73],inclusive:!1},person_ext:{rules:[70,71,72,73],inclusive:!1},person:{rules:[70,71,72,73],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,86,87,88,89,90],inclusive:!0}}},t);function bt(){this.yy={}}return yt.lexer=mt,bt.prototype=yt,yt.Parser=bt,new bt}();Gf.parser=Gf;const Xf=t=>null!==t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/);let Zf=[],Qf=[""],Kf="global",Jf="",td=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],ed=[],nd="",rd=!1,id=4,ad=2;var od;const sd=function(t){return null==t?Zf:Zf.filter((e=>e.parentBoundary===t))},cd=function(){return rd},ld={addPersonOrSystem:function(t,e,n,r,i,a,o){if(null===e||null===n)return;let s={};const c=Zf.find((t=>t.alias===e));if(c&&e===c.alias?s=c:(s.alias=e,Zf.push(s)),s.label=null==n?{text:""}:{text:n},null==r)s.descr={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];s[t]={text:e}}else s.descr={text:r};if("object"==typeof i){let[t,e]=Object.entries(i)[0];s[t]=e}else s.sprite=i;if("object"==typeof a){let[t,e]=Object.entries(a)[0];s[t]=e}else s.tags=a;if("object"==typeof o){let[t,e]=Object.entries(o)[0];s[t]=e}else s.link=o;s.typeC4Shape={text:t},s.parentBoundary=Kf,s.wrap=cd()},addPersonOrSystemBoundary:function(t,e,n,r,i){if(null===t||null===e)return;let a={};const o=td.find((e=>e.alias===t));if(o&&t===o.alias?a=o:(a.alias=t,td.push(a)),a.label=null==e?{text:""}:{text:e},null==n)a.type={text:"system"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];a[t]={text:e}}else a.type={text:n};if("object"==typeof r){let[t,e]=Object.entries(r)[0];a[t]=e}else a.tags=r;if("object"==typeof i){let[t,e]=Object.entries(i)[0];a[t]=e}else a.link=i;a.parentBoundary=Kf,a.wrap=cd(),Jf=Kf,Kf=t,Qf.push(Jf)},addContainer:function(t,e,n,r,i,a,o,s){if(null===e||null===n)return;let c={};const l=Zf.find((t=>t.alias===e));if(l&&e===l.alias?c=l:(c.alias=e,Zf.push(c)),c.label=null==n?{text:""}:{text:n},null==r)c.techn={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];c[t]={text:e}}else c.techn={text:r};if(null==i)c.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.descr={text:i};if("object"==typeof a){let[t,e]=Object.entries(a)[0];c[t]=e}else c.sprite=a;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.tags=o;if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]=e}else c.link=s;c.wrap=cd(),c.typeC4Shape={text:t},c.parentBoundary=Kf},addContainerBoundary:function(t,e,n,r,i){if(null===t||null===e)return;let a={};const o=td.find((e=>e.alias===t));if(o&&t===o.alias?a=o:(a.alias=t,td.push(a)),a.label=null==e?{text:""}:{text:e},null==n)a.type={text:"container"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];a[t]={text:e}}else a.type={text:n};if("object"==typeof r){let[t,e]=Object.entries(r)[0];a[t]=e}else a.tags=r;if("object"==typeof i){let[t,e]=Object.entries(i)[0];a[t]=e}else a.link=i;a.parentBoundary=Kf,a.wrap=cd(),Jf=Kf,Kf=t,Qf.push(Jf)},addComponent:function(t,e,n,r,i,a,o,s){if(null===e||null===n)return;let c={};const l=Zf.find((t=>t.alias===e));if(l&&e===l.alias?c=l:(c.alias=e,Zf.push(c)),c.label=null==n?{text:""}:{text:n},null==r)c.techn={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];c[t]={text:e}}else c.techn={text:r};if(null==i)c.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.descr={text:i};if("object"==typeof a){let[t,e]=Object.entries(a)[0];c[t]=e}else c.sprite=a;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.tags=o;if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]=e}else c.link=s;c.wrap=cd(),c.typeC4Shape={text:t},c.parentBoundary=Kf},addDeploymentNode:function(t,e,n,r,i,a,o,s){if(null===e||null===n)return;let c={};const l=td.find((t=>t.alias===e));if(l&&e===l.alias?c=l:(c.alias=e,td.push(c)),c.label=null==n?{text:""}:{text:n},null==r)c.type={text:"node"};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];c[t]={text:e}}else c.type={text:r};if(null==i)c.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.descr={text:i};if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.tags=o;if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]=e}else c.link=s;c.nodeType=t,c.parentBoundary=Kf,c.wrap=cd(),Jf=Kf,Kf=e,Qf.push(Jf)},popBoundaryParseStack:function(){Kf=Jf,Qf.pop(),Jf=Qf.pop(),Qf.push(Jf)},addRel:function(t,e,n,r,i,a,o,s,c){if(null==t||null==e||null==n||null==r)return;let l={};const u=ed.find((t=>t.from===e&&t.to===n));if(u?l=u:ed.push(l),l.type=t,l.from=e,l.to=n,l.label={text:r},null==i)l.techn={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]={text:e}}else l.techn={text:i};if(null==a)l.descr={text:""};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];l[t]={text:e}}else l.descr={text:a};if("object"==typeof o){let[t,e]=Object.entries(o)[0];l[t]=e}else l.sprite=o;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.tags=s;if("object"==typeof c){let[t,e]=Object.entries(c)[0];l[t]=e}else l.link=c;l.wrap=cd()},updateElStyle:function(t,e,n,r,i,a,o,s,c,l,u){let h=Zf.find((t=>t.alias===e));if(void 0!==h||(h=td.find((t=>t.alias===e)),void 0!==h)){if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];h[t]=e}else h.bgColor=n;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];h[t]=e}else h.fontColor=r;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];h[t]=e}else h.borderColor=i;if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];h[t]=e}else h.shadowing=a;if(null!=o)if("object"==typeof o){let[t,e]=Object.entries(o)[0];h[t]=e}else h.shape=o;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];h[t]=e}else h.sprite=s;if(null!=c)if("object"==typeof c){let[t,e]=Object.entries(c)[0];h[t]=e}else h.techn=c;if(null!=l)if("object"==typeof l){let[t,e]=Object.entries(l)[0];h[t]=e}else h.legendText=l;if(null!=u)if("object"==typeof u){let[t,e]=Object.entries(u)[0];h[t]=e}else h.legendSprite=u}},updateRelStyle:function(t,e,n,r,i,a,o){const s=ed.find((t=>t.from===e&&t.to===n));if(void 0!==s){if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];s[t]=e}else s.textColor=r;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];s[t]=e}else s.lineColor=i;if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];s[t]=parseInt(e)}else s.offsetX=parseInt(a);if(null!=o)if("object"==typeof o){let[t,e]=Object.entries(o)[0];s[t]=parseInt(e)}else s.offsetY=parseInt(o)}},updateLayoutConfig:function(t,e,n){let r=id,i=ad;if("object"==typeof e){const t=Object.values(e)[0];r=parseInt(t)}else r=parseInt(e);if("object"==typeof n){const t=Object.values(n)[0];i=parseInt(t)}else i=parseInt(n);r>=1&&(id=r),i>=1&&(ad=i)},autoWrap:cd,setWrap:function(t){rd=t},getC4ShapeArray:sd,getC4Shape:function(t){return Zf.find((e=>e.alias===t))},getC4ShapeKeys:function(t){return Object.keys(sd(t))},getBoundarys:function(t){return null==t?td:td.filter((e=>e.parentBoundary===t))},getCurrentBoundaryParse:function(){return Kf},getParentBoundaryParse:function(){return Jf},getRels:function(){return ed},getTitle:function(){return nd},getC4Type:function(){return od},getC4ShapeInRow:function(){return id},getC4BoundaryInRow:function(){return ad},setAccTitle:gf,getAccTitle:yf,getAccDescription:bf,setAccDescription:mf,parseDirective:function(t,e,n){jk.parseDirective(this,t,e,n)},getConfig:()=>Mh().c4,clear:function(){Zf=[],td=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Jf="",Kf="global",Qf=[""],ed=[],Qf=[""],nd="",rd=!1,id=4,ad=2},LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:function(t){let e=tl(t,Mh());nd=e},setC4Type:function(t){let e=tl(t,Mh());od=e}},ud=function(t,e){const n=t.append("rect");if(n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),"undefined"!==e.attrs&&null!==e.attrs)for(let t in e.attrs)n.attr(t,e.attrs[t]);return"undefined"!==e.class&&n.attr("class",e.class),n},hd=function(){function t(t,e,n,i,a,o,s){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,c){const{fontSize:l,fontFamily:u,fontWeight:h}=c,f=t.split(ol.lineBreakRegex);for(let t=0;t<f.length;t++){const o=t*l-l*(f.length-1)/2,c=e.append("text").attr("x",n+a/2).attr("y",i).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",l).style("font-weight",h).style("font-family",u);c.append("tspan").attr("dy",o).text(f[t]).attr("alignment-baseline","mathematical"),r(c,s)}}function n(t,n,i,a,o,s,c,l){const u=n.append("switch"),h=u.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,u,i,a,o,0,c,l),r(h,c)}function r(t,e){for(const n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),fd=function(t,e,n){let r=e.bgColor?e.bgColor:n[e.typeC4Shape.text+"_bg_color"],a=e.borderColor?e.borderColor:n[e.typeC4Shape.text+"_border_color"],o=e.fontColor?e.fontColor:"#FFFFFF",s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}const c=t.append("g");c.attr("class","person-man");const l={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=e.x,l.y=e.y,l.fill=r,l.width=e.width,l.height=e.height,l.style="stroke:"+a+";stroke-width:0.5;",l.rx=2.5,l.ry=2.5,ud(c,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":c.append("path").attr("fill",r).attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),c.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":c.append("path").attr("fill",r).attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),c.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}let u=(h=n,f=e.typeC4Shape.text,{fontFamily:h[f+"FontFamily"],fontSize:h[f+"FontSize"],fontWeight:h[f+"FontWeight"]});var h,f;switch(c.append("text").attr("fill",o).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":!function(t,e,n,r,a,o){const s=t.append("image");s.attr("width",e),s.attr("height",n),s.attr("x",r),s.attr("y",a);let c=o.startsWith("data:image/png;base64")?o:(0,i.N)(o);s.attr("xlink:href",c)}(c,48,48,e.x+e.width/2-24,e.y+e.image.Y,s)}let d=n[e.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=o,hd(n)(e.label.text,c,e.x,e.y+e.label.Y,e.width,e.height,{fill:o},d),d=n[e.typeC4Shape.text+"Font"](),d.fontColor=o,e.thchn&&""!==e.thchn.text?hd(n)(e.thchn.text,c,e.x,e.y+e.thchn.Y,e.width,e.height,{fill:o,"font-style":"italic"},d):e.type&&""!==e.type.text&&hd(n)(e.type.text,c,e.x,e.y+e.type.Y,e.width,e.height,{fill:o,"font-style":"italic"},d),e.descr&&""!==e.descr.text&&(d=n.personFont(),d.fontColor=o,hd(n)(e.descr.text,c,e.x,e.y+e.descr.Y,e.width,e.height,{fill:o},d)),e.height};i.N;let dd=0,pd=0,gd=4,yd=2;Gf.yy=ld;let md={};class bd{constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,_d(t.db.getConfig())}setData(t,e,n,r){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=r}updateVal(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+2*t.margin,n=e+t.width,r=this.nextData.starty+2*t.margin,i=r+t.height;(e>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>gd)&&(e=this.nextData.startx+t.margin+md.nextLinePaddingX,r=this.nextData.stopy+2*t.margin,this.nextData.stopx=n=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=r+t.height,this.nextData.cnt=1),t.x=e,t.y=r,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",r,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",r,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},_d(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}}const _d=function(t){Tl(md,t),t.fontFamily&&(md.personFontFamily=md.systemFontFamily=md.messageFontFamily=t.fontFamily),t.fontSize&&(md.personFontSize=md.systemFontSize=md.messageFontSize=t.fontSize),t.fontWeight&&(md.personFontWeight=md.systemFontWeight=md.messageFontWeight=t.fontWeight)},vd=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),xd=t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight});function kd(t,e,n,r,i){if(!e[t].width)if(n)e[t].text=uh(e[t].text,i,r),e[t].textLines=e[t].text.split(ol.lineBreakRegex).length,e[t].width=i,e[t].height=fh(e[t].text,r);else{let n=e[t].text.split(ol.lineBreakRegex);e[t].textLines=n.length;let i=0;e[t].height=0,e[t].width=0;for(let a=0;a<n.length;a++)e[t].width=Math.max(dh(n[a],r),e[t].width),i=fh(n[a],r),e[t].height=e[t].height+i}}const wd=function(t,e,n){e.x=n.data.startx,e.y=n.data.starty,e.width=n.data.stopx-n.data.startx,e.height=n.data.stopy-n.data.starty,e.label.y=md.c4ShapeMargin-35;let r=e.wrap&&md.wrap,i=xd(md);i.fontSize=i.fontSize+2,i.fontWeight="bold",kd("label",e,r,i,dh(e.label.text,i)),function(t,e,n){const r=t.append("g");let i=e.bgColor?e.bgColor:"none",a=e.borderColor?e.borderColor:"#444444",o=e.fontColor?e.fontColor:"black",s={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(s={"stroke-width":1});let c={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:s};ud(r,c);let l=n.boundaryFont();l.fontWeight="bold",l.fontSize=l.fontSize+2,l.fontColor=o,hd(n)(e.label.text,r,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},l),e.type&&""!==e.type.text&&(l=n.boundaryFont(),l.fontColor=o,hd(n)(e.type.text,r,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},l)),e.descr&&""!==e.descr.text&&(l=n.boundaryFont(),l.fontSize=l.fontSize-2,l.fontColor=o,hd(n)(e.descr.text,r,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},l))}(t,e,md)},Td=function(t,e,n,r){let i=0;for(let a=0;a<r.length;a++){i=0;const o=n[r[a]];let s=vd(md,o.typeC4Shape.text);switch(s.fontSize=s.fontSize-2,o.typeC4Shape.width=dh("<<"+o.typeC4Shape.text+">>",s),o.typeC4Shape.height=s.fontSize+2,o.typeC4Shape.Y=md.c4ShapePadding,i=o.typeC4Shape.Y+o.typeC4Shape.height-4,o.image={width:0,height:0,Y:0},o.typeC4Shape.text){case"person":case"external_person":o.image.width=48,o.image.height=48,o.image.Y=i,i=o.image.Y+o.image.height}o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=i,i=o.image.Y+o.image.height);let c=o.wrap&&md.wrap,l=md.width-2*md.c4ShapePadding,u=vd(md,o.typeC4Shape.text);u.fontSize=u.fontSize+2,u.fontWeight="bold",kd("label",o,c,u,l),o.label.Y=i+8,i=o.label.Y+o.label.height,o.type&&""!==o.type.text?(o.type.text="["+o.type.text+"]",kd("type",o,c,vd(md,o.typeC4Shape.text),l),o.type.Y=i+5,i=o.type.Y+o.type.height):o.techn&&""!==o.techn.text&&(o.techn.text="["+o.techn.text+"]",kd("techn",o,c,vd(md,o.techn.text),l),o.techn.Y=i+5,i=o.techn.Y+o.techn.height);let h=i,f=o.label.width;o.descr&&""!==o.descr.text&&(kd("descr",o,c,vd(md,o.typeC4Shape.text),l),o.descr.Y=i+20,i=o.descr.Y+o.descr.height,f=Math.max(o.label.width,o.descr.width),h=i-5*o.descr.textLines),f+=md.c4ShapePadding,o.width=Math.max(o.width||md.width,f,md.width),o.height=Math.max(o.height||md.height,h,md.height),o.margin=o.margin||md.c4ShapeMargin,t.insert(o),fd(e,o,md)}t.bumpLastMargin(md.c4ShapeMargin)};class Ed{constructor(t,e){this.x=t,this.y=e}}let Cd=function(t,e){let n=t.x,r=t.y,i=e.x,a=e.y,o=n+t.width/2,s=r+t.height/2,c=Math.abs(n-i),l=Math.abs(r-a),u=l/c,h=t.height/t.width,f=null;return r==a&&n<i?f=new Ed(n+t.width,s):r==a&&n>i?f=new Ed(n,s):n==i&&r<a?f=new Ed(o,r+t.height):n==i&&r>a&&(f=new Ed(o,r)),n>i&&r<a?f=h>=u?new Ed(n,s+u*t.width/2):new Ed(o-c/l*t.height/2,r+t.height):n<i&&r<a?f=h>=u?new Ed(n+t.width,s+u*t.width/2):new Ed(o+c/l*t.height/2,r+t.height):n<i&&r>a?f=h>=u?new Ed(n+t.width,s-u*t.width/2):new Ed(o+t.height/2*c/l,r):n>i&&r>a&&(f=h>=u?new Ed(n,s-t.width/2*u):new Ed(o-t.height/2*c/l,r)),f},Sd=function(t,e){let n={x:0,y:0};n.x=e.x+e.width/2,n.y=e.y+e.height/2;let r=Cd(t,n);return n.x=t.x+t.width/2,n.y=t.y+t.height/2,{startPoint:r,endPoint:Cd(e,n)}};function Ad(t,e,n,r,i){let a=new bd(i);a.data.widthLimit=n.data.widthLimit/Math.min(yd,r.length);for(let o=0;o<r.length;o++){let s=r[o],c=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=c,c=s.image.Y+s.image.height);let l=s.wrap&&md.wrap,u=xd(md);if(u.fontSize=u.fontSize+2,u.fontWeight="bold",kd("label",s,l,u,a.data.widthLimit),s.label.Y=c+8,c=s.label.Y+s.label.height,s.type&&""!==s.type.text&&(s.type.text="["+s.type.text+"]",kd("type",s,l,xd(md),a.data.widthLimit),s.type.Y=c+5,c=s.type.Y+s.type.height),s.descr&&""!==s.descr.text){let t=xd(md);t.fontSize=t.fontSize-2,kd("descr",s,l,t,a.data.widthLimit),s.descr.Y=c+20,c=s.descr.Y+s.descr.height}if(0==o||o%yd==0){let t=n.data.startx+md.diagramMarginX,e=n.data.stopy+md.diagramMarginY+c;a.setData(t,t,e,e)}else{let t=a.data.stopx!==a.data.startx?a.data.stopx+md.diagramMarginX:a.data.startx,e=a.data.starty;a.setData(t,t,e,e)}a.name=s.alias;let h=i.db.getC4ShapeArray(s.alias),f=i.db.getC4ShapeKeys(s.alias);f.length>0&&Td(a,t,h,f),e=s.alias;let d=i.db.getBoundarys(e);d.length>0&&Ad(t,e,a,d,i),"global"!==s.alias&&wd(t,s,a),n.data.stopy=Math.max(a.data.stopy+md.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(a.data.stopx+md.c4ShapeMargin,n.data.stopx),dd=Math.max(dd,n.data.stopx),pd=Math.max(pd,n.data.stopy)}}const Md={drawPersonOrSystemArray:Td,drawBoundary:wd,setConf:_d,draw:function(t,e,n,r){md=Mh().c4;const i=Mh().securityLevel;let a;"sandbox"===i&&(a=Co("#i"+e));const o=Co("sandbox"===i?a.nodes()[0].contentDocument.body:"body");let s=r.db;r.db.setWrap(md.wrap),gd=s.getC4ShapeInRow(),yd=s.getC4BoundaryInRow(),Xc.debug(`C:${JSON.stringify(md,null,2)}`);const c="sandbox"===i?o.select(`[id="${e}"]`):Co(`[id="${e}"]`);c.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z"),function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")}(c),function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")}(c);let l=new bd(r);l.setData(md.diagramMarginX,md.diagramMarginX,md.diagramMarginY,md.diagramMarginY),l.data.widthLimit=screen.availWidth,dd=md.diagramMarginX,pd=md.diagramMarginY;const u=r.db.getTitle();Ad(c,"",l,r.db.getBoundarys(""),r),function(t){t.append("defs").append("marker").attr("id","arrowhead").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")}(c),function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")}(c),function(t){const 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")}(c),function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).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")}(c),function(t,e,n,r){let i=0;for(let t of e){i+=1;let e=t.wrap&&md.wrap,o={fontFamily:(a=md).messageFontFamily,fontSize:a.messageFontSize,fontWeight:a.messageFontWeight};"C4Dynamic"===r.db.getC4Type()&&(t.label.text=i+": "+t.label.text);let s=dh(t.label.text,o);kd("label",t,e,o,s),t.techn&&""!==t.techn.text&&(s=dh(t.techn.text,o),kd("techn",t,e,o,s)),t.descr&&""!==t.descr.text&&(s=dh(t.descr.text,o),kd("descr",t,e,o,s));let c=n(t.from),l=n(t.to),u=Sd(c,l);t.startPoint=u.startPoint,t.endPoint=u.endPoint}var a;((t,e,n)=>{const r=t.append("g");let i=0;for(let t of e){let e=t.textColor?t.textColor:"#444444",a=t.lineColor?t.lineColor:"#444444",o=t.offsetX?parseInt(t.offsetX):0,s=t.offsetY?parseInt(t.offsetY):0,c="";if(0===i){let e=r.append("line");e.attr("x1",t.startPoint.x),e.attr("y1",t.startPoint.y),e.attr("x2",t.endPoint.x),e.attr("y2",t.endPoint.y),e.attr("stroke-width","1"),e.attr("stroke",a),e.style("fill","none"),"rel_b"!==t.type&&e.attr("marker-end","url("+c+"#arrowhead)"),"birel"!==t.type&&"rel_b"!==t.type||e.attr("marker-start","url("+c+"#arrowend)"),i=-1}else{let e=r.append("path");e.attr("fill","none").attr("stroke-width","1").attr("stroke",a).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",t.startPoint.x).replaceAll("starty",t.startPoint.y).replaceAll("controlx",t.startPoint.x+(t.endPoint.x-t.startPoint.x)/2-(t.endPoint.x-t.startPoint.x)/4).replaceAll("controly",t.startPoint.y+(t.endPoint.y-t.startPoint.y)/2).replaceAll("stopx",t.endPoint.x).replaceAll("stopy",t.endPoint.y)),"rel_b"!==t.type&&e.attr("marker-end","url("+c+"#arrowhead)"),"birel"!==t.type&&"rel_b"!==t.type||e.attr("marker-start","url("+c+"#arrowend)")}let l=n.messageFont();hd(n)(t.label.text,r,Math.min(t.startPoint.x,t.endPoint.x)+Math.abs(t.endPoint.x-t.startPoint.x)/2+o,Math.min(t.startPoint.y,t.endPoint.y)+Math.abs(t.endPoint.y-t.startPoint.y)/2+s,t.label.width,t.label.height,{fill:e},l),t.techn&&""!==t.techn.text&&(l=n.messageFont(),hd(n)("["+t.techn.text+"]",r,Math.min(t.startPoint.x,t.endPoint.x)+Math.abs(t.endPoint.x-t.startPoint.x)/2+o,Math.min(t.startPoint.y,t.endPoint.y)+Math.abs(t.endPoint.y-t.startPoint.y)/2+n.messageFontSize+5+s,Math.max(t.label.width,t.techn.width),t.techn.height,{fill:e,"font-style":"italic"},l))}})(t,e,md)}(c,r.db.getRels(),r.db.getC4Shape,r),l.data.stopx=dd,l.data.stopy=pd;const h=l.data;let f=h.stopy-h.starty+2*md.diagramMarginY;const d=h.stopx-h.startx+2*md.diagramMarginX;u&&c.append("text").text(u).attr("x",(h.stopx-h.startx)/2-4*md.diagramMarginX).attr("y",h.starty+md.diagramMarginY),Fh(c,0,d,md.useMaxWidth);const p=u?60:0;c.attr("viewBox",h.startx-md.diagramMarginX+" -"+(md.diagramMarginY+p)+" "+d+" "+(f+p)),Pf(Gf.yy,c,e),Xc.debug("models:",h)}};var Nd=function(){var t,e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,3],r=[1,7],i=[1,8],a=[1,9],o=[1,10],s=[1,13],c=[1,12],l=[1,16,25],u=[1,20],h=[1,31],f=[1,32],d=[1,33],p=[1,35],g=[1,38],y=[1,36],m=[1,37],b=[1,39],_=[1,40],v=[1,41],x=[1,42],k=[1,45],w=[1,46],T=[1,47],E=[1,48],C=[16,25],S=[1,62],A=[1,63],M=[1,64],N=[1,65],D=[1,66],L=[1,67],O=[1,68],B=[16,25,32,44,45,53,56,57,58,59,60,61,62,67,69],I=[16,25,30,32,44,45,49,53,56,57,58,59,60,61,62,67,69,84,85,86,87],F=[5,8,9,10,11,16,19,23,25],R=[53,84,85,86,87],P=[53,61,62,84,85,86,87],$=[53,56,57,58,59,60,84,85,86,87],j=[16,25,32],Y=[1,100],z={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statments:5,direction:6,directive:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,":":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,statements:24,EOF:25,statement:26,className:27,alphaNumToken:28,classLiteralName:29,GENERICTYPE:30,relationStatement:31,LABEL:32,classStatement:33,methodStatement:34,annotationStatement:35,clickStatement:36,cssClassStatement:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,CLASS:43,STYLE_SEPARATOR:44,STRUCT_START:45,members:46,STRUCT_STOP:47,ANNOTATION_START:48,ANNOTATION_END:49,MEMBER:50,SEPARATOR:51,relation:52,STR:53,relationType:54,lineType:55,AGGREGATION:56,EXTENSION:57,COMPOSITION:58,DEPENDENCY:59,LOLLIPOP:60,LINE:61,DOTTED_LINE:62,CALLBACK:63,LINK:64,LINK_TARGET:65,CLICK:66,CALLBACK_NAME:67,CALLBACK_ARGS:68,HREF:69,CSSCLASS:70,commentToken:71,textToken:72,graphCodeTokens:73,textNoTagsToken:74,TAGSTART:75,TAGEND:76,"==":77,"--":78,PCT:79,DEFAULT:80,SPACE:81,MINUS:82,keywords:83,UNICODE_TEXT:84,NUM:85,ALPHA:86,BQUOTE_STR:87,$accept:0,$end:1},terminals_:{2:"error",5:"statments",8:"direction_tb",9:"direction_bt",10:"direction_rl",11:"direction_lr",16:"NEWLINE",17:":",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",23:"CLASS_DIAGRAM",25:"EOF",30:"GENERICTYPE",32:"LABEL",38:"acc_title",39:"acc_title_value",40:"acc_descr",41:"acc_descr_value",42:"acc_descr_multiline_value",43:"CLASS",44:"STYLE_SEPARATOR",45:"STRUCT_START",47:"STRUCT_STOP",48:"ANNOTATION_START",49:"ANNOTATION_END",50:"MEMBER",51:"SEPARATOR",53:"STR",56:"AGGREGATION",57:"EXTENSION",58:"COMPOSITION",59:"DEPENDENCY",60:"LOLLIPOP",61:"LINE",62:"DOTTED_LINE",63:"CALLBACK",64:"LINK",65:"LINK_TARGET",66:"CLICK",67:"CALLBACK_NAME",68:"CALLBACK_ARGS",69:"HREF",70:"CSSCLASS",73:"graphCodeTokens",75:"TAGSTART",76:"TAGEND",77:"==",78:"--",79:"PCT",80:"DEFAULT",81:"SPACE",82:"MINUS",83:"keywords",84:"UNICODE_TEXT",85:"NUM",86:"ALPHA",87:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[3,1],[3,2],[6,1],[6,1],[6,1],[6,1],[4,1],[7,4],[7,6],[13,1],[14,1],[18,1],[15,1],[12,4],[24,1],[24,2],[24,3],[27,1],[27,1],[27,2],[27,2],[27,2],[26,1],[26,2],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,2],[26,2],[26,1],[33,2],[33,4],[33,5],[33,7],[35,4],[46,1],[46,2],[34,1],[34,2],[34,1],[34,1],[31,3],[31,4],[31,4],[31,5],[52,3],[52,2],[52,2],[52,1],[54,1],[54,1],[54,1],[54,1],[54,1],[55,1],[55,1],[36,3],[36,4],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[37,3],[71,1],[71,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[74,1],[74,1],[74,1],[74,1],[28,1],[28,1],[28,1],[29,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.setDirection("TB");break;case 6:r.setDirection("BT");break;case 7:r.setDirection("RL");break;case 8:r.setDirection("LR");break;case 12:r.parseDirective("%%{","open_directive");break;case 13:r.parseDirective(a[s],"type_directive");break;case 14:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 15:r.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=a[s];break;case 22:this.$=a[s-1]+a[s];break;case 23:case 24:this.$=a[s-1]+"~"+a[s];break;case 25:r.addRelation(a[s]);break;case 26:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 34:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 35:case 36:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 37:r.addClass(a[s]);break;case 38:r.addClass(a[s-2]),r.setCssClass(a[s-2],a[s]);break;case 39:r.addClass(a[s-3]),r.addMembers(a[s-3],a[s-1]);break;case 40:r.addClass(a[s-5]),r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 41:r.addAnnotation(a[s],a[s-2]);break;case 42:this.$=[a[s]];break;case 43:a[s].push(a[s-1]),this.$=a[s];break;case 44:case 46:case 47:break;case 45:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 48:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 49:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:"none"};break;case 50:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:"none",relationTitle2:a[s-1]};break;case 51:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 52:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 53:this.$={type1:"none",type2:a[s],lineType:a[s-1]};break;case 54:this.$={type1:a[s-1],type2:"none",lineType:a[s]};break;case 55:this.$={type1:"none",type2:"none",lineType:a[s]};break;case 56:this.$=r.relationType.AGGREGATION;break;case 57:this.$=r.relationType.EXTENSION;break;case 58:this.$=r.relationType.COMPOSITION;break;case 59:this.$=r.relationType.DEPENDENCY;break;case 60:this.$=r.relationType.LOLLIPOP;break;case 61:this.$=r.lineType.LINE;break;case 62:this.$=r.lineType.DOTTED_LINE;break;case 63:case 69:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 64:case 70:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 65:case 73:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 66:case 74:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 67:case 75:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 68:case 76:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 71:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 72:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 77:r.setCssClass(a[s-1],a[s])}},table:[{3:1,4:2,5:n,6:4,7:5,8:r,9:i,10:a,11:o,12:6,13:11,19:s,23:c},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{3:14,4:2,5:n,6:4,7:5,8:r,9:i,10:a,11:o,12:6,13:11,19:s,23:c},{1:[2,9]},e(l,[2,5]),e(l,[2,6]),e(l,[2,7]),e(l,[2,8]),{14:15,20:[1,16]},{16:[1,17]},{20:[2,12]},{1:[2,4]},{15:18,17:[1,19],22:u},e([17,22],[2,13]),{6:30,7:29,8:r,9:i,10:a,11:o,13:11,19:s,24:21,26:22,27:34,28:43,29:44,31:23,33:24,34:25,35:26,36:27,37:28,38:h,40:f,42:d,43:p,48:g,50:y,51:m,63:b,64:_,66:v,70:x,84:k,85:w,86:T,87:E},{16:[1,49]},{18:50,21:[1,51]},{16:[2,15]},{25:[1,52]},{16:[1,53],25:[2,17]},e(C,[2,25],{32:[1,54]}),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,30]),e(C,[2,31]),e(C,[2,32]),e(C,[2,33]),{39:[1,55]},{41:[1,56]},e(C,[2,36]),e(C,[2,44],{52:57,54:60,55:61,32:[1,59],53:[1,58],56:S,57:A,58:M,59:N,60:D,61:L,62:O}),{27:69,28:43,29:44,84:k,85:w,86:T,87:E},e(C,[2,46]),e(C,[2,47]),{28:70,84:k,85:w,86:T},{27:71,28:43,29:44,84:k,85:w,86:T,87:E},{27:72,28:43,29:44,84:k,85:w,86:T,87:E},{27:73,28:43,29:44,84:k,85:w,86:T,87:E},{53:[1,74]},e(B,[2,20],{28:43,29:44,27:75,30:[1,76],84:k,85:w,86:T,87:E}),e(B,[2,21],{30:[1,77]}),e(I,[2,91]),e(I,[2,92]),e(I,[2,93]),e([16,25,30,32,44,45,53,56,57,58,59,60,61,62,67,69],[2,94]),e(F,[2,10]),{15:78,22:u},{22:[2,14]},{1:[2,16]},{6:30,7:29,8:r,9:i,10:a,11:o,13:11,19:s,24:79,25:[2,18],26:22,27:34,28:43,29:44,31:23,33:24,34:25,35:26,36:27,37:28,38:h,40:f,42:d,43:p,48:g,50:y,51:m,63:b,64:_,66:v,70:x,84:k,85:w,86:T,87:E},e(C,[2,26]),e(C,[2,34]),e(C,[2,35]),{27:80,28:43,29:44,53:[1,81],84:k,85:w,86:T,87:E},{52:82,54:60,55:61,56:S,57:A,58:M,59:N,60:D,61:L,62:O},e(C,[2,45]),{55:83,61:L,62:O},e(R,[2,55],{54:84,56:S,57:A,58:M,59:N,60:D}),e(P,[2,56]),e(P,[2,57]),e(P,[2,58]),e(P,[2,59]),e(P,[2,60]),e($,[2,61]),e($,[2,62]),e(C,[2,37],{44:[1,85],45:[1,86]}),{49:[1,87]},{53:[1,88]},{53:[1,89]},{67:[1,90],69:[1,91]},{28:92,84:k,85:w,86:T},e(B,[2,22]),e(B,[2,23]),e(B,[2,24]),{16:[1,93]},{25:[2,19]},e(j,[2,48]),{27:94,28:43,29:44,84:k,85:w,86:T,87:E},{27:95,28:43,29:44,53:[1,96],84:k,85:w,86:T,87:E},e(R,[2,54],{54:97,56:S,57:A,58:M,59:N,60:D}),e(R,[2,53]),{28:98,84:k,85:w,86:T},{46:99,50:Y},{27:101,28:43,29:44,84:k,85:w,86:T,87:E},e(C,[2,63],{53:[1,102]}),e(C,[2,65],{53:[1,104],65:[1,103]}),e(C,[2,69],{53:[1,105],68:[1,106]}),e(C,[2,73],{53:[1,108],65:[1,107]}),e(C,[2,77]),e(F,[2,11]),e(j,[2,50]),e(j,[2,49]),{27:109,28:43,29:44,84:k,85:w,86:T,87:E},e(R,[2,52]),e(C,[2,38],{45:[1,110]}),{47:[1,111]},{46:112,47:[2,42],50:Y},e(C,[2,41]),e(C,[2,64]),e(C,[2,66]),e(C,[2,67],{65:[1,113]}),e(C,[2,70]),e(C,[2,71],{53:[1,114]}),e(C,[2,74]),e(C,[2,75],{65:[1,115]}),e(j,[2,51]),{46:116,50:Y},e(C,[2,39]),{47:[2,43]},e(C,[2,68]),e(C,[2,72]),e(C,[2,76]),{47:[1,117]},e(C,[2,40])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],6:[2,9],13:[2,12],14:[2,4],20:[2,15],51:[2,14],52:[2,16],79:[2,19],112:[2,43]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,f=a.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;a.push(y);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||d.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,v,x,k,w,T,E,C,S={};;){if(v=n[n.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null==_&&(_=b()),x=o[v]&&o[v][_]),void 0===x||!x.length||!x[0]){var A="";for(w in C=[],o[v])this.terminals_[w]&&w>u&&C.push("'"+this.terminals_[w]+"'");A=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:y,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+_);switch(x[0]){case 1:n.push(_),i.push(d.yytext),a.push(d.yylloc),n.push(x[1]),_=null,l=d.yyleng,s=d.yytext,c=d.yylineno,y=d.yylloc;break;case 2:if(T=this.productions_[x[1]][1],S.$=i[i.length-T],S._$={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},m&&(S._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[s,l,c,p.yy,x[1],i,a].concat(f))))return k;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[x[1]][0]),i.push(S.$),a.push(S._$),E=o[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0}},U=(t={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,n=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 r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[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 n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;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,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,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[r]))&&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(){return this.next()||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,n,r){switch(n){case 0:return this.begin("open_directive"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin("type_directive"),20;case 6:return this.popState(),this.begin("arg_directive"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:case 10:case 19:case 27:break;case 11:return this.begin("acc_title"),38;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),40;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:case 37:case 40:case 43:case 46:case 49:case 52:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 20:case 21:return 23;case 22:return this.begin("struct"),45;case 23:return"EDGE_STATE";case 24:return"EOF_IN_STRUCT";case 25:return"OPEN_IN_STRUCT";case 26:return this.popState(),47;case 28:return"MEMBER";case 29:return 43;case 30:return 70;case 31:return 63;case 32:return 64;case 33:return 66;case 34:return 48;case 35:return 49;case 36:this.begin("generic");break;case 38:return"GENERICTYPE";case 39:this.begin("string");break;case 41:return"STR";case 42:this.begin("bqstring");break;case 44:return"BQUOTE_STR";case 45:this.begin("href");break;case 47:return 69;case 48:this.begin("callback_name");break;case 50:this.popState(),this.begin("callback_args");break;case 51:return 67;case 53:return 68;case 54:case 55:case 56:case 57:return 65;case 58:case 59:return 57;case 60:case 61:return 59;case 62:return 58;case 63:return 56;case 64:return 60;case 65:return 61;case 66:return 62;case 67:return 32;case 68:return 44;case 69:return 82;case 70:return"DOT";case 71:return"PLUS";case 72:return 79;case 73:case 74:return"EQUALS";case 75:return 86;case 76:return"PUNCTUATION";case 77:return 85;case 78:return 84;case 79:return 81;case 80:return 25}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:\[\*\])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{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:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},callback_args:{rules:[52,53],inclusive:!1},callback_name:{rules:[49,50,51],inclusive:!1},href:{rules:[46,47],inclusive:!1},struct:{rules:[23,24,25,26,27,28],inclusive:!1},generic:{rules:[37,38],inclusive:!1},bqstring:{rules:[43,44],inclusive:!1},string:{rules:[40,41],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,29,30,31,32,33,34,35,36,39,42,45,48,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],inclusive:!0}}},t);function q(){this.yy={}}return z.lexer=U,q.prototype=z,z.Parser=q,new q}();Nd.parser=Nd;const Dd=(t,e)=>{var n;return"dagre-wrapper"!==(null==(n=null==e?void 0:e.class)?void 0:n.defaultRenderer)&&null!==t.match(/^\s*classDiagram/)},Ld=(t,e)=>{var n;return null!==t.match(/^\s*classDiagram/)&&"dagre-wrapper"===(null==(n=null==e?void 0:e.class)?void 0:n.defaultRenderer)||null!==t.match(/^\s*classDiagram-v2/)},Od="classid-";let Bd=[],Id={},Fd=0,Rd=[];const Pd=t=>ol.sanitizeText(t,Mh()),$d=function(t){let e="",n=t;if(t.indexOf("~")>0){let r=t.split("~");n=r[0],e=ol.sanitizeText(r[1],Mh())}return{className:n,type:e}},jd=function(t){let e=$d(t);void 0===Id[e.className]&&(Id[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:Od+e.className+"-"+Fd},Fd++)},Yd=function(t){const e=Object.keys(Id);for(let n=0;n<e.length;n++)if(Id[e[n]].id===t)return Id[e[n]].domId},zd=function(t,e){const n=$d(t).className,r=Id[n];if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?r.annotations.push(Pd(t.substring(2,t.length-2))):t.indexOf(")")>0?r.methods.push(Pd(t)):t&&r.members.push(Pd(t))}},Ud=function(t,e){t.split(",").forEach((function(t){let n=t;t[0].match(/\d/)&&(n=Od+n),void 0!==Id[n]&&Id[n].cssClasses.push(e)}))},qd=function(t){let e=Co(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Co("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Co(t).select("svg").selectAll("g.node").on("mouseover",(function(){const t=Co(this);if(null===t.attr("title"))return;const n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/&lt;br\/&gt;/g,"<br/>")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Co(this).classed("hover",!1)}))};Rd.push(qd);let Wd="TB";const Hd={parseDirective:function(t,e,n){jk.parseDirective(this,t,e,n)},setAccTitle:gf,getAccTitle:yf,getAccDescription:bf,setAccDescription:mf,getConfig:()=>Mh().class,addClass:jd,bindFunctions:function(t){Rd.forEach((function(e){e(t)}))},clear:function(){Bd=[],Id={},Rd=[],Rd.push(qd),pf()},getClass:function(t){return Id[t]},getClasses:function(){return Id},addAnnotation:function(t,e){const n=$d(t).className;Id[n].annotations.push(e)},getRelations:function(){return Bd},addRelation:function(t){Xc.debug("Adding relation: "+JSON.stringify(t)),jd(t.id1),jd(t.id2),t.id1=$d(t.id1).className,t.id2=$d(t.id2).className,t.relationTitle1=ol.sanitizeText(t.relationTitle1.trim(),Mh()),t.relationTitle2=ol.sanitizeText(t.relationTitle2.trim(),Mh()),Bd.push(t)},getDirection:()=>Wd,setDirection:t=>{Wd=t},addMember:zd,addMembers:function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((e=>zd(t,e))))},cleanupLabel:function(t){return":"===t.substring(0,1)?ol.sanitizeText(t.substr(1).trim(),Mh()):Pd(t.trim())},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){(function(t,e,n){const r=Mh();let i=t,a=Yd(i);if("loose"===r.securityLevel&&void 0!==e&&void 0!==Id[i]){let t=[];if("string"==typeof n){t=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<t.length;e++){let n=t[e].trim();'"'===n.charAt(0)&&'"'===n.charAt(n.length-1)&&(n=n.substr(1,n.length-2)),t[e]=n}}0===t.length&&t.push(a),Rd.push((function(){const n=document.querySelector(`[id="${a}"]`);null!==n&&n.addEventListener("click",(function(){_h.runFunc(e,...t)}),!1)}))}})(t,e,n),Id[t].haveCallback=!0})),Ud(t,"clickable")},setCssClass:Ud,setLink:function(t,e,n){const r=Mh();t.split(",").forEach((function(t){let i=t;t[0].match(/\d/)&&(i=Od+i),void 0!==Id[i]&&(Id[i].link=_h.formatUrl(e,r),"sandbox"===r.securityLevel?Id[i].linkTarget="_top":Id[i].linkTarget="string"==typeof n?Pd(n):"_blank")})),Ud(t,"clickable")},getTooltip:function(t){return Id[t].tooltip},setTooltip:function(t,e){const n=Mh();t.split(",").forEach((function(t){void 0!==e&&(Id[t].tooltip=ol.sanitizeText(e,n))}))},lookUpDomId:Yd};let Vd=0;const Gd=function(t){let e=t.match(/^(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+) *(\*|\$)?$/),n=t.match(/^([+|\-|~|#])?(\w+) *\( *(.*)\) *(\*|\$)? *(\w*[~|[\]]*\s*\w*~?)$/);return e&&!n?Xd(e):n?Zd(n):Qd(t)},Xd=function(t){let e="",n="";try{let r=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",a=t[3]?al(t[3].trim()):"",o=t[4]?t[4].trim():"",s=t[5]?t[5].trim():"";n=r+i+a+" "+o,e=Jd(s)}catch(e){n=t}return{displayText:n,cssStyle:e}},Zd=function(t){let e="",n="";try{let r=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",a=t[3]?al(t[3].trim()):"",o=t[4]?t[4].trim():"";n=r+i+"("+a+")"+(t[5]?" : "+al(t[5]).trim():""),e=Jd(o)}catch(e){n=t}return{displayText:n,cssStyle:e}},Qd=function(t){let e="",n="",r="",i=t.indexOf("("),a=t.indexOf(")");if(i>1&&a>i&&a<=t.length){let 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());const l=t.substring(i+1,a);t.substring(a+1,1),n=Jd(t.substring(a+1,a+2)),e=o+s+"("+al(l.trim())+")",a<t.length&&(r=t.substring(a+2).trim(),""!==r&&(r=" : "+al(r),e+=r))}else e=al(t);return{displayText:e,cssStyle:n}},Kd=function(t,e,n,r){let i=Gd(e);const a=t.append("tspan").attr("x",r.padding).text(i.displayText);""!==i.cssStyle&&a.attr("style",i.cssStyle),n||a.attr("dy",r.textHeight)},Jd=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},tp=function(t,e,n,r){Xc.debug("Rendering class ",e,n);const i=e.id,a={id:i,label:e.id,width:0,height:0},o=t.append("g").attr("id",r.db.lookUpDomId(i)).attr("class","classGroup");let s;s=e.link?o.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",n.textHeight+n.padding).attr("x",0):o.append("text").attr("y",n.textHeight+n.padding).attr("x",0);let c=!0;e.annotations.forEach((function(t){const e=s.append("tspan").text("«"+t+"»");c||e.attr("dy",n.textHeight),c=!1}));let l=e.id;void 0!==e.type&&""!==e.type&&(l+="<"+e.type+">");const u=s.append("tspan").text(l).attr("class","title");c||u.attr("dy",n.textHeight);const h=s.node().getBBox().height,f=o.append("line").attr("x1",0).attr("y1",n.padding+h+n.dividerMargin/2).attr("y2",n.padding+h+n.dividerMargin/2),d=o.append("text").attr("x",n.padding).attr("y",h+n.dividerMargin+n.textHeight).attr("fill","white").attr("class","classText");c=!0,e.members.forEach((function(t){Kd(d,t,c,n),c=!1}));const p=d.node().getBBox(),g=o.append("line").attr("x1",0).attr("y1",n.padding+h+n.dividerMargin+p.height).attr("y2",n.padding+h+n.dividerMargin+p.height),y=o.append("text").attr("x",n.padding).attr("y",h+2*n.dividerMargin+p.height+n.textHeight).attr("fill","white").attr("class","classText");c=!0,e.methods.forEach((function(t){Kd(y,t,c,n),c=!1}));const m=o.node().getBBox();var b=" ";e.cssClasses.length>0&&(b+=e.cssClasses.join(" "));const _=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",m.width+2*n.padding).attr("height",m.height+n.padding+.5*n.dividerMargin).attr("class",b).node().getBBox().width;return s.node().childNodes.forEach((function(t){t.setAttribute("x",(_-t.getBBox().width)/2)})),e.tooltip&&s.insert("title").text(e.tooltip),f.attr("x2",_),g.attr("x2",_),a.width=_,a.height=m.height+n.padding+.5*n.dividerMargin,a};let ep={};const np=function(t){const e=Object.entries(ep).find((e=>e[1].label===t));if(e)return e[0]},rp={draw:function(t,e,n,r){const i=Mh().class;ep={},Xc.info("Rendering diagram "+t);const a=Mh().securityLevel;let o;"sandbox"===a&&(o=Co("#i"+e));const s=Co("sandbox"===a?o.nodes()[0].contentDocument.body:"body"),c=s.select(`[id='${e}']`);var l;(l=c).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"),l.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"),l.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"),l.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"),l.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"),l.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"),l.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"),l.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");const u=new $c.Graph({multigraph:!0});u.setGraph({isMultiGraph:!0}),u.setDefaultEdgeLabel((function(){return{}}));const h=r.db.getClasses(),f=Object.keys(h);for(let t=0;t<f.length;t++){const e=h[f[t]],n=tp(c,e,i,r);ep[n.id]=n,u.setNode(n.id,n),Xc.info("Org height: "+n.height)}r.db.getRelations().forEach((function(t){Xc.info("tjoho"+np(t.id1)+np(t.id2)+JSON.stringify(t)),u.setEdge(np(t.id1),np(t.id2),{relation:t},t.title||"DEFAULT")})),Pc.layout(u),u.nodes().forEach((function(t){void 0!==t&&void 0!==u.node(t)&&(Xc.debug("Node "+t+": "+JSON.stringify(u.node(t))),s.select("#"+r.db.lookUpDomId(t)).attr("transform","translate("+(u.node(t).x-u.node(t).width/2)+","+(u.node(t).y-u.node(t).height/2)+" )"))})),u.edges().forEach((function(t){void 0!==t&&void 0!==u.edge(t)&&(Xc.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(u.edge(t))),function(t,e,n,r,i){const a=function(t){switch(t){case i.db.relationType.AGGREGATION:return"aggregation";case i.db.EXTENSION:return"extension";case i.db.COMPOSITION:return"composition";case i.db.DEPENDENCY:return"dependency";case i.db.LOLLIPOP:return"lollipop"}};e.points=e.points.filter((t=>!Number.isNaN(t.y)));const o=e.points,s=cs().x((function(t){return t.x})).y((function(t){return t.y})).curve(ps),c=t.append("path").attr("d",s(o)).attr("id","edge"+Vd).attr("class","relation");let l,u,h="";r.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),1==n.relation.lineType&&c.attr("class","relation dashed-line"),"none"!==n.relation.type1&&c.attr("marker-start","url("+h+"#"+a(n.relation.type1)+"Start)"),"none"!==n.relation.type2&&c.attr("marker-end","url("+h+"#"+a(n.relation.type2)+"End)");const f=e.points.length;let d,p,g,y,m=_h.calcLabelPosition(e.points);if(l=m.x,u=m.y,f%2!=0&&f>1){let t=_h.calcCardinalityPosition("none"!==n.relation.type1,e.points,e.points[0]),r=_h.calcCardinalityPosition("none"!==n.relation.type2,e.points,e.points[f-1]);Xc.debug("cardinality_1_point "+JSON.stringify(t)),Xc.debug("cardinality_2_point "+JSON.stringify(r)),d=t.x,p=t.y,g=r.x,y=r.y}if(void 0!==n.title){const e=t.append("g").attr("class","classLabel"),i=e.append("text").attr("class","label").attr("x",l).attr("y",u).attr("fill","red").attr("text-anchor","middle").text(n.title);window.label=i;const a=i.node().getBBox();e.insert("rect",":first-child").attr("class","box").attr("x",a.x-r.padding/2).attr("y",a.y-r.padding/2).attr("width",a.width+r.padding).attr("height",a.height+r.padding)}Xc.info("Rendering relation "+JSON.stringify(n)),void 0!==n.relationTitle1&&"none"!==n.relationTitle1&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",d).attr("y",p).attr("fill","black").attr("font-size","6").text(n.relationTitle1),void 0!==n.relationTitle2&&"none"!==n.relationTitle2&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",g).attr("y",y).attr("fill","black").attr("font-size","6").text(n.relationTitle2),Vd++}(c,u.edge(t),u.edge(t).relation,i,r))}));const d=c.node().getBBox(),p=d.width+40,g=d.height+40;Fh(c,0,p,i.useMaxWidth);const y=`${d.x-20} ${d.y-20} ${p} ${g}`;Xc.debug(`viewBox ${y}`),c.attr("viewBox",y),Pf(r.db,c,e)}},ip={extension:(t,e,n)=>{Xc.trace("Making markers for ",n),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:(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:(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:(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")},lollipop:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","white").attr("cx",6).attr("cy",7).attr("r",6)},point:(t,e)=>{t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",10).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:(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:(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:(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")}},ap=(t,e,n,r)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),il(Mh().flowchart.htmlLabels)){return i=i.replace(/\\n|\n/g,"<br />"),Xc.info("vertexText"+i),function(t){const e=Co(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),n=e.append("xhtml:div"),r=t.label,i=t.isNode?"nodeLabel":"edgeLabel";var a;return n.html('<span class="'+i+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+r+"</span>"),(a=t.labelStyle)&&n.attr("style",a),n.style("display","inline-block"),n.style("white-space","nowrap"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}({isNode:r,label:Pk(i).replace(/fa[lrsb]?:fa-[\w-]+/g,(t=>`<i class='${t.replace(":"," ")}'></i>`)),labelStyle:e.replace("fill:","color:")})}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let r=[];r="string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[];for(let e=0;e<r.length;e++){const i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),n?i.setAttribute("class","title-row"):i.setAttribute("class","row"),i.textContent=r[e].trim(),t.appendChild(i)}return t}},op=(t,e,n,r)=>{let i;i=n||"node default";const a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),o=a.insert("g").attr("class","label").attr("style",e.labelStyle);let s;s=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];const c=o.node().appendChild(ap(tl(Pk(s),Mh()),e.labelStyle,!1,r));let l=c.getBBox();if(il(Mh().flowchart.htmlLabels)){const t=c.children[0],e=Co(c);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}const u=e.padding/2;return o.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),{shapeSvg:a,bbox:l,halfPadding:u,label:o}},sp=(t,e)=>{const n=e.node().getBBox();t.width=n.width,t.height=n.height};function cp(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}let lp={},up={},hp={};const fp=(t,e)=>(Xc.trace("In isDecendant",e," ",t," = ",up[e].indexOf(t)>=0),up[e].indexOf(t)>=0),dp=(t,e,n,r)=>{Xc.warn("Copying children of ",t,"root",r,"data",e.node(t),r);const i=e.children(t)||[];t!==r&&i.push(t),Xc.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach((i=>{if(e.children(i).length>0)dp(i,e,n,r);else{const a=e.node(i);Xc.info("cp ",i," to ",r," with parent ",t),n.setNode(i,a),r!==e.parent(i)&&(Xc.warn("Setting parent",i,e.parent(i)),n.setParent(i,e.parent(i))),t!==r&&i!==t?(Xc.debug("Setting parent",i,t),n.setParent(i,t)):(Xc.info("In copy ",t,"root",r,"data",e.node(t),r),Xc.debug("Not Setting parent for node=",i,"cluster!==rootId",t!==r,"node!==clusterId",i!==t));const o=e.edges(i);Xc.debug("Copying Edges",o),o.forEach((i=>{Xc.info("Edge",i);const a=e.edge(i.v,i.w,i.name);Xc.info("Edge data",a,r);try{((t,e)=>(Xc.info("Decendants of ",e," is ",up[e]),Xc.info("Edge is ",t),t.v!==e&&t.w!==e&&(up[e]?up[e].indexOf(t.v)>=0||!!fp(t.v,e)||!!fp(t.w,e)||up[e].indexOf(t.w)>=0:(Xc.debug("Tilt, ",e,",not in decendants"),!1))))(i,r)?(Xc.info("Copying as ",i.v,i.w,a,i.name),n.setEdge(i.v,i.w,a,i.name),Xc.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):Xc.info("Skipping copy of edge ",i.v,"--\x3e",i.w," rootId: ",r," clusterId:",t)}catch(t){Xc.error(t)}}))}Xc.debug("Removing node",i),e.removeNode(i)}))},pp=(t,e)=>{const n=e.children(t);let r=[].concat(n);for(let i=0;i<n.length;i++)hp[n[i]]=t,r=r.concat(pp(n[i],e));return r},gp=(t,e)=>{Xc.trace("Searching",t);const n=e.children(t);if(Xc.trace("Searching children of id ",t,n),n.length<1)return Xc.trace("This is a valid node",t),t;for(let r=0;r<n.length;r++){const i=gp(n[r],e);if(i)return Xc.trace("Found replacement for",t," => ",i),i}},yp=t=>lp[t]&&lp[t].externalConnections&&lp[t]?lp[t].id:t,mp=(t,e)=>{if(Xc.warn("extractor - ",e,$c.json.write(t),t.children("D")),e>10)return void Xc.error("Bailing out");let n=t.nodes(),r=!1;for(let e=0;e<n.length;e++){const i=n[e],a=t.children(i);r=r||a.length>0}if(r){Xc.debug("Nodes = ",n,e);for(let r=0;r<n.length;r++){const i=n[r];if(Xc.debug("Extracting node",i,lp,lp[i]&&!lp[i].externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),lp[i])if(!lp[i].externalConnections&&t.children(i)&&t.children(i).length>0){Xc.warn("Cluster without external connections, without a parent and with children",i,e);let n="TB"===t.graph().rankdir?"LR":"TB";lp[i]&&lp[i].clusterData&&lp[i].clusterData.dir&&(n=lp[i].clusterData.dir,Xc.warn("Fixing dir",lp[i].clusterData.dir,n));const r=new $c.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));Xc.warn("Old graph before copy",$c.json.write(t)),dp(i,t,r,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:lp[i].clusterData,labelText:lp[i].labelText,graph:r}),Xc.warn("New graph after copy node: (",i,")",$c.json.write(r)),Xc.debug("Old graph after copy",$c.json.write(t))}else Xc.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!lp[i].externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),Xc.debug(lp);else Xc.debug("Not a cluster",i,e)}n=t.nodes(),Xc.warn("New list of nodes",n);for(let r=0;r<n.length;r++){const i=n[r],a=t.node(i);Xc.warn(" Now next level",i,a),a.clusterNode&&mp(a.graph,e+1)}}else Xc.debug("Done, no node has children",t.nodes())},bp=(t,e)=>{if(0===e.length)return[];let n=Object.assign(e);return e.forEach((e=>{const r=t.children(e),i=bp(t,r);n=n.concat(i)})),n};function _p(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),l=Math.abs(e*n*o/c);r.x<i&&(l=-l);var u=Math.abs(e*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}function vp(t,e,n,r){var i,a,o,s,c,l,u,h,f,d,p,g,y;if(i=e.y-t.y,o=t.x-e.x,c=e.x*t.y-t.x*e.y,f=i*n.x+o*n.y+c,d=i*r.x+o*r.y+c,!(0!==f&&0!==d&&xp(f,d)||(a=r.y-n.y,s=n.x-r.x,l=r.x*n.y-n.x*r.y,u=a*t.x+s*t.y+l,h=a*e.x+s*e.y+l,0!==u&&0!==h&&xp(u,h)||0==(p=i*s-a*o))))return g=Math.abs(p/2),{x:(y=o*l-s*c)<0?(y-g)/p:(y+g)/p,y:(y=a*c-i*l)<0?(y-g)/p:(y+g)/p}}function xp(t,e){return t*e>0}const kp=(t,e)=>{var n,r,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),n=0===s?0:l*o/s,r=l):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o),{x:i+n,y:a+r}},wp=function(t,e,n){return _p(t,e,e,n)},Tp=function(t,e,n){var r=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)})):(o=Math.min(o,e.x),s=Math.min(s,e.y));for(var c=r-t.width/2-o,l=i-t.height/2-s,u=0;u<e.length;u++){var h=e[u],f=e[u<e.length-1?u+1:0],d=vp(t,n,{x:c+h.x,y:l+h.y},{x:c+f.x,y:l+f.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1})),a[0]):t},Ep=kp;function Cp(t,e,n,r){const i=[],a=t=>{i.push(t),i.push(0)},o=t=>{i.push(0),i.push(t)};e.includes("t")?(Xc.debug("add top border"),a(n)):o(n),e.includes("r")?(Xc.debug("add right border"),a(r)):o(r),e.includes("b")?(Xc.debug("add bottom border"),a(n)):o(n),e.includes("l")?(Xc.debug("add left border"),a(r)):o(r),t.attr("stroke-dasharray",i.join(" "))}const Sp=(t,e,n)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let i=70,a=10;"LR"===n&&(i=10,a=70);const o=r.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return sp(e,o),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Ep(e,t)},r},Ap={question:(t,e)=>{const{shapeSvg:n,bbox:r}=op(t,e,void 0,!0),i=r.width+e.padding+(r.height+e.padding),a=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];Xc.info("Question main (Circle)");const o=cp(n,i,i,a);return o.attr("style",e.style),sp(e,o),e.intersect=function(t){return Xc.warn("Intersect called"),Tp(e,a,t)},n},rect:(t,e)=>{const{shapeSvg:n,bbox:r,halfPadding:i}=op(t,e,"node "+e.classes,!0);Xc.trace("Classes = ",e.classes);const a=n.insert("rect",":first-child"),o=r.width+e.padding,s=r.height+e.padding;if(a.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-i).attr("y",-r.height/2-i).attr("width",o).attr("height",s),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Cp(a,e.props.borders,o,s),t.delete("borders")),t.forEach((t=>{Xc.warn(`Unknown node property ${t}`)}))}return sp(e,a),e.intersect=function(t){return Ep(e,t)},n},labelRect:(t,e)=>{const{shapeSvg:n}=op(t,e,"label",!0);Xc.trace("Classes = ",e.classes);const r=n.insert("rect",":first-child");if(r.attr("width",0).attr("height",0),n.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Cp(r,e.props.borders,0,0),t.delete("borders")),t.forEach((t=>{Xc.warn(`Unknown node property ${t}`)}))}return sp(e,r),e.intersect=function(t){return Ep(e,t)},n},rectWithTitle:(t,e)=>{let n;n=e.classes?"node "+e.classes:"node default";const r=t.insert("g").attr("class",n).attr("id",e.domId||e.id),i=r.insert("rect",":first-child"),a=r.insert("line"),o=r.insert("g").attr("class","label"),s=e.labelText.flat?e.labelText.flat():e.labelText;let c="";c="object"==typeof s?s[0]:s,Xc.info("Label text abc79",c,s,"object"==typeof s);const l=o.node().appendChild(ap(c,e.labelStyle,!0,!0));let u={width:0,height:0};if(il(Mh().flowchart.htmlLabels)){const t=l.children[0],e=Co(l);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}Xc.info("Text 2",s);const h=s.slice(1,s.length);let f=l.getBBox();const d=o.node().appendChild(ap(h.join?h.join("<br/>"):h,e.labelStyle,!0,!0));if(il(Mh().flowchart.htmlLabels)){const t=d.children[0],e=Co(d);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}const p=e.padding/2;return Co(d).attr("transform","translate( "+(u.width>f.width?0:(f.width-u.width)/2)+", "+(f.height+p+5)+")"),Co(l).attr("transform","translate( "+(u.width<f.width?0:-(f.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-p+3)+")"),i.attr("class","outer title-state").attr("x",-u.width/2-p).attr("y",-u.height/2-p).attr("width",u.width+e.padding).attr("height",u.height+e.padding),a.attr("class","divider").attr("x1",-u.width/2-p).attr("x2",u.width/2+p).attr("y1",-u.height/2-p+f.height+p).attr("y2",-u.height/2-p+f.height+p),sp(e,i),e.intersect=function(t){return Ep(e,t)},r},choice:(t,e)=>{const n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);return n.insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map((function(t){return t.x+","+t.y})).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return wp(e,14,t)},n},circle:(t,e)=>{const{shapeSvg:n,bbox:r,halfPadding:i}=op(t,e,void 0,!0),a=n.insert("circle",":first-child");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+i).attr("width",r.width+e.padding).attr("height",r.height+e.padding),Xc.info("Circle main"),sp(e,a),e.intersect=function(t){return Xc.info("Circle intersect",e,r.width/2+i,t),wp(e,r.width/2+i,t)},n},doublecircle:(t,e)=>{const{shapeSvg:n,bbox:r,halfPadding:i}=op(t,e,void 0,!0),a=n.insert("g",":first-child"),o=a.insert("circle"),s=a.insert("circle");return o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+i+5).attr("width",r.width+e.padding+10).attr("height",r.height+e.padding+10),s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+i).attr("width",r.width+e.padding).attr("height",r.height+e.padding),Xc.info("DoubleCircle main"),sp(e,o),e.intersect=function(t){return Xc.info("DoubleCircle intersect",e,r.width/2+i+5,t),wp(e,r.width/2+i+5,t)},n},stadium:(t,e)=>{const{shapeSvg:n,bbox:r}=op(t,e,void 0,!0),i=r.height+e.padding,a=r.width+i/4+e.padding,o=n.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-a/2).attr("y",-i/2).attr("width",a).attr("height",i);return sp(e,o),e.intersect=function(t){return Ep(e,t)},n},hexagon:(t,e)=>{const{shapeSvg:n,bbox:r}=op(t,e,void 0,!0),i=r.height+e.padding,a=i/4,o=r.width+2*a+e.padding,s=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-i/2},{x:o-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],c=cp(n,o,i,s);return c.attr("style",e.style),sp(e,c),e.intersect=function(t){return Tp(e,s,t)},n},rect_left_inv_arrow:(t,e)=>{const{shapeSvg:n,bbox:r}=op(t,e,void 0,!0),i=r.width+e.padding,a=r.height+e.padding,o=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return cp(n,i,a,o).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(t){return Tp(e,o,t)},n},lean_right:(t,e)=>{const{shapeSvg:n,bbox:r}=op(t,e,void 0,!0),i=r.width+e.padding,a=r.height+e.padding,o=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],s=cp(n,i,a,o);return s.attr("style",e.style),sp(e,s),e.intersect=function(t){return Tp(e,o,t)},n},lean_left:(t,e)=>{const{shapeSvg:n,bbox:r}=op(t,e,void 0,!0),i=r.width+e.padding,a=r.height+e.padding,o=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],s=cp(n,i,a,o);return s.attr("style",e.style),sp(e,s),e.intersect=function(t){return Tp(e,o,t)},n},trapezoid:(t,e)=>{const{shapeSvg:n,bbox:r}=op(t,e,void 0,!0),i=r.width+e.padding,a=r.height+e.padding,o=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],s=cp(n,i,a,o);return s.attr("style",e.style),sp(e,s),e.intersect=function(t){return Tp(e,o,t)},n},inv_trapezoid:(t,e)=>{const{shapeSvg:n,bbox:r}=op(t,e,void 0,!0),i=r.width+e.padding,a=r.height+e.padding,o=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],s=cp(n,i,a,o);return s.attr("style",e.style),sp(e,s),e.intersect=function(t){return Tp(e,o,t)},n},rect_right_inv_arrow:(t,e)=>{const{shapeSvg:n,bbox:r}=op(t,e,void 0,!0),i=r.width+e.padding,a=r.height+e.padding,o=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],s=cp(n,i,a,o);return s.attr("style",e.style),sp(e,s),e.intersect=function(t){return Tp(e,o,t)},n},cylinder:(t,e)=>{const{shapeSvg:n,bbox:r}=op(t,e,void 0,!0),i=r.width+e.padding,a=i/2,o=a/(2.5+i/50),s=r.height+o+e.padding,c="M 0,"+o+" a "+a+","+o+" 0,0,0 "+i+" 0 a "+a+","+o+" 0,0,0 "+-i+" 0 l 0,"+s+" a "+a+","+o+" 0,0,0 "+i+" 0 l 0,"+-s,l=n.attr("label-offset-y",o).insert("path",":first-child").attr("style",e.style).attr("d",c).attr("transform","translate("+-i/2+","+-(s/2+o)+")");return sp(e,l),e.intersect=function(t){const n=Ep(e,t),r=n.x-e.x;if(0!=a&&(Math.abs(r)<e.width/2||Math.abs(r)==e.width/2&&Math.abs(n.y-e.y)>e.height/2-o)){let i=o*o*(1-r*r/(a*a));0!=i&&(i=Math.sqrt(i)),i=o-i,t.y-e.y>0&&(i=-i),n.y+=i}return n},n},start:(t,e)=>{const n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=n.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),sp(e,r),e.intersect=function(t){return wp(e,7,t)},n},end:(t,e)=>{const n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=n.insert("circle",":first-child"),i=n.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),sp(e,i),e.intersect=function(t){return wp(e,7,t)},n},note:(t,e)=>{const{shapeSvg:n,bbox:r,halfPadding:i}=op(t,e,"node "+e.classes,!0);Xc.info("Classes = ",e.classes);const a=n.insert("rect",":first-child");return a.attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-i).attr("y",-r.height/2-i).attr("width",r.width+e.padding).attr("height",r.height+e.padding),sp(e,a),e.intersect=function(t){return Ep(e,t)},n},subroutine:(t,e)=>{const{shapeSvg:n,bbox:r}=op(t,e,void 0,!0),i=r.width+e.padding,a=r.height+e.padding,o=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],s=cp(n,i,a,o);return s.attr("style",e.style),sp(e,s),e.intersect=function(t){return Tp(e,o,t)},n},fork:Sp,join:Sp,class_box:(t,e)=>{const n=e.padding/2;let r;r=e.classes?"node "+e.classes:"node default";const i=t.insert("g").attr("class",r).attr("id",e.domId||e.id),a=i.insert("rect",":first-child"),o=i.insert("line"),s=i.insert("line");let c=0,l=4;const u=i.insert("g").attr("class","label");let h=0;const f=e.classData.annotations&&e.classData.annotations[0],d=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",p=u.node().appendChild(ap(d,e.labelStyle,!0,!0));let g=p.getBBox();if(il(Mh().flowchart.htmlLabels)){const t=p.children[0],e=Co(p);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}e.classData.annotations[0]&&(l+=g.height+4,c+=g.width);let y=e.classData.id;void 0!==e.classData.type&&""!==e.classData.type&&(Mh().flowchart.htmlLabels?y+="&lt;"+e.classData.type+"&gt;":y+="<"+e.classData.type+">");const m=u.node().appendChild(ap(y,e.labelStyle,!0,!0));Co(m).attr("class","classTitle");let b=m.getBBox();if(il(Mh().flowchart.htmlLabels)){const t=m.children[0],e=Co(m);b=t.getBoundingClientRect(),e.attr("width",b.width),e.attr("height",b.height)}l+=b.height+4,b.width>c&&(c=b.width);const _=[];e.classData.members.forEach((t=>{const n=Gd(t);let r=n.displayText;Mh().flowchart.htmlLabels&&(r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const i=u.node().appendChild(ap(r,n.cssStyle?n.cssStyle:e.labelStyle,!0,!0));let a=i.getBBox();if(il(Mh().flowchart.htmlLabels)){const t=i.children[0],e=Co(i);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}a.width>c&&(c=a.width),l+=a.height+4,_.push(i)})),l+=8;const v=[];if(e.classData.methods.forEach((t=>{const n=Gd(t);let r=n.displayText;Mh().flowchart.htmlLabels&&(r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const i=u.node().appendChild(ap(r,n.cssStyle?n.cssStyle:e.labelStyle,!0,!0));let a=i.getBBox();if(il(Mh().flowchart.htmlLabels)){const t=i.children[0],e=Co(i);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}a.width>c&&(c=a.width),l+=a.height+4,v.push(i)})),l+=8,f){let t=(c-g.width)/2;Co(p).attr("transform","translate( "+(-1*c/2+t)+", "+-1*l/2+")"),h=g.height+4}let x=(c-b.width)/2;return Co(m).attr("transform","translate( "+(-1*c/2+x)+", "+(-1*l/2+h)+")"),h+=b.height+4,o.attr("class","divider").attr("x1",-c/2-n).attr("x2",c/2+n).attr("y1",-l/2-n+8+h).attr("y2",-l/2-n+8+h),h+=8,_.forEach((t=>{Co(t).attr("transform","translate( "+-c/2+", "+(-1*l/2+h+4)+")"),h+=b.height+4})),h+=8,s.attr("class","divider").attr("x1",-c/2-n).attr("x2",c/2+n).attr("y1",-l/2-n+8+h).attr("y2",-l/2-n+8+h),h+=8,v.forEach((t=>{Co(t).attr("transform","translate( "+-c/2+", "+(-1*l/2+h)+")"),h+=b.height+4})),a.attr("class","outer title-state").attr("x",-c/2-n).attr("y",-l/2-n).attr("width",c+e.padding).attr("height",l+e.padding),sp(e,a),e.intersect=function(t){return Ep(e,t)},i}};let Mp={};const Np=t=>{const e=Mp[t.id];Xc.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},Dp={rect:(t,e)=>{Xc.trace("Creating subgraph rect for ",e.id,e);const n=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),a=i.node().appendChild(ap(e.labelText,e.labelStyle,void 0,!0));let o=a.getBBox();if(il(Mh().flowchart.htmlLabels)){const t=a.children[0],e=Co(a);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}const s=0*e.padding,c=s/2,l=e.width<=o.width+s?o.width+s:e.width;e.width<=o.width+s?e.diff=(o.width-e.width)/2-e.padding/2:e.diff=-e.padding/2,Xc.trace("Data ",e,JSON.stringify(e)),r.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-l/2).attr("y",e.y-e.height/2-c).attr("width",l).attr("height",e.height+s),i.attr("transform","translate("+(e.x-o.width/2)+", "+(e.y-e.height/2+e.padding/3)+")");const u=r.node().getBBox();return e.width=u.width,e.height=u.height,e.intersect=function(t){return kp(e,t)},n},roundedWithTitle:(t,e)=>{const n=t.insert("g").attr("class",e.classes).attr("id",e.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),a=n.append("rect"),o=i.node().appendChild(ap(e.labelText,e.labelStyle,void 0,!0));let s=o.getBBox();if(il(Mh().flowchart.htmlLabels)){const t=o.children[0],e=Co(o);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s=o.getBBox();const c=0*e.padding,l=c/2,u=e.width<=s.width+e.padding?s.width+e.padding:e.width;e.width<=s.width+e.padding?e.diff=(s.width+0*e.padding-e.width)/2:e.diff=-e.padding/2,r.attr("class","outer").attr("x",e.x-u/2-l).attr("y",e.y-e.height/2-l).attr("width",u+c).attr("height",e.height+c),a.attr("class","inner").attr("x",e.x-u/2-l).attr("y",e.y-e.height/2-l+s.height-1).attr("width",u+c).attr("height",e.height+c-s.height-3),i.attr("transform","translate("+(e.x-s.width/2)+", "+(e.y-e.height/2-e.padding/3+(il(Mh().flowchart.htmlLabels)?5:3))+")");const h=r.node().getBBox();return e.height=h.height,e.intersect=function(t){return kp(e,t)},n},noteGroup:(t,e)=>{const n=t.insert("g").attr("class","note-cluster").attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");const o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return kp(e,t)},n},divider:(t,e)=>{const n=t.insert("g").attr("class",e.classes).attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("class","divider").attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2).attr("width",e.width+i).attr("height",e.height+i);const o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.diff=-e.padding/2,e.intersect=function(t){return kp(e,t)},n}};let Lp={},Op={},Bp={};function Ip(t,e){Mh().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}const Fp=(t,e)=>{Xc.warn("abc88 cutPathAtIntersect",t,e);let n=[],r=t[0],i=!1;return t.forEach((t=>{if(Xc.info("abc88 checking point",t,e),((t,e)=>{const n=t.x,r=t.y,i=Math.abs(e.x-n),a=Math.abs(e.y-r),o=t.width/2,s=t.height/2;return i>=o||a>=s})(e,t)||i)Xc.warn("abc88 outside",t,r),r=t,i||n.push(t);else{const a=((t,e,n)=>{Xc.warn(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(n)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const r=t.x,i=t.y,a=Math.abs(r-n.x),o=t.width/2;let s=n.x<e.x?o-a:o+a;const c=t.height/2,l=Math.abs(e.y-n.y),u=Math.abs(e.x-n.x);if(Math.abs(i-e.y)*o>Math.abs(r-e.x)*c){let t=n.y<e.y?e.y-c-i:i-c-e.y;s=u*t/l;const r={x:n.x<e.x?n.x+s:n.x-u+s,y:n.y<e.y?n.y+l-t:n.y-l+t};return 0===s&&(r.x=e.x,r.y=e.y),0===u&&(r.x=e.x),0===l&&(r.y=e.y),Xc.warn(`abc89 topp/bott calc, Q ${l}, q ${t}, R ${u}, r ${s}`,r),r}{s=n.x<e.x?e.x-o-r:r-o-e.x;let t=l*s/u,i=n.x<e.x?n.x+u-s:n.x-u+s,a=n.y<e.y?n.y+t:n.y-t;return Xc.warn(`sides calc abc89, Q ${l}, q ${t}, R ${u}, r ${s}`,{_x:i,_y:a}),0===s&&(i=e.x,a=e.y),0===u&&(i=e.x),0===l&&(a=e.y),{x:i,y:a}}})(e,r,t);Xc.warn("abc88 inside",t,r,a),Xc.warn("abc88 intersection",a);let o=!1;n.forEach((t=>{o=o||t.x===a.x&&t.y===a.y})),n.find((t=>t.x===a.x&&t.y===a.y))?Xc.warn("abc88 no intersect",a,n):n.push(a),i=!0}})),Xc.warn("abc88 returning points",n),n},Rp=(t,e,n,r)=>{Xc.info("Graph in recursive render: XXX",$c.json.write(e),r);const i=e.graph().rankdir;Xc.trace("Dir in recursive render - dir:",i);const a=t.insert("g").attr("class","root");e.nodes()?Xc.info("Recursive render XXX",e.nodes()):Xc.info("No nodes found for",e),e.edges().length>0&&Xc.trace("Recursive edges",e.edge(e.edges()[0]));const o=a.insert("g").attr("class","clusters"),s=a.insert("g").attr("class","edgePaths"),c=a.insert("g").attr("class","edgeLabels"),l=a.insert("g").attr("class","nodes");e.nodes().forEach((function(t){const a=e.node(t);if(void 0!==r){const n=JSON.parse(JSON.stringify(r.clusterData));Xc.info("Setting data for cluster XXX (",t,") ",n,r),e.setNode(r.id,n),e.parent(t)||(Xc.trace("Setting parent",t,r.id),e.setParent(t,r.id,n))}if(Xc.info("(Insert) Node XXX"+t+": "+JSON.stringify(e.node(t))),a&&a.clusterNode){Xc.info("Cluster identified",t,a.width,e.node(t));const r=Rp(l,a.graph,n,e.node(t)),i=r.elem;sp(a,i),a.diff=r.diff||0,Xc.info("Node bounds (abc123)",t,a,a.width,a.x,a.y),((t,e)=>{Mp[e.id]=t})(i,a),Xc.warn("Recursive render complete ",i,a)}else e.children(t).length>0?(Xc.info("Cluster - the non recursive path XXX",t,a.id,a,e),Xc.info(gp(a.id,e)),lp[a.id]={id:gp(a.id,e),node:a}):(Xc.info("Node - the non recursive path",t,a.id,a),((t,e,n)=>{let r,i;if(e.link){let a;"sandbox"===Mh().securityLevel?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),i=Ap[e.shape](r,e,n)}else i=Ap[e.shape](t,e,n),r=i;e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),Mp[e.id]=r,e.haveCallback&&Mp[e.id].attr("class",Mp[e.id].attr("class")+" clickable")})(l,e.node(t),i))})),e.edges().forEach((function(t){const n=e.edge(t.v,t.w,t.name);Xc.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),Xc.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(e.edge(t))),Xc.info("Fix",lp,"ids:",t.v,t.w,"Translateing: ",lp[t.v],lp[t.w]),((t,e)=>{const n=ap(e.label,e.labelStyle),r=t.insert("g").attr("class","edgeLabel"),i=r.insert("g").attr("class","label");i.node().appendChild(n);let a,o=n.getBBox();if(il(Mh().flowchart.htmlLabels)){const t=n.children[0],e=Co(n);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}if(i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),Op[e.id]=r,e.width=o.width,e.height=o.height,e.startLabelLeft){const n=ap(e.startLabelLeft,e.labelStyle),r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner");a=i.node().appendChild(n);const o=n.getBBox();i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),Bp[e.id]||(Bp[e.id]={}),Bp[e.id].startLeft=r,Ip(a,e.startLabelLeft)}if(e.startLabelRight){const n=ap(e.startLabelRight,e.labelStyle),r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner");a=r.node().appendChild(n),i.node().appendChild(n);const o=n.getBBox();i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),Bp[e.id]||(Bp[e.id]={}),Bp[e.id].startRight=r,Ip(a,e.startLabelRight)}if(e.endLabelLeft){const n=ap(e.endLabelLeft,e.labelStyle),r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner");a=i.node().appendChild(n);const o=n.getBBox();i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),r.node().appendChild(n),Bp[e.id]||(Bp[e.id]={}),Bp[e.id].endLeft=r,Ip(a,e.endLabelLeft)}if(e.endLabelRight){const n=ap(e.endLabelRight,e.labelStyle),r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner");a=i.node().appendChild(n);const o=n.getBBox();i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),r.node().appendChild(n),Bp[e.id]||(Bp[e.id]={}),Bp[e.id].endRight=r,Ip(a,e.endLabelRight)}})(c,n)})),e.edges().forEach((function(t){Xc.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))})),Xc.info("#############################################"),Xc.info("### Layout ###"),Xc.info("#############################################"),Xc.info(e),Pc.layout(e),Xc.info("Graph after layout:",$c.json.write(e));let u=0;return(t=>bp(t,t.children()))(e).forEach((function(t){const n=e.node(t);Xc.info("Position "+t+": "+JSON.stringify(e.node(t))),Xc.info("Position "+t+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n&&n.clusterNode?Np(n):e.children(t).length>0?(((t,e)=>{Xc.trace("Inserting cluster");const n=e.shape||"rect";Lp[e.id]=Dp[n](t,e)})(o,n),lp[n.id].node=n):Np(n)})),e.edges().forEach((function(t){const r=e.edge(t);Xc.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(r),r);const i=function(t,e,n,r,i,a){let o=n.points,s=!1;const c=a.node(e.v);var l=a.node(e.w);Xc.info("abc88 InsertEdge: ",n),l.intersect&&c.intersect&&(o=o.slice(1,n.points.length-1),o.unshift(c.intersect(o[0])),Xc.info("Last point",o[o.length-1],l,l.intersect(o[o.length-1])),o.push(l.intersect(o[o.length-1]))),n.toCluster&&(Xc.info("to cluster abc88",r[n.toCluster]),o=Fp(n.points,r[n.toCluster].node),s=!0),n.fromCluster&&(Xc.info("from cluster abc88",r[n.fromCluster]),o=Fp(o.reverse(),r[n.fromCluster].node).reverse(),s=!0);const u=o.filter((t=>!Number.isNaN(t.y)));let h;h=("graph"===i||"flowchart"===i)&&n.curve||ps;const f=cs().x((function(t){return t.x})).y((function(t){return t.y})).curve(h);let d;switch(n.thickness){case"normal":d="edge-thickness-normal";break;case"thick":case"invisible":d="edge-thickness-thick";break;default:d=""}switch(n.pattern){case"solid":d+=" edge-pattern-solid";break;case"dotted":d+=" edge-pattern-dotted";break;case"dashed":d+=" edge-pattern-dashed"}const p=t.append("path").attr("d",f(u)).attr("id",n.id).attr("class"," "+d+(n.classes?" "+n.classes:"")).attr("style",n.style);let g="";switch((Mh().flowchart.arrowMarkerAbsolute||Mh().state.arrowMarkerAbsolute)&&(g=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,g=g.replace(/\(/g,"\\("),g=g.replace(/\)/g,"\\)")),Xc.info("arrowTypeStart",n.arrowTypeStart),Xc.info("arrowTypeEnd",n.arrowTypeEnd),n.arrowTypeStart){case"arrow_cross":p.attr("marker-start","url("+g+"#"+i+"-crossStart)");break;case"arrow_point":p.attr("marker-start","url("+g+"#"+i+"-pointStart)");break;case"arrow_barb":p.attr("marker-start","url("+g+"#"+i+"-barbStart)");break;case"arrow_circle":p.attr("marker-start","url("+g+"#"+i+"-circleStart)");break;case"aggregation":p.attr("marker-start","url("+g+"#"+i+"-aggregationStart)");break;case"extension":p.attr("marker-start","url("+g+"#"+i+"-extensionStart)");break;case"composition":p.attr("marker-start","url("+g+"#"+i+"-compositionStart)");break;case"dependency":p.attr("marker-start","url("+g+"#"+i+"-dependencyStart)");break;case"lollipop":p.attr("marker-start","url("+g+"#"+i+"-lollipopStart)")}switch(n.arrowTypeEnd){case"arrow_cross":p.attr("marker-end","url("+g+"#"+i+"-crossEnd)");break;case"arrow_point":p.attr("marker-end","url("+g+"#"+i+"-pointEnd)");break;case"arrow_barb":p.attr("marker-end","url("+g+"#"+i+"-barbEnd)");break;case"arrow_circle":p.attr("marker-end","url("+g+"#"+i+"-circleEnd)");break;case"aggregation":p.attr("marker-end","url("+g+"#"+i+"-aggregationEnd)");break;case"extension":p.attr("marker-end","url("+g+"#"+i+"-extensionEnd)");break;case"composition":p.attr("marker-end","url("+g+"#"+i+"-compositionEnd)");break;case"dependency":p.attr("marker-end","url("+g+"#"+i+"-dependencyEnd)");break;case"lollipop":p.attr("marker-end","url("+g+"#"+i+"-lollipopEnd)")}let y={};return s&&(y.updatedPath=o),y.originalPath=n.points,y}(s,t,r,lp,n,e);((t,e)=>{Xc.info("Moving label abc78 ",t.id,t.label,Op[t.id]);let n=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){const e=Op[t.id];let r=t.x,i=t.y;if(n){const t=_h.calcLabelPosition(n);Xc.info("Moving label from (",r,",",i,") to (",t.x,",",t.y,") abc78")}e.attr("transform","translate("+r+", "+i+")")}if(t.startLabelLeft){const e=Bp[t.id].startLeft;let r=t.x,i=t.y;if(n){const e=_h.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);r=e.x,i=e.y}e.attr("transform","translate("+r+", "+i+")")}if(t.startLabelRight){const e=Bp[t.id].startRight;let r=t.x,i=t.y;if(n){const e=_h.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);r=e.x,i=e.y}e.attr("transform","translate("+r+", "+i+")")}if(t.endLabelLeft){const e=Bp[t.id].endLeft;let r=t.x,i=t.y;if(n){const e=_h.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);r=e.x,i=e.y}e.attr("transform","translate("+r+", "+i+")")}if(t.endLabelRight){const e=Bp[t.id].endRight;let r=t.x,i=t.y;if(n){const e=_h.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);r=e.x,i=e.y}e.attr("transform","translate("+r+", "+i+")")}})(r,i)})),e.nodes().forEach((function(t){const n=e.node(t);Xc.info(t,n.type,n.diff),"group"===n.type&&(u=n.diff)})),{elem:a,diff:u}},Pp=(t,e,n,r,i)=>{((t,e,n,r)=>{e.forEach((e=>{ip[e](t,n,r)}))})(t,n,r,i),Mp={},Op={},Bp={},Lp={},up={},hp={},lp={},Xc.warn("Graph at first:",$c.json.write(e)),((t,e)=>{t?(Xc.debug("Opting in, graph "),t.nodes().forEach((function(e){t.children(e).length>0&&(Xc.warn("Cluster identified",e," Replacement id in edges: ",gp(e,t)),up[e]=pp(e,t),lp[e]={id:gp(e,t),clusterData:t.node(e)})})),t.nodes().forEach((function(e){const n=t.children(e),r=t.edges();n.length>0?(Xc.debug("Cluster identified",e,up),r.forEach((t=>{t.v!==e&&t.w!==e&&fp(t.v,e)^fp(t.w,e)&&(Xc.warn("Edge: ",t," leaves cluster ",e),Xc.warn("Decendants of XXX ",e,": ",up[e]),lp[e].externalConnections=!0)}))):Xc.debug("Not a cluster ",e,up)})),t.edges().forEach((function(e){const n=t.edge(e);Xc.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),Xc.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));let r=e.v,i=e.w;if(Xc.warn("Fix XXX",lp,"ids:",e.v,e.w,"Translateing: ",lp[e.v]," --- ",lp[e.w]),lp[e.v]&&lp[e.w]&&lp[e.v]===lp[e.w]){Xc.warn("Fixing and trixing link to self - removing XXX",e.v,e.w,e.name),Xc.warn("Fixing and trixing - removing XXX",e.v,e.w,e.name),r=yp(e.v),i=yp(e.w),t.removeEdge(e.v,e.w,e.name);const a=e.w+"---"+e.v;t.setNode(a,{domId:a,id:a,labelStyle:"",labelText:n.label,padding:0,shape:"labelRect",style:""});const o=JSON.parse(JSON.stringify(n)),s=JSON.parse(JSON.stringify(n));o.label="",o.arrowTypeEnd="none",s.label="",o.fromCluster=e.v,s.toCluster=e.v,t.setEdge(r,a,o,e.name+"-cyclic-special"),t.setEdge(a,i,s,e.name+"-cyclic-special")}else(lp[e.v]||lp[e.w])&&(Xc.warn("Fixing and trixing - removing XXX",e.v,e.w,e.name),r=yp(e.v),i=yp(e.w),t.removeEdge(e.v,e.w,e.name),r!==e.v&&(n.fromCluster=e.v),i!==e.w&&(n.toCluster=e.w),Xc.warn("Fix Replacing with XXX",r,i,e.name),t.setEdge(r,i,n,e.name))})),Xc.warn("Adjusted Graph",$c.json.write(t)),mp(t,0),Xc.trace(lp)):Xc.debug("Opting out, no graph ")})(e),Xc.warn("Graph after:",$c.json.write(e)),Rp(t,e,r)};function $p(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}const jp={setConf:function(t){Object.keys(t).forEach((function(e){t[e]}))},draw:function(t,e,n,r){Xc.info("Drawing class - ",e);const i=Mh().flowchart,a=Mh().securityLevel;Xc.info("config:",i);const o=i.nodeSpacing||50,s=i.rankSpacing||50,c=new $c.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r.db.getDirection(),nodesep:o,ranksep:s,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),l=r.db.getClasses(),u=r.db.getRelations();let h;Xc.info(u),function(t,e,n,r){const i=Object.keys(t);Xc.info("keys:",i),Xc.info(t),i.forEach((function(n){const i=t[n];let a="";i.cssClasses.length>0&&(a=a+" "+i.cssClasses.join(" "));const o={labelStyle:""};let s=void 0!==i.text?i.text:i.id,c="";var l;i.type,c="class_box",e.setNode(i.id,{labelStyle:o.labelStyle,shape:c,labelText:(l=s,ol.sanitizeText(l,Mh())),classData:i,rx:0,ry:0,class:a,style:o.style,id:i.id,domId:i.domId,tooltip:r.db.getTooltip(i.id)||"",haveCallback:i.haveCallback,link:i.link,width:"group"===i.type?500:void 0,type:i.type,padding:Mh().flowchart.padding}),Xc.info("setNode",{labelStyle:o.labelStyle,shape:c,labelText:s,rx:0,ry:0,class:a,style:o.style,id:i.id,width:"group"===i.type?500:void 0,type:i.type,padding:Mh().flowchart.padding})}))}(l,c,0,r),function(t,e){const n=Mh().flowchart;let r=0;t.forEach((function(i){r++;const 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",Xc.info(a,i),a.startLabelRight="none"===i.relationTitle1?"":i.relationTitle1,a.endLabelLeft="none"===i.relationTitle2?"":i.relationTitle2,a.arrowTypeStart=$p(i.relation.type1),a.arrowTypeEnd=$p(i.relation.type2);let o="",s="";if(void 0!==i.style){const t=ah(i.style);o=t.style,s=t.labelStyle}else o="fill:none";a.style=o,a.labelStyle=s,void 0!==i.interpolate?a.curve=rh(i.interpolate,as):void 0!==t.defaultInterpolate?a.curve=rh(t.defaultInterpolate,as):a.curve=rh(n.curve,as),i.text=i.title,void 0===i.text?void 0!==i.style&&(a.arrowheadStyle="fill: #333"):(a.arrowheadStyle="fill: #333",a.labelpos="c",Mh().flowchart.htmlLabels?(a.labelType="html",a.label='<span class="edgeLabel">'+i.text+"</span>"):(a.labelType="text",a.label=i.text.replace(ol.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)}))}(u,c),"sandbox"===a&&(h=Co("#i"+e));const f=Co("sandbox"===a?h.nodes()[0].contentDocument.body:"body"),d=f.select(`[id="${e}"]`),p=f.select("#"+e+" g");if(Pp(p,c,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),Rh(c,d,i.diagramPadding,i.useMaxWidth),!i.htmlLabels){const t="sandbox"===a?h.nodes()[0].contentDocument:document,n=t.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(let e=0;e<n.length;e++){const r=n[e],i=r.getBBox(),a=t.createElementNS("http://www.w3.org/2000/svg","rect");a.setAttribute("rx",0),a.setAttribute("ry",0),a.setAttribute("width",i.width),a.setAttribute("height",i.height),r.insertBefore(a,r.firstChild)}}Pf(r.db,d,e)}};var Yp=function(){var t,e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,2],r=[1,5],i=[6,9,11,23,25,27,29,30,31,49],a=[1,17],o=[1,18],s=[1,19],c=[1,20],l=[1,21],u=[1,22],h=[1,25],f=[1,30],d=[1,31],p=[1,32],g=[1,33],y=[6,9,11,15,20,23,25,27,29,30,31,42,43,44,45,49],m=[1,45],b=[30,31,46,47],_=[4,6,9,11,23,25,27,29,30,31,49],v=[42,43,44,45],x=[22,37],k=[1,64],w={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,BLOCK_START:20,attributes:21,BLOCK_STOP:22,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,ENTITY_NAME:31,attribute:32,attributeType:33,attributeName:34,attributeKeyType:35,attributeComment:36,ATTRIBUTE_WORD:37,ATTRIBUTE_KEY:38,COMMENT:39,cardinality:40,relType:41,ZERO_OR_ONE:42,ZERO_OR_MORE:43,ONE_OR_MORE:44,ONLY_ONE:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,open_directive:49,type_directive:50,arg_directive:51,close_directive:52,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"title",24:"title_value",25:"acc_title",26:"acc_title_value",27:"acc_descr",28:"acc_descr_value",29:"acc_descr_multiline_value",30:"ALPHANUM",31:"ENTITY_NAME",37:"ATTRIBUTE_WORD",38:"ATTRIBUTE_KEY",39:"COMMENT",42:"ZERO_OR_ONE",43:"ZERO_OR_MORE",44:"ONE_OR_MORE",45:"ONLY_ONE",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD",49:"open_directive",50:"type_directive",51:"arg_directive",52:"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],[10,4],[10,3],[10,1],[10,2],[10,2],[10,2],[10,1],[17,1],[17,1],[21,1],[21,2],[32,2],[32,3],[32,3],[32,4],[33,1],[34,1],[35,1],[36,1],[18,3],[40,1],[40,1],[40,1],[40,1],[41,1],[41,1],[19,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 3:case 7:case 8:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:case 20:case 41:case 28:case 29:case 30:this.$=a[s];break;case 12:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 13:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s]);break;case 16:case 17:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 18:case 19:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 21:case 39:case 40:case 31:this.$=a[s].replace(/"/g,"");break;case 22:this.$=[a[s]];break;case 23:a[s].push(a[s-1]),this.$=a[s];break;case 24:this.$={attributeType:a[s-1],attributeName:a[s]};break;case 25:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeKeyType:a[s]};break;case 26:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeComment:a[s]};break;case 27:this.$={attributeType:a[s-3],attributeName:a[s-2],attributeKeyType:a[s-1],attributeComment:a[s]};break;case 32:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 33:this.$=r.Cardinality.ZERO_OR_ONE;break;case 34:this.$=r.Cardinality.ZERO_OR_MORE;break;case 35:this.$=r.Cardinality.ONE_OR_MORE;break;case 36:this.$=r.Cardinality.ONLY_ONE;break;case 37:this.$=r.Identification.NON_IDENTIFYING;break;case 38:this.$=r.Identification.IDENTIFYING;break;case 42:r.parseDirective("%%{","open_directive");break;case 43:r.parseDirective(a[s],"type_directive");break;case 44:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 45:r.parseDirective("}%%","close_directive","er")}},table:[{3:1,4:n,7:3,12:4,49:r},{1:[3]},e(i,[2,3],{5:6}),{3:7,4:n,7:3,12:4,49:r},{13:8,50:[1,9]},{50:[2,42]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:a,25:o,27:s,29:c,30:l,31:u,49:r},{1:[2,2]},{14:23,15:[1,24],52:h},e([15,52],[2,43]),e(i,[2,8],{1:[2,1]}),e(i,[2,4]),{7:15,10:26,12:4,17:16,23:a,25:o,27:s,29:c,30:l,31:u,49:r},e(i,[2,6]),e(i,[2,7]),e(i,[2,11]),e(i,[2,15],{18:27,40:29,20:[1,28],42:f,43:d,44:p,45:g}),{24:[1,34]},{26:[1,35]},{28:[1,36]},e(i,[2,19]),e(y,[2,20]),e(y,[2,21]),{11:[1,37]},{16:38,51:[1,39]},{11:[2,45]},e(i,[2,5]),{17:40,30:l,31:u},{21:41,22:[1,42],32:43,33:44,37:m},{41:46,46:[1,47],47:[1,48]},e(b,[2,33]),e(b,[2,34]),e(b,[2,35]),e(b,[2,36]),e(i,[2,16]),e(i,[2,17]),e(i,[2,18]),e(_,[2,9]),{14:49,52:h},{52:[2,44]},{15:[1,50]},{22:[1,51]},e(i,[2,14]),{21:52,22:[2,22],32:43,33:44,37:m},{34:53,37:[1,54]},{37:[2,28]},{40:55,42:f,43:d,44:p,45:g},e(v,[2,37]),e(v,[2,38]),{11:[1,56]},{19:57,30:[1,60],31:[1,59],48:[1,58]},e(i,[2,13]),{22:[2,23]},e(x,[2,24],{35:61,36:62,38:[1,63],39:k}),e([22,37,38,39],[2,29]),e([30,31],[2,32]),e(_,[2,10]),e(i,[2,12]),e(i,[2,39]),e(i,[2,40]),e(i,[2,41]),e(x,[2,25],{36:65,39:k}),e(x,[2,26]),e([22,37,39],[2,30]),e(x,[2,31]),e(x,[2,27])],defaultActions:{5:[2,42],7:[2,2],25:[2,45],39:[2,44],45:[2,28],52:[2,23]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,f=a.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;a.push(y);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||d.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,v,x,k,w,T,E,C,S={};;){if(v=n[n.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null==_&&(_=b()),x=o[v]&&o[v][_]),void 0===x||!x.length||!x[0]){var A="";for(w in C=[],o[v])this.terminals_[w]&&w>u&&C.push("'"+this.terminals_[w]+"'");A=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:y,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+_);switch(x[0]){case 1:n.push(_),i.push(d.yytext),a.push(d.yylloc),n.push(x[1]),_=null,l=d.yyleng,s=d.yytext,c=d.yylineno,y=d.yylloc;break;case 2:if(T=this.productions_[x[1]][1],S.$=i[i.length-T],S._$={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},m&&(S._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[s,l,c,p.yy,x[1],i,a].concat(f))))return k;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[x[1]][0]),i.push(S.$),a.push(S._$),E=o[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0}},T=(t={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,n=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 r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[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 n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;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,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,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[r]))&&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(){return this.next()||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,n,r){switch(n){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.begin("open_directive"),49;case 8:return this.begin("type_directive"),50;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),52;case 11:return 51;case 12:case 13:case 15:case 21:case 26:break;case 14:return 11;case 16:return 9;case 17:return 31;case 18:return 48;case 19:return 4;case 20:return this.begin("block"),20;case 22:return 38;case 23:case 24:return 37;case 25:return 39;case 27:return this.popState(),22;case 28:case 41:return e.yytext[0];case 29:case 33:return 42;case 30:case 34:return 43;case 31:case 35:return 44;case 32:return 45;case 36:case 38:case 39:return 46;case 37:return 47;case 40:return 30;case 42:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[A-Za-z][A-Za-z0-9\-_\[\]]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/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:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[21,22,23,24,25,26,27,28],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,20,29,30,31,32,33,34,35,36,37,38,39,40,41,42],inclusive:!0}}},t);function E(){this.yy={}}return w.lexer=T,E.prototype=w,w.Parser=E,new E}();Yp.parser=Yp;const zp=t=>null!==t.match(/^\s*erDiagram/);let Up={},qp=[];const Wp=function(t){return void 0===Up[t]&&(Up[t]={attributes:[]},Xc.info("Added new entity :",t)),Up[t]},Hp={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:function(t,e,n){jk.parseDirective(this,t,e,n)},getConfig:()=>Mh().er,addEntity:Wp,addAttributes:function(t,e){let n,r=Wp(t);for(n=e.length-1;n>=0;n--)r.attributes.push(e[n]),Xc.debug("Added attribute ",e[n].attributeName)},getEntities:()=>Up,addRelationship:function(t,e,n,r){let i={entityA:t,roleA:e,entityB:n,relSpec:r};qp.push(i),Xc.debug("Added new relationship :",i)},getRelationships:()=>qp,clear:function(){Up={},qp=[],pf()},setAccTitle:gf,getAccTitle:yf,setAccDescription:mf,getAccDescription:bf},Vp={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"},Gp=Vp,Xp=/[^A-Za-z0-9]([\W])*/g;let Zp={},Qp=new Map;const Kp=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")};let Jp=0;function tg(t=""){return t.length>0?`${t}-`:""}const eg={setConf:function(t){const e=Object.keys(t);for(let n=0;n<e.length;n++)Zp[e[n]]=t[e[n]]},draw:function(t,e,n,r){Zp=Mh().er,Xc.info("Drawing ER diagram");const i=Mh().securityLevel;let a;"sandbox"===i&&(a=Co("#i"+e));const o=Co("sandbox"===i?a.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);let s;(function(t,e){let n;t.append("defs").append("marker").attr("id",Vp.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",Vp.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"),n=t.append("defs").append("marker").attr("id",Vp.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),n.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),n=t.append("defs").append("marker").attr("id",Vp.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),n.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",Vp.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",Vp.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"),n=t.append("defs").append("marker").attr("id",Vp.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),n.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),n=t.append("defs").append("marker").attr("id",Vp.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),n.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")})(o,Zp),s=new $c.Graph({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:Zp.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));const c=function(t,e,n){let r;return Object.keys(e).forEach((function(i){const a=function(t="",e=""){const n=t.replace(Xp,"");return`${tg(e)}${tg(n)}${Wc()}`}(i,"entity");Qp.set(i,a);const o=t.append("g").attr("id",a);r=void 0===r?a:r;const s="text-"+a,c=o.append("text").attr("class","er entityLabel").attr("id",s).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("style","font-family: "+Mh().fontFamily+"; font-size: "+Zp.fontSize+"px").text(i),{width:l,height:u}=((t,e,n)=>{const r=Zp.entityPadding/3,i=Zp.entityPadding/3,a=.85*Zp.fontSize,o=e.node().getBBox(),s=[];let c=!1,l=!1,u=0,h=0,f=0,d=0,p=o.height+2*r,g=1;n.forEach((t=>{void 0!==t.attributeKeyType&&(c=!0),void 0!==t.attributeComment&&(l=!0)})),n.forEach((n=>{const i=`${e.node().id}-attr-${g}`;let o=0;const y=al(n.attributeType),m=t.append("text").attr("class","er entityLabel").attr("id",`${i}-type`).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+Mh().fontFamily+"; font-size: "+a+"px").text(y),b=t.append("text").attr("class","er entityLabel").attr("id",`${i}-name`).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+Mh().fontFamily+"; font-size: "+a+"px").text(n.attributeName),_={};_.tn=m,_.nn=b;const v=m.node().getBBox(),x=b.node().getBBox();if(u=Math.max(u,v.width),h=Math.max(h,x.width),o=Math.max(v.height,x.height),c){const e=t.append("text").attr("class","er entityLabel").attr("id",`${i}-key`).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+Mh().fontFamily+"; font-size: "+a+"px").text(n.attributeKeyType||"");_.kn=e;const r=e.node().getBBox();f=Math.max(f,r.width),o=Math.max(o,r.height)}if(l){const e=t.append("text").attr("class","er entityLabel").attr("id",`${i}-comment`).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+Mh().fontFamily+"; font-size: "+a+"px").text(n.attributeComment||"");_.cn=e;const r=e.node().getBBox();d=Math.max(d,r.width),o=Math.max(o,r.height)}_.height=o,s.push(_),p+=o+2*r,g+=1}));let y=4;c&&(y+=2),l&&(y+=2);const m=u+h+f+d,b={width:Math.max(Zp.minEntityWidth,Math.max(o.width+2*Zp.entityPadding,m+i*y)),height:n.length>0?p:Math.max(Zp.minEntityHeight,o.height+2*Zp.entityPadding)};if(n.length>0){const n=Math.max(0,(b.width-m-i*y)/(y/2));e.attr("transform","translate("+b.width/2+","+(r+o.height/2)+")");let a=o.height+2*r,p="attributeBoxOdd";s.forEach((e=>{const o=a+r+e.height/2;e.tn.attr("transform","translate("+i+","+o+")");const s=t.insert("rect","#"+e.tn.node().id).attr("class",`er ${p}`).attr("fill",Zp.fill).attr("fill-opacity","100%").attr("stroke",Zp.stroke).attr("x",0).attr("y",a).attr("width",u+2*i+n).attr("height",e.height+2*r),g=parseFloat(s.attr("x"))+parseFloat(s.attr("width"));e.nn.attr("transform","translate("+(g+i)+","+o+")");const y=t.insert("rect","#"+e.nn.node().id).attr("class",`er ${p}`).attr("fill",Zp.fill).attr("fill-opacity","100%").attr("stroke",Zp.stroke).attr("x",g).attr("y",a).attr("width",h+2*i+n).attr("height",e.height+2*r);let m=parseFloat(y.attr("x"))+parseFloat(y.attr("width"));if(c){e.kn.attr("transform","translate("+(m+i)+","+o+")");const s=t.insert("rect","#"+e.kn.node().id).attr("class",`er ${p}`).attr("fill",Zp.fill).attr("fill-opacity","100%").attr("stroke",Zp.stroke).attr("x",m).attr("y",a).attr("width",f+2*i+n).attr("height",e.height+2*r);m=parseFloat(s.attr("x"))+parseFloat(s.attr("width"))}l&&(e.cn.attr("transform","translate("+(m+i)+","+o+")"),t.insert("rect","#"+e.cn.node().id).attr("class",`er ${p}`).attr("fill",Zp.fill).attr("fill-opacity","100%").attr("stroke",Zp.stroke).attr("x",m).attr("y",a).attr("width",d+2*i+n).attr("height",e.height+2*r)),a+=e.height+2*r,p="attributeBoxOdd"===p?"attributeBoxEven":"attributeBoxOdd"}))}else b.height=Math.max(Zp.minEntityHeight,p),e.attr("transform","translate("+b.width/2+","+b.height/2+")");return b})(o,c,e[i].attributes),h=o.insert("rect","#"+s).attr("class","er entityBox").attr("fill",Zp.fill).attr("fill-opacity","100%").attr("stroke",Zp.stroke).attr("x",0).attr("y",0).attr("width",l).attr("height",u).node().getBBox();n.setNode(a,{width:h.width,height:h.height,shape:"rect",id:a})})),r}(o,r.db.getEntities(),s),l=function(t,e){return t.forEach((function(t){e.setEdge(Qp.get(t.entityA),Qp.get(t.entityB),{relationship:t},Kp(t))})),t}(r.db.getRelationships(),s);Pc.layout(s),function(t,e){e.nodes().forEach((function(n){void 0!==n&&void 0!==e.node(n)&&t.select("#"+n).attr("transform","translate("+(e.node(n).x-e.node(n).width/2)+","+(e.node(n).y-e.node(n).height/2)+" )")}))}(o,s),l.forEach((function(t){!function(t,e,n,r,i){Jp++;const a=n.edge(Qp.get(e.entityA),Qp.get(e.entityB),Kp(e)),o=cs().x((function(t){return t.x})).y((function(t){return t.y})).curve(ps),s=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",o(a.points)).attr("stroke",Zp.stroke).attr("fill","none");e.relSpec.relType===i.db.Identification.NON_IDENTIFYING&&s.attr("stroke-dasharray","8,8");let c="";switch(Zp.arrowMarkerAbsolute&&(c=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,c=c.replace(/\(/g,"\\("),c=c.replace(/\)/g,"\\)")),e.relSpec.cardA){case i.db.Cardinality.ZERO_OR_ONE:s.attr("marker-end","url("+c+"#"+Gp.ZERO_OR_ONE_END+")");break;case i.db.Cardinality.ZERO_OR_MORE:s.attr("marker-end","url("+c+"#"+Gp.ZERO_OR_MORE_END+")");break;case i.db.Cardinality.ONE_OR_MORE:s.attr("marker-end","url("+c+"#"+Gp.ONE_OR_MORE_END+")");break;case i.db.Cardinality.ONLY_ONE:s.attr("marker-end","url("+c+"#"+Gp.ONLY_ONE_END+")")}switch(e.relSpec.cardB){case i.db.Cardinality.ZERO_OR_ONE:s.attr("marker-start","url("+c+"#"+Gp.ZERO_OR_ONE_START+")");break;case i.db.Cardinality.ZERO_OR_MORE:s.attr("marker-start","url("+c+"#"+Gp.ZERO_OR_MORE_START+")");break;case i.db.Cardinality.ONE_OR_MORE:s.attr("marker-start","url("+c+"#"+Gp.ONE_OR_MORE_START+")");break;case i.db.Cardinality.ONLY_ONE:s.attr("marker-start","url("+c+"#"+Gp.ONLY_ONE_START+")")}const l=s.node().getTotalLength(),u=s.node().getPointAtLength(.5*l),h="rel"+Jp,f=t.append("text").attr("class","er relationshipLabel").attr("id",h).attr("x",u.x).attr("y",u.y).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("style","font-family: "+Mh().fontFamily+"; font-size: "+Zp.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+h).attr("class","er relationshipLabelBox").attr("x",u.x-f.width/2).attr("y",u.y-f.height/2).attr("width",f.width).attr("height",f.height).attr("fill","white").attr("fill-opacity","85%")}(o,t,s,c,r)}));const u=Zp.diagramPadding,h=o.node().getBBox(),f=h.width+2*u,d=h.height+2*u;Fh(o,0,f,Zp.useMaxWidth),o.attr("viewBox",`${h.x-u} ${h.y-u} ${f} ${d}`),Pf(r.db,o,e)}};var ng=function(){var t,e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,9],r=[1,7],i=[1,6],a=[1,8],o=[1,20,21,22,23,38,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],s=[2,10],c=[1,20],l=[1,21],u=[1,22],h=[1,23],f=[1,30],d=[1,32],p=[1,33],g=[1,34],y=[1,62],m=[1,48],b=[1,52],_=[1,36],v=[1,37],x=[1,38],k=[1,39],w=[1,40],T=[1,56],E=[1,63],C=[1,51],S=[1,53],A=[1,55],M=[1,59],N=[1,60],D=[1,41],L=[1,42],O=[1,43],B=[1,44],I=[1,61],F=[1,50],R=[1,54],P=[1,57],$=[1,58],j=[1,49],Y=[1,66],z=[1,71],U=[1,20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],q=[1,75],W=[1,74],H=[1,76],V=[20,21,23,81,82],G=[1,99],X=[1,104],Z=[1,107],Q=[1,108],K=[1,101],J=[1,106],tt=[1,109],et=[1,102],nt=[1,114],rt=[1,113],it=[1,103],at=[1,105],ot=[1,110],st=[1,111],ct=[1,112],lt=[1,115],ut=[20,21,22,23,81,82],ht=[20,21,22,23,53,81,82],ft=[20,21,22,23,40,52,53,55,57,59,61,63,65,66,67,69,71,73,74,76,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],dt=[20,21,23],pt=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],gt=[1,12,20,21,22,23,24,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],yt=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],mt=[1,149],bt=[1,157],_t=[1,158],vt=[1,159],xt=[1,160],kt=[1,144],wt=[1,145],Tt=[1,141],Et=[1,152],Ct=[1,153],St=[1,154],At=[1,155],Mt=[1,156],Nt=[1,161],Dt=[1,162],Lt=[1,147],Ot=[1,150],Bt=[1,146],It=[1,143],Ft=[20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Rt=[1,165],Pt=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],$t=[20,21,22,23,24,26,38,40,41,42,52,56,58,60,62,64,66,67,68,70,72,73,75,77,81,82,86,87,88,89,90,91,92,95,105,106,109,111,112,113,114,122,123,124,125,126,127],jt=[12,21,22,24],Yt=[22,106],zt=[1,250],Ut=[1,245],qt=[1,246],Wt=[1,254],Ht=[1,251],Vt=[1,248],Gt=[1,247],Xt=[1,249],Zt=[1,252],Qt=[1,253],Kt=[1,255],Jt=[1,273],te=[20,21,23,106],ee=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],ne={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,direction:43,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,link:49,node:50,vertex:51,AMP:52,STYLE_SEPARATOR:53,idString:54,DOUBLECIRCLESTART:55,DOUBLECIRCLEEND:56,PS:57,PE:58,"(-":59,"-)":60,STADIUMSTART:61,STADIUMEND:62,SUBROUTINESTART:63,SUBROUTINEEND:64,VERTEX_WITH_PROPS_START:65,ALPHA:66,COLON:67,PIPE:68,CYLINDERSTART:69,CYLINDEREND:70,DIAMOND_START:71,DIAMOND_STOP:72,TAGEND:73,TRAPSTART:74,TRAPEND:75,INVTRAPSTART:76,INVTRAPEND:77,linkStatement:78,arrowText:79,TESTSTR:80,START_LINK:81,LINK:82,textToken:83,STR:84,keywords:85,STYLE:86,LINKSTYLE:87,CLASSDEF:88,CLASS:89,CLICK:90,DOWN:91,UP:92,textNoTags:93,textNoTagsToken:94,DEFAULT:95,stylesOpt:96,alphaNum:97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,HEX:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,MINUS:109,UNIT:110,BRKT:111,DOT:112,PCT:113,TAGSTART:114,alphaNumToken:115,idStringToken:116,alphaNumStatement:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,PUNCTUATION:122,UNICODE_TEXT:123,PLUS:124,EQUALS:125,MULT:126,UNDERSCORE:127,graphCodeTokens:128,ARROW_CROSS:129,ARROW_POINT:130,ARROW_CIRCLE:131,ARROW_OPEN:132,QUOTE:133,$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",44:"acc_title",45:"acc_title_value",46:"acc_descr",47:"acc_descr_value",48:"acc_descr_multiline_value",52:"AMP",53:"STYLE_SEPARATOR",55:"DOUBLECIRCLESTART",56:"DOUBLECIRCLEEND",57:"PS",58:"PE",59:"(-",60:"-)",61:"STADIUMSTART",62:"STADIUMEND",63:"SUBROUTINESTART",64:"SUBROUTINEEND",65:"VERTEX_WITH_PROPS_START",66:"ALPHA",67:"COLON",68:"PIPE",69:"CYLINDERSTART",70:"CYLINDEREND",71:"DIAMOND_START",72:"DIAMOND_STOP",73:"TAGEND",74:"TRAPSTART",75:"TRAPEND",76:"INVTRAPSTART",77:"INVTRAPEND",80:"TESTSTR",81:"START_LINK",82:"LINK",84:"STR",86:"STYLE",87:"LINKSTYLE",88:"CLASSDEF",89:"CLASS",90:"CLICK",91:"DOWN",92:"UP",95:"DEFAULT",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"HEX",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"MINUS",110:"UNIT",111:"BRKT",112:"DOT",113:"PCT",114:"TAGSTART",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr",122:"PUNCTUATION",123:"UNICODE_TEXT",124:"PLUS",125:"EQUALS",126:"MULT",127:"UNDERSCORE",129:"ARROW_CROSS",130:"ARROW_POINT",131:"ARROW_CIRCLE",132:"ARROW_OPEN",133:"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],[19,1],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[50,1],[50,5],[50,3],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,8],[51,4],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,4],[51,4],[51,1],[49,2],[49,3],[49,3],[49,1],[49,3],[78,1],[79,3],[39,1],[39,2],[39,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[93,1],[93,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[103,1],[103,3],[96,1],[96,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[94,1],[94,1],[94,1],[94,1],[54,1],[54,2],[97,1],[97,2],[117,1],[117,1],[117,1],[117,1],[43,1],[43,1],[43,1],[43,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.parseDirective("%%{","open_directive");break;case 6:r.parseDirective(a[s],"type_directive");break;case 7:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 8:r.parseDirective("}%%","close_directive","flowchart");break;case 10:case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 11:(!Array.isArray(a[s])||a[s].length>0)&&a[s-1].push(a[s]),this.$=a[s-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:case 78:case 150:this.$=a[s];break;case 19:r.setDirection("TB"),this.$="TB";break;case 20:r.setDirection(a[s-1]),this.$=a[s-1];break;case 35:this.$=a[s-1].nodes;break;case 41:this.$=r.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 42:this.$=r.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 43:this.$=r.addSubGraph(void 0,a[s-1],void 0);break;case 45:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 46:case 47:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 51:r.addLink(a[s-2].stmt,a[s],a[s-1]),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 52:r.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 53:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 54:this.$={stmt:a[s],nodes:a[s]};break;case 55:case 123:case 125:this.$=[a[s]];break;case 56:this.$=a[s-4].concat(a[s]);break;case 57:this.$=[a[s-2]],r.setClass(a[s-2],a[s]);break;case 58:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"square");break;case 59:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"doublecircle");break;case 60:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"circle");break;case 61:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"ellipse");break;case 62:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"stadium");break;case 63:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"subroutine");break;case 64:this.$=a[s-7],r.addVertex(a[s-7],a[s-1],"rect",void 0,void 0,void 0,Object.fromEntries([[a[s-5],a[s-3]]]));break;case 65:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"cylinder");break;case 66:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"round");break;case 67:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"diamond");break;case 68:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"hexagon");break;case 69:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"odd");break;case 70:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"trapezoid");break;case 71:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"inv_trapezoid");break;case 72:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_right");break;case 73:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_left");break;case 74:this.$=a[s],r.addVertex(a[s]);break;case 75:a[s-1].text=a[s],this.$=a[s-1];break;case 76:case 77:a[s-2].text=a[s-1],this.$=a[s-2];break;case 79:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1]};break;case 80:c=r.destructLink(a[s]),this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 81:this.$=a[s-1];break;case 83:case 97:case 153:case 151:this.$=a[s-1]+""+a[s];break;case 98:case 99:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 100:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 101:case 109:this.$=a[s-1],r.setClickEvent(a[s-1],a[s]);break;case 102:case 110:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 103:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 104:this.$=a[s-4],r.setClickEvent(a[s-4],a[s-3],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 105:case 111:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 106:case 112:this.$=a[s-3],r.setLink(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 107:case 113:this.$=a[s-3],r.setLink(a[s-3],a[s-2],a[s]);break;case 108:case 114:this.$=a[s-5],r.setLink(a[s-5],a[s-4],a[s]),r.setTooltip(a[s-5],a[s-2]);break;case 115:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 116:case 118:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 117:this.$=a[s-4],r.updateLink([a[s-2]],a[s]);break;case 119:this.$=a[s-8],r.updateLinkInterpolate([a[s-6]],a[s-2]),r.updateLink([a[s-6]],a[s]);break;case 120:this.$=a[s-8],r.updateLinkInterpolate(a[s-6],a[s-2]),r.updateLink(a[s-6],a[s]);break;case 121:this.$=a[s-6],r.updateLinkInterpolate([a[s-4]],a[s]);break;case 122:this.$=a[s-6],r.updateLinkInterpolate(a[s-4],a[s]);break;case 124:case 126:a[s-2].push(a[s]),this.$=a[s-2];break;case 128:this.$=a[s-1]+a[s];break;case 156:this.$="v";break;case 157:this.$="-";break;case 158:this.$={stmt:"dir",value:"TB"};break;case 159:this.$={stmt:"dir",value:"BT"};break;case 160:this.$={stmt:"dir",value:"RL"};break;case 161:this.$={stmt:"dir",value:"LR"}}},table:[{3:1,4:2,5:3,6:5,12:n,16:4,21:r,22:i,24:a},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:n,16:4,21:r,22:i,24:a},e(o,s,{17:11}),{7:12,13:[1,13]},{16:14,21:r,22:i,24:a},{16:15,21:r,22:i,24:a},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:c,21:l,22:u,23:h,32:24,33:25,34:26,35:27,36:28,37:29,38:f,43:31,44:d,46:p,48:g,50:35,51:45,52:y,54:46,66:m,67:b,86:_,87:v,88:x,89:k,90:w,91:T,95:E,105:C,106:S,109:A,111:M,112:N,116:47,118:D,119:L,120:O,121:B,122:I,123:F,124:R,125:P,126:$,127:j},{8:64,10:[1,65],15:Y},e([10,15],[2,6]),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),{20:[1,68],21:[1,69],22:z,27:67,30:70},e(U,[2,11]),e(U,[2,12]),e(U,[2,13]),e(U,[2,14]),e(U,[2,15]),e(U,[2,16]),{9:72,20:q,21:W,23:H,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:q,21:W,23:H},{9:81,20:q,21:W,23:H},{9:82,20:q,21:W,23:H},{9:83,20:q,21:W,23:H},{9:84,20:q,21:W,23:H},{9:86,20:q,21:W,22:[1,85],23:H},e(U,[2,44]),{45:[1,87]},{47:[1,88]},e(U,[2,47]),e(V,[2,54],{30:89,22:z}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:G,52:X,66:Z,67:Q,84:[1,97],91:K,97:96,98:[1,94],100:[1,95],105:J,106:tt,109:et,111:nt,112:rt,115:100,117:98,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(U,[2,158]),e(U,[2,159]),e(U,[2,160]),e(U,[2,161]),e(ut,[2,55],{53:[1,116]}),e(ht,[2,74],{116:129,40:[1,117],52:y,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:m,67:b,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:T,95:E,105:C,106:S,109:A,111:M,112:N,122:I,123:F,124:R,125:P,126:$,127:j}),e(ft,[2,150]),e(ft,[2,175]),e(ft,[2,176]),e(ft,[2,177]),e(ft,[2,178]),e(ft,[2,179]),e(ft,[2,180]),e(ft,[2,181]),e(ft,[2,182]),e(ft,[2,183]),e(ft,[2,184]),e(ft,[2,185]),e(ft,[2,186]),e(ft,[2,187]),e(ft,[2,188]),e(ft,[2,189]),e(ft,[2,190]),{9:130,20:q,21:W,23:H},{11:131,14:[1,132]},e(dt,[2,8]),e(o,[2,20]),e(o,[2,26]),e(o,[2,27]),{21:[1,133]},e(pt,[2,34],{30:134,22:z}),e(U,[2,35]),{50:135,51:45,52:y,54:46,66:m,67:b,91:T,95:E,105:C,106:S,109:A,111:M,112:N,116:47,122:I,123:F,124:R,125:P,126:$,127:j},e(gt,[2,48]),e(gt,[2,49]),e(gt,[2,50]),e(yt,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:mt,24:bt,26:_t,38:vt,39:139,42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},e([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),e(U,[2,36]),e(U,[2,37]),e(U,[2,38]),e(U,[2,39]),e(U,[2,40]),{22:mt,24:bt,26:_t,38:vt,39:163,42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(Ft,s,{17:164}),e(U,[2,45]),e(U,[2,46]),e(V,[2,53],{52:Rt}),{26:G,52:X,66:Z,67:Q,91:K,97:166,102:[1,167],105:J,106:tt,109:et,111:nt,112:rt,115:100,117:98,122:it,123:at,124:ot,125:st,126:ct,127:lt},{95:[1,168],103:169,105:[1,170]},{26:G,52:X,66:Z,67:Q,91:K,95:[1,171],97:172,105:J,106:tt,109:et,111:nt,112:rt,115:100,117:98,122:it,123:at,124:ot,125:st,126:ct,127:lt},{26:G,52:X,66:Z,67:Q,91:K,97:173,105:J,106:tt,109:et,111:nt,112:rt,115:100,117:98,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(dt,[2,101],{22:[1,174],99:[1,175]}),e(dt,[2,105],{22:[1,176]}),e(dt,[2,109],{115:100,117:178,22:[1,177],26:G,52:X,66:Z,67:Q,91:K,105:J,106:tt,109:et,111:nt,112:rt,122:it,123:at,124:ot,125:st,126:ct,127:lt}),e(dt,[2,111],{22:[1,179]}),e(Pt,[2,152]),e(Pt,[2,154]),e(Pt,[2,155]),e(Pt,[2,156]),e(Pt,[2,157]),e($t,[2,162]),e($t,[2,163]),e($t,[2,164]),e($t,[2,165]),e($t,[2,166]),e($t,[2,167]),e($t,[2,168]),e($t,[2,169]),e($t,[2,170]),e($t,[2,171]),e($t,[2,172]),e($t,[2,173]),e($t,[2,174]),{52:y,54:180,66:m,67:b,91:T,95:E,105:C,106:S,109:A,111:M,112:N,116:47,122:I,123:F,124:R,125:P,126:$,127:j},{22:mt,24:bt,26:_t,38:vt,39:181,42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,39:182,42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,39:184,42:xt,52:X,57:[1,183],66:Z,67:Q,73:kt,81:wt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,39:185,42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,39:186,42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,39:187,42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{66:[1,188]},{22:mt,24:bt,26:_t,38:vt,39:189,42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,39:190,42:xt,52:X,66:Z,67:Q,71:[1,191],73:kt,81:wt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,39:192,42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,39:193,42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,39:194,42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(ft,[2,151]),e(jt,[2,3]),{8:195,15:Y},{15:[2,7]},e(o,[2,28]),e(pt,[2,33]),e(V,[2,51],{30:196,22:z}),e(yt,[2,75],{22:[1,197]}),{22:[1,198]},{22:mt,24:bt,26:_t,38:vt,39:199,42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,42:xt,52:X,66:Z,67:Q,73:kt,81:wt,82:[1,200],83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},e($t,[2,82]),e($t,[2,84]),e($t,[2,140]),e($t,[2,141]),e($t,[2,142]),e($t,[2,143]),e($t,[2,144]),e($t,[2,145]),e($t,[2,146]),e($t,[2,147]),e($t,[2,148]),e($t,[2,149]),e($t,[2,85]),e($t,[2,86]),e($t,[2,87]),e($t,[2,88]),e($t,[2,89]),e($t,[2,90]),e($t,[2,91]),e($t,[2,92]),e($t,[2,93]),e($t,[2,94]),e($t,[2,95]),{9:203,20:q,21:W,22:mt,23:H,24:bt,26:_t,38:vt,40:[1,202],42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{18:18,19:19,20:c,21:l,22:u,23:h,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,204],43:31,44:d,46:p,48:g,50:35,51:45,52:y,54:46,66:m,67:b,86:_,87:v,88:x,89:k,90:w,91:T,95:E,105:C,106:S,109:A,111:M,112:N,116:47,118:D,119:L,120:O,121:B,122:I,123:F,124:R,125:P,126:$,127:j},{22:z,30:205},{22:[1,206],26:G,52:X,66:Z,67:Q,91:K,105:J,106:tt,109:et,111:nt,112:rt,115:100,117:178,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},e(Yt,[2,123]),{22:[1,211]},{22:[1,212],26:G,52:X,66:Z,67:Q,91:K,105:J,106:tt,109:et,111:nt,112:rt,115:100,117:178,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:[1,213],26:G,52:X,66:Z,67:Q,91:K,105:J,106:tt,109:et,111:nt,112:rt,115:100,117:178,122:it,123:at,124:ot,125:st,126:ct,127:lt},{84:[1,214]},e(dt,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},e(Pt,[2,153]),{84:[1,219],101:[1,220]},e(ut,[2,57],{116:129,52:y,66:m,67:b,91:T,95:E,105:C,106:S,109:A,111:M,112:N,122:I,123:F,124:R,125:P,126:$,127:j}),{22:mt,24:bt,26:_t,38:vt,41:[1,221],42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,42:xt,52:X,56:[1,222],66:Z,67:Q,73:kt,81:wt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,39:223,42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,42:xt,52:X,58:[1,224],66:Z,67:Q,73:kt,81:wt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,42:xt,52:X,60:[1,225],66:Z,67:Q,73:kt,81:wt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,42:xt,52:X,62:[1,226],66:Z,67:Q,73:kt,81:wt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,42:xt,52:X,64:[1,227],66:Z,67:Q,73:kt,81:wt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{67:[1,228]},{22:mt,24:bt,26:_t,38:vt,42:xt,52:X,66:Z,67:Q,70:[1,229],73:kt,81:wt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,42:xt,52:X,66:Z,67:Q,72:[1,230],73:kt,81:wt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,39:231,42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,41:[1,232],42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,42:xt,52:X,66:Z,67:Q,73:kt,75:[1,233],77:[1,234],81:wt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:bt,26:_t,38:vt,42:xt,52:X,66:Z,67:Q,73:kt,75:[1,236],77:[1,235],81:wt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{9:237,20:q,21:W,23:H},e(V,[2,52],{52:Rt}),e(yt,[2,77]),e(yt,[2,76]),{22:mt,24:bt,26:_t,38:vt,42:xt,52:X,66:Z,67:Q,68:[1,238],73:kt,81:wt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(yt,[2,79]),e($t,[2,83]),{22:mt,24:bt,26:_t,38:vt,39:239,42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(Ft,s,{17:240}),e(U,[2,43]),{51:241,52:y,54:46,66:m,67:b,91:T,95:E,105:C,106:S,109:A,111:M,112:N,116:47,122:I,123:F,124:R,125:P,126:$,127:j},{22:zt,66:Ut,67:qt,86:Wt,96:242,102:Ht,105:Vt,107:243,108:244,109:Gt,110:Xt,111:Zt,112:Qt,113:Kt},{22:zt,66:Ut,67:qt,86:Wt,96:256,102:Ht,105:Vt,107:243,108:244,109:Gt,110:Xt,111:Zt,112:Qt,113:Kt},{22:zt,66:Ut,67:qt,86:Wt,96:257,102:Ht,104:[1,258],105:Vt,107:243,108:244,109:Gt,110:Xt,111:Zt,112:Qt,113:Kt},{22:zt,66:Ut,67:qt,86:Wt,96:259,102:Ht,104:[1,260],105:Vt,107:243,108:244,109:Gt,110:Xt,111:Zt,112:Qt,113:Kt},{105:[1,261]},{22:zt,66:Ut,67:qt,86:Wt,96:262,102:Ht,105:Vt,107:243,108:244,109:Gt,110:Xt,111:Zt,112:Qt,113:Kt},{22:zt,66:Ut,67:qt,86:Wt,96:263,102:Ht,105:Vt,107:243,108:244,109:Gt,110:Xt,111:Zt,112:Qt,113:Kt},{26:G,52:X,66:Z,67:Q,91:K,97:264,105:J,106:tt,109:et,111:nt,112:rt,115:100,117:98,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(dt,[2,102]),{84:[1,265]},e(dt,[2,106],{22:[1,266]}),e(dt,[2,107]),e(dt,[2,110]),e(dt,[2,112],{22:[1,267]}),e(dt,[2,113]),e(ht,[2,58]),e(ht,[2,59]),{22:mt,24:bt,26:_t,38:vt,42:xt,52:X,58:[1,268],66:Z,67:Q,73:kt,81:wt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(ht,[2,66]),e(ht,[2,61]),e(ht,[2,62]),e(ht,[2,63]),{66:[1,269]},e(ht,[2,65]),e(ht,[2,67]),{22:mt,24:bt,26:_t,38:vt,42:xt,52:X,66:Z,67:Q,72:[1,270],73:kt,81:wt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(ht,[2,69]),e(ht,[2,70]),e(ht,[2,72]),e(ht,[2,71]),e(ht,[2,73]),e(jt,[2,4]),e([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:mt,24:bt,26:_t,38:vt,41:[1,271],42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{18:18,19:19,20:c,21:l,22:u,23:h,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,272],43:31,44:d,46:p,48:g,50:35,51:45,52:y,54:46,66:m,67:b,86:_,87:v,88:x,89:k,90:w,91:T,95:E,105:C,106:S,109:A,111:M,112:N,116:47,118:D,119:L,120:O,121:B,122:I,123:F,124:R,125:P,126:$,127:j},e(ut,[2,56]),e(dt,[2,115],{106:Jt}),e(te,[2,125],{108:274,22:zt,66:Ut,67:qt,86:Wt,102:Ht,105:Vt,109:Gt,110:Xt,111:Zt,112:Qt,113:Kt}),e(ee,[2,127]),e(ee,[2,129]),e(ee,[2,130]),e(ee,[2,131]),e(ee,[2,132]),e(ee,[2,133]),e(ee,[2,134]),e(ee,[2,135]),e(ee,[2,136]),e(ee,[2,137]),e(ee,[2,138]),e(ee,[2,139]),e(dt,[2,116],{106:Jt}),e(dt,[2,117],{106:Jt}),{22:[1,275]},e(dt,[2,118],{106:Jt}),{22:[1,276]},e(Yt,[2,124]),e(dt,[2,98],{106:Jt}),e(dt,[2,99],{106:Jt}),e(dt,[2,100],{115:100,117:178,26:G,52:X,66:Z,67:Q,91:K,105:J,106:tt,109:et,111:nt,112:rt,122:it,123:at,124:ot,125:st,126:ct,127:lt}),e(dt,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:q,21:W,23:H},e(U,[2,42]),{22:zt,66:Ut,67:qt,86:Wt,102:Ht,105:Vt,107:283,108:244,109:Gt,110:Xt,111:Zt,112:Qt,113:Kt},e(ee,[2,128]),{26:G,52:X,66:Z,67:Q,91:K,97:284,105:J,106:tt,109:et,111:nt,112:rt,115:100,117:98,122:it,123:at,124:ot,125:st,126:ct,127:lt},{26:G,52:X,66:Z,67:Q,91:K,97:285,105:J,106:tt,109:et,111:nt,112:rt,115:100,117:98,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(dt,[2,108]),e(dt,[2,114]),e(ht,[2,60]),{22:mt,24:bt,26:_t,38:vt,39:286,42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(ht,[2,68]),e(Ft,s,{17:287}),e(te,[2,126],{108:274,22:zt,66:Ut,67:qt,86:Wt,102:Ht,105:Vt,109:Gt,110:Xt,111:Zt,112:Qt,113:Kt}),e(dt,[2,121],{115:100,117:178,22:[1,288],26:G,52:X,66:Z,67:Q,91:K,105:J,106:tt,109:et,111:nt,112:rt,122:it,123:at,124:ot,125:st,126:ct,127:lt}),e(dt,[2,122],{115:100,117:178,22:[1,289],26:G,52:X,66:Z,67:Q,91:K,105:J,106:tt,109:et,111:nt,112:rt,122:it,123:at,124:ot,125:st,126:ct,127:lt}),{22:mt,24:bt,26:_t,38:vt,41:[1,290],42:xt,52:X,66:Z,67:Q,73:kt,81:wt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Lt,105:J,106:tt,109:Ot,111:nt,112:rt,113:Bt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{18:18,19:19,20:c,21:l,22:u,23:h,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,291],43:31,44:d,46:p,48:g,50:35,51:45,52:y,54:46,66:m,67:b,86:_,87:v,88:x,89:k,90:w,91:T,95:E,105:C,106:S,109:A,111:M,112:N,116:47,118:D,119:L,120:O,121:B,122:I,123:F,124:R,125:P,126:$,127:j},{22:zt,66:Ut,67:qt,86:Wt,96:292,102:Ht,105:Vt,107:243,108:244,109:Gt,110:Xt,111:Zt,112:Qt,113:Kt},{22:zt,66:Ut,67:qt,86:Wt,96:293,102:Ht,105:Vt,107:243,108:244,109:Gt,110:Xt,111:Zt,112:Qt,113:Kt},e(ht,[2,64]),e(U,[2,41]),e(dt,[2,119],{106:Jt}),e(dt,[2,120],{106:Jt})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,f=a.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;a.push(y);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||d.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,v,x,k,w,T,E,C,S={};;){if(v=n[n.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null==_&&(_=b()),x=o[v]&&o[v][_]),void 0===x||!x.length||!x[0]){var A="";for(w in C=[],o[v])this.terminals_[w]&&w>u&&C.push("'"+this.terminals_[w]+"'");A=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:y,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+_);switch(x[0]){case 1:n.push(_),i.push(d.yytext),a.push(d.yylloc),n.push(x[1]),_=null,l=d.yyleng,s=d.yytext,c=d.yylineno,y=d.yylloc;break;case 2:if(T=this.productions_[x[1]][1],S.$=i[i.length-T],S._$={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},m&&(S._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[s,l,c,p.yy,x[1],i,a].concat(f))))return k;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[x[1]][0]),i.push(S.$),a.push(S._$),E=o[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0}},re=(t={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,n=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 r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[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 n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;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,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,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[r]))&&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(){return this.next()||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,n,r){switch(n){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:return this.begin("acc_title"),44;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),46;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:case 15:case 24:case 27:case 30:case 33:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 16:return"STR";case 17:return 86;case 18:return 95;case 19:return 87;case 20:return 104;case 21:return 88;case 22:return 89;case 23:this.begin("href");break;case 25:return 100;case 26:this.begin("callbackname");break;case 28:this.popState(),this.begin("callbackargs");break;case 29:return 98;case 31:return 99;case 32:this.begin("click");break;case 34:return 90;case 35:case 36:return t.lex.firstGraph()&&this.begin("dir"),24;case 37:return 38;case 38:return 42;case 39:case 40:case 41:case 42:return 101;case 43:return this.popState(),25;case 44:case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:return this.popState(),26;case 54:return 118;case 55:return 119;case 56:return 120;case 57:return 121;case 58:return 105;case 59:return 111;case 60:return 53;case 61:return 67;case 62:return 52;case 63:return 20;case 64:return 106;case 65:return 126;case 66:case 67:case 68:case 69:return 82;case 70:case 71:case 72:return 81;case 73:return 59;case 74:return 60;case 75:return 61;case 76:return 62;case 77:return 63;case 78:return 64;case 79:return 65;case 80:return 69;case 81:return 70;case 82:return 55;case 83:return 56;case 84:return 109;case 85:return 112;case 86:return 127;case 87:return 124;case 88:return 113;case 89:case 90:return 125;case 91:return 114;case 92:return 73;case 93:return 92;case 94:return"SEP";case 95:return 91;case 96:return 66;case 97:return 75;case 98:return 74;case 99:return 77;case 100:return 76;case 101:return 122;case 102:return 123;case 103:return 68;case 104:return 57;case 105:return 58;case 106:return 40;case 107:return 41;case 108:return 71;case 109:return 72;case 110:return 133;case 111:return 21;case 112:return 22;case 113:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?: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)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\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},callbackargs:{rules:[30,31],inclusive:!1},callbackname:{rules:[27,28,29],inclusive:!1},href:{rules:[24,25],inclusive:!1},click:{rules:[33,34],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[43,44,45,46,47,48,49,50,51,52,53],inclusive:!1},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,5,6,7,9,11,14,17,18,19,20,21,22,23,26,32,35,36,37,38,39,40,41,42,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,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],inclusive:!0}}},t);function ie(){this.yy={}}return ne.lexer=re,ie.prototype=ne,ne.Parser=ie,new ie}();ng.parser=ng;const rg=(t,e)=>{var n;return"dagre-wrapper"!==(null==(n=null==e?void 0:e.flowchart)?void 0:n.defaultRenderer)&&null!==t.match(/^\s*graph/)},ig=(t,e)=>{var n;return"dagre-wrapper"===(null==(n=null==e?void 0:e.flowchart)?void 0:n.defaultRenderer)&&null!==t.match(/^\s*graph/)||null!==t.match(/^\s*flowchart/)};let ag,og,sg=0,cg=Mh(),lg={},ug=[],hg=[],fg=[],dg={},pg={},gg=0,yg=!0,mg=[];const bg=t=>ol.sanitizeText(t,cg),_g=function(t){const e=Object.keys(lg);for(let n=0;n<e.length;n++)if(lg[e[n]].id===t)return lg[e[n]].domId;return t},vg=function(t,e,n,r){const i={start:t,end:e,type:void 0,text:""};void 0!==(r=n.text)&&(i.text=bg(r.trim()),'"'===i.text[0]&&'"'===i.text[i.text.length-1]&&(i.text=i.text.substring(1,i.text.length-1))),void 0!==n&&(i.type=n.type,i.stroke=n.stroke,i.length=n.length),ug.push(i)},xg=function(t,e){t.split(",").forEach((function(t){let n=t;void 0!==lg[n]&&lg[n].classes.push(e),void 0!==dg[n]&&dg[n].classes.push(e)}))},kg=function(t){let e=Co(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Co("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Co(t).select("svg").selectAll("g.node").on("mouseover",(function(){const t=Co(this);if(null===t.attr("title"))return;const n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/&lt;br\/&gt;/g,"<br/>")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Co(this).classed("hover",!1)}))};mg.push(kg);const wg=function(t){for(let e=0;e<fg.length;e++)if(fg[e].id===t)return e;return-1};let Tg=-1;const Eg=[],Cg=function(t,e){const n=fg[e].nodes;if(Tg+=1,Tg>2e3)return;if(Eg[Tg]=e,fg[e].id===t)return{result:!0,count:0};let r=0,i=1;for(;r<n.length;){const e=wg(n[r]);if(e>=0){const n=Cg(t,e);if(n.result)return{result:!0,count:i+n.count};i+=n.count}r+=1}return{result:!1,count:i}},Sg=(t,e)=>{let n=!1;return t.forEach((t=>{t.nodes.indexOf(e)>=0&&(n=!0)})),n},Ag=(t,e)=>{const n=[];return t.nodes.forEach(((r,i)=>{Sg(e,r)||n.push(t.nodes[i])})),{nodes:n}},Mg={parseDirective:function(t,e,n){jk.parseDirective(this,t,e,n)},defaultConfig:()=>xh.flowchart,setAccTitle:gf,getAccTitle:yf,getAccDescription:bf,setAccDescription:mf,addVertex:function(t,e,n,r,i,a,o={}){let s,c=t;void 0!==c&&0!==c.trim().length&&(void 0===lg[c]&&(lg[c]={id:c,domId:"flowchart-"+c+"-"+sg,styles:[],classes:[]}),sg++,void 0!==e?(cg=Mh(),s=bg(e.trim()),'"'===s[0]&&'"'===s[s.length-1]&&(s=s.substring(1,s.length-1)),lg[c].text=s):void 0===lg[c].text&&(lg[c].text=t),void 0!==n&&(lg[c].type=n),null!=r&&r.forEach((function(t){lg[c].styles.push(t)})),null!=i&&i.forEach((function(t){lg[c].classes.push(t)})),void 0!==a&&(lg[c].dir=a),lg[c].props=o)},lookUpDomId:_g,addLink:function(t,e,n,r){let i,a;for(i=0;i<t.length;i++)for(a=0;a<e.length;a++)vg(t[i],e[a],n,r)},updateLinkInterpolate:function(t,e){t.forEach((function(t){"default"===t?ug.defaultInterpolate=e:ug[t].interpolate=e}))},updateLink:function(t,e){t.forEach((function(t){"default"===t?ug.defaultStyle=e:(-1===_h.isSubstringInArray("fill",e)&&e.push("fill:none"),ug[t].style=e)}))},addClass:function(t,e){void 0===hg[t]&&(hg[t]={id:t,styles:[],textStyles:[]}),null!=e&&e.forEach((function(e){if(e.match("color")){const n=e.replace("fill","bgFill").replace("color","fill");hg[t].textStyles.push(n)}hg[t].styles.push(e)}))},setDirection:function(t){ag=t,ag.match(/.*</)&&(ag="RL"),ag.match(/.*\^/)&&(ag="BT"),ag.match(/.*>/)&&(ag="LR"),ag.match(/.*v/)&&(ag="TB")},setClass:xg,setTooltip:function(t,e){t.split(",").forEach((function(t){void 0!==e&&(pg["gen-1"===og?_g(t):t]=bg(e))}))},getTooltip:function(t){return pg[t]},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){let r=_g(t);if("loose"!==Mh().securityLevel)return;if(void 0===e)return;let i=[];if("string"==typeof n){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<i.length;t++){let e=i[t].trim();'"'===e.charAt(0)&&'"'===e.charAt(e.length-1)&&(e=e.substr(1,e.length-2)),i[t]=e}}0===i.length&&i.push(t),void 0!==lg[t]&&(lg[t].haveCallback=!0,mg.push((function(){const t=document.querySelector(`[id="${r}"]`);null!==t&&t.addEventListener("click",(function(){_h.runFunc(e,...i)}),!1)})))}(t,e,n)})),xg(t,"clickable")},setLink:function(t,e,n){t.split(",").forEach((function(t){void 0!==lg[t]&&(lg[t].link=_h.formatUrl(e,cg),lg[t].linkTarget=n)})),xg(t,"clickable")},bindFunctions:function(t){mg.forEach((function(e){e(t)}))},getDirection:function(){return ag.trim()},getVertices:function(){return lg},getEdges:function(){return ug},getClasses:function(){return hg},clear:function(t="gen-1"){lg={},hg={},ug=[],mg=[kg],fg=[],dg={},gg=0,pg=[],yg=!0,og=t,pf()},setGen:t=>{og=t||"gen-1"},defaultStyle:function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},addSubGraph:function(t,e,n){let r=t.trim(),i=n.trim();r===i&&i.match(/\s/)&&(r=void 0);let a=[];const{nodeList:o,dir:s}=function(t){const e={boolean:{},number:{},string:{}},n=[];let r;return{nodeList:t.filter((function(t){const i=typeof t;return t.stmt&&"dir"===t.stmt?(r=t.value,!1):""!==t.trim()&&(i in e?!e[i].hasOwnProperty(t)&&(e[i][t]=!0):!(n.indexOf(t)>=0)&&n.push(t))})),dir:r}}(a.concat.apply(a,e));if(a=o,"gen-1"===og)for(let t=0;t<a.length;t++)a[t]=_g(a[t]);r=r||"subGraph"+gg,i=i||"",i=bg(i),gg+=1;const c={id:r,nodes:a,title:i.trim(),classes:[],dir:s};return Xc.info("Adding",c.id,c.nodes,c.dir),c.nodes=Ag(c,fg).nodes,fg.push(c),dg[r]=c,r},getDepthFirstPos:function(t){return Eg[t]},indexNodes:function(){Tg=-1,fg.length>0&&Cg("none",fg.length-1)},getSubGraphs:function(){return fg},destructLink:(t,e)=>{const n=(t=>{const e=t.trim();let n=e.slice(0,-1),r="arrow_open";switch(e.slice(-1)){case"x":r="arrow_cross","x"===e[0]&&(r="double_"+r,n=n.slice(1));break;case">":r="arrow_point","<"===e[0]&&(r="double_"+r,n=n.slice(1));break;case"o":r="arrow_circle","o"===e[0]&&(r="double_"+r,n=n.slice(1))}let i="normal",a=n.length-1;"="===n[0]&&(i="thick"),"~"===n[0]&&(i="invisible");let o=((t,e)=>{const n=e.length;let r=0;for(let t=0;t<n;++t)"."===e[t]&&++r;return r})(0,n);return o&&(i="dotted",a=o),{type:r,stroke:i,length:a}})(t);let r;if(e){if(r=(t=>{let e=t.trim(),n="arrow_open";switch(e[0]){case"<":n="arrow_point",e=e.slice(1);break;case"x":n="arrow_cross",e=e.slice(1);break;case"o":n="arrow_circle",e=e.slice(1)}let r="normal";return-1!==e.indexOf("=")&&(r="thick"),-1!==e.indexOf(".")&&(r="dotted"),{type:n,stroke:r}})(e),r.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:()=>!!yg&&(yg=!1,!0)},exists:Sg,makeUniq:Ag};var Ng,Dg,Lg,Og,Bg,Ig,Fg,Rg,Pg,$g,jg,Yg,zg,Ug,qg,Wg,Hg,Vg,Gg,Xg,Zg,Qg,Kg,Jg,ty,ey,ny,ry,iy,ay,oy,sy,cy,ly,uy,hy;function fy(){return Dg||(Dg=1,Ng=function(t){return t}),Ng}function dy(){if(Ig)return Bg;Ig=1;var t=Og?Lg:(Og=1,Lg=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}),e=Math.max;return Bg=function(n,r,i){return r=e(void 0===r?n.length-1:r,0),function(){for(var a=arguments,o=-1,s=e(a.length-r,0),c=Array(s);++o<s;)c[o]=a[r+o];o=-1;for(var l=Array(r+1);++o<r;)l[o]=a[o];return l[r]=i(c),t(n,this,l)}},Bg}function py(){if($g)return Pg;$g=1;var t=su(),e=function(){try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();return Pg=e}function gy(){if(Wg)return qg;Wg=1;var t=function(){if(Yg)return jg;Yg=1;var t=(Rg||(Rg=1,Fg=function(t){return function(){return t}}),Fg),e=py(),n=fy(),r=e?function(n,r){return e(n,"toString",{configurable:!0,enumerable:!1,value:t(r),writable:!0})}:n;return jg=r}(),e=function(){if(Ug)return zg;Ug=1;var t=Date.now;return zg=function(e){var n=0,r=0;return function(){var i=t(),a=16-(i-r);if(r=i,a>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}},zg}(),n=e(t);return qg=n}function yy(){return Xg||(Xg=1,Gg=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}),Gg}function my(){if(Qg)return Zg;Qg=1;var t=au(),e=yy();return Zg=function(n){return null!=n&&e(n.length)&&!t(n)},Zg}function by(){if(Jg)return Kg;Jg=1;var t=/^(?:0|[1-9]\d*)$/;return Kg=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n},Kg}function _y(){if(ey)return ty;ey=1;var t=Tu(),e=my(),n=by(),r=iu();return ty=function(i,a,o){if(!r(o))return!1;var s=typeof a;return!!("number"==s?e(o)&&n(a,o.length):"string"==s&&a in o)&&t(o[a],i)},ty}function vy(){return ay||(ay=1,iy=function(t){return null!=t&&"object"==typeof t}),iy}function xy(){if(ly)return cy;ly=1;var t=function(){if(sy)return oy;sy=1;var t=ru(),e=vy();return oy=function(n){return e(n)&&"[object Arguments]"==t(n)},oy}(),e=vy(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,a=t(function(){return arguments}())?t:function(t){return e(t)&&r.call(t,"callee")&&!i.call(t,"callee")};return cy=a}function ky(){if(hy)return uy;hy=1;var t=Array.isArray;return uy=t}var wy,Ty,Ey,Cy,Sy,Ay,My,Ny={exports:{}};var Dy,Ly,Oy,By,Iy,Fy,Ry,Py,$y,jy,Yy,zy,Uy,qy,Wy,Hy={exports:{}};function Vy(){if(Iy)return By;Iy=1;var t=ry?ny:(ry=1,ny=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}),e=xy(),n=ky(),r=function(){return Ey||(Ey=1,t=Ny,e=Ny.exports,n=eu(),r=Ty?wy:(Ty=1,wy=function(){return!1}),s=((o=(a=(i=e&&!e.nodeType&&e)&&t&&!t.nodeType&&t)&&a.exports===i?n.Buffer:void 0)?o.isBuffer:void 0)||r,t.exports=s),Ny.exports;var t,e,n,r,i,a,o,s}(),i=by(),a=function(){if(Oy)return Ly;Oy=1;var t=function(){if(Sy)return Cy;Sy=1;var t=ru(),e=yy(),n=vy(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,Cy=function(i){return n(i)&&e(i.length)&&!!r[t(i)]},Cy}(),e=(My||(My=1,Ay=function(t){return function(e){return t(e)}}),Ay),n=function(){return Dy||(Dy=1,t=Hy,e=Hy.exports,n=tu(),r=e&&!e.nodeType&&e,i=r&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process,o=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}(),t.exports=o),Hy.exports;var t,e,n,r,i,a,o}(),r=n&&n.isTypedArray,i=r?e(r):t;return Ly=i}(),o=Object.prototype.hasOwnProperty;return By=function(s,c){var l=n(s),u=!l&&e(s),h=!l&&!u&&r(s),f=!l&&!u&&!h&&a(s),d=l||u||h||f,p=d?t(s.length,String):[],g=p.length;for(var y in s)!c&&!o.call(s,y)||d&&("length"==y||h&&("offset"==y||"parent"==y)||f&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||i(y,g))||p.push(y);return p},By}function Gy(){if(Ry)return Fy;Ry=1;var t=Object.prototype;return Fy=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)},Fy}var Xy,Zy,Qy,Ky,Jy,tm,em,nm,rm,im,am,om,sm,cm,lm,um,hm,fm,dm,pm,gm,ym,mm,bm,_m,vm,xm,km,wm,Tm,Em,Cm,Sm,Am,Mm,Nm,Dm,Lm,Om,Bm,Im,Fm,Rm,Pm,$m,jm,Ym,zm,Um,qm,Wm,Hm,Vm,Gm,Xm,Zm,Qm,Km,Jm,tb,eb,nb,rb,ib,ab,ob,sb,cb,lb,ub,hb,fb,db,pb,gb,yb,mb,bb,_b,vb,xb,kb,wb,Tb,Eb,Cb,Sb,Ab,Mb,Nb,Db,Lb,Ob,Bb,Ib,Fb,Rb,Pb,$b={exports:{}};function jb(){return nm||(nm=1,em=function(t,e){return function(n){return t(e(n))}}),em}function Yb(){if(um)return lm;um=1;var t=function(){if(tm)return Jy;tm=1;var t=(Ky||(Ky=1,Qy=function(t){return function(e,n,r){for(var i=-1,a=Object(e),o=r(e),s=o.length;s--;){var c=o[t?s:++i];if(!1===n(a[c],c,a))break}return e}}),Qy),e=t();return Jy=e}(),e=function(){if(cm)return sm;cm=1;var t=Vy(),e=function(){if(om)return am;om=1;var t=Gy(),e=function(){if(im)return rm;im=1;var t=jb()(Object.keys,Object);return rm=t}(),n=Object.prototype.hasOwnProperty;return am=function(r){if(!t(r))return e(r);var i=[];for(var a in Object(r))n.call(r,a)&&"constructor"!=a&&i.push(a);return i},am}(),n=my();return sm=function(r){return n(r)?t(r):e(r)},sm}();return lm=function(n,r){return n&&t(n,r,e)},lm}function zb(){if(Em)return Tm;Em=1;var t=ru(),e=vy();return Tm=function(n){return"symbol"==typeof n||e(n)&&"[object Symbol]"==t(n)},Tm}function Ub(){if(Rm)return Fm;Rm=1;var t=function(){if(Im)return Bm;Im=1;var t=nu(),e=(Om||(Om=1,Lm=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}),Lm),n=ky(),r=zb(),i=t?t.prototype:void 0,a=i?i.toString:void 0;return Bm=function t(i){if("string"==typeof i)return i;if(n(i))return e(i,t)+"";if(r(i))return a?a.call(i):"";var o=i+"";return"0"==o&&1/i==-1/0?"-0":o},Bm}();return Fm=function(e){return null==e?"":t(e)},Fm}function qb(){if($m)return Pm;$m=1;var t=ky(),e=function(){if(Sm)return Cm;Sm=1;var t=ky(),e=zb(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;return Cm=function(i,a){if(t(i))return!1;var o=typeof i;return!("number"!=o&&"symbol"!=o&&"boolean"!=o&&null!=i&&!e(i))||r.test(i)||!n.test(i)||null!=a&&i in Object(a)},Cm}(),n=function(){if(Dm)return Nm;Dm=1;var t=function(){if(Mm)return Am;Mm=1;var t=Ku;return Am=function(e){var n=t(e,(function(t){return 500===r.size&&r.clear(),t})),r=n.cache;return n}}(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=t((function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(e,(function(t,e,i,a){r.push(i?a.replace(n,"$1"):e||t)})),r}));return Nm=r}(),r=Ub();return Pm=function(i,a){return t(i)?i:e(i,a)?[i]:n(r(i))},Pm}function Wb(){if(Ym)return jm;Ym=1;var t=zb();return jm=function(e){if("string"==typeof e||t(e))return e;var n=e+"";return"0"==n&&1/e==-1/0?"-0":n},jm}function Hb(){if(Qm)return Zm;Qm=1;var t=function(){if(Um)return zm;Um=1;var t=qb(),e=Wb();return zm=function(n,r){for(var i=0,a=(r=t(r,n)).length;null!=n&&i<a;)n=n[e(r[i++])];return i&&i==a?n:void 0},zm}(),e=function(){if(Xm)return Gm;Xm=1;var t=function(){if(Vm)return Hm;Vm=1;var t=function(){if(Wm)return qm;Wm=1;var t=py();return qm=function(e,n,r){"__proto__"==n&&t?t(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[n]=r},qm}(),e=Tu(),n=Object.prototype.hasOwnProperty;return Hm=function(r,i,a){var o=r[i];n.call(r,i)&&e(o,a)&&(void 0!==a||i in r)||t(r,i,a)},Hm}(),e=qb(),n=by(),r=iu(),i=Wb();return Gm=function(a,o,s,c){if(!r(a))return a;for(var l=-1,u=(o=e(o,a)).length,h=u-1,f=a;null!=f&&++l<u;){var d=i(o[l]),p=s;if("__proto__"===d||"constructor"===d||"prototype"===d)return a;if(l!=h){var g=f[d];void 0===(p=c?c(g,d,f):void 0)&&(p=r(g)?g:n(o[l+1])?[]:{})}t(f,d,p),f=f[d]}return a},Gm}(),n=qb();return Zm=function(r,i,a){for(var o=-1,s=i.length,c={};++o<s;){var l=i[o],u=t(r,l);a(u,l)&&e(c,n(l,r),u)}return c},Zm}function Vb(){if(eb)return tb;eb=1;var t=qb(),e=xy(),n=ky(),r=by(),i=yy(),a=Wb();return tb=function(o,s,c){for(var l=-1,u=(s=t(s,o)).length,h=!1;++l<u;){var f=a(s[l]);if(!(h=null!=o&&c(o,f)))break;o=o[f]}return h||++l!=u?h:!!(u=null==o?0:o.length)&&i(u)&&r(f,u)&&(n(o)||e(o))},tb}function Gb(){if(gb)return pb;gb=1;var t=function(){if(db)return fb;db=1;var t=function(){if(hb)return ub;hb=1;var t=(sb||(sb=1,ob=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}),ob),e=function(){if(lb)return cb;lb=1;var t=nu(),e=xy(),n=ky(),r=t?t.isConcatSpreadable:void 0;return cb=function(t){return n(t)||e(t)||!!(r&&t&&t[r])},cb}();return ub=function n(r,i,a,o,s){var c=-1,l=r.length;for(a||(a=e),s||(s=[]);++c<l;){var u=r[c];i>0&&a(u)?i>1?n(u,i-1,a,o,s):t(s,u):o||(s[s.length]=u)}return s},ub}();return fb=function(e){return null!=e&&e.length?t(e,1):[]},fb}(),e=dy(),n=gy();return pb=function(r){return n(e(r,void 0,t),r+"")}}function Xb(){if(Db)return Nb;Db=1;var t=function(){if(Mb)return Ab;Mb=1;var t=function(){if(Sb)return Cb;Sb=1;var t=function(){if(Eb)return Tb;Eb=1;var t=/\s/;return Tb=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n},Tb}(),e=/^\s+/;return Cb=function(n){return n?n.slice(0,t(n)+1).replace(e,""):n},Cb}(),e=iu(),n=zb(),r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,o=parseInt;return Ab=function(s){if("number"==typeof s)return s;if(n(s))return NaN;if(e(s)){var c="function"==typeof s.valueOf?s.valueOf():s;s=e(c)?c+"":c}if("string"!=typeof s)return 0===s?s:+s;s=t(s);var l=i.test(s);return l||a.test(s)?o(s.slice(2),l?2:8):r.test(s)?NaN:+s},Ab}();return Nb=function(e){return e?Infinity===(e=t(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},Nb}try{Pb={defaults:function(){if(Wy)return qy;Wy=1;var t=function(){if(Vg)return Hg;Vg=1;var t=fy(),e=dy(),n=gy();return Hg=function(r,i){return n(e(r,i,t),r+"")}}(),e=Tu(),n=_y(),r=function(){if(Uy)return zy;Uy=1;var t=Vy(),e=function(){if(Yy)return jy;Yy=1;var t=iu(),e=Gy(),n=($y||($y=1,Py=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}),Py),r=Object.prototype.hasOwnProperty;return jy=function(i){if(!t(i))return n(i);var a=e(i),o=[];for(var s in i)("constructor"!=s||!a&&r.call(i,s))&&o.push(s);return o},jy}(),n=my();return zy=function(r){return n(r)?t(r,!0):e(r)},zy}(),i=Object.prototype,a=i.hasOwnProperty,o=t((function(t,o){t=Object(t);var s=-1,c=o.length,l=c>2?o[2]:void 0;for(l&&n(o[0],o[1],l)&&(c=1);++s<c;)for(var u=o[s],h=r(u),f=-1,d=h.length;++f<d;){var p=h[f],g=t[p];(void 0===g||e(g,i[p])&&!a.call(t,p))&&(t[p]=u[p])}return t}));return qy=o}(),each:(_m||(_m=1,$b.exports=function(){if(bm)return mm;bm=1;var t=(Zy||(Zy=1,Xy=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}),Xy),e=function(){if(pm)return dm;pm=1;var t=Yb(),e=function(){if(fm)return hm;fm=1;var t=my();return hm=function(e,n){return function(r,i){if(null==r)return r;if(!t(r))return e(r,i);for(var a=r.length,o=n?a:-1,s=Object(r);(n?o--:++o<a)&&!1!==i(s[o],o,s););return r}}}()(t);return dm=e}(),n=function(){if(ym)return gm;ym=1;var t=fy();return gm=function(e){return"function"==typeof e?e:t},gm}(),r=ky();return mm=function(i,a){return(r(i)?t:e)(i,n(a))}}()),$b.exports),isFunction:au(),isPlainObject:function(){if(wm)return km;wm=1;var t=ru(),e=function(){if(xm)return vm;xm=1;var t=jb()(Object.getPrototypeOf,Object);return vm=t}(),n=vy(),r=Function.prototype,i=Object.prototype,a=r.toString,o=i.hasOwnProperty,s=a.call(Object);return km=function(r){if(!n(r)||"[object Object]"!=t(r))return!1;var i=e(r);if(null===i)return!0;var c=o.call(i,"constructor")&&i.constructor;return"function"==typeof c&&c instanceof c&&a.call(c)==s},km}(),pick:function(){if(mb)return yb;mb=1;var t=function(){if(ab)return ib;ab=1;var t=Hb(),e=function(){if(rb)return nb;rb=1;var t=(Jm||(Jm=1,Km=function(t,e){return null!=t&&e in Object(t)}),Km),e=Vb();return nb=function(n,r){return null!=n&&e(n,r,t)},nb}();return ib=function(n,r){return t(n,r,(function(t,r){return e(n,r)}))},ib}(),e=Gb()((function(e,n){return null==e?{}:t(e,n)}));return yb=e}(),has:function(){if(xb)return vb;xb=1;var t=function(){if(_b)return bb;_b=1;var t=Object.prototype.hasOwnProperty;return bb=function(e,n){return null!=e&&t.call(e,n)},bb}(),e=Vb();return vb=function(n,r){return null!=n&&e(n,r,t)},vb}(),range:function(){if(Ib)return Bb;Ib=1;var t=function(){if(Ob)return Lb;Ob=1;var t=function(){if(wb)return kb;wb=1;var t=Math.ceil,e=Math.max;return kb=function(n,r,i,a){for(var o=-1,s=e(t((r-n)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=n,n+=i;return c}}(),e=_y(),n=Xb();return Lb=function(r){return function(i,a,o){return o&&"number"!=typeof o&&e(i,a,o)&&(a=o=void 0),i=n(i),void 0===a?(a=i,i=0):a=n(a),o=void 0===o?i<a?1:-1:n(o),t(i,a,o,r)}}}()();return Bb=t}(),uniqueId:function(){if(Rb)return Fb;Rb=1;var t=Ub(),e=0;return Fb=function(n){var r=++e;return t(n)+r},Fb}()}}catch(t){}Pb||(Pb=window._);var Zb=Pb,Qb={isSubgraph:function(t,e){return!!t.children(e).length},edgeToId:function(t){return Jb(t.v)+":"+Jb(t.w)+":"+Jb(t.name)},applyStyle:function(t,e){e&&t.attr("style",e)},applyClass:function(t,e,n){e&&t.attr("class",e).attr("class",n+" "+t.attr("class"))},applyTransition:function(t,e){var n=e.graph();if(Zb.isPlainObject(n)){var r=n.transition;if(Zb.isFunction(r))return r(t)}return t}},Kb=/:/g;function Jb(t){return t?String(t).replace(Kb,"\\:"):""}var t_=Qb;const e_={},n_=function(t,e){Xc.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch(t){return}},r_={},i_=function(t,e,n,r,i,a){const o=r.select(`[id="${n}"]`);Object.keys(t).forEach((function(n){const r=t[n];let s="default";r.classes.length>0&&(s=r.classes.join(" "));const c=ah(r.styles);let l,u=void 0!==r.text?r.text:r.id;if(il(Mh().flowchart.htmlLabels)){const t={label:u.replace(/fa[lrsb]?:fa-[\w-]+/g,(t=>`<i class='${t.replace(":"," ")}'></i>`))};l=function(t,e){var n=t.append("foreignObject").attr("width","100000"),r=n.append("xhtml:div");r.attr("xmlns","http://www.w3.org/1999/xhtml");var i=e.label;switch(typeof i){case"function":r.insert(i);break;case"object":r.insert((function(){return i}));break;default:r.html(i)}t_.applyStyle(r,e.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap");var a=r.node().getBoundingClientRect();return n.attr("width",a.width).attr("height",a.height),n}(o,t).node(),l.parentNode.removeChild(l)}else{const t=i.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",c.labelStyle.replace("color:","fill:"));const e=u.split(ol.lineBreakRegex);for(let n=0;n<e.length;n++){const r=i.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","1"),r.textContent=e[n],t.appendChild(r)}l=t}let h=0,f="";switch(r.type){case"round":h=5,f="rect";break;case"square":case"group":default:f="rect";break;case"diamond":f="question";break;case"hexagon":f="hexagon";break;case"odd":case"odd_right":f="rect_left_inv_arrow";break;case"lean_right":f="lean_right";break;case"lean_left":f="lean_left";break;case"trapezoid":f="trapezoid";break;case"inv_trapezoid":f="inv_trapezoid";break;case"circle":f="circle";break;case"ellipse":f="ellipse";break;case"stadium":f="stadium";break;case"subroutine":f="subroutine";break;case"cylinder":f="cylinder";break;case"doublecircle":f="doublecircle"}e.setNode(r.id,{labelStyle:c.labelStyle,shape:f,labelText:u,rx:h,ry:h,class:s,style:c.style,id:r.id,link:r.link,linkTarget:r.linkTarget,tooltip:a.db.getTooltip(r.id)||"",domId:a.db.lookUpDomId(r.id),haveCallback:r.haveCallback,width:"group"===r.type?500:void 0,dir:r.dir,type:r.type,props:r.props,padding:Mh().flowchart.padding}),Xc.info("setNode",{labelStyle:c.labelStyle,shape:f,labelText:u,rx:h,ry:h,class:s,style:c.style,id:r.id,domId:a.db.lookUpDomId(r.id),width:"group"===r.type?500:void 0,type:r.type,dir:r.dir,props:r.props,padding:Mh().flowchart.padding})}))},a_=function(t,e,n){Xc.info("abc78 edges = ",t);let r,i,a=0,o={};if(void 0!==t.defaultStyle){const e=ah(t.defaultStyle);r=e.style,i=e.labelStyle}t.forEach((function(n){a++;var s="L-"+n.start+"-"+n.end;void 0===o[s]?(o[s]=0,Xc.info("abc78 new entry",s,o[s])):(o[s]++,Xc.info("abc78 new entry",s,o[s]));let c=s+"-"+o[s];Xc.info("abc78 new link id to be used is",s,c,o[s]);var l="LS-"+n.start,u="LE-"+n.end;const h={style:"",labelStyle:""};switch(h.minlen=n.length||1,"arrow_open"===n.type?h.arrowhead="none":h.arrowhead="normal",h.arrowTypeStart="arrow_open",h.arrowTypeEnd="arrow_open",n.type){case"double_arrow_cross":h.arrowTypeStart="arrow_cross";case"arrow_cross":h.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":h.arrowTypeStart="arrow_point";case"arrow_point":h.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":h.arrowTypeStart="arrow_circle";case"arrow_circle":h.arrowTypeEnd="arrow_circle"}let f="",d="";switch(n.stroke){case"normal":f="fill:none;",void 0!==r&&(f=r),void 0!==i&&(d=i),h.thickness="normal",h.pattern="solid";break;case"dotted":h.thickness="normal",h.pattern="dotted",h.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":h.thickness="thick",h.pattern="solid",h.style="stroke-width: 3.5px;fill:none;";break;case"invisible":h.thickness="invisible",h.pattern="solid",h.style="stroke-width: 0;fill:none;"}if(void 0!==n.style){const t=ah(n.style);f=t.style,d=t.labelStyle}h.style=h.style+=f,h.labelStyle=h.labelStyle+=d,void 0!==n.interpolate?h.curve=rh(n.interpolate,as):void 0!==t.defaultInterpolate?h.curve=rh(t.defaultInterpolate,as):h.curve=rh(r_.curve,as),void 0===n.text?void 0!==n.style&&(h.arrowheadStyle="fill: #333"):(h.arrowheadStyle="fill: #333",h.labelpos="c"),h.labelType="text",h.label=n.text.replace(ol.lineBreakRegex,"\n"),void 0===n.style&&(h.style=h.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),h.labelStyle=h.labelStyle.replace("color:","fill:"),h.id=c,h.classes="flowchart-link "+l+" "+u,e.setEdge(n.start,n.end,h,a)}))},o_={setConf:function(t){const e=Object.keys(t);for(let n=0;n<e.length;n++)r_[e[n]]=t[e[n]]},addVertices:i_,addEdges:a_,getClasses:function(t,e){Xc.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch(t){return}},draw:function(t,e,n,r){Xc.info("Drawing flowchart"),r.db.clear(),Mg.setGen("gen-2"),r.parser.parse(t);let i=r.db.getDirection();void 0===i&&(i="TD");const{securityLevel:a,flowchart:o}=Mh(),s=o.nodeSpacing||50,c=o.rankSpacing||50;let l;"sandbox"===a&&(l=Co("#i"+e));const u=Co("sandbox"===a?l.nodes()[0].contentDocument.body:"body"),h="sandbox"===a?l.nodes()[0].contentDocument:document,f=new $c.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:i,nodesep:s,ranksep:c,marginx:0,marginy:0}).setDefaultEdgeLabel((function(){return{}}));let d;const p=r.db.getSubGraphs();Xc.info("Subgraphs - ",p);for(let t=p.length-1;t>=0;t--)d=p[t],Xc.info("Subgraph - ",d),r.db.addVertex(d.id,d.title,"group",void 0,d.classes,d.dir);const g=r.db.getVertices(),y=r.db.getEdges();Xc.info(y);let m=0;for(m=p.length-1;m>=0;m--){d=p[m],So("cluster").append("text");for(let t=0;t<d.nodes.length;t++)Xc.info("Setting up subgraphs",d.nodes[t],d.id),f.setParent(d.nodes[t],d.id)}i_(g,f,e,u,h,r),a_(y,f);const b=u.select(`[id="${e}"]`);Pf(r.db,b,e);const _=u.select("#"+e+" g");if(Pp(_,f,["point","circle","cross"],"flowchart",e),Rh(f,b,o.diagramPadding,o.useMaxWidth),r.db.indexNodes("subGraph"+m),!o.htmlLabels){const t=h.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(let e=0;e<t.length;e++){const n=t[e],r=n.getBBox(),i=h.createElementNS("http://www.w3.org/2000/svg","rect");i.setAttribute("rx",0),i.setAttribute("ry",0),i.setAttribute("width",r.width),i.setAttribute("height",r.height),n.insertBefore(i,n.firstChild)}}Object.keys(g).forEach((function(t){const n=g[t];if(n.link){const r=Co("#"+e+' [id="'+t+'"]');if(r){const t=h.createElementNS("http://www.w3.org/2000/svg","a");t.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),t.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),t.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===a?t.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):n.linkTarget&&t.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);const e=r.insert((function(){return t}),":first-child"),i=r.select(".label-container");i&&e.append((function(){return i.node()}));const o=r.select(".label");o&&e.append((function(){return o.node()}))}}}))}};var s_=function(){var t,e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,3],r=[1,5],i=[7,9,11,12,13,14,15,16,17,18,19,20,22,24,25,27,34,39],a=[1,15],o=[1,16],s=[1,17],c=[1,18],l=[1,19],u=[1,20],h=[1,21],f=[1,22],d=[1,23],p=[1,24],g=[1,25],y=[1,26],m=[1,28],b=[1,30],_=[1,33],v=[5,7,9,11,12,13,14,15,16,17,18,19,20,22,24,25,27,34,39],x={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,topAxis:14,axisFormat:15,excludes:16,includes:17,todayMarker:18,title:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,clickStatement:26,taskTxt:27,taskData:28,openDirective:29,typeDirective:30,closeDirective:31,":":32,argDirective:33,click:34,callbackname:35,callbackargs:36,href:37,clickStatementDebug:38,open_directive:39,type_directive:40,arg_directive:41,close_directive:42,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"excludes",17:"includes",18:"todayMarker",19:"title",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"taskTxt",28:"taskData",32:":",34:"click",35:"callbackname",36:"callbackargs",37:"href",39:"open_directive",40:"type_directive",41:"arg_directive",42:"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,2],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[26,2],[26,3],[26,3],[26,4],[26,3],[26,4],[26,2],[38,2],[38,3],[38,3],[38,4],[38,3],[38,4],[38,2],[29,1],[30,1],[33,1],[31,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 2:return a[s-1];case 3:case 7:case 8:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 9:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 10:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 11:r.TopAxis(),this.$=a[s].substr(8);break;case 12:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 13:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 14:r.setIncludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 15:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 16:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 17:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 18:case 19:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 20:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 22:r.addTask(a[s-1],a[s]),this.$="task";break;case 26:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 27:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 28:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 29:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 30:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 31:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 32:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 33:case 39:this.$=a[s-1]+" "+a[s];break;case 34:case 35:case 37:this.$=a[s-2]+" "+a[s-1]+" "+a[s];break;case 36:case 38:this.$=a[s-3]+" "+a[s-2]+" "+a[s-1]+" "+a[s];break;case 40:r.parseDirective("%%{","open_directive");break;case 41:r.parseDirective(a[s],"type_directive");break;case 42:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 43:r.parseDirective("}%%","close_directive","gantt")}},table:[{3:1,4:2,5:n,29:4,39:r},{1:[3]},{3:6,4:2,5:n,29:4,39:r},e(i,[2,3],{6:7}),{30:8,40:[1,9]},{40:[2,40]},{1:[2,1]},{4:29,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:a,13:o,14:s,15:c,16:l,17:u,18:h,19:f,20:d,22:p,24:g,25:y,26:27,27:m,29:4,34:b,39:r},{31:31,32:[1,32],42:_},e([32,42],[2,41]),e(i,[2,8],{1:[2,2]}),e(i,[2,4]),{4:29,10:34,12:a,13:o,14:s,15:c,16:l,17:u,18:h,19:f,20:d,22:p,24:g,25:y,26:27,27:m,29:4,34:b,39:r},e(i,[2,6]),e(i,[2,7]),e(i,[2,9]),e(i,[2,10]),e(i,[2,11]),e(i,[2,12]),e(i,[2,13]),e(i,[2,14]),e(i,[2,15]),e(i,[2,16]),{21:[1,35]},{23:[1,36]},e(i,[2,19]),e(i,[2,20]),e(i,[2,21]),{28:[1,37]},e(i,[2,23]),{35:[1,38],37:[1,39]},{11:[1,40]},{33:41,41:[1,42]},{11:[2,43]},e(i,[2,5]),e(i,[2,17]),e(i,[2,18]),e(i,[2,22]),e(i,[2,26],{36:[1,43],37:[1,44]}),e(i,[2,32],{35:[1,45]}),e(v,[2,24]),{31:46,42:_},{42:[2,42]},e(i,[2,27],{37:[1,47]}),e(i,[2,28]),e(i,[2,30],{36:[1,48]}),{11:[1,49]},e(i,[2,29]),e(i,[2,31]),e(v,[2,25])],defaultActions:{5:[2,40],6:[2,1],33:[2,43],42:[2,42]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,f=a.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;a.push(y);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||d.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,v,x,k,w,T,E,C,S={};;){if(v=n[n.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null==_&&(_=b()),x=o[v]&&o[v][_]),void 0===x||!x.length||!x[0]){var A="";for(w in C=[],o[v])this.terminals_[w]&&w>u&&C.push("'"+this.terminals_[w]+"'");A=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:y,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+_);switch(x[0]){case 1:n.push(_),i.push(d.yytext),a.push(d.yylloc),n.push(x[1]),_=null,l=d.yyleng,s=d.yytext,c=d.yylineno,y=d.yylloc;break;case 2:if(T=this.productions_[x[1]][1],S.$=i[i.length-T],S._$={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},m&&(S._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[s,l,c,p.yy,x[1],i,a].concat(f))))return k;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[x[1]][0]),i.push(S.$),a.push(S._$),E=o[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0}},k=(t={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,n=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 r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[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 n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;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,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,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[r]))&&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(){return this.next()||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,n,r){switch(n){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:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:case 20:case 23:case 26:case 29:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:case 13:case 14:case 16:case 17:case 18:break;case 15:return 11;case 19:this.begin("href");break;case 21:return 37;case 22:this.begin("callbackname");break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 35;case 27:return 36;case 28:this.begin("click");break;case 30:return 34;case 31:return 5;case 32:return 12;case 33:return 13;case 34:return 14;case 35:return 15;case 36:return 17;case 37:return 16;case 38:return 18;case 39:return"date";case 40:return 19;case 41:return"accDescription";case 42:return 25;case 43:return 27;case 44:return 28;case 45:return 32;case 46:return 7;case 47:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/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,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:includes\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,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},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:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],inclusive:!0}}},t);function w(){this.yy={}}return x.lexer=k,w.prototype=x,x.Parser=w,new w}();s_.parser=s_;const c_=t=>null!==t.match(/^\s*gantt/);let l_="",u_="",h_="",f_=[],d_=[],p_={},g_=[],y_=[],m_="";const b_=["active","done","crit","milestone"];let __=[],v_=!1,x_=!1,k_=0;const w_=function(t,e,n,r){return!(r.indexOf(t.format(e.trim()))>=0)&&(t.isoWeekday()>=6&&n.indexOf("weekends")>=0||n.indexOf(t.format("dddd").toLowerCase())>=0||n.indexOf(t.format(e.trim()))>=0)},T_=function(t,e,n,i){if(!n.length||t.manualEndTime)return;let a=r(t.startTime,e,!0);a.add(1,"d");let o=r(t.endTime,e,!0),s=E_(a,o,e,n,i);t.endTime=o.toDate(),t.renderEndTime=s},E_=function(t,e,n,r,i){let a=!1,o=null;for(;t<=e;)a||(o=e.toDate()),a=w_(t,n,r,i),a&&e.add(1,"d"),t.add(1,"d");return o},C_=function(t,e,n){n=n.trim();const i=/^after\s+([\d\w- ]+)/.exec(n.trim());if(null!==i){let t=null;if(i[1].split(" ").forEach((function(e){let n=I_(e);void 0!==n&&(t?n.endTime>t.endTime&&(t=n):t=n)})),t)return t.endTime;{const t=new Date;return t.setHours(0,0,0,0),t}}let a=r(n,e.trim(),!0);if(a.isValid())return a.toDate();{Xc.debug("Invalid date:"+n),Xc.debug("With date format:"+e.trim());const t=new Date(n);if(void 0===t||isNaN(t.getTime()))throw new Error("Invalid date:"+n);return t}},S_=function(t){const e=/^(\d+(?:\.\d+)?)([yMwdhms]|ms)$/.exec(t.trim());return null!==e?r.duration(Number.parseFloat(e[1]),e[2]):r.duration.invalid()},A_=function(t,e,n,i){i=i||!1,n=n.trim();let a=r(n,e.trim(),!0);if(a.isValid())return i&&a.add(1,"d"),a.toDate();const o=r(t),s=S_(n);return s.isValid()&&o.add(s),o.toDate()};let M_=0;const N_=function(t){return void 0===t?(M_+=1,"task"+M_):t};let D_,L_,O_=[];const B_={},I_=function(t){const e=B_[t];return O_[e]},F_=function(){const t=function(t){const e=O_[t];let n="";switch(O_[t].raw.startTime.type){case"prevTaskEnd":{const t=I_(e.prevTaskId);e.startTime=t.endTime;break}case"getStartDate":n=C_(0,l_,O_[t].raw.startTime.startData),n&&(O_[t].startTime=n)}return O_[t].startTime&&(O_[t].endTime=A_(O_[t].startTime,l_,O_[t].raw.endTime.data,v_),O_[t].endTime&&(O_[t].processed=!0,O_[t].manualEndTime=r(O_[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),T_(O_[t],l_,d_,f_))),O_[t].processed};let e=!0;for(let n=0;n<O_.length;n++)t(n),e=e&&O_[n].processed;return e},R_=function(t,e){t.split(",").forEach((function(t){let n=I_(t);void 0!==n&&n.classes.push(e)}))},P_=function(t,e){__.push((function(){const n=document.querySelector(`[id="${t}"]`);null!==n&&n.addEventListener("click",(function(){e()}))})),__.push((function(){const n=document.querySelector(`[id="${t}-text"]`);null!==n&&n.addEventListener("click",(function(){e()}))}))},$_={parseDirective:function(t,e,n){jk.parseDirective(this,t,e,n)},getConfig:()=>Mh().gantt,clear:function(){g_=[],y_=[],m_="",__=[],M_=0,D_=void 0,L_=void 0,O_=[],l_="",u_="",h_="",f_=[],d_=[],v_=!1,x_=!1,k_=0,p_={},pf()},setDateFormat:function(t){l_=t},getDateFormat:function(){return l_},enableInclusiveEndDates:function(){v_=!0},endDatesAreInclusive:function(){return v_},enableTopAxis:function(){x_=!0},topAxisEnabled:function(){return x_},setAxisFormat:function(t){u_=t},getAxisFormat:function(){return u_},setTodayMarker:function(t){h_=t},getTodayMarker:function(){return h_},setAccTitle:gf,getAccTitle:yf,setDiagramTitle:_f,getDiagramTitle:vf,setAccDescription:mf,getAccDescription:bf,addSection:function(t){m_=t,g_.push(t)},getSections:function(){return g_},getTasks:function(){let t=F_(),e=0;for(;!t&&e<10;)t=F_(),e++;return y_=O_,y_},addTask:function(t,e){const n={section:m_,type:m_,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=function(t,e){let n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;const r=n.split(","),i={};j_(r,i,b_);for(let t=0;t<r.length;t++)r[t]=r[t].trim();switch(r.length){case 1:i.id=N_(),i.startTime={type:"prevTaskEnd",id:t},i.endTime={data:r[0]};break;case 2:i.id=N_(),i.startTime={type:"getStartDate",startData:r[0]},i.endTime={data:r[1]};break;case 3:i.id=N_(r[0]),i.startTime={type:"getStartDate",startData:r[1]},i.endTime={data:r[2]}}return i}(L_,e);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=L_,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.order=k_,k_++;const i=O_.push(n);L_=n.id,B_[n.id]=i-1},findTaskById:I_,addTaskOrg:function(t,e){const n={section:m_,type:m_,description:t,task:t,classes:[]},i=function(t,e){let n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;const i=n.split(","),a={};j_(i,a,b_);for(let t=0;t<i.length;t++)i[t]=i[t].trim();let o="";switch(i.length){case 1:a.id=N_(),a.startTime=t.endTime,o=i[0];break;case 2:a.id=N_(),a.startTime=C_(0,l_,i[0]),o=i[1];break;case 3:a.id=N_(i[0]),a.startTime=C_(0,l_,i[1]),o=i[2]}return o&&(a.endTime=A_(a.startTime,l_,o,v_),a.manualEndTime=r(o,"YYYY-MM-DD",!0).isValid(),T_(a,l_,d_,f_)),a}(D_,e);n.startTime=i.startTime,n.endTime=i.endTime,n.id=i.id,n.active=i.active,n.done=i.done,n.crit=i.crit,n.milestone=i.milestone,D_=n,y_.push(n)},setIncludes:function(t){f_=t.toLowerCase().split(/[\s,]+/)},getIncludes:function(){return f_},setExcludes:function(t){d_=t.toLowerCase().split(/[\s,]+/)},getExcludes:function(){return d_},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){if("loose"!==Mh().securityLevel)return;if(void 0===e)return;let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<r.length;t++){let e=r[t].trim();'"'===e.charAt(0)&&'"'===e.charAt(e.length-1)&&(e=e.substr(1,e.length-2)),r[t]=e}}0===r.length&&r.push(t),void 0!==I_(t)&&P_(t,(()=>{_h.runFunc(e,...r)}))}(t,e,n)})),R_(t,"clickable")},setLink:function(t,e){let n=e;"loose"!==Mh().securityLevel&&(n=(0,i.N)(e)),t.split(",").forEach((function(t){void 0!==I_(t)&&(P_(t,(()=>{window.open(n,"_self")})),p_[t]=n)})),R_(t,"clickable")},getLinks:function(){return p_},bindFunctions:function(t){__.forEach((function(e){e(t)}))},parseDuration:S_,isInvalidDate:w_};function j_(t,e,n){let r=!0;for(;r;)r=!1,n.forEach((function(n){const i=new RegExp("^\\s*"+n+"\\s*$");t[0].match(i)&&(e[n]=!0,t.shift(1),r=!0)}))}let Y_;const z_={setConf:function(){Xc.debug("Something is calling, setConf, remove the call")},draw:function(t,e,n,i){const s=Mh().gantt,c=Mh().securityLevel;let l;"sandbox"===c&&(l=Co("#i"+e));const u=Co("sandbox"===c?l.nodes()[0].contentDocument.body:"body"),h="sandbox"===c?l.nodes()[0].contentDocument:document,f=h.getElementById(e);Y_=f.parentElement.offsetWidth,void 0===Y_&&(Y_=1200),void 0!==s.useWidth&&(Y_=s.useWidth);const d=i.db.getTasks(),p=d.length*(s.barHeight+s.barGap)+2*s.topPadding;f.setAttribute("viewBox","0 0 "+Y_+" "+p);const y=u.select(`[id="${e}"]`),m=function(){return Lr.apply(Eo(Ki,Ji,Ni,Ai,vi,bi,yi,pi,fi,ia).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}().domain([o(d,(function(t){return t.startTime})),a(d,(function(t){return t.endTime}))]).rangeRound([0,Y_-s.leftPadding-s.rightPadding]);let b=[];for(let t=0;t<d.length;t++)b.push(d[t].type);const _=b;b=function(t){const e={},n=[];for(let r=0,i=t.length;r<i;++r)Object.prototype.hasOwnProperty.call(e,t[r])||(e[t[r]]=!0,n.push(t[r]));return n}(b),d.sort((function(t,e){const n=t.startTime,r=e.startTime;let i=0;return n>r?i=1:n<r&&(i=-1),i})),function(t,n,a){const o=s.barHeight,c=o+s.barGap,l=s.topPadding,u=s.leftPadding;Gr().domain([0,b.length]).range(["#00B9FA","#F95002"]).interpolate(sr),function(t,e,n,a,o,c,l,u){const h=c.reduce(((t,{startTime:e})=>t?Math.min(t,e):e),0),f=c.reduce(((t,{endTime:e})=>t?Math.max(t,e):e),0),d=i.db.getDateFormat();if(!h||!f)return;const p=[];let g=null,b=r(h);for(;b.valueOf()<=f;)i.db.isInvalidDate(b,d,l,u)?g?g.end=b.clone():g={start:b.clone(),end:b.clone()}:g&&(p.push(g),g=null),b.add(1,"d");y.append("g").selectAll("rect").data(p).enter().append("rect").attr("id",(function(t){return"exclude-"+t.start.format("YYYY-MM-DD")})).attr("x",(function(t){return m(t.start)+n})).attr("y",s.gridLineStartPadding).attr("width",(function(t){const e=t.end.clone().add(1,"day");return m(e)-m(t.start)})).attr("height",o-e-s.gridLineStartPadding).attr("transform-origin",(function(e,r){return(m(e.start)+n+.5*(m(e.end)-m(e.start))).toString()+"px "+(r*t+.5*o).toString()+"px"})).attr("class","exclude-range")}(c,l,u,0,a,t,i.db.getExcludes(),i.db.getIncludes()),function(t,e,n,r){let a=(o=m,g(3,o)).tickSize(-r+e+s.gridLineStartPadding).tickFormat(ia(i.db.getAxisFormat()||s.axisFormat||"%Y-%m-%d"));var o;if(y.append("g").attr("class","grid").attr("transform","translate("+t+", "+(r-50)+")").call(a).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||s.topAxis){let n=function(t){return g(1,t)}(m).tickSize(-r+e+s.gridLineStartPadding).tickFormat(ia(i.db.getAxisFormat()||s.axisFormat||"%Y-%m-%d"));y.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(n).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}(u,l,0,a),function(t,n,r,a,o,c,l){y.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",(function(t,e){return t.order*n+r-2})).attr("width",(function(){return l-s.rightPadding/2})).attr("height",n).attr("class",(function(t){for(let e=0;e<b.length;e++)if(t.type===b[e])return"section section"+e%s.numberSectionStyles;return"section section0"}));const u=y.append("g").selectAll("rect").data(t).enter(),h=i.db.getLinks();if(u.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?m(t.startTime)+a+.5*(m(t.endTime)-m(t.startTime))-.5*o:m(t.startTime)+a})).attr("y",(function(t,e){return t.order*n+r})).attr("width",(function(t){return t.milestone?o:m(t.renderEndTime||t.endTime)-m(t.startTime)})).attr("height",o).attr("transform-origin",(function(t,e){return e=t.order,(m(t.startTime)+a+.5*(m(t.endTime)-m(t.startTime))).toString()+"px "+(e*n+r+.5*o).toString()+"px"})).attr("class",(function(t){let e="";t.classes.length>0&&(e=t.classes.join(" "));let n=0;for(let e=0;e<b.length;e++)t.type===b[e]&&(n=e%s.numberSectionStyles);let r="";return t.active?t.crit?r+=" activeCrit":r=" active":t.done?r=t.crit?" doneCrit":" done":t.crit&&(r+=" crit"),0===r.length&&(r=" task"),t.milestone&&(r=" milestone "+r),r+=n,r+=" "+e,"task"+r})),u.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",s.fontSize).attr("x",(function(t){let e=m(t.startTime),n=m(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(m(t.endTime)-m(t.startTime))-.5*o),t.milestone&&(n=e+o);const r=this.getBBox().width;return r>n-e?n+r+1.5*s.leftPadding>l?e+a-5:n+a+5:(n-e)/2+e+a})).attr("y",(function(t,e){return t.order*n+s.barHeight/2+(s.fontSize/2-2)+r})).attr("text-height",o).attr("class",(function(t){const e=m(t.startTime);let n=m(t.endTime);t.milestone&&(n=e+o);const r=this.getBBox().width;let i="";t.classes.length>0&&(i=t.classes.join(" "));let a=0;for(let e=0;e<b.length;e++)t.type===b[e]&&(a=e%s.numberSectionStyles);let c="";return t.active&&(c=t.crit?"activeCritText"+a:"activeText"+a),t.done?c=t.crit?c+" doneCritText"+a:c+" doneText"+a:t.crit&&(c=c+" critText"+a),t.milestone&&(c+=" milestoneText"),r>n-e?n+r+1.5*s.leftPadding>l?i+" taskTextOutsideLeft taskTextOutside"+a+" "+c:i+" taskTextOutsideRight taskTextOutside"+a+" "+c+" width-"+r:i+" taskText taskText"+a+" "+c+" width-"+r})),"sandbox"===Mh().securityLevel){let t;t=Co("#i"+e);const n=t.nodes()[0].contentDocument;u.filter((function(t){return void 0!==h[t.id]})).each((function(t){var e=n.querySelector("#"+t.id),r=n.querySelector("#"+t.id+"-text");const i=e.parentNode;var a=n.createElement("a");a.setAttribute("xlink:href",h[t.id]),a.setAttribute("target","_top"),i.appendChild(a),a.appendChild(e),a.appendChild(r)}))}}(t,c,l,u,o,0,n),function(t,e){const n=[];let r=0;for(let t=0;t<b.length;t++)n[t]=[b[t],(i=b[t],a=_,function(t){let e=t.length;const n={};for(;e;)n[t[--e]]=(n[t[e]]||0)+1;return n}(a)[i]||0)];var i,a;y.append("g").selectAll("text").data(n).enter().append((function(t){const e=t[0].split(ol.lineBreakRegex),n=-(e.length-1)/2,r=h.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("dy",n+"em");for(let t=0;t<e.length;t++){const n=h.createElementNS("http://www.w3.org/2000/svg","tspan");n.setAttribute("alignment-baseline","central"),n.setAttribute("x","10"),t>0&&n.setAttribute("dy","1em"),n.textContent=e[t],r.appendChild(n)}return r})).attr("x",10).attr("y",(function(i,a){if(!(a>0))return i[1]*t/2+e;for(let o=0;o<a;o++)return r+=n[a-1][1],i[1]*t/2+r*t+e})).attr("font-size",s.sectionFontSize).attr("font-size",s.sectionFontSize).attr("class",(function(t){for(let e=0;e<b.length;e++)if(t[0]===b[e])return"sectionTitle sectionTitle"+e%s.numberSectionStyles;return"sectionTitle"}))}(c,l),function(t,e,n,r){const a=i.db.getTodayMarker();if("off"===a)return;const o=y.append("g").attr("class","today"),c=new Date,l=o.append("line");l.attr("x1",m(c)+t).attr("x2",m(c)+t).attr("y1",s.titleTopMargin).attr("y2",r-s.titleTopMargin).attr("class","today"),""!==a&&l.attr("style",a.replace(/,/g,";"))}(u,0,0,a)}(d,Y_,p),Fh(y,0,Y_,s.useMaxWidth),y.append("text").text(i.db.getDiagramTitle()).attr("x",Y_/2).attr("y",s.titleTopMargin).attr("class","titleText"),Pf(i.db,y,e)}};var U_=function(){var t,e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[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,n,r,i,a,o){switch(a.length,i){case 1:return r;case 4:break;case 6:r.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},e(n,[2,3]),e(n,[2,4]),e(n,[2,5]),e(n,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,f=a.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;a.push(y);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||d.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,v,x,k,w,T,E,C,S={};;){if(v=n[n.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null==_&&(_=b()),x=o[v]&&o[v][_]),void 0===x||!x.length||!x[0]){var A="";for(w in C=[],o[v])this.terminals_[w]&&w>u&&C.push("'"+this.terminals_[w]+"'");A=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:y,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+_);switch(x[0]){case 1:n.push(_),i.push(d.yytext),a.push(d.yylloc),n.push(x[1]),_=null,l=d.yyleng,s=d.yytext,c=d.yylineno,y=d.yylloc;break;case 2:if(T=this.productions_[x[1]][1],S.$=i[i.length-T],S._$={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},m&&(S._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[s,l,c,p.yy,x[1],i,a].concat(f))))return k;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[x[1]][0]),i.push(S.$),a.push(S._$),E=o[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0}},i=(t={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,n=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 r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[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 n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;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,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,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[r]))&&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(){return this.next()||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,n,r){switch(n){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}}},t);function a(){this.yy={}}return r.lexer=i,a.prototype=r,r.Parser=a,new a}();U_.parser=U_;var q_="",W_=!1;const H_={setMessage:t=>{Xc.debug("Setting message to: "+t),q_=t},getMessage:()=>q_,setInfo:t=>{W_=t},getInfo:()=>W_,clear:pf},V_={draw:(t,e,n,r)=>{try{Xc.debug("Rendering info diagram\n"+t);const r=Mh().securityLevel;let i;"sandbox"===r&&(i=Co("#i"+e));const a=Co("sandbox"===r?i.nodes()[0].contentDocument.body:"body").select("#"+e);a.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+n),a.attr("height",100),a.attr("width",400)}catch(t){Xc.error("Error while rendering info diagram"),Xc.error(t.message)}}},G_=t=>null!==t.match(/^\s*info/);var X_=function(){var t,e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,4],r=[1,5],i=[1,6],a=[1,7],o=[1,9],s=[1,11,13,15,17,19,20,26,27,28,29],c=[2,5],l=[1,6,11,13,15,17,19,20,26,27,28,29],u=[26,27,28],h=[2,8],f=[1,18],d=[1,19],p=[1,20],g=[1,21],y=[1,22],m=[1,23],b=[1,28],_=[6,26,27,28,29],v={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,openDirective:21,typeDirective:22,closeDirective:23,":":24,argDirective:25,NEWLINE:26,";":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",24:":",26:"NEWLINE",27:";",28:"EOF",29:"open_directive",30:"type_directive",31:"arg_directive",32:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.setShowData(!0);break;case 7:this.$=a[s-1];break;case 9:r.addSection(a[s-1],r.cleanupValue(a[s]));break;case 10:this.$=a[s].trim(),r.setDiagramTitle(this.$);break;case 11:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 12:case 13:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 14:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 21:r.parseDirective("%%{","open_directive");break;case 22:r.parseDirective(a[s],"type_directive");break;case 23:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 24:r.parseDirective("}%%","close_directive","pie")}},table:[{3:1,4:2,5:3,6:n,21:8,26:r,27:i,28:a,29:o},{1:[3]},{3:10,4:2,5:3,6:n,21:8,26:r,27:i,28:a,29:o},{3:11,4:2,5:3,6:n,21:8,26:r,27:i,28:a,29:o},e(s,c,{7:12,8:[1,13]}),e(l,[2,18]),e(l,[2,19]),e(l,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},e(u,h,{21:8,9:16,10:17,5:24,1:[2,3],11:f,13:d,15:p,17:g,19:y,20:m,29:o}),e(s,c,{7:25}),{23:26,24:[1,27],32:b},e([24,32],[2,22]),e(s,[2,6]),{4:29,26:r,27:i,28:a},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},e(u,[2,13]),e(u,[2,14]),e(u,[2,15]),e(u,h,{21:8,9:16,10:17,5:24,1:[2,4],11:f,13:d,15:p,17:g,19:y,20:m,29:o}),e(_,[2,16]),{25:34,31:[1,35]},e(_,[2,24]),e(s,[2,7]),e(u,[2,9]),e(u,[2,10]),e(u,[2,11]),e(u,[2,12]),{23:36,32:b},{32:[2,23]},e(_,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,f=a.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;a.push(y);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||d.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,v,x,k,w,T,E,C,S={};;){if(v=n[n.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null==_&&(_=b()),x=o[v]&&o[v][_]),void 0===x||!x.length||!x[0]){var A="";for(w in C=[],o[v])this.terminals_[w]&&w>u&&C.push("'"+this.terminals_[w]+"'");A=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:y,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+_);switch(x[0]){case 1:n.push(_),i.push(d.yytext),a.push(d.yylloc),n.push(x[1]),_=null,l=d.yyleng,s=d.yytext,c=d.yylineno,y=d.yylloc;break;case 2:if(T=this.productions_[x[1]][1],S.$=i[i.length-T],S._$={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},m&&(S._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[s,l,c,p.yy,x[1],i,a].concat(f))))return k;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[x[1]][0]),i.push(S.$),a.push(S._$),E=o[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0}},x=(t={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,n=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 r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[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 n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;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,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,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[r]))&&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(){return this.next()||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,n,r){switch(n){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:case 6:case 8:case 9:break;case 7:return 26;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:case 20:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},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:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}},t);function k(){this.yy={}}return v.lexer=x,k.prototype=v,v.Parser=k,new k}();X_.parser=X_;const Z_=t=>null!==t.match(/^\s*pie/);let Q_={},K_=!1;const J_={parseDirective:function(t,e,n){jk.parseDirective(this,t,e,n)},getConfig:()=>Mh().pie,addSection:function(t,e){t=ol.sanitizeText(t,Mh()),void 0===Q_[t]&&(Q_[t]=e,Xc.debug("Added new section :",t))},getSections:()=>Q_,cleanupValue:function(t){return":"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){Q_={},K_=!1,pf()},setAccTitle:gf,getAccTitle:yf,setDiagramTitle:_f,getDiagramTitle:vf,setShowData:function(t){K_=t},getShowData:function(){return K_},getAccDescription:bf,setAccDescription:mf};let tv,ev=Mh();const nv={draw:(t,e,n,r)=>{try{ev=Mh(),Xc.debug("Rendering info diagram\n"+t);const n=Mh().securityLevel;let p;"sandbox"===n&&(p=Co("#i"+e));const g=Co("sandbox"===n?p.nodes()[0].contentDocument.body:"body"),y="sandbox"===n?p.nodes()[0].contentDocument:document;r.db.clear(),r.parser.parse(t),Xc.debug("Parsed info diagram");const m=y.getElementById(e);tv=m.parentElement.offsetWidth,void 0===tv&&(tv=1200),void 0!==ev.useWidth&&(tv=ev.useWidth),void 0!==ev.pie.useWidth&&(tv=ev.pie.useWidth);const b=g.select("#"+e);Fh(b,0,tv,ev.pie.useMaxWidth),Pf(r.db,b,e),m.setAttribute("viewBox","0 0 "+tv+" 450");var i=Math.min(tv,450)/2-40,a=b.append("g").attr("transform","translate("+tv/2+",225)"),o=r.db.getSections(),s=0;Object.keys(o).forEach((function(t){s+=o[t]}));const _=ev.themeVariables;var c=[_.pie1,_.pie2,_.pie3,_.pie4,_.pie5,_.pie6,_.pie7,_.pie8,_.pie9,_.pie10,_.pie11,_.pie12],l=Jr().range(c),u=function(){var t=us,e=ls,n=null,r=Io(0),i=Io(Ho),a=Io(0);function o(o){var s,c,l,u,h,f=(o=rs(o)).length,d=0,p=new Array(f),g=new Array(f),y=+r.apply(this,arguments),m=Math.min(Ho,Math.max(-Ho,i.apply(this,arguments)-y)),b=Math.min(Math.abs(m)/f,a.apply(this,arguments)),_=b*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(o[s],s,o))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),s=0,l=d?(m-f*_)/d:0;s<f;++s,y=u)c=p[s],u=y+((h=g[c])>0?h*l:0)+_,g[c]={data:o[c],index:s,value:h,startAngle:y,endAngle:u,padAngle:b};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:Io(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Io(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Io(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Io(+t),o):a},o}().value((function(t){return t[1]})),h=u(Object.entries(o)),f=ns().innerRadius(0).outerRadius(i);a.selectAll("mySlices").data(h).enter().append("path").attr("d",f).attr("fill",(function(t){return l(t.data[0])})).attr("class","pieCircle"),a.selectAll("mySlices").data(h).enter().append("text").text((function(t){return(t.data[1]/s*100).toFixed(0)+"%"})).attr("transform",(function(t){return"translate("+f.centroid(t)+")"})).style("text-anchor","middle").attr("class","slice"),a.append("text").text(r.db.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");var d=a.selectAll(".legend").data(l.domain()).enter().append("g").attr("class","legend").attr("transform",(function(t,e){return"translate(216,"+(22*e-22*l.domain().length/2)+")"}));d.append("rect").attr("width",18).attr("height",18).style("fill",l).style("stroke",l),d.data(h).append("text").attr("x",22).attr("y",14).text((function(t){return r.db.getShowData()||ev.showData||ev.pie.showData?t.data[0]+" ["+t.data[1]+"]":t.data[0]}))}catch(t){Xc.error("Error while rendering info diagram"),Xc.error(t)}}};var rv=function(){var t,e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,3],r=[1,5],i=[1,6],a=[1,7],o=[1,8],s=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],c=[1,22],l=[2,13],u=[1,26],h=[1,27],f=[1,28],d=[1,29],p=[1,30],g=[1,31],y=[1,24],m=[1,32],b=[1,33],_=[1,36],v=[71,72],x=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],k=[1,56],w=[1,57],T=[1,58],E=[1,59],C=[1,60],S=[1,61],A=[1,62],M=[62,63],N=[1,74],D=[1,70],L=[1,71],O=[1,72],B=[1,73],I=[1,75],F=[1,79],R=[1,80],P=[1,77],$=[1,78],j=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],Y={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",39:"STRUCT_STOP",40:"REQUIREMENT",41:"FUNCTIONAL_REQUIREMENT",42:"INTERFACE_REQUIREMENT",43:"PERFORMANCE_REQUIREMENT",44:"PHYSICAL_REQUIREMENT",45:"DESIGN_CONSTRAINT",46:"LOW_RISK",47:"MED_RISK",48:"HIGH_RISK",49:"VERIFY_ANALYSIS",50:"VERIFY_DEMONSTRATION",51:"VERIFY_INSPECTION",52:"VERIFY_TEST",53:"ELEMENT",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 7:case 8:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 9:r.parseDirective("%%{","open_directive");break;case 10:r.parseDirective(a[s],"type_directive");break;case 11:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 12:r.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:r.addRequirement(a[s-3],a[s-4]);break;case 20:r.setNewReqId(a[s-2]);break;case 21:r.setNewReqText(a[s-2]);break;case 22:r.setNewReqRisk(a[s-2]);break;case 23:r.setNewReqVerifyMethod(a[s-2]);break;case 26:this.$=r.RequirementType.REQUIREMENT;break;case 27:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=r.RiskLevel.LOW_RISK;break;case 33:this.$=r.RiskLevel.MED_RISK;break;case 34:this.$=r.RiskLevel.HIGH_RISK;break;case 35:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=r.VerifyType.VERIFY_TEST;break;case 39:r.addElement(a[s-3]);break;case 40:r.setNewElementType(a[s-2]);break;case 41:r.setNewElementDocRef(a[s-2]);break;case 44:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 45:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 46:this.$=r.Relationships.CONTAINS;break;case 47:this.$=r.Relationships.COPIES;break;case 48:this.$=r.Relationships.DERIVES;break;case 49:this.$=r.Relationships.SATISFIES;break;case 50:this.$=r.Relationships.VERIFIES;break;case 51:this.$=r.Relationships.REFINES;break;case 52:this.$=r.Relationships.TRACES}},table:[{3:1,4:2,6:n,9:4,14:r,16:i,18:a,19:o},{1:[3]},{3:10,4:2,5:[1,9],6:n,9:4,14:r,16:i,18:a,19:o},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},e(s,[2,8]),{20:[2,9]},{3:16,4:2,6:n,9:4,14:r,16:i,18:a,19:o},{1:[2,2]},{4:21,5:c,7:17,8:l,9:4,14:r,16:i,18:a,19:o,23:18,24:19,25:20,26:23,32:25,40:u,41:h,42:f,43:d,44:p,45:g,53:y,71:m,72:b},{11:34,12:[1,35],22:_},e([12,22],[2,10]),e(s,[2,6]),e(s,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:c,7:38,8:l,9:4,14:r,16:i,18:a,19:o,23:18,24:19,25:20,26:23,32:25,40:u,41:h,42:f,43:d,44:p,45:g,53:y,71:m,72:b},{4:21,5:c,7:39,8:l,9:4,14:r,16:i,18:a,19:o,23:18,24:19,25:20,26:23,32:25,40:u,41:h,42:f,43:d,44:p,45:g,53:y,71:m,72:b},{4:21,5:c,7:40,8:l,9:4,14:r,16:i,18:a,19:o,23:18,24:19,25:20,26:23,32:25,40:u,41:h,42:f,43:d,44:p,45:g,53:y,71:m,72:b},{4:21,5:c,7:41,8:l,9:4,14:r,16:i,18:a,19:o,23:18,24:19,25:20,26:23,32:25,40:u,41:h,42:f,43:d,44:p,45:g,53:y,71:m,72:b},{4:21,5:c,7:42,8:l,9:4,14:r,16:i,18:a,19:o,23:18,24:19,25:20,26:23,32:25,40:u,41:h,42:f,43:d,44:p,45:g,53:y,71:m,72:b},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},e(v,[2,26]),e(v,[2,27]),e(v,[2,28]),e(v,[2,29]),e(v,[2,30]),e(v,[2,31]),e(x,[2,55]),e(x,[2,56]),e(s,[2,4]),{13:51,21:[1,52]},e(s,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:k,65:w,66:T,67:E,68:C,69:S,70:A},{61:63,64:k,65:w,66:T,67:E,68:C,69:S,70:A},{11:64,22:_},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},e(M,[2,46]),e(M,[2,47]),e(M,[2,48]),e(M,[2,49]),e(M,[2,50]),e(M,[2,51]),e(M,[2,52]),{63:[1,68]},e(s,[2,5]),{5:N,29:69,30:D,33:L,35:O,37:B,39:I},{5:F,39:R,55:76,56:P,58:$},{32:81,71:m,72:b},{32:82,71:m,72:b},e(j,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:N,29:87,30:D,33:L,35:O,37:B,39:I},e(j,[2,25]),e(j,[2,39]),{31:[1,88]},{31:[1,89]},{5:F,39:R,55:90,56:P,58:$},e(j,[2,43]),e(j,[2,44]),e(j,[2,45]),{32:91,71:m,72:b},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},e(j,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},e(j,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:N,29:116,30:D,33:L,35:O,37:B,39:I},{5:N,29:117,30:D,33:L,35:O,37:B,39:I},{5:N,29:118,30:D,33:L,35:O,37:B,39:I},{5:N,29:119,30:D,33:L,35:O,37:B,39:I},{5:F,39:R,55:120,56:P,58:$},{5:F,39:R,55:121,56:P,58:$},e(j,[2,20]),e(j,[2,21]),e(j,[2,22]),e(j,[2,23]),e(j,[2,40]),e(j,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,f=a.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;a.push(y);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||d.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,v,x,k,w,T,E,C,S={};;){if(v=n[n.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null==_&&(_=b()),x=o[v]&&o[v][_]),void 0===x||!x.length||!x[0]){var A="";for(w in C=[],o[v])this.terminals_[w]&&w>u&&C.push("'"+this.terminals_[w]+"'");A=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:y,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+_);switch(x[0]){case 1:n.push(_),i.push(d.yytext),a.push(d.yylloc),n.push(x[1]),_=null,l=d.yyleng,s=d.yytext,c=d.yylineno,y=d.yylloc;break;case 2:if(T=this.productions_[x[1]][1],S.$=i[i.length-T],S._$={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},m&&(S._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[s,l,c,p.yy,x[1],i,a].concat(f))))return k;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[x[1]][0]),i.push(S.$),a.push(S._$),E=o[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0}},z=(t={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,n=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 r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[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 n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;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,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,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[r]))&&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(){return this.next()||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,n,r){switch(n){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 53:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:case 15:case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 54:return"qString";case 55:return e.yytext=e.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},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},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,55],inclusive:!0}}},t);function U(){this.yy={}}return Y.lexer=z,U.prototype=Y,Y.Parser=U,new U}();rv.parser=rv;const iv=t=>null!==t.match(/^\s*requirement(Diagram)?/);let av=[],ov={},sv={},cv={},lv={};const uv={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},parseDirective:function(t,e,n){jk.parseDirective(this,t,e,n)},getConfig:()=>Mh().req,addRequirement:(t,e)=>(void 0===sv[t]&&(sv[t]={name:t,type:e,id:ov.id,text:ov.text,risk:ov.risk,verifyMethod:ov.verifyMethod}),ov={},sv[t]),getRequirements:()=>sv,setNewReqId:t=>{void 0!==ov&&(ov.id=t)},setNewReqText:t=>{void 0!==ov&&(ov.text=t)},setNewReqRisk:t=>{void 0!==ov&&(ov.risk=t)},setNewReqVerifyMethod:t=>{void 0!==ov&&(ov.verifyMethod=t)},setAccTitle:gf,getAccTitle:yf,setAccDescription:mf,getAccDescription:bf,addElement:t=>(void 0===lv[t]&&(lv[t]={name:t,type:cv.type,docRef:cv.docRef},Xc.info("Added new requirement: ",t)),cv={},lv[t]),getElements:()=>lv,setNewElementType:t=>{void 0!==cv&&(cv.type=t)},setNewElementDocRef:t=>{void 0!==cv&&(cv.docRef=t)},addRelationship:(t,e,n)=>{av.push({type:t,src:e,dst:n})},getRelationships:()=>av,clear:()=>{av=[],ov={},sv={},cv={},lv={},pf()}},hv={CONTAINS:"contains",ARROW:"arrow"},fv=hv;let dv={},pv=0;const gv=(t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",dv.rect_min_width+"px").attr("height",dv.rect_min_height+"px"),yv=(t,e,n)=>{let r=dv.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",r).attr("y",dv.rect_padding).attr("dominant-baseline","hanging"),a=0;n.forEach((t=>{0==a?i.append("tspan").attr("text-anchor","middle").attr("x",dv.rect_min_width/2).attr("dy",0).text(t):i.append("tspan").attr("text-anchor","middle").attr("x",dv.rect_min_width/2).attr("dy",.75*dv.line_height).text(t),a++}));let o=1.5*dv.rect_padding+a*dv.line_height*.75;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",dv.rect_min_width).attr("y1",o).attr("y2",o),{titleNode:i,y:o}},mv=(t,e,n,r)=>{let i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",dv.rect_padding).attr("y",r).attr("dominant-baseline","hanging"),a=0,o=[];return n.forEach((t=>{let e=t.length;for(;e>30&&a<3;){let n=t.substring(0,30);e=(t=t.substring(30,t.length)).length,o[o.length]=n,a++}if(3==a){let t=o[o.length-1];o[o.length-1]=t.substring(0,t.length-4)+"..."}else o[o.length]=t;a=0})),o.forEach((t=>{i.append("tspan").attr("x",dv.rect_padding).attr("dy",dv.line_height).text(t)})),i},bv=t=>t.replace(/\s/g,"").replace(/\./g,"_"),_v={draw:(t,e,n,r)=>{dv=Mh().requirement,r.db.clear(),r.parser.parse(t);const i=dv.securityLevel;let a;"sandbox"===i&&(a=Co("#i"+e));const o=Co("sandbox"===i?a.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);((t,e)=>{let n=t.append("defs").append("marker").attr("id",hv.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");n.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),n.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),n.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",hv.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0\n L${e.line_height},${e.line_height/2}\n M${e.line_height},${e.line_height/2}\n L0,${e.line_height}`).attr("stroke-width",1)})(o,dv);const s=new $c.Graph({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:dv.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));let c=r.db.getRequirements(),l=r.db.getElements(),u=r.db.getRelationships();((t,e,n)=>{Object.keys(t).forEach((r=>{let i=t[r];r=bv(r),Xc.info("Added new requirement: ",r);const a=n.append("g").attr("id",r),o=gv(a,"req-"+r);let s=yv(a,r+"_title",[`<<${i.type}>>`,`${i.name}`]);mv(a,r+"_body",[`Id: ${i.id}`,`Text: ${i.text}`,`Risk: ${i.risk}`,`Verification: ${i.verifyMethod}`],s.y);const c=o.node().getBBox();e.setNode(r,{width:c.width,height:c.height,shape:"rect",id:r})}))})(c,s,o),((t,e,n)=>{Object.keys(t).forEach((r=>{let i=t[r];const a=bv(r),o=n.append("g").attr("id",a),s="element-"+a,c=gv(o,s);let l=yv(o,s+"_title",["<<Element>>",`${r}`]);mv(o,s+"_body",[`Type: ${i.type||"Not Specified"}`,`Doc Ref: ${i.docRef||"None"}`],l.y);const u=c.node().getBBox();e.setNode(a,{width:u.width,height:u.height,shape:"rect",id:a})}))})(l,s,o),((t,e)=>{t.forEach((function(t){let n=bv(t.src),r=bv(t.dst);e.setEdge(n,r,{relationship:t})}))})(u,s),Pc.layout(s),function(t,e){e.nodes().forEach((function(n){void 0!==n&&void 0!==e.node(n)&&(t.select("#"+n),t.select("#"+n).attr("transform","translate("+(e.node(n).x-e.node(n).width/2)+","+(e.node(n).y-e.node(n).height/2)+" )"))}))}(o,s),u.forEach((function(t){!function(t,e,n,r,i){const a=n.edge(bv(e.src),bv(e.dst)),o=cs().x((function(t){return t.x})).y((function(t){return t.y})),s=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",o(a.points)).attr("fill","none");e.type==i.db.Relationships.CONTAINS?s.attr("marker-start","url("+ol.getUrl(dv.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(s.attr("stroke-dasharray","10,7"),s.attr("marker-end","url("+ol.getUrl(dv.arrowMarkerAbsolute)+"#"+fv.ARROW+"_line_ending)")),((t,e,n,r)=>{const i=e.node().getTotalLength(),a=e.node().getPointAtLength(.5*i),o="rel"+pv;pv++;const s=t.append("text").attr("class","req relationshipLabel").attr("id",o).attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(r).node().getBBox();t.insert("rect","#"+o).attr("class","req reqLabelBox").attr("x",a.x-s.width/2).attr("y",a.y-s.height/2).attr("width",s.width).attr("height",s.height).attr("fill","white").attr("fill-opacity","85%")})(t,s,0,`<<${e.type}>>`)}(o,t,s,e,r)}));const h=dv.rect_padding,f=o.node().getBBox(),d=f.width+2*h,p=f.height+2*h;Fh(o,0,d,dv.useMaxWidth),o.attr("viewBox",`${f.x-h} ${f.y-h} ${d} ${p}`),Pf(r.db,o,e)}};var vv=function(){var t,e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,2],r=[1,3],i=[1,5],a=[1,7],o=[2,5],s=[1,15],c=[1,17],l=[1,18],u=[1,19],h=[1,21],f=[1,22],d=[1,23],p=[1,29],g=[1,30],y=[1,31],m=[1,32],b=[1,33],_=[1,34],v=[1,35],x=[1,36],k=[1,37],w=[1,38],T=[1,39],E=[1,40],C=[1,43],S=[1,44],A=[1,45],M=[1,46],N=[1,47],D=[1,48],L=[1,51],O=[1,4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,51,52,53,58,59,60,61,69,79],B=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,53,58,59,60,61,69,79],I=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,52,53,58,59,60,61,69,79],F=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,51,53,58,59,60,61,69,79],R=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,53,58,59,60,61,69,79],P=[67,68,69],$=[1,121],j=[1,4,5,7,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,51,52,53,58,59,60,61,69,79],Y={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,participant_actor:20,signal:21,autonumber:22,NUM:23,off:24,activate:25,deactivate:26,note_statement:27,links_statement:28,link_statement:29,properties_statement:30,details_statement:31,title:32,legacy_title:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,loop:39,end:40,rect:41,opt:42,alt:43,else_sections:44,par:45,par_sections:46,critical:47,option_sections:48,break:49,option:50,and:51,else:52,note:53,placement:54,text2:55,over:56,actor_pair:57,links:58,link:59,properties:60,details:61,spaceList:62,",":63,left_of:64,right_of:65,signaltype:66,"+":67,"-":68,ACTOR:69,SOLID_OPEN_ARROW:70,DOTTED_OPEN_ARROW:71,SOLID_ARROW:72,DOTTED_ARROW:73,SOLID_CROSS:74,DOTTED_CROSS:75,SOLID_POINT:76,DOTTED_POINT:77,TXT:78,open_directive:79,type_directive:80,arg_directive:81,close_directive:82,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",20:"participant_actor",22:"autonumber",23:"NUM",24:"off",25:"activate",26:"deactivate",32:"title",33:"legacy_title",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",39:"loop",40:"end",41:"rect",42:"opt",43:"alt",45:"par",47:"critical",49:"break",50:"option",51:"and",52:"else",53:"note",56:"over",58:"links",59:"link",60:"properties",61:"details",63:",",64:"left_of",65:"right_of",67:"+",68:"-",69:"ACTOR",70:"SOLID_OPEN_ARROW",71:"DOTTED_OPEN_ARROW",72:"SOLID_ARROW",73:"DOTTED_ARROW",74:"SOLID_CROSS",75:"DOTTED_CROSS",76:"SOLID_POINT",77:"DOTTED_POINT",78:"TXT",79:"open_directive",80:"type_directive",81:"arg_directive",82:"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,5],[10,3],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[48,1],[48,4],[46,1],[46,4],[44,1],[44,4],[27,4],[27,4],[28,3],[29,3],[30,3],[31,3],[62,2],[62,1],[57,3],[57,1],[54,1],[54,1],[21,5],[21,5],[21,4],[17,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[55,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.apply(a[s]),a[s];case 5:case 9:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:case 56:this.$=a[s];break;case 12:a[s-3].type="addParticipant",a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 13:a[s-1].type="addParticipant",this.$=a[s-1];break;case 14:a[s-3].type="addActor",a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 15:a[s-1].type="addActor",this.$=a[s-1];break;case 17:this.$={type:"sequenceIndex",sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]};break;case 22:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1]};break;case 28:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 29:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 30:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 31:case 32:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 33:a[s-1].unshift({type:"loopStart",loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:"loopEnd",loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 34:a[s-1].unshift({type:"rectStart",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:"rectEnd",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 35:a[s-1].unshift({type:"optStart",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:"optEnd",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:"altStart",altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:"parStart",parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:"criticalStart",criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:"breakStart",breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:"breakEnd",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 42:this.$=a[s-3].concat([{type:"option",optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 44:this.$=a[s-3].concat([{type:"and",parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 46:this.$=a[s-3].concat([{type:"else",altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 47:this.$=[a[s-1],{type:"addNote",placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 48: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:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 49:this.$=[a[s-1],{type:"addLinks",actor:a[s-1].actor,text:a[s]}];break;case 50:this.$=[a[s-1],{type:"addALink",actor:a[s-1].actor,text:a[s]}];break;case 51:this.$=[a[s-1],{type:"addProperties",actor:a[s-1].actor,text:a[s]}];break;case 52:this.$=[a[s-1],{type:"addDetails",actor:a[s-1].actor,text:a[s]}];break;case 55:this.$=[a[s-2],a[s]];break;case 57:this.$=r.PLACEMENT.LEFTOF;break;case 58:this.$=r.PLACEMENT.RIGHTOF;break;case 59: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:r.LINETYPE.ACTIVE_START,actor:a[s-1]}];break;case 60: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:r.LINETYPE.ACTIVE_END,actor:a[s-4]}];break;case 61: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 62:this.$={type:"addParticipant",actor:a[s]};break;case 63:this.$=r.LINETYPE.SOLID_OPEN;break;case 64:this.$=r.LINETYPE.DOTTED_OPEN;break;case 65:this.$=r.LINETYPE.SOLID;break;case 66:this.$=r.LINETYPE.DOTTED;break;case 67:this.$=r.LINETYPE.SOLID_CROSS;break;case 68:this.$=r.LINETYPE.DOTTED_CROSS;break;case 69:this.$=r.LINETYPE.SOLID_POINT;break;case 70:this.$=r.LINETYPE.DOTTED_POINT;break;case 71:this.$=r.parseMessage(a[s].trim().substring(1));break;case 72:r.parseDirective("%%{","open_directive");break;case 73:r.parseDirective(a[s],"type_directive");break;case 74:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 75:r.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:n,5:r,6:4,7:i,11:6,79:a},{1:[3]},{3:8,4:n,5:r,6:4,7:i,11:6,79:a},{3:9,4:n,5:r,6:4,7:i,11:6,79:a},{3:10,4:n,5:r,6:4,7:i,11:6,79:a},e([1,4,5,16,20,22,25,26,32,33,34,36,38,39,41,42,43,45,47,49,53,58,59,60,61,69,79],o,{8:11}),{12:12,80:[1,13]},{80:[2,72]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:s,5:c,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:f,26:d,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:m,38:b,39:_,41:v,42:x,43:k,45:w,47:T,49:E,53:C,58:S,59:A,60:M,61:N,69:D,79:a},{13:49,14:[1,50],82:L},e([14,82],[2,73]),e(O,[2,6]),{6:41,10:52,11:6,16:l,17:42,20:u,21:20,22:h,25:f,26:d,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:m,38:b,39:_,41:v,42:x,43:k,45:w,47:T,49:E,53:C,58:S,59:A,60:M,61:N,69:D,79:a},e(O,[2,8]),e(O,[2,9]),{17:53,69:D},{17:54,69:D},{5:[1,55]},{5:[1,58],23:[1,56],24:[1,57]},{17:59,69:D},{17:60,69:D},{5:[1,61]},{5:[1,62]},{5:[1,63]},{5:[1,64]},{5:[1,65]},e(O,[2,28]),e(O,[2,29]),{35:[1,66]},{37:[1,67]},e(O,[2,32]),{19:[1,68]},{19:[1,69]},{19:[1,70]},{19:[1,71]},{19:[1,72]},{19:[1,73]},{19:[1,74]},e(O,[2,40]),{66:75,70:[1,76],71:[1,77],72:[1,78],73:[1,79],74:[1,80],75:[1,81],76:[1,82],77:[1,83]},{54:84,56:[1,85],64:[1,86],65:[1,87]},{17:88,69:D},{17:89,69:D},{17:90,69:D},{17:91,69:D},e([5,18,63,70,71,72,73,74,75,76,77,78],[2,62]),{5:[1,92]},{15:93,81:[1,94]},{5:[2,75]},e(O,[2,7]),{5:[1,96],18:[1,95]},{5:[1,98],18:[1,97]},e(O,[2,16]),{5:[1,100],23:[1,99]},{5:[1,101]},e(O,[2,20]),{5:[1,102]},{5:[1,103]},e(O,[2,23]),e(O,[2,24]),e(O,[2,25]),e(O,[2,26]),e(O,[2,27]),e(O,[2,30]),e(O,[2,31]),e(B,o,{8:104}),e(B,o,{8:105}),e(B,o,{8:106}),e(I,o,{44:107,8:108}),e(F,o,{46:109,8:110}),e(R,o,{48:111,8:112}),e(B,o,{8:113}),{17:116,67:[1,114],68:[1,115],69:D},e(P,[2,63]),e(P,[2,64]),e(P,[2,65]),e(P,[2,66]),e(P,[2,67]),e(P,[2,68]),e(P,[2,69]),e(P,[2,70]),{17:117,69:D},{17:119,57:118,69:D},{69:[2,57]},{69:[2,58]},{55:120,78:$},{55:122,78:$},{55:123,78:$},{55:124,78:$},e(j,[2,10]),{13:125,82:L},{82:[2,74]},{19:[1,126]},e(O,[2,13]),{19:[1,127]},e(O,[2,15]),{5:[1,128]},e(O,[2,18]),e(O,[2,19]),e(O,[2,21]),e(O,[2,22]),{4:s,5:c,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:f,26:d,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:m,38:b,39:_,40:[1,129],41:v,42:x,43:k,45:w,47:T,49:E,53:C,58:S,59:A,60:M,61:N,69:D,79:a},{4:s,5:c,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:f,26:d,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:m,38:b,39:_,40:[1,130],41:v,42:x,43:k,45:w,47:T,49:E,53:C,58:S,59:A,60:M,61:N,69:D,79:a},{4:s,5:c,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:f,26:d,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:m,38:b,39:_,40:[1,131],41:v,42:x,43:k,45:w,47:T,49:E,53:C,58:S,59:A,60:M,61:N,69:D,79:a},{40:[1,132]},{4:s,5:c,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:f,26:d,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:m,38:b,39:_,40:[2,45],41:v,42:x,43:k,45:w,47:T,49:E,52:[1,133],53:C,58:S,59:A,60:M,61:N,69:D,79:a},{40:[1,134]},{4:s,5:c,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:f,26:d,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:m,38:b,39:_,40:[2,43],41:v,42:x,43:k,45:w,47:T,49:E,51:[1,135],53:C,58:S,59:A,60:M,61:N,69:D,79:a},{40:[1,136]},{4:s,5:c,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:f,26:d,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:m,38:b,39:_,40:[2,41],41:v,42:x,43:k,45:w,47:T,49:E,50:[1,137],53:C,58:S,59:A,60:M,61:N,69:D,79:a},{4:s,5:c,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:f,26:d,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:m,38:b,39:_,40:[1,138],41:v,42:x,43:k,45:w,47:T,49:E,53:C,58:S,59:A,60:M,61:N,69:D,79:a},{17:139,69:D},{17:140,69:D},{55:141,78:$},{55:142,78:$},{55:143,78:$},{63:[1,144],78:[2,56]},{5:[2,49]},{5:[2,71]},{5:[2,50]},{5:[2,51]},{5:[2,52]},{5:[1,145]},{5:[1,146]},{5:[1,147]},e(O,[2,17]),e(O,[2,33]),e(O,[2,34]),e(O,[2,35]),e(O,[2,36]),{19:[1,148]},e(O,[2,37]),{19:[1,149]},e(O,[2,38]),{19:[1,150]},e(O,[2,39]),{55:151,78:$},{55:152,78:$},{5:[2,61]},{5:[2,47]},{5:[2,48]},{17:153,69:D},e(j,[2,11]),e(O,[2,12]),e(O,[2,14]),e(I,o,{8:108,44:154}),e(F,o,{8:110,46:155}),e(R,o,{8:112,48:156}),{5:[2,59]},{5:[2,60]},{78:[2,55]},{40:[2,46]},{40:[2,44]},{40:[2,42]}],defaultActions:{7:[2,72],8:[2,1],9:[2,2],10:[2,3],51:[2,75],86:[2,57],87:[2,58],94:[2,74],120:[2,49],121:[2,71],122:[2,50],123:[2,51],124:[2,52],141:[2,61],142:[2,47],143:[2,48],151:[2,59],152:[2,60],153:[2,55],154:[2,46],155:[2,44],156:[2,42]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,f=a.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;a.push(y);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||d.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,v,x,k,w,T,E,C,S={};;){if(v=n[n.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null==_&&(_=b()),x=o[v]&&o[v][_]),void 0===x||!x.length||!x[0]){var A="";for(w in C=[],o[v])this.terminals_[w]&&w>u&&C.push("'"+this.terminals_[w]+"'");A=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:y,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+_);switch(x[0]){case 1:n.push(_),i.push(d.yytext),a.push(d.yylloc),n.push(x[1]),_=null,l=d.yyleng,s=d.yytext,c=d.yylineno,y=d.yylloc;break;case 2:if(T=this.productions_[x[1]][1],S.$=i[i.length-T],S._$={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},m&&(S._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[s,l,c,p.yy,x[1],i,a].concat(f))))return k;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[x[1]][0]),i.push(S.$),a.push(S._$),E=o[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0}},z=(t={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,n=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 r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[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 n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;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,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,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[r]))&&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(){return this.next()||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,n,r){switch(n){case 0:return this.begin("open_directive"),79;case 1:return this.begin("type_directive"),80;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),82;case 4:return 81;case 5:case 52:case 65:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return 23;case 12:return this.begin("ID"),16;case 13:return this.begin("ID"),20;case 14:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),69;case 15:return this.popState(),this.popState(),this.begin("LINE"),18;case 16:return this.popState(),this.popState(),5;case 17:return this.begin("LINE"),39;case 18:return this.begin("LINE"),41;case 19:return this.begin("LINE"),42;case 20:return this.begin("LINE"),43;case 21:return this.begin("LINE"),52;case 22:return this.begin("LINE"),45;case 23:return this.begin("LINE"),51;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),50;case 26:return this.begin("LINE"),49;case 27:return this.popState(),19;case 28:return 40;case 29:return 64;case 30:return 65;case 31:return 58;case 32:return 59;case 33:return 60;case 34:return 61;case 35:return 56;case 36:return 53;case 37:return this.begin("ID"),25;case 38:return this.begin("ID"),26;case 39:return 32;case 40:return 33;case 41:return this.begin("acc_title"),34;case 42:return this.popState(),"acc_title_value";case 43:return this.begin("acc_descr"),36;case 44:return this.popState(),"acc_descr_value";case 45:this.begin("acc_descr_multiline");break;case 46:this.popState();break;case 47:return"acc_descr_multiline_value";case 48:return 7;case 49:return 22;case 50:return 24;case 51:return 63;case 53:return e.yytext=e.yytext.trim(),69;case 54:return 72;case 55:return 73;case 56:return 70;case 57:return 71;case 58:return 74;case 59:return 75;case 60:return 76;case 61:return 77;case 62:return 78;case 63:return 67;case 64:return 68;case 66:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:[^\->:\n,;]+?([\-]*[^\->:\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,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[46,47],inclusive:!1},acc_descr:{rules:[44],inclusive:!1},acc_title:{rules:[42],inclusive:!1},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,14],inclusive:!1},ALIAS:{rules:[7,8,15,16],inclusive:!1},LINE:{rules:[7,8,27],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,45,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66],inclusive:!0}}},t);function U(){this.yy={}}return Y.lexer=z,U.prototype=Y,Y.Parser=U,new U}();vv.parser=vv;const xv=t=>null!==t.match(/^\s*sequenceDiagram/);let kv,wv,Tv={},Ev=[],Cv=!1;const Sv=function(t,e,n,r){const i=Tv[t];i&&e===i.name&&null==n||(null!=n&&null!=n.text||(n={text:e,wrap:null,type:r}),null!=r&&null!=n.text||(n={text:e,wrap:null,type:r}),Tv[t]={name:e,description:n.text,wrap:void 0===n.wrap&&Nv()||!!n.wrap,prevActor:kv,links:{},properties:{},actorCnt:null,rectData:null,type:r||"participant"},kv&&Tv[kv]&&(Tv[kv].nextActor=t),kv=t)},Av=function(t,e,n={text:void 0,wrap:void 0},r){if(r===Dv.ACTIVE_END&&(t=>{let e,n=0;for(e=0;e<Ev.length;e++)Ev[e].type===Dv.ACTIVE_START&&Ev[e].from.actor===t&&n++,Ev[e].type===Dv.ACTIVE_END&&Ev[e].from.actor===t&&n--;return n})(t.actor)<1){let e=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw e.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}return Ev.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&Nv()||!!n.wrap,type:r}),!0},Mv=function(t){return Tv[t]},Nv=()=>void 0!==wv?wv:Mh().sequence.wrap,Dv={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,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31},Lv=function(t,e,n){n.text,void 0===n.wrap&&Nv()||n.wrap;const r=[].concat(t,t);Ev.push({from:r[0],to:r[1],message:n.text,wrap:void 0===n.wrap&&Nv()||!!n.wrap,type:Dv.NOTE,placement:e})},Ov=function(t,e){const n=Mv(t);try{let t=tl(e.text,Mh());t=t.replace(/&amp;/g,"&"),t=t.replace(/&equals;/g,"="),Bv(n,JSON.parse(t))}catch(t){Xc.error("error while parsing actor link text",t)}};function Bv(t,e){if(null==t.links)t.links=e;else for(let n in e)t.links[n]=e[n]}const Iv=function(t,e){const n=Mv(t);try{let t=tl(e.text,Mh());Fv(n,JSON.parse(t))}catch(t){Xc.error("error while parsing actor properties text",t)}};function Fv(t,e){if(null==t.properties)t.properties=e;else for(let n in e)t.properties[n]=e[n]}const Rv=function(t,e){const n=Mv(t),r=document.getElementById(e.text);try{const t=r.innerHTML,e=JSON.parse(t);e.properties&&Fv(n,e.properties),e.links&&Bv(n,e.links)}catch(t){Xc.error("error while parsing actor details text",t)}},Pv=function(t){if(t instanceof Array)t.forEach((function(t){Pv(t)}));else switch(t.type){case"sequenceIndex":Ev.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":Sv(t.actor,t.actor,t.description,"participant");break;case"addActor":Sv(t.actor,t.actor,t.description,"actor");break;case"activeStart":case"activeEnd":Av(t.actor,void 0,void 0,t.signalType);break;case"addNote":Lv(t.actor,t.placement,t.text);break;case"addLinks":Ov(t.actor,t.text);break;case"addALink":!function(t,e){const n=Mv(t);try{const t={};let o=tl(e.text,Mh());var r=o.indexOf("@");o=o.replace(/&amp;/g,"&"),o=o.replace(/&equals;/g,"=");var i=o.slice(0,r-1).trim(),a=o.slice(r+1).trim();t[i]=a,Bv(n,t)}catch(t){Xc.error("error while parsing actor link text",t)}}(t.actor,t.text);break;case"addProperties":Iv(t.actor,t.text);break;case"addDetails":Rv(t.actor,t.text);break;case"addMessage":Av(t.from,t.to,t.msg,t.signalType);break;case"loopStart":Av(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":Av(void 0,void 0,void 0,t.signalType);break;case"rectStart":Av(void 0,void 0,t.color,t.signalType);break;case"optStart":Av(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":Av(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":gf(t.text);break;case"parStart":case"and":Av(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":Av(void 0,void 0,t.criticalText,t.signalType);break;case"option":Av(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":Av(void 0,void 0,t.breakText,t.signalType)}},$v={addActor:Sv,addMessage:function(t,e,n,r){Ev.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&Nv()||!!n.wrap,answer:r})},addSignal:Av,addLinks:Ov,addDetails:Rv,addProperties:Iv,autoWrap:Nv,setWrap:function(t){wv=t},enableSequenceNumbers:function(){Cv=!0},disableSequenceNumbers:function(){Cv=!1},showSequenceNumbers:()=>Cv,getMessages:function(){return Ev},getActors:function(){return Tv},getActor:Mv,getActorKeys:function(){return Object.keys(Tv)},getActorProperty:function(t,e){if(void 0!==t&&void 0!==t.properties)return t.properties[e]},getAccTitle:yf,getDiagramTitle:vf,setDiagramTitle:_f,parseDirective:function(t,e,n){jk.parseDirective(this,t,e,n)},getConfig:()=>Mh().sequence,clear:function(){Tv={},Ev=[],Cv=!1,pf()},parseMessage:function(t){const e=t.trim(),n={text:e.replace(/^[:]?(?:no)?wrap:/,"").trim(),wrap:null!==e.match(/^[:]?wrap:/)||null===e.match(/^[:]?nowrap:/)&&void 0};return Xc.debug("parseMessage:",n),n},LINETYPE:Dv,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:Lv,setAccTitle:gf,apply:Pv,setAccDescription:mf,getAccDescription:bf};let jv=[];const Yv=()=>{jv.forEach((t=>{t()})),jv=[]},zv=function(t,e){const n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},Uv=(t,e)=>{var n;n=()=>{const n=document.querySelectorAll(t);0!==n.length&&(n[0].addEventListener("mouseover",(function(){Hv("actor"+e+"_popup")})),n[0].addEventListener("mouseout",(function(){Vv("actor"+e+"_popup")})))},jv.push(n)},qv=function(t,e,n,r){const a=t.append("image");a.attr("x",e),a.attr("y",n);var o=(0,i.N)(r);a.attr("xlink:href",o)},Wv=function(t,e,n,r){const a=t.append("use");a.attr("x",e),a.attr("y",n);var o=(0,i.N)(r);a.attr("xlink:href","#"+o)},Hv=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="block")},Vv=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="none")},Gv=function(t,e){let n=0,r=0;const i=e.text.split(ol.lineBreakRegex);let a=[],o=0,s=()=>e.y;if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":s=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":s=()=>Math.round(e.y+(n+r+e.textMargin)/2);break;case"bottom":case"end":s=()=>Math.round(e.y+(n+r+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="middle",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="middle",e.alignmentBaseline="middle"}for(let c=0;c<i.length;c++){let l=i[c];void 0!==e.textMargin&&0===e.textMargin&&void 0!==e.fontSize&&(o=c*e.fontSize);const u=t.append("text");if(u.attr("x",e.x),u.attr("y",s()),void 0!==e.anchor&&u.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&u.style("font-family",e.fontFamily),void 0!==e.fontSize&&u.style("font-size",e.fontSize),void 0!==e.fontWeight&&u.style("font-weight",e.fontWeight),void 0!==e.fill&&u.attr("fill",e.fill),void 0!==e.class&&u.attr("class",e.class),void 0!==e.dy?u.attr("dy",e.dy):0!==o&&u.attr("dy",o),e.tspan){const t=u.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(l)}else u.text(l);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(u._groups||u)[0][0].getBBox().height,n=r),a.push(u)}return a},Xv=function(t,e){const n=t.append("polygon");var r,i,a,o;return n.attr("points",(r=e.x)+","+(i=e.y)+" "+(r+(a=e.width))+","+i+" "+(r+a)+","+(i+(o=e.height)-7)+" "+(r+a-8.4)+","+(i+o)+" "+r+","+(i+o)),n.attr("class","labelBox"),e.y=e.y+e.height/2,Gv(t,e),n};let Zv=-1;const Qv=(t,e)=>{t.selectAll&&t.selectAll(".actor-line").attr("class","200").attr("y2",e-55)},Kv=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}},Jv=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},tx=function(){function t(t,e,n,i,a,o,s){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,c){const{actorFontSize:l,actorFontFamily:u,actorFontWeight:h}=c;let f=l&&l.replace?l.replace("px",""):l;const d=t.split(ol.lineBreakRegex);for(let t=0;t<d.length;t++){const c=t*f-f*(d.length-1)/2,p=e.append("text").attr("x",n+a/2).attr("y",i).style("text-anchor","middle").style("font-size",l).style("font-weight",h).style("font-family",u);p.append("tspan").attr("x",n+a/2).attr("dy",c).text(d[t]),p.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(p,s)}}function n(t,n,i,a,o,s,c,l){const u=n.append("switch"),h=u.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,u,i,a,o,s,c,l),r(h,c)}function r(t,e){for(const n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),ex=function(){function t(t,e,n,i,a,o,s){r(e.append("text").attr("x",n).attr("y",i).style("text-anchor","start").text(t),s)}function e(t,e,n,i,a,o,s,c){const{actorFontSize:l,actorFontFamily:u,actorFontWeight:h}=c,f=t.split(ol.lineBreakRegex);for(let t=0;t<f.length;t++){const a=t*l-l*(f.length-1)/2,c=e.append("text").attr("x",n).attr("y",i).style("text-anchor","start").style("font-size",l).style("font-weight",h).style("font-family",u);c.append("tspan").attr("x",n).attr("dy",a).text(f[t]),c.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(c,s)}}function n(t,n,i,a,o,s,c,l){const u=n.append("switch"),h=u.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,u,i,a,0,s,c,l),r(h,c)}function r(t,e){for(const n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),nx=zv,rx=function(t,e,n){switch(e.type){case"actor":return function(t,e,n){const r=e.x+e.width/2;0===e.y&&(Zv++,t.append("line").attr("id","actor"+Zv).attr("x1",r).attr("y1",80).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));const i=t.append("g");i.attr("class","actor-man");const a={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};a.x=e.x,a.y=e.y,a.fill="#eaeaea",a.width=e.width,a.height=e.height,a.class="actor",a.rx=3,a.ry=3,i.append("line").attr("id","actor-man-torso"+Zv).attr("x1",r).attr("y1",e.y+25).attr("x2",r).attr("y2",e.y+45),i.append("line").attr("id","actor-man-arms"+Zv).attr("x1",r-18).attr("y1",e.y+33).attr("x2",r+18).attr("y2",e.y+33),i.append("line").attr("x1",r-18).attr("y1",e.y+60).attr("x2",r).attr("y2",e.y+45),i.append("line").attr("x1",r).attr("y1",e.y+45).attr("x2",r+16).attr("y2",e.y+60);const o=i.append("circle");o.attr("cx",e.x+e.width/2),o.attr("cy",e.y+10),o.attr("r",15),o.attr("width",e.width),o.attr("height",e.height);const s=i.node().getBBox();return e.height=s.height,tx(n)(e.description,i,a.x,a.y+35,a.width,a.height,{class:"actor"},n),e.height}(t,e,n);case"participant":return function(t,e,n){const r=e.x+e.width/2,i=t.append("g");var a=i;0===e.y&&(Zv++,a.append("line").attr("id","actor"+Zv).attr("x1",r).attr("y1",5).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"),a=i.append("g"),e.actorCnt=Zv,null!=e.links&&(a.attr("id","root-"+Zv),Uv("#root-"+Zv,Zv)));const o={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};var s="actor";null!=e.properties&&e.properties.class?s=e.properties.class:o.fill="#eaeaea",o.x=e.x,o.y=e.y,o.width=e.width,o.height=e.height,o.class=s,o.rx=3,o.ry=3;const c=zv(a,o);if(e.rectData=o,null!=e.properties&&e.properties.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?Wv(a,o.x+o.width-20,o.y+10,t.substr(1)):qv(a,o.x+o.width-20,o.y+10,t)}tx(n)(e.description,a,o.x,o.y,o.width,o.height,{class:"actor"},n);let l=e.height;if(c.node){const t=c.node().getBBox();e.height=t.height,l=t.height}return l}(t,e,n)}},ix=function(t,e,n,r,a){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const o=e.links,s=e.actorCnt,c=e.rectData;var l="none";a&&(l="block !important");const u=t.append("g");u.attr("id","actor"+s+"_popup"),u.attr("class","actorPopupMenu"),u.attr("display",l),Uv("#actor"+s+"_popup",s);var h="";void 0!==c.class&&(h=" "+c.class);let f=c.width>n?c.width:n;const d=u.append("rect");if(d.attr("class","actorPopupMenuPanel"+h),d.attr("x",c.x),d.attr("y",c.height),d.attr("fill",c.fill),d.attr("stroke",c.stroke),d.attr("width",f),d.attr("height",c.height),d.attr("rx",c.rx),d.attr("ry",c.ry),null!=o){var p=20;for(let t in o){var g=u.append("a"),y=(0,i.N)(o[t]);g.attr("xlink:href",y),g.attr("target","_blank"),ex(r)(t,g,c.x+10,c.height+p,f,20,{class:"actor"},r),p+=30}}return d.attr("height",p),{height:c.height+p,width:f}},ax=function(t){return t.append("g")},ox=function(t,e,n,r,i){const a={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0},o=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=n-e.starty,zv(o,a)},sx=function(t,e,n,r){const{boxMargin:i,boxTextMargin:a,labelBoxHeight:o,labelBoxWidth:s,messageFontFamily:c,messageFontSize:l,messageFontWeight:u}=r,h=t.append("g"),f=function(t,e,n,r){return h.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("class","loopLine")};f(e.startx,e.starty,e.stopx,e.starty),f(e.stopx,e.starty,e.stopx,e.stopy),f(e.startx,e.stopy,e.stopx,e.stopy),f(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){f(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));let d={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};d.text=n,d.x=e.startx,d.y=e.starty,d.fontFamily=c,d.fontSize=l,d.fontWeight=u,d.anchor="middle",d.valign="middle",d.tspan=!1,d.width=s||50,d.height=o||20,d.textMargin=a,d.class="labelText",Xv(h,d),d={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},d.text=e.title,d.x=e.startx+s/2+(e.stopx-e.startx)/2,d.y=e.starty+i+a,d.anchor="middle",d.valign="middle",d.textMargin=a,d.class="loopText",d.fontFamily=c,d.fontSize=l,d.fontWeight=u,d.wrap=!0;let p=Gv(h,d);return void 0!==e.sectionTitles&&e.sectionTitles.forEach((function(t,n){if(t.message){d.text=t.message,d.x=e.startx+(e.stopx-e.startx)/2,d.y=e.sections[n].y+i+a,d.class="loopText",d.anchor="middle",d.valign="middle",d.tspan=!1,d.fontFamily=c,d.fontSize=l,d.fontWeight=u,d.wrap=e.wrap,p=Gv(h,d);let r=Math.round(p.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));e.sections[n].height+=r-(i+a)}})),e.height=Math.round(e.stopy-e.starty),h},cx=function(t,e){zv(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},lx=function(t){t.append("defs").append("marker").attr("id","arrowhead").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")},ux=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).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")},hx=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)},fx=function(t){const 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")},dx=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},px=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},gx=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},yx=Kv,mx=Jv;i.N;let bx={};const _x={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((t=>t.height||0)))+(0===this.loops.length?0:this.loops.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.messages.length?0:this.messages.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.notes.length?0:this.notes.map((t=>t.height||0)).reduce(((t,e)=>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,Ex(Mh())},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){const i=this;let a=0;function o(o){return function(s){a++;const c=i.sequenceItems.length-a+1;i.updateVal(s,"starty",e-c*bx.boxMargin,Math.min),i.updateVal(s,"stopy",r+c*bx.boxMargin,Math.max),i.updateVal(_x.data,"startx",t-c*bx.boxMargin,Math.min),i.updateVal(_x.data,"stopx",n+c*bx.boxMargin,Math.max),"activation"!==o&&(i.updateVal(s,"startx",t-c*bx.boxMargin,Math.min),i.updateVal(s,"stopx",n+c*bx.boxMargin,Math.max),i.updateVal(_x.data,"starty",e-c*bx.boxMargin,Math.min),i.updateVal(_x.data,"stopy",r+c*bx.boxMargin,Math.max))}}this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},insert:function(t,e,n,r){const i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(_x.data,"startx",i,Math.min),this.updateVal(_x.data,"starty",o,Math.min),this.updateVal(_x.data,"stopx",a,Math.max),this.updateVal(_x.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},newActivation:function(t,e,n){const r=n[t.from.actor],i=Cx(t.from.actor).length||0,a=r.x+r.width/2+(i-1)*bx.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+bx.activationWidth,stopy:void 0,actor:t.from.actor,anchored:ax(e)})},endActivation:function(t){const e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(t={message:void 0,wrap:!1,width:void 0},e){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(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:_x.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{bounds:this.data,models:this.models}}},vx=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),xx=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),kx=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),wx=function(t,e,n,r,i,a){if(!0===i.hideUnusedParticipants){const t=new Set;a.forEach((e=>{t.add(e.from),t.add(e.to)})),n=n.filter((e=>t.has(e)))}let o=0,s=0,c=0;for(let i=0;i<n.length;i++){const a=e[n[i]];a.width=a.width||bx.width,a.height=Math.max(a.height||bx.height,bx.height),a.margin=a.margin||bx.actorMargin,a.x=o+s,a.y=r;const l=rx(t,a,bx);c=Math.max(c,l),_x.insert(a.x,r,a.x+a.width,a.height),o+=a.width,s+=a.margin,_x.models.addActor(a)}_x.bumpVerticalPos(c)},Tx=function(t,e,n,r){let i=0,a=0;for(let o=0;o<n.length;o++){const s=e[n[o]],c=Mx(s),l=ix(t,s,c,bx,bx.forceMenus,r);l.height>i&&(i=l.height),l.width+s.x>a&&(a=l.width+s.x)}return{maxHeight:i,maxWidth:a}},Ex=function(t){Tl(bx,t),t.fontFamily&&(bx.actorFontFamily=bx.noteFontFamily=bx.messageFontFamily=t.fontFamily),t.fontSize&&(bx.actorFontSize=bx.noteFontSize=bx.messageFontSize=t.fontSize),t.fontWeight&&(bx.actorFontWeight=bx.noteFontWeight=bx.messageFontWeight=t.fontWeight)},Cx=function(t){return _x.activations.filter((function(e){return e.actor===t}))},Sx=function(t,e){const n=e[t],r=Cx(t);return[r.reduce((function(t,e){return Math.min(t,e.startx)}),n.x+n.width/2),r.reduce((function(t,e){return Math.max(t,e.stopx)}),n.x+n.width/2)]};function Ax(t,e,n,r,i){_x.bumpVerticalPos(n);let a=r;if(e.id&&e.message&&t[e.id]){const n=t[e.id].width,i=vx(bx);e.message=_h.wrapLabel(`[${e.message}]`,n-2*bx.wrapPadding,i),e.width=n,e.wrap=!0;const o=_h.calculateTextDimensions(e.message,i),s=Math.max(o.height,bx.labelBoxHeight);a=r+s,Xc.debug(`${s} - ${e.message}`)}i(e),_x.bumpVerticalPos(a)}const Mx=function(t){let e=0;const n=kx(bx);for(const r in t.links){const t=_h.calculateTextDimensions(r,n).width+2*bx.wrapPadding+2*bx.boxMargin;e<t&&(e=t)}return e},Nx={bounds:_x,drawActors:wx,drawActorsPopup:Tx,setConf:Ex,draw:function(t,e,n,r){const{securityLevel:i,sequence:a}=Mh();let o;bx=a,"sandbox"===i&&(o=Co("#i"+e));const s=Co("sandbox"===i?o.nodes()[0].contentDocument.body:"body"),c="sandbox"===i?o.nodes()[0].contentDocument:document;_x.init(),Xc.debug(r.db);const l="sandbox"===i?s.select(`[id="${e}"]`):Co(`[id="${e}"]`),u=r.db.getActors(),h=r.db.getActorKeys(),f=r.db.getMessages(),d=r.db.getDiagramTitle(),p=function(t,e,n){const r={};return e.forEach((function(e){if(t[e.to]&&t[e.from]){const i=t[e.to];if(e.placement===n.db.PLACEMENT.LEFTOF&&!i.prevActor)return;if(e.placement===n.db.PLACEMENT.RIGHTOF&&!i.nextActor)return;const a=void 0!==e.placement,o=!a,s=a?xx(bx):vx(bx),c=e.wrap?_h.wrapLabel(e.message,bx.width-2*bx.wrapPadding,s):e.message,l=_h.calculateTextDimensions(c,s).width+2*bx.wrapPadding;o&&e.from===i.nextActor?r[e.to]=Math.max(r[e.to]||0,l):o&&e.from===i.prevActor?r[e.from]=Math.max(r[e.from]||0,l):o&&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===n.db.PLACEMENT.RIGHTOF?r[e.from]=Math.max(r[e.from]||0,l):e.placement===n.db.PLACEMENT.LEFTOF?r[i.prevActor]=Math.max(r[i.prevActor]||0,l):e.placement===n.db.PLACEMENT.OVER&&(i.prevActor&&(r[i.prevActor]=Math.max(r[i.prevActor]||0,l/2)),i.nextActor&&(r[e.from]=Math.max(r[e.from]||0,l/2)))}})),Xc.debug("maxMessageWidthPerActor:",r),r}(u,f,r);bx.height=function(t,e){let n=0;Object.keys(t).forEach((e=>{const r=t[e];r.wrap&&(r.description=_h.wrapLabel(r.description,bx.width-2*bx.wrapPadding,kx(bx)));const i=_h.calculateTextDimensions(r.description,kx(bx));r.width=r.wrap?bx.width:Math.max(bx.width,i.width+2*bx.wrapPadding),r.height=r.wrap?Math.max(i.height,bx.height):bx.height,n=Math.max(n,r.height)}));for(const n in e){const r=t[n];if(!r)continue;const i=t[r.nextActor];if(!i)continue;const a=e[n]+bx.actorMargin-r.width/2-i.width/2;r.margin=Math.max(a,bx.actorMargin)}return Math.max(n,bx.height)}(u,p),px(l),dx(l),gx(l),wx(l,u,h,0,bx,f);const g=function(t,e,n,r){const i={},a=[];let o,s,c;return t.forEach((function(t){switch(t.id=_h.random({length:10}),t.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:a.push({id:t.id,msg:t.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:t.message&&(o=a.pop(),i[o.id]=o,i[t.id]=o,a.push(o));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:o=a.pop(),i[o.id]=o;break;case r.db.LINETYPE.ACTIVE_START:{const n=e[t.from?t.from.actor:t.to.actor],r=Cx(t.from?t.from.actor:t.to.actor).length,i=n.x+n.width/2+(r-1)*bx.activationWidth/2,a={startx:i,stopx:i+bx.activationWidth,actor:t.from.actor,enabled:!0};_x.activations.push(a)}break;case r.db.LINETYPE.ACTIVE_END:{const e=_x.activations.map((t=>t.actor)).lastIndexOf(t.from.actor);delete _x.activations.splice(e,1)[0]}}void 0!==t.placement?(s=function(t,e,n){const r=e[t.from].x,i=e[t.to].x,a=t.wrap&&t.message;let o=_h.calculateTextDimensions(a?_h.wrapLabel(t.message,bx.width,xx(bx)):t.message,xx(bx));const s={width:a?bx.width:Math.max(bx.width,o.width+2*bx.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===n.db.PLACEMENT.RIGHTOF?(s.width=a?Math.max(bx.width,o.width):Math.max(e[t.from].width/2+e[t.to].width/2,o.width+2*bx.noteMargin),s.startx=r+(e[t.from].width+bx.actorMargin)/2):t.placement===n.db.PLACEMENT.LEFTOF?(s.width=a?Math.max(bx.width,o.width+2*bx.noteMargin):Math.max(e[t.from].width/2+e[t.to].width/2,o.width+2*bx.noteMargin),s.startx=r-s.width+(e[t.from].width-bx.actorMargin)/2):t.to===t.from?(o=_h.calculateTextDimensions(a?_h.wrapLabel(t.message,Math.max(bx.width,e[t.from].width),xx(bx)):t.message,xx(bx)),s.width=a?Math.max(bx.width,e[t.from].width):Math.max(e[t.from].width,bx.width,o.width+2*bx.noteMargin),s.startx=r+(e[t.from].width-s.width)/2):(s.width=Math.abs(r+e[t.from].width/2-(i+e[t.to].width/2))+bx.actorMargin,s.startx=r<i?r+e[t.from].width/2-bx.actorMargin/2:i+e[t.to].width/2-bx.actorMargin/2),a&&(s.message=_h.wrapLabel(t.message,s.width-2*bx.wrapPadding,xx(bx))),Xc.debug(`NM:[${s.startx},${s.stopx},${s.starty},${s.stopy}:${s.width},${s.height}=${t.message}]`),s}(t,e,r),t.noteModel=s,a.forEach((t=>{o=t,o.from=Math.min(o.from,s.startx),o.to=Math.max(o.to,s.startx+s.width),o.width=Math.max(o.width,Math.abs(o.from-o.to))-bx.labelBoxWidth}))):(c=function(t,e,n){let r=!1;if([n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(r=!0),!r)return{};const i=Sx(t.from,e),a=Sx(t.to,e),o=i[0]<=a[0]?1:0,s=i[0]<a[0]?0:1,c=i.concat(a),l=Math.abs(a[s]-i[o]);t.wrap&&t.message&&(t.message=_h.wrapLabel(t.message,Math.max(l+2*bx.wrapPadding,bx.width),vx(bx)));const u=_h.calculateTextDimensions(t.message,vx(bx));return{width:Math.max(t.wrap?0:u.width+2*bx.wrapPadding,l+2*bx.wrapPadding,bx.width),height:0,startx:i[o],stopx:a[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,r),t.msgModel=c,c.startx&&c.stopx&&a.length>0&&a.forEach((n=>{if(o=n,c.startx===c.stopx){const n=e[t.from],r=e[t.to];o.from=Math.min(n.x-c.width/2,n.x-n.width/2,o.from),o.to=Math.max(r.x+c.width/2,r.x+n.width/2,o.to),o.width=Math.max(o.width,Math.abs(o.to-o.from))-bx.labelBoxWidth}else o.from=Math.min(c.startx,o.from),o.to=Math.max(c.stopx,o.to),o.width=Math.max(o.width,c.width)-bx.labelBoxWidth})))})),_x.activations=[],Xc.debug("Loop type widths:",i),i}(f,u,0,r);lx(l),fx(l),ux(l),hx(l);let y=1,m=1;const b=[];f.forEach((function(t){let e,n,i;switch(t.type){case r.db.LINETYPE.NOTE:n=t.noteModel,function(t,e){_x.bumpVerticalPos(bx.boxMargin),e.height=bx.boxMargin,e.starty=_x.getVerticalPos();const n=mx();n.x=e.startx,n.y=e.starty,n.width=e.width||bx.width,n.class="note";const r=t.append("g"),i=nx(r,n),a=yx();a.x=e.startx,a.y=e.starty,a.width=n.width,a.dy="1em",a.text=e.message,a.class="noteText",a.fontFamily=bx.noteFontFamily,a.fontSize=bx.noteFontSize,a.fontWeight=bx.noteFontWeight,a.anchor=bx.noteAlign,a.textMargin=bx.noteMargin,a.valign="center";const o=Gv(r,a),s=Math.round(o.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));i.attr("height",s+2*bx.noteMargin),e.height+=s+2*bx.noteMargin,_x.bumpVerticalPos(s+2*bx.noteMargin),e.stopy=e.starty+s+2*bx.noteMargin,e.stopx=e.startx+n.width,_x.insert(e.startx,e.starty,e.stopx,e.stopy),_x.models.addNote(e)}(l,n);break;case r.db.LINETYPE.ACTIVE_START:_x.newActivation(t,l,u);break;case r.db.LINETYPE.ACTIVE_END:!function(t,e){const n=_x.endActivation(t);n.starty+18>e&&(n.starty=e-6,e+=12),ox(l,n,e,bx,Cx(t.from.actor).length),_x.insert(n.startx,e-10,n.stopx,e)}(t,_x.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:Ax(g,t,bx.boxMargin,bx.boxMargin+bx.boxTextMargin,(t=>_x.newLoop(t)));break;case r.db.LINETYPE.LOOP_END:e=_x.endLoop(),sx(l,e,"loop",bx),_x.bumpVerticalPos(e.stopy-_x.getVerticalPos()),_x.models.addLoop(e);break;case r.db.LINETYPE.RECT_START:Ax(g,t,bx.boxMargin,bx.boxMargin,(t=>_x.newLoop(void 0,t.message)));break;case r.db.LINETYPE.RECT_END:e=_x.endLoop(),cx(l,e),_x.models.addLoop(e),_x.bumpVerticalPos(e.stopy-_x.getVerticalPos());break;case r.db.LINETYPE.OPT_START:Ax(g,t,bx.boxMargin,bx.boxMargin+bx.boxTextMargin,(t=>_x.newLoop(t)));break;case r.db.LINETYPE.OPT_END:e=_x.endLoop(),sx(l,e,"opt",bx),_x.bumpVerticalPos(e.stopy-_x.getVerticalPos()),_x.models.addLoop(e);break;case r.db.LINETYPE.ALT_START:Ax(g,t,bx.boxMargin,bx.boxMargin+bx.boxTextMargin,(t=>_x.newLoop(t)));break;case r.db.LINETYPE.ALT_ELSE:Ax(g,t,bx.boxMargin+bx.boxTextMargin,bx.boxMargin,(t=>_x.addSectionToLoop(t)));break;case r.db.LINETYPE.ALT_END:e=_x.endLoop(),sx(l,e,"alt",bx),_x.bumpVerticalPos(e.stopy-_x.getVerticalPos()),_x.models.addLoop(e);break;case r.db.LINETYPE.PAR_START:Ax(g,t,bx.boxMargin,bx.boxMargin+bx.boxTextMargin,(t=>_x.newLoop(t)));break;case r.db.LINETYPE.PAR_AND:Ax(g,t,bx.boxMargin+bx.boxTextMargin,bx.boxMargin,(t=>_x.addSectionToLoop(t)));break;case r.db.LINETYPE.PAR_END:e=_x.endLoop(),sx(l,e,"par",bx),_x.bumpVerticalPos(e.stopy-_x.getVerticalPos()),_x.models.addLoop(e);break;case r.db.LINETYPE.AUTONUMBER:y=t.message.start||y,m=t.message.step||m,t.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:Ax(g,t,bx.boxMargin,bx.boxMargin+bx.boxTextMargin,(t=>_x.newLoop(t)));break;case r.db.LINETYPE.CRITICAL_OPTION:Ax(g,t,bx.boxMargin+bx.boxTextMargin,bx.boxMargin,(t=>_x.addSectionToLoop(t)));break;case r.db.LINETYPE.CRITICAL_END:e=_x.endLoop(),sx(l,e,"critical",bx),_x.bumpVerticalPos(e.stopy-_x.getVerticalPos()),_x.models.addLoop(e);break;case r.db.LINETYPE.BREAK_START:Ax(g,t,bx.boxMargin,bx.boxMargin+bx.boxTextMargin,(t=>_x.newLoop(t)));break;case r.db.LINETYPE.BREAK_END:e=_x.endLoop(),sx(l,e,"break",bx),_x.bumpVerticalPos(e.stopy-_x.getVerticalPos()),_x.models.addLoop(e);break;default:try{i=t.msgModel,i.starty=_x.getVerticalPos(),i.sequenceIndex=y,i.sequenceVisible=r.db.showSequenceNumbers();const e=function(t,e){_x.bumpVerticalPos(10);const{startx:n,stopx:r,message:i}=e,a=ol.splitBreaks(i).length,o=_h.calculateTextDimensions(i,vx(bx)),s=o.height/a;let c;e.height+=s,_x.bumpVerticalPos(s);let l=o.height-10;const u=o.width;if(n===r){c=_x.getVerticalPos()+l,bx.rightAngles||(l+=bx.boxMargin,c=_x.getVerticalPos()+l),l+=30;const t=Math.max(u/2,bx.width/2);_x.insert(n-t,_x.getVerticalPos()-10+l,r+t,_x.getVerticalPos()+30+l)}else l+=bx.boxMargin,c=_x.getVerticalPos()+l,_x.insert(n,c-10,r,c);return _x.bumpVerticalPos(l),e.height+=l,e.stopy=e.starty+e.height,_x.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),c}(0,i);b.push({messageModel:i,lineStarty:e}),_x.models.addMessage(i)}catch(t){Xc.error("error while drawing message",t)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(y+=m)})),b.forEach((t=>function(t,e,n,r){const{startx:i,stopx:a,starty:o,message:s,type:c,sequenceIndex:l,sequenceVisible:u}=e,h=_h.calculateTextDimensions(s,vx(bx)),f=yx();f.x=i,f.y=o+10,f.width=a-i,f.class="messageText",f.dy="1em",f.text=s,f.fontFamily=bx.messageFontFamily,f.fontSize=bx.messageFontSize,f.fontWeight=bx.messageFontWeight,f.anchor=bx.messageAlign,f.valign="center",f.textMargin=bx.wrapPadding,f.tspan=!1,Gv(t,f);const d=h.width;let p;i===a?p=bx.rightAngles?t.append("path").attr("d",`M ${i},${n} H ${i+Math.max(bx.width/2,d/2)} V ${n+25} H ${i}`):t.append("path").attr("d","M "+i+","+n+" C "+(i+60)+","+(n-10)+" "+(i+60)+","+(n+30)+" "+i+","+(n+20)):(p=t.append("line"),p.attr("x1",i),p.attr("y1",n),p.attr("x2",a),p.attr("y2",n)),c===r.db.LINETYPE.DOTTED||c===r.db.LINETYPE.DOTTED_CROSS||c===r.db.LINETYPE.DOTTED_POINT||c===r.db.LINETYPE.DOTTED_OPEN?(p.style("stroke-dasharray","3, 3"),p.attr("class","messageLine1")):p.attr("class","messageLine0");let g="";bx.arrowMarkerAbsolute&&(g=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,g=g.replace(/\(/g,"\\("),g=g.replace(/\)/g,"\\)")),p.attr("stroke-width",2),p.attr("stroke","none"),p.style("fill","none"),c!==r.db.LINETYPE.SOLID&&c!==r.db.LINETYPE.DOTTED||p.attr("marker-end","url("+g+"#arrowhead)"),c!==r.db.LINETYPE.SOLID_POINT&&c!==r.db.LINETYPE.DOTTED_POINT||p.attr("marker-end","url("+g+"#filled-head)"),c!==r.db.LINETYPE.SOLID_CROSS&&c!==r.db.LINETYPE.DOTTED_CROSS||p.attr("marker-end","url("+g+"#crosshead)"),(u||bx.showSequenceNumbers)&&(p.attr("marker-start","url("+g+"#sequencenumber)"),t.append("text").attr("x",i).attr("y",n+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(l))}(l,t.messageModel,t.lineStarty,r))),bx.mirrorActors&&(_x.bumpVerticalPos(2*bx.boxMargin),wx(l,u,h,_x.getVerticalPos(),bx,f),_x.bumpVerticalPos(bx.boxMargin),Qv(l,_x.getVerticalPos()));const _=Tx(l,u,h,c),{bounds:v}=_x.getBounds();Xc.debug("For line height fix Querying: #"+e+" .actor-line"),So("#"+e+" .actor-line").attr("y2",v.stopy);let x=v.stopy-v.starty;x<_.maxHeight&&(x=_.maxHeight);let k=x+2*bx.diagramMarginY;bx.mirrorActors&&(k=k-bx.boxMargin+bx.bottomMarginAdj);let w=v.stopx-v.startx;w<_.maxWidth&&(w=_.maxWidth);const T=w+2*bx.diagramMarginX;d&&l.append("text").text(d).attr("x",(v.stopx-v.startx)/2-2*bx.diagramMarginX).attr("y",-25),Fh(l,0,T,bx.useMaxWidth);const E=d?40:0;l.attr("viewBox",v.startx-bx.diagramMarginX+" -"+(bx.diagramMarginY+E)+" "+T+" "+(k+E)),Pf(r.db,l,e),Xc.debug("models:",_x.models)}};var Dx=function(){var t,e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,2],r=[1,3],i=[1,5],a=[1,7],o=[2,5],s=[1,15],c=[1,17],l=[1,19],u=[1,20],h=[1,21],f=[1,22],d=[1,33],p=[1,23],g=[1,24],y=[1,25],m=[1,26],b=[1,27],_=[1,30],v=[1,31],x=[1,32],k=[1,35],w=[1,36],T=[1,37],E=[1,38],C=[1,34],S=[1,41],A=[1,4,5,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],M=[1,4,5,12,13,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],N=[1,4,5,7,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],D=[4,5,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],L={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,CHOICE:25,CONCURRENT:26,note:27,notePosition:28,NOTE_TEXT:29,direction:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,openDirective:36,typeDirective:37,closeDirective:38,":":39,argDirective:40,direction_tb:41,direction_bt:42,direction_rl:43,direction_lr:44,eol:45,";":46,EDGE_STATE:47,left_of:48,right_of:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,$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:"CHOICE",26:"CONCURRENT",27:"note",29:"NOTE_TEXT",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",39:":",41:"direction_tb",42:"direction_bt",43:"direction_rl",44:"direction_lr",46:";",47:"EDGE_STATE",48:"left_of",49:"right_of",50:"open_directive",51:"type_directive",52:"arg_directive",53:"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,1],[10,4],[10,4],[10,1],[10,1],[10,2],[10,2],[10,1],[6,3],[6,5],[30,1],[30,1],[30,1],[30,1],[45,1],[45,1],[11,1],[11,1],[28,1],[28,1],[36,1],[37,1],[40,1],[38,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.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:case 39:case 40: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:r.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:a[s],type:"choice"};break;case 23:this.$={stmt:"state",id:r.getDividerId(),type:"divider"};break;case 24:this.$={stmt:"state",id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 28:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 33:r.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 34:r.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 35:r.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 36:r.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 43:r.parseDirective("%%{","open_directive");break;case 44:r.parseDirective(a[s],"type_directive");break;case 45:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 46:r.parseDirective("}%%","close_directive","state")}},table:[{3:1,4:n,5:r,6:4,7:i,36:6,50:a},{1:[3]},{3:8,4:n,5:r,6:4,7:i,36:6,50:a},{3:9,4:n,5:r,6:4,7:i,36:6,50:a},{3:10,4:n,5:r,6:4,7:i,36:6,50:a},e([1,4,5,14,15,17,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],o,{8:11}),{37:12,51:[1,13]},{51:[2,43]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:s,5:c,6:28,9:14,10:16,11:18,14:l,15:u,17:h,20:f,22:d,23:p,24:g,25:y,26:m,27:b,30:29,31:_,33:v,35:x,36:6,41:k,42:w,43:T,44:E,47:C,50:a},{38:39,39:[1,40],53:S},e([39,53],[2,44]),e(A,[2,6]),{6:28,10:42,11:18,14:l,15:u,17:h,20:f,22:d,23:p,24:g,25:y,26:m,27:b,30:29,31:_,33:v,35:x,36:6,41:k,42:w,43:T,44:E,47:C,50:a},e(A,[2,8]),e(A,[2,9]),e(A,[2,10],{12:[1,43],13:[1,44]}),e(A,[2,14]),{16:[1,45]},e(A,[2,16],{18:[1,46]}),{21:[1,47]},e(A,[2,20]),e(A,[2,21]),e(A,[2,22]),e(A,[2,23]),{28:48,29:[1,49],48:[1,50],49:[1,51]},e(A,[2,26]),e(A,[2,27]),{32:[1,52]},{34:[1,53]},e(A,[2,30]),e(M,[2,39]),e(M,[2,40]),e(A,[2,33]),e(A,[2,34]),e(A,[2,35]),e(A,[2,36]),e(N,[2,31]),{40:54,52:[1,55]},e(N,[2,46]),e(A,[2,7]),e(A,[2,11]),{11:56,22:d,47:C},e(A,[2,15]),e(D,o,{8:57}),{22:[1,58]},{22:[1,59]},{21:[1,60]},{22:[2,41]},{22:[2,42]},e(A,[2,28]),e(A,[2,29]),{38:61,53:S},{53:[2,45]},e(A,[2,12],{12:[1,62]}),{4:s,5:c,6:28,9:14,10:16,11:18,14:l,15:u,17:h,19:[1,63],20:f,22:d,23:p,24:g,25:y,26:m,27:b,30:29,31:_,33:v,35:x,36:6,41:k,42:w,43:T,44:E,47:C,50:a},e(A,[2,18],{18:[1,64]}),{29:[1,65]},{22:[1,66]},e(N,[2,32]),e(A,[2,13]),e(A,[2,17]),e(D,o,{8:67}),e(A,[2,24]),e(A,[2,25]),{4:s,5:c,6:28,9:14,10:16,11:18,14:l,15:u,17:h,19:[1,68],20:f,22:d,23:p,24:g,25:y,26:m,27:b,30:29,31:_,33:v,35:x,36:6,41:k,42:w,43:T,44:E,47:C,50:a},e(A,[2,19])],defaultActions:{7:[2,43],8:[2,1],9:[2,2],10:[2,3],50:[2,41],51:[2,42],55:[2,45]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,f=a.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;a.push(y);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||d.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,v,x,k,w,T,E,C,S={};;){if(v=n[n.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null==_&&(_=b()),x=o[v]&&o[v][_]),void 0===x||!x.length||!x[0]){var A="";for(w in C=[],o[v])this.terminals_[w]&&w>u&&C.push("'"+this.terminals_[w]+"'");A=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:y,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+_);switch(x[0]){case 1:n.push(_),i.push(d.yytext),a.push(d.yylloc),n.push(x[1]),_=null,l=d.yyleng,s=d.yytext,c=d.yylineno,y=d.yylloc;break;case 2:if(T=this.productions_[x[1]][1],S.$=i[i.length-T],S._$={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},m&&(S._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[s,l,c,p.yy,x[1],i,a].concat(f))))return k;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[x[1]][0]),i.push(S.$),a.push(S._$),E=o[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0}},O=(t={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,n=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 r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[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 n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;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,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,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[r]))&&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(){return this.next()||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,n,r){switch(n){case 0:case 33:return 41;case 1:case 34:return 42;case 2:case 35:return 43;case 3:case 36:return 44;case 4:return this.begin("open_directive"),50;case 5:return this.begin("type_directive"),51;case 6:return this.popState(),this.begin("arg_directive"),39;case 7:return this.popState(),this.popState(),53;case 8:return 52;case 9:case 10:case 12:case 13:case 14:case 15:case 46:case 52:break;case 11:case 66:return 5;case 16:return this.pushState("SCALE"),15;case 17:return 16;case 18:case 24:case 40:case 43:this.popState();break;case 19:return this.begin("acc_title"),31;case 20:return this.popState(),"acc_title_value";case 21:return this.begin("acc_descr"),33;case 22:return this.popState(),"acc_descr_value";case 23:this.begin("acc_descr_multiline");break;case 25:return"acc_descr_multiline_value";case 26:this.pushState("STATE");break;case 27:case 30:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 28:case 31:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 29:case 32:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),25;case 37:this.begin("STATE_STRING");break;case 38:return this.popState(),this.pushState("STATE_ID"),"AS";case 39:case 54:return this.popState(),"ID";case 41:return"STATE_DESCR";case 42:return 17;case 44:return this.popState(),this.pushState("struct"),18;case 45:return this.popState(),19;case 47:return this.begin("NOTE"),27;case 48:return this.popState(),this.pushState("NOTE_ID"),48;case 49:return this.popState(),this.pushState("NOTE_ID"),49;case 50:this.popState(),this.pushState("FLOATING_NOTE");break;case 51:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 53:return"NOTE_TEXT";case 55:return this.popState(),this.pushState("NOTE_TEXT"),22;case 56:return this.popState(),e.yytext=e.yytext.substr(2).trim(),29;case 57:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),29;case 58:case 59:return 7;case 60:return 14;case 61:return 47;case 62:return 22;case 63:return e.yytext=e.yytext.trim(),12;case 64:return 13;case 65:return 26;case 67:return"INVALID"}},rules:[/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/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,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/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\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:[13,14],inclusive:!1},close_directive:{rules:[13,14],inclusive:!1},arg_directive:{rules:[7,8,13,14],inclusive:!1},type_directive:{rules:[6,7,13,14],inclusive:!1},open_directive:{rules:[5,13,14],inclusive:!1},struct:{rules:[13,14,26,33,34,35,36,45,46,47,61,62,63,64,65],inclusive:!1},FLOATING_NOTE_ID:{rules:[54],inclusive:!1},FLOATING_NOTE:{rules:[51,52,53],inclusive:!1},NOTE_TEXT:{rules:[56,57],inclusive:!1},NOTE_ID:{rules:[55],inclusive:!1},NOTE:{rules:[48,49,50],inclusive:!1},acc_descr_multiline:{rules:[24,25],inclusive:!1},acc_descr:{rules:[22],inclusive:!1},acc_title:{rules:[20],inclusive:!1},SCALE:{rules:[17,18],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[39],inclusive:!1},STATE_STRING:{rules:[40,41],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[13,14,27,28,29,30,31,32,37,38,42,43,44],inclusive:!1},ID:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,12,14,15,16,19,21,23,26,44,47,58,59,60,61,62,63,64,66,67],inclusive:!0}}},t);function B(){this.yy={}}return L.lexer=O,B.prototype=L,L.Parser=B,new B}();Dx.parser=Dx;const Lx=(t,e)=>{var n;return"dagre-wrapper"!==(null==(n=null==e?void 0:e.state)?void 0:n.defaultRenderer)&&null!==t.match(/^\s*stateDiagram/)},Ox=(t,e)=>{var n;return null!==t.match(/^\s*stateDiagram-v2/)||!(!t.match(/^\s*stateDiagram/)||"dagre-wrapper"!==(null==(n=null==e?void 0:e.state)?void 0:n.defaultRenderer))},Bx=t=>JSON.parse(JSON.stringify(t));let Ix=[];const Fx=(t,e,n)=>{if("relation"===e.stmt)Fx(t,e.state1,!0),Fx(t,e.state2,!1);else if("state"===e.stmt&&"[*]"===e.id&&(e.id=n?t.id+"_start":t.id+"_end",e.start=n),e.doc){const t=[];let n=0,r=[];for(n=0;n<e.doc.length;n++)if("divider"===e.doc[n].type){const i=Bx(e.doc[n]);i.doc=Bx(r),t.push(i),r=[]}else r.push(e.doc[n]);if(t.length>0&&r.length>0){const n={stmt:"state",id:sh(),type:"divider",doc:Bx(r)};t.push(Bx(n)),e.doc=t}e.doc.forEach((t=>Fx(e,t,!0)))}};let Rx={root:{relations:[],states:{},documents:{}}},Px=Rx.root,$x=0;const jx=function(t,e,n,r,i){void 0===Px.states[t]?Px.states[t]={id:t,descriptions:[],type:e,doc:n,note:i}:(Px.states[t].doc||(Px.states[t].doc=n),Px.states[t].type||(Px.states[t].type=e)),r&&(Xc.info("Adding state ",t,r),"string"==typeof r&&Ux(t,r.trim()),"object"==typeof r&&r.forEach((e=>Ux(t,e.trim())))),i&&(Px.states[t].note=i,Px.states[t].note.text=ol.sanitizeText(Px.states[t].note.text,Mh()))},Yx=function(t){Rx={root:{relations:[],states:{},documents:{}}},Px=Rx.root,Px=Rx.root,$x=0,Wx=[],t||pf()},zx=function(t,e,n){let r=t,i=e,a="default",o="default";"[*]"===t&&($x++,r="start"+$x,a="start"),"[*]"===e&&(i="end"+$x,o="end"),jx(r,a),jx(i,o),Px.relations.push({id1:r,id2:i,title:ol.sanitizeText(n,Mh())})},Ux=function(t,e){const n=Px.states[t];let r=e;":"===r[0]&&(r=r.substr(1).trim()),n.descriptions.push(ol.sanitizeText(r,Mh()))};let qx=0,Wx=[],Hx="TB";const Vx={parseDirective:function(t,e,n){jk.parseDirective(this,t,e,n)},getConfig:()=>Mh().state,addState:jx,clear:Yx,getState:function(t){return Px.states[t]},getStates:function(){return Px.states},getRelations:function(){return Px.relations},getClasses:()=>Wx,getDirection:()=>Hx,addRelation:zx,getDividerId:()=>(qx++,"divider-id-"+qx),setDirection:t=>{Hx=t},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:function(){Xc.info("Documents = ",Rx)},getRootDoc:()=>Ix,setRootDoc:t=>{Xc.info("Setting root doc",t),Ix=t},getRootDocV2:()=>(Fx({id:"root"},{id:"root",doc:Ix},!0),{id:"root",doc:Ix}),extract:t=>{let e;e=t.doc?t.doc:t,Xc.info(e),Yx(!0),Xc.info("Extract",e),e.forEach((t=>{"state"===t.stmt&&jx(t.id,t.type,t.doc,t.description,t.note),"relation"===t.stmt&&zx(t.state1.id,t.state2.id,t.description)}))},trimColon:t=>t&&":"===t[0]?t.substr(1).trim():t.trim(),getAccTitle:yf,setAccTitle:gf,getAccDescription:bf,setAccDescription:mf},Gx=(t,e,n)=>{const r=Mh().state.padding,i=2*Mh().state.padding,a=t.node().getBBox(),o=a.width,s=a.x,c=t.append("text").attr("x",0).attr("y",Mh().state.titleShift).attr("font-size",Mh().state.fontSize).attr("class","state-title").text(e.id),l=c.node().getBBox().width+i;let u,h=Math.max(l,o);h===o&&(h+=i);const f=t.node().getBBox();e.doc,u=s-r,l>o&&(u=(o-h)/2+r),Math.abs(s-f.x)<r&&l>o&&(u=s-(l-o)/2);const d=1-Mh().state.textHeight;return t.insert("rect",":first-child").attr("x",u).attr("y",d).attr("class",n?"alt-composit":"composit").attr("width",h).attr("height",f.height+Mh().state.textHeight+Mh().state.titleShift+1).attr("rx","0"),c.attr("x",u+r),l<=o&&c.attr("x",s+(h-i)/2-l/2+r),t.insert("rect",":first-child").attr("x",u).attr("y",Mh().state.titleShift-Mh().state.textHeight-Mh().state.padding).attr("width",h).attr("height",3*Mh().state.textHeight).attr("rx",Mh().state.radius),t.insert("rect",":first-child").attr("x",u).attr("y",Mh().state.titleShift-Mh().state.textHeight-Mh().state.padding).attr("width",h).attr("height",f.height+3+2*Mh().state.textHeight).attr("rx",Mh().state.radius),t},Xx=function(t,e){const n=e.id,r={id:n,label:e.id,width:0,height:0},i=t.append("g").attr("id",n).attr("class","stateGroup");"start"===e.type&&(t=>{t.append("circle").attr("class","start-state").attr("r",Mh().state.sizeUnit).attr("cx",Mh().state.padding+Mh().state.sizeUnit).attr("cy",Mh().state.padding+Mh().state.sizeUnit)})(i),"end"===e.type&&(t=>{t.append("circle").attr("class","end-state-outer").attr("r",Mh().state.sizeUnit+Mh().state.miniPadding).attr("cx",Mh().state.padding+Mh().state.sizeUnit+Mh().state.miniPadding).attr("cy",Mh().state.padding+Mh().state.sizeUnit+Mh().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",Mh().state.sizeUnit).attr("cx",Mh().state.padding+Mh().state.sizeUnit+2).attr("cy",Mh().state.padding+Mh().state.sizeUnit+2)})(i),"fork"!==e.type&&"join"!==e.type||((t,e)=>{let n=Mh().state.forkWidth,r=Mh().state.forkHeight;if(e.parentId){let t=n;n=r,r=t}t.append("rect").style("stroke","black").style("fill","black").attr("width",n).attr("height",r).attr("x",Mh().state.padding).attr("y",Mh().state.padding)})(i,e),"note"===e.type&&((t,e)=>{e.attr("class","state-note");const n=e.append("rect").attr("x",0).attr("y",Mh().state.padding),r=e.append("g"),{textWidth:i,textHeight:a}=((t,e,n,r)=>{let i=0;const a=r.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let o=t.replace(/\r\n/g,"<br/>");o=o.replace(/\n/g,"<br/>");const s=o.split(ol.lineBreakRegex);let c=1.25*Mh().state.noteMargin;for(const t of s){const e=t.trim();if(e.length>0){const t=a.append("tspan");t.text(e),0===c&&(c+=t.node().getBBox().height),i+=c,t.attr("x",0+Mh().state.noteMargin),t.attr("y",0+i+1.25*Mh().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:i}})(t,0,0,r);n.attr("height",a+2*Mh().state.noteMargin),n.attr("width",i+2*Mh().state.noteMargin)})(e.note.text,i),"divider"===e.type&&(t=>{t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",Mh().state.textHeight).attr("class","divider").attr("x2",2*Mh().state.textHeight).attr("y1",0).attr("y2",0)})(i),"default"===e.type&&0===e.descriptions.length&&((t,e)=>{const n=t.append("text").attr("x",2*Mh().state.padding).attr("y",Mh().state.textHeight+2*Mh().state.padding).attr("font-size",Mh().state.fontSize).attr("class","state-title").text(e.id).node().getBBox();t.insert("rect",":first-child").attr("x",Mh().state.padding).attr("y",Mh().state.padding).attr("width",n.width+2*Mh().state.padding).attr("height",n.height+2*Mh().state.padding).attr("rx",Mh().state.radius)})(i,e),"default"===e.type&&e.descriptions.length>0&&((t,e)=>{const n=t.append("text").attr("x",2*Mh().state.padding).attr("y",Mh().state.textHeight+1.3*Mh().state.padding).attr("font-size",Mh().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),r=n.height,i=t.append("text").attr("x",Mh().state.padding).attr("y",r+.4*Mh().state.padding+Mh().state.dividerMargin+Mh().state.textHeight).attr("class","state-description");let a=!0,o=!0;e.descriptions.forEach((function(t){a||(function(t,e,n){const r=t.append("tspan").attr("x",2*Mh().state.padding).text(e);n||r.attr("dy",Mh().state.textHeight)}(i,t,o),o=!1),a=!1}));const s=t.append("line").attr("x1",Mh().state.padding).attr("y1",Mh().state.padding+r+Mh().state.dividerMargin/2).attr("y2",Mh().state.padding+r+Mh().state.dividerMargin/2).attr("class","descr-divider"),c=i.node().getBBox(),l=Math.max(c.width,n.width);s.attr("x2",l+3*Mh().state.padding),t.insert("rect",":first-child").attr("x",Mh().state.padding).attr("y",Mh().state.padding).attr("width",l+2*Mh().state.padding).attr("height",c.height+r+2*Mh().state.padding).attr("rx",Mh().state.radius)})(i,e);const a=i.node().getBBox();return r.width=a.width+2*Mh().state.padding,r.height=a.height+2*Mh().state.padding,r};let Zx,Qx=0;const Kx={},Jx=(t,e,n,r,i,a,o)=>{const s=new $c.Graph({compound:!0,multigraph:!0});let c,l=!0;for(c=0;c<t.length;c++)if("relation"===t[c].stmt){l=!1;break}n?s.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:l?1:Zx.edgeLengthFactor,nodeSep:l?1:50,isMultiGraph:!0}):s.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:l?1:Zx.edgeLengthFactor,nodeSep:l?1:50,ranker:"tight-tree",isMultiGraph:!0}),s.setDefaultEdgeLabel((function(){return{}})),o.db.extract(t);const u=o.db.getStates(),h=o.db.getRelations(),f=Object.keys(u);for(let t=0;t<f.length;t++){const c=u[f[t]];let l;if(n&&(c.parentId=n),c.doc){let t=e.append("g").attr("id",c.id).attr("class","stateGroup");l=Jx(c.doc,t,c.id,!r,i,a,o);{t=Gx(t,c,r);let e=t.node().getBBox();l.width=e.width,l.height=e.height+Zx.padding/2,Kx[c.id]={y:Zx.compositTitleSize}}}else l=Xx(e,c);if(c.note){const t={descriptions:[],id:c.id+"-note",note:c.note,type:"note"},n=Xx(e,t);"left of"===c.note.position?(s.setNode(l.id+"-note",n),s.setNode(l.id,l)):(s.setNode(l.id,l),s.setNode(l.id+"-note",n)),s.setParent(l.id,l.id+"-group"),s.setParent(l.id+"-note",l.id+"-group")}else s.setNode(l.id,l)}Xc.debug("Count=",s.nodeCount(),s);let d=0;h.forEach((function(t){var e;d++,Xc.debug("Setting edge",t),s.setEdge(t.id1,t.id2,{relation:t,width:(e=t.title,e?e.length*Zx.fontSizeFactor:1),height:Zx.labelHeight*ol.getRows(t.title).length,labelpos:"c"},"id"+d)})),Pc.layout(s),Xc.debug("Graph after layout",s.nodes());const p=e.node();s.nodes().forEach((function(t){void 0!==t&&void 0!==s.node(t)?(Xc.warn("Node "+t+": "+JSON.stringify(s.node(t))),i.select("#"+p.id+" #"+t).attr("transform","translate("+(s.node(t).x-s.node(t).width/2)+","+(s.node(t).y+(Kx[t]?Kx[t].y:0)-s.node(t).height/2)+" )"),i.select("#"+p.id+" #"+t).attr("data-x-shift",s.node(t).x-s.node(t).width/2),a.querySelectorAll("#"+p.id+" #"+t+" .divider").forEach((t=>{const e=t.parentElement;let n=0,r=0;e&&(e.parentElement&&(n=e.parentElement.getBBox().width),r=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(r)&&(r=0)),t.setAttribute("x1",0-r+8),t.setAttribute("x2",n-r-8)}))):Xc.debug("No Node "+t+": "+JSON.stringify(s.node(t)))}));let g=p.getBBox();s.edges().forEach((function(t){void 0!==t&&void 0!==s.edge(t)&&(Xc.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(s.edge(t))),function(t,e,n){e.points=e.points.filter((t=>!Number.isNaN(t.y)));const r=e.points,i=cs().x((function(t){return t.x})).y((function(t){return t.y})).curve(ps),a=t.append("path").attr("d",i(r)).attr("id","edge"+Qx).attr("class","transition");let o="";if(Mh().state.arrowMarkerAbsolute&&(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,o=o.replace(/\(/g,"\\("),o=o.replace(/\)/g,"\\)")),a.attr("marker-end","url("+o+"#"+function(t){switch(t){case Vx.relationType.AGGREGATION:return"aggregation";case Vx.relationType.EXTENSION:return"extension";case Vx.relationType.COMPOSITION:return"composition";case Vx.relationType.DEPENDENCY:return"dependency"}}(Vx.relationType.DEPENDENCY)+"End)"),void 0!==n.title){const r=t.append("g").attr("class","stateLabel"),{x:i,y:a}=_h.calcLabelPosition(e.points),o=ol.getRows(n.title);let s=0;const c=[];let l=0,u=0;for(let t=0;t<=o.length;t++){const e=r.append("text").attr("text-anchor","middle").text(o[t]).attr("x",i).attr("y",a+s),n=e.node().getBBox();if(l=Math.max(l,n.width),u=Math.min(u,n.x),Xc.info(n.x,i,a+s),0===s){const t=e.node().getBBox();s=t.height,Xc.info("Title height",s,a)}c.push(e)}let h=s*o.length;if(o.length>1){const t=(o.length-1)*s*.5;c.forEach(((e,n)=>e.attr("y",a+n*s-t))),h=s*o.length}const f=r.node().getBBox();r.insert("rect",":first-child").attr("class","box").attr("x",i-l/2-Mh().state.padding/2).attr("y",a-h/2-Mh().state.padding/2-3.5).attr("width",l+Mh().state.padding).attr("height",h+Mh().state.padding),Xc.info(f)}Qx++}(e,s.edge(t),s.edge(t).relation))})),g=p.getBBox();const y={id:n||"root",label:n||"root",width:0,height:0};return y.width=g.width+2*Zx.padding,y.height=g.height+2*Zx.padding,Xc.debug("Doc rendered",y,s),y},tk={setConf:function(){},draw:function(t,e,n,r){Zx=Mh().state;const i=Mh().securityLevel;let a;"sandbox"===i&&(a=Co("#i"+e));const o=Co("sandbox"===i?a.nodes()[0].contentDocument.body:"body"),s="sandbox"===i?a.nodes()[0].contentDocument:document;Xc.debug("Rendering diagram "+t);const c=o.select(`[id='${e}']`);c.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.Graph({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel((function(){return{}}));const l=r.db.getRootDoc();Jx(l,c,void 0,!1,o,s,r);const u=Zx.padding,h=c.node().getBBox(),f=h.width+2*u,d=h.height+2*u;Fh(c,0,1.75*f,Zx.useMaxWidth),c.attr("viewBox",`${h.x-Zx.padding} ${h.y-Zx.padding} `+f+" "+d),Pf(r.db,c,e)}},ek={};let nk={};const rk=(t,e,n,r)=>{if("root"!==n.id){let e="rect";!0===n.start&&(e="start"),!1===n.start&&(e="end"),"default"!==n.type&&(e=n.type),nk[n.id]||(nk[n.id]={id:n.id,shape:e,description:ol.sanitizeText(n.id,Mh()),classes:"statediagram-state"}),n.description&&(Array.isArray(nk[n.id].description)?(nk[n.id].shape="rectWithTitle",nk[n.id].description.push(n.description)):nk[n.id].description.length>0?(nk[n.id].shape="rectWithTitle",nk[n.id].description===n.id?nk[n.id].description=[n.description]:nk[n.id].description=[nk[n.id].description,n.description]):(nk[n.id].shape="rect",nk[n.id].description=n.description),nk[n.id].description=ol.sanitizeTextOrArray(nk[n.id].description,Mh())),1===nk[n.id].description.length&&"rectWithTitle"===nk[n.id].shape&&(nk[n.id].shape="rect"),!nk[n.id].type&&n.doc&&(Xc.info("Setting cluster for ",n.id,ok(n)),nk[n.id].type="group",nk[n.id].dir=ok(n),nk[n.id].shape="divider"===n.type?"divider":"roundedWithTitle",nk[n.id].classes=nk[n.id].classes+" "+(r?"statediagram-cluster statediagram-cluster-alt":"statediagram-cluster"));const i={labelStyle:"",shape:nk[n.id].shape,labelText:nk[n.id].description,classes:nk[n.id].classes,style:"",id:n.id,dir:nk[n.id].dir,domId:"state-"+n.id+"-"+ik,type:nk[n.id].type,padding:15};if(n.note){const e={labelStyle:"",shape:"note",labelText:n.note.text,classes:"statediagram-note",style:"",id:n.id+"----note-"+ik,domId:"state-"+n.id+"----note-"+ik,type:nk[n.id].type,padding:15},r={labelStyle:"",shape:"noteGroup",labelText:n.note.text,classes:nk[n.id].classes,style:"",id:n.id+"----parent",domId:"state-"+n.id+"----parent-"+ik,type:"group",padding:0};ik++,t.setNode(n.id+"----parent",r),t.setNode(e.id,e),t.setNode(n.id,i),t.setParent(n.id,n.id+"----parent"),t.setParent(e.id,n.id+"----parent");let a=n.id,o=e.id;"left of"===n.note.position&&(a=e.id,o=n.id),t.setEdge(a,o,{arrowhead:"none",arrowType:"",style:"fill:none",labelStyle:"",classes:"transition note-edge",arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal"})}else t.setNode(n.id,i)}e&&"root"!==e.id&&(Xc.trace("Setting node ",n.id," to be child of its parent ",e.id),t.setParent(n.id,e.id)),n.doc&&(Xc.trace("Adding nodes children "),ak(t,n,n.doc,!r))};let ik=0;const ak=(t,e,n,r)=>{Xc.trace("items",n),n.forEach((n=>{if("state"===n.stmt||"default"===n.stmt)rk(t,e,n,r);else if("relation"===n.stmt){rk(t,e,n.state1,r),rk(t,e,n.state2,r);const i={id:"edge"+ik,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:"fill:none",labelStyle:"",label:ol.sanitizeText(n.description,Mh()),arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal",classes:"transition"};let a=n.state1.id,o=n.state2.id;t.setEdge(a,o,i,ik),ik++}}))},ok=(t,e)=>{let n=e||"TB";if(t.doc)for(let e=0;e<t.doc.length;e++){const r=t.doc[e];"dir"===r.stmt&&(n=r.value)}return n},sk={setConf:function(t){const e=Object.keys(t);for(let n=0;n<e.length;n++)ek[e[n]]=t[e[n]]},getClasses:function(t,e){return Xc.trace("Extracting classes"),e.sb.clear(),e.parser.parse(t),e.sb.getClasses()},draw:function(t,e,n,r){Xc.info("Drawing state diagram (v2)",e),nk={},r.db.getDirection();const{securityLevel:i,state:a}=Mh(),o=a.nodeSpacing||50,s=a.rankSpacing||50;Xc.info(r.db.getRootDocV2()),r.db.extract(r.db.getRootDocV2()),Xc.info(r.db.getRootDocV2());const c=new $c.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:ok(r.db.getRootDocV2()),nodesep:o,ranksep:s,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));let l;rk(c,void 0,r.db.getRootDocV2(),!0),"sandbox"===i&&(l=Co("#i"+e));const u=Co("sandbox"===i?l.nodes()[0].contentDocument.body:"body"),h=u.select(`[id="${e}"]`),f=u.select("#"+e+" g");Pp(f,c,["barb"],"statediagram",e);const d=h.node().getBBox(),p=d.width+16,g=d.height+16;h.attr("class","statediagram");const y=h.node().getBBox();Fh(h,0,p,a.useMaxWidth);const m=`${y.x-8} ${y.y-8} ${p} ${g}`;Xc.debug(`viewBox ${m}`),h.attr("viewBox",m);const b=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(let t=0;t<b.length;t++){const e=b[t],n=e.getBBox(),r=document.createElementNS("http://www.w3.org/2000/svg","rect");r.setAttribute("rx",0),r.setAttribute("ry",0),r.setAttribute("width",n.width),r.setAttribute("height",n.height),e.insertBefore(r,e.firstChild)}Pf(r.db,h,e)}};var ck=function(){var t,e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,2],r=[1,5],i=[6,9,11,17,18,20,22,23,24,26],a=[1,15],o=[1,16],s=[1,17],c=[1,18],l=[1,19],u=[1,20],h=[1,24],f=[4,6,9,11,17,18,20,22,23,24,26],d={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,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive",28:"arg_directive",29:"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,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:case 7:case 8:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 11:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 16:r.addTask(a[s-1],a[s]),this.$="task";break;case 18:r.parseDirective("%%{","open_directive");break;case 19:r.parseDirective(a[s],"type_directive");break;case 20:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 21:r.parseDirective("}%%","close_directive","journey")}},table:[{3:1,4:n,7:3,12:4,26:r},{1:[3]},e(i,[2,3],{5:6}),{3:7,4:n,7:3,12:4,26:r},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:a,18:o,20:s,22:c,23:l,24:u,26:r},{1:[2,2]},{14:22,15:[1,23],29:h},e([15,29],[2,19]),e(i,[2,8],{1:[2,1]}),e(i,[2,4]),{7:21,10:25,12:4,17:a,18:o,20:s,22:c,23:l,24:u,26:r},e(i,[2,6]),e(i,[2,7]),e(i,[2,11]),{19:[1,26]},{21:[1,27]},e(i,[2,14]),e(i,[2,15]),{25:[1,28]},e(i,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},e(i,[2,5]),e(i,[2,12]),e(i,[2,13]),e(i,[2,16]),e(f,[2,9]),{14:32,29:h},{29:[2,20]},{11:[1,33]},e(f,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,f=a.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;a.push(y);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||d.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,v,x,k,w,T,E,C,S={};;){if(v=n[n.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null==_&&(_=b()),x=o[v]&&o[v][_]),void 0===x||!x.length||!x[0]){var A="";for(w in C=[],o[v])this.terminals_[w]&&w>u&&C.push("'"+this.terminals_[w]+"'");A=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:y,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+_);switch(x[0]){case 1:n.push(_),i.push(d.yytext),a.push(d.yylloc),n.push(x[1]),_=null,l=d.yyleng,s=d.yytext,c=d.yylineno,y=d.yylloc;break;case 2:if(T=this.productions_[x[1]][1],S.$=i[i.length-T],S._$={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},m&&(S._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[s,l,c,p.yy,x[1],i,a].concat(f))))return k;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[x[1]][0]),i.push(S.$),a.push(S._$),E=o[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0}},p=(t={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,n=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 r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[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 n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;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,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,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[r]))&&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(){return this.next()||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,n,r){switch(n){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:case 6:case 8:case 9:break;case 7:return 11;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24: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,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/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},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}},t);function g(){this.yy={}}return d.lexer=p,g.prototype=d,d.Parser=g,new g}();ck.parser=ck;const lk=t=>null!==t.match(/^\s*journey/);let uk="";const hk=[],fk=[],dk=[],pk=function(){let t=!0;for(let e=0;e<dk.length;e++)dk[e].processed,t=t&&dk[e].processed;return t},gk={parseDirective:function(t,e,n){jk.parseDirective(this,t,e,n)},getConfig:()=>Mh().journey,clear:function(){hk.length=0,fk.length=0,uk="",dk.length=0,pf()},setDiagramTitle:_f,getDiagramTitle:vf,setAccTitle:gf,getAccTitle:yf,setAccDescription:mf,getAccDescription:bf,addSection:function(t){uk=t,hk.push(t)},getSections:function(){return hk},getTasks:function(){let t=pk(),e=0;for(;!t&&e<100;)t=pk(),e++;return fk.push(...dk),fk},addTask:function(t,e){const n=e.substr(1).split(":");let r=0,i=[];1===n.length?(r=Number(n[0]),i=[]):(r=Number(n[0]),i=n[1].split(","));const a=i.map((t=>t.trim())),o={section:uk,type:uk,people:a,task:t,score:r};dk.push(o)},addTaskOrg:function(t){const e={section:uk,type:uk,description:t,task:t,classes:[]};fk.push(e)},getActors:function(){return function(){const t=[];return fk.forEach((e=>{e.people&&t.push(...e.people)})),[...new Set(t)].sort()}()}},yk=function(t,e){const n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},mk=function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n};let bk=-1;const _k=function(){function t(t,e,n,i,a,o,s,c){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("font-color",c).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,c,l){const{taskFontSize:u,taskFontFamily:h}=c,f=t.split(/<br\s*\/?>/gi);for(let t=0;t<f.length;t++){const c=t*u-u*(f.length-1)/2,d=e.append("text").attr("x",n+a/2).attr("y",i).attr("fill",l).style("text-anchor","middle").style("font-size",u).style("font-family",h);d.append("tspan").attr("x",n+a/2).attr("dy",c).text(f[t]),d.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(d,s)}}function n(t,n,i,a,o,s,c,l){const u=n.append("switch"),h=u.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.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),r(h,c)}function r(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),vk=mk,xk=function(t,e,n){const r=t.append("g"),i={x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0};i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,yk(r,i),_k(n)(e.text,r,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},n,e.colour)},kk=function(t,e){const n=e.text.replace(/<br\s*\/?>/gi," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),void 0!==e.class&&r.attr("class",e.class);const i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(n),r},wk=function(t,e,n){const r=e.x+n.width/2,i=t.append("g");bk++,i.append("line").attr("id","task"+bk).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),function(t,e){t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");const n=t.append("g");n.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"),n.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){const n=ns().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}(n):e.score<3?function(t){const n=ns().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",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}(n):n.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,{cx:r,cy:300+30*(5-e.score),score:e.score});const a={x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0};a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=n.width,a.height=n.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,yk(i,a);let o=e.x+14;e.people.forEach((t=>{const n=e.actors[t].color,r={cx:o,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};mk(i,r),o+=10})),_k(n)(e.task,i,a.x,a.y,a.width,a.height,{class:"task"},n,e.colour)},Tk={},Ek=Mh().journey,Ck=Ek.leftMargin,Sk={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,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){const i=Mh().journey,a=this;let o=0;this.sequenceItems.forEach((function(s){o++;const c=a.sequenceItems.length-o+1;a.updateVal(s,"starty",e-c*i.boxMargin,Math.min),a.updateVal(s,"stopy",r+c*i.boxMargin,Math.max),a.updateVal(Sk.data,"startx",t-c*i.boxMargin,Math.min),a.updateVal(Sk.data,"stopx",n+c*i.boxMargin,Math.max),a.updateVal(s,"startx",t-c*i.boxMargin,Math.min),a.updateVal(s,"stopx",n+c*i.boxMargin,Math.max),a.updateVal(Sk.data,"starty",e-c*i.boxMargin,Math.min),a.updateVal(Sk.data,"stopy",r+c*i.boxMargin,Math.max)}))},insert:function(t,e,n,r){const i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(Sk.data,"startx",i,Math.min),this.updateVal(Sk.data,"starty",o,Math.min),this.updateVal(Sk.data,"stopx",a,Math.max),this.updateVal(Sk.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}},Ak=Ek.sectionFills,Mk=Ek.sectionColours,Nk={setConf:function(t){Object.keys(t).forEach((function(e){Ek[e]=t[e]}))},draw:function(t,e,n,r){const i=Mh().journey;r.db.clear(),r.parser.parse(t+"\n");const a=Mh().securityLevel;let o;"sandbox"===a&&(o=Co("#i"+e));const s=Co("sandbox"===a?o.nodes()[0].contentDocument.body:"body");Sk.init();const c=s.select("#"+e);c.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");const l=r.db.getTasks(),u=r.db.getDiagramTitle(),h=r.db.getActors();for(const t in Tk)delete Tk[t];let f=0;h.forEach((t=>{Tk[t]={color:i.actorColours[f%i.actorColours.length],position:f},f++})),function(t){const e=Mh().journey;let n=60;Object.keys(Tk).forEach((r=>{const i=Tk[r].color,a={cx:20,cy:n,r:7,fill:i,stroke:"#000",pos:Tk[r].position};vk(t,a);const o={x:40,y:n+7,fill:"#666",text:r,textMargin:5|e.boxTextMargin};kk(t,o),n+=20}))}(c),Sk.insert(0,0,Ck,50*Object.keys(Tk).length),function(t,e,n){const r=Mh().journey;let i="";const a=n+(2*r.height+r.diagramMarginY);let o=0,s="#CCC",c="black",l=0;for(let n=0;n<e.length;n++){const u=e[n];if(i!==u.section){s=Ak[o%Ak.length],l=o%Ak.length,c=Mk[o%Mk.length];const e={x:n*r.taskMargin+n*r.width+Ck,y:50,text:u.section,fill:s,num:l,colour:c};xk(t,e,r),i=u.section,o++}const h=u.people.reduce(((t,e)=>(Tk[e]&&(t[e]=Tk[e]),t)),{});u.x=n*r.taskMargin+n*r.width+Ck,u.y=a,u.width=r.diagramMarginX,u.height=r.diagramMarginY,u.colour=c,u.fill=s,u.num=l,u.actors=h,wk(t,u,r),Sk.insert(u.x,u.y,u.x+u.width+r.taskMargin,450)}}(c,l,0);const d=Sk.getBounds();u&&c.append("text").text(u).attr("x",Ck).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const p=d.stopy-d.starty+2*i.diagramMarginY,g=Ck+d.stopx+2*i.diagramMarginX;Fh(c,0,g,i.useMaxWidth),c.append("line").attr("x1",Ck).attr("y1",4*i.height).attr("x2",g-Ck-4).attr("y2",4*i.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const y=u?70:0;c.attr("viewBox",`${d.startx} -25 ${g} ${p+y}`),c.attr("preserveAspectRatio","xMinYMin meet"),c.attr("height",p+y+25),Pf(r.db,c,e)}};let Dk={};const Lk={setConf:function(t){Dk={...Dk,...t}},draw:(t,e,n)=>{try{Xc.debug("Renering svg for syntax error\n");const t=Co("#"+e),r=t.append("g");r.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"),r.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"),r.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"),r.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"),r.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"),r.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"),r.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),r.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+n),t.attr("height",100),t.attr("width",500),t.attr("viewBox","768 0 912 512")}catch(t){Xc.error("Error while rendering info diagram"),Xc.error((r=t)instanceof Error?r.message:String(r))}var r}};let Ok=!1;const Bk=()=>{Ok||(Ok=!0,af("error",{db:{clear:()=>{}},styles:jh,renderer:Lk,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},(t=>"error"===t.toLowerCase().trim())),af("c4",{parser:Gf,db:ld,renderer:Md,styles:Xh,init:t=>{Md.setConf(t.c4)}},Xf),af("class",{parser:Nd,db:Hd,renderer:rp,styles:Ph,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Hd.clear()}},Dd),af("classDiagram",{parser:Nd,db:Hd,renderer:jp,styles:Ph,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Hd.clear()}},Ld),af("er",{parser:Yp,db:Hp,renderer:eg,styles:$h},zp),af("gantt",{parser:s_,db:$_,renderer:z_,styles:zh},c_),af("info",{parser:U_,db:H_,renderer:V_,styles:Uh},G_),af("pie",{parser:X_,db:J_,renderer:nv,styles:qh},Z_),af("requirement",{parser:rv,db:uv,renderer:_v,styles:Wh},iv),af("sequence",{parser:vv,db:$v,renderer:Nx,styles:Hh,init:t=>{if(t.sequence||(t.sequence={}),t.sequence.arrowMarkerAbsolute=t.arrowMarkerAbsolute,"sequenceDiagram"in t)throw new Error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.");$v.setWrap(t.wrap),Nx.setConf(t.sequence)}},xv),af("state",{parser:Dx,db:Vx,renderer:tk,styles:Vh,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Vx.clear()}},Lx),af("stateDiagram",{parser:Dx,db:Vx,renderer:sk,styles:Vh,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Vx.clear()}},Ox),af("journey",{parser:ck,db:gk,renderer:Nk,styles:Gh,init:t=>{Nk.setConf(t.journey),gk.clear()}},lk),af("flowchart",{parser:ng,db:Mg,renderer:o_,styles:Yh,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,function(t){const e=Object.keys(t);for(let n=0;n<e.length;n++)e_[e[n]]=t[e[n]]}(t.flowchart),Mg.clear(),Mg.setGen("gen-1")}},rg),af("flowchart-v2",{parser:ng,db:Mg,renderer:o_,styles:Yh,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Ah({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),o_.setConf(t.flowchart),Mg.clear(),Mg.setGen("gen-2")}},ig),af("gitGraph",{parser:cf,db:Rf,renderer:Hf,styles:Vf},lf))};class Ik{constructor(t,e){var n,r;Vc(this,"type","graph"),Vc(this,"parser"),Vc(this,"renderer"),Vc(this,"db"),Vc(this,"detectTypeFailed",!1),this.txt=t;const i=Mh();this.txt=t;try{this.type=kl(t,i)}catch(t){this.handleError(t,e),this.type="error",this.detectTypeFailed=!0}const a=of(this.type);Xc.debug("Type "+this.type),this.db=a.db,null==(r=(n=this.db).clear)||r.call(n),this.renderer=a.renderer,this.parser=a.parser,this.parser.parser.yy=this.db,a.init&&(a.init(i),Xc.debug("Initialized diagram "+this.type,i)),this.txt+="\n",this.parse(this.txt,e)}parse(t,e){if(this.detectTypeFailed)return!1;try{return t+="\n",this.db.clear(),this.parser.parse(t),!0}catch(t){this.handleError(t,e)}return!1}handleError(t,e){if(!e)throw t;bh(t)?e(t.str,t.hash):e(t)}getParser(){return this.parser}getType(){return this.type}}const Fk=(t,e)=>{const n=kl(t,Mh());try{return of(n),new Ik(t,e)}catch(r){if(!(r instanceof sf))throw Xc.error(r),r;const i=xl[n].loader;if(!i)throw new Error(`Loader for ${n} not found.`);return i().then((({diagram:r})=>(af(n,r,void 0),new Ik(t,e))))}},Rk=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/#\w+;/g,(function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"})),e},Pk=function(t){let e=t;return e=e.replace(/fl°°/g,(function(){return"&#"})),e=e.replace(/fl°/g,(function(){return"&"})),e=e.replace(/¶ß/g,(function(){return";"})),e};let $k={};const jk=Object.freeze({render:function(t,e,n,r){var i;Bk(),Lh(),e=e.replace(/\r\n?/g,"\n");const a=_h.detectInit(e);a&&(yh(a),Dh(a));const o=Mh();Xc.debug(o),e.length>o.maxTextSize&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let s,c,l=Co("body");if(void 0!==r){if(r&&(r.innerHTML=""),"sandbox"===o.securityLevel){const e=Co(r).append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");l=Co(e.nodes()[0].contentDocument.body),l.node().style.margin=0}else l=Co(r);l.append("div").attr("id","d"+t).attr("style","font-family: "+o.fontFamily).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").attr("xmlns:xlink","http://www.w3.org/1999/xlink").append("g")}else{const e=document.getElementById(t);let n;if(e&&e.remove(),n="sandbox"===o.securityLevel?document.querySelector("#i"+t):document.querySelector("#d"+t),n&&n.remove(),"sandbox"===o.securityLevel){const e=Co("body").append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");l=Co(e.nodes()[0].contentDocument.body),l.node().style.margin=0}else l=Co("body");l.append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}e=Rk(e);try{if(s=Fk(e),"then"in s)throw new Error("Diagram is a promise")}catch(t){s=new Ik("error"),c=t}const u=l.select("#d"+t).node(),h=s.type,f=u.firstChild,d=f.firstChild;let p="";if(void 0!==o.themeCSS&&(p+=`\n${o.themeCSS}`),void 0!==o.fontFamily&&(p+=`\n:root { --mermaid-font-family: ${o.fontFamily}}`),void 0!==o.altFontFamily&&(p+=`\n:root { --mermaid-alt-font-family: ${o.altFontFamily}}`),"flowchart"===h||"flowchart-v2"===h||"graph"===h){const t=n_(e,s),n=o.htmlLabels||(null==(i=o.flowchart)?void 0:i.htmlLabels);for(const e in t)n?(p+=`\n.${e} > * { ${t[e].styles.join(" !important; ")} !important; }`,p+=`\n.${e} span { ${t[e].styles.join(" !important; ")} !important; }`):(p+=`\n.${e} path { ${t[e].styles.join(" !important; ")} !important; }`,p+=`\n.${e} rect { ${t[e].styles.join(" !important; ")} !important; }`,p+=`\n.${e} polygon { ${t[e].styles.join(" !important; ")} !important; }`,p+=`\n.${e} ellipse { ${t[e].styles.join(" !important; ")} !important; }`,p+=`\n.${e} circle { ${t[e].styles.join(" !important; ")} !important; }`,t[e].textStyles&&(p+=`\n.${e} tspan { ${t[e].textStyles.join(" !important; ")} !important; }`))}const g=((t,e)=>fc(Oc(`${t}{${e}}`),dc))(`#${t}`,Qh(h,p,o.themeVariables)),y=document.createElement("style");y.innerHTML=`#${t} `+g,f.insertBefore(y,d);try{s.renderer.draw(e,t,vh,s)}catch(n){throw Lk.draw(e,t,vh),n}l.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let m=l.select("#d"+t).node().innerHTML;if(Xc.debug("cnf.arrowMarkerAbsolute",o.arrowMarkerAbsolute),il(o.arrowMarkerAbsolute)||"sandbox"===o.securityLevel||(m=m.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),m=Pk(m),m=m.replace(/<br>/g,"<br/>"),"sandbox"===o.securityLevel){const e=l.select("#d"+t+" svg").node(),n="100%";let r="100%";e&&(r=e.viewBox.baseVal.height+"px"),m=`<iframe style="width:${n};height:${r};border:0;margin:0;" src="data:text/html;base64,${btoa('<body style="margin:0">'+m+"</body>")}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The “iframe” tag is not supported by your browser.\n</iframe>`}else"loose"!==o.securityLevel&&(m=Ms.sanitize(m,{ADD_TAGS:["foreignobject"],ADD_ATTR:["dominant-baseline"]}));if(void 0!==n)switch(h){case"flowchart":case"flowchart-v2":n(m,Mg.bindFunctions);break;case"gantt":n(m,$_.bindFunctions);break;case"class":case"classDiagram":n(m,Hd.bindFunctions);break;default:n(m)}else Xc.debug("CB = undefined!");Yv();const b=Co("sandbox"===o.securityLevel?"#i"+t:"#d"+t).node();if(b&&"remove"in b&&b.remove(),c)throw c;return m},renderAsync:async function(t,e,n,r){var i;Bk(),Lh(),e=e.replace(/\r\n?/g,"\n");const a=_h.detectInit(e);a&&(yh(a),Dh(a));const o=Mh();Xc.debug(o),e.length>o.maxTextSize&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let s,c,l=Co("body");if(void 0!==r){if(r&&(r.innerHTML=""),"sandbox"===o.securityLevel){const e=Co(r).append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");l=Co(e.nodes()[0].contentDocument.body),l.node().style.margin=0}else l=Co(r);l.append("div").attr("id","d"+t).attr("style","font-family: "+o.fontFamily).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").attr("xmlns:xlink","http://www.w3.org/1999/xlink").append("g")}else{const e=document.getElementById(t);let n;if(e&&e.remove(),n="sandbox"===o.securityLevel?document.querySelector("#i"+t):document.querySelector("#d"+t),n&&n.remove(),"sandbox"===o.securityLevel){const e=Co("body").append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");l=Co(e.nodes()[0].contentDocument.body),l.node().style.margin=0}else l=Co("body");l.append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}e=Rk(e);try{s=await Fk(e)}catch(t){s=new Ik("error"),c=t}const u=l.select("#d"+t).node(),h=s.type,f=u.firstChild,d=f.firstChild;let p="";if(void 0!==o.themeCSS&&(p+=`\n${o.themeCSS}`),void 0!==o.fontFamily&&(p+=`\n:root { --mermaid-font-family: ${o.fontFamily}}`),void 0!==o.altFontFamily&&(p+=`\n:root { --mermaid-alt-font-family: ${o.altFontFamily}}`),"flowchart"===h||"flowchart-v2"===h||"graph"===h){const t=n_(e,s),n=o.htmlLabels||(null==(i=o.flowchart)?void 0:i.htmlLabels);for(const e in t)n?(p+=`\n.${e} > * { ${t[e].styles.join(" !important; ")} !important; }`,p+=`\n.${e} span { ${t[e].styles.join(" !important; ")} !important; }`):(p+=`\n.${e} path { ${t[e].styles.join(" !important; ")} !important; }`,p+=`\n.${e} rect { ${t[e].styles.join(" !important; ")} !important; }`,p+=`\n.${e} polygon { ${t[e].styles.join(" !important; ")} !important; }`,p+=`\n.${e} ellipse { ${t[e].styles.join(" !important; ")} !important; }`,p+=`\n.${e} circle { ${t[e].styles.join(" !important; ")} !important; }`,t[e].textStyles&&(p+=`\n.${e} tspan { ${t[e].textStyles.join(" !important; ")} !important; }`))}const g=((t,e)=>fc(Oc(`${t}{${e}}`),dc))(`#${t}`,Qh(h,p,o.themeVariables)),y=document.createElement("style");y.innerHTML=`#${t} `+g,f.insertBefore(y,d);try{await s.renderer.draw(e,t,vh,s)}catch(n){throw Lk.draw(e,t,vh),n}l.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let m=l.select("#d"+t).node().innerHTML;if(Xc.debug("cnf.arrowMarkerAbsolute",o.arrowMarkerAbsolute),il(o.arrowMarkerAbsolute)||"sandbox"===o.securityLevel||(m=m.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),m=Pk(m),m=m.replace(/<br>/g,"<br/>"),"sandbox"===o.securityLevel){const e=l.select("#d"+t+" svg").node(),n="100%";let r="100%";e&&(r=e.viewBox.baseVal.height+"px"),m=`<iframe style="width:${n};height:${r};border:0;margin:0;" src="data:text/html;base64,${btoa('<body style="margin:0">'+m+"</body>")}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The “iframe” tag is not supported by your browser.\n</iframe>`}else"loose"!==o.securityLevel&&(m=Ms.sanitize(m,{ADD_TAGS:["foreignobject"],ADD_ATTR:["dominant-baseline"]}));if(void 0!==n)switch(h){case"flowchart":case"flowchart-v2":n(m,Mg.bindFunctions);break;case"gantt":n(m,$_.bindFunctions);break;case"class":case"classDiagram":n(m,Hd.bindFunctions);break;default:n(m)}else Xc.debug("CB = undefined!");Yv();const b=Co("sandbox"===o.securityLevel?"#i"+t:"#d"+t).node();if(b&&"remove"in b&&b.remove(),c)throw c;return m},parse:function(t,e){return Bk(),new Ik(t,e).parse(t,e)},parseAsync:async function(t,e){return Bk(),(await Fk(t,e)).parse(t,e)},parseDirective:function(t,e,n,r){try{if(void 0!==e)switch(e=e.trim(),n){case"open_directive":$k={};break;case"type_directive":if(!$k)throw new Error("currentDirective is undefined");$k.type=e.toLowerCase();break;case"arg_directive":if(!$k)throw new Error("currentDirective is undefined");$k.args=JSON.parse(e);break;case"close_directive":(function(t,e,n){switch(Xc.debug(`Directive type=${e.type} with args:`,e.args),e.type){case"init":case"initialize":["config"].forEach((t=>{void 0!==e.args[t]&&("flowchart-v2"===n&&(n="flowchart"),e.args[n]=e.args[t],delete e.args[t])})),Xc.debug("sanitize in handleDirective",e.args),yh(e.args),Xc.debug("sanitize in handleDirective (done)",e.args),Dh(e.args);break;case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap("wrap"===e.type);break;case"themeCss":Xc.warn("themeCss encountered");break;default:Xc.warn(`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(e.args?e.args:{})}}%%`,e)}})(t,$k,r),$k=void 0}}catch(t){Xc.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${n}`),Xc.error(t.message)}},initialize:function(t={}){t.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),kh=Tl({},t),(null==t?void 0:t.theme)&&t.theme in gl?t.themeVariables=gl[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=gl.default.getThemeVariables(t.themeVariables));const e="object"==typeof t?(n=t,wh=Tl({},xh),wh=Tl(wh,n),n.theme&&gl[n.theme]&&(wh.themeVariables=gl[n.theme].getThemeVariables(n.themeVariables)),Ch(wh,Th),wh):Sh();var n;Zc(e.logLevel),Bk()},getConfig:Mh,setConfig:Ah,getSiteConfig:Sh,updateSiteConfig:t=>(wh=Tl(wh,t),Ch(wh,Th),wh),reset:()=>{Lh()},globalReset:()=>{Lh(xh)},defaultConfig:xh});Zc(Mh().logLevel),Lh(Mh());let Yk=!1;const zk=(t,e,n)=>{Xc.warn(t),bh(t)?(n&&n(t.str,t.hash),e.push({...t,message:t.str,error:t})):(n&&n(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},Uk=function(t,e,n){const r=jk.getConfig();let i;if(t&&(Xk.sequenceConfig=t),Xc.debug((n?"":"No ")+"Callback function found"),void 0===e)i=document.querySelectorAll(".mermaid");else if("string"==typeof e)i=document.querySelectorAll(e);else if(e instanceof HTMLElement)i=[e];else{if(!(e instanceof NodeList))throw new Error("Invalid argument nodes for mermaid.init");i=e}Xc.debug(`Found ${i.length} diagrams`),void 0!==(null==t?void 0:t.startOnLoad)&&(Xc.debug("Start On Load: "+(null==t?void 0:t.startOnLoad)),jk.updateSiteConfig({startOnLoad:null==t?void 0:t.startOnLoad}));const a=new _h.initIdGenerator(r.deterministicIds,r.deterministicIDSeed);let o;const s=[];for(const t of Array.from(i)){if(Xc.info("Rendering diagram: "+t.id),t.getAttribute("data-processed"))continue;t.setAttribute("data-processed","true");const e=`mermaid-${a.next()}`;o=t.innerHTML,o=_h.entityDecode(o).trim().replace(/<br\s*\/?>/gi,"<br/>");const r=_h.detectInit(o);r&&Xc.debug("Detected early reinit: ",r);try{jk.render(e,o,((r,i)=>{t.innerHTML=r,void 0!==n&&n(e),i&&i(t)}),t)}catch(t){zk(t,s,Xk.parseError)}}if(s.length>0)throw s[0]},qk=async function(t,e,n){const r=jk.getConfig();let i;if(t&&(Xk.sequenceConfig=t),Xc.debug((n?"":"No ")+"Callback function found"),void 0===e)i=document.querySelectorAll(".mermaid");else if("string"==typeof e)i=document.querySelectorAll(e);else if(e instanceof HTMLElement)i=[e];else{if(!(e instanceof NodeList))throw new Error("Invalid argument nodes for mermaid.init");i=e}Xc.debug(`Found ${i.length} diagrams`),void 0!==(null==t?void 0:t.startOnLoad)&&(Xc.debug("Start On Load: "+(null==t?void 0:t.startOnLoad)),jk.updateSiteConfig({startOnLoad:null==t?void 0:t.startOnLoad}));const a=new _h.initIdGenerator(r.deterministicIds,r.deterministicIDSeed);let o;const s=[];for(const t of Array.from(i)){if(Xc.info("Rendering diagram: "+t.id),t.getAttribute("data-processed"))continue;t.setAttribute("data-processed","true");const e=`mermaid-${a.next()}`;o=t.innerHTML,o=_h.entityDecode(o).trim().replace(/<br\s*\/?>/gi,"<br/>");const r=_h.detectInit(o);r&&Xc.debug("Detected early reinit: ",r);try{await jk.renderAsync(e,o,((r,i)=>{t.innerHTML=r,void 0!==n&&n(e),i&&i(t)}),t)}catch(t){zk(t,s,Xk.parseError)}}if(s.length>0)throw s[0]},Wk=function(){if(Xk.startOnLoad){const{startOnLoad:t}=jk.getConfig();t&&Xk.init()}};"undefined"!=typeof document&&window.addEventListener("load",Wk,!1);const Hk=[];let Vk=!1;const Gk=async()=>{if(!Vk){for(Vk=!0;Hk.length>0;){const t=Hk.shift();if(t)try{await t()}catch(t){Xc.error("Error executing queue",t)}}Vk=!1}},Xk={startOnLoad:!0,diagrams:{},mermaidAPI:jk,parse:t=>jk.parse(t,Xk.parseError),parseAsync:t=>new Promise(((e,n)=>{Hk.push((()=>new Promise(((r,i)=>{jk.parseAsync(t,Xk.parseError).then((t=>{r(t),e(t)}),(t=>{Xc.error("Error parsing",t),i(t),n(t)}))})))),Gk()})),render:jk.render,renderAsync:(t,e,n,r)=>new Promise(((i,a)=>{Hk.push((()=>new Promise(((o,s)=>{jk.renderAsync(t,e,n,r).then((t=>{o(t),i(t)}),(t=>{Xc.error("Error parsing",t),s(t),a(t)}))})))),Gk()})),init:async function(t,e,n){try{Yk?await qk(t,e,n):Uk(t,e,n)}catch(t){Xc.warn("Syntax Error rendering"),bh(t)&&Xc.warn(t.str),Xk.parseError&&Xk.parseError(t)}},initThrowsErrors:Uk,initThrowsErrorsAsync:qk,registerExternalDiagrams:async(t,{lazyLoad:e=!0}={})=>{e?(t=>{for(const{id:e,detector:n,loader:r}of t)wl(e,n,r)})(t):await(async t=>{Xc.debug(`Loading ${t.length} external diagrams`);const e=await Promise.allSettled(t.map((async({id:t,detector:e,loader:n})=>{const{diagram:r}=await n();af(t,r,e)}))),n=e.filter((t=>"rejected"===t.status));if(n.length>0){Xc.error(`Failed to load ${n.length} external diagrams`);for(const t of n)Xc.error(t);throw new Error(`Failed to load ${n.length} external diagrams`)}})(t),Yk=!0},initialize:function(t){jk.initialize(t)},parseError:void 0,contentLoaded:Wk,setParseErrorHandler:function(t){Xk.parseError=t}}}}]);