@mcp-graph-workflow/mcp-graph 5.30.0 → 5.31.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/api/router.d.ts.map +1 -1
  2. package/dist/api/router.js +2 -0
  3. package/dist/api/router.js.map +1 -1
  4. package/dist/api/routes/benchmark.d.ts.map +1 -1
  5. package/dist/api/routes/benchmark.js +15 -2
  6. package/dist/api/routes/benchmark.js.map +1 -1
  7. package/dist/api/routes/dream.d.ts +5 -0
  8. package/dist/api/routes/dream.d.ts.map +1 -0
  9. package/dist/api/routes/dream.js +142 -0
  10. package/dist/api/routes/dream.js.map +1 -0
  11. package/dist/core/dream/dream-engine.d.ts +40 -0
  12. package/dist/core/dream/dream-engine.d.ts.map +1 -0
  13. package/dist/core/dream/dream-engine.js +192 -0
  14. package/dist/core/dream/dream-engine.js.map +1 -0
  15. package/dist/core/dream/dream-store.d.ts +19 -0
  16. package/dist/core/dream/dream-store.d.ts.map +1 -0
  17. package/dist/core/dream/dream-store.js +86 -0
  18. package/dist/core/dream/dream-store.js.map +1 -0
  19. package/dist/core/dream/dream-types.d.ts +128 -0
  20. package/dist/core/dream/dream-types.d.ts.map +1 -0
  21. package/dist/core/dream/dream-types.js +99 -0
  22. package/dist/core/dream/dream-types.js.map +1 -0
  23. package/dist/core/dream/phases/nrem-phase.d.ts +21 -0
  24. package/dist/core/dream/phases/nrem-phase.d.ts.map +1 -0
  25. package/dist/core/dream/phases/nrem-phase.js +98 -0
  26. package/dist/core/dream/phases/nrem-phase.js.map +1 -0
  27. package/dist/core/dream/phases/rem-phase.d.ts +22 -0
  28. package/dist/core/dream/phases/rem-phase.d.ts.map +1 -0
  29. package/dist/core/dream/phases/rem-phase.js +87 -0
  30. package/dist/core/dream/phases/rem-phase.js.map +1 -0
  31. package/dist/core/dream/phases/wake-ready-phase.d.ts +24 -0
  32. package/dist/core/dream/phases/wake-ready-phase.d.ts.map +1 -0
  33. package/dist/core/dream/phases/wake-ready-phase.js +63 -0
  34. package/dist/core/dream/phases/wake-ready-phase.js.map +1 -0
  35. package/dist/core/events/event-types.d.ts +39 -1
  36. package/dist/core/events/event-types.d.ts.map +1 -1
  37. package/dist/core/store/migrations.d.ts.map +1 -1
  38. package/dist/core/store/migrations.js +30 -0
  39. package/dist/core/store/migrations.js.map +1 -1
  40. package/dist/docs-manifest.json +36 -1
  41. package/dist/schemas/entity.schema.d.ts +2 -2
  42. package/dist/web/dashboard/dist/assets/benchmark-tab-GHO9Ji5M.js +1 -0
  43. package/dist/web/dashboard/dist/assets/{circle-alert-B17sfIdw.js → circle-alert-CfDAmNcO.js} +1 -1
  44. package/dist/web/dashboard/dist/assets/context-tab-B_6B65lw.js +1 -0
  45. package/dist/web/dashboard/dist/assets/{docs-tab-sxC7Gxc7.js → docs-tab-Dq7rtZol.js} +1 -1
  46. package/dist/web/dashboard/dist/assets/{gitnexus-tab-DEcNhLvY.js → gitnexus-tab-DAPpyAe_.js} +1 -1
  47. package/dist/web/dashboard/dist/assets/{graph-section-CsHifp70.js → graph-section-O0mwo9kz.js} +1 -1
  48. package/dist/web/dashboard/dist/assets/{graph-tab-D8ZSUyGR.js → graph-tab-CAx8lu7Z.js} +1 -1
  49. package/dist/web/dashboard/dist/assets/{graph-utils-D10A5HwE.js → graph-utils-BwdXFM9h.js} +1 -1
  50. package/dist/web/dashboard/dist/assets/index-BVhCKhGJ.css +1 -0
  51. package/dist/web/dashboard/dist/assets/{index-07Y4UWP1.js → index-BxYtgAYc.js} +1 -1
  52. package/dist/web/dashboard/dist/assets/{index-Dbaws8C6.js → index-D_SBClB-.js} +26 -26
  53. package/dist/web/dashboard/dist/assets/{index-CVRN6scU.js → index-f0wNMEe_.js} +1 -1
  54. package/dist/web/dashboard/dist/assets/{insights-tab-DJAtypOr.js → insights-tab-DfH4O_Gj.js} +1 -1
  55. package/dist/web/dashboard/dist/assets/{journey-tab-CXtDFeGm.js → journey-tab-D2_EXArZ.js} +1 -1
  56. package/dist/web/dashboard/dist/assets/{languages-tab-03j3C58E.js → languages-tab-Cs-EF0mT.js} +1 -1
  57. package/dist/web/dashboard/dist/assets/{loader-circle-BNEIXs1s.js → loader-circle-D5Z5DuF4.js} +1 -1
  58. package/dist/web/dashboard/dist/assets/{logs-tab-D3BE923P.js → logs-tab-DwVCJxNs.js} +1 -1
  59. package/dist/web/dashboard/dist/assets/{lsp-tab-cac4ysh4.js → lsp-tab-D_3asNom.js} +1 -1
  60. package/dist/web/dashboard/dist/assets/{memories-tab-BPJTM45d.js → memories-tab-BVe3nUf6.js} +1 -1
  61. package/dist/web/dashboard/dist/assets/{prd-backlog-tab-5PCpKm0j.js → prd-backlog-tab-DmeNjNES.js} +1 -1
  62. package/dist/web/dashboard/dist/assets/{refresh-cw-CI2U4FGa.js → refresh-cw-dY_ihv6e.js} +1 -1
  63. package/dist/web/dashboard/dist/assets/{siebel-tab-BuhOpZO3.js → siebel-tab-CUO3fUiF.js} +3 -3
  64. package/dist/web/dashboard/dist/assets/{skills-tab-BHWwOBtm.js → skills-tab-lUKwXrZi.js} +1 -1
  65. package/dist/web/dashboard/dist/assets/{style-BPgBTbDw.js → style-Chqa3iIg.js} +1 -1
  66. package/dist/web/dashboard/dist/assets/{triangle-alert-aqoYdsgW.js → triangle-alert-CkVvjxDP.js} +1 -1
  67. package/dist/web/dashboard/dist/index.html +2 -2
  68. package/package.json +2 -2
  69. package/dist/web/dashboard/dist/assets/benchmark-tab-Dx9G7cqf.js +0 -1
  70. package/dist/web/dashboard/dist/assets/context-tab-BX2hlI9H.js +0 -1
  71. package/dist/web/dashboard/dist/assets/index-DVIgWBT4.css +0 -1
@@ -1 +1 @@
1
- var $r=Object.defineProperty;var Jr=(_,m,f)=>m in _?$r(_,m,{enumerable:!0,configurable:!0,writable:!0,value:f}):_[m]=f;var F=(_,m,f)=>Jr(_,typeof m!="symbol"?m+"":m,f);import{g as Kr}from"./index-Dbaws8C6.js";var J,Xe;function Ye(){if(Xe)return J;Xe=1;var _="\0",m="\0",f="";class u{constructor(r){F(this,"_isDirected",!0);F(this,"_isMultigraph",!1);F(this,"_isCompound",!1);F(this,"_label");F(this,"_defaultNodeLabelFn",()=>{});F(this,"_defaultEdgeLabelFn",()=>{});F(this,"_nodes",{});F(this,"_in",{});F(this,"_preds",{});F(this,"_out",{});F(this,"_sucs",{});F(this,"_edgeObjs",{});F(this,"_edgeLabels",{});F(this,"_nodeCount",0);F(this,"_edgeCount",0);F(this,"_parent");F(this,"_children");r&&(this._isDirected=Object.hasOwn(r,"directed")?r.directed:!0,this._isMultigraph=Object.hasOwn(r,"multigraph")?r.multigraph:!1,this._isCompound=Object.hasOwn(r,"compound")?r.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[m]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(r){return this._label=r,this}graph(){return this._label}setDefaultNodeLabel(r){return this._defaultNodeLabelFn=r,typeof r!="function"&&(this._defaultNodeLabelFn=()=>r),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var r=this;return this.nodes().filter(t=>Object.keys(r._in[t]).length===0)}sinks(){var r=this;return this.nodes().filter(t=>Object.keys(r._out[t]).length===0)}setNodes(r,t){var d=arguments,l=this;return r.forEach(function(w){d.length>1?l.setNode(w,t):l.setNode(w)}),this}setNode(r,t){return Object.hasOwn(this._nodes,r)?(arguments.length>1&&(this._nodes[r]=t),this):(this._nodes[r]=arguments.length>1?t:this._defaultNodeLabelFn(r),this._isCompound&&(this._parent[r]=m,this._children[r]={},this._children[m][r]=!0),this._in[r]={},this._preds[r]={},this._out[r]={},this._sucs[r]={},++this._nodeCount,this)}node(r){return this._nodes[r]}hasNode(r){return Object.hasOwn(this._nodes,r)}removeNode(r){var t=this;if(Object.hasOwn(this._nodes,r)){var d=l=>t.removeEdge(t._edgeObjs[l]);delete this._nodes[r],this._isCompound&&(this._removeFromParentsChildList(r),delete this._parent[r],this.children(r).forEach(function(l){t.setParent(l)}),delete this._children[r]),Object.keys(this._in[r]).forEach(d),delete this._in[r],delete this._preds[r],Object.keys(this._out[r]).forEach(d),delete this._out[r],delete this._sucs[r],--this._nodeCount}return this}setParent(r,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(t===void 0)t=m;else{t+="";for(var d=t;d!==void 0;d=this.parent(d))if(d===r)throw new Error("Setting "+t+" as parent of "+r+" would create a cycle");this.setNode(t)}return this.setNode(r),this._removeFromParentsChildList(r),this._parent[r]=t,this._children[t][r]=!0,this}_removeFromParentsChildList(r){delete this._children[this._parent[r]][r]}parent(r){if(this._isCompound){var t=this._parent[r];if(t!==m)return t}}children(r=m){if(this._isCompound){var t=this._children[r];if(t)return Object.keys(t)}else{if(r===m)return this.nodes();if(this.hasNode(r))return[]}}predecessors(r){var t=this._preds[r];if(t)return Object.keys(t)}successors(r){var t=this._sucs[r];if(t)return Object.keys(t)}neighbors(r){var t=this.predecessors(r);if(t){const l=new Set(t);for(var d of this.successors(r))l.add(d);return Array.from(l.values())}}isLeaf(r){var t;return this.isDirected()?t=this.successors(r):t=this.neighbors(r),t.length===0}filterNodes(r){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var d=this;Object.entries(this._nodes).forEach(function([x,c]){r(x)&&t.setNode(x,c)}),Object.values(this._edgeObjs).forEach(function(x){t.hasNode(x.v)&&t.hasNode(x.w)&&t.setEdge(x,d.edge(x))});var l={};function w(x){var c=d.parent(x);return c===void 0||t.hasNode(c)?(l[x]=c,c):c in l?l[c]:w(c)}return this._isCompound&&t.nodes().forEach(x=>t.setParent(x,w(x))),t}setDefaultEdgeLabel(r){return this._defaultEdgeLabelFn=r,typeof r!="function"&&(this._defaultEdgeLabelFn=()=>r),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(r,t){var d=this,l=arguments;return r.reduce(function(w,x){return l.length>1?d.setEdge(w,x,t):d.setEdge(w,x),x}),this}setEdge(){var r,t,d,l,w=!1,x=arguments[0];typeof x=="object"&&x!==null&&"v"in x?(r=x.v,t=x.w,d=x.name,arguments.length===2&&(l=arguments[1],w=!0)):(r=x,t=arguments[1],d=arguments[3],arguments.length>2&&(l=arguments[2],w=!0)),r=""+r,t=""+t,d!==void 0&&(d=""+d);var c=e(this._isDirected,r,t,d);if(Object.hasOwn(this._edgeLabels,c))return w&&(this._edgeLabels[c]=l),this;if(d!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(r),this.setNode(t),this._edgeLabels[c]=w?l:this._defaultEdgeLabelFn(r,t,d);var g=s(this._isDirected,r,t,d);return r=g.v,t=g.w,Object.freeze(g),this._edgeObjs[c]=g,a(this._preds[t],r),a(this._sucs[r],t),this._in[t][c]=g,this._out[r][c]=g,this._edgeCount++,this}edge(r,t,d){var l=arguments.length===1?n(this._isDirected,arguments[0]):e(this._isDirected,r,t,d);return this._edgeLabels[l]}edgeAsObj(){const r=this.edge(...arguments);return typeof r!="object"?{label:r}:r}hasEdge(r,t,d){var l=arguments.length===1?n(this._isDirected,arguments[0]):e(this._isDirected,r,t,d);return Object.hasOwn(this._edgeLabels,l)}removeEdge(r,t,d){var l=arguments.length===1?n(this._isDirected,arguments[0]):e(this._isDirected,r,t,d),w=this._edgeObjs[l];return w&&(r=w.v,t=w.w,delete this._edgeLabels[l],delete this._edgeObjs[l],i(this._preds[t],r),i(this._sucs[r],t),delete this._in[t][l],delete this._out[r][l],this._edgeCount--),this}inEdges(r,t){var d=this._in[r];if(d){var l=Object.values(d);return t?l.filter(w=>w.v===t):l}}outEdges(r,t){var d=this._out[r];if(d){var l=Object.values(d);return t?l.filter(w=>w.w===t):l}}nodeEdges(r,t){var d=this.inEdges(r,t);if(d)return d.concat(this.outEdges(r,t))}}function a(o,r){o[r]?o[r]++:o[r]=1}function i(o,r){--o[r]||delete o[r]}function e(o,r,t,d){var l=""+r,w=""+t;if(!o&&l>w){var x=l;l=w,w=x}return l+f+w+f+(d===void 0?_:d)}function s(o,r,t,d){var l=""+r,w=""+t;if(!o&&l>w){var x=l;l=w,w=x}var c={v:l,w};return d&&(c.name=d),c}function n(o,r){return e(o,r.v,r.w,r.name)}return J=u,J}var K,Qe;function Zr(){return Qe||(Qe=1,K="2.2.4"),K}var Z,$e;function et(){return $e||($e=1,Z={Graph:Ye(),version:Zr()}),Z}var ee,Je;function rt(){if(Je)return ee;Je=1;var _=Ye();ee={write:m,read:a};function m(i){var e={options:{directed:i.isDirected(),multigraph:i.isMultigraph(),compound:i.isCompound()},nodes:f(i),edges:u(i)};return i.graph()!==void 0&&(e.value=structuredClone(i.graph())),e}function f(i){return i.nodes().map(function(e){var s=i.node(e),n=i.parent(e),o={v:e};return s!==void 0&&(o.value=s),n!==void 0&&(o.parent=n),o})}function u(i){return i.edges().map(function(e){var s=i.edge(e),n={v:e.v,w:e.w};return e.name!==void 0&&(n.name=e.name),s!==void 0&&(n.value=s),n})}function a(i){var e=new _(i.options).setGraph(i.value);return i.nodes.forEach(function(s){e.setNode(s.v,s.value),s.parent&&e.setParent(s.v,s.parent)}),i.edges.forEach(function(s){e.setEdge({v:s.v,w:s.w,name:s.name},s.value)}),e}return ee}var re,Ke;function tt(){if(Ke)return re;Ke=1,re=_;function _(m){var f={},u=[],a;function i(e){Object.hasOwn(f,e)||(f[e]=!0,a.push(e),m.successors(e).forEach(i),m.predecessors(e).forEach(i))}return m.nodes().forEach(function(e){a=[],i(e),a.length&&u.push(a)}),u}return re}var te,Ze;function Vr(){if(Ze)return te;Ze=1;class _{constructor(){F(this,"_arr",[]);F(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(f){return f.key})}has(f){return Object.hasOwn(this._keyIndices,f)}priority(f){var u=this._keyIndices[f];if(u!==void 0)return this._arr[u].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(f,u){var a=this._keyIndices;if(f=String(f),!Object.hasOwn(a,f)){var i=this._arr,e=i.length;return a[f]=e,i.push({key:f,priority:u}),this._decrease(e),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var f=this._arr.pop();return delete this._keyIndices[f.key],this._heapify(0),f.key}decrease(f,u){var a=this._keyIndices[f];if(u>this._arr[a].priority)throw new Error("New priority is greater than current priority. Key: "+f+" Old: "+this._arr[a].priority+" New: "+u);this._arr[a].priority=u,this._decrease(a)}_heapify(f){var u=this._arr,a=2*f,i=a+1,e=f;a<u.length&&(e=u[a].priority<u[e].priority?a:e,i<u.length&&(e=u[i].priority<u[e].priority?i:e),e!==f&&(this._swap(f,e),this._heapify(e)))}_decrease(f){for(var u=this._arr,a=u[f].priority,i;f!==0&&(i=f>>1,!(u[i].priority<a));)this._swap(f,i),f=i}_swap(f,u){var a=this._arr,i=this._keyIndices,e=a[f],s=a[u];a[f]=s,a[u]=e,i[s.key]=f,i[e.key]=u}}return te=_,te}var ne,er;function Br(){if(er)return ne;er=1;var _=Vr();ne=f;var m=()=>1;function f(a,i,e,s){return u(a,String(i),e||m,s||function(n){return a.outEdges(n)})}function u(a,i,e,s){var n={},o=new _,r,t,d=function(l){var w=l.v!==r?l.v:l.w,x=n[w],c=e(l),g=t.distance+c;if(c<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+l+" Weight: "+c);g<x.distance&&(x.distance=g,x.predecessor=r,o.decrease(w,g))};for(a.nodes().forEach(function(l){var w=l===i?0:Number.POSITIVE_INFINITY;n[l]={distance:w},o.add(l,w)});o.size()>0&&(r=o.removeMin(),t=n[r],t.distance!==Number.POSITIVE_INFINITY);)s(r).forEach(d);return n}return ne}var ie,rr;function nt(){if(rr)return ie;rr=1;var _=Br();ie=m;function m(f,u,a){return f.nodes().reduce(function(i,e){return i[e]=_(f,e,u,a),i},{})}return ie}var ae,tr;function Wr(){if(tr)return ae;tr=1,ae=_;function _(m){var f=0,u=[],a={},i=[];function e(s){var n=a[s]={onStack:!0,lowlink:f,index:f++};if(u.push(s),m.successors(s).forEach(function(t){Object.hasOwn(a,t)?a[t].onStack&&(n.lowlink=Math.min(n.lowlink,a[t].index)):(e(t),n.lowlink=Math.min(n.lowlink,a[t].lowlink))}),n.lowlink===n.index){var o=[],r;do r=u.pop(),a[r].onStack=!1,o.push(r);while(s!==r);i.push(o)}}return m.nodes().forEach(function(s){Object.hasOwn(a,s)||e(s)}),i}return ae}var se,nr;function it(){if(nr)return se;nr=1;var _=Wr();se=m;function m(f){return _(f).filter(function(u){return u.length>1||u.length===1&&f.hasEdge(u[0],u[0])})}return se}var oe,ir;function at(){if(ir)return oe;ir=1,oe=m;var _=()=>1;function m(u,a,i){return f(u,a||_,i||function(e){return u.outEdges(e)})}function f(u,a,i){var e={},s=u.nodes();return s.forEach(function(n){e[n]={},e[n][n]={distance:0},s.forEach(function(o){n!==o&&(e[n][o]={distance:Number.POSITIVE_INFINITY})}),i(n).forEach(function(o){var r=o.v===n?o.w:o.v,t=a(o);e[n][r]={distance:t,predecessor:n}})}),s.forEach(function(n){var o=e[n];s.forEach(function(r){var t=e[r];s.forEach(function(d){var l=t[n],w=o[d],x=t[d],c=l.distance+w.distance;c<x.distance&&(x.distance=c,x.predecessor=w.predecessor)})})}),e}return oe}var ue,ar;function Yr(){if(ar)return ue;ar=1;function _(f){var u={},a={},i=[];function e(s){if(Object.hasOwn(a,s))throw new m;Object.hasOwn(u,s)||(a[s]=!0,u[s]=!0,f.predecessors(s).forEach(e),delete a[s],i.push(s))}if(f.sinks().forEach(e),Object.keys(u).length!==f.nodeCount())throw new m;return i}class m extends Error{constructor(){super(...arguments)}}return ue=_,_.CycleException=m,ue}var de,sr;function st(){if(sr)return de;sr=1;var _=Yr();de=m;function m(f){try{_(f)}catch(u){if(u instanceof _.CycleException)return!1;throw u}return!0}return de}var le,or;function zr(){if(or)return le;or=1,le=_;function _(a,i,e){Array.isArray(i)||(i=[i]);var s=a.isDirected()?t=>a.successors(t):t=>a.neighbors(t),n=e==="post"?m:f,o=[],r={};return i.forEach(t=>{if(!a.hasNode(t))throw new Error("Graph does not have node: "+t);n(t,s,r,o)}),o}function m(a,i,e,s){for(var n=[[a,!1]];n.length>0;){var o=n.pop();o[1]?s.push(o[0]):Object.hasOwn(e,o[0])||(e[o[0]]=!0,n.push([o[0],!0]),u(i(o[0]),r=>n.push([r,!1])))}}function f(a,i,e,s){for(var n=[a];n.length>0;){var o=n.pop();Object.hasOwn(e,o)||(e[o]=!0,s.push(o),u(i(o),r=>n.push(r)))}}function u(a,i){for(var e=a.length;e--;)i(a[e],e,a);return a}return le}var he,ur;function ot(){if(ur)return he;ur=1;var _=zr();he=m;function m(f,u){return _(f,u,"post")}return he}var fe,dr;function ut(){if(dr)return fe;dr=1;var _=zr();fe=m;function m(f,u){return _(f,u,"pre")}return fe}var ce,lr;function dt(){if(lr)return ce;lr=1;var _=Ye(),m=Vr();ce=f;function f(u,a){var i=new _,e={},s=new m,n;function o(t){var d=t.v===n?t.w:t.v,l=s.priority(d);if(l!==void 0){var w=a(t);w<l&&(e[d]=n,s.decrease(d,w))}}if(u.nodeCount()===0)return i;u.nodes().forEach(function(t){s.add(t,Number.POSITIVE_INFINITY),i.setNode(t)}),s.decrease(u.nodes()[0],0);for(var r=!1;s.size()>0;){if(n=s.removeMin(),Object.hasOwn(e,n))i.setEdge(n,e[n]);else{if(r)throw new Error("Input graph is not connected: "+u);r=!0}u.nodeEdges(n).forEach(o)}return i}return ce}var pe,hr;function lt(){return hr||(hr=1,pe={components:tt(),dijkstra:Br(),dijkstraAll:nt(),findCycles:it(),floydWarshall:at(),isAcyclic:st(),postorder:ot(),preorder:ut(),prim:dt(),tarjan:Wr(),topsort:Yr()}),pe}var me,fr;function Y(){if(fr)return me;fr=1;var _=et();return me={Graph:_.Graph,json:rt(),alg:lt(),version:_.version},me}var be,cr;function ht(){if(cr)return be;cr=1;class _{constructor(){let a={};a._next=a._prev=a,this._sentinel=a}dequeue(){let a=this._sentinel,i=a._prev;if(i!==a)return m(i),i}enqueue(a){let i=this._sentinel;a._prev&&a._next&&m(a),a._next=i._next,i._next._prev=a,i._next=a,a._prev=i}toString(){let a=[],i=this._sentinel,e=i._prev;for(;e!==i;)a.push(JSON.stringify(e,f)),e=e._prev;return"["+a.join(", ")+"]"}}function m(u){u._prev._next=u._next,u._next._prev=u._prev,delete u._next,delete u._prev}function f(u,a){if(u!=="_next"&&u!=="_prev")return a}return be=_,be}var ve,pr;function ft(){if(pr)return ve;pr=1;let _=Y().Graph,m=ht();ve=u;let f=()=>1;function u(o,r){if(o.nodeCount()<=1)return[];let t=e(o,r||f);return a(t.graph,t.buckets,t.zeroIdx).flatMap(l=>o.outEdges(l.v,l.w))}function a(o,r,t){let d=[],l=r[r.length-1],w=r[0],x;for(;o.nodeCount();){for(;x=w.dequeue();)i(o,r,t,x);for(;x=l.dequeue();)i(o,r,t,x);if(o.nodeCount()){for(let c=r.length-2;c>0;--c)if(x=r[c].dequeue(),x){d=d.concat(i(o,r,t,x,!0));break}}}return d}function i(o,r,t,d,l){let w=l?[]:void 0;return o.inEdges(d.v).forEach(x=>{let c=o.edge(x),g=o.node(x.v);l&&w.push({v:x.v,w:x.w}),g.out-=c,s(r,t,g)}),o.outEdges(d.v).forEach(x=>{let c=o.edge(x),g=x.w,p=o.node(g);p.in-=c,s(r,t,p)}),o.removeNode(d.v),w}function e(o,r){let t=new _,d=0,l=0;o.nodes().forEach(c=>{t.setNode(c,{v:c,in:0,out:0})}),o.edges().forEach(c=>{let g=t.edge(c.v,c.w)||0,p=r(c),O=g+p;t.setEdge(c.v,c.w,O),l=Math.max(l,t.node(c.v).out+=p),d=Math.max(d,t.node(c.w).in+=p)});let w=n(l+d+3).map(()=>new m),x=d+1;return t.nodes().forEach(c=>{s(w,x,t.node(c))}),{graph:t,buckets:w,zeroIdx:x}}function s(o,r,t){t.out?t.in?o[t.out-t.in+r].enqueue(t):o[o.length-1].enqueue(t):o[0].enqueue(t)}function n(o){const r=[];for(let t=0;t<o;t++)r.push(t);return r}return ve}var we,mr;function A(){if(mr)return we;mr=1;let _=Y().Graph;we={addBorderNode:r,addDummyNode:m,applyWithChunking:l,asNonCompoundGraph:u,buildLayerMatrix:s,intersectRect:e,mapValues:j,maxRank:w,normalizeRanks:n,notime:g,partition:x,pick:I,predecessorWeights:i,range:C,removeEmptyRanks:o,simplify:f,successorWeights:a,time:c,uniqueId:O,zipObject:L};function m(h,b,E,k){for(var R=k;h.hasNode(R);)R=O(k);return E.dummy=b,h.setNode(R,E),R}function f(h){let b=new _().setGraph(h.graph());return h.nodes().forEach(E=>b.setNode(E,h.node(E))),h.edges().forEach(E=>{let k=b.edge(E.v,E.w)||{weight:0,minlen:1},R=h.edge(E);b.setEdge(E.v,E.w,{weight:k.weight+R.weight,minlen:Math.max(k.minlen,R.minlen)})}),b}function u(h){let b=new _({multigraph:h.isMultigraph()}).setGraph(h.graph());return h.nodes().forEach(E=>{h.children(E).length||b.setNode(E,h.node(E))}),h.edges().forEach(E=>{b.setEdge(E,h.edge(E))}),b}function a(h){let b=h.nodes().map(E=>{let k={};return h.outEdges(E).forEach(R=>{k[R.w]=(k[R.w]||0)+h.edge(R).weight}),k});return L(h.nodes(),b)}function i(h){let b=h.nodes().map(E=>{let k={};return h.inEdges(E).forEach(R=>{k[R.v]=(k[R.v]||0)+h.edge(R).weight}),k});return L(h.nodes(),b)}function e(h,b){let E=h.x,k=h.y,R=b.x-E,T=b.y-k,S=h.width/2,D=h.height/2;if(!R&&!T)throw new Error("Not possible to find intersection inside of the rectangle");let z,U;return Math.abs(T)*S>Math.abs(R)*D?(T<0&&(D=-D),z=D*R/T,U=D):(R<0&&(S=-S),z=S,U=S*T/R),{x:E+z,y:k+U}}function s(h){let b=C(w(h)+1).map(()=>[]);return h.nodes().forEach(E=>{let k=h.node(E),R=k.rank;R!==void 0&&(b[R][k.order]=E)}),b}function n(h){let b=h.nodes().map(k=>{let R=h.node(k).rank;return R===void 0?Number.MAX_VALUE:R}),E=l(Math.min,b);h.nodes().forEach(k=>{let R=h.node(k);Object.hasOwn(R,"rank")&&(R.rank-=E)})}function o(h){let b=h.nodes().map(S=>h.node(S).rank),E=l(Math.min,b),k=[];h.nodes().forEach(S=>{let D=h.node(S).rank-E;k[D]||(k[D]=[]),k[D].push(S)});let R=0,T=h.graph().nodeRankFactor;Array.from(k).forEach((S,D)=>{S===void 0&&D%T!==0?--R:S!==void 0&&R&&S.forEach(z=>h.node(z).rank+=R)})}function r(h,b,E,k){let R={width:0,height:0};return arguments.length>=4&&(R.rank=E,R.order=k),m(h,"border",R,b)}function t(h,b=d){const E=[];for(let k=0;k<h.length;k+=b){const R=h.slice(k,k+b);E.push(R)}return E}const d=65535;function l(h,b){if(b.length>d){const E=t(b);return h.apply(null,E.map(k=>h.apply(null,k)))}else return h.apply(null,b)}function w(h){const E=h.nodes().map(k=>{let R=h.node(k).rank;return R===void 0?Number.MIN_VALUE:R});return l(Math.max,E)}function x(h,b){let E={lhs:[],rhs:[]};return h.forEach(k=>{b(k)?E.lhs.push(k):E.rhs.push(k)}),E}function c(h,b){let E=Date.now();try{return b()}finally{console.log(h+" time: "+(Date.now()-E)+"ms")}}function g(h,b){return b()}let p=0;function O(h){var b=++p;return h+(""+b)}function C(h,b,E=1){b==null&&(b=h,h=0);let k=T=>T<b;E<0&&(k=T=>b<T);const R=[];for(let T=h;k(T);T+=E)R.push(T);return R}function I(h,b){const E={};for(const k of b)h[k]!==void 0&&(E[k]=h[k]);return E}function j(h,b){let E=b;return typeof b=="string"&&(E=k=>k[b]),Object.entries(h).reduce((k,[R,T])=>(k[R]=E(T,R),k),{})}function L(h,b){return h.reduce((E,k,R)=>(E[k]=b[R],E),{})}return we}var ge,br;function ct(){if(br)return ge;br=1;let _=ft(),m=A().uniqueId;ge={run:f,undo:a};function f(i){(i.graph().acyclicer==="greedy"?_(i,s(i)):u(i)).forEach(n=>{let o=i.edge(n);i.removeEdge(n),o.forwardName=n.name,o.reversed=!0,i.setEdge(n.w,n.v,o,m("rev"))});function s(n){return o=>n.edge(o).weight}}function u(i){let e=[],s={},n={};function o(r){Object.hasOwn(n,r)||(n[r]=!0,s[r]=!0,i.outEdges(r).forEach(t=>{Object.hasOwn(s,t.w)?e.push(t):o(t.w)}),delete s[r])}return i.nodes().forEach(o),e}function a(i){i.edges().forEach(e=>{let s=i.edge(e);if(s.reversed){i.removeEdge(e);let n=s.forwardName;delete s.reversed,delete s.forwardName,i.setEdge(e.w,e.v,s,n)}})}return ge}var Ee,vr;function pt(){if(vr)return Ee;vr=1;let _=A();Ee={run:m,undo:u};function m(a){a.graph().dummyChains=[],a.edges().forEach(i=>f(a,i))}function f(a,i){let e=i.v,s=a.node(e).rank,n=i.w,o=a.node(n).rank,r=i.name,t=a.edge(i),d=t.labelRank;if(o===s+1)return;a.removeEdge(i);let l,w,x;for(x=0,++s;s<o;++x,++s)t.points=[],w={width:0,height:0,edgeLabel:t,edgeObj:i,rank:s},l=_.addDummyNode(a,"edge",w,"_d"),s===d&&(w.width=t.width,w.height=t.height,w.dummy="edge-label",w.labelpos=t.labelpos),a.setEdge(e,l,{weight:t.weight},r),x===0&&a.graph().dummyChains.push(l),e=l;a.setEdge(e,n,{weight:t.weight},r)}function u(a){a.graph().dummyChains.forEach(i=>{let e=a.node(i),s=e.edgeLabel,n;for(a.setEdge(e.edgeObj,s);e.dummy;)n=a.successors(i)[0],a.removeNode(i),s.points.push({x:e.x,y:e.y}),e.dummy==="edge-label"&&(s.x=e.x,s.y=e.y,s.width=e.width,s.height=e.height),i=n,e=a.node(i)})}return Ee}var _e,wr;function X(){if(wr)return _e;wr=1;const{applyWithChunking:_}=A();_e={longestPath:m,slack:f};function m(u){var a={};function i(e){var s=u.node(e);if(Object.hasOwn(a,e))return s.rank;a[e]=!0;let n=u.outEdges(e).map(r=>r==null?Number.POSITIVE_INFINITY:i(r.w)-u.edge(r).minlen);var o=_(Math.min,n);return o===Number.POSITIVE_INFINITY&&(o=0),s.rank=o}u.sources().forEach(i)}function f(u,a){return u.node(a.w).rank-u.node(a.v).rank-u.edge(a).minlen}return _e}var ye,gr;function Ur(){if(gr)return ye;gr=1;var _=Y().Graph,m=X().slack;ye=f;function f(e){var s=new _({directed:!1}),n=e.nodes()[0],o=e.nodeCount();s.setNode(n,{});for(var r,t;u(s,e)<o;)r=a(s,e),t=s.hasNode(r.v)?m(e,r):-m(e,r),i(s,e,t);return s}function u(e,s){function n(o){s.nodeEdges(o).forEach(r=>{var t=r.v,d=o===t?r.w:t;!e.hasNode(d)&&!m(s,r)&&(e.setNode(d,{}),e.setEdge(o,d,{}),n(d))})}return e.nodes().forEach(n),e.nodeCount()}function a(e,s){return s.edges().reduce((o,r)=>{let t=Number.POSITIVE_INFINITY;return e.hasNode(r.v)!==e.hasNode(r.w)&&(t=m(s,r)),t<o[0]?[t,r]:o},[Number.POSITIVE_INFINITY,null])[1]}function i(e,s,n){e.nodes().forEach(o=>s.node(o).rank+=n)}return ye}var ke,Er;function mt(){if(Er)return ke;Er=1;var _=Ur(),m=X().slack,f=X().longestPath,u=Y().alg.preorder,a=Y().alg.postorder,i=A().simplify;ke=e,e.initLowLimValues=r,e.initCutValues=s,e.calcCutValue=o,e.leaveEdge=d,e.enterEdge=l,e.exchangeEdges=w;function e(p){p=i(p),f(p);var O=_(p);r(O),s(O,p);for(var C,I;C=d(O);)I=l(O,p,C),w(O,p,C,I)}function s(p,O){var C=a(p,p.nodes());C=C.slice(0,C.length-1),C.forEach(I=>n(p,O,I))}function n(p,O,C){var I=p.node(C),j=I.parent;p.edge(C,j).cutvalue=o(p,O,C)}function o(p,O,C){var I=p.node(C),j=I.parent,L=!0,h=O.edge(C,j),b=0;return h||(L=!1,h=O.edge(j,C)),b=h.weight,O.nodeEdges(C).forEach(E=>{var k=E.v===C,R=k?E.w:E.v;if(R!==j){var T=k===L,S=O.edge(E).weight;if(b+=T?S:-S,c(p,C,R)){var D=p.edge(C,R).cutvalue;b+=T?-D:D}}}),b}function r(p,O){arguments.length<2&&(O=p.nodes()[0]),t(p,{},1,O)}function t(p,O,C,I,j){var L=C,h=p.node(I);return O[I]=!0,p.neighbors(I).forEach(b=>{Object.hasOwn(O,b)||(C=t(p,O,C,b,I))}),h.low=L,h.lim=C++,j?h.parent=j:delete h.parent,C}function d(p){return p.edges().find(O=>p.edge(O).cutvalue<0)}function l(p,O,C){var I=C.v,j=C.w;O.hasEdge(I,j)||(I=C.w,j=C.v);var L=p.node(I),h=p.node(j),b=L,E=!1;L.lim>h.lim&&(b=h,E=!0);var k=O.edges().filter(R=>E===g(p,p.node(R.v),b)&&E!==g(p,p.node(R.w),b));return k.reduce((R,T)=>m(O,T)<m(O,R)?T:R)}function w(p,O,C,I){var j=C.v,L=C.w;p.removeEdge(j,L),p.setEdge(I.v,I.w,{}),r(p),s(p,O),x(p,O)}function x(p,O){var C=p.nodes().find(j=>!O.node(j).parent),I=u(p,C);I=I.slice(1),I.forEach(j=>{var L=p.node(j).parent,h=O.edge(j,L),b=!1;h||(h=O.edge(L,j),b=!0),O.node(j).rank=O.node(L).rank+(b?h.minlen:-h.minlen)})}function c(p,O,C){return p.hasEdge(O,C)}function g(p,O,C){return C.low<=O.lim&&O.lim<=C.lim}return ke}var Oe,_r;function bt(){if(_r)return Oe;_r=1;var _=X(),m=_.longestPath,f=Ur(),u=mt();Oe=a;function a(n){var o=n.graph().ranker;if(o instanceof Function)return o(n);switch(n.graph().ranker){case"network-simplex":s(n);break;case"tight-tree":e(n);break;case"longest-path":i(n);break;case"none":break;default:s(n)}}var i=m;function e(n){m(n),f(n)}function s(n){u(n)}return Oe}var Ne,yr;function vt(){if(yr)return Ne;yr=1,Ne=_;function _(u){let a=f(u);u.graph().dummyChains.forEach(i=>{let e=u.node(i),s=e.edgeObj,n=m(u,a,s.v,s.w),o=n.path,r=n.lca,t=0,d=o[t],l=!0;for(;i!==s.w;){if(e=u.node(i),l){for(;(d=o[t])!==r&&u.node(d).maxRank<e.rank;)t++;d===r&&(l=!1)}if(!l){for(;t<o.length-1&&u.node(d=o[t+1]).minRank<=e.rank;)t++;d=o[t]}u.setParent(i,d),i=u.successors(i)[0]}})}function m(u,a,i,e){let s=[],n=[],o=Math.min(a[i].low,a[e].low),r=Math.max(a[i].lim,a[e].lim),t,d;t=i;do t=u.parent(t),s.push(t);while(t&&(a[t].low>o||r>a[t].lim));for(d=t,t=e;(t=u.parent(t))!==d;)n.push(t);return{path:s.concat(n.reverse()),lca:d}}function f(u){let a={},i=0;function e(s){let n=i;u.children(s).forEach(e),a[s]={low:n,lim:i++}}return u.children().forEach(e),a}return Ne}var Ce,kr;function wt(){if(kr)return Ce;kr=1;let _=A();Ce={run:m,cleanup:i};function m(e){let s=_.addDummyNode(e,"root",{},"_root"),n=u(e),o=Object.values(n),r=_.applyWithChunking(Math.max,o)-1,t=2*r+1;e.graph().nestingRoot=s,e.edges().forEach(l=>e.edge(l).minlen*=t);let d=a(e)+1;e.children().forEach(l=>f(e,s,t,d,r,n,l)),e.graph().nodeRankFactor=t}function f(e,s,n,o,r,t,d){let l=e.children(d);if(!l.length){d!==s&&e.setEdge(s,d,{weight:0,minlen:n});return}let w=_.addBorderNode(e,"_bt"),x=_.addBorderNode(e,"_bb"),c=e.node(d);e.setParent(w,d),c.borderTop=w,e.setParent(x,d),c.borderBottom=x,l.forEach(g=>{f(e,s,n,o,r,t,g);let p=e.node(g),O=p.borderTop?p.borderTop:g,C=p.borderBottom?p.borderBottom:g,I=p.borderTop?o:2*o,j=O!==C?1:r-t[d]+1;e.setEdge(w,O,{weight:I,minlen:j,nestingEdge:!0}),e.setEdge(C,x,{weight:I,minlen:j,nestingEdge:!0})}),e.parent(d)||e.setEdge(s,w,{weight:0,minlen:r+t[d]})}function u(e){var s={};function n(o,r){var t=e.children(o);t&&t.length&&t.forEach(d=>n(d,r+1)),s[o]=r}return e.children().forEach(o=>n(o,1)),s}function a(e){return e.edges().reduce((s,n)=>s+e.edge(n).weight,0)}function i(e){var s=e.graph();e.removeNode(s.nestingRoot),delete s.nestingRoot,e.edges().forEach(n=>{var o=e.edge(n);o.nestingEdge&&e.removeEdge(n)})}return Ce}var xe,Or;function gt(){if(Or)return xe;Or=1;let _=A();xe=m;function m(u){function a(i){let e=u.children(i),s=u.node(i);if(e.length&&e.forEach(a),Object.hasOwn(s,"minRank")){s.borderLeft=[],s.borderRight=[];for(let n=s.minRank,o=s.maxRank+1;n<o;++n)f(u,"borderLeft","_bl",i,s,n),f(u,"borderRight","_br",i,s,n)}}u.children().forEach(a)}function f(u,a,i,e,s,n){let o={width:0,height:0,rank:n,borderType:a},r=s[a][n-1],t=_.addDummyNode(u,"border",o,i);s[a][n]=t,u.setParent(t,e),r&&u.setEdge(r,t,{weight:1})}return xe}var Re,Nr;function Et(){if(Nr)return Re;Nr=1,Re={adjust:_,undo:m};function _(n){let o=n.graph().rankdir.toLowerCase();(o==="lr"||o==="rl")&&f(n)}function m(n){let o=n.graph().rankdir.toLowerCase();(o==="bt"||o==="rl")&&a(n),(o==="lr"||o==="rl")&&(e(n),f(n))}function f(n){n.nodes().forEach(o=>u(n.node(o))),n.edges().forEach(o=>u(n.edge(o)))}function u(n){let o=n.width;n.width=n.height,n.height=o}function a(n){n.nodes().forEach(o=>i(n.node(o))),n.edges().forEach(o=>{let r=n.edge(o);r.points.forEach(i),Object.hasOwn(r,"y")&&i(r)})}function i(n){n.y=-n.y}function e(n){n.nodes().forEach(o=>s(n.node(o))),n.edges().forEach(o=>{let r=n.edge(o);r.points.forEach(s),Object.hasOwn(r,"x")&&s(r)})}function s(n){let o=n.x;n.x=n.y,n.y=o}return Re}var Ie,Cr;function _t(){if(Cr)return Ie;Cr=1;let _=A();Ie=m;function m(f){let u={},a=f.nodes().filter(r=>!f.children(r).length),i=a.map(r=>f.node(r).rank),e=_.applyWithChunking(Math.max,i),s=_.range(e+1).map(()=>[]);function n(r){if(u[r])return;u[r]=!0;let t=f.node(r);s[t.rank].push(r),f.successors(r).forEach(n)}return a.sort((r,t)=>f.node(r).rank-f.node(t).rank).forEach(n),s}return Ie}var je,xr;function yt(){if(xr)return je;xr=1;let _=A().zipObject;je=m;function m(u,a){let i=0;for(let e=1;e<a.length;++e)i+=f(u,a[e-1],a[e]);return i}function f(u,a,i){let e=_(i,i.map((d,l)=>l)),s=a.flatMap(d=>u.outEdges(d).map(l=>({pos:e[l.w],weight:u.edge(l).weight})).sort((l,w)=>l.pos-w.pos)),n=1;for(;n<i.length;)n<<=1;let o=2*n-1;n-=1;let r=new Array(o).fill(0),t=0;return s.forEach(d=>{let l=d.pos+n;r[l]+=d.weight;let w=0;for(;l>0;)l%2&&(w+=r[l+1]),l=l-1>>1,r[l]+=d.weight;t+=d.weight*w}),t}return je}var qe,Rr;function kt(){if(Rr)return qe;Rr=1,qe=_;function _(m,f=[]){return f.map(u=>{let a=m.inEdges(u);if(a.length){let i=a.reduce((e,s)=>{let n=m.edge(s),o=m.node(s.v);return{sum:e.sum+n.weight*o.order,weight:e.weight+n.weight}},{sum:0,weight:0});return{v:u,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:u}})}return qe}var Le,Ir;function Ot(){if(Ir)return Le;Ir=1;let _=A();Le=m;function m(a,i){let e={};a.forEach((n,o)=>{let r=e[n.v]={indegree:0,in:[],out:[],vs:[n.v],i:o};n.barycenter!==void 0&&(r.barycenter=n.barycenter,r.weight=n.weight)}),i.edges().forEach(n=>{let o=e[n.v],r=e[n.w];o!==void 0&&r!==void 0&&(r.indegree++,o.out.push(e[n.w]))});let s=Object.values(e).filter(n=>!n.indegree);return f(s)}function f(a){let i=[];function e(n){return o=>{o.merged||(o.barycenter===void 0||n.barycenter===void 0||o.barycenter>=n.barycenter)&&u(n,o)}}function s(n){return o=>{o.in.push(n),--o.indegree===0&&a.push(o)}}for(;a.length;){let n=a.pop();i.push(n),n.in.reverse().forEach(e(n)),n.out.forEach(s(n))}return i.filter(n=>!n.merged).map(n=>_.pick(n,["vs","i","barycenter","weight"]))}function u(a,i){let e=0,s=0;a.weight&&(e+=a.barycenter*a.weight,s+=a.weight),i.weight&&(e+=i.barycenter*i.weight,s+=i.weight),a.vs=i.vs.concat(a.vs),a.barycenter=e/s,a.weight=s,a.i=Math.min(i.i,a.i),i.merged=!0}return Le}var Te,jr;function Nt(){if(jr)return Te;jr=1;let _=A();Te=m;function m(a,i){let e=_.partition(a,w=>Object.hasOwn(w,"barycenter")),s=e.lhs,n=e.rhs.sort((w,x)=>x.i-w.i),o=[],r=0,t=0,d=0;s.sort(u(!!i)),d=f(o,n,d),s.forEach(w=>{d+=w.vs.length,o.push(w.vs),r+=w.barycenter*w.weight,t+=w.weight,d=f(o,n,d)});let l={vs:o.flat(!0)};return t&&(l.barycenter=r/t,l.weight=t),l}function f(a,i,e){let s;for(;i.length&&(s=i[i.length-1]).i<=e;)i.pop(),a.push(s.vs),e++;return e}function u(a){return(i,e)=>i.barycenter<e.barycenter?-1:i.barycenter>e.barycenter?1:a?e.i-i.i:i.i-e.i}return Te}var Se,qr;function Ct(){if(qr)return Se;qr=1;let _=kt(),m=Ot(),f=Nt();Se=u;function u(e,s,n,o){let r=e.children(s),t=e.node(s),d=t?t.borderLeft:void 0,l=t?t.borderRight:void 0,w={};d&&(r=r.filter(p=>p!==d&&p!==l));let x=_(e,r);x.forEach(p=>{if(e.children(p.v).length){let O=u(e,p.v,n,o);w[p.v]=O,Object.hasOwn(O,"barycenter")&&i(p,O)}});let c=m(x,n);a(c,w);let g=f(c,o);if(d&&(g.vs=[d,g.vs,l].flat(!0),e.predecessors(d).length)){let p=e.node(e.predecessors(d)[0]),O=e.node(e.predecessors(l)[0]);Object.hasOwn(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+p.order+O.order)/(g.weight+2),g.weight+=2}return g}function a(e,s){e.forEach(n=>{n.vs=n.vs.flatMap(o=>s[o]?s[o].vs:o)})}function i(e,s){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+s.barycenter*s.weight)/(e.weight+s.weight),e.weight+=s.weight):(e.barycenter=s.barycenter,e.weight=s.weight)}return Se}var Me,Lr;function xt(){if(Lr)return Me;Lr=1;let _=Y().Graph,m=A();Me=f;function f(a,i,e,s){s||(s=a.nodes());let n=u(a),o=new _({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(r=>a.node(r));return s.forEach(r=>{let t=a.node(r),d=a.parent(r);(t.rank===i||t.minRank<=i&&i<=t.maxRank)&&(o.setNode(r),o.setParent(r,d||n),a[e](r).forEach(l=>{let w=l.v===r?l.w:l.v,x=o.edge(w,r),c=x!==void 0?x.weight:0;o.setEdge(w,r,{weight:a.edge(l).weight+c})}),Object.hasOwn(t,"minRank")&&o.setNode(r,{borderLeft:t.borderLeft[i],borderRight:t.borderRight[i]}))}),o}function u(a){for(var i;a.hasNode(i=m.uniqueId("_root")););return i}return Me}var Pe,Tr;function Rt(){if(Tr)return Pe;Tr=1,Pe=_;function _(m,f,u){let a={},i;u.forEach(e=>{let s=m.parent(e),n,o;for(;s;){if(n=m.parent(s),n?(o=a[n],a[n]=s):(o=i,i=s),o&&o!==s){f.setEdge(o,s);return}s=n}})}return Pe}var De,Sr;function It(){if(Sr)return De;Sr=1;let _=_t(),m=yt(),f=Ct(),u=xt(),a=Rt(),i=Y().Graph,e=A();De=s;function s(t,d){if(d&&typeof d.customOrder=="function"){d.customOrder(t,s);return}let l=e.maxRank(t),w=n(t,e.range(1,l+1),"inEdges"),x=n(t,e.range(l-1,-1,-1),"outEdges"),c=_(t);if(r(t,c),d&&d.disableOptimalOrderHeuristic)return;let g=Number.POSITIVE_INFINITY,p;for(let O=0,C=0;C<4;++O,++C){o(O%2?w:x,O%4>=2),c=e.buildLayerMatrix(t);let I=m(t,c);I<g&&(C=0,p=Object.assign({},c),g=I)}r(t,p)}function n(t,d,l){const w=new Map,x=(c,g)=>{w.has(c)||w.set(c,[]),w.get(c).push(g)};for(const c of t.nodes()){const g=t.node(c);if(typeof g.rank=="number"&&x(g.rank,c),typeof g.minRank=="number"&&typeof g.maxRank=="number")for(let p=g.minRank;p<=g.maxRank;p++)p!==g.rank&&x(p,c)}return d.map(function(c){return u(t,c,l,w.get(c)||[])})}function o(t,d){let l=new i;t.forEach(function(w){let x=w.graph().root,c=f(w,x,l,d);c.vs.forEach((g,p)=>w.node(g).order=p),a(w,l,c.vs)})}function r(t,d){Object.values(d).forEach(l=>l.forEach((w,x)=>t.node(w).order=x))}return De}var Ge,Mr;function jt(){if(Mr)return Ge;Mr=1;let _=Y().Graph,m=A();Ge={positionX:l,findType1Conflicts:f,findType2Conflicts:u,addConflict:i,hasConflict:e,verticalAlignment:s,horizontalCompaction:n,alignCoordinates:t,findSmallestWidthAlignment:r,balance:d};function f(c,g){let p={};function O(C,I){let j=0,L=0,h=C.length,b=I[I.length-1];return I.forEach((E,k)=>{let R=a(c,E),T=R?c.node(R).order:h;(R||E===b)&&(I.slice(L,k+1).forEach(S=>{c.predecessors(S).forEach(D=>{let z=c.node(D),U=z.order;(U<j||T<U)&&!(z.dummy&&c.node(S).dummy)&&i(p,D,S)})}),L=k+1,j=T)}),I}return g.length&&g.reduce(O),p}function u(c,g){let p={};function O(I,j,L,h,b){let E;m.range(j,L).forEach(k=>{E=I[k],c.node(E).dummy&&c.predecessors(E).forEach(R=>{let T=c.node(R);T.dummy&&(T.order<h||T.order>b)&&i(p,R,E)})})}function C(I,j){let L=-1,h,b=0;return j.forEach((E,k)=>{if(c.node(E).dummy==="border"){let R=c.predecessors(E);R.length&&(h=c.node(R[0]).order,O(j,b,k,L,h),b=k,L=h)}O(j,b,j.length,h,I.length)}),j}return g.length&&g.reduce(C),p}function a(c,g){if(c.node(g).dummy)return c.predecessors(g).find(p=>c.node(p).dummy)}function i(c,g,p){if(g>p){let C=g;g=p,p=C}let O=c[g];O||(c[g]=O={}),O[p]=!0}function e(c,g,p){if(g>p){let O=g;g=p,p=O}return!!c[g]&&Object.hasOwn(c[g],p)}function s(c,g,p,O){let C={},I={},j={};return g.forEach(L=>{L.forEach((h,b)=>{C[h]=h,I[h]=h,j[h]=b})}),g.forEach(L=>{let h=-1;L.forEach(b=>{let E=O(b);if(E.length){E=E.sort((R,T)=>j[R]-j[T]);let k=(E.length-1)/2;for(let R=Math.floor(k),T=Math.ceil(k);R<=T;++R){let S=E[R];I[b]===b&&h<j[S]&&!e(p,b,S)&&(I[S]=b,I[b]=C[b]=C[S],h=j[S])}}})}),{root:C,align:I}}function n(c,g,p,O,C){let I={},j=o(c,g,p,C),L=C?"borderLeft":"borderRight";function h(k,R){let T=j.nodes(),S=T.pop(),D={};for(;S;)D[S]?k(S):(D[S]=!0,T.push(S),T=T.concat(R(S))),S=T.pop()}function b(k){I[k]=j.inEdges(k).reduce((R,T)=>Math.max(R,I[T.v]+j.edge(T)),0)}function E(k){let R=j.outEdges(k).reduce((S,D)=>Math.min(S,I[D.w]-j.edge(D)),Number.POSITIVE_INFINITY),T=c.node(k);R!==Number.POSITIVE_INFINITY&&T.borderType!==L&&(I[k]=Math.max(I[k],R))}return h(b,j.predecessors.bind(j)),h(E,j.successors.bind(j)),Object.keys(O).forEach(k=>I[k]=I[p[k]]),I}function o(c,g,p,O){let C=new _,I=c.graph(),j=w(I.nodesep,I.edgesep,O);return g.forEach(L=>{let h;L.forEach(b=>{let E=p[b];if(C.setNode(E),h){var k=p[h],R=C.edge(k,E);C.setEdge(k,E,Math.max(j(c,b,h),R||0))}h=b})}),C}function r(c,g){return Object.values(g).reduce((p,O)=>{let C=Number.NEGATIVE_INFINITY,I=Number.POSITIVE_INFINITY;Object.entries(O).forEach(([L,h])=>{let b=x(c,L)/2;C=Math.max(h+b,C),I=Math.min(h-b,I)});const j=C-I;return j<p[0]&&(p=[j,O]),p},[Number.POSITIVE_INFINITY,null])[1]}function t(c,g){let p=Object.values(g),O=m.applyWithChunking(Math.min,p),C=m.applyWithChunking(Math.max,p);["u","d"].forEach(I=>{["l","r"].forEach(j=>{let L=I+j,h=c[L];if(h===g)return;let b=Object.values(h),E=O-m.applyWithChunking(Math.min,b);j!=="l"&&(E=C-m.applyWithChunking(Math.max,b)),E&&(c[L]=m.mapValues(h,k=>k+E))})})}function d(c,g){return m.mapValues(c.ul,(p,O)=>{if(g)return c[g.toLowerCase()][O];{let C=Object.values(c).map(I=>I[O]).sort((I,j)=>I-j);return(C[1]+C[2])/2}})}function l(c){let g=m.buildLayerMatrix(c),p=Object.assign(f(c,g),u(c,g)),O={},C;["u","d"].forEach(j=>{C=j==="u"?g:Object.values(g).reverse(),["l","r"].forEach(L=>{L==="r"&&(C=C.map(k=>Object.values(k).reverse()));let h=(j==="u"?c.predecessors:c.successors).bind(c),b=s(c,C,p,h),E=n(c,C,b.root,b.align,L==="r");L==="r"&&(E=m.mapValues(E,k=>-k)),O[j+L]=E})});let I=r(c,O);return t(O,I),d(O,c.graph().align)}function w(c,g,p){return(O,C,I)=>{let j=O.node(C),L=O.node(I),h=0,b;if(h+=j.width/2,Object.hasOwn(j,"labelpos"))switch(j.labelpos.toLowerCase()){case"l":b=-j.width/2;break;case"r":b=j.width/2;break}if(b&&(h+=p?b:-b),b=0,h+=(j.dummy?g:c)/2,h+=(L.dummy?g:c)/2,h+=L.width/2,Object.hasOwn(L,"labelpos"))switch(L.labelpos.toLowerCase()){case"l":b=L.width/2;break;case"r":b=-L.width/2;break}return b&&(h+=p?b:-b),b=0,h}}function x(c,g){return c.node(g).width}return Ge}var Fe,Pr;function qt(){if(Pr)return Fe;Pr=1;let _=A(),m=jt().positionX;Fe=f;function f(a){a=_.asNonCompoundGraph(a),u(a),Object.entries(m(a)).forEach(([i,e])=>a.node(i).x=e)}function u(a){let i=_.buildLayerMatrix(a),e=a.graph().ranksep,s=0;i.forEach(n=>{const o=n.reduce((r,t)=>{const d=a.node(t).height;return r>d?r:d},0);n.forEach(r=>a.node(r).y=s+o/2),s+=o+e})}return Fe}var Ae,Dr;function Lt(){if(Dr)return Ae;Dr=1;let _=ct(),m=pt(),f=bt(),u=A().normalizeRanks,a=vt(),i=A().removeEmptyRanks,e=wt(),s=gt(),n=Et(),o=It(),r=qt(),t=A(),d=Y().Graph;Ae=l;function l(v,y){let N=y&&y.debugTiming?t.time:t.notime;N("layout",()=>{let q=N(" buildLayoutGraph",()=>h(v));N(" runLayout",()=>w(q,N,y)),N(" updateInputGraph",()=>x(v,q))})}function w(v,y,N){y(" makeSpaceForEdgeLabels",()=>b(v)),y(" removeSelfEdges",()=>Hr(v)),y(" acyclic",()=>_.run(v)),y(" nestingGraph.run",()=>e.run(v)),y(" rank",()=>f(t.asNonCompoundGraph(v))),y(" injectEdgeLabelProxies",()=>E(v)),y(" removeEmptyRanks",()=>i(v)),y(" nestingGraph.cleanup",()=>e.cleanup(v)),y(" normalizeRanks",()=>u(v)),y(" assignRankMinMax",()=>k(v)),y(" removeEdgeLabelProxies",()=>R(v)),y(" normalize.run",()=>m.run(v)),y(" parentDummyChains",()=>a(v)),y(" addBorderSegments",()=>s(v)),y(" order",()=>o(v,N)),y(" insertSelfEdges",()=>Xr(v)),y(" adjustCoordinateSystem",()=>n.adjust(v)),y(" position",()=>r(v)),y(" positionSelfEdges",()=>Qr(v)),y(" removeBorderNodes",()=>U(v)),y(" normalize.undo",()=>m.undo(v)),y(" fixupEdgeLabelCoords",()=>D(v)),y(" undoCoordinateSystem",()=>n.undo(v)),y(" translateGraph",()=>T(v)),y(" assignNodeIntersects",()=>S(v)),y(" reversePoints",()=>z(v)),y(" acyclic.undo",()=>_.undo(v))}function x(v,y){v.nodes().forEach(N=>{let q=v.node(N),M=y.node(N);q&&(q.x=M.x,q.y=M.y,q.rank=M.rank,y.children(N).length&&(q.width=M.width,q.height=M.height))}),v.edges().forEach(N=>{let q=v.edge(N),M=y.edge(N);q.points=M.points,Object.hasOwn(M,"x")&&(q.x=M.x,q.y=M.y)}),v.graph().width=y.graph().width,v.graph().height=y.graph().height}let c=["nodesep","edgesep","ranksep","marginx","marginy"],g={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},p=["acyclicer","ranker","rankdir","align"],O=["width","height","rank"],C={width:0,height:0},I=["minlen","weight","width","height","labeloffset"],j={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},L=["labelpos"];function h(v){let y=new d({multigraph:!0,compound:!0}),N=$(v.graph());return y.setGraph(Object.assign({},g,Q(N,c),t.pick(N,p))),v.nodes().forEach(q=>{let M=$(v.node(q));const P=Q(M,O);Object.keys(C).forEach(G=>{P[G]===void 0&&(P[G]=C[G])}),y.setNode(q,P),y.setParent(q,v.parent(q))}),v.edges().forEach(q=>{let M=$(v.edge(q));y.setEdge(q,Object.assign({},j,Q(M,I),t.pick(M,L)))}),y}function b(v){let y=v.graph();y.ranksep/=2,v.edges().forEach(N=>{let q=v.edge(N);q.minlen*=2,q.labelpos.toLowerCase()!=="c"&&(y.rankdir==="TB"||y.rankdir==="BT"?q.width+=q.labeloffset:q.height+=q.labeloffset)})}function E(v){v.edges().forEach(y=>{let N=v.edge(y);if(N.width&&N.height){let q=v.node(y.v),P={rank:(v.node(y.w).rank-q.rank)/2+q.rank,e:y};t.addDummyNode(v,"edge-proxy",P,"_ep")}})}function k(v){let y=0;v.nodes().forEach(N=>{let q=v.node(N);q.borderTop&&(q.minRank=v.node(q.borderTop).rank,q.maxRank=v.node(q.borderBottom).rank,y=Math.max(y,q.maxRank))}),v.graph().maxRank=y}function R(v){v.nodes().forEach(y=>{let N=v.node(y);N.dummy==="edge-proxy"&&(v.edge(N.e).labelRank=N.rank,v.removeNode(y))})}function T(v){let y=Number.POSITIVE_INFINITY,N=0,q=Number.POSITIVE_INFINITY,M=0,P=v.graph(),G=P.marginx||0,B=P.marginy||0;function ze(W){let V=W.x,H=W.y,Ue=W.width,He=W.height;y=Math.min(y,V-Ue/2),N=Math.max(N,V+Ue/2),q=Math.min(q,H-He/2),M=Math.max(M,H+He/2)}v.nodes().forEach(W=>ze(v.node(W))),v.edges().forEach(W=>{let V=v.edge(W);Object.hasOwn(V,"x")&&ze(V)}),y-=G,q-=B,v.nodes().forEach(W=>{let V=v.node(W);V.x-=y,V.y-=q}),v.edges().forEach(W=>{let V=v.edge(W);V.points.forEach(H=>{H.x-=y,H.y-=q}),Object.hasOwn(V,"x")&&(V.x-=y),Object.hasOwn(V,"y")&&(V.y-=q)}),P.width=N-y+G,P.height=M-q+B}function S(v){v.edges().forEach(y=>{let N=v.edge(y),q=v.node(y.v),M=v.node(y.w),P,G;N.points?(P=N.points[0],G=N.points[N.points.length-1]):(N.points=[],P=M,G=q),N.points.unshift(t.intersectRect(q,P)),N.points.push(t.intersectRect(M,G))})}function D(v){v.edges().forEach(y=>{let N=v.edge(y);if(Object.hasOwn(N,"x"))switch((N.labelpos==="l"||N.labelpos==="r")&&(N.width-=N.labeloffset),N.labelpos){case"l":N.x-=N.width/2+N.labeloffset;break;case"r":N.x+=N.width/2+N.labeloffset;break}})}function z(v){v.edges().forEach(y=>{let N=v.edge(y);N.reversed&&N.points.reverse()})}function U(v){v.nodes().forEach(y=>{if(v.children(y).length){let N=v.node(y),q=v.node(N.borderTop),M=v.node(N.borderBottom),P=v.node(N.borderLeft[N.borderLeft.length-1]),G=v.node(N.borderRight[N.borderRight.length-1]);N.width=Math.abs(G.x-P.x),N.height=Math.abs(M.y-q.y),N.x=P.x+N.width/2,N.y=q.y+N.height/2}}),v.nodes().forEach(y=>{v.node(y).dummy==="border"&&v.removeNode(y)})}function Hr(v){v.edges().forEach(y=>{if(y.v===y.w){var N=v.node(y.v);N.selfEdges||(N.selfEdges=[]),N.selfEdges.push({e:y,label:v.edge(y)}),v.removeEdge(y)}})}function Xr(v){var y=t.buildLayerMatrix(v);y.forEach(N=>{var q=0;N.forEach((M,P)=>{var G=v.node(M);G.order=P+q,(G.selfEdges||[]).forEach(B=>{t.addDummyNode(v,"selfedge",{width:B.label.width,height:B.label.height,rank:G.rank,order:P+ ++q,e:B.e,label:B.label},"_se")}),delete G.selfEdges})})}function Qr(v){v.nodes().forEach(y=>{var N=v.node(y);if(N.dummy==="selfedge"){var q=v.node(N.e.v),M=q.x+q.width/2,P=q.y,G=N.x-M,B=q.height/2;v.setEdge(N.e,N.label),v.removeNode(y),N.label.points=[{x:M+2*G/3,y:P-B},{x:M+5*G/6,y:P-B},{x:M+G,y:P},{x:M+5*G/6,y:P+B},{x:M+2*G/3,y:P+B}],N.label.x=N.x,N.label.y=N.y}})}function Q(v,y){return t.mapValues(t.pick(v,y),Number)}function $(v){var y={};return v&&Object.entries(v).forEach(([N,q])=>{typeof N=="string"&&(N=N.toLowerCase()),y[N]=q}),y}return Ae}var Ve,Gr;function Tt(){if(Gr)return Ve;Gr=1;let _=A(),m=Y().Graph;Ve={debugOrdering:f};function f(u){let a=_.buildLayerMatrix(u),i=new m({compound:!0,multigraph:!0}).setGraph({});return u.nodes().forEach(e=>{i.setNode(e,{label:e}),i.setParent(e,"layer"+u.node(e).rank)}),u.edges().forEach(e=>i.setEdge(e.v,e.w,{},e.name)),a.forEach((e,s)=>{let n="layer"+s;i.setNode(n,{rank:"same"}),e.reduce((o,r)=>(i.setEdge(o,r,{style:"invis"}),r))}),i}return Ve}var Be,Fr;function St(){return Fr||(Fr=1,Be="1.1.8"),Be}var We,Ar;function Mt(){return Ar||(Ar=1,We={graphlib:Y(),layout:Lt(),debug:Tt(),util:{time:A().time,notime:A().notime},version:St()}),We}var Pt=Mt();const Ft=Kr(Pt);export{Ft as d};
1
+ var $r=Object.defineProperty;var Jr=(_,m,f)=>m in _?$r(_,m,{enumerable:!0,configurable:!0,writable:!0,value:f}):_[m]=f;var F=(_,m,f)=>Jr(_,typeof m!="symbol"?m+"":m,f);import{g as Kr}from"./index-D_SBClB-.js";var J,Xe;function Ye(){if(Xe)return J;Xe=1;var _="\0",m="\0",f="";class u{constructor(r){F(this,"_isDirected",!0);F(this,"_isMultigraph",!1);F(this,"_isCompound",!1);F(this,"_label");F(this,"_defaultNodeLabelFn",()=>{});F(this,"_defaultEdgeLabelFn",()=>{});F(this,"_nodes",{});F(this,"_in",{});F(this,"_preds",{});F(this,"_out",{});F(this,"_sucs",{});F(this,"_edgeObjs",{});F(this,"_edgeLabels",{});F(this,"_nodeCount",0);F(this,"_edgeCount",0);F(this,"_parent");F(this,"_children");r&&(this._isDirected=Object.hasOwn(r,"directed")?r.directed:!0,this._isMultigraph=Object.hasOwn(r,"multigraph")?r.multigraph:!1,this._isCompound=Object.hasOwn(r,"compound")?r.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[m]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(r){return this._label=r,this}graph(){return this._label}setDefaultNodeLabel(r){return this._defaultNodeLabelFn=r,typeof r!="function"&&(this._defaultNodeLabelFn=()=>r),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var r=this;return this.nodes().filter(t=>Object.keys(r._in[t]).length===0)}sinks(){var r=this;return this.nodes().filter(t=>Object.keys(r._out[t]).length===0)}setNodes(r,t){var d=arguments,l=this;return r.forEach(function(w){d.length>1?l.setNode(w,t):l.setNode(w)}),this}setNode(r,t){return Object.hasOwn(this._nodes,r)?(arguments.length>1&&(this._nodes[r]=t),this):(this._nodes[r]=arguments.length>1?t:this._defaultNodeLabelFn(r),this._isCompound&&(this._parent[r]=m,this._children[r]={},this._children[m][r]=!0),this._in[r]={},this._preds[r]={},this._out[r]={},this._sucs[r]={},++this._nodeCount,this)}node(r){return this._nodes[r]}hasNode(r){return Object.hasOwn(this._nodes,r)}removeNode(r){var t=this;if(Object.hasOwn(this._nodes,r)){var d=l=>t.removeEdge(t._edgeObjs[l]);delete this._nodes[r],this._isCompound&&(this._removeFromParentsChildList(r),delete this._parent[r],this.children(r).forEach(function(l){t.setParent(l)}),delete this._children[r]),Object.keys(this._in[r]).forEach(d),delete this._in[r],delete this._preds[r],Object.keys(this._out[r]).forEach(d),delete this._out[r],delete this._sucs[r],--this._nodeCount}return this}setParent(r,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(t===void 0)t=m;else{t+="";for(var d=t;d!==void 0;d=this.parent(d))if(d===r)throw new Error("Setting "+t+" as parent of "+r+" would create a cycle");this.setNode(t)}return this.setNode(r),this._removeFromParentsChildList(r),this._parent[r]=t,this._children[t][r]=!0,this}_removeFromParentsChildList(r){delete this._children[this._parent[r]][r]}parent(r){if(this._isCompound){var t=this._parent[r];if(t!==m)return t}}children(r=m){if(this._isCompound){var t=this._children[r];if(t)return Object.keys(t)}else{if(r===m)return this.nodes();if(this.hasNode(r))return[]}}predecessors(r){var t=this._preds[r];if(t)return Object.keys(t)}successors(r){var t=this._sucs[r];if(t)return Object.keys(t)}neighbors(r){var t=this.predecessors(r);if(t){const l=new Set(t);for(var d of this.successors(r))l.add(d);return Array.from(l.values())}}isLeaf(r){var t;return this.isDirected()?t=this.successors(r):t=this.neighbors(r),t.length===0}filterNodes(r){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var d=this;Object.entries(this._nodes).forEach(function([x,c]){r(x)&&t.setNode(x,c)}),Object.values(this._edgeObjs).forEach(function(x){t.hasNode(x.v)&&t.hasNode(x.w)&&t.setEdge(x,d.edge(x))});var l={};function w(x){var c=d.parent(x);return c===void 0||t.hasNode(c)?(l[x]=c,c):c in l?l[c]:w(c)}return this._isCompound&&t.nodes().forEach(x=>t.setParent(x,w(x))),t}setDefaultEdgeLabel(r){return this._defaultEdgeLabelFn=r,typeof r!="function"&&(this._defaultEdgeLabelFn=()=>r),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(r,t){var d=this,l=arguments;return r.reduce(function(w,x){return l.length>1?d.setEdge(w,x,t):d.setEdge(w,x),x}),this}setEdge(){var r,t,d,l,w=!1,x=arguments[0];typeof x=="object"&&x!==null&&"v"in x?(r=x.v,t=x.w,d=x.name,arguments.length===2&&(l=arguments[1],w=!0)):(r=x,t=arguments[1],d=arguments[3],arguments.length>2&&(l=arguments[2],w=!0)),r=""+r,t=""+t,d!==void 0&&(d=""+d);var c=e(this._isDirected,r,t,d);if(Object.hasOwn(this._edgeLabels,c))return w&&(this._edgeLabels[c]=l),this;if(d!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(r),this.setNode(t),this._edgeLabels[c]=w?l:this._defaultEdgeLabelFn(r,t,d);var g=s(this._isDirected,r,t,d);return r=g.v,t=g.w,Object.freeze(g),this._edgeObjs[c]=g,a(this._preds[t],r),a(this._sucs[r],t),this._in[t][c]=g,this._out[r][c]=g,this._edgeCount++,this}edge(r,t,d){var l=arguments.length===1?n(this._isDirected,arguments[0]):e(this._isDirected,r,t,d);return this._edgeLabels[l]}edgeAsObj(){const r=this.edge(...arguments);return typeof r!="object"?{label:r}:r}hasEdge(r,t,d){var l=arguments.length===1?n(this._isDirected,arguments[0]):e(this._isDirected,r,t,d);return Object.hasOwn(this._edgeLabels,l)}removeEdge(r,t,d){var l=arguments.length===1?n(this._isDirected,arguments[0]):e(this._isDirected,r,t,d),w=this._edgeObjs[l];return w&&(r=w.v,t=w.w,delete this._edgeLabels[l],delete this._edgeObjs[l],i(this._preds[t],r),i(this._sucs[r],t),delete this._in[t][l],delete this._out[r][l],this._edgeCount--),this}inEdges(r,t){var d=this._in[r];if(d){var l=Object.values(d);return t?l.filter(w=>w.v===t):l}}outEdges(r,t){var d=this._out[r];if(d){var l=Object.values(d);return t?l.filter(w=>w.w===t):l}}nodeEdges(r,t){var d=this.inEdges(r,t);if(d)return d.concat(this.outEdges(r,t))}}function a(o,r){o[r]?o[r]++:o[r]=1}function i(o,r){--o[r]||delete o[r]}function e(o,r,t,d){var l=""+r,w=""+t;if(!o&&l>w){var x=l;l=w,w=x}return l+f+w+f+(d===void 0?_:d)}function s(o,r,t,d){var l=""+r,w=""+t;if(!o&&l>w){var x=l;l=w,w=x}var c={v:l,w};return d&&(c.name=d),c}function n(o,r){return e(o,r.v,r.w,r.name)}return J=u,J}var K,Qe;function Zr(){return Qe||(Qe=1,K="2.2.4"),K}var Z,$e;function et(){return $e||($e=1,Z={Graph:Ye(),version:Zr()}),Z}var ee,Je;function rt(){if(Je)return ee;Je=1;var _=Ye();ee={write:m,read:a};function m(i){var e={options:{directed:i.isDirected(),multigraph:i.isMultigraph(),compound:i.isCompound()},nodes:f(i),edges:u(i)};return i.graph()!==void 0&&(e.value=structuredClone(i.graph())),e}function f(i){return i.nodes().map(function(e){var s=i.node(e),n=i.parent(e),o={v:e};return s!==void 0&&(o.value=s),n!==void 0&&(o.parent=n),o})}function u(i){return i.edges().map(function(e){var s=i.edge(e),n={v:e.v,w:e.w};return e.name!==void 0&&(n.name=e.name),s!==void 0&&(n.value=s),n})}function a(i){var e=new _(i.options).setGraph(i.value);return i.nodes.forEach(function(s){e.setNode(s.v,s.value),s.parent&&e.setParent(s.v,s.parent)}),i.edges.forEach(function(s){e.setEdge({v:s.v,w:s.w,name:s.name},s.value)}),e}return ee}var re,Ke;function tt(){if(Ke)return re;Ke=1,re=_;function _(m){var f={},u=[],a;function i(e){Object.hasOwn(f,e)||(f[e]=!0,a.push(e),m.successors(e).forEach(i),m.predecessors(e).forEach(i))}return m.nodes().forEach(function(e){a=[],i(e),a.length&&u.push(a)}),u}return re}var te,Ze;function Vr(){if(Ze)return te;Ze=1;class _{constructor(){F(this,"_arr",[]);F(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(f){return f.key})}has(f){return Object.hasOwn(this._keyIndices,f)}priority(f){var u=this._keyIndices[f];if(u!==void 0)return this._arr[u].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(f,u){var a=this._keyIndices;if(f=String(f),!Object.hasOwn(a,f)){var i=this._arr,e=i.length;return a[f]=e,i.push({key:f,priority:u}),this._decrease(e),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var f=this._arr.pop();return delete this._keyIndices[f.key],this._heapify(0),f.key}decrease(f,u){var a=this._keyIndices[f];if(u>this._arr[a].priority)throw new Error("New priority is greater than current priority. Key: "+f+" Old: "+this._arr[a].priority+" New: "+u);this._arr[a].priority=u,this._decrease(a)}_heapify(f){var u=this._arr,a=2*f,i=a+1,e=f;a<u.length&&(e=u[a].priority<u[e].priority?a:e,i<u.length&&(e=u[i].priority<u[e].priority?i:e),e!==f&&(this._swap(f,e),this._heapify(e)))}_decrease(f){for(var u=this._arr,a=u[f].priority,i;f!==0&&(i=f>>1,!(u[i].priority<a));)this._swap(f,i),f=i}_swap(f,u){var a=this._arr,i=this._keyIndices,e=a[f],s=a[u];a[f]=s,a[u]=e,i[s.key]=f,i[e.key]=u}}return te=_,te}var ne,er;function Br(){if(er)return ne;er=1;var _=Vr();ne=f;var m=()=>1;function f(a,i,e,s){return u(a,String(i),e||m,s||function(n){return a.outEdges(n)})}function u(a,i,e,s){var n={},o=new _,r,t,d=function(l){var w=l.v!==r?l.v:l.w,x=n[w],c=e(l),g=t.distance+c;if(c<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+l+" Weight: "+c);g<x.distance&&(x.distance=g,x.predecessor=r,o.decrease(w,g))};for(a.nodes().forEach(function(l){var w=l===i?0:Number.POSITIVE_INFINITY;n[l]={distance:w},o.add(l,w)});o.size()>0&&(r=o.removeMin(),t=n[r],t.distance!==Number.POSITIVE_INFINITY);)s(r).forEach(d);return n}return ne}var ie,rr;function nt(){if(rr)return ie;rr=1;var _=Br();ie=m;function m(f,u,a){return f.nodes().reduce(function(i,e){return i[e]=_(f,e,u,a),i},{})}return ie}var ae,tr;function Wr(){if(tr)return ae;tr=1,ae=_;function _(m){var f=0,u=[],a={},i=[];function e(s){var n=a[s]={onStack:!0,lowlink:f,index:f++};if(u.push(s),m.successors(s).forEach(function(t){Object.hasOwn(a,t)?a[t].onStack&&(n.lowlink=Math.min(n.lowlink,a[t].index)):(e(t),n.lowlink=Math.min(n.lowlink,a[t].lowlink))}),n.lowlink===n.index){var o=[],r;do r=u.pop(),a[r].onStack=!1,o.push(r);while(s!==r);i.push(o)}}return m.nodes().forEach(function(s){Object.hasOwn(a,s)||e(s)}),i}return ae}var se,nr;function it(){if(nr)return se;nr=1;var _=Wr();se=m;function m(f){return _(f).filter(function(u){return u.length>1||u.length===1&&f.hasEdge(u[0],u[0])})}return se}var oe,ir;function at(){if(ir)return oe;ir=1,oe=m;var _=()=>1;function m(u,a,i){return f(u,a||_,i||function(e){return u.outEdges(e)})}function f(u,a,i){var e={},s=u.nodes();return s.forEach(function(n){e[n]={},e[n][n]={distance:0},s.forEach(function(o){n!==o&&(e[n][o]={distance:Number.POSITIVE_INFINITY})}),i(n).forEach(function(o){var r=o.v===n?o.w:o.v,t=a(o);e[n][r]={distance:t,predecessor:n}})}),s.forEach(function(n){var o=e[n];s.forEach(function(r){var t=e[r];s.forEach(function(d){var l=t[n],w=o[d],x=t[d],c=l.distance+w.distance;c<x.distance&&(x.distance=c,x.predecessor=w.predecessor)})})}),e}return oe}var ue,ar;function Yr(){if(ar)return ue;ar=1;function _(f){var u={},a={},i=[];function e(s){if(Object.hasOwn(a,s))throw new m;Object.hasOwn(u,s)||(a[s]=!0,u[s]=!0,f.predecessors(s).forEach(e),delete a[s],i.push(s))}if(f.sinks().forEach(e),Object.keys(u).length!==f.nodeCount())throw new m;return i}class m extends Error{constructor(){super(...arguments)}}return ue=_,_.CycleException=m,ue}var de,sr;function st(){if(sr)return de;sr=1;var _=Yr();de=m;function m(f){try{_(f)}catch(u){if(u instanceof _.CycleException)return!1;throw u}return!0}return de}var le,or;function zr(){if(or)return le;or=1,le=_;function _(a,i,e){Array.isArray(i)||(i=[i]);var s=a.isDirected()?t=>a.successors(t):t=>a.neighbors(t),n=e==="post"?m:f,o=[],r={};return i.forEach(t=>{if(!a.hasNode(t))throw new Error("Graph does not have node: "+t);n(t,s,r,o)}),o}function m(a,i,e,s){for(var n=[[a,!1]];n.length>0;){var o=n.pop();o[1]?s.push(o[0]):Object.hasOwn(e,o[0])||(e[o[0]]=!0,n.push([o[0],!0]),u(i(o[0]),r=>n.push([r,!1])))}}function f(a,i,e,s){for(var n=[a];n.length>0;){var o=n.pop();Object.hasOwn(e,o)||(e[o]=!0,s.push(o),u(i(o),r=>n.push(r)))}}function u(a,i){for(var e=a.length;e--;)i(a[e],e,a);return a}return le}var he,ur;function ot(){if(ur)return he;ur=1;var _=zr();he=m;function m(f,u){return _(f,u,"post")}return he}var fe,dr;function ut(){if(dr)return fe;dr=1;var _=zr();fe=m;function m(f,u){return _(f,u,"pre")}return fe}var ce,lr;function dt(){if(lr)return ce;lr=1;var _=Ye(),m=Vr();ce=f;function f(u,a){var i=new _,e={},s=new m,n;function o(t){var d=t.v===n?t.w:t.v,l=s.priority(d);if(l!==void 0){var w=a(t);w<l&&(e[d]=n,s.decrease(d,w))}}if(u.nodeCount()===0)return i;u.nodes().forEach(function(t){s.add(t,Number.POSITIVE_INFINITY),i.setNode(t)}),s.decrease(u.nodes()[0],0);for(var r=!1;s.size()>0;){if(n=s.removeMin(),Object.hasOwn(e,n))i.setEdge(n,e[n]);else{if(r)throw new Error("Input graph is not connected: "+u);r=!0}u.nodeEdges(n).forEach(o)}return i}return ce}var pe,hr;function lt(){return hr||(hr=1,pe={components:tt(),dijkstra:Br(),dijkstraAll:nt(),findCycles:it(),floydWarshall:at(),isAcyclic:st(),postorder:ot(),preorder:ut(),prim:dt(),tarjan:Wr(),topsort:Yr()}),pe}var me,fr;function Y(){if(fr)return me;fr=1;var _=et();return me={Graph:_.Graph,json:rt(),alg:lt(),version:_.version},me}var be,cr;function ht(){if(cr)return be;cr=1;class _{constructor(){let a={};a._next=a._prev=a,this._sentinel=a}dequeue(){let a=this._sentinel,i=a._prev;if(i!==a)return m(i),i}enqueue(a){let i=this._sentinel;a._prev&&a._next&&m(a),a._next=i._next,i._next._prev=a,i._next=a,a._prev=i}toString(){let a=[],i=this._sentinel,e=i._prev;for(;e!==i;)a.push(JSON.stringify(e,f)),e=e._prev;return"["+a.join(", ")+"]"}}function m(u){u._prev._next=u._next,u._next._prev=u._prev,delete u._next,delete u._prev}function f(u,a){if(u!=="_next"&&u!=="_prev")return a}return be=_,be}var ve,pr;function ft(){if(pr)return ve;pr=1;let _=Y().Graph,m=ht();ve=u;let f=()=>1;function u(o,r){if(o.nodeCount()<=1)return[];let t=e(o,r||f);return a(t.graph,t.buckets,t.zeroIdx).flatMap(l=>o.outEdges(l.v,l.w))}function a(o,r,t){let d=[],l=r[r.length-1],w=r[0],x;for(;o.nodeCount();){for(;x=w.dequeue();)i(o,r,t,x);for(;x=l.dequeue();)i(o,r,t,x);if(o.nodeCount()){for(let c=r.length-2;c>0;--c)if(x=r[c].dequeue(),x){d=d.concat(i(o,r,t,x,!0));break}}}return d}function i(o,r,t,d,l){let w=l?[]:void 0;return o.inEdges(d.v).forEach(x=>{let c=o.edge(x),g=o.node(x.v);l&&w.push({v:x.v,w:x.w}),g.out-=c,s(r,t,g)}),o.outEdges(d.v).forEach(x=>{let c=o.edge(x),g=x.w,p=o.node(g);p.in-=c,s(r,t,p)}),o.removeNode(d.v),w}function e(o,r){let t=new _,d=0,l=0;o.nodes().forEach(c=>{t.setNode(c,{v:c,in:0,out:0})}),o.edges().forEach(c=>{let g=t.edge(c.v,c.w)||0,p=r(c),O=g+p;t.setEdge(c.v,c.w,O),l=Math.max(l,t.node(c.v).out+=p),d=Math.max(d,t.node(c.w).in+=p)});let w=n(l+d+3).map(()=>new m),x=d+1;return t.nodes().forEach(c=>{s(w,x,t.node(c))}),{graph:t,buckets:w,zeroIdx:x}}function s(o,r,t){t.out?t.in?o[t.out-t.in+r].enqueue(t):o[o.length-1].enqueue(t):o[0].enqueue(t)}function n(o){const r=[];for(let t=0;t<o;t++)r.push(t);return r}return ve}var we,mr;function A(){if(mr)return we;mr=1;let _=Y().Graph;we={addBorderNode:r,addDummyNode:m,applyWithChunking:l,asNonCompoundGraph:u,buildLayerMatrix:s,intersectRect:e,mapValues:j,maxRank:w,normalizeRanks:n,notime:g,partition:x,pick:I,predecessorWeights:i,range:C,removeEmptyRanks:o,simplify:f,successorWeights:a,time:c,uniqueId:O,zipObject:L};function m(h,b,E,k){for(var R=k;h.hasNode(R);)R=O(k);return E.dummy=b,h.setNode(R,E),R}function f(h){let b=new _().setGraph(h.graph());return h.nodes().forEach(E=>b.setNode(E,h.node(E))),h.edges().forEach(E=>{let k=b.edge(E.v,E.w)||{weight:0,minlen:1},R=h.edge(E);b.setEdge(E.v,E.w,{weight:k.weight+R.weight,minlen:Math.max(k.minlen,R.minlen)})}),b}function u(h){let b=new _({multigraph:h.isMultigraph()}).setGraph(h.graph());return h.nodes().forEach(E=>{h.children(E).length||b.setNode(E,h.node(E))}),h.edges().forEach(E=>{b.setEdge(E,h.edge(E))}),b}function a(h){let b=h.nodes().map(E=>{let k={};return h.outEdges(E).forEach(R=>{k[R.w]=(k[R.w]||0)+h.edge(R).weight}),k});return L(h.nodes(),b)}function i(h){let b=h.nodes().map(E=>{let k={};return h.inEdges(E).forEach(R=>{k[R.v]=(k[R.v]||0)+h.edge(R).weight}),k});return L(h.nodes(),b)}function e(h,b){let E=h.x,k=h.y,R=b.x-E,T=b.y-k,S=h.width/2,D=h.height/2;if(!R&&!T)throw new Error("Not possible to find intersection inside of the rectangle");let z,U;return Math.abs(T)*S>Math.abs(R)*D?(T<0&&(D=-D),z=D*R/T,U=D):(R<0&&(S=-S),z=S,U=S*T/R),{x:E+z,y:k+U}}function s(h){let b=C(w(h)+1).map(()=>[]);return h.nodes().forEach(E=>{let k=h.node(E),R=k.rank;R!==void 0&&(b[R][k.order]=E)}),b}function n(h){let b=h.nodes().map(k=>{let R=h.node(k).rank;return R===void 0?Number.MAX_VALUE:R}),E=l(Math.min,b);h.nodes().forEach(k=>{let R=h.node(k);Object.hasOwn(R,"rank")&&(R.rank-=E)})}function o(h){let b=h.nodes().map(S=>h.node(S).rank),E=l(Math.min,b),k=[];h.nodes().forEach(S=>{let D=h.node(S).rank-E;k[D]||(k[D]=[]),k[D].push(S)});let R=0,T=h.graph().nodeRankFactor;Array.from(k).forEach((S,D)=>{S===void 0&&D%T!==0?--R:S!==void 0&&R&&S.forEach(z=>h.node(z).rank+=R)})}function r(h,b,E,k){let R={width:0,height:0};return arguments.length>=4&&(R.rank=E,R.order=k),m(h,"border",R,b)}function t(h,b=d){const E=[];for(let k=0;k<h.length;k+=b){const R=h.slice(k,k+b);E.push(R)}return E}const d=65535;function l(h,b){if(b.length>d){const E=t(b);return h.apply(null,E.map(k=>h.apply(null,k)))}else return h.apply(null,b)}function w(h){const E=h.nodes().map(k=>{let R=h.node(k).rank;return R===void 0?Number.MIN_VALUE:R});return l(Math.max,E)}function x(h,b){let E={lhs:[],rhs:[]};return h.forEach(k=>{b(k)?E.lhs.push(k):E.rhs.push(k)}),E}function c(h,b){let E=Date.now();try{return b()}finally{console.log(h+" time: "+(Date.now()-E)+"ms")}}function g(h,b){return b()}let p=0;function O(h){var b=++p;return h+(""+b)}function C(h,b,E=1){b==null&&(b=h,h=0);let k=T=>T<b;E<0&&(k=T=>b<T);const R=[];for(let T=h;k(T);T+=E)R.push(T);return R}function I(h,b){const E={};for(const k of b)h[k]!==void 0&&(E[k]=h[k]);return E}function j(h,b){let E=b;return typeof b=="string"&&(E=k=>k[b]),Object.entries(h).reduce((k,[R,T])=>(k[R]=E(T,R),k),{})}function L(h,b){return h.reduce((E,k,R)=>(E[k]=b[R],E),{})}return we}var ge,br;function ct(){if(br)return ge;br=1;let _=ft(),m=A().uniqueId;ge={run:f,undo:a};function f(i){(i.graph().acyclicer==="greedy"?_(i,s(i)):u(i)).forEach(n=>{let o=i.edge(n);i.removeEdge(n),o.forwardName=n.name,o.reversed=!0,i.setEdge(n.w,n.v,o,m("rev"))});function s(n){return o=>n.edge(o).weight}}function u(i){let e=[],s={},n={};function o(r){Object.hasOwn(n,r)||(n[r]=!0,s[r]=!0,i.outEdges(r).forEach(t=>{Object.hasOwn(s,t.w)?e.push(t):o(t.w)}),delete s[r])}return i.nodes().forEach(o),e}function a(i){i.edges().forEach(e=>{let s=i.edge(e);if(s.reversed){i.removeEdge(e);let n=s.forwardName;delete s.reversed,delete s.forwardName,i.setEdge(e.w,e.v,s,n)}})}return ge}var Ee,vr;function pt(){if(vr)return Ee;vr=1;let _=A();Ee={run:m,undo:u};function m(a){a.graph().dummyChains=[],a.edges().forEach(i=>f(a,i))}function f(a,i){let e=i.v,s=a.node(e).rank,n=i.w,o=a.node(n).rank,r=i.name,t=a.edge(i),d=t.labelRank;if(o===s+1)return;a.removeEdge(i);let l,w,x;for(x=0,++s;s<o;++x,++s)t.points=[],w={width:0,height:0,edgeLabel:t,edgeObj:i,rank:s},l=_.addDummyNode(a,"edge",w,"_d"),s===d&&(w.width=t.width,w.height=t.height,w.dummy="edge-label",w.labelpos=t.labelpos),a.setEdge(e,l,{weight:t.weight},r),x===0&&a.graph().dummyChains.push(l),e=l;a.setEdge(e,n,{weight:t.weight},r)}function u(a){a.graph().dummyChains.forEach(i=>{let e=a.node(i),s=e.edgeLabel,n;for(a.setEdge(e.edgeObj,s);e.dummy;)n=a.successors(i)[0],a.removeNode(i),s.points.push({x:e.x,y:e.y}),e.dummy==="edge-label"&&(s.x=e.x,s.y=e.y,s.width=e.width,s.height=e.height),i=n,e=a.node(i)})}return Ee}var _e,wr;function X(){if(wr)return _e;wr=1;const{applyWithChunking:_}=A();_e={longestPath:m,slack:f};function m(u){var a={};function i(e){var s=u.node(e);if(Object.hasOwn(a,e))return s.rank;a[e]=!0;let n=u.outEdges(e).map(r=>r==null?Number.POSITIVE_INFINITY:i(r.w)-u.edge(r).minlen);var o=_(Math.min,n);return o===Number.POSITIVE_INFINITY&&(o=0),s.rank=o}u.sources().forEach(i)}function f(u,a){return u.node(a.w).rank-u.node(a.v).rank-u.edge(a).minlen}return _e}var ye,gr;function Ur(){if(gr)return ye;gr=1;var _=Y().Graph,m=X().slack;ye=f;function f(e){var s=new _({directed:!1}),n=e.nodes()[0],o=e.nodeCount();s.setNode(n,{});for(var r,t;u(s,e)<o;)r=a(s,e),t=s.hasNode(r.v)?m(e,r):-m(e,r),i(s,e,t);return s}function u(e,s){function n(o){s.nodeEdges(o).forEach(r=>{var t=r.v,d=o===t?r.w:t;!e.hasNode(d)&&!m(s,r)&&(e.setNode(d,{}),e.setEdge(o,d,{}),n(d))})}return e.nodes().forEach(n),e.nodeCount()}function a(e,s){return s.edges().reduce((o,r)=>{let t=Number.POSITIVE_INFINITY;return e.hasNode(r.v)!==e.hasNode(r.w)&&(t=m(s,r)),t<o[0]?[t,r]:o},[Number.POSITIVE_INFINITY,null])[1]}function i(e,s,n){e.nodes().forEach(o=>s.node(o).rank+=n)}return ye}var ke,Er;function mt(){if(Er)return ke;Er=1;var _=Ur(),m=X().slack,f=X().longestPath,u=Y().alg.preorder,a=Y().alg.postorder,i=A().simplify;ke=e,e.initLowLimValues=r,e.initCutValues=s,e.calcCutValue=o,e.leaveEdge=d,e.enterEdge=l,e.exchangeEdges=w;function e(p){p=i(p),f(p);var O=_(p);r(O),s(O,p);for(var C,I;C=d(O);)I=l(O,p,C),w(O,p,C,I)}function s(p,O){var C=a(p,p.nodes());C=C.slice(0,C.length-1),C.forEach(I=>n(p,O,I))}function n(p,O,C){var I=p.node(C),j=I.parent;p.edge(C,j).cutvalue=o(p,O,C)}function o(p,O,C){var I=p.node(C),j=I.parent,L=!0,h=O.edge(C,j),b=0;return h||(L=!1,h=O.edge(j,C)),b=h.weight,O.nodeEdges(C).forEach(E=>{var k=E.v===C,R=k?E.w:E.v;if(R!==j){var T=k===L,S=O.edge(E).weight;if(b+=T?S:-S,c(p,C,R)){var D=p.edge(C,R).cutvalue;b+=T?-D:D}}}),b}function r(p,O){arguments.length<2&&(O=p.nodes()[0]),t(p,{},1,O)}function t(p,O,C,I,j){var L=C,h=p.node(I);return O[I]=!0,p.neighbors(I).forEach(b=>{Object.hasOwn(O,b)||(C=t(p,O,C,b,I))}),h.low=L,h.lim=C++,j?h.parent=j:delete h.parent,C}function d(p){return p.edges().find(O=>p.edge(O).cutvalue<0)}function l(p,O,C){var I=C.v,j=C.w;O.hasEdge(I,j)||(I=C.w,j=C.v);var L=p.node(I),h=p.node(j),b=L,E=!1;L.lim>h.lim&&(b=h,E=!0);var k=O.edges().filter(R=>E===g(p,p.node(R.v),b)&&E!==g(p,p.node(R.w),b));return k.reduce((R,T)=>m(O,T)<m(O,R)?T:R)}function w(p,O,C,I){var j=C.v,L=C.w;p.removeEdge(j,L),p.setEdge(I.v,I.w,{}),r(p),s(p,O),x(p,O)}function x(p,O){var C=p.nodes().find(j=>!O.node(j).parent),I=u(p,C);I=I.slice(1),I.forEach(j=>{var L=p.node(j).parent,h=O.edge(j,L),b=!1;h||(h=O.edge(L,j),b=!0),O.node(j).rank=O.node(L).rank+(b?h.minlen:-h.minlen)})}function c(p,O,C){return p.hasEdge(O,C)}function g(p,O,C){return C.low<=O.lim&&O.lim<=C.lim}return ke}var Oe,_r;function bt(){if(_r)return Oe;_r=1;var _=X(),m=_.longestPath,f=Ur(),u=mt();Oe=a;function a(n){var o=n.graph().ranker;if(o instanceof Function)return o(n);switch(n.graph().ranker){case"network-simplex":s(n);break;case"tight-tree":e(n);break;case"longest-path":i(n);break;case"none":break;default:s(n)}}var i=m;function e(n){m(n),f(n)}function s(n){u(n)}return Oe}var Ne,yr;function vt(){if(yr)return Ne;yr=1,Ne=_;function _(u){let a=f(u);u.graph().dummyChains.forEach(i=>{let e=u.node(i),s=e.edgeObj,n=m(u,a,s.v,s.w),o=n.path,r=n.lca,t=0,d=o[t],l=!0;for(;i!==s.w;){if(e=u.node(i),l){for(;(d=o[t])!==r&&u.node(d).maxRank<e.rank;)t++;d===r&&(l=!1)}if(!l){for(;t<o.length-1&&u.node(d=o[t+1]).minRank<=e.rank;)t++;d=o[t]}u.setParent(i,d),i=u.successors(i)[0]}})}function m(u,a,i,e){let s=[],n=[],o=Math.min(a[i].low,a[e].low),r=Math.max(a[i].lim,a[e].lim),t,d;t=i;do t=u.parent(t),s.push(t);while(t&&(a[t].low>o||r>a[t].lim));for(d=t,t=e;(t=u.parent(t))!==d;)n.push(t);return{path:s.concat(n.reverse()),lca:d}}function f(u){let a={},i=0;function e(s){let n=i;u.children(s).forEach(e),a[s]={low:n,lim:i++}}return u.children().forEach(e),a}return Ne}var Ce,kr;function wt(){if(kr)return Ce;kr=1;let _=A();Ce={run:m,cleanup:i};function m(e){let s=_.addDummyNode(e,"root",{},"_root"),n=u(e),o=Object.values(n),r=_.applyWithChunking(Math.max,o)-1,t=2*r+1;e.graph().nestingRoot=s,e.edges().forEach(l=>e.edge(l).minlen*=t);let d=a(e)+1;e.children().forEach(l=>f(e,s,t,d,r,n,l)),e.graph().nodeRankFactor=t}function f(e,s,n,o,r,t,d){let l=e.children(d);if(!l.length){d!==s&&e.setEdge(s,d,{weight:0,minlen:n});return}let w=_.addBorderNode(e,"_bt"),x=_.addBorderNode(e,"_bb"),c=e.node(d);e.setParent(w,d),c.borderTop=w,e.setParent(x,d),c.borderBottom=x,l.forEach(g=>{f(e,s,n,o,r,t,g);let p=e.node(g),O=p.borderTop?p.borderTop:g,C=p.borderBottom?p.borderBottom:g,I=p.borderTop?o:2*o,j=O!==C?1:r-t[d]+1;e.setEdge(w,O,{weight:I,minlen:j,nestingEdge:!0}),e.setEdge(C,x,{weight:I,minlen:j,nestingEdge:!0})}),e.parent(d)||e.setEdge(s,w,{weight:0,minlen:r+t[d]})}function u(e){var s={};function n(o,r){var t=e.children(o);t&&t.length&&t.forEach(d=>n(d,r+1)),s[o]=r}return e.children().forEach(o=>n(o,1)),s}function a(e){return e.edges().reduce((s,n)=>s+e.edge(n).weight,0)}function i(e){var s=e.graph();e.removeNode(s.nestingRoot),delete s.nestingRoot,e.edges().forEach(n=>{var o=e.edge(n);o.nestingEdge&&e.removeEdge(n)})}return Ce}var xe,Or;function gt(){if(Or)return xe;Or=1;let _=A();xe=m;function m(u){function a(i){let e=u.children(i),s=u.node(i);if(e.length&&e.forEach(a),Object.hasOwn(s,"minRank")){s.borderLeft=[],s.borderRight=[];for(let n=s.minRank,o=s.maxRank+1;n<o;++n)f(u,"borderLeft","_bl",i,s,n),f(u,"borderRight","_br",i,s,n)}}u.children().forEach(a)}function f(u,a,i,e,s,n){let o={width:0,height:0,rank:n,borderType:a},r=s[a][n-1],t=_.addDummyNode(u,"border",o,i);s[a][n]=t,u.setParent(t,e),r&&u.setEdge(r,t,{weight:1})}return xe}var Re,Nr;function Et(){if(Nr)return Re;Nr=1,Re={adjust:_,undo:m};function _(n){let o=n.graph().rankdir.toLowerCase();(o==="lr"||o==="rl")&&f(n)}function m(n){let o=n.graph().rankdir.toLowerCase();(o==="bt"||o==="rl")&&a(n),(o==="lr"||o==="rl")&&(e(n),f(n))}function f(n){n.nodes().forEach(o=>u(n.node(o))),n.edges().forEach(o=>u(n.edge(o)))}function u(n){let o=n.width;n.width=n.height,n.height=o}function a(n){n.nodes().forEach(o=>i(n.node(o))),n.edges().forEach(o=>{let r=n.edge(o);r.points.forEach(i),Object.hasOwn(r,"y")&&i(r)})}function i(n){n.y=-n.y}function e(n){n.nodes().forEach(o=>s(n.node(o))),n.edges().forEach(o=>{let r=n.edge(o);r.points.forEach(s),Object.hasOwn(r,"x")&&s(r)})}function s(n){let o=n.x;n.x=n.y,n.y=o}return Re}var Ie,Cr;function _t(){if(Cr)return Ie;Cr=1;let _=A();Ie=m;function m(f){let u={},a=f.nodes().filter(r=>!f.children(r).length),i=a.map(r=>f.node(r).rank),e=_.applyWithChunking(Math.max,i),s=_.range(e+1).map(()=>[]);function n(r){if(u[r])return;u[r]=!0;let t=f.node(r);s[t.rank].push(r),f.successors(r).forEach(n)}return a.sort((r,t)=>f.node(r).rank-f.node(t).rank).forEach(n),s}return Ie}var je,xr;function yt(){if(xr)return je;xr=1;let _=A().zipObject;je=m;function m(u,a){let i=0;for(let e=1;e<a.length;++e)i+=f(u,a[e-1],a[e]);return i}function f(u,a,i){let e=_(i,i.map((d,l)=>l)),s=a.flatMap(d=>u.outEdges(d).map(l=>({pos:e[l.w],weight:u.edge(l).weight})).sort((l,w)=>l.pos-w.pos)),n=1;for(;n<i.length;)n<<=1;let o=2*n-1;n-=1;let r=new Array(o).fill(0),t=0;return s.forEach(d=>{let l=d.pos+n;r[l]+=d.weight;let w=0;for(;l>0;)l%2&&(w+=r[l+1]),l=l-1>>1,r[l]+=d.weight;t+=d.weight*w}),t}return je}var qe,Rr;function kt(){if(Rr)return qe;Rr=1,qe=_;function _(m,f=[]){return f.map(u=>{let a=m.inEdges(u);if(a.length){let i=a.reduce((e,s)=>{let n=m.edge(s),o=m.node(s.v);return{sum:e.sum+n.weight*o.order,weight:e.weight+n.weight}},{sum:0,weight:0});return{v:u,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:u}})}return qe}var Le,Ir;function Ot(){if(Ir)return Le;Ir=1;let _=A();Le=m;function m(a,i){let e={};a.forEach((n,o)=>{let r=e[n.v]={indegree:0,in:[],out:[],vs:[n.v],i:o};n.barycenter!==void 0&&(r.barycenter=n.barycenter,r.weight=n.weight)}),i.edges().forEach(n=>{let o=e[n.v],r=e[n.w];o!==void 0&&r!==void 0&&(r.indegree++,o.out.push(e[n.w]))});let s=Object.values(e).filter(n=>!n.indegree);return f(s)}function f(a){let i=[];function e(n){return o=>{o.merged||(o.barycenter===void 0||n.barycenter===void 0||o.barycenter>=n.barycenter)&&u(n,o)}}function s(n){return o=>{o.in.push(n),--o.indegree===0&&a.push(o)}}for(;a.length;){let n=a.pop();i.push(n),n.in.reverse().forEach(e(n)),n.out.forEach(s(n))}return i.filter(n=>!n.merged).map(n=>_.pick(n,["vs","i","barycenter","weight"]))}function u(a,i){let e=0,s=0;a.weight&&(e+=a.barycenter*a.weight,s+=a.weight),i.weight&&(e+=i.barycenter*i.weight,s+=i.weight),a.vs=i.vs.concat(a.vs),a.barycenter=e/s,a.weight=s,a.i=Math.min(i.i,a.i),i.merged=!0}return Le}var Te,jr;function Nt(){if(jr)return Te;jr=1;let _=A();Te=m;function m(a,i){let e=_.partition(a,w=>Object.hasOwn(w,"barycenter")),s=e.lhs,n=e.rhs.sort((w,x)=>x.i-w.i),o=[],r=0,t=0,d=0;s.sort(u(!!i)),d=f(o,n,d),s.forEach(w=>{d+=w.vs.length,o.push(w.vs),r+=w.barycenter*w.weight,t+=w.weight,d=f(o,n,d)});let l={vs:o.flat(!0)};return t&&(l.barycenter=r/t,l.weight=t),l}function f(a,i,e){let s;for(;i.length&&(s=i[i.length-1]).i<=e;)i.pop(),a.push(s.vs),e++;return e}function u(a){return(i,e)=>i.barycenter<e.barycenter?-1:i.barycenter>e.barycenter?1:a?e.i-i.i:i.i-e.i}return Te}var Se,qr;function Ct(){if(qr)return Se;qr=1;let _=kt(),m=Ot(),f=Nt();Se=u;function u(e,s,n,o){let r=e.children(s),t=e.node(s),d=t?t.borderLeft:void 0,l=t?t.borderRight:void 0,w={};d&&(r=r.filter(p=>p!==d&&p!==l));let x=_(e,r);x.forEach(p=>{if(e.children(p.v).length){let O=u(e,p.v,n,o);w[p.v]=O,Object.hasOwn(O,"barycenter")&&i(p,O)}});let c=m(x,n);a(c,w);let g=f(c,o);if(d&&(g.vs=[d,g.vs,l].flat(!0),e.predecessors(d).length)){let p=e.node(e.predecessors(d)[0]),O=e.node(e.predecessors(l)[0]);Object.hasOwn(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+p.order+O.order)/(g.weight+2),g.weight+=2}return g}function a(e,s){e.forEach(n=>{n.vs=n.vs.flatMap(o=>s[o]?s[o].vs:o)})}function i(e,s){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+s.barycenter*s.weight)/(e.weight+s.weight),e.weight+=s.weight):(e.barycenter=s.barycenter,e.weight=s.weight)}return Se}var Me,Lr;function xt(){if(Lr)return Me;Lr=1;let _=Y().Graph,m=A();Me=f;function f(a,i,e,s){s||(s=a.nodes());let n=u(a),o=new _({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(r=>a.node(r));return s.forEach(r=>{let t=a.node(r),d=a.parent(r);(t.rank===i||t.minRank<=i&&i<=t.maxRank)&&(o.setNode(r),o.setParent(r,d||n),a[e](r).forEach(l=>{let w=l.v===r?l.w:l.v,x=o.edge(w,r),c=x!==void 0?x.weight:0;o.setEdge(w,r,{weight:a.edge(l).weight+c})}),Object.hasOwn(t,"minRank")&&o.setNode(r,{borderLeft:t.borderLeft[i],borderRight:t.borderRight[i]}))}),o}function u(a){for(var i;a.hasNode(i=m.uniqueId("_root")););return i}return Me}var Pe,Tr;function Rt(){if(Tr)return Pe;Tr=1,Pe=_;function _(m,f,u){let a={},i;u.forEach(e=>{let s=m.parent(e),n,o;for(;s;){if(n=m.parent(s),n?(o=a[n],a[n]=s):(o=i,i=s),o&&o!==s){f.setEdge(o,s);return}s=n}})}return Pe}var De,Sr;function It(){if(Sr)return De;Sr=1;let _=_t(),m=yt(),f=Ct(),u=xt(),a=Rt(),i=Y().Graph,e=A();De=s;function s(t,d){if(d&&typeof d.customOrder=="function"){d.customOrder(t,s);return}let l=e.maxRank(t),w=n(t,e.range(1,l+1),"inEdges"),x=n(t,e.range(l-1,-1,-1),"outEdges"),c=_(t);if(r(t,c),d&&d.disableOptimalOrderHeuristic)return;let g=Number.POSITIVE_INFINITY,p;for(let O=0,C=0;C<4;++O,++C){o(O%2?w:x,O%4>=2),c=e.buildLayerMatrix(t);let I=m(t,c);I<g&&(C=0,p=Object.assign({},c),g=I)}r(t,p)}function n(t,d,l){const w=new Map,x=(c,g)=>{w.has(c)||w.set(c,[]),w.get(c).push(g)};for(const c of t.nodes()){const g=t.node(c);if(typeof g.rank=="number"&&x(g.rank,c),typeof g.minRank=="number"&&typeof g.maxRank=="number")for(let p=g.minRank;p<=g.maxRank;p++)p!==g.rank&&x(p,c)}return d.map(function(c){return u(t,c,l,w.get(c)||[])})}function o(t,d){let l=new i;t.forEach(function(w){let x=w.graph().root,c=f(w,x,l,d);c.vs.forEach((g,p)=>w.node(g).order=p),a(w,l,c.vs)})}function r(t,d){Object.values(d).forEach(l=>l.forEach((w,x)=>t.node(w).order=x))}return De}var Ge,Mr;function jt(){if(Mr)return Ge;Mr=1;let _=Y().Graph,m=A();Ge={positionX:l,findType1Conflicts:f,findType2Conflicts:u,addConflict:i,hasConflict:e,verticalAlignment:s,horizontalCompaction:n,alignCoordinates:t,findSmallestWidthAlignment:r,balance:d};function f(c,g){let p={};function O(C,I){let j=0,L=0,h=C.length,b=I[I.length-1];return I.forEach((E,k)=>{let R=a(c,E),T=R?c.node(R).order:h;(R||E===b)&&(I.slice(L,k+1).forEach(S=>{c.predecessors(S).forEach(D=>{let z=c.node(D),U=z.order;(U<j||T<U)&&!(z.dummy&&c.node(S).dummy)&&i(p,D,S)})}),L=k+1,j=T)}),I}return g.length&&g.reduce(O),p}function u(c,g){let p={};function O(I,j,L,h,b){let E;m.range(j,L).forEach(k=>{E=I[k],c.node(E).dummy&&c.predecessors(E).forEach(R=>{let T=c.node(R);T.dummy&&(T.order<h||T.order>b)&&i(p,R,E)})})}function C(I,j){let L=-1,h,b=0;return j.forEach((E,k)=>{if(c.node(E).dummy==="border"){let R=c.predecessors(E);R.length&&(h=c.node(R[0]).order,O(j,b,k,L,h),b=k,L=h)}O(j,b,j.length,h,I.length)}),j}return g.length&&g.reduce(C),p}function a(c,g){if(c.node(g).dummy)return c.predecessors(g).find(p=>c.node(p).dummy)}function i(c,g,p){if(g>p){let C=g;g=p,p=C}let O=c[g];O||(c[g]=O={}),O[p]=!0}function e(c,g,p){if(g>p){let O=g;g=p,p=O}return!!c[g]&&Object.hasOwn(c[g],p)}function s(c,g,p,O){let C={},I={},j={};return g.forEach(L=>{L.forEach((h,b)=>{C[h]=h,I[h]=h,j[h]=b})}),g.forEach(L=>{let h=-1;L.forEach(b=>{let E=O(b);if(E.length){E=E.sort((R,T)=>j[R]-j[T]);let k=(E.length-1)/2;for(let R=Math.floor(k),T=Math.ceil(k);R<=T;++R){let S=E[R];I[b]===b&&h<j[S]&&!e(p,b,S)&&(I[S]=b,I[b]=C[b]=C[S],h=j[S])}}})}),{root:C,align:I}}function n(c,g,p,O,C){let I={},j=o(c,g,p,C),L=C?"borderLeft":"borderRight";function h(k,R){let T=j.nodes(),S=T.pop(),D={};for(;S;)D[S]?k(S):(D[S]=!0,T.push(S),T=T.concat(R(S))),S=T.pop()}function b(k){I[k]=j.inEdges(k).reduce((R,T)=>Math.max(R,I[T.v]+j.edge(T)),0)}function E(k){let R=j.outEdges(k).reduce((S,D)=>Math.min(S,I[D.w]-j.edge(D)),Number.POSITIVE_INFINITY),T=c.node(k);R!==Number.POSITIVE_INFINITY&&T.borderType!==L&&(I[k]=Math.max(I[k],R))}return h(b,j.predecessors.bind(j)),h(E,j.successors.bind(j)),Object.keys(O).forEach(k=>I[k]=I[p[k]]),I}function o(c,g,p,O){let C=new _,I=c.graph(),j=w(I.nodesep,I.edgesep,O);return g.forEach(L=>{let h;L.forEach(b=>{let E=p[b];if(C.setNode(E),h){var k=p[h],R=C.edge(k,E);C.setEdge(k,E,Math.max(j(c,b,h),R||0))}h=b})}),C}function r(c,g){return Object.values(g).reduce((p,O)=>{let C=Number.NEGATIVE_INFINITY,I=Number.POSITIVE_INFINITY;Object.entries(O).forEach(([L,h])=>{let b=x(c,L)/2;C=Math.max(h+b,C),I=Math.min(h-b,I)});const j=C-I;return j<p[0]&&(p=[j,O]),p},[Number.POSITIVE_INFINITY,null])[1]}function t(c,g){let p=Object.values(g),O=m.applyWithChunking(Math.min,p),C=m.applyWithChunking(Math.max,p);["u","d"].forEach(I=>{["l","r"].forEach(j=>{let L=I+j,h=c[L];if(h===g)return;let b=Object.values(h),E=O-m.applyWithChunking(Math.min,b);j!=="l"&&(E=C-m.applyWithChunking(Math.max,b)),E&&(c[L]=m.mapValues(h,k=>k+E))})})}function d(c,g){return m.mapValues(c.ul,(p,O)=>{if(g)return c[g.toLowerCase()][O];{let C=Object.values(c).map(I=>I[O]).sort((I,j)=>I-j);return(C[1]+C[2])/2}})}function l(c){let g=m.buildLayerMatrix(c),p=Object.assign(f(c,g),u(c,g)),O={},C;["u","d"].forEach(j=>{C=j==="u"?g:Object.values(g).reverse(),["l","r"].forEach(L=>{L==="r"&&(C=C.map(k=>Object.values(k).reverse()));let h=(j==="u"?c.predecessors:c.successors).bind(c),b=s(c,C,p,h),E=n(c,C,b.root,b.align,L==="r");L==="r"&&(E=m.mapValues(E,k=>-k)),O[j+L]=E})});let I=r(c,O);return t(O,I),d(O,c.graph().align)}function w(c,g,p){return(O,C,I)=>{let j=O.node(C),L=O.node(I),h=0,b;if(h+=j.width/2,Object.hasOwn(j,"labelpos"))switch(j.labelpos.toLowerCase()){case"l":b=-j.width/2;break;case"r":b=j.width/2;break}if(b&&(h+=p?b:-b),b=0,h+=(j.dummy?g:c)/2,h+=(L.dummy?g:c)/2,h+=L.width/2,Object.hasOwn(L,"labelpos"))switch(L.labelpos.toLowerCase()){case"l":b=L.width/2;break;case"r":b=-L.width/2;break}return b&&(h+=p?b:-b),b=0,h}}function x(c,g){return c.node(g).width}return Ge}var Fe,Pr;function qt(){if(Pr)return Fe;Pr=1;let _=A(),m=jt().positionX;Fe=f;function f(a){a=_.asNonCompoundGraph(a),u(a),Object.entries(m(a)).forEach(([i,e])=>a.node(i).x=e)}function u(a){let i=_.buildLayerMatrix(a),e=a.graph().ranksep,s=0;i.forEach(n=>{const o=n.reduce((r,t)=>{const d=a.node(t).height;return r>d?r:d},0);n.forEach(r=>a.node(r).y=s+o/2),s+=o+e})}return Fe}var Ae,Dr;function Lt(){if(Dr)return Ae;Dr=1;let _=ct(),m=pt(),f=bt(),u=A().normalizeRanks,a=vt(),i=A().removeEmptyRanks,e=wt(),s=gt(),n=Et(),o=It(),r=qt(),t=A(),d=Y().Graph;Ae=l;function l(v,y){let N=y&&y.debugTiming?t.time:t.notime;N("layout",()=>{let q=N(" buildLayoutGraph",()=>h(v));N(" runLayout",()=>w(q,N,y)),N(" updateInputGraph",()=>x(v,q))})}function w(v,y,N){y(" makeSpaceForEdgeLabels",()=>b(v)),y(" removeSelfEdges",()=>Hr(v)),y(" acyclic",()=>_.run(v)),y(" nestingGraph.run",()=>e.run(v)),y(" rank",()=>f(t.asNonCompoundGraph(v))),y(" injectEdgeLabelProxies",()=>E(v)),y(" removeEmptyRanks",()=>i(v)),y(" nestingGraph.cleanup",()=>e.cleanup(v)),y(" normalizeRanks",()=>u(v)),y(" assignRankMinMax",()=>k(v)),y(" removeEdgeLabelProxies",()=>R(v)),y(" normalize.run",()=>m.run(v)),y(" parentDummyChains",()=>a(v)),y(" addBorderSegments",()=>s(v)),y(" order",()=>o(v,N)),y(" insertSelfEdges",()=>Xr(v)),y(" adjustCoordinateSystem",()=>n.adjust(v)),y(" position",()=>r(v)),y(" positionSelfEdges",()=>Qr(v)),y(" removeBorderNodes",()=>U(v)),y(" normalize.undo",()=>m.undo(v)),y(" fixupEdgeLabelCoords",()=>D(v)),y(" undoCoordinateSystem",()=>n.undo(v)),y(" translateGraph",()=>T(v)),y(" assignNodeIntersects",()=>S(v)),y(" reversePoints",()=>z(v)),y(" acyclic.undo",()=>_.undo(v))}function x(v,y){v.nodes().forEach(N=>{let q=v.node(N),M=y.node(N);q&&(q.x=M.x,q.y=M.y,q.rank=M.rank,y.children(N).length&&(q.width=M.width,q.height=M.height))}),v.edges().forEach(N=>{let q=v.edge(N),M=y.edge(N);q.points=M.points,Object.hasOwn(M,"x")&&(q.x=M.x,q.y=M.y)}),v.graph().width=y.graph().width,v.graph().height=y.graph().height}let c=["nodesep","edgesep","ranksep","marginx","marginy"],g={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},p=["acyclicer","ranker","rankdir","align"],O=["width","height","rank"],C={width:0,height:0},I=["minlen","weight","width","height","labeloffset"],j={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},L=["labelpos"];function h(v){let y=new d({multigraph:!0,compound:!0}),N=$(v.graph());return y.setGraph(Object.assign({},g,Q(N,c),t.pick(N,p))),v.nodes().forEach(q=>{let M=$(v.node(q));const P=Q(M,O);Object.keys(C).forEach(G=>{P[G]===void 0&&(P[G]=C[G])}),y.setNode(q,P),y.setParent(q,v.parent(q))}),v.edges().forEach(q=>{let M=$(v.edge(q));y.setEdge(q,Object.assign({},j,Q(M,I),t.pick(M,L)))}),y}function b(v){let y=v.graph();y.ranksep/=2,v.edges().forEach(N=>{let q=v.edge(N);q.minlen*=2,q.labelpos.toLowerCase()!=="c"&&(y.rankdir==="TB"||y.rankdir==="BT"?q.width+=q.labeloffset:q.height+=q.labeloffset)})}function E(v){v.edges().forEach(y=>{let N=v.edge(y);if(N.width&&N.height){let q=v.node(y.v),P={rank:(v.node(y.w).rank-q.rank)/2+q.rank,e:y};t.addDummyNode(v,"edge-proxy",P,"_ep")}})}function k(v){let y=0;v.nodes().forEach(N=>{let q=v.node(N);q.borderTop&&(q.minRank=v.node(q.borderTop).rank,q.maxRank=v.node(q.borderBottom).rank,y=Math.max(y,q.maxRank))}),v.graph().maxRank=y}function R(v){v.nodes().forEach(y=>{let N=v.node(y);N.dummy==="edge-proxy"&&(v.edge(N.e).labelRank=N.rank,v.removeNode(y))})}function T(v){let y=Number.POSITIVE_INFINITY,N=0,q=Number.POSITIVE_INFINITY,M=0,P=v.graph(),G=P.marginx||0,B=P.marginy||0;function ze(W){let V=W.x,H=W.y,Ue=W.width,He=W.height;y=Math.min(y,V-Ue/2),N=Math.max(N,V+Ue/2),q=Math.min(q,H-He/2),M=Math.max(M,H+He/2)}v.nodes().forEach(W=>ze(v.node(W))),v.edges().forEach(W=>{let V=v.edge(W);Object.hasOwn(V,"x")&&ze(V)}),y-=G,q-=B,v.nodes().forEach(W=>{let V=v.node(W);V.x-=y,V.y-=q}),v.edges().forEach(W=>{let V=v.edge(W);V.points.forEach(H=>{H.x-=y,H.y-=q}),Object.hasOwn(V,"x")&&(V.x-=y),Object.hasOwn(V,"y")&&(V.y-=q)}),P.width=N-y+G,P.height=M-q+B}function S(v){v.edges().forEach(y=>{let N=v.edge(y),q=v.node(y.v),M=v.node(y.w),P,G;N.points?(P=N.points[0],G=N.points[N.points.length-1]):(N.points=[],P=M,G=q),N.points.unshift(t.intersectRect(q,P)),N.points.push(t.intersectRect(M,G))})}function D(v){v.edges().forEach(y=>{let N=v.edge(y);if(Object.hasOwn(N,"x"))switch((N.labelpos==="l"||N.labelpos==="r")&&(N.width-=N.labeloffset),N.labelpos){case"l":N.x-=N.width/2+N.labeloffset;break;case"r":N.x+=N.width/2+N.labeloffset;break}})}function z(v){v.edges().forEach(y=>{let N=v.edge(y);N.reversed&&N.points.reverse()})}function U(v){v.nodes().forEach(y=>{if(v.children(y).length){let N=v.node(y),q=v.node(N.borderTop),M=v.node(N.borderBottom),P=v.node(N.borderLeft[N.borderLeft.length-1]),G=v.node(N.borderRight[N.borderRight.length-1]);N.width=Math.abs(G.x-P.x),N.height=Math.abs(M.y-q.y),N.x=P.x+N.width/2,N.y=q.y+N.height/2}}),v.nodes().forEach(y=>{v.node(y).dummy==="border"&&v.removeNode(y)})}function Hr(v){v.edges().forEach(y=>{if(y.v===y.w){var N=v.node(y.v);N.selfEdges||(N.selfEdges=[]),N.selfEdges.push({e:y,label:v.edge(y)}),v.removeEdge(y)}})}function Xr(v){var y=t.buildLayerMatrix(v);y.forEach(N=>{var q=0;N.forEach((M,P)=>{var G=v.node(M);G.order=P+q,(G.selfEdges||[]).forEach(B=>{t.addDummyNode(v,"selfedge",{width:B.label.width,height:B.label.height,rank:G.rank,order:P+ ++q,e:B.e,label:B.label},"_se")}),delete G.selfEdges})})}function Qr(v){v.nodes().forEach(y=>{var N=v.node(y);if(N.dummy==="selfedge"){var q=v.node(N.e.v),M=q.x+q.width/2,P=q.y,G=N.x-M,B=q.height/2;v.setEdge(N.e,N.label),v.removeNode(y),N.label.points=[{x:M+2*G/3,y:P-B},{x:M+5*G/6,y:P-B},{x:M+G,y:P},{x:M+5*G/6,y:P+B},{x:M+2*G/3,y:P+B}],N.label.x=N.x,N.label.y=N.y}})}function Q(v,y){return t.mapValues(t.pick(v,y),Number)}function $(v){var y={};return v&&Object.entries(v).forEach(([N,q])=>{typeof N=="string"&&(N=N.toLowerCase()),y[N]=q}),y}return Ae}var Ve,Gr;function Tt(){if(Gr)return Ve;Gr=1;let _=A(),m=Y().Graph;Ve={debugOrdering:f};function f(u){let a=_.buildLayerMatrix(u),i=new m({compound:!0,multigraph:!0}).setGraph({});return u.nodes().forEach(e=>{i.setNode(e,{label:e}),i.setParent(e,"layer"+u.node(e).rank)}),u.edges().forEach(e=>i.setEdge(e.v,e.w,{},e.name)),a.forEach((e,s)=>{let n="layer"+s;i.setNode(n,{rank:"same"}),e.reduce((o,r)=>(i.setEdge(o,r,{style:"invis"}),r))}),i}return Ve}var Be,Fr;function St(){return Fr||(Fr=1,Be="1.1.8"),Be}var We,Ar;function Mt(){return Ar||(Ar=1,We={graphlib:Y(),layout:Lt(),debug:Tt(),util:{time:A().time,notime:A().notime},version:St()}),We}var Pt=Mt();const Ft=Kr(Pt);export{Ft as d};
@@ -1,4 +1,4 @@
1
- var Sw=Object.defineProperty;var Aw=(e,t,r)=>t in e?Sw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Fo=(e,t,r)=>Aw(e,typeof t!="symbol"?t+"":t,r);import{r as v,a as Oi,g as Cr,b as Ew,R as _w,j as E}from"./index-Dbaws8C6.js";import{i as Fa,w as jw,r as vs,a as kw}from"./index-07Y4UWP1.js";import{S as Cw,d as Tw,N as Iw}from"./constants-Dd6A34aQ.js";import{C as Mw}from"./circle-alert-B17sfIdw.js";import{R as wf}from"./refresh-cw-CI2U4FGa.js";function ps(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function Dw(e,t){t===void 0&&(t=e,e=Fa);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var u=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[u](o-u)}}function Nw(e){const{completionRate:t,totalNodes:r,blockedCount:n,missingACCount:i,oversizedCount:a}=e;if(r===0)return 100;const o=t,u=(r-n)/r*100,l=(r-i)/r*100,s=(r-a)/r*100,c=o*.4+u*.25+l*.2+s*.15;return Math.round(Math.max(0,Math.min(100,c)))}function Rw(){const[e,t]=v.useState(null),[r,n]=v.useState(!0),[i,a]=v.useState(null),o=v.useRef(null),u=v.useCallback(async()=>{o.current&&o.current.abort();const l=new AbortController;o.current=l,n(!0),a(null);try{const s=await Promise.allSettled([Oi.getMetrics(),Oi.getBottlenecks(),Oi.getStats(),Oi.getKnowledgeStats()]);if(l.signal.aborted)return;const c=s[0].status==="fulfilled"?s[0].value:null,f=s[1].status==="fulfilled"?s[1].value:null,d=s[2].status==="fulfilled"?s[2].value:null,p=s[3].status==="fulfilled"?s[3].value:{total:0,bySource:{}};if(!c||!f||!d){a("Failed to load one or more insight endpoints");return}const h=Nw({completionRate:c.completionRate,totalNodes:d.totalNodes,blockedCount:d.byStatus.blocked??0,missingACCount:f.missingAcceptanceCriteria.length,oversizedCount:f.oversizedTasks.length});t({metrics:c,bottlenecks:f,stats:d,knowledgeStats:p,healthScore:h})}catch(s){if(l.signal.aborted)return;a(s instanceof Error?s.message:"Failed to load insights")}finally{l.signal.aborted||n(!1)}},[]);return v.useEffect(()=>(u(),()=>{o.current&&o.current.abort()}),[u]),{data:e,loading:r,error:i,refresh:u}}function dm(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=dm(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function U(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=dm(e))&&(n&&(n+=" "),n+=t);return n}var $w=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function hs(e){if(typeof e!="string")return!1;var t=$w;return t.includes(e)}var Lw=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],Bw=new Set(Lw);function vm(e){return typeof e!="string"?!1:Bw.has(e)}function pm(e){return typeof e=="string"&&e.startsWith("data-")}function Re(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(vm(r)||pm(r))&&(t[r]=e[r]);return t}function wr(e){if(e==null)return null;if(v.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Re(t)}return typeof e=="object"&&!Array.isArray(e)?Re(e):null}function De(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(vm(r)||pm(r)||hs(r))&&(t[r]=e[r]);return t}var zw=["children","width","height","viewBox","className","style","title","desc"];function vl(){return vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vl.apply(null,arguments)}function Fw(e,t){if(e==null)return{};var r,n,i=Kw(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Kw(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ms=v.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:a,className:o,style:u,title:l,desc:s}=e,c=Fw(e,zw),f=a||{width:n,height:i,x:0,y:0},d=U("recharts-surface",o);return v.createElement("svg",vl({},De(c),{className:d,width:n,height:i,style:u,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),v.createElement("title",null,l),v.createElement("desc",null,s),r)}),Ww=["children","className"];function pl(){return pl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pl.apply(null,arguments)}function qw(e,t){if(e==null)return{};var r,n,i=Uw(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Uw(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ve=v.forwardRef((e,t)=>{var{children:r,className:n}=e,i=qw(e,Ww),a=U("recharts-layer",n);return v.createElement("g",pl({className:a},De(i),{ref:t}),r)}),hm=v.createContext(null),Hw=()=>v.useContext(hm);function re(e){return function(){return e}}const mm=Math.cos,Gi=Math.sin,vt=Math.sqrt,Vi=Math.PI,Ka=2*Vi,hl=Math.PI,ml=2*hl,dr=1e-6,Yw=ml-dr;function ym(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Gw(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ym;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class Vw{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?ym:Gw(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,u=this._y1,l=n-t,s=i-r,c=o-t,f=u-r,d=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>dr)if(!(Math.abs(f*l-s*c)>dr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,h=i-u,m=l*l+s*s,y=p*p+h*h,g=Math.sqrt(m),b=Math.sqrt(d),P=a*Math.tan((hl-Math.acos((m+d-y)/(2*g*b)))/2),x=P/b,O=P/g;Math.abs(x-1)>dr&&this._append`L${t+x*c},${r+x*f}`,this._append`A${a},${a},0,0,${+(f*p>c*h)},${this._x1=t+O*l},${this._y1=r+O*s}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),l=n*Math.sin(i),s=t+u,c=r+l,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${s},${c}`:(Math.abs(this._x1-s)>dr||Math.abs(this._y1-c)>dr)&&this._append`L${s},${c}`,n&&(d<0&&(d=d%ml+ml),d>Yw?this._append`A${n},${n},0,1,${f},${t-u},${r-l}A${n},${n},0,1,${f},${this._x1=s},${this._y1=c}`:d>dr&&this._append`A${n},${n},0,${+(d>=hl)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function ys(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new Vw(t)}function gs(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function gm(e){this._context=e}gm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Wa(e){return new gm(e)}function bm(e){return e[0]}function wm(e){return e[1]}function xm(e,t){var r=re(!0),n=null,i=Wa,a=null,o=ys(u);e=typeof e=="function"?e:e===void 0?bm:re(e),t=typeof t=="function"?t:t===void 0?wm:re(t);function u(l){var s,c=(l=gs(l)).length,f,d=!1,p;for(n==null&&(a=i(p=o())),s=0;s<=c;++s)!(s<c&&r(f=l[s],s,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(f,s,l),+t(f,s,l));if(p)return a=null,p+""||null}return u.x=function(l){return arguments.length?(e=typeof l=="function"?l:re(+l),u):e},u.y=function(l){return arguments.length?(t=typeof l=="function"?l:re(+l),u):t},u.defined=function(l){return arguments.length?(r=typeof l=="function"?l:re(!!l),u):r},u.curve=function(l){return arguments.length?(i=l,n!=null&&(a=i(n)),u):i},u.context=function(l){return arguments.length?(l==null?n=a=null:a=i(n=l),u):n},u}function Si(e,t,r){var n=null,i=re(!0),a=null,o=Wa,u=null,l=ys(s);e=typeof e=="function"?e:e===void 0?bm:re(+e),t=typeof t=="function"?t:re(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?wm:re(+r);function s(f){var d,p,h,m=(f=gs(f)).length,y,g=!1,b,P=new Array(m),x=new Array(m);for(a==null&&(u=o(b=l())),d=0;d<=m;++d){if(!(d<m&&i(y=f[d],d,f))===g)if(g=!g)p=d,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),h=d-1;h>=p;--h)u.point(P[h],x[h]);u.lineEnd(),u.areaEnd()}g&&(P[d]=+e(y,d,f),x[d]=+t(y,d,f),u.point(n?+n(y,d,f):P[d],r?+r(y,d,f):x[d]))}if(b)return u=null,b+""||null}function c(){return xm().defined(i).curve(o).context(a)}return s.x=function(f){return arguments.length?(e=typeof f=="function"?f:re(+f),n=null,s):e},s.x0=function(f){return arguments.length?(e=typeof f=="function"?f:re(+f),s):e},s.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:re(+f),s):n},s.y=function(f){return arguments.length?(t=typeof f=="function"?f:re(+f),r=null,s):t},s.y0=function(f){return arguments.length?(t=typeof f=="function"?f:re(+f),s):t},s.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:re(+f),s):r},s.lineX0=s.lineY0=function(){return c().x(e).y(t)},s.lineY1=function(){return c().x(e).y(r)},s.lineX1=function(){return c().x(n).y(t)},s.defined=function(f){return arguments.length?(i=typeof f=="function"?f:re(!!f),s):i},s.curve=function(f){return arguments.length?(o=f,a!=null&&(u=o(a)),s):o},s.context=function(f){return arguments.length?(f==null?a=u=null:u=o(a=f),s):a},s}class Pm{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Xw(e){return new Pm(e,!0)}function Zw(e){return new Pm(e,!1)}const bs={draw(e,t){const r=vt(t/Vi);e.moveTo(r,0),e.arc(0,0,r,0,Ka)}},Qw={draw(e,t){const r=vt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},Om=vt(1/3),Jw=Om*2,ex={draw(e,t){const r=vt(t/Jw),n=r*Om;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},tx={draw(e,t){const r=vt(t),n=-r/2;e.rect(n,n,r,r)}},rx=.8908130915292852,Sm=Gi(Vi/10)/Gi(7*Vi/10),nx=Gi(Ka/10)*Sm,ix=-mm(Ka/10)*Sm,ax={draw(e,t){const r=vt(t*rx),n=nx*r,i=ix*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=Ka*a/5,u=mm(o),l=Gi(o);e.lineTo(l*r,-u*r),e.lineTo(u*n-l*i,l*n+u*i)}e.closePath()}},Ko=vt(3),ox={draw(e,t){const r=-vt(t/(Ko*3));e.moveTo(0,r*2),e.lineTo(-Ko*r,-r),e.lineTo(Ko*r,-r),e.closePath()}},tt=-.5,rt=vt(3)/2,yl=1/vt(12),ux=(yl/2+1)*3,lx={draw(e,t){const r=vt(t/ux),n=r/2,i=r*yl,a=n,o=r*yl+r,u=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(u,l),e.lineTo(tt*n-rt*i,rt*n+tt*i),e.lineTo(tt*a-rt*o,rt*a+tt*o),e.lineTo(tt*u-rt*l,rt*u+tt*l),e.lineTo(tt*n+rt*i,tt*i-rt*n),e.lineTo(tt*a+rt*o,tt*o-rt*a),e.lineTo(tt*u+rt*l,tt*l-rt*u),e.closePath()}};function sx(e,t){let r=null,n=ys(i);e=typeof e=="function"?e:re(e||bs),t=typeof t=="function"?t:re(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:re(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:re(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Xi(){}function Zi(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Am(e){this._context=e}Am.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:Zi(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:Zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function cx(e){return new Am(e)}function Em(e){this._context=e}Em.prototype={areaStart:Xi,areaEnd:Xi,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);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function fx(e){return new Em(e)}function _m(e){this._context=e}_m.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function dx(e){return new _m(e)}function jm(e){this._context=e}jm.prototype={areaStart:Xi,areaEnd:Xi,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function vx(e){return new jm(e)}function xf(e){return e<0?-1:1}function Pf(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),u=(a*i+o*n)/(n+i);return(xf(a)+xf(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(u))||0}function Of(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Wo(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,u=(a-n)/3;e._context.bezierCurveTo(n+u,i+u*t,a-u,o-u*r,a,o)}function Qi(e){this._context=e}Qi.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:Wo(this,this._t0,Of(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Wo(this,Of(this,r=Pf(this,e,t)),r);break;default:Wo(this,this._t0,r=Pf(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function km(e){this._context=new Cm(e)}(km.prototype=Object.create(Qi.prototype)).point=function(e,t){Qi.prototype.point.call(this,t,e)};function Cm(e){this._context=e}Cm.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function px(e){return new Qi(e)}function hx(e){return new km(e)}function Tm(e){this._context=e}Tm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Sf(e),i=Sf(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Sf(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function mx(e){return new Tm(e)}function qa(e,t){this._context=e,this._t=t}qa.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&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function yx(e){return new qa(e,.5)}function gx(e){return new qa(e,0)}function bx(e){return new qa(e,1)}function xr(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,u=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<u;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function gl(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function wx(e,t){return e[t]}function xx(e){const t=[];return t.key=e,t}function Px(){var e=re([]),t=gl,r=xr,n=wx;function i(a){var o=Array.from(e.apply(this,arguments),xx),u,l=o.length,s=-1,c;for(const f of a)for(u=0,++s;u<l;++u)(o[u][s]=[0,+n(f,o[u].key,s,a)]).data=f;for(u=0,c=gs(t(o));u<l;++u)o[c[u]].index=u;return r(o,c),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:re(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:re(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?gl:typeof a=="function"?a:re(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??xr,i):r},i}function Ox(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}xr(e,t)}}function Sx(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,u=0;o<i;++o)u+=e[o][r][1]||0;n[r][1]+=n[r][0]=-u/2}xr(e,t)}}function Ax(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var u=0,l=0,s=0;u<o;++u){for(var c=e[t[u]],f=c[n][1]||0,d=c[n-1][1]||0,p=(f-d)/2,h=0;h<u;++h){var m=e[t[h]],y=m[n][1]||0,g=m[n-1][1]||0;p+=y-g}l+=f,s+=p*f}i[n-1][1]+=i[n-1][0]=r,l&&(r-=s/l)}i[n-1][1]+=i[n-1][0]=r,xr(e,t)}}var qo={},Uo={},Af;function Ex(){return Af||(Af=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(Uo)),Uo}var Ho={},Ef;function Im(){return Ef||(Ef=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(Ho)),Ho}var Yo={},_f;function ws(){return _f||(_f=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var n;return typeof r=="string"||typeof r=="symbol"?r:Object.is((n=r==null?void 0:r.valueOf)==null?void 0:n.call(r),-0)?"-0":String(r)}e.toKey=t})(Yo)),Yo}var Go={},Vo={},jf;function _x(){return jf||(jf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(t).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=t})(Vo)),Vo}var kf;function xs(){return kf||(kf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_x(),r=ws();function n(i){if(Array.isArray(i))return i.map(r.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const a=[],o=i.length;if(o===0)return a;let u=0,l="",s="",c=!1;for(i.charCodeAt(0)===46&&(a.push(""),u++);u<o;){const f=i[u];s?f==="\\"&&u+1<o?(u++,l+=i[u]):f===s?s="":l+=f:c?f==='"'||f==="'"?s=f:f==="]"?(c=!1,a.push(l),l=""):l+=f:f==="["?(c=!0,l&&(a.push(l),l="")):f==="."?l&&(a.push(l),l=""):l+=f,u++}return l&&a.push(l),a}e.toPath=n})(Go)),Go}var Cf;function Ps(){return Cf||(Cf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ex(),r=Im(),n=ws(),i=xs();function a(u,l,s){if(u==null)return s;switch(typeof l){case"string":{if(t.isUnsafeProperty(l))return s;const c=u[l];return c===void 0?r.isDeepKey(l)?a(u,i.toPath(l),s):s:c}case"number":case"symbol":{typeof l=="number"&&(l=n.toKey(l));const c=u[l];return c===void 0?s:c}default:{if(Array.isArray(l))return o(u,l,s);if(Object.is(l==null?void 0:l.valueOf(),-0)?l="-0":l=String(l),t.isUnsafeProperty(l))return s;const c=u[l];return c===void 0?s:c}}}function o(u,l,s){if(l.length===0)return s;let c=u;for(let f=0;f<l.length;f++){if(c==null||t.isUnsafeProperty(l[f]))return s;c=c[l[f]]}return c===void 0?s:c}e.get=a})(qo)),qo}var Xo,Tf;function jx(){return Tf||(Tf=1,Xo=Ps().get),Xo}var kx=jx();const Pr=Cr(kx);var Cx=4;function Xt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Cx,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function se(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((i,a,o)=>{var u=r[o-1];return typeof u=="string"?i+u+a:u!==void 0?i+Xt(u)+a:i+a},"")}var Se=e=>e===0?0:e>0?1:-1,xt=e=>typeof e=="number"&&e!=+e,Or=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,L=e=>(typeof e=="number"||e instanceof Number)&&!xt(e),Pt=e=>L(e)||typeof e=="string",Tx=0,Dn=e=>{var t=++Tx;return"".concat(e||"").concat(t)},Ne=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!L(t)&&typeof t!="string")return n;var a;if(Or(t)){if(r==null)return n;var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return xt(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},Mm=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function de(e,t,r){return L(e)&&L(t)?Xt(e+r*(t-e)):t}function Ix(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Pr(n,t))===r)}var ge=e=>e===null||typeof e>"u",Yn=e=>ge(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function yt(e){return e!=null}function $t(){}var Mx=["type","size","sizeType"];function bl(){return bl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bl.apply(null,arguments)}function If(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?If(Object(r),!0).forEach(function(n){Dx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):If(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Dx(e,t,r){return(t=Nx(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nx(e){var t=Rx(e,"string");return typeof t=="symbol"?t:t+""}function Rx(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $x(e,t){if(e==null)return{};var r,n,i=Lx(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Lx(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Dm={symbolCircle:bs,symbolCross:Qw,symbolDiamond:ex,symbolSquare:tx,symbolStar:ax,symbolTriangle:ox,symbolWye:lx},Bx=Math.PI/180,zx=e=>{var t="symbol".concat(Yn(e));return Dm[t]||bs},Fx=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*Bx;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},Kx=(e,t)=>{Dm["symbol".concat(Yn(e))]=t},Os=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=$x(e,Mx),a=Mf(Mf({},i),{},{type:t,size:r,sizeType:n}),o="circle";typeof t=="string"&&(o=t);var u=()=>{var d=zx(o),p=sx().type(d).size(Fx(r,n,o)),h=p();if(h!==null)return h},{className:l,cx:s,cy:c}=a,f=De(a);return L(s)&&L(c)&&L(r)?v.createElement("path",bl({},f,{className:U("recharts-symbols",l),transform:"translate(".concat(s,", ").concat(c,")"),d:u()})):null};Os.registerSymbol=Kx;var Nm=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Rm=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(v.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{hs(i)&&typeof r[i]=="function"&&(n[i]=(a=>r[i](r,a)))}),n},Wx=(e,t,r)=>n=>(e(t,r,n),null),ir=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];hs(i)&&typeof a=="function"&&(n||(n={}),n[i]=Wx(a,t,r))}),n};function Df(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Df(Object(r),!0).forEach(function(n){Ux(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Df(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ux(e,t,r){return(t=Hx(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hx(e){var t=Yx(e,"string");return typeof t=="symbol"?t:t+""}function Yx(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function be(e,t){var r=qx({},e),n=t,i=Object.keys(t),a=i.reduce((o,u)=>(o[u]===void 0&&n[u]!==void 0&&(o[u]=n[u]),o),r);return a}function Ji(){return Ji=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ji.apply(null,arguments)}function Nf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $m(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Nf(Object(r),!0).forEach(function(n){Gx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Gx(e,t,r){return(t=Vx(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vx(e){var t=Xx(e,"string");return typeof t=="symbol"?t:t+""}function Xx(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var it=32,Zx={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function Qx(e){if(typeof e=="object"&&e!==null&&"strokeDasharray"in e)return String(e.strokeDasharray)}function Jx(e){var{data:t,iconType:r,inactiveColor:n}=e,i=it/2,a=it/6,o=it/3,u=t.inactive?n:t.color,l=r??t.type;if(l==="none")return null;if(l==="plainline")return v.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:Qx(t.payload),x1:0,y1:i,x2:it,y2:i,className:"recharts-legend-icon"});if(l==="line")return v.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(i,"h").concat(o,`
1
+ var Sw=Object.defineProperty;var Aw=(e,t,r)=>t in e?Sw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Fo=(e,t,r)=>Aw(e,typeof t!="symbol"?t+"":t,r);import{r as v,a as Oi,g as Cr,b as Ew,d as _w,j as E}from"./index-D_SBClB-.js";import{i as Fa,w as jw,r as vs,a as kw}from"./index-BxYtgAYc.js";import{S as Cw,d as Tw,N as Iw}from"./constants-Dd6A34aQ.js";import{C as Mw}from"./circle-alert-CfDAmNcO.js";import{R as wf}from"./refresh-cw-dY_ihv6e.js";function ps(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function Dw(e,t){t===void 0&&(t=e,e=Fa);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var u=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[u](o-u)}}function Nw(e){const{completionRate:t,totalNodes:r,blockedCount:n,missingACCount:i,oversizedCount:a}=e;if(r===0)return 100;const o=t,u=(r-n)/r*100,l=(r-i)/r*100,s=(r-a)/r*100,c=o*.4+u*.25+l*.2+s*.15;return Math.round(Math.max(0,Math.min(100,c)))}function Rw(){const[e,t]=v.useState(null),[r,n]=v.useState(!0),[i,a]=v.useState(null),o=v.useRef(null),u=v.useCallback(async()=>{o.current&&o.current.abort();const l=new AbortController;o.current=l,n(!0),a(null);try{const s=await Promise.allSettled([Oi.getMetrics(),Oi.getBottlenecks(),Oi.getStats(),Oi.getKnowledgeStats()]);if(l.signal.aborted)return;const c=s[0].status==="fulfilled"?s[0].value:null,f=s[1].status==="fulfilled"?s[1].value:null,d=s[2].status==="fulfilled"?s[2].value:null,p=s[3].status==="fulfilled"?s[3].value:{total:0,bySource:{}};if(!c||!f||!d){a("Failed to load one or more insight endpoints");return}const h=Nw({completionRate:c.completionRate,totalNodes:d.totalNodes,blockedCount:d.byStatus.blocked??0,missingACCount:f.missingAcceptanceCriteria.length,oversizedCount:f.oversizedTasks.length});t({metrics:c,bottlenecks:f,stats:d,knowledgeStats:p,healthScore:h})}catch(s){if(l.signal.aborted)return;a(s instanceof Error?s.message:"Failed to load insights")}finally{l.signal.aborted||n(!1)}},[]);return v.useEffect(()=>(u(),()=>{o.current&&o.current.abort()}),[u]),{data:e,loading:r,error:i,refresh:u}}function dm(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=dm(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function U(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=dm(e))&&(n&&(n+=" "),n+=t);return n}var $w=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function hs(e){if(typeof e!="string")return!1;var t=$w;return t.includes(e)}var Lw=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],Bw=new Set(Lw);function vm(e){return typeof e!="string"?!1:Bw.has(e)}function pm(e){return typeof e=="string"&&e.startsWith("data-")}function Re(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(vm(r)||pm(r))&&(t[r]=e[r]);return t}function wr(e){if(e==null)return null;if(v.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Re(t)}return typeof e=="object"&&!Array.isArray(e)?Re(e):null}function De(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(vm(r)||pm(r)||hs(r))&&(t[r]=e[r]);return t}var zw=["children","width","height","viewBox","className","style","title","desc"];function vl(){return vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vl.apply(null,arguments)}function Fw(e,t){if(e==null)return{};var r,n,i=Kw(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Kw(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ms=v.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:a,className:o,style:u,title:l,desc:s}=e,c=Fw(e,zw),f=a||{width:n,height:i,x:0,y:0},d=U("recharts-surface",o);return v.createElement("svg",vl({},De(c),{className:d,width:n,height:i,style:u,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),v.createElement("title",null,l),v.createElement("desc",null,s),r)}),Ww=["children","className"];function pl(){return pl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pl.apply(null,arguments)}function qw(e,t){if(e==null)return{};var r,n,i=Uw(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Uw(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ve=v.forwardRef((e,t)=>{var{children:r,className:n}=e,i=qw(e,Ww),a=U("recharts-layer",n);return v.createElement("g",pl({className:a},De(i),{ref:t}),r)}),hm=v.createContext(null),Hw=()=>v.useContext(hm);function re(e){return function(){return e}}const mm=Math.cos,Gi=Math.sin,vt=Math.sqrt,Vi=Math.PI,Ka=2*Vi,hl=Math.PI,ml=2*hl,dr=1e-6,Yw=ml-dr;function ym(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Gw(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ym;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class Vw{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?ym:Gw(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,u=this._y1,l=n-t,s=i-r,c=o-t,f=u-r,d=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>dr)if(!(Math.abs(f*l-s*c)>dr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,h=i-u,m=l*l+s*s,y=p*p+h*h,g=Math.sqrt(m),b=Math.sqrt(d),P=a*Math.tan((hl-Math.acos((m+d-y)/(2*g*b)))/2),x=P/b,O=P/g;Math.abs(x-1)>dr&&this._append`L${t+x*c},${r+x*f}`,this._append`A${a},${a},0,0,${+(f*p>c*h)},${this._x1=t+O*l},${this._y1=r+O*s}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),l=n*Math.sin(i),s=t+u,c=r+l,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${s},${c}`:(Math.abs(this._x1-s)>dr||Math.abs(this._y1-c)>dr)&&this._append`L${s},${c}`,n&&(d<0&&(d=d%ml+ml),d>Yw?this._append`A${n},${n},0,1,${f},${t-u},${r-l}A${n},${n},0,1,${f},${this._x1=s},${this._y1=c}`:d>dr&&this._append`A${n},${n},0,${+(d>=hl)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function ys(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new Vw(t)}function gs(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function gm(e){this._context=e}gm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Wa(e){return new gm(e)}function bm(e){return e[0]}function wm(e){return e[1]}function xm(e,t){var r=re(!0),n=null,i=Wa,a=null,o=ys(u);e=typeof e=="function"?e:e===void 0?bm:re(e),t=typeof t=="function"?t:t===void 0?wm:re(t);function u(l){var s,c=(l=gs(l)).length,f,d=!1,p;for(n==null&&(a=i(p=o())),s=0;s<=c;++s)!(s<c&&r(f=l[s],s,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(f,s,l),+t(f,s,l));if(p)return a=null,p+""||null}return u.x=function(l){return arguments.length?(e=typeof l=="function"?l:re(+l),u):e},u.y=function(l){return arguments.length?(t=typeof l=="function"?l:re(+l),u):t},u.defined=function(l){return arguments.length?(r=typeof l=="function"?l:re(!!l),u):r},u.curve=function(l){return arguments.length?(i=l,n!=null&&(a=i(n)),u):i},u.context=function(l){return arguments.length?(l==null?n=a=null:a=i(n=l),u):n},u}function Si(e,t,r){var n=null,i=re(!0),a=null,o=Wa,u=null,l=ys(s);e=typeof e=="function"?e:e===void 0?bm:re(+e),t=typeof t=="function"?t:re(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?wm:re(+r);function s(f){var d,p,h,m=(f=gs(f)).length,y,g=!1,b,P=new Array(m),x=new Array(m);for(a==null&&(u=o(b=l())),d=0;d<=m;++d){if(!(d<m&&i(y=f[d],d,f))===g)if(g=!g)p=d,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),h=d-1;h>=p;--h)u.point(P[h],x[h]);u.lineEnd(),u.areaEnd()}g&&(P[d]=+e(y,d,f),x[d]=+t(y,d,f),u.point(n?+n(y,d,f):P[d],r?+r(y,d,f):x[d]))}if(b)return u=null,b+""||null}function c(){return xm().defined(i).curve(o).context(a)}return s.x=function(f){return arguments.length?(e=typeof f=="function"?f:re(+f),n=null,s):e},s.x0=function(f){return arguments.length?(e=typeof f=="function"?f:re(+f),s):e},s.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:re(+f),s):n},s.y=function(f){return arguments.length?(t=typeof f=="function"?f:re(+f),r=null,s):t},s.y0=function(f){return arguments.length?(t=typeof f=="function"?f:re(+f),s):t},s.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:re(+f),s):r},s.lineX0=s.lineY0=function(){return c().x(e).y(t)},s.lineY1=function(){return c().x(e).y(r)},s.lineX1=function(){return c().x(n).y(t)},s.defined=function(f){return arguments.length?(i=typeof f=="function"?f:re(!!f),s):i},s.curve=function(f){return arguments.length?(o=f,a!=null&&(u=o(a)),s):o},s.context=function(f){return arguments.length?(f==null?a=u=null:u=o(a=f),s):a},s}class Pm{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Xw(e){return new Pm(e,!0)}function Zw(e){return new Pm(e,!1)}const bs={draw(e,t){const r=vt(t/Vi);e.moveTo(r,0),e.arc(0,0,r,0,Ka)}},Qw={draw(e,t){const r=vt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},Om=vt(1/3),Jw=Om*2,ex={draw(e,t){const r=vt(t/Jw),n=r*Om;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},tx={draw(e,t){const r=vt(t),n=-r/2;e.rect(n,n,r,r)}},rx=.8908130915292852,Sm=Gi(Vi/10)/Gi(7*Vi/10),nx=Gi(Ka/10)*Sm,ix=-mm(Ka/10)*Sm,ax={draw(e,t){const r=vt(t*rx),n=nx*r,i=ix*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=Ka*a/5,u=mm(o),l=Gi(o);e.lineTo(l*r,-u*r),e.lineTo(u*n-l*i,l*n+u*i)}e.closePath()}},Ko=vt(3),ox={draw(e,t){const r=-vt(t/(Ko*3));e.moveTo(0,r*2),e.lineTo(-Ko*r,-r),e.lineTo(Ko*r,-r),e.closePath()}},tt=-.5,rt=vt(3)/2,yl=1/vt(12),ux=(yl/2+1)*3,lx={draw(e,t){const r=vt(t/ux),n=r/2,i=r*yl,a=n,o=r*yl+r,u=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(u,l),e.lineTo(tt*n-rt*i,rt*n+tt*i),e.lineTo(tt*a-rt*o,rt*a+tt*o),e.lineTo(tt*u-rt*l,rt*u+tt*l),e.lineTo(tt*n+rt*i,tt*i-rt*n),e.lineTo(tt*a+rt*o,tt*o-rt*a),e.lineTo(tt*u+rt*l,tt*l-rt*u),e.closePath()}};function sx(e,t){let r=null,n=ys(i);e=typeof e=="function"?e:re(e||bs),t=typeof t=="function"?t:re(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:re(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:re(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Xi(){}function Zi(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Am(e){this._context=e}Am.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:Zi(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:Zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function cx(e){return new Am(e)}function Em(e){this._context=e}Em.prototype={areaStart:Xi,areaEnd:Xi,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);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function fx(e){return new Em(e)}function _m(e){this._context=e}_m.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function dx(e){return new _m(e)}function jm(e){this._context=e}jm.prototype={areaStart:Xi,areaEnd:Xi,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function vx(e){return new jm(e)}function xf(e){return e<0?-1:1}function Pf(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),u=(a*i+o*n)/(n+i);return(xf(a)+xf(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(u))||0}function Of(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Wo(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,u=(a-n)/3;e._context.bezierCurveTo(n+u,i+u*t,a-u,o-u*r,a,o)}function Qi(e){this._context=e}Qi.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:Wo(this,this._t0,Of(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Wo(this,Of(this,r=Pf(this,e,t)),r);break;default:Wo(this,this._t0,r=Pf(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function km(e){this._context=new Cm(e)}(km.prototype=Object.create(Qi.prototype)).point=function(e,t){Qi.prototype.point.call(this,t,e)};function Cm(e){this._context=e}Cm.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function px(e){return new Qi(e)}function hx(e){return new km(e)}function Tm(e){this._context=e}Tm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Sf(e),i=Sf(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Sf(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function mx(e){return new Tm(e)}function qa(e,t){this._context=e,this._t=t}qa.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&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function yx(e){return new qa(e,.5)}function gx(e){return new qa(e,0)}function bx(e){return new qa(e,1)}function xr(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,u=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<u;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function gl(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function wx(e,t){return e[t]}function xx(e){const t=[];return t.key=e,t}function Px(){var e=re([]),t=gl,r=xr,n=wx;function i(a){var o=Array.from(e.apply(this,arguments),xx),u,l=o.length,s=-1,c;for(const f of a)for(u=0,++s;u<l;++u)(o[u][s]=[0,+n(f,o[u].key,s,a)]).data=f;for(u=0,c=gs(t(o));u<l;++u)o[c[u]].index=u;return r(o,c),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:re(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:re(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?gl:typeof a=="function"?a:re(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??xr,i):r},i}function Ox(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}xr(e,t)}}function Sx(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,u=0;o<i;++o)u+=e[o][r][1]||0;n[r][1]+=n[r][0]=-u/2}xr(e,t)}}function Ax(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var u=0,l=0,s=0;u<o;++u){for(var c=e[t[u]],f=c[n][1]||0,d=c[n-1][1]||0,p=(f-d)/2,h=0;h<u;++h){var m=e[t[h]],y=m[n][1]||0,g=m[n-1][1]||0;p+=y-g}l+=f,s+=p*f}i[n-1][1]+=i[n-1][0]=r,l&&(r-=s/l)}i[n-1][1]+=i[n-1][0]=r,xr(e,t)}}var qo={},Uo={},Af;function Ex(){return Af||(Af=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(Uo)),Uo}var Ho={},Ef;function Im(){return Ef||(Ef=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(Ho)),Ho}var Yo={},_f;function ws(){return _f||(_f=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var n;return typeof r=="string"||typeof r=="symbol"?r:Object.is((n=r==null?void 0:r.valueOf)==null?void 0:n.call(r),-0)?"-0":String(r)}e.toKey=t})(Yo)),Yo}var Go={},Vo={},jf;function _x(){return jf||(jf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(t).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=t})(Vo)),Vo}var kf;function xs(){return kf||(kf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_x(),r=ws();function n(i){if(Array.isArray(i))return i.map(r.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const a=[],o=i.length;if(o===0)return a;let u=0,l="",s="",c=!1;for(i.charCodeAt(0)===46&&(a.push(""),u++);u<o;){const f=i[u];s?f==="\\"&&u+1<o?(u++,l+=i[u]):f===s?s="":l+=f:c?f==='"'||f==="'"?s=f:f==="]"?(c=!1,a.push(l),l=""):l+=f:f==="["?(c=!0,l&&(a.push(l),l="")):f==="."?l&&(a.push(l),l=""):l+=f,u++}return l&&a.push(l),a}e.toPath=n})(Go)),Go}var Cf;function Ps(){return Cf||(Cf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ex(),r=Im(),n=ws(),i=xs();function a(u,l,s){if(u==null)return s;switch(typeof l){case"string":{if(t.isUnsafeProperty(l))return s;const c=u[l];return c===void 0?r.isDeepKey(l)?a(u,i.toPath(l),s):s:c}case"number":case"symbol":{typeof l=="number"&&(l=n.toKey(l));const c=u[l];return c===void 0?s:c}default:{if(Array.isArray(l))return o(u,l,s);if(Object.is(l==null?void 0:l.valueOf(),-0)?l="-0":l=String(l),t.isUnsafeProperty(l))return s;const c=u[l];return c===void 0?s:c}}}function o(u,l,s){if(l.length===0)return s;let c=u;for(let f=0;f<l.length;f++){if(c==null||t.isUnsafeProperty(l[f]))return s;c=c[l[f]]}return c===void 0?s:c}e.get=a})(qo)),qo}var Xo,Tf;function jx(){return Tf||(Tf=1,Xo=Ps().get),Xo}var kx=jx();const Pr=Cr(kx);var Cx=4;function Xt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Cx,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function se(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((i,a,o)=>{var u=r[o-1];return typeof u=="string"?i+u+a:u!==void 0?i+Xt(u)+a:i+a},"")}var Se=e=>e===0?0:e>0?1:-1,xt=e=>typeof e=="number"&&e!=+e,Or=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,L=e=>(typeof e=="number"||e instanceof Number)&&!xt(e),Pt=e=>L(e)||typeof e=="string",Tx=0,Dn=e=>{var t=++Tx;return"".concat(e||"").concat(t)},Ne=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!L(t)&&typeof t!="string")return n;var a;if(Or(t)){if(r==null)return n;var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return xt(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},Mm=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function de(e,t,r){return L(e)&&L(t)?Xt(e+r*(t-e)):t}function Ix(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Pr(n,t))===r)}var ge=e=>e===null||typeof e>"u",Yn=e=>ge(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function yt(e){return e!=null}function $t(){}var Mx=["type","size","sizeType"];function bl(){return bl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bl.apply(null,arguments)}function If(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?If(Object(r),!0).forEach(function(n){Dx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):If(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Dx(e,t,r){return(t=Nx(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nx(e){var t=Rx(e,"string");return typeof t=="symbol"?t:t+""}function Rx(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $x(e,t){if(e==null)return{};var r,n,i=Lx(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Lx(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Dm={symbolCircle:bs,symbolCross:Qw,symbolDiamond:ex,symbolSquare:tx,symbolStar:ax,symbolTriangle:ox,symbolWye:lx},Bx=Math.PI/180,zx=e=>{var t="symbol".concat(Yn(e));return Dm[t]||bs},Fx=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*Bx;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},Kx=(e,t)=>{Dm["symbol".concat(Yn(e))]=t},Os=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=$x(e,Mx),a=Mf(Mf({},i),{},{type:t,size:r,sizeType:n}),o="circle";typeof t=="string"&&(o=t);var u=()=>{var d=zx(o),p=sx().type(d).size(Fx(r,n,o)),h=p();if(h!==null)return h},{className:l,cx:s,cy:c}=a,f=De(a);return L(s)&&L(c)&&L(r)?v.createElement("path",bl({},f,{className:U("recharts-symbols",l),transform:"translate(".concat(s,", ").concat(c,")"),d:u()})):null};Os.registerSymbol=Kx;var Nm=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Rm=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(v.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{hs(i)&&typeof r[i]=="function"&&(n[i]=(a=>r[i](r,a)))}),n},Wx=(e,t,r)=>n=>(e(t,r,n),null),ir=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];hs(i)&&typeof a=="function"&&(n||(n={}),n[i]=Wx(a,t,r))}),n};function Df(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Df(Object(r),!0).forEach(function(n){Ux(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Df(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ux(e,t,r){return(t=Hx(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hx(e){var t=Yx(e,"string");return typeof t=="symbol"?t:t+""}function Yx(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function be(e,t){var r=qx({},e),n=t,i=Object.keys(t),a=i.reduce((o,u)=>(o[u]===void 0&&n[u]!==void 0&&(o[u]=n[u]),o),r);return a}function Ji(){return Ji=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ji.apply(null,arguments)}function Nf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $m(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Nf(Object(r),!0).forEach(function(n){Gx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Gx(e,t,r){return(t=Vx(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vx(e){var t=Xx(e,"string");return typeof t=="symbol"?t:t+""}function Xx(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var it=32,Zx={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function Qx(e){if(typeof e=="object"&&e!==null&&"strokeDasharray"in e)return String(e.strokeDasharray)}function Jx(e){var{data:t,iconType:r,inactiveColor:n}=e,i=it/2,a=it/6,o=it/3,u=t.inactive?n:t.color,l=r??t.type;if(l==="none")return null;if(l==="plainline")return v.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:Qx(t.payload),x1:0,y1:i,x2:it,y2:i,className:"recharts-legend-icon"});if(l==="line")return v.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(i,"h").concat(o,`
2
2
  A`).concat(a,",").concat(a,",0,1,1,").concat(2*o,",").concat(i,`
3
3
  H`).concat(it,"M").concat(2*o,",").concat(i,`
4
4
  A`).concat(a,",").concat(a,",0,1,1,").concat(o,",").concat(i),className:"recharts-legend-icon"});if(l==="rect")return v.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(it/8,"h").concat(it,"v").concat(it*3/4,"h").concat(-it,"z"),className:"recharts-legend-icon"});if(v.isValidElement(t.legendIcon)){var s=$m({},t);return delete s.legendIcon,v.cloneElement(t.legendIcon,s)}return v.createElement(Os,{fill:u,cx:i,cy:i,size:it,sizeType:"diameter",type:l})}function eP(e){var{payload:t,iconSize:r,layout:n,formatter:i,inactiveColor:a,iconType:o,labelStyle:u}=e,l={x:0,y:0,width:it,height:it},s={display:n==="horizontal"?"inline-block":"block",marginRight:10},c={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((f,d)=>{var p=f.formatter||i,h=U({"recharts-legend-item":!0,["legend-item-".concat(d)]:!0,inactive:f.inactive});if(f.type==="none")return null;var m=typeof u=="object"?$m({},u):{};m.color=f.inactive?a:m.color||f.color;var y=p?p(f.value,f,d):f.value;return v.createElement("li",Ji({className:h,style:s,key:"legend-item-".concat(d)},ir(e,f,d)),v.createElement(ms,{width:r,height:r,viewBox:l,style:c,"aria-label":"".concat(y," legend icon")},v.createElement(Jx,{data:f,iconType:o,inactiveColor:a})),v.createElement("span",{className:"recharts-legend-item-text",style:m},y))})}var tP=e=>{var t=be(e,Zx),{payload:r,layout:n,align:i}=t;if(!r||!r.length)return null;var a={padding:0,margin:0,textAlign:n==="horizontal"?i:"left"};return v.createElement("ul",{className:"recharts-default-legend",style:a},v.createElement(eP,Ji({},t,{payload:r})))},Zo={},Qo={},Rf;function rP(){return Rf||(Rf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const i=new Map;for(let a=0;a<r.length;a++){const o=r[a],u=n(o,a,r);i.has(u)||i.set(u,o)}return Array.from(i.values())}e.uniqBy=t})(Qo)),Qo}var Jo={},$f;function nP(){return $f||($f=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return function(...i){return r.apply(this,i.slice(0,n))}}e.ary=t})(Jo)),Jo}var eu={},Lf;function Lm(){return Lf||(Lf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(eu)),eu}var tu={},ru={},nu={},Bf;function iP(){return Bf||(Bf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(nu)),nu}var zf;function Bm(){return zf||(zf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iP();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(ru)),ru}var iu={},Ff;function aP(){return Ff||(Ff=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(iu)),iu}var Kf;function oP(){return Kf||(Kf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Bm(),r=aP();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})(tu)),tu}var au={},ou={},Wf;function uP(){return Wf||(Wf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ps();function r(n){return function(i){return t.get(i,n)}}e.property=r})(ou)),ou}var uu={},lu={},su={},cu={},qf;function zm(){return qf||(qf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t})(cu)),cu}var fu={},Uf;function Fm(){return Uf||(Uf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(fu)),fu}var du={},Hf;function Km(){return Hf||(Hf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.isEqualsSameValueZero=t})(du)),du}var Yf;function lP(){return Yf||(Yf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zm(),r=Fm(),n=Km();function i(c,f,d){return typeof d!="function"?i(c,f,()=>{}):a(c,f,function p(h,m,y,g,b,P){const x=d(h,m,y,g,b,P);return x!==void 0?!!x:a(h,m,p,P)},new Map)}function a(c,f,d,p){if(f===c)return!0;switch(typeof f){case"object":return o(c,f,d,p);case"function":return Object.keys(f).length>0?a(c,{...f},d,p):n.isEqualsSameValueZero(c,f);default:return t.isObject(c)?typeof f=="string"?f==="":!0:n.isEqualsSameValueZero(c,f)}}function o(c,f,d,p){if(f==null)return!0;if(Array.isArray(f))return l(c,f,d,p);if(f instanceof Map)return u(c,f,d,p);if(f instanceof Set)return s(c,f,d,p);const h=Object.keys(f);if(c==null||r.isPrimitive(c))return h.length===0;if(h.length===0)return!0;if(p!=null&&p.has(f))return p.get(f)===c;p==null||p.set(f,c);try{for(let m=0;m<h.length;m++){const y=h[m];if(!r.isPrimitive(c)&&!(y in c)||f[y]===void 0&&c[y]!==void 0||f[y]===null&&c[y]!==null||!d(c[y],f[y],y,c,f,p))return!1}return!0}finally{p==null||p.delete(f)}}function u(c,f,d,p){if(f.size===0)return!0;if(!(c instanceof Map))return!1;for(const[h,m]of f.entries()){const y=c.get(h);if(d(y,m,h,c,f,p)===!1)return!1}return!0}function l(c,f,d,p){if(f.length===0)return!0;if(!Array.isArray(c))return!1;const h=new Set;for(let m=0;m<f.length;m++){const y=f[m];let g=!1;for(let b=0;b<c.length;b++){if(h.has(b))continue;const P=c[b];let x=!1;if(d(P,y,m,c,f,p)&&(x=!0),x){h.add(b),g=!0;break}}if(!g)return!1}return!0}function s(c,f,d,p){return f.size===0?!0:c instanceof Set?l([...c],[...f],d,p):!1}e.isMatchWith=i,e.isSetMatch=s})(su)),su}var Gf;function Wm(){return Gf||(Gf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lP();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(lu)),lu}var vu={},pu={},hu={},Vf;function sP(){return Vf||(Vf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})(hu)),hu}var mu={},Xf;function Ss(){return Xf||(Xf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(mu)),mu}var yu={},Zf;function qm(){return Zf||(Zf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",i="[object Boolean]",a="[object Arguments]",o="[object Symbol]",u="[object Date]",l="[object Map]",s="[object Set]",c="[object Array]",f="[object Function]",d="[object ArrayBuffer]",p="[object Object]",h="[object Error]",m="[object DataView]",y="[object Uint8Array]",g="[object Uint8ClampedArray]",b="[object Uint16Array]",P="[object Uint32Array]",x="[object BigUint64Array]",O="[object Int8Array]",w="[object Int16Array]",A="[object Int32Array]",_="[object BigInt64Array]",k="[object Float32Array]",C="[object Float64Array]";e.argumentsTag=a,e.arrayBufferTag=d,e.arrayTag=c,e.bigInt64ArrayTag=_,e.bigUint64ArrayTag=x,e.booleanTag=i,e.dataViewTag=m,e.dateTag=u,e.errorTag=h,e.float32ArrayTag=k,e.float64ArrayTag=C,e.functionTag=f,e.int16ArrayTag=w,e.int32ArrayTag=A,e.int8ArrayTag=O,e.mapTag=l,e.numberTag=n,e.objectTag=p,e.regexpTag=t,e.setTag=s,e.stringTag=r,e.symbolTag=o,e.uint16ArrayTag=b,e.uint32ArrayTag=P,e.uint8ArrayTag=y,e.uint8ClampedArrayTag=g})(yu)),yu}var gu={},Qf;function cP(){return Qf||(Qf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(gu)),gu}var Jf;function Um(){return Jf||(Jf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=sP(),r=Ss(),n=qm(),i=Fm(),a=cP();function o(c,f){return u(c,void 0,c,new Map,f)}function u(c,f,d,p=new Map,h=void 0){const m=h==null?void 0:h(c,f,d,p);if(m!==void 0)return m;if(i.isPrimitive(c))return c;if(p.has(c))return p.get(c);if(Array.isArray(c)){const y=new Array(c.length);p.set(c,y);for(let g=0;g<c.length;g++)y[g]=u(c[g],g,d,p,h);return Object.hasOwn(c,"index")&&(y.index=c.index),Object.hasOwn(c,"input")&&(y.input=c.input),y}if(c instanceof Date)return new Date(c.getTime());if(c instanceof RegExp){const y=new RegExp(c.source,c.flags);return y.lastIndex=c.lastIndex,y}if(c instanceof Map){const y=new Map;p.set(c,y);for(const[g,b]of c)y.set(g,u(b,g,d,p,h));return y}if(c instanceof Set){const y=new Set;p.set(c,y);for(const g of c)y.add(u(g,void 0,d,p,h));return y}if(typeof Buffer<"u"&&Buffer.isBuffer(c))return c.subarray();if(a.isTypedArray(c)){const y=new(Object.getPrototypeOf(c)).constructor(c.length);p.set(c,y);for(let g=0;g<c.length;g++)y[g]=u(c[g],g,d,p,h);return y}if(c instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&c instanceof SharedArrayBuffer)return c.slice(0);if(c instanceof DataView){const y=new DataView(c.buffer.slice(0),c.byteOffset,c.byteLength);return p.set(c,y),l(y,c,d,p,h),y}if(typeof File<"u"&&c instanceof File){const y=new File([c],c.name,{type:c.type});return p.set(c,y),l(y,c,d,p,h),y}if(typeof Blob<"u"&&c instanceof Blob){const y=new Blob([c],{type:c.type});return p.set(c,y),l(y,c,d,p,h),y}if(c instanceof Error){const y=structuredClone(c);return p.set(c,y),y.message=c.message,y.name=c.name,y.stack=c.stack,y.cause=c.cause,y.constructor=c.constructor,l(y,c,d,p,h),y}if(c instanceof Boolean){const y=new Boolean(c.valueOf());return p.set(c,y),l(y,c,d,p,h),y}if(c instanceof Number){const y=new Number(c.valueOf());return p.set(c,y),l(y,c,d,p,h),y}if(c instanceof String){const y=new String(c.valueOf());return p.set(c,y),l(y,c,d,p,h),y}if(typeof c=="object"&&s(c)){const y=Object.create(Object.getPrototypeOf(c));return p.set(c,y),l(y,c,d,p,h),y}return c}function l(c,f,d=c,p,h){const m=[...Object.keys(f),...t.getSymbols(f)];for(let y=0;y<m.length;y++){const g=m[y],b=Object.getOwnPropertyDescriptor(c,g);(b==null||b.writable)&&(c[g]=u(f[g],g,d,p,h))}}function s(c){switch(r.getTag(c)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=o,e.cloneDeepWithImpl=u,e.copyProperties=l})(pu)),pu}var ed;function fP(){return ed||(ed=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Um();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(vu)),vu}var td;function dP(){return td||(td=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Wm(),r=fP();function n(i){return i=r.cloneDeep(i),a=>t.isMatch(a,i)}e.matches=n})(uu)),uu}var bu={},wu={},xu={},rd;function vP(){return rd||(rd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Um(),r=Ss(),n=qm();function i(a,o){return t.cloneDeepWith(a,(u,l,s,c)=>{const f=o==null?void 0:o(u,l,s,c);if(f!==void 0)return f;if(typeof a=="object"){if(r.getTag(a)===n.objectTag&&typeof a.constructor!="function"){const d={};return c.set(a,d),t.copyProperties(d,a,s,c),d}switch(Object.prototype.toString.call(a)){case n.numberTag:case n.stringTag:case n.booleanTag:{const d=new a.constructor(a==null?void 0:a.valueOf());return t.copyProperties(d,a),d}case n.argumentsTag:{const d={};return t.copyProperties(d,a),d.length=a.length,d[Symbol.iterator]=a[Symbol.iterator],d}default:return}}})}e.cloneDeepWith=i})(xu)),xu}var nd;function pP(){return nd||(nd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vP();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(wu)),wu}var Pu={},Ou={},id;function Hm(){return id||(id=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(n,i=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n<i;case"symbol":return!1;case"string":return t.test(n)}}e.isIndex=r})(Ou)),Ou}var Su={},ad;function hP(){return ad||(ad=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ss();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(Su)),Su}var od;function mP(){return od||(od=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Im(),r=Hm(),n=hP(),i=xs();function a(o,u){let l;if(Array.isArray(u)?l=u:typeof u=="string"&&t.isDeepKey(u)&&(o==null?void 0:o[u])==null?l=i.toPath(u):l=[u],l.length===0)return!1;let s=o;for(let c=0;c<l.length;c++){const f=l[c];if((s==null||!Object.hasOwn(s,f))&&!((Array.isArray(s)||n.isArguments(s))&&r.isIndex(f)&&f<s.length))return!1;s=s[f]}return!0}e.has=a})(Pu)),Pu}var ud;function yP(){return ud||(ud=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Wm(),r=ws(),n=pP(),i=Ps(),a=mP();function o(u,l){switch(typeof u){case"object":{Object.is(u==null?void 0:u.valueOf(),-0)&&(u="-0");break}case"number":{u=r.toKey(u);break}}return l=n.cloneDeep(l),function(s){const c=i.get(s,u);return c===void 0?a.has(s,u):l===void 0?c===void 0:t.isMatch(c,l)}}e.matchesProperty=o})(bu)),bu}var ld;function gP(){return ld||(ld=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Lm(),r=uP(),n=dP(),i=yP();function a(o){if(o==null)return t.identity;switch(typeof o){case"function":return o;case"object":return Array.isArray(o)&&o.length===2?i.matchesProperty(o[0],o[1]):n.matches(o);case"string":case"symbol":case"number":return r.property(o)}}e.iteratee=a})(au)),au}var sd;function bP(){return sd||(sd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rP(),r=nP(),n=Lm(),i=oP(),a=gP();function o(u,l=n.identity){return i.isArrayLikeObject(u)?t.uniqBy(Array.from(u),r.ary(a.iteratee(l),1)):[]}e.uniqBy=o})(Zo)),Zo}var Au,cd;function wP(){return cd||(cd=1,Au=bP().uniqBy),Au}var xP=wP();const fd=Cr(xP);function Ym(e,t,r){return t===!0?fd(e,r):typeof t=="function"?fd(e,t):e}var As=v.createContext(null),PP=e=>e,Q=()=>{var e=v.useContext(As);return e?e.store.dispatch:PP},Wi=()=>{},OP=()=>Wi,SP=(e,t)=>e===t;function D(e){var t=v.useContext(As),r=v.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Wi,[t,e]);return jw.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:OP,t?t.store.getState:Wi,t?t.store.getState:Wi,r,SP)}function AP(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function EP(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function _P(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var dd=e=>Array.isArray(e)?e:[e];function jP(e){const t=Array.isArray(e[0])?e[0]:e;return _P(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function kP(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var CP=class{constructor(e){this.value=e}deref(){return this.value}},TP=typeof WeakRef<"u"?WeakRef:CP,IP=0,vd=1;function Ai(){return{s:IP,v:void 0,o:null,p:null}}function Gm(e,t={}){let r=Ai();const{resultEqualityCheck:n}=t;let i,a=0;function o(){var f;let u=r;const{length:l}=arguments;for(let d=0,p=l;d<p;d++){const h=arguments[d];if(typeof h=="function"||typeof h=="object"&&h!==null){let m=u.o;m===null&&(u.o=m=new WeakMap);const y=m.get(h);y===void 0?(u=Ai(),m.set(h,u)):u=y}else{let m=u.p;m===null&&(u.p=m=new Map);const y=m.get(h);y===void 0?(u=Ai(),m.set(h,u)):u=y}}const s=u;let c;if(u.s===vd)c=u.v;else if(c=e.apply(null,arguments),a++,n){const d=((f=i==null?void 0:i.deref)==null?void 0:f.call(i))??i;d!=null&&n(d,c)&&(c=d,a!==0&&a--),i=typeof c=="object"&&c!==null||typeof c=="function"?new TP(c):c}return s.s=vd,s.v=c,c}return o.clearCache=()=>{r=Ai(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function MP(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let a=0,o=0,u,l={},s=i.pop();typeof s=="object"&&(l=s,s=i.pop()),AP(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);const c={...r,...l},{memoize:f,memoizeOptions:d=[],argsMemoize:p=Gm,argsMemoizeOptions:h=[]}=c,m=dd(d),y=dd(h),g=jP(i),b=f(function(){return a++,s.apply(null,arguments)},...m),P=p(function(){o++;const O=kP(g,arguments);return u=b.apply(null,O),u},...y);return Object.assign(P,{resultFunc:s,memoizedResultFunc:b,dependencies:g,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>u,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:p})};return Object.assign(n,{withTypes:()=>n}),n}var S=MP(Gm),DP=Object.assign((e,t=S)=>{EP(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(a=>e[a]);return t(n,(...a)=>a.reduce((o,u,l)=>(o[r[l]]=u,o),{}))},{withTypes:()=>DP}),Eu={},_u={},ju={},pd;function NP(){return pd||(pd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,i,a)=>{if(n!==i){const o=t(n),u=t(i);if(o===u&&o===0){if(n<i)return a==="desc"?1:-1;if(n>i)return a==="desc"?-1:1}return a==="desc"?u-o:o-u}return 0};e.compareValues=r})(ju)),ju}var ku={},Cu={},hd;function Vm(){return hd||(hd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(Cu)),Cu}var md;function RP(){return md||(md=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Vm(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){return Array.isArray(a)?!1:typeof a=="number"||typeof a=="boolean"||a==null||t.isSymbol(a)?!0:typeof a=="string"&&(n.test(a)||!r.test(a))||o!=null&&Object.hasOwn(o,a)}e.isKey=i})(ku)),ku}var yd;function $P(){return yd||(yd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=NP(),r=RP(),n=xs();function i(a,o,u,l){if(a==null)return[];u=l?void 0:u,Array.isArray(a)||(a=Object.values(a)),Array.isArray(o)||(o=o==null?[null]:[o]),o.length===0&&(o=[null]),Array.isArray(u)||(u=u==null?[]:[u]),u=u.map(p=>String(p));const s=(p,h)=>{let m=p;for(let y=0;y<h.length&&m!=null;++y)m=m[h[y]];return m},c=(p,h)=>h==null||p==null?h:typeof p=="object"&&"key"in p?Object.hasOwn(h,p.key)?h[p.key]:s(h,p.path):typeof p=="function"?p(h):Array.isArray(p)?s(h,p):typeof h=="object"?h[p]:h,f=o.map(p=>(Array.isArray(p)&&p.length===1&&(p=p[0]),p==null||typeof p=="function"||Array.isArray(p)||r.isKey(p)?p:{key:p,path:n.toPath(p)}));return a.map(p=>({original:p,criteria:f.map(h=>c(h,p))})).slice().sort((p,h)=>{for(let m=0;m<f.length;m++){const y=t.compareValues(p.criteria[m],h.criteria[m],u[m]);if(y!==0)return y}return 0}).map(p=>p.original)}e.orderBy=i})(_u)),_u}var Tu={},gd;function LP(){return gd||(gd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const i=[],a=Math.floor(n),o=(u,l)=>{for(let s=0;s<u.length;s++){const c=u[s];Array.isArray(c)&&l<a?o(c,l+1):i.push(c)}};return o(r,0),i}e.flatten=t})(Tu)),Tu}var Iu={},bd;function Xm(){return bd||(bd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Hm(),r=Bm(),n=zm(),i=Km();function a(o,u,l){return n.isObject(l)&&(typeof u=="number"&&r.isArrayLike(l)&&t.isIndex(u)&&u<l.length||typeof u=="string"&&u in l)?i.isEqualsSameValueZero(l[u],o):!1}e.isIterateeCall=a})(Iu)),Iu}var wd;function BP(){return wd||(wd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$P(),r=LP(),n=Xm();function i(a,...o){const u=o.length;return u>1&&n.isIterateeCall(a,o[0],o[1])?o=[]:u>2&&n.isIterateeCall(o[0],o[1],o[2])&&(o=[o[0]]),t.orderBy(a,r.flatten(o),["asc"])}e.sortBy=i})(Eu)),Eu}var Mu,xd;function zP(){return xd||(xd=1,Mu=BP().sortBy),Mu}var FP=zP();const Ua=Cr(FP);var Zm=e=>e.legend.settings,KP=e=>e.legend.size,WP=e=>e.legend.payload,qP=S([WP,Zm],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?Ua(n,r):n});function UP(){return D(qP)}var Ei=1;function Qm(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=v.useState({height:0,left:0,top:0,width:0}),n=v.useCallback(i=>{if(i!=null){var a=i.getBoundingClientRect(),o={height:a.height,left:a.left,top:a.top,width:a.width};(Math.abs(o.height-t.height)>Ei||Math.abs(o.left-t.left)>Ei||Math.abs(o.top-t.top)>Ei||Math.abs(o.width-t.width)>Ei)&&r({height:o.height,left:o.left,top:o.top,width:o.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function Ce(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var HP=typeof Symbol=="function"&&Symbol.observable||"@@observable",Pd=HP,Du=()=>Math.random().toString(36).substring(7).split("").join("."),YP={INIT:`@@redux/INIT${Du()}`,REPLACE:`@@redux/REPLACE${Du()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Du()}`},ea=YP;function Es(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Jm(e,t,r){if(typeof e!="function")throw new Error(Ce(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ce(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ce(1));return r(Jm)(e,t)}let n=e,i=t,a=new Map,o=a,u=0,l=!1;function s(){o===a&&(o=new Map,a.forEach((y,g)=>{o.set(g,y)}))}function c(){if(l)throw new Error(Ce(3));return i}function f(y){if(typeof y!="function")throw new Error(Ce(4));if(l)throw new Error(Ce(5));let g=!0;s();const b=u++;return o.set(b,y),function(){if(g){if(l)throw new Error(Ce(6));g=!1,s(),o.delete(b),a=null}}}function d(y){if(!Es(y))throw new Error(Ce(7));if(typeof y.type>"u")throw new Error(Ce(8));if(typeof y.type!="string")throw new Error(Ce(17));if(l)throw new Error(Ce(9));try{l=!0,i=n(i,y)}finally{l=!1}return(a=o).forEach(b=>{b()}),y}function p(y){if(typeof y!="function")throw new Error(Ce(10));n=y,d({type:ea.REPLACE})}function h(){const y=f;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(Ce(11));function b(){const x=g;x.next&&x.next(c())}return b(),{unsubscribe:y(b)}},[Pd](){return this}}}return d({type:ea.INIT}),{dispatch:d,subscribe:f,getState:c,replaceReducer:p,[Pd]:h}}function GP(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:ea.INIT})>"u")throw new Error(Ce(12));if(typeof r(void 0,{type:ea.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ce(13))})}function ey(e){const t=Object.keys(e),r={};for(let a=0;a<t.length;a++){const o=t[a];typeof e[o]=="function"&&(r[o]=e[o])}const n=Object.keys(r);let i;try{GP(r)}catch(a){i=a}return function(o={},u){if(i)throw i;let l=!1;const s={};for(let c=0;c<n.length;c++){const f=n[c],d=r[f],p=o[f],h=d(p,u);if(typeof h>"u")throw u&&u.type,new Error(Ce(14));s[f]=h,l=l||h!==p}return l=l||n.length!==Object.keys(o).length,l?s:o}}function ta(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function VP(...e){return t=>(r,n)=>{const i=t(r,n);let a=()=>{throw new Error(Ce(15))};const o={getState:i.getState,dispatch:(l,...s)=>a(l,...s)},u=e.map(l=>l(o));return a=ta(...u)(i.dispatch),{...i,dispatch:a}}}function ty(e){return Es(e)&&"type"in e&&typeof e.type=="string"}var ry=Symbol.for("immer-nothing"),Od=Symbol.for("immer-draftable"),Fe=Symbol.for("immer-state");function ct(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ze=Object,Vr=Ze.getPrototypeOf,ra="constructor",Ha="prototype",wl="configurable",na="enumerable",qi="writable",Nn="value",It=e=>!!e&&!!e[Fe];function dt(e){var t;return e?ny(e)||Ga(e)||!!e[Od]||!!((t=e[ra])!=null&&t[Od])||Va(e)||Xa(e):!1}var XP=Ze[Ha][ra].toString(),Sd=new WeakMap;function ny(e){if(!e||!_s(e))return!1;const t=Vr(e);if(t===null||t===Ze[Ha])return!0;const r=Ze.hasOwnProperty.call(t,ra)&&t[ra];if(r===Object)return!0;if(!Wr(r))return!1;let n=Sd.get(r);return n===void 0&&(n=Function.toString.call(r),Sd.set(r,n)),n===XP}function Ya(e,t,r=!0){Gn(e)===0?(r?Reflect.ownKeys(e):Ze.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Gn(e){const t=e[Fe];return t?t.type_:Ga(e)?1:Va(e)?2:Xa(e)?3:0}var Ad=(e,t,r=Gn(e))=>r===2?e.has(t):Ze[Ha].hasOwnProperty.call(e,t),xl=(e,t,r=Gn(e))=>r===2?e.get(t):e[t],ia=(e,t,r,n=Gn(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function ZP(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Ga=Array.isArray,Va=e=>e instanceof Map,Xa=e=>e instanceof Set,_s=e=>typeof e=="object",Wr=e=>typeof e=="function",Nu=e=>typeof e=="boolean";function QP(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var _t=e=>e.copy_||e.base_,js=e=>e.modified_?e.copy_:e.base_;function Pl(e,t){if(Va(e))return new Map(e);if(Xa(e))return new Set(e);if(Ga(e))return Array[Ha].slice.call(e);const r=ny(e);if(t===!0||t==="class_only"&&!r){const n=Ze.getOwnPropertyDescriptors(e);delete n[Fe];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const o=i[a],u=n[o];u[qi]===!1&&(u[qi]=!0,u[wl]=!0),(u.get||u.set)&&(n[o]={[wl]:!0,[qi]:!0,[na]:u[na],[Nn]:e[o]})}return Ze.create(Vr(e),n)}else{const n=Vr(e);if(n!==null&&r)return{...e};const i=Ze.create(n);return Ze.assign(i,e)}}function ks(e,t=!1){return Za(e)||It(e)||!dt(e)||(Gn(e)>1&&Ze.defineProperties(e,{set:_i,add:_i,clear:_i,delete:_i}),Ze.freeze(e),t&&Ya(e,(r,n)=>{ks(n,!0)},!1)),e}function JP(){ct(2)}var _i={[Nn]:JP};function Za(e){return e===null||!_s(e)?!0:Ze.isFrozen(e)}var aa="MapSet",Ol="Patches",Ed="ArrayMethods",iy={};function Sr(e){const t=iy[e];return t||ct(0,e),t}var _d=e=>!!iy[e],Rn,ay=()=>Rn,eO=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:_d(aa)?Sr(aa):void 0,arrayMethodsPlugin_:_d(Ed)?Sr(Ed):void 0});function jd(e,t){t&&(e.patchPlugin_=Sr(Ol),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Sl(e){Al(e),e.drafts_.forEach(tO),e.drafts_=null}function Al(e){e===Rn&&(Rn=e.parent_)}var kd=e=>Rn=eO(Rn,e);function tO(e){const t=e[Fe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Cd(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Fe].modified_&&(Sl(t),ct(4)),dt(e)&&(e=Td(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[Fe].base_,e,t)}else e=Td(t,r);return rO(t,e,!0),Sl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ry?e:void 0}function Td(e,t){if(Za(t))return t;const r=t[Fe];if(!r)return oa(t,e.handledSet_,e);if(!Qa(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);ly(r,e)}return r.copy_}function rO(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ks(t,r)}function oy(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Qa=(e,t)=>e.scope_===t,nO=[];function uy(e,t,r,n){const i=_t(e),a=e.type_;if(n!==void 0&&xl(i,n,a)===t){ia(i,n,r,a);return}if(!e.draftLocations_){const u=e.draftLocations_=new Map;Ya(i,(l,s)=>{if(It(s)){const c=u.get(s)||[];c.push(l),u.set(s,c)}})}const o=e.draftLocations_.get(t)??nO;for(const u of o)ia(i,u,r,a)}function iO(e,t,r){e.callbacks_.push(function(i){var u;const a=t;if(!a||!Qa(a,i))return;(u=i.mapSetPlugin_)==null||u.fixSetContents(a);const o=js(a);uy(e,a.draft_??a,o,r),ly(a,i)})}function ly(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:i}=t;if(i){const a=i.getPath(e);a&&i.generatePatches_(e,a,t)}oy(e)}}function aO(e,t,r){const{scope_:n}=e;if(It(r)){const i=r[Fe];Qa(i,n)&&i.callbacks_.push(function(){Ui(e);const o=js(i);uy(e,r,o,t)})}else dt(r)&&e.callbacks_.push(function(){const a=_t(e);e.type_===3?a.has(r)&&oa(r,n.handledSet_,n):xl(a,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&oa(xl(e.copy_,t,e.type_),n.handledSet_,n)})}function oa(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||It(e)||t.has(e)||!dt(e)||Za(e)||(t.add(e),Ya(e,(n,i)=>{if(It(i)){const a=i[Fe];if(Qa(a,r)){const o=js(a);ia(e,n,o,e.type_),oy(a)}}else dt(i)&&oa(i,t,r)})),e}function oO(e,t){const r=Ga(e),n={type_:r?1:0,scope_:t?t.scope_:ay(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,a=ua;r&&(i=[n],a=$n);const{revoke:o,proxy:u}=Proxy.revocable(i,a);return n.draft_=u,n.revoke_=o,[u,n]}var ua={get(e,t){if(t===Fe)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const i=_t(e);if(!Ad(i,t,e.type_))return uO(e,i,t);const a=i[t];if(e.finalized_||!dt(a)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&QP(t))return a;if(a===Ru(e.base_,t)){Ui(e);const o=e.type_===1?+t:t,u=_l(e.scope_,a,e,o);return e.copy_[o]=u}return a},has(e,t){return t in _t(e)},ownKeys(e){return Reflect.ownKeys(_t(e))},set(e,t,r){const n=sy(_t(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Ru(_t(e),t),a=i==null?void 0:i[Fe];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(ZP(r,i)&&(r!==void 0||Ad(e.base_,t,e.type_)))return!0;Ui(e),El(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),aO(e,t,r)),!0},deleteProperty(e,t){return Ui(e),Ru(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),El(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=_t(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[qi]:!0,[wl]:e.type_!==1||t!=="length",[na]:n[na],[Nn]:r[t]}},defineProperty(){ct(11)},getPrototypeOf(e){return Vr(e.base_)},setPrototypeOf(){ct(12)}},$n={};for(let e in ua){let t=ua[e];$n[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}$n.deleteProperty=function(e,t){return $n.set.call(this,e,t,void 0)};$n.set=function(e,t,r){return ua.set.call(this,e[0],t,r,e[0])};function Ru(e,t){const r=e[Fe];return(r?_t(r):e)[t]}function uO(e,t,r){var i;const n=sy(t,r);return n?Nn in n?n[Nn]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function sy(e,t){if(!(t in e))return;let r=Vr(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Vr(r)}}function El(e){e.modified_||(e.modified_=!0,e.parent_&&El(e.parent_))}function Ui(e){e.copy_||(e.assigned_=new Map,e.copy_=Pl(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var lO=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(Wr(r)&&!Wr(n)){const o=n;n=r;const u=this;return function(s=o,...c){return u.produce(s,f=>n.call(this,f,...c))}}Wr(n)||ct(6),i!==void 0&&!Wr(i)&&ct(7);let a;if(dt(r)){const o=kd(this),u=_l(o,r,void 0);let l=!0;try{a=n(u),l=!1}finally{l?Sl(o):Al(o)}return jd(o,i),Cd(a,o)}else if(!r||!_s(r)){if(a=n(r),a===void 0&&(a=r),a===ry&&(a=void 0),this.autoFreeze_&&ks(a,!0),i){const o=[],u=[];Sr(Ol).generateReplacementPatches_(r,a,{patches_:o,inversePatches_:u}),i(o,u)}return a}else ct(1,r)},this.produceWithPatches=(r,n)=>{if(Wr(r))return(u,...l)=>this.produceWithPatches(u,s=>r(s,...l));let i,a;return[this.produce(r,n,(u,l)=>{i=u,a=l}),i,a]},Nu(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Nu(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Nu(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){dt(t)||ct(8),It(t)&&(t=ot(t));const r=kd(this),n=_l(r,t,void 0);return n[Fe].isManual_=!0,Al(r),n}finishDraft(t,r){const n=t&&t[Fe];(!n||!n.isManual_)&&ct(9);const{scope_:i}=n;return jd(i,r),Cd(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const a=r[n];if(a.path.length===0&&a.op==="replace"){t=a.value;break}}n>-1&&(r=r.slice(n+1));const i=Sr(Ol).applyPatches_;return It(t)?i(t,r):this.produce(t,a=>i(a,r))}};function _l(e,t,r,n){const[i,a]=Va(t)?Sr(aa).proxyMap_(t,r):Xa(t)?Sr(aa).proxySet_(t,r):oO(t,r);return((r==null?void 0:r.scope_)??ay()).drafts_.push(i),a.callbacks_=(r==null?void 0:r.callbacks_)??[],a.key_=n,r&&n!==void 0?iO(r,a,n):a.callbacks_.push(function(l){var c;(c=l.mapSetPlugin_)==null||c.fixSetContents(a);const{patchPlugin_:s}=l;a.modified_&&s&&s.generatePatches_(a,[],l)}),i}function ot(e){return It(e)||ct(10,e),cy(e)}function cy(e){if(!dt(e)||Za(e))return e;const t=e[Fe];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Pl(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Pl(e,!0);return Ya(r,(i,a)=>{ia(r,i,cy(a))},n),t&&(t.finalized_=!1),r}var sO=new lO,fy=sO.produce;function dy(e){return({dispatch:r,getState:n})=>i=>a=>typeof a=="function"?a(r,n,e):i(a)}var cO=dy(),fO=dy,dO=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ta:ta.apply(null,arguments)};function Je(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Qe(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>ty(n)&&n.type===e,r}var vy=class kn extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,kn.prototype)}static get[Symbol.species](){return kn}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new kn(...t[0].concat(this)):new kn(...t.concat(this))}};function Id(e){return dt(e)?fy(e,()=>{}):e}function ji(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function vO(e){return typeof e=="boolean"}var pO=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new vy;return r&&(vO(r)?o.push(cO):o.push(fO(r.extraArgument))),o},py="RTK_autoBatch",ae=()=>e=>({payload:e,meta:{[py]:!0}}),Md=e=>t=>{setTimeout(t,e)},hy=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,a=!1,o=!1;const u=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Md(10):e.type==="callback"?e.queueNotification:Md(e.timeout),s=()=>{o=!1,a&&(a=!1,u.forEach(c=>c()))};return Object.assign({},n,{subscribe(c){const f=()=>i&&c(),d=n.subscribe(f);return u.add(c),()=>{d(),u.delete(c)}},dispatch(c){var f;try{return i=!((f=c==null?void 0:c.meta)!=null&&f[py]),a=!i,a&&(o||(o=!0,l(s))),n.dispatch(c)}finally{i=!0}}})},hO=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new vy(e);return n&&i.push(hy(typeof n=="object"?n:void 0)),i};function mO(e){const t=pO(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{};let u;if(typeof r=="function")u=r;else if(Es(r))u=ey(r);else throw new Error(Qe(1));let l;typeof n=="function"?l=n(t):l=t();let s=ta;i&&(s=dO({trace:!1,...typeof i=="object"&&i}));const c=VP(...l),f=hO(c);let d=typeof o=="function"?o(f):f();const p=s(...d);return Jm(u,a,p)}function my(e){const t={},r=[];let n;const i={addCase(a,o){const u=typeof a=="string"?a:a.type;if(!u)throw new Error(Qe(28));if(u in t)throw new Error(Qe(29));return t[u]=o,i},addAsyncThunk(a,o){return o.pending&&(t[a.pending.type]=o.pending),o.rejected&&(t[a.rejected.type]=o.rejected),o.fulfilled&&(t[a.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:a.settled,reducer:o.settled}),i},addMatcher(a,o){return r.push({matcher:a,reducer:o}),i},addDefaultCase(a){return n=a,i}};return e(i),[t,r,n]}function yO(e){return typeof e=="function"}function gO(e,t){let[r,n,i]=my(t),a;if(yO(e))a=()=>Id(e());else{const u=Id(e);a=()=>u}function o(u=a(),l){let s=[r[l.type],...n.filter(({matcher:c})=>c(l)).map(({reducer:c})=>c)];return s.filter(c=>!!c).length===0&&(s=[i]),s.reduce((c,f)=>{if(f)if(It(c)){const p=f(c,l);return p===void 0?c:p}else{if(dt(c))return fy(c,d=>f(d,l));{const d=f(c,l);if(d===void 0){if(c===null)return c;throw Error("A case reducer on a non-draftable value must not return undefined")}return d}}return c},u)}return o.getInitialState=a,o}var bO="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",wO=(e=21)=>{let t="",r=e;for(;r--;)t+=bO[Math.random()*64|0];return t},xO=Symbol.for("rtk-slice-createasyncthunk");function PO(e,t){return`${e}/${t}`}function OO({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[xO];return function(i){const{name:a,reducerPath:o=a}=i;if(!a)throw new Error(Qe(11));const u=(typeof i.reducers=="function"?i.reducers(AO()):i.reducers)||{},l=Object.keys(u),s={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(x,O){const w=typeof x=="string"?x:x.type;if(!w)throw new Error(Qe(12));if(w in s.sliceCaseReducersByType)throw new Error(Qe(13));return s.sliceCaseReducersByType[w]=O,c},addMatcher(x,O){return s.sliceMatchers.push({matcher:x,reducer:O}),c},exposeAction(x,O){return s.actionCreators[x]=O,c},exposeCaseReducer(x,O){return s.sliceCaseReducersByName[x]=O,c}};l.forEach(x=>{const O=u[x],w={reducerName:x,type:PO(a,x),createNotation:typeof i.reducers=="function"};_O(O)?kO(w,O,c,t):EO(w,O,c)});function f(){const[x={},O=[],w=void 0]=typeof i.extraReducers=="function"?my(i.extraReducers):[i.extraReducers],A={...x,...s.sliceCaseReducersByType};return gO(i.initialState,_=>{for(let k in A)_.addCase(k,A[k]);for(let k of s.sliceMatchers)_.addMatcher(k.matcher,k.reducer);for(let k of O)_.addMatcher(k.matcher,k.reducer);w&&_.addDefaultCase(w)})}const d=x=>x,p=new Map,h=new WeakMap;let m;function y(x,O){return m||(m=f()),m(x,O)}function g(){return m||(m=f()),m.getInitialState()}function b(x,O=!1){function w(_){let k=_[x];return typeof k>"u"&&O&&(k=ji(h,w,g)),k}function A(_=d){const k=ji(p,O,()=>new WeakMap);return ji(k,_,()=>{const C={};for(const[T,j]of Object.entries(i.selectors??{}))C[T]=SO(j,_,()=>ji(h,_,g),O);return C})}return{reducerPath:x,getSelectors:A,get selectors(){return A(w)},selectSlice:w}}const P={name:a,reducer:y,actions:s.actionCreators,caseReducers:s.sliceCaseReducersByName,getInitialState:g,...b(o),injectInto(x,{reducerPath:O,...w}={}){const A=O??o;return x.inject({reducerPath:A,reducer:y},w),{...P,...b(A,!0)}}};return P}}function SO(e,t,r,n){function i(a,...o){let u=t(a);return typeof u>"u"&&n&&(u=r()),e(u,...o)}return i.unwrapped=e,i}var $e=OO();function AO(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function EO({type:e,reducerName:t,createNotation:r},n,i){let a,o;if("reducer"in n){if(r&&!jO(n))throw new Error(Qe(17));a=n.reducer,o=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?Je(e,o):Je(e))}function _O(e){return e._reducerDefinitionType==="asyncThunk"}function jO(e){return e._reducerDefinitionType==="reducerWithPrepare"}function kO({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Qe(18));const{payloadCreator:a,fulfilled:o,pending:u,rejected:l,settled:s,options:c}=r,f=i(e,a,c);n.exposeAction(t,f),o&&n.addCase(f.fulfilled,o),u&&n.addCase(f.pending,u),l&&n.addCase(f.rejected,l),s&&n.addMatcher(f.settled,s),n.exposeCaseReducer(t,{fulfilled:o||ki,pending:u||ki,rejected:l||ki,settled:s||ki})}function ki(){}var CO="task",yy="listener",gy="completed",Cs="cancelled",TO=`task-${Cs}`,IO=`task-${gy}`,jl=`${yy}-${Cs}`,MO=`${yy}-${gy}`,Ja=class{constructor(e){Fo(this,"name","TaskAbortError");Fo(this,"message");this.code=e,this.message=`${CO} ${Cs} (reason: ${e})`}},Ts=(e,t)=>{if(typeof e!="function")throw new TypeError(Qe(32))},la=()=>{},by=(e,t=la)=>(e.catch(t),e),wy=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),yr=e=>{if(e.aborted)throw new Ja(e.reason)};function xy(e,t){let r=la;return new Promise((n,i)=>{const a=()=>i(new Ja(e.reason));if(e.aborted){a();return}r=wy(e,a),t.finally(()=>r()).then(n,i)}).finally(()=>{r=la})}var DO=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Ja?"cancelled":"rejected",error:r}}finally{t==null||t()}},sa=e=>t=>by(xy(e,t).then(r=>(yr(e),r))),Py=e=>{const t=sa(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Yr}=Object,Dd={},eo="listenerMiddleware",NO=(e,t)=>{const r=n=>wy(e,()=>n.abort(e.reason));return(n,i)=>{Ts(n);const a=new AbortController;r(a);const o=DO(async()=>{yr(e),yr(a.signal);const u=await n({pause:sa(a.signal),delay:Py(a.signal),signal:a.signal});return yr(a.signal),u},()=>a.abort(IO));return i!=null&&i.autoJoin&&t.push(o.catch(la)),{result:sa(e)(o),cancel(){a.abort(TO)}}}},RO=(e,t)=>{const r=async(n,i)=>{yr(t);let a=()=>{};const u=[new Promise((l,s)=>{let c=e({predicate:n,effect:(f,d)=>{d.unsubscribe(),l([f,d.getState(),d.getOriginalState()])}});a=()=>{c(),s()}})];i!=null&&u.push(new Promise(l=>setTimeout(l,i,null)));try{const l=await xy(t,Promise.race(u));return yr(t),l}finally{a()}};return(n,i)=>by(r(n,i))},Oy=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=Je(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(Qe(21));return Ts(a),{predicate:i,type:t,effect:a}},Sy=Yr(e=>{const{type:t,predicate:r,effect:n}=Oy(e);return{id:wO(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Qe(22))}}},{withTypes:()=>Sy}),Nd=(e,t)=>{const{type:r,effect:n,predicate:i}=Oy(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===i)&&a.effect===n)},kl=e=>{e.pending.forEach(t=>{t.abort(jl)})},$O=(e,t)=>()=>{for(const r of t.keys())kl(r);e.clear()},Rd=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},Ay=Yr(Je(`${eo}/add`),{withTypes:()=>Ay}),LO=Je(`${eo}/removeAll`),Ey=Yr(Je(`${eo}/remove`),{withTypes:()=>Ey}),BO=(...e)=>{console.error(`${eo}/error`,...e)},Vn=(e={})=>{const t=new Map,r=new Map,n=p=>{const h=r.get(p)??0;r.set(p,h+1)},i=p=>{const h=r.get(p)??1;h===1?r.delete(p):r.set(p,h-1)},{extra:a,onError:o=BO}=e;Ts(o);const u=p=>(p.unsubscribe=()=>t.delete(p.id),t.set(p.id,p),h=>{p.unsubscribe(),h!=null&&h.cancelActive&&kl(p)}),l=p=>{const h=Nd(t,p)??Sy(p);return u(h)};Yr(l,{withTypes:()=>l});const s=p=>{const h=Nd(t,p);return h&&(h.unsubscribe(),p.cancelActive&&kl(h)),!!h};Yr(s,{withTypes:()=>s});const c=async(p,h,m,y)=>{const g=new AbortController,b=RO(l,g.signal),P=[];try{p.pending.add(g),n(p),await Promise.resolve(p.effect(h,Yr({},m,{getOriginalState:y,condition:(x,O)=>b(x,O).then(Boolean),take:b,delay:Py(g.signal),pause:sa(g.signal),extra:a,signal:g.signal,fork:NO(g.signal,P),unsubscribe:p.unsubscribe,subscribe:()=>{t.set(p.id,p)},cancelActiveListeners:()=>{p.pending.forEach((x,O,w)=>{x!==g&&(x.abort(jl),w.delete(x))})},cancel:()=>{g.abort(jl),p.pending.delete(g)},throwIfCancelled:()=>{yr(g.signal)}})))}catch(x){x instanceof Ja||Rd(o,x,{raisedBy:"effect"})}finally{await Promise.all(P),g.abort(MO),i(p),p.pending.delete(g)}},f=$O(t,r);return{middleware:p=>h=>m=>{if(!ty(m))return h(m);if(Ay.match(m))return l(m.payload);if(LO.match(m)){f();return}if(Ey.match(m))return s(m.payload);let y=p.getState();const g=()=>{if(y===Dd)throw new Error(Qe(23));return y};let b;try{if(b=h(m),t.size>0){const P=p.getState(),x=Array.from(t.values());for(const O of x){let w=!1;try{w=O.predicate(m,P,y)}catch(A){w=!1,Rd(o,A,{raisedBy:"predicate"})}w&&c(O,m,p,g)}}}finally{y=Dd}return b},startListening:l,stopListening:s,clearListeners:f}};function Qe(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var zO={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},_y=$e({name:"chartLayout",initialState:zO,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,a;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(a=t.payload.left)!==null&&a!==void 0?a:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:FO,setLayout:KO,setChartSize:WO,setScale:qO}=_y.actions,UO=_y.reducer;function jy(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function V(e){return Number.isFinite(e)}function Jt(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function $d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$d(Object(r),!0).forEach(function(n){HO(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$d(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HO(e,t,r){return(t=YO(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YO(e){var t=GO(e,"string");return typeof t=="symbol"?t:t+""}function GO(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ne(e,t,r){return ge(e)||ge(t)?r:Pt(t)?Pr(e,t,r):typeof t=="function"?t(e):r}var VO=(e,t,r)=>{if(t&&r){var{width:n,height:i}=r,{align:a,verticalAlign:o,layout:u}=t;if((u==="vertical"||u==="horizontal"&&o==="middle")&&a!=="center"&&L(e[a]))return qr(qr({},e),{},{[a]:e[a]+(n||0)});if((u==="horizontal"||u==="vertical"&&a==="center")&&o!=="middle"&&L(e[o]))return qr(qr({},e),{},{[o]:e[o]+(i||0)})}return e},Lt=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",ky=(e,t)=>{if(!t||t.length!==2||!L(t[0])||!L(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!L(e[0])||e[0]<r)&&(i[0]=r),(!L(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},XO=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i<n;++i)for(var a=0,o=0,u=0;u<r;++u){var l=e[u],s=l==null?void 0:l[i];if(s!=null){var c=s[1],f=s[0],d=xt(c)?f:c;d>=0?(s[0]=a,a+=d,s[1]=a):(s[0]=o,o+=d,s[1]=o)}}}},ZO=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i<n;++i)for(var a=0,o=0;o<r;++o){var u=e[o],l=u==null?void 0:u[i];if(l!=null){var s=xt(l[1])?l[0]:l[1];s>=0?(l[0]=a,a+=s,l[1]=a):(l[0]=0,l[1]=0)}}}},QO={sign:XO,expand:Ox,none:xr,silhouette:Sx,wiggle:Ax,positive:ZO},JO=(e,t,r)=>{var n,i=(n=QO[r])!==null&&n!==void 0?n:xr,a=Px().keys(t).value((u,l)=>Number(ne(u,l,0))).order(gl).offset(i),o=a(e);return o.forEach((u,l)=>{u.forEach((s,c)=>{var f=ne(e[c],t[l],0);Array.isArray(f)&&f.length===2&&L(f[0])&&L(f[1])&&(s[0]=f[0],s[1]=f[1])})}),o};function Is(e){return e==null?void 0:String(e)}var ca=e=>{var{axis:t,ticks:r,offset:n,bandSize:i,entry:a,index:o}=e;if(t.type==="category")return r[o]?r[o].coordinate+n:null;var u=ne(a,t.dataKey,t.scale.domain()[o]);if(ge(u))return null;var l=t.scale.map(u);return L(l)?l-i/2+n:null},Cy=e=>{var{numericAxis:t}=e,r=t.scale.domain();if(t.type==="number"){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]},e1=e=>{var t=e.flat(2).filter(L);return[Math.min(...t),Math.max(...t)]},t1=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],r1=(e,t,r)=>{if(e!=null)return t1(Object.keys(e).reduce((n,i)=>{var a=e[i];if(!a)return n;var{stackedData:o}=a,u=o.reduce((l,s)=>{var c=jy(s,t,r),f=e1(c);return!V(f[0])||!V(f[1])?l:[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(u[0],n[0]),Math.max(u[1],n[1])]},[1/0,-1/0]))},Ld=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Bd=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,er=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=Ua(t,c=>c.coordinate),a=1/0,o=1,u=i.length;o<u;o++){var l=i[o],s=i[o-1];a=Math.min(((l==null?void 0:l.coordinate)||0)-((s==null?void 0:s.coordinate)||0),a)}return a===1/0?0:a}return r?void 0:0};function zd(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:a}=e;return qr(qr({},t),{},{dataKey:r,payload:n,value:i,name:a})}function Xn(e,t){if(e)return String(e);if(typeof t=="string")return t}var n1=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},i1=(e,t)=>t==="centric"?e.angle:e.radius,Bt=e=>e.layout.width,zt=e=>e.layout.height,a1=e=>e.layout.scale,Ty=e=>e.layout.margin,to=S(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),ro=S(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Iy="data-recharts-item-index",My="data-recharts-item-id",Zn=60;function Fd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ci(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fd(Object(r),!0).forEach(function(n){o1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function o1(e,t,r){return(t=u1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u1(e){var t=l1(e,"string");return typeof t=="symbol"?t:t+""}function l1(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var s1=e=>e.brush.height;function c1(e){var t=ro(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Zn;return r+i}return r},0)}function f1(e){var t=ro(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Zn;return r+i}return r},0)}function d1(e){var t=to(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function v1(e){var t=to(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Ae=S([Bt,zt,Ty,s1,c1,f1,d1,v1,Zm,KP],(e,t,r,n,i,a,o,u,l,s)=>{var c={left:(r.left||0)+i,right:(r.right||0)+a},f={top:(r.top||0)+o,bottom:(r.bottom||0)+u},d=Ci(Ci({},f),c),p=d.bottom;d.bottom+=n,d=VO(d,l,s);var h=e-d.left-d.right,m=t-d.top-d.bottom;return Ci(Ci({brushBottom:p},d),{},{width:Math.max(h,0),height:Math.max(m,0)})}),p1=S(Ae,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Ms=S(Bt,zt,(e,t)=>({x:0,y:0,width:e,height:t})),h1=v.createContext(null),He=()=>v.useContext(h1)!=null,no=e=>e.brush,io=S([no,Ae,Ty],(e,t,r)=>({height:e.height,x:L(e.x)?e.x:t.left,y:L(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:L(e.width)?e.width:t.width})),$u={},Lu={},Bu={},Kd;function m1(){return Kd||(Kd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n,{signal:i,edges:a}={}){let o,u=null;const l=a!=null&&a.includes("leading"),s=a==null||a.includes("trailing"),c=()=>{u!==null&&(r.apply(o,u),o=void 0,u=null)},f=()=>{s&&c(),m()};let d=null;const p=()=>{d!=null&&clearTimeout(d),d=setTimeout(()=>{d=null,f()},n)},h=()=>{d!==null&&(clearTimeout(d),d=null)},m=()=>{h(),o=void 0,u=null},y=()=>{c()},g=function(...b){if(i!=null&&i.aborted)return;o=this,u=b;const P=d==null;p(),l&&P&&c()};return g.schedule=p,g.cancel=m,g.flush=y,i==null||i.addEventListener("abort",m,{once:!0}),g}e.debounce=t})(Bu)),Bu}var Wd;function y1(){return Wd||(Wd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=m1();function r(n,i=0,a={}){typeof a!="object"&&(a={});const{leading:o=!1,trailing:u=!0,maxWait:l}=a,s=Array(2);o&&(s[0]="leading"),u&&(s[1]="trailing");let c,f=null;const d=t.debounce(function(...m){c=n.apply(this,m),f=null},i,{edges:s}),p=function(...m){return l!=null&&(f===null&&(f=Date.now()),Date.now()-f>=l)?(c=n.apply(this,m),f=Date.now(),d.cancel(),d.schedule(),c):(d.apply(this,m),c)},h=()=>(d.flush(),c);return p.cancel=d.cancel,p.flush=h,p}e.debounce=r})(Lu)),Lu}var qd;function g1(){return qd||(qd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=y1();function r(n,i=0,a={}){const{leading:o=!0,trailing:u=!0}=a;return t.debounce(n,i,{leading:o,maxWait:i,trailing:u})}e.throttle=r})($u)),$u}var zu,Ud;function b1(){return Ud||(Ud=1,zu=g1().throttle),zu}var w1=b1();const x1=Cr(w1);var Hd=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(r.replace(/%s/g,()=>i[o++]))}},gt={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},Dy=(e,t,r)=>{var{width:n=gt.width,height:i=gt.height,aspect:a,maxHeight:o}=r,u=Or(n)?e:Number(n),l=Or(i)?t:Number(i);return a&&a>0&&(u?l=u/a:l&&(u=l*a),o&&l!=null&&l>o&&(l=o)),{calculatedWidth:u,calculatedHeight:l}},P1={width:0,height:0,overflow:"visible"},O1={width:0,overflowX:"visible"},S1={height:0,overflowY:"visible"},A1={},E1=e=>{var{width:t,height:r}=e,n=Or(t),i=Or(r);return n&&i?P1:n?O1:i?S1:A1};function _1(e){var{width:t,height:r,aspect:n}=e,i=t,a=r;return i===void 0&&a===void 0?(i=gt.width,a=gt.height):i===void 0?i=n&&n>0?void 0:gt.width:a===void 0&&(a=n&&n>0?void 0:gt.height),{width:i,height:a}}function Cl(){return Cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Cl.apply(null,arguments)}function Yd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Gd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yd(Object(r),!0).forEach(function(n){j1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function j1(e,t,r){return(t=k1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k1(e){var t=C1(e,"string");return typeof t=="symbol"?t:t+""}function C1(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ny=v.createContext(gt.initialDimension);function T1(e){return Jt(e.width)&&Jt(e.height)}function Ry(e){var{children:t,width:r,height:n}=e,i=v.useMemo(()=>({width:r,height:n}),[r,n]);return T1(i)?v.createElement(Ny.Provider,{value:i},t):null}var Ds=()=>v.useContext(Ny),I1=v.forwardRef((e,t)=>{var{aspect:r,initialDimension:n=gt.initialDimension,width:i,height:a,minWidth:o=gt.minWidth,minHeight:u,maxHeight:l,children:s,debounce:c=gt.debounce,id:f,className:d,onResize:p,style:h={}}=e,m=v.useRef(null),y=v.useRef();y.current=p,v.useImperativeHandle(t,()=>m.current);var[g,b]=v.useState({containerWidth:n.width,containerHeight:n.height}),P=v.useCallback((_,k)=>{b(C=>{var T=Math.round(_),j=Math.round(k);return C.containerWidth===T&&C.containerHeight===j?C:{containerWidth:T,containerHeight:j}})},[]);v.useEffect(()=>{if(m.current==null||typeof ResizeObserver>"u")return $t;var _=j=>{var B,$=j[0];if($!=null){var{width:z,height:K}=$.contentRect;P(z,K),(B=y.current)===null||B===void 0||B.call(y,z,K)}};c>0&&(_=x1(_,c,{trailing:!0,leading:!1}));var k=new ResizeObserver(_),{width:C,height:T}=m.current.getBoundingClientRect();return P(C,T),k.observe(m.current),()=>{k.disconnect()}},[P,c]);var{containerWidth:x,containerHeight:O}=g;Hd(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:w,calculatedHeight:A}=Dy(x,O,{width:i,height:a,aspect:r,maxHeight:l});return Hd(w!=null&&w>0||A!=null&&A>0,`The width(%s) and height(%s) of chart should be greater than 0,