@next-bricks/diagram 0.43.0 → 0.44.0
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.
- package/dist/bricks.json +3 -3
- package/dist/chunks/2408.fb68feb4.js +2 -0
- package/dist/chunks/2408.fb68feb4.js.map +1 -0
- package/dist/chunks/3025.d4a92d85.js +3 -0
- package/dist/chunks/{3025.6d94cc70.js.map → 3025.d4a92d85.js.map} +1 -1
- package/dist/chunks/{3171.633b30e8.js → 3171.2943688e.js} +2 -2
- package/dist/chunks/{3171.633b30e8.js.map → 3171.2943688e.js.map} +1 -1
- package/dist/chunks/3233.4eabc5cc.js +3 -0
- package/dist/chunks/{3233.70157b34.js.map → 3233.4eabc5cc.js.map} +1 -1
- package/dist/chunks/{3933.fca8ae82.js → 3933.6624dcbe.js} +2 -2
- package/dist/chunks/{3933.fca8ae82.js.map → 3933.6624dcbe.js.map} +1 -1
- package/dist/chunks/{4837.44f22425.js → 4837.578ffe7d.js} +2 -2
- package/dist/chunks/{7218.6822e904.js.map → 4837.578ffe7d.js.map} +1 -1
- package/dist/chunks/{5552.ad11237e.js → 5552.e3e4dddb.js} +2 -2
- package/dist/chunks/{5552.ad11237e.js.map → 5552.e3e4dddb.js.map} +1 -1
- package/dist/chunks/6055.b92cd119.js +2 -0
- package/dist/chunks/6055.b92cd119.js.map +1 -0
- package/dist/chunks/{6314.f35cc928.js → 6314.2c1f22e1.js} +2 -2
- package/dist/chunks/{6314.f35cc928.js.map → 6314.2c1f22e1.js.map} +1 -1
- package/dist/chunks/{7218.6822e904.js → 7218.0b7934fd.js} +2 -2
- package/dist/chunks/{4837.44f22425.js.map → 7218.0b7934fd.js.map} +1 -1
- package/dist/chunks/{799.5e6749ba.js → 799.dd5f32fb.js} +3 -3
- package/dist/chunks/799.dd5f32fb.js.map +1 -0
- package/dist/chunks/9711.8210cef5.js +2 -0
- package/dist/chunks/9711.8210cef5.js.map +1 -0
- package/dist/chunks/eo-diagram.e1ace5a5.js +2 -0
- package/dist/chunks/eo-diagram.e1ace5a5.js.map +1 -0
- package/dist/chunks/eo-display-canvas.05693123.js +2 -0
- package/dist/chunks/eo-display-canvas.05693123.js.map +1 -0
- package/dist/chunks/eo-draw-canvas.c06550f7.js +2 -0
- package/dist/chunks/eo-draw-canvas.c06550f7.js.map +1 -0
- package/dist/chunks/{main.9e233da7.js → main.3c306a02.js} +2 -2
- package/dist/chunks/{main.9e233da7.js.map → main.3c306a02.js.map} +1 -1
- package/dist/examples.json +4 -4
- package/dist/{index.d6687c6f.js → index.9179413f.js} +2 -2
- package/dist/{index.d6687c6f.js.map → index.9179413f.js.map} +1 -1
- package/dist/manifest.json +111 -105
- package/dist/types.json +3712 -3639
- package/dist-types/diagram/lines/getDirectLinePoints.d.ts +2 -1
- package/dist-types/draw-canvas/CellComponent.d.ts +2 -1
- package/dist-types/draw-canvas/EdgeComponent.d.ts +2 -1
- package/dist-types/draw-canvas/EditingLineComponent.d.ts +7 -0
- package/dist-types/draw-canvas/HoverStateContext.d.ts +15 -5
- package/dist-types/draw-canvas/LineConnectorComponent.d.ts +2 -3
- package/dist-types/draw-canvas/LineEditorComponent.d.ts +5 -0
- package/dist-types/draw-canvas/SmartConnectLineComponent.d.ts +2 -3
- package/dist-types/draw-canvas/constants.d.ts +5 -0
- package/dist-types/draw-canvas/index.d.ts +3 -2
- package/dist-types/draw-canvas/interfaces.d.ts +22 -4
- package/dist-types/draw-canvas/processors/asserts.d.ts +1 -0
- package/dist-types/draw-canvas/reducers/interfaces.d.ts +6 -1
- package/dist-types/shared/canvas/processors/getEditingLinePoints.d.ts +4 -0
- package/dist-types/shared/canvas/processors/getEditingLinePoints.spec.d.ts +1 -0
- package/dist-types/shared/canvas/processors/getSmartLinePoints.d.ts +2 -1
- package/dist-types/shared/canvas/shapes/Rectangle.d.ts +3 -1
- package/docs/eo-display-canvas.md +9 -0
- package/docs/eo-draw-canvas.md +5 -0
- package/package.json +3 -3
- package/dist/chunks/3025.6d94cc70.js +0 -3
- package/dist/chunks/3233.70157b34.js +0 -3
- package/dist/chunks/3252.0a5098f4.js +0 -2
- package/dist/chunks/3252.0a5098f4.js.map +0 -1
- package/dist/chunks/799.5e6749ba.js.map +0 -1
- package/dist/chunks/9711.d7bd00df.js +0 -2
- package/dist/chunks/9711.d7bd00df.js.map +0 -1
- package/dist/chunks/eo-diagram.1934f2b2.js +0 -2
- package/dist/chunks/eo-diagram.1934f2b2.js.map +0 -1
- package/dist/chunks/eo-display-canvas.f874fb2f.js +0 -2
- package/dist/chunks/eo-display-canvas.f874fb2f.js.map +0 -1
- package/dist/chunks/eo-draw-canvas.84ade234.js +0 -2
- package/dist/chunks/eo-draw-canvas.84ade234.js.map +0 -1
- /package/dist/chunks/{3025.6d94cc70.js.LICENSE.txt → 3025.d4a92d85.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{3233.70157b34.js.LICENSE.txt → 3233.4eabc5cc.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{799.5e6749ba.js.LICENSE.txt → 799.dd5f32fb.js.LICENSE.txt} +0 -0
package/dist/bricks.json
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
],
|
|
7
7
|
"elements": [
|
|
8
8
|
"eo-diagram",
|
|
9
|
-
"eo-
|
|
10
|
-
"eo-
|
|
9
|
+
"eo-display-canvas",
|
|
10
|
+
"eo-draw-canvas"
|
|
11
11
|
],
|
|
12
12
|
"processors": [],
|
|
13
13
|
"editors": [],
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
"basic.lock-body-scroll"
|
|
17
17
|
]
|
|
18
18
|
},
|
|
19
|
-
"filePath": "bricks/diagram/dist/index.
|
|
19
|
+
"filePath": "bricks/diagram/dist/index.9179413f.js"
|
|
20
20
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[2408],{3739:(t,e,r)=>{r.d(e,{c:()=>o});var i=r(8769),n=r.n(i);function o(t){let e,{id:r,type:i,strokeColor:o}=t;switch(i){case"0..1":e=s;break;case"0..N":e=y;break;default:e=h}return n().createElement(e,{id:r,strokeColor:o})}function h(t){let{id:e,strokeColor:r}=t;return n().createElement("marker",{id:e,viewBox:"0 0 6 6",refX:5,refY:3,markerWidth:6,markerHeight:6,orient:"auto-start-reverse",strokeLinejoin:"round"},n().createElement("path",{d:"M 0.5 0.5 L 5.5 3 L 0.5 5.5 z",stroke:r,strokeWidth:1,fill:r}))}function s(t){let{id:e,strokeColor:r}=t;return n().createElement("marker",{id:e,viewBox:"0 0 21 11",refX:.5,refY:5.5,markerWidth:21,markerHeight:11,orient:"auto-start-reverse"},n().createElement("path",{d:"M 5.5 5.5 m 5 0 a 5 5 0 1 0 -10 0 a 5 5 0 1 0 10 0 M 15.5 0.5 V 10.5 M 10.5 5.5 H 20.5",stroke:r,strokeWidth:1,fill:"none"}))}function y(t){let{id:e,strokeColor:r}=t;return n().createElement("marker",{id:e,viewBox:"0 0 21 11",refX:.5,refY:5.5,markerWidth:21,markerHeight:11,orient:"auto-start-reverse"},n().createElement("path",{d:"M 5.5 5.5 m 5 0 a 5 5 0 1 0 -10 0 a 5 5 0 1 0 10 0 M 20.5 0.5 L 10.5 5.5 L 20.5 10.5 M 10.5 5.5 H 20.5",stroke:r,strokeWidth:1,fill:"none"}))}},8653:(t,e,r)=>{r.d(e,{S:()=>x});var i=r(482),n=r(4643),o=r(3488),h=r(6066),s=r(4993),y=r(3269);function x(t,e,r,x){if(!Array.isArray(t))return"";let a;switch(e){case"curveLinear":a=i.A;break;case"curveBumpX":a=n.dJ;break;case"curveBumpY":a=n.kl;break;case"curveMonotoneX":a=o.G;break;case"curveMonotoneY":a=o.N;break;case"curveNatural":a=h.A;break;default:a=s.Ay}const l=c(t[1],t[0],r),u=c(t[t.length-2],t[t.length-1],x);return(0,y.A)().x(((e,r)=>e.x-(0===r?l.x:r===t.length-1?u.x:0))).y(((e,r)=>e.y-(0===r?l.y:r===t.length-1?u.y:0))).curve(a)(t)}function c(t,e,r){if(!r)return{x:0,y:0};const{x:i,y:n}=t,{x:o,y:h}=e,s=r/Math.sqrt(Math.pow(o-i,2)+Math.pow(h-n,2));return{x:(o-i)*s,y:(h-n)*s}}},3188:(t,e,r)=>{r.d(e,{h:()=>n});var i=r(733);function n(t,e,r,n){const h=!(null==n||!n.exitPosition),s=!(null==n||!n.entryPosition);if(t===e||(0,i.w)(t,e,0,0)&&!h&&!s)return null;let y,x,c=0,a=0;if(r){const i=e.x-t.x,n=e.y-t.y,o=Math.atan2(n,i);c=r/2*Math.cos(o+Math.PI/2),a=r/2*Math.sin(o+Math.PI/2)}const l=[h?[t.x+(n.exitPosition.x-.5)*t.width,t.y+(n.exitPosition.y-.5)*t.height]:[t.x+c,t.y+a],s?[e.x+(n.entryPosition.x-.5)*e.width,e.y+(n.entryPosition.y-.5)*e.height]:[e.x+c,e.y+a]];if(h)y=l[0];else{const e=o(t,l);y=e.length>0?e[0]:[t.x,t.y]}if(s)x=l[1];else{const t=o(e,l);x=t.length>0?t[0]:[e.x,e.y]}return[{x:y[0],y:y[1]},{x:x[0],y:x[1]}]}function o(t,e){const r=[[t.x-t.width/2,t.y-t.height/2],[t.x+t.width/2,t.y-t.height/2],[t.x+t.width/2,t.y+t.height/2],[t.x-t.width/2,t.y+t.height/2]],i=[];for(let t=0;t<4;t++)i.push([r[t],r[(t+1)%4]]);const n=[];for(const t of i){const r=h(e[0],e[1],t[0],t[1]);r&&n.push(r)}return n}function h(t,e,r,i){let[n,o]=t,[h,s]=e,[y,x]=r,[c,a]=i;if(n===h&&o===s||y===c&&x===a)return null;const l=(a-x)*(h-n)-(c-y)*(s-o);if(0===l)return null;const u=((c-y)*(o-x)-(a-x)*(n-y))/l,d=((h-n)*(o-x)-(s-o)*(n-y))/l;return u<0||u>1||d<0||d>1?null:[n+u*(h-n),o+u*(s-o)]}},4059:(t,e,r)=>{r.d(e,{o:()=>n});const i=20;function n(t,e,r,n,h,s){const y=o(t,r,h),x=o(e,n,s);let c=[],a=!1;const l="top"===r||"bottom"===r;if(l!==("top"===n||"bottom"===n)){let o,h,s,u,d,f;l?(o=e,h=t,s="right"===n?1:-1,u="bottom"===r?1:-1,d=x,f=y):(o=t,h=e,s="right"===r?1:-1,u="bottom"===n?1:-1,d=y,f=x,a=!0);const g=d.x+i*s,w=f.y+i*u;if((o.x-h.x)*s>=0)if((h.y-o.y)*u>=0)c=[{x:f.x,y:w},{x:g,y:w},{x:g,y:d.y}];else{const t=h.y+(h.height/2+i)*u,e=o.y-(o.height/2+i)*u;if((e-t)*u>=0){const r=(t+e)/2;c=[{x:f.x,y:r},{x:g,y:r},{x:g,y:d.y}]}else{const r=(h.x+h.width/2*s+o.x-o.width/2*s)/2;c=[{x:f.x,y:t},{x:r,y:t},{x:r,y:e},{x:g,y:e},{x:g,y:d.y}]}}else if((d.y-w)*u>=0)if((f.x-g)*s>=0)c=[{x:f.x,y:d.y}];else{const t=(h.y+(h.height/2+i)*u+(o.y-(o.height/2+i)*u))/2;c=[{x:f.x,y:t},{x:g,y:t},{x:g,y:d.y}]}else{const t=h.x-(h.width/2+i)*s;if((t-g)*s>=0){const e=(t+g)/2;c=[{x:f.x,y:w},{x:e,y:w},{x:e,y:d.y}]}else{const e=(h.y-h.height/2*u+o.y+o.height/2*u)/2;c=[{x:f.x,y:w},{x:t,y:w},{x:t,y:e},{x:g,y:e},{x:g,y:d.y}]}}}else if(r===n){const n="bottom"===r||"right"===r?1:-1;let o,h,s,u;const d=l?"y":"x",f=l?"x":"y";let g,w,k,m;e[d]<t[d]?(o=e,h=t,s=x,u=y,a=1===n):(o=t,h=e,s=y,u=x,a=1!==n),1===n?(g=h,w=o,k=u,m=s):(g=o,w=h,k=s,m=u);const b=g===(e[f]<t[f]?t:e)?1:-1;if(l){const t=g.x-(g.width/2+i)*b,e=k.y+i*n;if((t-m.x)*b>=0)c=[{x:m.x,y:e},{x:k.x,y:e}];else{const r=(w.y+w.height/2*n+g.y-g.height/2*n)/2;c=[{x:m.x,y:r},{x:t,y:r},{x:t,y:e},{x:k.x,y:e}]}}else{const t=k.x+i*n,e=g.y-(g.height/2+i)*b;if((e-m.y)*b>=0)c=[{x:t,y:m.y},{x:t,y:k.y}];else{const r=(w.x+w.width/2*n+g.x-g.width/2*n)/2;c=[{x:r,y:m.y},{x:r,y:e},{x:t,y:e},{x:t,y:k.y}]}}}else{const r="bottom"===n||"right"===n?1:-1;let o,h,s,a;l?(o="y",h="x",s="height",a="width"):(o="x",h="y",s="width",a="height");const u=e[o]+e[s]/2*r,d=t[o]-t[s]/2*r,f=u+i*r,g=d-i*r,w=y[h]===x[h];if((g-f)*r>=0){const t=(g+f)/2;c=w?[]:[{[h]:y[h],[o]:t},{[h]:x[h],[o]:t}]}else if(w&&(d-u)*r>=0)c=[];else{const n=e[h]<t[h]?-1:1,l=t[h]+(t[a]/2+i)*n,u=e[h]-(e[a]/2+i)*n;if((u-l)*n>=0||Math.abs((g-f)*r)<i){const t=(l+u)/2;c=[{[h]:y[h],[o]:g},{[h]:t,[o]:g},{[h]:t,[o]:f},{[h]:x[h],[o]:f}]}else{const i=(t[o]+t[s]/2*r+e[o]-e[s]/2*r)/2;c=[{[h]:y[h],[o]:g},{[h]:l,[o]:g},{[h]:l,[o]:i},{[h]:u,[o]:i},{[h]:u,[o]:f},{[h]:x[h],[o]:f}]}}}return a&&c.reverse(),[y,...c,x]}function o(t,e,r){const{x:i,y:n,width:o,height:h}=t;switch(e){case"top":return{x:i-o/2+o*r,y:n-h/2};case"bottom":return{x:i-o/2+o*r,y:n+h/2};case"left":return{x:i-o/2,y:n-h/2+h*r};case"right":return{x:i+o/2,y:n-h/2+h*r}}}},733:(t,e,r)=>{function i(t,e,r,i){const o=r?n(t,r):t,h=i?n(e,i):e,s=Math.min(o.x-o.width/2,h.x-h.width/2),y=Math.max(o.x+o.width/2,h.x+h.width/2),x=Math.min(o.y-o.height/2,h.y-h.height/2),c=Math.max(o.y+o.height/2,h.y+h.height/2);return y-s<o.width+h.width&&c-x<o.height+h.height}function n(t,e){return{x:t.x-t.width/2-e,y:t.y-t.height/2-e,width:t.width+2*e,height:t.height+2*e}}r.d(e,{w:()=>i})},8802:(t,e,r)=>{function i(t){if(Array.isArray(t)){const e=t[0],r=t.length>1?t[1]:e;return[e,r,t.length>2?t[2]:e,t.length>3?t[3]:r]}return new Array(4).fill(t)}r.d(e,{D:()=>i})}}]);
|
|
2
|
+
//# sourceMappingURL=2408.fb68feb4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/2408.fb68feb4.js","mappings":"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","sources":["webpack:///./src/diagram/MarkerComponent.tsx","webpack:///./src/diagram/lines/curveLine.ts","webpack:///./src/diagram/lines/getDirectLinePoints.ts","webpack:///./src/diagram/lines/getPolyLinePoints.ts","webpack:///./src/diagram/processors/doTwoNodesOverlap.ts","webpack:///./src/diagram/processors/extractPartialRectTuple.ts"],"sourcesContent":["import React from \"react\";\nimport type { LineMarkerType } from \"./interfaces\";\n\nexport interface MarkerComponentProps extends BaseMarkerComponentProps {\n type: LineMarkerType;\n}\n\nexport interface BaseMarkerComponentProps {\n id: string;\n strokeColor?: string;\n}\n\nexport function MarkerComponent({\n id,\n type,\n strokeColor,\n}: MarkerComponentProps): JSX.Element {\n let Component: (props: BaseMarkerComponentProps) => JSX.Element;\n\n switch (type) {\n case \"0..1\":\n Component = EntityRelationZeroOrOneMarker;\n break;\n case \"0..N\":\n Component = EntityRelationZeroOrManyMarker;\n break;\n default:\n Component = ArrowMarker;\n }\n\n return <Component id={id} strokeColor={strokeColor} />;\n}\n\nfunction ArrowMarker({\n id,\n strokeColor,\n}: BaseMarkerComponentProps): JSX.Element {\n return (\n <marker\n id={id}\n viewBox=\"0 0 6 6\"\n refX={5}\n refY={3}\n markerWidth={6}\n markerHeight={6}\n orient=\"auto-start-reverse\"\n strokeLinejoin=\"round\"\n >\n <path\n d=\"M 0.5 0.5 L 5.5 3 L 0.5 5.5 z\"\n stroke={strokeColor}\n strokeWidth={1}\n fill={strokeColor}\n />\n </marker>\n );\n}\n\nfunction EntityRelationZeroOrOneMarker({\n id,\n strokeColor,\n}: BaseMarkerComponentProps): JSX.Element {\n return (\n <marker\n id={id}\n viewBox=\"0 0 21 11\"\n refX={0.5}\n refY={5.5}\n markerWidth={21}\n markerHeight={11}\n orient=\"auto-start-reverse\"\n >\n <path\n d=\"M 5.5 5.5 m 5 0 a 5 5 0 1 0 -10 0 a 5 5 0 1 0 10 0 M 15.5 0.5 V 10.5 M 10.5 5.5 H 20.5\"\n stroke={strokeColor}\n strokeWidth={1}\n fill=\"none\"\n />\n </marker>\n );\n}\n\nfunction EntityRelationZeroOrManyMarker({\n id,\n strokeColor,\n}: BaseMarkerComponentProps): JSX.Element {\n return (\n <marker\n id={id}\n viewBox=\"0 0 21 11\"\n refX={0.5}\n refY={5.5}\n markerWidth={21}\n markerHeight={11}\n orient=\"auto-start-reverse\"\n >\n <path\n d=\"M 5.5 5.5 m 5 0 a 5 5 0 1 0 -10 0 a 5 5 0 1 0 10 0 M 20.5 0.5 L 10.5 5.5 L 20.5 10.5 M 10.5 5.5 H 20.5\"\n stroke={strokeColor}\n strokeWidth={1}\n fill=\"none\"\n />\n </marker>\n );\n}\n","import {\n curveLinear,\n line,\n curveBasis,\n curveBumpX,\n curveBumpY,\n type CurveFactory,\n curveMonotoneX,\n curveNatural,\n curveMonotoneY,\n} from \"d3-shape\";\nimport type { CurveType, NodePosition } from \"../interfaces\";\n\n/**\n * Generate Line from points\n */\nexport function curveLine(\n points: Array<NodePosition> | null | undefined,\n curveType: CurveType | undefined,\n startOffset: number,\n endOffset: number\n): string {\n if (!Array.isArray(points)) {\n return \"\";\n }\n let curveFactory: CurveFactory;\n switch (curveType) {\n case \"curveLinear\":\n curveFactory = curveLinear;\n break;\n case \"curveBumpX\":\n curveFactory = curveBumpX;\n break;\n case \"curveBumpY\":\n curveFactory = curveBumpY;\n break;\n case \"curveMonotoneX\":\n curveFactory = curveMonotoneX;\n break;\n case \"curveMonotoneY\":\n curveFactory = curveMonotoneY;\n break;\n case \"curveNatural\":\n curveFactory = curveNatural;\n break;\n default:\n curveFactory = curveBasis;\n }\n const startOffsets = getOffsets(points[1], points[0], startOffset);\n const endOffsets = getOffsets(\n points[points.length - 2],\n points[points.length - 1],\n endOffset\n );\n const lineFunction = line()\n .x(\n (d, index) =>\n (d as unknown as { x: number }).x -\n (index === 0\n ? startOffsets.x\n : index === points.length - 1\n ? endOffsets.x\n : 0)\n )\n .y(\n (d, index) =>\n (d as unknown as { y: number }).y -\n (index === 0\n ? startOffsets.y\n : index === points.length - 1\n ? endOffsets.y\n : 0)\n )\n .curve(curveFactory);\n return lineFunction(points as unknown as Array<[number, number]>)!;\n}\n\nfunction getOffsets(\n start: NodePosition,\n end: NodePosition,\n offset: number\n): NodePosition {\n if (!offset) {\n return { x: 0, y: 0 };\n }\n const { x: x0, y: y0 } = start;\n const { x: x1, y: y1 } = end;\n const distance = Math.sqrt(Math.pow(x1 - x0, 2) + Math.pow(y1 - y0, 2));\n const ratio = offset / distance;\n return {\n x: (x1 - x0) * ratio,\n y: (y1 - y0) * ratio,\n };\n}\n","import type { EdgeView } from \"../../draw-canvas/interfaces\";\nimport type { NodePosition, NodeRect, PositionTuple } from \"../interfaces\";\nimport { doTwoNodesOverlap } from \"../processors/doTwoNodesOverlap\";\n\ntype LineTuple = [start: PositionTuple, end: PositionTuple];\n\nexport function getDirectLinePoints(\n source: NodeRect,\n target: NodeRect,\n parallelGap?: number,\n edgeView?: EdgeView\n): NodePosition[] | null {\n const hasExitPosition = !!edgeView?.exitPosition;\n const hasEntryPosition = !!edgeView?.entryPosition;\n\n // Ignore if two nodes are the same.\n // Ignore if two nodes overlap and no entry nor exit position.\n if (\n source === target ||\n (doTwoNodesOverlap(source, target, 0, 0) &&\n !(hasExitPosition || hasEntryPosition))\n ) {\n return null;\n }\n\n let p0: PositionTuple;\n let p1: PositionTuple;\n\n let xDiff = 0;\n let yDiff = 0;\n\n if (parallelGap) {\n const dx = target.x - source.x;\n const dy = target.y - source.y;\n const angle = Math.atan2(dy, dx);\n xDiff = (parallelGap / 2) * Math.cos(angle + Math.PI / 2);\n yDiff = (parallelGap / 2) * Math.sin(angle + Math.PI / 2);\n }\n\n const line: LineTuple = [\n hasExitPosition\n ? [\n source.x + (edgeView!.exitPosition!.x - 0.5) * source.width,\n source.y + (edgeView!.exitPosition!.y - 0.5) * source.height,\n ]\n : [source.x + xDiff, source.y + yDiff],\n hasEntryPosition\n ? [\n target.x + (edgeView!.entryPosition!.x - 0.5) * target.width,\n target.y + (edgeView!.entryPosition!.y - 0.5) * target.height,\n ]\n : [target.x + xDiff, target.y + yDiff],\n ];\n\n if (hasExitPosition) {\n p0 = line[0];\n } else {\n const sourceIntersections = getIntersections(source, line);\n // Todo: handle when more than one intersection\n if (sourceIntersections.length > 0) {\n p0 = sourceIntersections[0];\n } else {\n p0 = [source.x, source.y];\n }\n }\n\n if (hasEntryPosition) {\n p1 = line[1];\n } else {\n const targetIntersections = getIntersections(target, line);\n // Todo: handle when more than one intersection\n if (targetIntersections.length > 0) {\n p1 = targetIntersections[0];\n } else {\n p1 = [target.x, target.y];\n }\n }\n\n return [\n { x: p0[0], y: p0[1] },\n { x: p1[0], y: p1[1] },\n ];\n}\n\nfunction getIntersections(rect: NodeRect, line: LineTuple) {\n const vertices: PositionTuple[] = [\n [rect.x - rect.width / 2, rect.y - rect.height / 2],\n [rect.x + rect.width / 2, rect.y - rect.height / 2],\n [rect.x + rect.width / 2, rect.y + rect.height / 2],\n [rect.x - rect.width / 2, rect.y + rect.height / 2],\n ];\n const possibleLines: [start: PositionTuple, end: PositionTuple][] = [];\n for (let i = 0; i < 4; i++) {\n possibleLines.push([vertices[i], vertices[(i + 1) % 4]]);\n }\n const intersections: PositionTuple[] = [];\n for (const item of possibleLines) {\n const intersection = intersect(line[0], line[1], item[0], item[1]);\n if (intersection) {\n intersections.push(intersection);\n }\n }\n return intersections;\n}\n\n// https://paulbourke.net/geometry/pointlineplane/javascript.txt\nfunction intersect(\n [x1, y1]: PositionTuple,\n [x2, y2]: PositionTuple,\n [x3, y3]: PositionTuple,\n [x4, y4]: PositionTuple\n): null | PositionTuple {\n // Check if none of the lines are of length 0\n if ((x1 === x2 && y1 === y2) || (x3 === x4 && y3 === y4)) {\n return null;\n }\n\n const denominator = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);\n\n // Lines are parallel\n if (denominator === 0) {\n return null;\n }\n\n const ua = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denominator;\n const ub = ((x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3)) / denominator;\n\n // is the intersection along the segments\n if (ua < 0 || ua > 1 || ub < 0 || ub > 1) {\n return null;\n }\n\n // Return a object with the x and y coordinates of the intersection\n const x = x1 + ua * (x2 - x1);\n const y = y1 + ua * (y2 - y1);\n\n return [x, y];\n}\n","import type { Direction, NodePosition, NodeRect } from \"../interfaces\";\n\nconst MINIMAL_OFFSET = 20;\n\nexport function getPolyLinePoints(\n source: NodeRect,\n target: NodeRect,\n sourceDirection: Direction,\n targetDirection: Direction,\n sourcePosition: number,\n targetPosition: number\n): NodePosition[] {\n const p0 = getCoordinates(source, sourceDirection, sourcePosition);\n const p1 = getCoordinates(target, targetDirection, targetPosition);\n\n let controls: NodePosition[] = [];\n let reverseControls = false;\n\n const sourceIsVertical =\n sourceDirection === \"top\" || sourceDirection === \"bottom\";\n const targetIsVertical =\n targetDirection === \"top\" || targetDirection === \"bottom\";\n\n if (sourceIsVertical !== targetIsVertical) {\n // One is vertical and the other is horizontal\n let horizontal: NodeRect;\n let vertical: NodeRect;\n let horizontalSign: number;\n let verticalSign: number;\n let horizontalPosition: NodePosition;\n let verticalPosition: NodePosition;\n if (sourceIsVertical) {\n horizontal = target;\n vertical = source;\n horizontalSign = targetDirection === \"right\" ? 1 : -1;\n verticalSign = sourceDirection === \"bottom\" ? 1 : -1;\n horizontalPosition = p1;\n verticalPosition = p0;\n } else {\n horizontal = source;\n vertical = target;\n horizontalSign = sourceDirection === \"right\" ? 1 : -1;\n verticalSign = targetDirection === \"bottom\" ? 1 : -1;\n horizontalPosition = p0;\n verticalPosition = p1;\n reverseControls = true;\n }\n\n const defaultControlX =\n horizontalPosition.x + MINIMAL_OFFSET * horizontalSign;\n const defaultControlY = verticalPosition.y + MINIMAL_OFFSET * verticalSign;\n\n if ((horizontal.x - vertical.x) * horizontalSign >= 0) {\n if ((vertical.y - horizontal.y) * verticalSign >= 0) {\n // ┌──────────────┐\n // ┌──┴──┐ ┌─────┐ │\n // │ S │ │ T ├─┘\n // └─────┘ └─────┘\n controls = [\n { x: verticalPosition.x, y: defaultControlY },\n { x: defaultControlX, y: defaultControlY },\n { x: defaultControlX, y: horizontalPosition.y },\n ];\n } else {\n const controlY0 =\n vertical.y + (vertical.height / 2 + MINIMAL_OFFSET) * verticalSign;\n const controlY1 =\n horizontal.y -\n (horizontal.height / 2 + MINIMAL_OFFSET) * verticalSign;\n if ((controlY1 - controlY0) * verticalSign >= 0) {\n // ┌─────┐\n // │ T ├─┐\n // └─────┘ │\n // ┌────────┘\n // ┌──┴──┐\n // │ S │\n // └─────┘\n const middleY = (controlY0 + controlY1) / 2;\n controls = [\n { x: verticalPosition.x, y: middleY },\n { x: defaultControlX, y: middleY },\n { x: defaultControlX, y: horizontalPosition.y },\n ];\n } else {\n // ┌─────┐\n // ┌────┐ │ T ├─┐\n // ┌──┴──┐ │ └─────┘ │\n // │ S │ └─────────┘\n // └─────┘\n const middleX =\n (vertical.x +\n (vertical.width / 2) * horizontalSign +\n horizontal.x -\n (horizontal.width / 2) * horizontalSign) /\n 2;\n controls = [\n { x: verticalPosition.x, y: controlY0 },\n { x: middleX, y: controlY0 },\n { x: middleX, y: controlY1 },\n { x: defaultControlX, y: controlY1 },\n { x: defaultControlX, y: horizontalPosition.y },\n ];\n }\n }\n } else if ((horizontalPosition.y - defaultControlY) * verticalSign >= 0) {\n if ((verticalPosition.x - defaultControlX) * horizontalSign >= 0) {\n // ┌─────┐\n // ┌──┤ T │\n // │ └─────┘\n // ┌──┴──┐\n // │ S │\n // └─────┘\n controls = [{ x: verticalPosition.x, y: horizontalPosition.y }];\n } else {\n // ┌─────┐\n // │ T ├─┐\n // └─────┘ │\n // ┌─┘\n // ┌──┴──┐\n // │ S │\n // └─────┘\n const controlY0 =\n vertical.y + (vertical.height / 2 + MINIMAL_OFFSET) * verticalSign;\n const controlY1 =\n horizontal.y -\n (horizontal.height / 2 + MINIMAL_OFFSET) * verticalSign;\n const middleY = (controlY0 + controlY1) / 2;\n controls = [\n { x: verticalPosition.x, y: middleY },\n { x: defaultControlX, y: middleY },\n { x: defaultControlX, y: horizontalPosition.y },\n ];\n }\n } else {\n const sourceExtendX =\n vertical.x - (vertical.width / 2 + MINIMAL_OFFSET) * horizontalSign;\n if ((sourceExtendX - defaultControlX) * horizontalSign >= 0) {\n // ┌────┐\n // │ ┌──┴──┐\n // │ │ S │\n // ┌─────┐ │ └─────┘\n // │ T ├─┘\n // └─────┘\n const middleX = (sourceExtendX + defaultControlX) / 2;\n controls = [\n { x: verticalPosition.x, y: defaultControlY },\n { x: middleX, y: defaultControlY },\n { x: middleX, y: horizontalPosition.y },\n ];\n } else {\n // ┌────┐\n // │ ┌──┴──┐\n // │ │ S │\n // │ └─────┘\n // └───┐\n // ┌─────┐ │\n // │ T ├─┘\n // └─────┘\n const middleY =\n (vertical.y -\n (vertical.height / 2) * verticalSign +\n horizontal.y +\n (horizontal.height / 2) * verticalSign) /\n 2;\n controls = [\n { x: verticalPosition.x, y: defaultControlY },\n { x: sourceExtendX, y: defaultControlY },\n { x: sourceExtendX, y: middleY },\n { x: defaultControlX, y: middleY },\n { x: defaultControlX, y: horizontalPosition.y },\n ];\n }\n }\n } else if (sourceDirection === targetDirection) {\n // Same direction\n const sign =\n sourceDirection === \"bottom\" || sourceDirection === \"right\" ? 1 : -1;\n let start: NodeRect;\n let end: NodeRect;\n let startPosition: NodePosition;\n let endPosition: NodePosition;\n const axis = sourceIsVertical ? \"y\" : \"x\";\n const oppositeAxis = sourceIsVertical ? \"x\" : \"y\";\n if (target[axis] < source[axis]) {\n start = target;\n end = source;\n startPosition = p1;\n endPosition = p0;\n reverseControls = sign === 1;\n } else {\n start = source;\n end = target;\n startPosition = p0;\n endPosition = p1;\n reverseControls = sign !== 1;\n }\n const perpendicular =\n target[oppositeAxis] < source[oppositeAxis] ? source : target;\n let around: NodeRect;\n let nonAround: NodeRect;\n let aroundPosition: NodePosition;\n let nonAroundPosition: NodePosition;\n if (sign === 1) {\n around = end;\n nonAround = start;\n aroundPosition = endPosition;\n nonAroundPosition = startPosition;\n } else {\n around = start;\n nonAround = end;\n aroundPosition = startPosition;\n nonAroundPosition = endPosition;\n }\n const aroundSign = around === perpendicular ? 1 : -1;\n if (sourceIsVertical) {\n const defaultControlX =\n around.x - (around.width / 2 + MINIMAL_OFFSET) * aroundSign;\n const defaultControlY = aroundPosition.y + MINIMAL_OFFSET * sign;\n if ((defaultControlX - nonAroundPosition.x) * aroundSign >= 0) {\n // ┌─────────┐\n // │ ┌──┴──┐\n // │ │ T │\n // ┌──┴──┐ └─────┘\n // │ S │\n // └─────┘\n controls = [\n { x: nonAroundPosition.x, y: defaultControlY },\n { x: aroundPosition.x, y: defaultControlY },\n ];\n } else {\n // ┌────┐\n // │ ┌──┴──┐\n // │ │ T │\n // │ └─────┘\n // └─┐\n // ┌──┴──┐\n // │ S │\n // └─────┘\n const middleY =\n (nonAround.y +\n (nonAround.height / 2) * sign +\n around.y -\n (around.height / 2) * sign) /\n 2;\n controls = [\n { x: nonAroundPosition.x, y: middleY },\n { x: defaultControlX, y: middleY },\n { x: defaultControlX, y: defaultControlY },\n { x: aroundPosition.x, y: defaultControlY },\n ];\n }\n } else {\n const defaultControlX = aroundPosition.x + MINIMAL_OFFSET * sign;\n const defaultControlY =\n around.y - (around.height / 2 + MINIMAL_OFFSET) * aroundSign;\n if ((defaultControlY - nonAroundPosition.y) * aroundSign >= 0) {\n // ┌─────┐\n // ┌─────────┤ T │\n // │ ┌─────┐ └─────┘\n // └─┤ S │\n // └─────┘\n controls = [\n { x: defaultControlX, y: nonAroundPosition.y },\n { x: defaultControlX, y: aroundPosition.y },\n ];\n } else {\n // ┌─────────┐\n // │ ┌─────┐ │ ┌─────┐\n // └─┤ S │ └─┤ T │\n // └─────┘ └─────┘\n const middleX =\n (nonAround.x +\n (nonAround.width / 2) * sign +\n around.x -\n (around.width / 2) * sign) /\n 2;\n controls = [\n { x: middleX, y: nonAroundPosition.y },\n { x: middleX, y: defaultControlY },\n { x: defaultControlX, y: defaultControlY },\n { x: defaultControlX, y: aroundPosition.y },\n ];\n }\n }\n } else {\n // Opposite direction\n const targetSign =\n targetDirection === \"bottom\" || targetDirection === \"right\" ? 1 : -1;\n let axis: \"x\" | \"y\";\n let oppositeAxis: \"x\" | \"y\";\n let size: \"width\" | \"height\";\n let oppositeSize: \"width\" | \"height\";\n if (sourceIsVertical) {\n axis = \"y\";\n oppositeAxis = \"x\";\n size = \"height\";\n oppositeSize = \"width\";\n } else {\n axis = \"x\";\n oppositeAxis = \"y\";\n size = \"width\";\n oppositeSize = \"height\";\n }\n const targetEdge = target[axis] + (target[size] / 2) * targetSign;\n const sourceEdge = source[axis] - (source[size] / 2) * targetSign;\n const targetControl = targetEdge + MINIMAL_OFFSET * targetSign;\n const sourceControl = sourceEdge - MINIMAL_OFFSET * targetSign;\n const oppositeIsStraight = p0[oppositeAxis] === p1[oppositeAxis];\n if ((sourceControl - targetControl) * targetSign >= 0) {\n const middle = (sourceControl + targetControl) / 2;\n if (oppositeIsStraight) {\n // Straight line\n // ┌─────┐\n // │ T │\n // └──┬──┘\n // │\n // ┌──┴──┐\n // │ S │\n // └─────┘\n controls = [];\n } else {\n // ┌─────┐\n // │ T │\n // └──┬──┘\n // ┌───┘\n // ┌──┴──┐\n // │ S │\n // └─────┘\n controls = [\n { [oppositeAxis]: p0[oppositeAxis], [axis]: middle },\n { [oppositeAxis]: p1[oppositeAxis], [axis]: middle },\n ] as unknown[] as NodePosition[];\n }\n } else if (\n oppositeIsStraight &&\n (sourceEdge - targetEdge) * targetSign >= 0\n ) {\n // Straight line (very close)\n // ┌─────┐\n // │ T │\n // └──┬──┘\n // ┌──┴──┐\n // │ S │\n // └─────┘\n controls = [];\n } else {\n const targetOppositeSign =\n target[oppositeAxis] < source[oppositeAxis] ? -1 : 1;\n const sourceOppositeControl =\n source[oppositeAxis] +\n (source[oppositeSize] / 2 + MINIMAL_OFFSET) * targetOppositeSign;\n const targetOppositeControl =\n target[oppositeAxis] -\n (target[oppositeSize] / 2 + MINIMAL_OFFSET) * targetOppositeSign;\n if (\n (targetOppositeControl - sourceOppositeControl) * targetOppositeSign >=\n 0 ||\n Math.abs((sourceControl - targetControl) * targetSign) < MINIMAL_OFFSET\n ) {\n // ┌─────┐\n // ┌────┐ │ T │\n // ┌──┴──┐ │ └──┬──┘\n // │ S │ └────┘\n // └─────┘\n const oppositeMiddle =\n (sourceOppositeControl + targetOppositeControl) / 2;\n controls = [\n { [oppositeAxis]: p0[oppositeAxis], [axis]: sourceControl },\n { [oppositeAxis]: oppositeMiddle, [axis]: sourceControl },\n { [oppositeAxis]: oppositeMiddle, [axis]: targetControl },\n { [oppositeAxis]: p1[oppositeAxis], [axis]: targetControl },\n ] as unknown[] as NodePosition[];\n } else {\n // ┌────┐\n // ┌──┴──┐ │\n // │ S │ │\n // └─────┘ │\n // ┌─────────┘\n // │ ┌─────┐\n // │ │ T │\n // │ └──┬──┘\n // └────┘\n const middle =\n (source[axis] +\n (source[size] / 2) * targetSign +\n target[axis] -\n (target[size] / 2) * targetSign) /\n 2;\n controls = [\n { [oppositeAxis]: p0[oppositeAxis], [axis]: sourceControl },\n { [oppositeAxis]: sourceOppositeControl, [axis]: sourceControl },\n { [oppositeAxis]: sourceOppositeControl, [axis]: middle },\n { [oppositeAxis]: targetOppositeControl, [axis]: middle },\n { [oppositeAxis]: targetOppositeControl, [axis]: targetControl },\n { [oppositeAxis]: p1[oppositeAxis], [axis]: targetControl },\n ] as unknown[] as NodePosition[];\n }\n }\n }\n\n if (reverseControls) {\n controls.reverse();\n }\n\n return [p0, ...controls, p1] as NodePosition[];\n}\n\nfunction getCoordinates(\n node: NodeRect,\n direction: Direction,\n position: number\n): NodePosition {\n const { x, y, width, height } = node;\n switch (direction) {\n case \"top\":\n return {\n x: x - width / 2 + width * position,\n y: y - height / 2,\n };\n case \"bottom\":\n return {\n x: x - width / 2 + width * position,\n y: y + height / 2,\n };\n case \"left\":\n return {\n x: x - width / 2,\n y: y - height / 2 + height * position,\n };\n case \"right\":\n return {\n x: x + width / 2,\n y: y - height / 2 + height * position,\n };\n }\n}\n","import type { NodeRect } from \"../interfaces\";\n\nexport function doTwoNodesOverlap(\n a: NodeRect,\n b: NodeRect,\n paddingA: number,\n paddingB: number\n): boolean {\n const A = paddingA ? getNodesWithPadding(a, paddingA) : a;\n const B = paddingB ? getNodesWithPadding(b, paddingB) : b;\n const left = Math.min(A.x - A.width / 2, B.x - B.width / 2);\n const right = Math.max(A.x + A.width / 2, B.x + B.width / 2);\n const top = Math.min(A.y - A.height / 2, B.y - B.height / 2);\n const bottom = Math.max(A.y + A.height / 2, B.y + B.height / 2);\n return right - left < A.width + B.width && bottom - top < A.height + B.height;\n}\n\nfunction getNodesWithPadding(node: NodeRect, padding: number) {\n return {\n x: node.x - node.width / 2 - padding,\n y: node.y - node.height / 2 - padding,\n width: node.width + padding * 2,\n height: node.height + padding * 2,\n };\n}\n","import type { FullRectTuple, PartialRectTuple } from \"../interfaces\";\n\nexport function extractPartialRectTuple(\n value: PartialRectTuple\n): FullRectTuple {\n if (Array.isArray(value)) {\n const v0 = value[0];\n const v1 = value.length > 1 ? value[1]! : v0;\n const v2 = value.length > 2 ? value[2]! : v0;\n const v3 = value.length > 3 ? value[3]! : v1;\n return [v0, v1, v2, v3];\n }\n return new Array(4).fill(value) as FullRectTuple;\n}\n"],"names":["MarkerComponent","_ref","Component","id","type","strokeColor","EntityRelationZeroOrOneMarker","EntityRelationZeroOrManyMarker","ArrowMarker","React","_ref2","viewBox","refX","refY","markerWidth","markerHeight","orient","strokeLinejoin","d","stroke","strokeWidth","fill","_ref3","_ref4","curveLine","points","curveType","startOffset","endOffset","Array","isArray","curveFactory","curveLinear","curveBumpX","curveBumpY","curveMonotoneX","curveMonotoneY","curveNatural","curveBasis","startOffsets","getOffsets","endOffsets","length","line","x","index","y","curve","lineFunction","start","end","offset","x0","y0","x1","y1","ratio","Math","sqrt","pow","getDirectLinePoints","source","target","parallelGap","edgeView","hasExitPosition","exitPosition","hasEntryPosition","entryPosition","doTwoNodesOverlap","p0","p1","xDiff","yDiff","dx","dy","angle","atan2","cos","PI","sin","width","height","sourceIntersections","getIntersections","targetIntersections","rect","vertices","possibleLines","i","push","intersections","item","intersection","intersect","x2","y2","x3","y3","x4","y4","denominator","ua","ub","MINIMAL_OFFSET","getPolyLinePoints","sourceDirection","targetDirection","sourcePosition","targetPosition","getCoordinates","controls","reverseControls","sourceIsVertical","horizontal","vertical","horizontalSign","verticalSign","horizontalPosition","verticalPosition","defaultControlX","defaultControlY","controlY0","controlY1","middleY","middleX","sourceExtendX","sign","startPosition","endPosition","axis","oppositeAxis","around","nonAround","aroundPosition","nonAroundPosition","aroundSign","targetSign","size","oppositeSize","targetEdge","sourceEdge","targetControl","sourceControl","oppositeIsStraight","middle","targetOppositeSign","sourceOppositeControl","targetOppositeControl","abs","oppositeMiddle","reverse","node","direction","position","a","b","paddingA","paddingB","A","getNodesWithPadding","B","left","min","right","max","top","bottom","padding","extractPartialRectTuple","value","v0","v1"],"sourceRoot":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see 3025.d4a92d85.js.LICENSE.txt */
|
|
2
|
+
(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[3025,2052],{7586:(t,e,n)=>{t.exports={graphlib:n(4678),layout:n(8870),debug:n(1665),util:{time:n(6856).time,notime:n(6856).notime},version:n(898)}},8642:(t,e,n)=>{"use strict";let r=n(6635),i=n(6856).uniqueId;t.exports={run:function(t){("greedy"===t.graph().acyclicer?r(t,function(t){return e=>t.edge(e).weight}(t)):function(t){let e=[],n={},r={};return t.nodes().forEach((function i(o){r.hasOwnProperty(o)||(r[o]=!0,n[o]=!0,t.outEdges(o).forEach((t=>{n.hasOwnProperty(t.w)?e.push(t):i(t.w)})),delete n[o])})),e}(t)).forEach((e=>{let n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,i("rev"))}))},undo:function(t){t.edges().forEach((e=>{let n=t.edge(e);if(n.reversed){t.removeEdge(e);let r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}}},6883:(t,e,n)=>{let r=n(6856);function i(t,e,n,i,o,s){let a={width:0,height:0,rank:s,borderType:e},u=o[e][s-1],h=r.addDummyNode(t,"border",a,n);o[e][s]=h,t.setParent(h,i),u&&t.setEdge(u,h,{weight:1})}t.exports=function(t){t.children().forEach((function e(n){let r=t.children(n),o=t.node(n);if(r.length&&r.forEach(e),o.hasOwnProperty("minRank")){o.borderLeft=[],o.borderRight=[];for(let e=o.minRank,r=o.maxRank+1;e<r;++e)i(t,"borderLeft","_bl",n,o,e),i(t,"borderRight","_br",n,o,e)}}))}},5574:t=>{"use strict";function e(t){t.nodes().forEach((e=>n(t.node(e)))),t.edges().forEach((e=>n(t.edge(e))))}function n(t){let e=t.width;t.width=t.height,t.height=e}function r(t){t.y=-t.y}function i(t){let e=t.x;t.x=t.y,t.y=e}t.exports={adjust:function(t){let n=t.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||e(t)},undo:function(t){let n=t.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(t){t.nodes().forEach((e=>r(t.node(e)))),t.edges().forEach((e=>{let n=t.edge(e);n.points.forEach(r),n.hasOwnProperty("y")&&r(n)}))}(t),"lr"!==n&&"rl"!==n||(function(t){t.nodes().forEach((e=>i(t.node(e)))),t.edges().forEach((e=>{let n=t.edge(e);n.points.forEach(i),n.hasOwnProperty("x")&&i(n)}))}(t),e(t))}}},1983:t=>{function e(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function n(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=class{constructor(){let t={};t._next=t._prev=t,this._sentinel=t}dequeue(){let t=this._sentinel,n=t._prev;if(n!==t)return e(n),n}enqueue(t){let n=this._sentinel;t._prev&&t._next&&e(t),t._next=n._next,n._next._prev=t,n._next=t,t._prev=n}toString(){let t=[],e=this._sentinel,r=e._prev;for(;r!==e;)t.push(JSON.stringify(r,n)),r=r._prev;return"["+t.join(", ")+"]"}}},1665:(t,e,n)=>{let r=n(6856),i=n(4678).Graph;t.exports={debugOrdering:function(t){let e=r.buildLayerMatrix(t),n=new i({compound:!0,multigraph:!0}).setGraph({});return t.nodes().forEach((e=>{n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),t.edges().forEach((t=>n.setEdge(t.v,t.w,{},t.name))),e.forEach(((t,e)=>{let r="layer"+e;n.setNode(r,{rank:"same"}),t.reduce(((t,e)=>(n.setEdge(t,e,{style:"invis"}),e)))})),n}}},6635:(t,e,n)=>{let r=n(4678).Graph,i=n(1983);t.exports=function(t,e){if(t.nodeCount()<=1)return[];let n=function(t,e){let n=new r,o=0,s=0;t.nodes().forEach((t=>{n.setNode(t,{v:t,in:0,out:0})})),t.edges().forEach((t=>{let r=n.edge(t.v,t.w)||0,i=e(t),a=r+i;n.setEdge(t.v,t.w,a),s=Math.max(s,n.node(t.v).out+=i),o=Math.max(o,n.node(t.w).in+=i)}));let u=function(t){const e=[];for(let n=0;n<t;n++)e.push(n);return e}(s+o+3).map((()=>new i)),h=o+1;return n.nodes().forEach((t=>{a(u,h,n.node(t))})),{graph:n,buckets:u,zeroIdx:h}}(t,e||o);return function(t,e,n){let r,i=[],o=e[e.length-1],a=e[0];for(;t.nodeCount();){for(;r=a.dequeue();)s(t,e,n,r);for(;r=o.dequeue();)s(t,e,n,r);if(t.nodeCount())for(let o=e.length-2;o>0;--o)if(r=e[o].dequeue(),r){i=i.concat(s(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx).flatMap((e=>t.outEdges(e.v,e.w)))};let o=()=>1;function s(t,e,n,r,i){let o=i?[]:void 0;return t.inEdges(r.v).forEach((r=>{let s=t.edge(r),u=t.node(r.v);i&&o.push({v:r.v,w:r.w}),u.out-=s,a(e,n,u)})),t.outEdges(r.v).forEach((r=>{let i=t.edge(r),o=r.w,s=t.node(o);s.in-=i,a(e,n,s)})),t.removeNode(r.v),o}function a(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},8870:(t,e,n)=>{"use strict";let r=n(8642),i=n(1293),o=n(3045),s=n(6856).normalizeRanks,a=n(2488),u=n(6856).removeEmptyRanks,h=n(9885),c=n(6883),l=n(5574),f=n(5577),d=n(8924),p=n(6856),g=n(4678).Graph;t.exports=function(t,e){let n=e&&e.debugTiming?p.time:p.notime;n("layout",(()=>{let A=n(" buildLayoutGraph",(()=>function(t){let e=new g({multigraph:!0,compound:!0}),n=N(t.graph());return e.setGraph(Object.assign({},_,k(n,v),p.pick(n,y))),t.nodes().forEach((n=>{const r=k(N(t.node(n)),m);Object.keys(w).forEach((t=>{void 0===r[t]&&(r[t]=w[t])})),e.setNode(n,r),e.setParent(n,t.parent(n))})),t.edges().forEach((n=>{let r=N(t.edge(n));e.setEdge(n,Object.assign({},x,k(r,b),p.pick(r,E)))})),e}(t)));n(" runLayout",(()=>function(t,e,n){e(" makeSpaceForEdgeLabels",(()=>function(t){let e=t.graph();e.ranksep/=2,t.edges().forEach((n=>{let r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t))),e(" removeSelfEdges",(()=>function(t){t.edges().forEach((e=>{if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}}))}(t))),e(" acyclic",(()=>r.run(t))),e(" nestingGraph.run",(()=>h.run(t))),e(" rank",(()=>o(p.asNonCompoundGraph(t)))),e(" injectEdgeLabelProxies",(()=>function(t){t.edges().forEach((e=>{let n=t.edge(e);if(n.width&&n.height){let n=t.node(e.v),r={rank:(t.node(e.w).rank-n.rank)/2+n.rank,e};p.addDummyNode(t,"edge-proxy",r,"_ep")}}))}(t))),e(" removeEmptyRanks",(()=>u(t))),e(" nestingGraph.cleanup",(()=>h.cleanup(t))),e(" normalizeRanks",(()=>s(t))),e(" assignRankMinMax",(()=>function(t){let e=0;t.nodes().forEach((n=>{let r=t.node(n);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,e=Math.max(e,r.maxRank))})),t.graph().maxRank=e}(t))),e(" removeEdgeLabelProxies",(()=>function(t){t.nodes().forEach((e=>{let n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t))),e(" normalize.run",(()=>i.run(t))),e(" parentDummyChains",(()=>a(t))),e(" addBorderSegments",(()=>c(t))),e(" order",(()=>f(t,n))),e(" insertSelfEdges",(()=>function(t){p.buildLayerMatrix(t).forEach((e=>{var n=0;e.forEach(((e,r)=>{var i=t.node(e);i.order=r+n,(i.selfEdges||[]).forEach((e=>{p.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:r+ ++n,e:e.e,label:e.label},"_se")})),delete i.selfEdges}))}))}(t))),e(" adjustCoordinateSystem",(()=>l.adjust(t))),e(" position",(()=>d(t))),e(" positionSelfEdges",(()=>function(t){t.nodes().forEach((e=>{var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,o=r.y,s=n.x-i,a=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*s/3,y:o-a},{x:i+5*s/6,y:o-a},{x:i+s,y:o},{x:i+5*s/6,y:o+a},{x:i+2*s/3,y:o+a}],n.label.x=n.x,n.label.y=n.y}}))}(t))),e(" removeBorderNodes",(()=>function(t){t.nodes().forEach((e=>{if(t.children(e).length){let n=t.node(e),r=t.node(n.borderTop),i=t.node(n.borderBottom),o=t.node(n.borderLeft[n.borderLeft.length-1]),s=t.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(s.x-o.x),n.height=Math.abs(i.y-r.y),n.x=o.x+n.width/2,n.y=r.y+n.height/2}})),t.nodes().forEach((e=>{"border"===t.node(e).dummy&&t.removeNode(e)}))}(t))),e(" normalize.undo",(()=>i.undo(t))),e(" fixupEdgeLabelCoords",(()=>function(t){t.edges().forEach((e=>{let n=t.edge(e);if(n.hasOwnProperty("x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t))),e(" undoCoordinateSystem",(()=>l.undo(t))),e(" translateGraph",(()=>function(t){let e=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,i=0,o=t.graph(),s=o.marginx||0,a=o.marginy||0;function u(t){let o=t.x,s=t.y,a=t.width,u=t.height;e=Math.min(e,o-a/2),n=Math.max(n,o+a/2),r=Math.min(r,s-u/2),i=Math.max(i,s+u/2)}t.nodes().forEach((e=>u(t.node(e)))),t.edges().forEach((e=>{let n=t.edge(e);n.hasOwnProperty("x")&&u(n)})),e-=s,r-=a,t.nodes().forEach((n=>{let i=t.node(n);i.x-=e,i.y-=r})),t.edges().forEach((n=>{let i=t.edge(n);i.points.forEach((t=>{t.x-=e,t.y-=r})),i.hasOwnProperty("x")&&(i.x-=e),i.hasOwnProperty("y")&&(i.y-=r)})),o.width=n-e+s,o.height=i-r+a}(t))),e(" assignNodeIntersects",(()=>function(t){t.edges().forEach((e=>{let n,r,i=t.edge(e),o=t.node(e.v),s=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=s,r=o),i.points.unshift(p.intersectRect(o,n)),i.points.push(p.intersectRect(s,r))}))}(t))),e(" reversePoints",(()=>function(t){t.edges().forEach((e=>{let n=t.edge(e);n.reversed&&n.points.reverse()}))}(t))),e(" acyclic.undo",(()=>r.undo(t)))}(A,n,e))),n(" updateInputGraph",(()=>function(t,e){t.nodes().forEach((n=>{let r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,r.rank=i.rank,e.children(n).length&&(r.width=i.width,r.height=i.height))})),t.edges().forEach((n=>{let r=t.edge(n),i=e.edge(n);r.points=i.points,i.hasOwnProperty("x")&&(r.x=i.x,r.y=i.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,A)))}))};let v=["nodesep","edgesep","ranksep","marginx","marginy"],_={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},y=["acyclicer","ranker","rankdir","align"],m=["width","height"],w={width:0,height:0},b=["minlen","weight","width","height","labeloffset"],x={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},E=["labelpos"];function k(t,e){return p.mapValues(p.pick(t,e),Number)}function N(t){var e={};return t&&Object.entries(t).forEach((([t,n])=>{"string"==typeof t&&(t=t.toLowerCase()),e[t]=n})),e}},9885:(t,e,n)=>{let r=n(6856);function i(t,e,n,o,s,a,u){let h=t.children(u);if(!h.length)return void(u!==e&&t.setEdge(e,u,{weight:0,minlen:n}));let c=r.addBorderNode(t,"_bt"),l=r.addBorderNode(t,"_bb"),f=t.node(u);t.setParent(c,u),f.borderTop=c,t.setParent(l,u),f.borderBottom=l,h.forEach((r=>{i(t,e,n,o,s,a,r);let h=t.node(r),f=h.borderTop?h.borderTop:r,d=h.borderBottom?h.borderBottom:r,p=h.borderTop?o:2*o,g=f!==d?1:s-a[u]+1;t.setEdge(c,f,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(d,l,{weight:p,minlen:g,nestingEdge:!0})})),t.parent(u)||t.setEdge(e,c,{weight:0,minlen:s+a[u]})}t.exports={run:function(t){let e=r.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};function n(r,i){var o=t.children(r);o&&o.length&&o.forEach((t=>n(t,i+1))),e[r]=i}return t.children().forEach((t=>n(t,1))),e}(t),o=Math.max(...Object.values(n))-1,s=2*o+1;t.graph().nestingRoot=e,t.edges().forEach((e=>t.edge(e).minlen*=s));let a=function(t){return t.edges().reduce(((e,n)=>e+t.edge(n).weight),0)}(t)+1;t.children().forEach((r=>i(t,e,s,a,o,n,r))),t.graph().nodeRankFactor=s},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,t.edges().forEach((e=>{t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},1293:(t,e,n)=>{"use strict";let r=n(6856);t.exports={run:function(t){t.graph().dummyChains=[],t.edges().forEach((e=>function(t,e){let n,i,o,s=e.v,a=t.node(s).rank,u=e.w,h=t.node(u).rank,c=e.name,l=t.edge(e),f=l.labelRank;if(h!==a+1){for(t.removeEdge(e),o=0,++a;a<h;++o,++a)l.points=[],i={width:0,height:0,edgeLabel:l,edgeObj:e,rank:a},n=r.addDummyNode(t,"edge",i,"_d"),a===f&&(i.width=l.width,i.height=l.height,i.dummy="edge-label",i.labelpos=l.labelpos),t.setEdge(s,n,{weight:l.weight},c),0===o&&t.graph().dummyChains.push(n),s=n;t.setEdge(s,u,{weight:l.weight},c)}}(t,e)))},undo:function(t){t.graph().dummyChains.forEach((e=>{let n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)}))}}},7508:t=>{t.exports=function(t,e,n){let r,i={};n.forEach((n=>{let o,s,a=t.parent(n);for(;a;){if(o=t.parent(a),o?(s=i[o],i[o]=a):(s=r,r=a),s&&s!==a)return void e.setEdge(s,a);a=o}}))}},4592:t=>{t.exports=function(t,e=[]){return e.map((e=>{let n=t.inEdges(e);if(n.length){let r=n.reduce(((e,n)=>{let r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:r.sum/r.weight,weight:r.weight}}return{v:e}}))}},4600:(t,e,n)=>{let r=n(4678).Graph,i=n(6856);t.exports=function(t,e,n){let o=function(t){for(var e;t.hasNode(e=i.uniqueId("_root")););return e}(t),s=new r({compound:!0}).setGraph({root:o}).setDefaultNodeLabel((e=>t.node(e)));return t.nodes().forEach((r=>{let i=t.node(r),a=t.parent(r);(i.rank===e||i.minRank<=e&&e<=i.maxRank)&&(s.setNode(r),s.setParent(r,a||o),t[n](r).forEach((e=>{let n=e.v===r?e.w:e.v,i=s.edge(n,r),o=void 0!==i?i.weight:0;s.setEdge(n,r,{weight:t.edge(e).weight+o})})),i.hasOwnProperty("minRank")&&s.setNode(r,{borderLeft:i.borderLeft[e],borderRight:i.borderRight[e]}))})),s}},835:(t,e,n)=>{"use strict";let r=n(6856).zipObject;function i(t,e,n){let i=r(n,n.map(((t,e)=>e))),o=e.flatMap((e=>t.outEdges(e).map((e=>({pos:i[e.w],weight:t.edge(e).weight}))).sort(((t,e)=>t.pos-e.pos)))),s=1;for(;s<n.length;)s<<=1;let a=2*s-1;s-=1;let u=new Array(a).fill(0),h=0;return o.forEach((t=>{let e=t.pos+s;u[e]+=t.weight;let n=0;for(;e>0;)e%2&&(n+=u[e+1]),e=e-1>>1,u[e]+=t.weight;h+=t.weight*n})),h}t.exports=function(t,e){let n=0;for(let r=1;r<e.length;++r)n+=i(t,e[r-1],e[r]);return n}},5577:(t,e,n)=>{"use strict";let r=n(6498),i=n(835),o=n(2804),s=n(4600),a=n(7508),u=n(4678).Graph,h=n(6856);function c(t,e,n){return e.map((function(e){return s(t,e,n)}))}function l(t,e){let n=new u;t.forEach((function(t){let r=t.graph().root,i=o(t,r,n,e);i.vs.forEach(((e,n)=>t.node(e).order=n)),a(t,n,i.vs)}))}function f(t,e){Object.values(e).forEach((e=>e.forEach(((e,n)=>t.node(e).order=n))))}t.exports=function t(e,n){if(n&&"function"==typeof n.customOrder)return void n.customOrder(e,t);let o=h.maxRank(e),s=c(e,h.range(1,o+1),"inEdges"),a=c(e,h.range(o-1,-1,-1),"outEdges"),u=r(e);if(f(e,u),n&&n.disableOptimalOrderHeuristic)return;let d,p=Number.POSITIVE_INFINITY;for(let t=0,n=0;n<4;++t,++n){l(t%2?s:a,t%4>=2),u=h.buildLayerMatrix(e);let r=i(e,u);r<p&&(n=0,d=Object.assign({},u),p=r)}f(e,d)}},6498:(t,e,n)=>{"use strict";let r=n(6856);t.exports=function(t){let e={},n=t.nodes().filter((e=>!t.children(e).length)),i=Math.max(...n.map((e=>t.node(e).rank))),o=r.range(i+1).map((()=>[]));return n.sort(((e,n)=>t.node(e).rank-t.node(n).rank)).forEach((function n(r){if(e[r])return;e[r]=!0;let i=t.node(r);o[i.rank].push(r),t.successors(r).forEach(n)})),o}},2635:(t,e,n)=>{"use strict";let r=n(6856);t.exports=function(t,e){let n={};return t.forEach(((t,e)=>{let r=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};void 0!==t.barycenter&&(r.barycenter=t.barycenter,r.weight=t.weight)})),e.edges().forEach((t=>{let e=n[t.v],r=n[t.w];void 0!==e&&void 0!==r&&(r.indegree++,e.out.push(n[t.w]))})),function(t){let e=[];function n(t){return e=>{e.merged||(void 0===e.barycenter||void 0===t.barycenter||e.barycenter>=t.barycenter)&&function(t,e){let n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function i(e){return n=>{n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){let r=t.pop();e.push(r),r.in.reverse().forEach(n(r)),r.out.forEach(i(r))}return e.filter((t=>!t.merged)).map((t=>r.pick(t,["vs","i","barycenter","weight"])))}(Object.values(n).filter((t=>!t.indegree)))}},2804:(t,e,n)=>{let r=n(4592),i=n(2635),o=n(5437);t.exports=function t(e,n,s,a){let u=e.children(n),h=e.node(n),c=h?h.borderLeft:void 0,l=h?h.borderRight:void 0,f={};c&&(u=u.filter((t=>t!==c&&t!==l)));let d=r(e,u);d.forEach((n=>{if(e.children(n.v).length){let o=t(e,n.v,s,a);f[n.v]=o,o.hasOwnProperty("barycenter")&&(i=o,void 0!==(r=n).barycenter?(r.barycenter=(r.barycenter*r.weight+i.barycenter*i.weight)/(r.weight+i.weight),r.weight+=i.weight):(r.barycenter=i.barycenter,r.weight=i.weight))}var r,i}));let p=i(d,s);!function(t,e){t.forEach((t=>{t.vs=t.vs.flatMap((t=>e[t]?e[t].vs:t))}))}(p,f);let g=o(p,a);if(c&&(g.vs=[c,g.vs,l].flat(!0),e.predecessors(c).length)){let t=e.node(e.predecessors(c)[0]),n=e.node(e.predecessors(l)[0]);g.hasOwnProperty("barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+t.order+n.order)/(g.weight+2),g.weight+=2}return g}},5437:(t,e,n)=>{let r=n(6856);function i(t,e,n){let r;for(;e.length&&(r=e[e.length-1]).i<=n;)e.pop(),t.push(r.vs),n++;return n}t.exports=function(t,e){let n=r.partition(t,(t=>t.hasOwnProperty("barycenter"))),o=n.lhs,s=n.rhs.sort(((t,e)=>e.i-t.i)),a=[],u=0,h=0,c=0;var l;o.sort((l=!!e,(t,e)=>t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:l?e.i-t.i:t.i-e.i)),c=i(a,s,c),o.forEach((t=>{c+=t.vs.length,a.push(t.vs),u+=t.barycenter*t.weight,h+=t.weight,c=i(a,s,c)}));let f={vs:a.flat(!0)};return h&&(f.barycenter=u/h,f.weight=h),f}},2488:t=>{t.exports=function(t){let e=function(t){let e={},n=0;return t.children().forEach((function r(i){let o=n;t.children(i).forEach(r),e[i]={low:o,lim:n++}})),e}(t);t.graph().dummyChains.forEach((n=>{let r=t.node(n),i=r.edgeObj,o=function(t,e,n,r){let i,o,s=[],a=[],u=Math.min(e[n].low,e[r].low),h=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),s.push(i)}while(i&&(e[i].low>u||h>e[i].lim));for(o=i,i=r;(i=t.parent(i))!==o;)a.push(i);return{path:s.concat(a.reverse()),lca:o}}(t,e,i.v,i.w),s=o.path,a=o.lca,u=0,h=s[u],c=!0;for(;n!==i.w;){if(r=t.node(n),c){for(;(h=s[u])!==a&&t.node(h).maxRank<r.rank;)u++;h===a&&(c=!1)}if(!c){for(;u<s.length-1&&t.node(h=s[u+1]).minRank<=r.rank;)u++;h=s[u]}t.setParent(n,h),n=t.successors(n)[0]}}))}},8121:(t,e,n)=>{"use strict";let r=n(4678).Graph,i=n(6856);function o(t,e){let n={};return e.length&&e.reduce((function(e,r){let i=0,o=0,s=e.length,u=r[r.length-1];return r.forEach(((e,h)=>{let c=function(t,e){if(t.node(e).dummy)return t.predecessors(e).find((e=>t.node(e).dummy))}(t,e),l=c?t.node(c).order:s;(c||e===u)&&(r.slice(o,h+1).forEach((e=>{t.predecessors(e).forEach((r=>{let o=t.node(r),s=o.order;!(s<i||l<s)||o.dummy&&t.node(e).dummy||a(n,r,e)}))})),o=h+1,i=l)})),r})),n}function s(t,e){let n={};function r(e,r,o,s,u){let h;i.range(r,o).forEach((r=>{h=e[r],t.node(h).dummy&&t.predecessors(h).forEach((e=>{let r=t.node(e);r.dummy&&(r.order<s||r.order>u)&&a(n,e,h)}))}))}return e.length&&e.reduce((function(e,n){let i,o=-1,s=0;return n.forEach(((a,u)=>{if("border"===t.node(a).dummy){let e=t.predecessors(a);e.length&&(i=t.node(e[0]).order,r(n,s,u,o,i),s=u,o=i)}r(n,s,n.length,i,e.length)})),n})),n}function a(t,e,n){if(e>n){let t=e;e=n,n=t}let r=t[e];r||(t[e]=r={}),r[n]=!0}function u(t,e,n){if(e>n){let t=e;e=n,n=t}return!!t[e]&&t[e].hasOwnProperty(n)}function h(t,e,n,r){let i={},o={},s={};return e.forEach((t=>{t.forEach(((t,e)=>{i[t]=t,o[t]=t,s[t]=e}))})),e.forEach((t=>{let e=-1;t.forEach((t=>{let a=r(t);if(a.length){a=a.sort(((t,e)=>s[t]-s[e]));let r=(a.length-1)/2;for(let h=Math.floor(r),c=Math.ceil(r);h<=c;++h){let r=a[h];o[t]===t&&e<s[r]&&!u(n,t,r)&&(o[r]=t,o[t]=i[t]=i[r],e=s[r])}}}))})),{root:i,align:o}}function c(t,e,n,i,o){let s={},a=function(t,e,n,i){let o=new r,s=t.graph(),a=function(t,e,n){return(r,i,o)=>{let s,a=r.node(i),u=r.node(o),h=0;if(h+=a.width/2,a.hasOwnProperty("labelpos"))switch(a.labelpos.toLowerCase()){case"l":s=-a.width/2;break;case"r":s=a.width/2}if(s&&(h+=n?s:-s),s=0,h+=(a.dummy?e:t)/2,h+=(u.dummy?e:t)/2,h+=u.width/2,u.hasOwnProperty("labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=u.width/2;break;case"r":s=-u.width/2}return s&&(h+=n?s:-s),s=0,h}}(s.nodesep,s.edgesep,i);return e.forEach((e=>{let r;e.forEach((e=>{let i=n[e];if(o.setNode(i),r){var s=n[r],u=o.edge(s,i);o.setEdge(s,i,Math.max(a(t,e,r),u||0))}r=e}))})),o}(t,e,n,o),u=o?"borderLeft":"borderRight";function h(t,e){let n=a.nodes(),r=n.pop(),i={};for(;r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop()}return h((function(t){s[t]=a.inEdges(t).reduce(((t,e)=>Math.max(t,s[e.v]+a.edge(e))),0)}),a.predecessors.bind(a)),h((function(e){let n=a.outEdges(e).reduce(((t,e)=>Math.min(t,s[e.w]-a.edge(e))),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(s[e]=Math.max(s[e],n))}),a.successors.bind(a)),Object.keys(i).forEach((t=>s[t]=s[n[t]])),s}function l(t,e){return Object.values(e).reduce(((e,n)=>{let r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;Object.entries(n).forEach((([e,n])=>{let o=function(t,e){return t.node(e).width}(t,e)/2;r=Math.max(n+o,r),i=Math.min(n-o,i)}));const o=r-i;return o<e[0]&&(e=[o,n]),e}),[Number.POSITIVE_INFINITY,null])[1]}function f(t,e){let n=Object.values(e),r=Math.min(...n),o=Math.max(...n);["u","d"].forEach((n=>{["l","r"].forEach((s=>{let a=n+s,u=t[a];if(u===e)return;let h=Object.values(u),c=r-Math.min(...h);"l"!==s&&(c=o-Math.max(...h)),c&&(t[a]=i.mapValues(u,(t=>t+c)))}))}))}function d(t,e){return i.mapValues(t.ul,((n,r)=>{if(e)return t[e.toLowerCase()][r];{let e=Object.values(t).map((t=>t[r])).sort(((t,e)=>t-e));return(e[1]+e[2])/2}}))}t.exports={positionX:function(t){let e,n=i.buildLayerMatrix(t),r=Object.assign(o(t,n),s(t,n)),a={};["u","d"].forEach((o=>{e="u"===o?n:Object.values(n).reverse(),["l","r"].forEach((n=>{"r"===n&&(e=e.map((t=>Object.values(t).reverse())));let s=("u"===o?t.predecessors:t.successors).bind(t),u=h(0,e,r,s),l=c(t,e,u.root,u.align,"r"===n);"r"===n&&(l=i.mapValues(l,(t=>-t))),a[o+n]=l}))}));let u=l(t,a);return f(a,u),d(a,t.graph().align)},findType1Conflicts:o,findType2Conflicts:s,addConflict:a,hasConflict:u,verticalAlignment:h,horizontalCompaction:c,alignCoordinates:f,findSmallestWidthAlignment:l,balance:d}},8924:(t,e,n)=>{"use strict";let r=n(6856),i=n(8121).positionX;t.exports=function(t){(function(t){let e=r.buildLayerMatrix(t),n=t.graph().ranksep,i=0;e.forEach((e=>{const r=e.reduce(((e,n)=>{const r=t.node(n).height;return e>r?e:r}),0);e.forEach((e=>t.node(e).y=i+r/2)),i+=r+n}))})(t=r.asNonCompoundGraph(t)),Object.entries(i(t)).forEach((([e,n])=>t.node(e).x=n))}},7885:(t,e,n)=>{"use strict";var r=n(4678).Graph,i=n(4389).slack;function o(t,e){return t.nodes().forEach((function n(r){e.nodeEdges(r).forEach((o=>{var s=o.v,a=r===s?o.w:s;t.hasNode(a)||i(e,o)||(t.setNode(a,{}),t.setEdge(r,a,{}),n(a))}))})),t.nodeCount()}function s(t,e){return e.edges().reduce(((n,r)=>{let o=Number.POSITIVE_INFINITY;return t.hasNode(r.v)!==t.hasNode(r.w)&&(o=i(e,r)),o<n[0]?[o,r]:n}),[Number.POSITIVE_INFINITY,null])[1]}function a(t,e,n){t.nodes().forEach((t=>e.node(t).rank+=n))}t.exports=function(t){var e,n,u=new r({directed:!1}),h=t.nodes()[0],c=t.nodeCount();for(u.setNode(h,{});o(u,t)<c;)e=s(u,t),n=u.hasNode(e.v)?i(t,e):-i(t,e),a(u,t,n);return u}},3045:(t,e,n)=>{"use strict";var r=n(4389).longestPath,i=n(7885),o=n(7520);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":default:!function(t){o(t)}(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":s(t)}};var s=r},7520:(t,e,n)=>{"use strict";var r=n(7885),i=n(4389).slack,o=n(4389).longestPath,s=n(4678).alg.preorder,a=n(4678).alg.postorder,u=n(6856).simplify;function h(t){t=u(t),o(t);var e,n=r(t);for(f(n),c(n,t);e=p(n);)v(n,t,e,g(n,t,e))}function c(t,e){var n=a(t,t.nodes());(n=n.slice(0,n.length-1)).forEach((n=>function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=l(t,e,n)}(t,e,n)))}function l(t,e,n){var r=t.node(n).parent,i=!0,o=e.edge(n,r),s=0;return o||(i=!1,o=e.edge(r,n)),s=o.weight,e.nodeEdges(n).forEach((o=>{var a,u,h=o.v===n,c=h?o.w:o.v;if(c!==r){var l=h===i,f=e.edge(o).weight;if(s+=l?f:-f,a=n,u=c,t.hasEdge(a,u)){var d=t.edge(n,c).cutvalue;s+=l?-d:d}}})),s}function f(t,e){arguments.length<2&&(e=t.nodes()[0]),d(t,{},1,e)}function d(t,e,n,r,i){var o=n,s=t.node(r);return e[r]=!0,t.neighbors(r).forEach((i=>{e.hasOwnProperty(i)||(n=d(t,e,n,i,r))})),s.low=o,s.lim=n++,i?s.parent=i:delete s.parent,n}function p(t){return t.edges().find((e=>t.edge(e).cutvalue<0))}function g(t,e,n){var r=n.v,o=n.w;e.hasEdge(r,o)||(r=n.w,o=n.v);var s=t.node(r),a=t.node(o),u=s,h=!1;s.lim>a.lim&&(u=a,h=!0);var c=e.edges().filter((e=>h===_(0,t.node(e.v),u)&&h!==_(0,t.node(e.w),u)));return c.reduce(((t,n)=>i(e,n)<i(e,t)?n:t))}function v(t,e,n,r){var i=n.v,o=n.w;t.removeEdge(i,o),t.setEdge(r.v,r.w,{}),f(t),c(t,e),function(t,e){var n=t.nodes().find((t=>!e.node(t).parent)),r=s(t,n);(r=r.slice(1)).forEach((n=>{var r=t.node(n).parent,i=e.edge(n,r),o=!1;i||(i=e.edge(r,n),o=!0),e.node(n).rank=e.node(r).rank+(o?i.minlen:-i.minlen)}))}(t,e)}function _(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=h,h.initLowLimValues=f,h.initCutValues=c,h.calcCutValue=l,h.leaveEdge=p,h.enterEdge=g,h.exchangeEdges=v},4389:t=>{"use strict";t.exports={longestPath:function(t){var e={};t.sources().forEach((function n(r){var i=t.node(r);if(e.hasOwnProperty(r))return i.rank;e[r]=!0;var o=Math.min(...t.outEdges(r).map((e=>null==e?Number.POSITIVE_INFINITY:n(e.w)-t.edge(e).minlen)));return o===Number.POSITIVE_INFINITY&&(o=0),i.rank=o}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},6856:(t,e,n)=>{"use strict";let r=n(4678).Graph;function i(t,e,n,r){let i;do{i=a(r)}while(t.hasNode(i));return n.dummy=e,t.setNode(i,n),i}function o(t){return Math.max(...t.nodes().map((e=>{let n=t.node(e).rank;return void 0===n?Number.MIN_VALUE:n})))}t.exports={addBorderNode:function(t,e,n,r){let o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=r),i(t,"border",o,e)},addDummyNode:i,asNonCompoundGraph:function(t){let e=new r({multigraph:t.isMultigraph()}).setGraph(t.graph());return t.nodes().forEach((n=>{t.children(n).length||e.setNode(n,t.node(n))})),t.edges().forEach((n=>{e.setEdge(n,t.edge(n))})),e},buildLayerMatrix:function(t){let e=u(o(t)+1).map((()=>[]));return t.nodes().forEach((n=>{let r=t.node(n),i=r.rank;void 0!==i&&(e[i][r.order]=n)})),e},intersectRect:function(t,e){let n,r,i=t.x,o=t.y,s=e.x-i,a=e.y-o,u=t.width/2,h=t.height/2;if(!s&&!a)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*u>Math.abs(s)*h?(a<0&&(h=-h),n=h*s/a,r=h):(s<0&&(u=-u),n=u,r=u*a/s),{x:i+n,y:o+r}},mapValues:function(t,e){let n=e;return"string"==typeof e&&(n=t=>t[e]),Object.entries(t).reduce(((t,[e,r])=>(t[e]=n(r,e),t)),{})},maxRank:o,normalizeRanks:function(t){let e=Math.min(...t.nodes().map((e=>{let n=t.node(e).rank;return void 0===n?Number.MAX_VALUE:n})));t.nodes().forEach((n=>{let r=t.node(n);r.hasOwnProperty("rank")&&(r.rank-=e)}))},notime:function(t,e){return e()},partition:function(t,e){let n={lhs:[],rhs:[]};return t.forEach((t=>{e(t)?n.lhs.push(t):n.rhs.push(t)})),n},pick:function(t,e){const n={};for(const r of e)void 0!==t[r]&&(n[r]=t[r]);return n},predecessorWeights:function(t){let e=t.nodes().map((e=>{let n={};return t.inEdges(e).forEach((e=>{n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return h(t.nodes(),e)},range:u,removeEmptyRanks:function(t){let e=Math.min(...t.nodes().map((e=>t.node(e).rank))),n=[];t.nodes().forEach((r=>{let i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));let r=0,i=t.graph().nodeRankFactor;Array.from(n).forEach(((e,n)=>{void 0===e&&n%i!=0?--r:void 0!==e&&r&&e.forEach((e=>t.node(e).rank+=r))}))},simplify:function(t){let e=(new r).setGraph(t.graph());return t.nodes().forEach((n=>e.setNode(n,t.node(n)))),t.edges().forEach((n=>{let r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},successorWeights:function(t){let e=t.nodes().map((e=>{let n={};return t.outEdges(e).forEach((e=>{n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return h(t.nodes(),e)},time:function(t,e){let n=Date.now();try{return e()}finally{console.log(t+" time: "+(Date.now()-n)+"ms")}},uniqueId:a,zipObject:h};let s=0;function a(t){var e=++s;return toString(t)+e}function u(t,e,n=1){null==e&&(e=t,t=0);let r=t=>t<e;n<0&&(r=t=>e<t);const i=[];for(let e=t;r(e);e+=n)i.push(e);return i}function h(t,e){return t.reduce(((t,n,r)=>(t[n]=e[r],t)),{})}},898:t=>{t.exports="1.1.3"},4678:(t,e,n)=>{var r=n(2314);t.exports={Graph:r.Graph,json:n(2258),alg:n(6311),version:r.version}},2335:t=>{t.exports=function(t){var e,n={},r=[];function i(r){n.hasOwnProperty(r)||(n[r]=!0,e.push(r),t.successors(r).forEach(i),t.predecessors(r).forEach(i))}return t.nodes().forEach((function(t){e=[],i(t),e.length&&r.push(e)})),r}},6248:t=>{function e(t,e,n,i){for(var o=[[t,!1]];o.length>0;){var s=o.pop();s[1]?i.push(s[0]):n.hasOwnProperty(s[0])||(n[s[0]]=!0,o.push([s[0],!0]),r(e(s[0]),(t=>o.push([t,!1]))))}}function n(t,e,n,i){for(var o=[t];o.length>0;){var s=o.pop();n.hasOwnProperty(s)||(n[s]=!0,i.push(s),r(e(s),(t=>o.push(t))))}}function r(t,e){for(var n=t.length;n--;)e(t[n],n,t);return t}t.exports=function(t,r,i){Array.isArray(r)||(r=[r]);var o=t.isDirected()?e=>t.successors(e):e=>t.neighbors(e),s="post"===i?e:n,a=[],u={};return r.forEach((e=>{if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);s(e,o,u,a)})),a}},3651:(t,e,n)=>{var r=n(4237);t.exports=function(t,e,n){return t.nodes().reduce((function(i,o){return i[o]=r(t,o,e,n),i}),{})}},4237:(t,e,n)=>{var r=n(1997);t.exports=function(t,e,n,o){return function(t,e,n,i){var o,s,a={},u=new r,h=function(t){var e=t.v!==o?t.v:t.w,r=a[e],i=n(t),h=s.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);h<r.distance&&(r.distance=h,r.predecessor=o,u.decrease(e,h))};for(t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;a[t]={distance:n},u.add(t,n)}));u.size()>0&&(o=u.removeMin(),(s=a[o]).distance!==Number.POSITIVE_INFINITY);)i(o).forEach(h);return a}(t,String(e),n||i,o||function(e){return t.outEdges(e)})};var i=()=>1},402:(t,e,n)=>{var r=n(3911);t.exports=function(t){return r(t).filter((function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},3242:t=>{t.exports=function(t,n,r){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,o=e(n);r[t][i]={distance:o,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var o=r[n];i.forEach((function(n){var r=o[t],i=e[n],s=o[n],a=r.distance+i.distance;a<s.distance&&(s.distance=a,s.predecessor=i.predecessor)}))}))})),r}(t,n||e,r||function(e){return t.outEdges(e)})};var e=()=>1},6311:(t,e,n)=>{t.exports={components:n(2335),dijkstra:n(4237),dijkstraAll:n(3651),findCycles:n(402),floydWarshall:n(3242),isAcyclic:n(1158),postorder:n(9289),preorder:n(1924),prim:n(9763),tarjan:n(3911),topsort:n(1964)}},1158:(t,e,n)=>{var r=n(1964);t.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},9289:(t,e,n)=>{var r=n(6248);t.exports=function(t,e){return r(t,e,"post")}},1924:(t,e,n)=>{var r=n(6248);t.exports=function(t,e){return r(t,e,"pre")}},9763:(t,e,n)=>{var r=n(8114),i=n(1997);t.exports=function(t,e){var n,o=new r,s={},a=new i;function u(t){var r=t.v===n?t.w:t.v,i=a.priority(r);if(void 0!==i){var o=e(t);o<i&&(s[r]=n,a.decrease(r,o))}}if(0===t.nodeCount())return o;t.nodes().forEach((function(t){a.add(t,Number.POSITIVE_INFINITY),o.setNode(t)})),a.decrease(t.nodes()[0],0);for(var h=!1;a.size()>0;){if(n=a.removeMin(),s.hasOwnProperty(n))o.setEdge(n,s[n]);else{if(h)throw new Error("Input graph is not connected: "+t);h=!0}t.nodeEdges(n).forEach(u)}return o}},3911:t=>{t.exports=function(t){var e=0,n=[],r={},i=[];function o(s){var a=r[s]={onStack:!0,lowlink:e,index:e++};if(n.push(s),t.successors(s).forEach((function(t){r.hasOwnProperty(t)?r[t].onStack&&(a.lowlink=Math.min(a.lowlink,r[t].index)):(o(t),a.lowlink=Math.min(a.lowlink,r[t].lowlink))})),a.lowlink===a.index){var u,h=[];do{u=n.pop(),r[u].onStack=!1,h.push(u)}while(s!==u);i.push(h)}}return t.nodes().forEach((function(t){r.hasOwnProperty(t)||o(t)})),i}},1964:t=>{function e(t){var e={},r={},i=[];if(t.sinks().forEach((function o(s){if(r.hasOwnProperty(s))throw new n;e.hasOwnProperty(s)||(r[s]=!0,e[s]=!0,t.predecessors(s).forEach(o),delete r[s],i.push(s))})),Object.keys(e).length!==t.nodeCount())throw new n;return i}class n extends Error{constructor(){super(...arguments)}}t.exports=e,e.CycleException=n},1997:t=>{t.exports=class{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map((function(t){return t.key}))}has(t){return this._keyIndices.hasOwnProperty(t)}priority(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority}min(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key}add(t,e){var n=this._keyIndices;if(t=String(t),!n.hasOwnProperty(t)){var r=this._arr,i=r.length;return n[t]=i,r.push({key:t,priority:e}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key}decrease(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)}_heapify(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))}_decrease(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e}_swap(t,e){var n=this._arr,r=this._keyIndices,i=n[t],o=n[e];n[t]=o,n[e]=i,r[o.key]=t,r[i.key]=e}}},8114:t=>{"use strict";var e="\0",n="\0",r="";function i(t,e){t[e]?t[e]++:t[e]=1}function o(t,e){--t[e]||delete t[e]}function s(t,n,i,o){var s=""+n,a=""+i;if(!t&&s>a){var u=s;s=a,a=u}return s+r+a+r+(void 0===o?e:o)}function a(t,e){return s(t,e.v,e.w,e.name)}t.exports=class{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>{};_defaultEdgeLabelFn=()=>{};_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(t){t&&(this._isDirected=!t.hasOwnProperty("directed")||t.directed,this._isMultigraph=!!t.hasOwnProperty("multigraph")&&t.multigraph,this._isCompound=!!t.hasOwnProperty("compound")&&t.compound),this._isCompound&&(this._parent={},this._children={},this._children[n]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return this._defaultNodeLabelFn=t,"function"!=typeof t&&(this._defaultNodeLabelFn=()=>t),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var t=this;return this.nodes().filter((e=>0===Object.keys(t._in[e]).length))}sinks(){var t=this;return this.nodes().filter((e=>0===Object.keys(t._out[e]).length))}setNodes(t,e){var n=arguments,r=this;return t.forEach((function(t){n.length>1?r.setNode(t,e):r.setNode(t)})),this}setNode(t,e){return this._nodes.hasOwnProperty(t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=n,this._children[t]={},this._children[n][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return this._nodes.hasOwnProperty(t)}removeNode(t){var e=this;if(this._nodes.hasOwnProperty(t)){var n=t=>e.removeEdge(e._edgeObjs[t]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],this.children(t).forEach((function(t){e.setParent(t)})),delete this._children[t]),Object.keys(this._in[t]).forEach(n),delete this._in[t],delete this._preds[t],Object.keys(this._out[t]).forEach(n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(void 0===e)e=n;else{for(var r=e+="";void 0!==r;r=this.parent(r))if(r===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==n)return e}}children(t=n){if(this._isCompound){var e=this._children[t];if(e)return Object.keys(e)}else{if(t===n)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return Object.keys(e)}successors(t){var e=this._sucs[t];if(e)return Object.keys(e)}neighbors(t){var e=this.predecessors(t);if(e){const r=new Set(e);for(var n of this.successors(t))r.add(n);return Array.from(r.values())}}isLeaf(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;Object.entries(this._nodes).forEach((function([n,r]){t(n)&&e.setNode(n,r)})),Object.values(this._edgeObjs).forEach((function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var r={};function i(t){var o=n.parent(t);return void 0===o||e.hasNode(o)?(r[t]=o,o):o in r?r[o]:i(o)}return this._isCompound&&e.nodes().forEach((t=>e.setParent(t,i(t)))),e}setDefaultEdgeLabel(t){return this._defaultEdgeLabelFn=t,"function"!=typeof t&&(this._defaultEdgeLabelFn=()=>t),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(t,e){var n=this,r=arguments;return t.reduce((function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i})),this}setEdge(){var t,e,n,r,o=!1,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(t=a.v,e=a.w,n=a.name,2===arguments.length&&(r=arguments[1],o=!0)):(t=a,e=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],o=!0)),t=""+t,e=""+e,void 0!==n&&(n=""+n);var u=s(this._isDirected,t,e,n);if(this._edgeLabels.hasOwnProperty(u))return o&&(this._edgeLabels[u]=r),this;if(void 0!==n&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[u]=o?r:this._defaultEdgeLabelFn(t,e,n);var h=function(t,e,n,r){var i=""+e,o=""+n;if(!t&&i>o){var s=i;i=o,o=s}var a={v:i,w:o};return r&&(a.name=r),a}(this._isDirected,t,e,n);return t=h.v,e=h.w,Object.freeze(h),this._edgeObjs[u]=h,i(this._preds[e],t),i(this._sucs[t],e),this._in[e][u]=h,this._out[t][u]=h,this._edgeCount++,this}edge(t,e,n){var r=1===arguments.length?a(this._isDirected,arguments[0]):s(this._isDirected,t,e,n);return this._edgeLabels[r]}edgeAsObj(){const t=this.edge(...arguments);return"object"!=typeof t?{label:t}:t}hasEdge(t,e,n){var r=1===arguments.length?a(this._isDirected,arguments[0]):s(this._isDirected,t,e,n);return this._edgeLabels.hasOwnProperty(r)}removeEdge(t,e,n){var r=1===arguments.length?a(this._isDirected,arguments[0]):s(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],o(this._preds[e],t),o(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this}inEdges(t,e){var n=this._in[t];if(n){var r=Object.values(n);return e?r.filter((t=>t.v===e)):r}}outEdges(t,e){var n=this._out[t];if(n){var r=Object.values(n);return e?r.filter((t=>t.w===e)):r}}nodeEdges(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}}},2314:(t,e,n)=>{t.exports={Graph:n(8114),version:n(1166)}},2258:(t,e,n)=>{var r=n(8114);function i(t){return t.nodes().map((function(e){var n=t.node(e),r=t.parent(e),i={v:e};return void 0!==n&&(i.value=n),void 0!==r&&(i.parent=r),i}))}function o(t){return t.edges().map((function(e){var n=t.edge(e),r={v:e.v,w:e.w};return void 0!==e.name&&(r.name=e.name),void 0!==n&&(r.value=n),r}))}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:i(t),edges:o(t)};return void 0!==t.graph()&&(e.value=structuredClone(t.graph())),e},read:function(t){var e=new r(t.options).setGraph(t.value);return t.nodes.forEach((function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),t.edges.forEach((function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}}},1166:t=>{t.exports="2.2.2"},935:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,o){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(s[u]=!0)}for(var h=0;h<t.length;h++){var c=[].concat(t[h]);r&&s[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),e.push(c))}},e}},6758:t=>{"use strict";t.exports=function(t){return t[1]}},9126:(t,e,n)=>{"use strict";n.d(e,{A:()=>E});var r=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),i="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,o=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),s="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(o):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},a=["top","right","bottom","left","width","height","size","weight"],u="undefined"!=typeof MutationObserver,h=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&u()}function a(){s(o)}function u(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,e);i=t}return u}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){i&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),u?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){i&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;a.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),c=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},l=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||o},f=_(0,0,0,0);function d(t){return parseFloat(t)||0}function p(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+d(t["border-"+n+"-width"])}),0)}var g="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof l(t).SVGGraphicsElement}:function(t){return t instanceof l(t).SVGElement&&"function"==typeof t.getBBox};function v(t){return i?g(t)?function(t){var e=t.getBBox();return _(0,0,e.width,e.height)}(t):function(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return f;var r=l(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=t["padding-"+i];e[i]=d(o)}return e}(r),o=i.left+i.right,s=i.top+i.bottom,a=d(r.width),u=d(r.height);if("border-box"===r.boxSizing&&(Math.round(a+o)!==e&&(a-=p(r,"left","right")+o),Math.round(u+s)!==n&&(u-=p(r,"top","bottom")+s)),!function(t){return t===l(t).document.documentElement}(t)){var h=Math.round(a+o)-e,c=Math.round(u+s)-n;1!==Math.abs(h)&&(a-=h),1!==Math.abs(c)&&(u-=c)}return _(i.left,i.top,a,u)}(t):f}function _(t,e,n,r){return{x:t,y:e,width:n,height:r}}var y=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=_(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=v(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),m=function(t,e){var n,r,i,o,s,a,u,h=(r=(n=e).x,i=n.y,o=n.width,s=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(a.prototype),c(u,{x:r,y:i,width:o,height:s,top:i,right:r+o,bottom:s+i,left:r}),u);c(this,{target:t,contentRect:h})},w=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new r,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof l(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new y(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof l(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new m(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),b="undefined"!=typeof WeakMap?new WeakMap:new r,x=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=h.getInstance(),r=new w(e,n,this);b.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){x.prototype[t]=function(){var e;return(e=b.get(this))[t].apply(e,arguments)}}));const E=void 0!==o.ResizeObserver?o.ResizeObserver:x},3373:(t,e)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=s(t,o(n)))}return t}function o(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return i.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var n in t)r.call(t,n)&&t[n]&&(e=s(e,n));return e}function s(t,e){return e?t?t+" "+e:t+e:t}t.exports?(i.default=i,t.exports=i):void 0===(n=function(){return i}.apply(e,[]))||(t.exports=n)}()},2740:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(7545),i=n(6902);function o(t,e,n){"symbol"==(0,r.A)(e)&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}var s=n(1369);function a(t,e,n,a,u,h){var c,l,f,d,p,g,v,_=Symbol.metadata||Symbol.for("Symbol.metadata"),y=Object.defineProperty,m=Object.create,w=[m(null),m(null)],b=e.length;function x(e,n,r){return function(i,o){n&&(o=i,i=t);for(var s=0;s<e.length;s++)o=e[s].apply(i,r?[o]:[]);return r?o:i}}function E(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw new TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function k(t,e,n,i,s,a,u,h,f,d,p){function g(t){if(!p(t))throw new TypeError("Attempted to access private element on non-instance")}var v=[].concat(e[0]),_=e[3],m=!u,b=1===s,k=3===s,N=4===s,A=2===s;function M(e,n,r){return function(i,o){return n&&(o=i,i=t),r&&r(i),O[e].call(i,o)}}if(!m){var O={},$=[],T=k?"get":N||b?"set":"value";if(f?(d||b?O={get:o((function(){return _(this)}),i,"get"),set:function(t){e[4](this,t)}}:O[T]=_,d||o(O[T],i,A?"":T)):d||(O=Object.getOwnPropertyDescriptor(t,i)),!d&&!f){if((l=w[+h][i])&&7!=(l^s))throw Error("Decorating two elements with the same name ("+O[T].name+") is not supported yet");w[+h][i]=s<3?1:s}}for(var P=t,I=v.length-1;I>=0;I-=n?2:1){var S=E(v[I],"A decorator","be",!0),C=n?v[I-1]:void 0,j={},z={kind:["field","accessor","method","getter","setter","class"][s],name:i,metadata:c,addInitializer:function(t,e){if(t.v)throw Error("attempted to call addInitializer after decoration was finished");E(e,"An initializer","be",!0),a.push(e)}.bind(null,j)};if(m)l=S.call(C,P,z),j.v=1,E(l,"class decorators","return")&&(P=l);else if(z.static=h,z.private=f,l=z.access={has:f?p.bind():function(t){return i in t}},N||(l.get=f?A?function(t){return g(t),O.value}:M("get",0,g):function(t){return t[i]}),A||k||(l.set=f?M("set",0,g):function(t,e){t[i]=e}),P=S.call(C,b?{get:O.get,set:O.set}:O[T],z),j.v=1,b){if("object"==(0,r.A)(P)&&P)(l=E(P.get,"accessor.get"))&&(O.get=l),(l=E(P.set,"accessor.set"))&&(O.set=l),(l=E(P.init,"accessor.init"))&&$.unshift(l);else if(void 0!==P)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else E(P,(d?"field":"method")+" decorators","return")&&(d?$.unshift(P):O[T]=P)}return s<2&&u.push(x($,h,1),x(a,h,0)),d||m||(f?b?u.splice(-1,0,M("get",h),M("set",h)):u.push(A?O[T]:E.call.bind(O[T])):y(t,i,O)),P}function N(t){return y(t,_,{configurable:!0,enumerable:!0,value:c})}return void 0!==h&&(c=h[_]),c=m(null==c?null:c),p=[],g=function(t){t&&p.push(x(t))},v=function(e,r){for(var o=0;o<n.length;o++){var a=n[o],h=a[1],c=7&h;if((8&h)==e&&!c==r){var l=a[2],g=!!a[3],v=16&h;k(e?t:t.prototype,a,v,g?"#"+l:(0,s.A)(l),c,c<2?[]:e?d=d||[]:f=f||[],p,!!e,g,r,e&&g?function(e){return(0,i.A)(e)===t}:u)}}},v(8,0),v(0,0),v(8,1),v(0,1),g(f),g(d),l=p,b||N(t),{e:l,get c(){var n=[];return b&&[N(t=k(t,[e],a,t.name,5,n)),x(n,1)]}}}},6330:(t,e,n)=>{"use strict";function r(t,e,n,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void n(t)}a.done?e(u):Promise.resolve(u).then(r,i)}function i(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var s=t.apply(e,n);function a(t){r(s,i,o,a,u,"next",t)}function u(t){r(s,i,o,a,u,"throw",t)}a(void 0)}))}}n.d(e,{A:()=>i})},6902:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(7545);function i(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?(0,r.A)(t):"null"));return t}},5536:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(2559);function i(t,e,n){return n((0,r.A)(t,e))}},6514:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});var r={value:()=>{}};function i(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new o(r)}function o(t){this._=t}function s(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function a(t,e,n){for(var i=0,o=t.length;i<o;++i)if(t[i].name===e){t[i]=r,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}o.prototype=i.prototype={constructor:o,on:function(t,e){var n,r,i=this._,o=(r=i,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),u=-1,h=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++u<h;)if(n=(t=o[u]).type)i[n]=a(i[n],t.name,e);else if(null==e)for(n in i)i[n]=a(i[n],t.name,null);return this}for(;++u<h;)if((n=(t=o[u]).type)&&(n=s(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new o(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};const u=i},7931:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});var r=n(3968),i=n(1621),o=n(3993);function s(t){return t.x+t.vx}function a(t){return t.y+t.vy}function u(t){var e,n,u,h=1,c=1;function l(){for(var t,i,l,d,p,g,v,_=e.length,y=0;y<c;++y)for(i=(0,r.A)(e,s,a).visitAfter(f),t=0;t<_;++t)l=e[t],g=n[l.index],v=g*g,d=l.x+l.vx,p=l.y+l.vy,i.visit(m);function m(t,e,n,r,i){var s=t.data,a=t.r,c=g+a;if(!s)return e>d+c||r<d-c||n>p+c||i<p-c;if(s.index>l.index){var f=d-s.x-s.vx,_=p-s.y-s.vy,y=f*f+_*_;y<c*c&&(0===f&&(y+=(f=(0,o.A)(u))*f),0===_&&(y+=(_=(0,o.A)(u))*_),y=(c-(y=Math.sqrt(y)))/y*h,l.vx+=(f*=y)*(c=(a*=a)/(v+a)),l.vy+=(_*=y)*c,s.vx-=f*(c=1-c),s.vy-=_*c)}}}function f(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function d(){if(e){var r,i,o=e.length;for(n=new Array(o),r=0;r<o;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=(0,i.A)(null==t?1:+t)),l.initialize=function(t,n){e=t,u=n,d()},l.iterations=function(t){return arguments.length?(c=+t,l):c},l.strength=function(t){return arguments.length?(h=+t,l):h},l.radius=function(e){return arguments.length?(t="function"==typeof e?e:(0,i.A)(+e),d(),l):t},l}},1621:(t,e,n)=>{"use strict";function r(t){return function(){return t}}n.d(e,{A:()=>r})},3993:(t,e,n)=>{"use strict";function r(t){return 1e-6*(t()-.5)}n.d(e,{A:()=>r})},6149:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(1621),i=n(3993);function o(t){return t.index}function s(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function a(t){var e,n,a,u,h,c,l=o,f=function(t){return 1/Math.min(u[t.source.index],u[t.target.index])},d=(0,r.A)(30),p=1;function g(r){for(var o=0,s=t.length;o<p;++o)for(var a,u,l,f,d,g,v,_=0;_<s;++_)u=(a=t[_]).source,f=(l=a.target).x+l.vx-u.x-u.vx||(0,i.A)(c),d=l.y+l.vy-u.y-u.vy||(0,i.A)(c),f*=g=((g=Math.sqrt(f*f+d*d))-n[_])/g*r*e[_],d*=g,l.vx-=f*(v=h[_]),l.vy-=d*v,u.vx+=f*(v=1-v),u.vy+=d*v}function v(){if(a){var r,i,o=a.length,c=t.length,f=new Map(a.map(((t,e)=>[l(t,e,a),t])));for(r=0,u=new Array(o);r<c;++r)(i=t[r]).index=r,"object"!=typeof i.source&&(i.source=s(f,i.source)),"object"!=typeof i.target&&(i.target=s(f,i.target)),u[i.source.index]=(u[i.source.index]||0)+1,u[i.target.index]=(u[i.target.index]||0)+1;for(r=0,h=new Array(c);r<c;++r)i=t[r],h[r]=u[i.source.index]/(u[i.source.index]+u[i.target.index]);e=new Array(c),_(),n=new Array(c),y()}}function _(){if(a)for(var n=0,r=t.length;n<r;++n)e[n]=+f(t[n],n,t)}function y(){if(a)for(var e=0,r=t.length;e<r;++e)n[e]=+d(t[e],e,t)}return null==t&&(t=[]),g.initialize=function(t,e){a=t,c=e,v()},g.links=function(e){return arguments.length?(t=e,v(),g):t},g.id=function(t){return arguments.length?(l=t,g):l},g.iterations=function(t){return arguments.length?(p=+t,g):p},g.strength=function(t){return arguments.length?(f="function"==typeof t?t:(0,r.A)(+t),_(),g):f},g.distance=function(t){return arguments.length?(d="function"==typeof t?t:(0,r.A)(+t),y(),g):d},g}},3854:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(3968),i=n(1621),o=n(3993),s=n(4842);function a(){var t,e,n,a,u,h=(0,i.A)(-30),c=1,l=1/0,f=.81;function d(n){var i,o=t.length,u=(0,r.A)(t,s.x,s.y).visitAfter(g);for(a=n,i=0;i<o;++i)e=t[i],u.visit(v)}function p(){if(t){var e,n,r=t.length;for(u=new Array(r),e=0;e<r;++e)n=t[e],u[n.index]=+h(n,e,t)}}function g(t){var e,n,r,i,o,s=0,a=0;if(t.length){for(r=i=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(s+=e.value,a+=n,r+=n*e.x,i+=n*e.y);t.x=r/a,t.y=i/a}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=u[e.data.index]}while(e=e.next)}t.value=s}function v(t,r,i,s){if(!t.value)return!0;var h=t.x-e.x,d=t.y-e.y,p=s-r,g=h*h+d*d;if(p*p/f<g)return g<l&&(0===h&&(g+=(h=(0,o.A)(n))*h),0===d&&(g+=(d=(0,o.A)(n))*d),g<c&&(g=Math.sqrt(c*g)),e.vx+=h*t.value*a/g,e.vy+=d*t.value*a/g),!0;if(!(t.length||g>=l)){(t.data!==e||t.next)&&(0===h&&(g+=(h=(0,o.A)(n))*h),0===d&&(g+=(d=(0,o.A)(n))*d),g<c&&(g=Math.sqrt(c*g)));do{t.data!==e&&(p=u[t.data.index]*a/g,e.vx+=h*p,e.vy+=d*p)}while(t=t.next)}}return d.initialize=function(e,r){t=e,n=r,p()},d.strength=function(t){return arguments.length?(h="function"==typeof t?t:(0,i.A)(+t),p(),d):h},d.distanceMin=function(t){return arguments.length?(c=t*t,d):Math.sqrt(c)},d.distanceMax=function(t){return arguments.length?(l=t*t,d):Math.sqrt(l)},d.theta=function(t){return arguments.length?(f=t*t,d):Math.sqrt(f)},d}},4842:(t,e,n)=>{"use strict";n.d(e,{A:()=>f,x:()=>u,y:()=>h});var r=n(6514),i=n(4234);const o=1664525,s=1013904223,a=4294967296;function u(t){return t.x}function h(t){return t.y}var c=10,l=Math.PI*(3-Math.sqrt(5));function f(t){var e,n=1,u=.001,h=1-Math.pow(u,1/300),f=0,d=.6,p=new Map,g=(0,i.O1)(y),v=(0,r.A)("tick","end"),_=function(){let t=1;return()=>(t=(o*t+s)%a)/a}();function y(){m(),v.call("tick",e),n<u&&(g.stop(),v.call("end",e))}function m(r){var i,o,s=t.length;void 0===r&&(r=1);for(var a=0;a<r;++a)for(n+=(f-n)*h,p.forEach((function(t){t(n)})),i=0;i<s;++i)null==(o=t[i]).fx?o.x+=o.vx*=d:(o.x=o.fx,o.vx=0),null==o.fy?o.y+=o.vy*=d:(o.y=o.fy,o.vy=0);return e}function w(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=c*Math.sqrt(.5+n),o=n*l;e.x=i*Math.cos(o),e.y=i*Math.sin(o)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function b(e){return e.initialize&&e.initialize(t,_),e}return null==t&&(t=[]),w(),e={tick:m,restart:function(){return g.restart(y),e},stop:function(){return g.stop(),e},nodes:function(n){return arguments.length?(t=n,w(),p.forEach(b),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(u=+t,e):u},alphaDecay:function(t){return arguments.length?(h=+t,e):+h},alphaTarget:function(t){return arguments.length?(f=+t,e):f},velocityDecay:function(t){return arguments.length?(d=1-t,e):1-d},randomSource:function(t){return arguments.length?(_=t,p.forEach(b),e):_},force:function(t,n){return arguments.length>1?(null==n?p.delete(t):p.set(t,b(n)),e):p.get(t)},find:function(e,n,r){var i,o,s,a,u,h=0,c=t.length;for(null==r?r=1/0:r*=r,h=0;h<c;++h)(s=(i=e-(a=t[h]).x)*i+(o=n-a.y)*o)<r&&(u=a,r=s);return u},on:function(t,n){return arguments.length>1?(v.on(t,n),e):v.on(t)}}}},1945:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(1621);function i(t){var e,n,i,o=(0,r.A)(.1);function s(t){for(var r,o=0,s=e.length;o<s;++o)(r=e[o]).vx+=(i[o]-r.x)*n[o]*t}function a(){if(e){var r,s=e.length;for(n=new Array(s),i=new Array(s),r=0;r<s;++r)n[r]=isNaN(i[r]=+t(e[r],r,e))?0:+o(e[r],r,e)}}return"function"!=typeof t&&(t=(0,r.A)(null==t?0:+t)),s.initialize=function(t){e=t,a()},s.strength=function(t){return arguments.length?(o="function"==typeof t?t:(0,r.A)(+t),a(),s):o},s.x=function(e){return arguments.length?(t="function"==typeof e?e:(0,r.A)(+e),a(),s):t},s}},9418:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(1621);function i(t){var e,n,i,o=(0,r.A)(.1);function s(t){for(var r,o=0,s=e.length;o<s;++o)(r=e[o]).vy+=(i[o]-r.y)*n[o]*t}function a(){if(e){var r,s=e.length;for(n=new Array(s),i=new Array(s),r=0;r<s;++r)n[r]=isNaN(i[r]=+t(e[r],r,e))?0:+o(e[r],r,e)}}return"function"!=typeof t&&(t=(0,r.A)(null==t?0:+t)),s.initialize=function(t){e=t,a()},s.strength=function(t){return arguments.length?(o="function"==typeof t?t:(0,r.A)(+t),a(),s):o},s.y=function(e){return arguments.length?(t="function"==typeof e?e:(0,r.A)(+e),a(),s):t},s}},3968:(t,e,n)=>{"use strict";function r(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,s,a,u,h,c,l,f,d=t._root,p={data:r},g=t._x0,v=t._y0,_=t._x1,y=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((h=e>=(o=(g+_)/2))?g=o:_=o,(c=n>=(s=(v+y)/2))?v=s:y=s,i=d,!(d=d[l=c<<1|h]))return i[l]=p,t;if(a=+t._x.call(null,d.data),u=+t._y.call(null,d.data),e===a&&n===u)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(h=e>=(o=(g+_)/2))?g=o:_=o,(c=n>=(s=(v+y)/2))?v=s:y=s}while((l=c<<1|h)==(f=(u>=s)<<1|a>=o));return i[f]=d,i[l]=p,t}function i(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function o(t){return t[0]}function s(t){return t[1]}function a(t,e,n){var r=new u(null==e?o:e,null==n?s:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function u(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function h(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}n.d(e,{A:()=>a});var c=a.prototype=u.prototype;c.copy=function(){var t,e,n=new u(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=h(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=h(e));return n},c.add=function(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return r(this.cover(e,n),e,n,t)},c.addAll=function(t){var e,n,i,o,s=t.length,a=new Array(s),u=new Array(s),h=1/0,c=1/0,l=-1/0,f=-1/0;for(n=0;n<s;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=i,u[n]=o,i<h&&(h=i),i>l&&(l=i),o<c&&(c=o),o>f&&(f=o));if(h>l||c>f)return this;for(this.cover(h,c).cover(l,f),n=0;n<s;++n)r(this,a[n],u[n],t[n]);return this},c.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var s,a,u=i-n||1,h=this._root;n>t||t>=i||r>e||e>=o;)switch(a=(e<r)<<1|t<n,(s=new Array(4))[a]=h,h=s,u*=2,a){case 0:i=n+u,o=r+u;break;case 1:n=i-u,o=r+u;break;case 2:i=n+u,r=o-u;break;case 3:n=i-u,r=o-u}this._root&&this._root.length&&(this._root=h)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},c.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},c.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},c.find=function(t,e,n){var r,o,s,a,u,h,c,l=this._x0,f=this._y0,d=this._x1,p=this._y1,g=[],v=this._root;for(v&&g.push(new i(v,l,f,d,p)),null==n?n=1/0:(l=t-n,f=e-n,d=t+n,p=e+n,n*=n);h=g.pop();)if(!(!(v=h.node)||(o=h.x0)>d||(s=h.y0)>p||(a=h.x1)<l||(u=h.y1)<f))if(v.length){var _=(o+a)/2,y=(s+u)/2;g.push(new i(v[3],_,y,a,u),new i(v[2],o,y,_,u),new i(v[1],_,s,a,y),new i(v[0],o,s,_,y)),(c=(e>=y)<<1|t>=_)&&(h=g[g.length-1],g[g.length-1]=g[g.length-1-c],g[g.length-1-c]=h)}else{var m=t-+this._x.call(null,v.data),w=e-+this._y.call(null,v.data),b=m*m+w*w;if(b<n){var x=Math.sqrt(n=b);l=t-x,f=e-x,d=t+x,p=e+x,r=v.data}}return r},c.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(s=+this._y.call(null,t)))return this;var e,n,r,i,o,s,a,u,h,c,l,f,d=this._root,p=this._x0,g=this._y0,v=this._x1,_=this._y1;if(!d)return this;if(d.length)for(;;){if((h=o>=(a=(p+v)/2))?p=a:v=a,(c=s>=(u=(g+_)/2))?g=u:_=u,e=d,!(d=d[l=c<<1|h]))return this;if(!d.length)break;(e[l+1&3]||e[l+2&3]||e[l+3&3])&&(n=e,f=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[l]=i:delete e[l],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[f]=d:this._root=d),this):(this._root=i,this)},c.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},c.root=function(){return this._root},c.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},c.visit=function(t){var e,n,r,o,s,a,u=[],h=this._root;for(h&&u.push(new i(h,this._x0,this._y0,this._x1,this._y1));e=u.pop();)if(!t(h=e.node,r=e.x0,o=e.y0,s=e.x1,a=e.y1)&&h.length){var c=(r+s)/2,l=(o+a)/2;(n=h[3])&&u.push(new i(n,c,l,s,a)),(n=h[2])&&u.push(new i(n,r,l,c,a)),(n=h[1])&&u.push(new i(n,c,o,s,l)),(n=h[0])&&u.push(new i(n,r,o,c,l))}return this},c.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new i(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var o=e.node;if(o.length){var s,a=e.x0,u=e.y0,h=e.x1,c=e.y1,l=(a+h)/2,f=(u+c)/2;(s=o[0])&&n.push(new i(s,a,u,l,f)),(s=o[1])&&n.push(new i(s,l,u,h,f)),(s=o[2])&&n.push(new i(s,a,f,l,c)),(s=o[3])&&n.push(new i(s,l,f,h,c))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},c.x=function(t){return arguments.length?(this._x=t,this):this._x},c.y=function(t){return arguments.length?(this._y=t,this):this._y}},2474:(t,e,n)=>{"use strict";function r(t){return function(){return this.matches(t)}}function i(t){return function(e){return e.matches(t)}}n.d(e,{A:()=>r,j:()=>i})},5399:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(9538);function i(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),r.A.hasOwnProperty(e)?{space:r.A[e],local:t}:t}},9538:(t,e,n)=>{"use strict";n.d(e,{A:()=>i,g:()=>r});var r="http://www.w3.org/1999/xhtml";const i={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}},7566:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(7810);function i(t){return"string"==typeof t?new r.LN([[document.querySelector(t)]],[document.documentElement]):new r.LN([[t]],r.zr)}},7810:(t,e,n)=>{"use strict";n.d(e,{LN:()=>ot,Ay:()=>at,zr:()=>it});var r=n(4715),i=n(3972);var o=n(2474),s=Array.prototype.find;function a(){return this.firstElementChild}var u=Array.prototype.filter;function h(){return Array.from(this.children)}function c(t){return new Array(t.length)}function l(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function f(t,e,n,r,i,o){for(var s,a=0,u=e.length,h=o.length;a<h;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new l(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function d(t,e,n,r,i,o,s){var a,u,h,c=new Map,f=e.length,d=o.length,p=new Array(f);for(a=0;a<f;++a)(u=e[a])&&(p[a]=h=s.call(u,u.__data__,a,e)+"",c.has(h)?i[a]=u:c.set(h,u));for(a=0;a<d;++a)h=s.call(t,o[a],a,o)+"",(u=c.get(h))?(r[a]=u,u.__data__=o[a],c.delete(h)):n[a]=new l(t,o[a]);for(a=0;a<f;++a)(u=e[a])&&c.get(p[a])===u&&(i[a]=u)}function p(t){return t.__data__}function g(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function v(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}l.prototype={constructor:l,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var _=n(5399);function y(t){return function(){this.removeAttribute(t)}}function m(t){return function(){this.removeAttributeNS(t.space,t.local)}}function w(t,e){return function(){this.setAttribute(t,e)}}function b(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function x(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function E(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var k=n(5632);function N(t){return function(){delete this[t]}}function A(t,e){return function(){this[t]=e}}function M(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function O(t){return t.trim().split(/^|\s+/)}function $(t){return t.classList||new T(t)}function T(t){this._node=t,this._names=O(t.getAttribute("class")||"")}function P(t,e){for(var n=$(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function I(t,e){for(var n=$(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function S(t){return function(){P(this,t)}}function C(t){return function(){I(this,t)}}function j(t,e){return function(){(e.apply(this,arguments)?P:I)(this,t)}}function z(){this.textContent=""}function L(t){return function(){this.textContent=t}}function R(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function q(){this.innerHTML=""}function D(t){return function(){this.innerHTML=t}}function V(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function G(){this.nextSibling&&this.parentNode.appendChild(this)}function F(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}T.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Y=n(9538);function B(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Y.g&&e.documentElement.namespaceURI===Y.g?e.createElement(t):e.createElementNS(n,t)}}function X(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function H(t){var e=(0,_.A)(t);return(e.local?X:B)(e)}function W(){return null}function U(){var t=this.parentNode;t&&t.removeChild(this)}function K(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Q(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function J(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Z(t,e,n){return function(){var r,i=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var s=0,a=i.length;s<a;++s)if((r=i[s]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=e);this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}var tt=n(1382);function et(t,e,n){var r=(0,tt.A)(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function nt(t,e){return function(){return et(this,t,e)}}function rt(t,e){return function(){return et(this,t,e.apply(this,arguments))}}var it=[null];function ot(t,e){this._groups=t,this._parents=e}function st(){return new ot([[document.documentElement]],it)}ot.prototype=st.prototype={constructor:ot,select:function(t){"function"!=typeof t&&(t=(0,r.A)(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var s,a,u=e[o],h=u.length,c=i[o]=new Array(h),l=0;l<h;++l)(s=u[l])&&(a=t.call(s,s.__data__,l,u))&&("__data__"in s&&(a.__data__=s.__data__),c[l]=a);return new ot(i,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}(t):(0,i.A)(t);for(var e=this._groups,n=e.length,r=[],o=[],s=0;s<n;++s)for(var a,u=e[s],h=u.length,c=0;c<h;++c)(a=u[c])&&(r.push(t.call(a,a.__data__,c,u)),o.push(a));return new ot(r,o)},selectChild:function(t){return this.select(null==t?a:function(t){return function(){return s.call(this.children,t)}}("function"==typeof t?t:(0,o.j)(t)))},selectChildren:function(t){return this.selectAll(null==t?h:function(t){return function(){return u.call(this.children,t)}}("function"==typeof t?t:(0,o.j)(t)))},filter:function(t){"function"!=typeof t&&(t=(0,o.A)(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var s,a=e[i],u=a.length,h=r[i]=[],c=0;c<u;++c)(s=a[c])&&t.call(s,s.__data__,c,a)&&h.push(s);return new ot(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,p);var n,r=e?d:f,i=this._parents,o=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var s=o.length,a=new Array(s),u=new Array(s),h=new Array(s),c=0;c<s;++c){var l=i[c],v=o[c],_=v.length,y=g(t.call(l,l&&l.__data__,c,i)),m=y.length,w=u[c]=new Array(m),b=a[c]=new Array(m);r(l,v,w,b,h[c]=new Array(_),y,e);for(var x,E,k=0,N=0;k<m;++k)if(x=w[k]){for(k>=N&&(N=k+1);!(E=b[N])&&++N<m;);x._next=E||null}}return(a=new ot(a,i))._enter=u,a._exit=h,a},enter:function(){return new ot(this._enter||this._groups.map(c),this._parents)},exit:function(){return new ot(this._exit||this._groups.map(c),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,s=Math.min(i,o),a=new Array(i),u=0;u<s;++u)for(var h,c=n[u],l=r[u],f=c.length,d=a[u]=new Array(f),p=0;p<f;++p)(h=c[p]||l[p])&&(d[p]=h);for(;u<i;++u)a[u]=n[u];return new ot(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,s=i[o];--o>=0;)(r=i[o])&&(s&&4^r.compareDocumentPosition(s)&&s.parentNode.insertBefore(r,s),s=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=v);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s,a=n[o],u=a.length,h=i[o]=new Array(u),c=0;c<u;++c)(s=a[c])&&(h[c]=s);h.sort(e)}return new ot(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],s=0,a=o.length;s<a;++s)(i=o[s])&&t.call(i,i.__data__,s,o);return this},attr:function(t,e){var n=(0,_.A)(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?m:y:"function"==typeof e?n.local?E:x:n.local?b:w)(n,e))},style:k.A,property:function(t,e){return arguments.length>1?this.each((null==e?N:"function"==typeof e?M:A)(t,e)):this.node()[t]},classed:function(t,e){var n=O(t+"");if(arguments.length<2){for(var r=$(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?j:e?S:C)(n,e))},text:function(t){return arguments.length?this.each(null==t?z:("function"==typeof t?R:L)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?q:("function"==typeof t?V:D)(t)):this.node().innerHTML},raise:function(){return this.each(G)},lower:function(){return this.each(F)},append:function(t){var e="function"==typeof t?t:H(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:H(t),i=null==e?W:"function"==typeof e?e:(0,r.A)(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(U)},clone:function(t){return this.select(t?Q:K)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),s=o.length;if(!(arguments.length<2)){for(a=e?Z:J,r=0;r<s;++r)this.each(a(o[r],e,n));return this}var a=this.node().__on;if(a)for(var u,h=0,c=a.length;h<c;++h)for(r=0,u=a[h];r<s;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?rt:nt)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],o=0,s=i.length;o<s;++o)(r=i[o])&&(yield r)}};const at=st},5632:(t,e,n)=>{"use strict";n.d(e,{A:()=>a,j:()=>u});var r=n(1382);function i(t){return function(){this.style.removeProperty(t)}}function o(t,e,n){return function(){this.style.setProperty(t,e,n)}}function s(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function a(t,e,n){return arguments.length>1?this.each((null==e?i:"function"==typeof e?s:o)(t,e,null==n?"":n)):u(this.node(),t)}function u(t,e){return t.style.getPropertyValue(e)||(0,r.A)(t).getComputedStyle(t,null).getPropertyValue(e)}},4715:(t,e,n)=>{"use strict";function r(){}function i(t){return null==t?r:function(){return this.querySelector(t)}}n.d(e,{A:()=>i})},3972:(t,e,n)=>{"use strict";function r(){return[]}function i(t){return null==t?r:function(){return this.querySelectorAll(t)}}n.d(e,{A:()=>i})},1382:(t,e,n)=>{"use strict";function r(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}n.d(e,{A:()=>r})},4993:(t,e,n)=>{"use strict";function r(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function i(t){this._context=t}function o(t){return new i(t)}n.d(e,{Ay:()=>o}),i.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:r(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:r(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}}},4643:(t,e,n)=>{"use strict";n.d(e,{dJ:()=>i,kl:()=>o});class r{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function i(t){return new r(t,!0)}function o(t){return new r(t,!1)}},482:(t,e,n)=>{"use strict";function r(t){this._context=t}function i(t){return new r(t)}n.d(e,{A:()=>i}),r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}}},3488:(t,e,n)=>{"use strict";function r(t){return t<0?-1:1}function i(t,e,n){var i=t._x1-t._x0,o=e-t._x1,s=(t._y1-t._y0)/(i||o<0&&-0),a=(n-t._y1)/(o||i<0&&-0),u=(s*o+a*i)/(i+o);return(r(s)+r(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(u))||0}function o(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function s(t,e,n){var r=t._x0,i=t._y0,o=t._x1,s=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,i+a*e,o-a,s-a*n,o,s)}function a(t){this._context=t}function u(t){this._context=new h(t)}function h(t){this._context=t}function c(t){return new a(t)}function l(t){return new u(t)}n.d(e,{G:()=>c,N:()=>l}),a.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:s(this,this._t0,o(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,s(this,o(this,n=i(this,t,e)),n);break;default:s(this,this._t0,n=i(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(u.prototype=Object.create(a.prototype)).point=function(t,e){a.prototype.point.call(this,e,t)},h.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}}},6066:(t,e,n)=>{"use strict";function r(t){this._context=t}function i(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),s=new Array(r);for(i[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,o[e]=4,s[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,o[r-1]=7,s[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/o[e-1],o[e]-=n,s[e]-=n*s[e-1];for(i[r-1]=s[r-1]/o[r-1],e=r-2;e>=0;--e)i[e]=(s[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function o(t){return new r(t)}n.d(e,{A:()=>o}),r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=i(t),o=i(e),s=0,a=1;a<n;++s,++a)this._context.bezierCurveTo(r[0][s],o[0][s],r[1][s],o[1][s],t[a],e[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}}},3269:(t,e,n)=>{"use strict";function r(t){return function(){return t}}n.d(e,{A:()=>d}),Array.prototype.slice;var i=n(482);const o=Math.PI,s=2*o,a=1e-6,u=s-a;function h(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class c{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?h:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return h;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,o){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let s=this._x1,u=this._y1,h=n-t,c=r-e,l=s-t,f=u-e,d=l*l+f*f;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(d>a)if(Math.abs(f*h-c*l)>a&&i){let p=n-s,g=r-u,v=h*h+c*c,_=p*p+g*g,y=Math.sqrt(v),m=Math.sqrt(d),w=i*Math.tan((o-Math.acos((v+d-_)/(2*y*m)))/2),b=w/m,x=w/y;Math.abs(b-1)>a&&this._append`L${t+b*l},${e+b*f}`,this._append`A${i},${i},0,0,${+(f*p>l*g)},${this._x1=t+x*h},${this._y1=e+x*c}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,n,r,i,h){if(t=+t,e=+e,h=!!h,(n=+n)<0)throw new Error(`negative radius: ${n}`);let c=n*Math.cos(r),l=n*Math.sin(r),f=t+c,d=e+l,p=1^h,g=h?r-i:i-r;null===this._x1?this._append`M${f},${d}`:(Math.abs(this._x1-f)>a||Math.abs(this._y1-d)>a)&&this._append`L${f},${d}`,n&&(g<0&&(g=g%s+s),g>u?this._append`A${n},${n},0,1,${p},${t-c},${e-l}A${n},${n},0,1,${p},${this._x1=f},${this._y1=d}`:g>a&&this._append`A${n},${n},0,${+(g>=o)},${p},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function l(t){return t[0]}function f(t){return t[1]}function d(t,e){var n=r(!0),o=null,s=i.A,a=null,u=function(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new c(e)}(h);function h(r){var i,h,c,l=(r=function(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}(r)).length,f=!1;for(null==o&&(a=s(c=u())),i=0;i<=l;++i)!(i<l&&n(h=r[i],i,r))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+t(h,i,r),+e(h,i,r));if(c)return a=null,c+""||null}return t="function"==typeof t?t:void 0===t?l:r(t),e="function"==typeof e?e:void 0===e?f:r(e),h.x=function(e){return arguments.length?(t="function"==typeof e?e:r(+e),h):t},h.y=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),h):e},h.defined=function(t){return arguments.length?(n="function"==typeof t?t:r(!!t),h):n},h.curve=function(t){return arguments.length?(s=t,null!=o&&(a=s(o)),h):s},h.context=function(t){return arguments.length?(null==t?o=a=null:a=s(o=t),h):o},h}c.prototype},4234:(t,e,n)=>{"use strict";n.d(e,{M4:()=>v,O1:()=>_,tB:()=>p});var r,i,o=0,s=0,a=0,u=1e3,h=0,c=0,l=0,f="object"==typeof performance&&performance.now?performance:Date,d="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function p(){return c||(d(g),c=f.now()+l)}function g(){c=0}function v(){this._call=this._time=this._next=null}function _(t,e,n){var r=new v;return r.restart(t,e,n),r}function y(){c=(h=f.now())+l,o=s=0;try{!function(){p(),++o;for(var t,e=r;e;)(t=c-e._time)>=0&&e._call.call(void 0,t),e=e._next;--o}()}finally{o=0,function(){for(var t,e,n=r,o=1/0;n;)n._call?(o>n._time&&(o=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:r=e);i=t,w(o)}(),c=0}}function m(){var t=f.now(),e=t-h;e>u&&(l-=e,h=t)}function w(t){o||(s&&(s=clearTimeout(s)),t-c>24?(t<1/0&&(s=setTimeout(y,t-f.now()-l)),a&&(a=clearInterval(a))):(a||(h=f.now(),a=setInterval(m,u)),o=1,d(y)))}v.prototype=_.prototype={constructor:v,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?p():+n)+(null==e?0:+e),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=t,this._time=n,w()},stop:function(){this._call&&(this._call=null,this._time=1/0,w())}}},9047:(t,e,n)=>{"use strict";n.d(e,{uV:()=>Pe,s_:()=>Ve});var r=n(6514),i=n(7566);const o={capture:!0,passive:!1};function s(t){t.preventDefault(),t.stopImmediatePropagation()}function a(t){return((t=Math.exp(t))+1/t)/2}const u=function t(e,n,r){function i(t,i){var o,s,u=t[0],h=t[1],c=t[2],l=i[0],f=i[1],d=i[2],p=l-u,g=f-h,v=p*p+g*g;if(v<1e-12)s=Math.log(d/c)/e,o=function(t){return[u+t*p,h+t*g,c*Math.exp(e*t*s)]};else{var _=Math.sqrt(v),y=(d*d-c*c+r*v)/(2*c*n*_),m=(d*d-c*c-r*v)/(2*d*n*_),w=Math.log(Math.sqrt(y*y+1)-y),b=Math.log(Math.sqrt(m*m+1)-m);s=(b-w)/e,o=function(t){var r,i=t*s,o=a(w),l=c/(n*_)*(o*(r=e*i+w,((r=Math.exp(2*r))-1)/(r+1))-function(t){return((t=Math.exp(t))-1/t)/2}(w));return[u+l*p,h+l*g,c*o/a(e*i+w)]}}return o.duration=1e3*s*e/Math.SQRT2,o}return i.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},i}(Math.SQRT2,2,4);function h(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}var c=n(7810),l=n(4234);function f(t,e,n){var r=new l.M4;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}var d=(0,r.A)("start","end","cancel","interrupt"),p=[],g=0,v=2,_=3,y=5,m=6;function w(t,e,n,r,i,o){var s=t.__transition;if(s){if(n in s)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(u){var h,c,l,d;if(1!==n.state)return a();for(h in i)if((d=i[h]).name===n.name){if(d.state===_)return f(o);4===d.state?(d.state=m,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[h]):+h<e&&(d.state=m,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[h])}if(f((function(){n.state===_&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(u))})),n.state=v,n.on.call("start",t,t.__data__,n.index,n.group),n.state===v){for(n.state=_,r=new Array(l=n.tween.length),h=0,c=-1;h<l;++h)(d=n.tween[h].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=d);r.length=c+1}}function s(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(a),n.state=y,1),o=-1,s=r.length;++o<s;)r[o].call(t,i);n.state===y&&(n.on.call("end",t,t.__data__,n.index,n.group),a())}function a(){for(var r in n.state=m,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=(0,l.O1)((function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:d,tween:p,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:g})}function b(t,e){var n=E(t,e);if(n.state>g)throw new Error("too late; already scheduled");return n}function x(t,e){var n=E(t,e);if(n.state>_)throw new Error("too late; already running");return n}function E(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function k(t,e){var n,r,i,o=t.__transition,s=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>v&&n.state<y,n.state=m,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):s=!1;s&&delete t.__transition}}function N(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var A,M=180/Math.PI,O={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function $(t,e,n,r,i,o){var s,a,u;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,u/=a),t*r<e*n&&(t=-t,e=-e,u=-u,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*M,skewX:Math.atan(u)*M,scaleX:s,scaleY:a}}function T(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,s){var a=[],u=[];return o=t(o),s=t(s),function(t,r,i,o,s,a){if(t!==i||r!==o){var u=s.push("translate(",null,e,null,n);a.push({i:u-4,x:N(t,i)},{i:u-2,x:N(r,o)})}else(i||o)&&s.push("translate("+i+e+o+n)}(o.translateX,o.translateY,s.translateX,s.translateY,a,u),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:N(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,s.rotate,a,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:N(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,s.skewX,a,u),function(t,e,n,r,o,s){if(t!==n||e!==r){var a=o.push(i(o)+"scale(",null,",",null,")");s.push({i:a-4,x:N(t,n)},{i:a-2,x:N(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,a,u),o=s=null,function(t){for(var e,n=-1,r=u.length;++n<r;)a[(e=u[n]).i]=e.x(t);return a.join("")}}}var P=T((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?O:$(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),I=T((function(t){return null==t?O:(A||(A=document.createElementNS("http://www.w3.org/2000/svg","g")),A.setAttribute("transform",t),(t=A.transform.baseVal.consolidate())?$((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):O)}),", ",")",")"),S=n(5399);function C(t,e){var n,r;return function(){var i=x(this,t),o=i.tween;if(o!==n)for(var s=0,a=(r=n=o).length;s<a;++s)if(r[s].name===e){(r=r.slice()).splice(s,1);break}i.tween=r}}function j(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=x(this,t),s=o.tween;if(s!==r){i=(r=s).slice();for(var a={name:e,value:n},u=0,h=i.length;u<h;++u)if(i[u].name===e){i[u]=a;break}u===h&&i.push(a)}o.tween=i}}function z(t,e,n){var r=t._id;return t.each((function(){var t=x(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return E(t,r).value[e]}}function L(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function R(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function q(){}var D=.7,V=1/D,G="\\s*([+-]?\\d+)\\s*",F="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Y="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",B=/^#([0-9a-f]{3,8})$/,X=new RegExp(`^rgb\\(${G},${G},${G}\\)$`),H=new RegExp(`^rgb\\(${Y},${Y},${Y}\\)$`),W=new RegExp(`^rgba\\(${G},${G},${G},${F}\\)$`),U=new RegExp(`^rgba\\(${Y},${Y},${Y},${F}\\)$`),K=new RegExp(`^hsl\\(${F},${Y},${Y}\\)$`),Q=new RegExp(`^hsla\\(${F},${Y},${Y},${F}\\)$`),J={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Z(){return this.rgb().formatHex()}function tt(){return this.rgb().formatRgb()}function et(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=B.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?nt(e):3===n?new it(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?rt(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?rt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=X.exec(t))?new it(e[1],e[2],e[3],1):(e=H.exec(t))?new it(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=W.exec(t))?rt(e[1],e[2],e[3],e[4]):(e=U.exec(t))?rt(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=K.exec(t))?ct(e[1],e[2]/100,e[3]/100,1):(e=Q.exec(t))?ct(e[1],e[2]/100,e[3]/100,e[4]):J.hasOwnProperty(t)?nt(J[t]):"transparent"===t?new it(NaN,NaN,NaN,0):null}function nt(t){return new it(t>>16&255,t>>8&255,255&t,1)}function rt(t,e,n,r){return r<=0&&(t=e=n=NaN),new it(t,e,n,r)}function it(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ot(){return`#${ht(this.r)}${ht(this.g)}${ht(this.b)}`}function st(){const t=at(this.opacity);return`${1===t?"rgb(":"rgba("}${ut(this.r)}, ${ut(this.g)}, ${ut(this.b)}${1===t?")":`, ${t})`}`}function at(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ut(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ht(t){return((t=ut(t))<16?"0":"")+t.toString(16)}function ct(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ft(t,e,n,r)}function lt(t){if(t instanceof ft)return new ft(t.h,t.s,t.l,t.opacity);if(t instanceof q||(t=et(t)),!t)return new ft;if(t instanceof ft)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,a=o-i,u=(o+i)/2;return a?(s=e===o?(n-r)/a+6*(n<r):n===o?(r-e)/a+2:(e-n)/a+4,a/=u<.5?o+i:2-o-i,s*=60):a=u>0&&u<1?0:s,new ft(s,a,u,t.opacity)}function ft(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function dt(t){return(t=(t||0)%360)<0?t+360:t}function pt(t){return Math.max(0,Math.min(1,t||0))}function gt(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function vt(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function _t(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function yt(){}L(q,et,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Z,formatHex:Z,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return lt(this).formatHsl()},formatRgb:tt,toString:tt}),L(it,(function(t,e,n,r){return 1===arguments.length?((i=t)instanceof q||(i=et(i)),i?new it((i=i.rgb()).r,i.g,i.b,i.opacity):new it):new it(t,e,n,null==r?1:r);var i}),R(q,{brighter(t){return t=null==t?V:Math.pow(V,t),new it(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?D:Math.pow(D,t),new it(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new it(ut(this.r),ut(this.g),ut(this.b),at(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ot,formatHex:ot,formatHex8:function(){return`#${ht(this.r)}${ht(this.g)}${ht(this.b)}${ht(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:st,toString:st})),L(ft,(function(t,e,n,r){return 1===arguments.length?lt(t):new ft(t,e,n,null==r?1:r)}),R(q,{brighter(t){return t=null==t?V:Math.pow(V,t),new ft(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?D:Math.pow(D,t),new ft(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new it(gt(t>=240?t-240:t+120,i,r),gt(t,i,r),gt(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new ft(dt(this.h),pt(this.s),pt(this.l),at(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=at(this.opacity);return`${1===t?"hsl(":"hsla("}${dt(this.h)}, ${100*pt(this.s)}%, ${100*pt(this.l)}%${1===t?")":`, ${t})`}`}}));var mt=.7,wt=1/mt,bt="\\s*([+-]?\\d+)\\s*",xt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Et="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kt=/^#([0-9a-f]{3,8})$/,Nt=new RegExp(`^rgb\\(${bt},${bt},${bt}\\)$`),At=new RegExp(`^rgb\\(${Et},${Et},${Et}\\)$`),Mt=new RegExp(`^rgba\\(${bt},${bt},${bt},${xt}\\)$`),Ot=new RegExp(`^rgba\\(${Et},${Et},${Et},${xt}\\)$`),$t=new RegExp(`^hsl\\(${xt},${Et},${Et}\\)$`),Tt=new RegExp(`^hsla\\(${xt},${Et},${Et},${xt}\\)$`),Pt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function It(){return this.rgb().formatHex()}function St(){return this.rgb().formatRgb()}function Ct(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=kt.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?jt(e):3===n?new Rt(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?zt(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?zt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Nt.exec(t))?new Rt(e[1],e[2],e[3],1):(e=At.exec(t))?new Rt(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Mt.exec(t))?zt(e[1],e[2],e[3],e[4]):(e=Ot.exec(t))?zt(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=$t.exec(t))?Yt(e[1],e[2]/100,e[3]/100,1):(e=Tt.exec(t))?Yt(e[1],e[2]/100,e[3]/100,e[4]):Pt.hasOwnProperty(t)?jt(Pt[t]):"transparent"===t?new Rt(NaN,NaN,NaN,0):null}function jt(t){return new Rt(t>>16&255,t>>8&255,255&t,1)}function zt(t,e,n,r){return r<=0&&(t=e=n=NaN),new Rt(t,e,n,r)}function Lt(t,e,n,r){return 1===arguments.length?((i=t)instanceof yt||(i=Ct(i)),i?new Rt((i=i.rgb()).r,i.g,i.b,i.opacity):new Rt):new Rt(t,e,n,null==r?1:r);var i}function Rt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function qt(){return`#${Ft(this.r)}${Ft(this.g)}${Ft(this.b)}`}function Dt(){const t=Vt(this.opacity);return`${1===t?"rgb(":"rgba("}${Gt(this.r)}, ${Gt(this.g)}, ${Gt(this.b)}${1===t?")":`, ${t})`}`}function Vt(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Gt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ft(t){return((t=Gt(t))<16?"0":"")+t.toString(16)}function Yt(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Xt(t,e,n,r)}function Bt(t){if(t instanceof Xt)return new Xt(t.h,t.s,t.l,t.opacity);if(t instanceof yt||(t=Ct(t)),!t)return new Xt;if(t instanceof Xt)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,a=o-i,u=(o+i)/2;return a?(s=e===o?(n-r)/a+6*(n<r):n===o?(r-e)/a+2:(e-n)/a+4,a/=u<.5?o+i:2-o-i,s*=60):a=u>0&&u<1?0:s,new Xt(s,a,u,t.opacity)}function Xt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ht(t){return(t=(t||0)%360)<0?t+360:t}function Wt(t){return Math.max(0,Math.min(1,t||0))}function Ut(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Kt(t,e,n,r,i){var o=t*t,s=o*t;return((1-3*t+3*o-s)*e+(4-6*o+3*s)*n+(1+3*t+3*o-3*s)*r+s*i)/6}vt(yt,Ct,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:It,formatHex:It,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Bt(this).formatHsl()},formatRgb:St,toString:St}),vt(Rt,Lt,_t(yt,{brighter(t){return t=null==t?wt:Math.pow(wt,t),new Rt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?mt:Math.pow(mt,t),new Rt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Rt(Gt(this.r),Gt(this.g),Gt(this.b),Vt(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:qt,formatHex:qt,formatHex8:function(){return`#${Ft(this.r)}${Ft(this.g)}${Ft(this.b)}${Ft(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Dt,toString:Dt})),vt(Xt,(function(t,e,n,r){return 1===arguments.length?Bt(t):new Xt(t,e,n,null==r?1:r)}),_t(yt,{brighter(t){return t=null==t?wt:Math.pow(wt,t),new Xt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?mt:Math.pow(mt,t),new Xt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Rt(Ut(t>=240?t-240:t+120,i,r),Ut(t,i,r),Ut(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Xt(Ht(this.h),Wt(this.s),Wt(this.l),Vt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Vt(this.opacity);return`${1===t?"hsl(":"hsla("}${Ht(this.h)}, ${100*Wt(this.s)}%, ${100*Wt(this.l)}%${1===t?")":`, ${t})`}`}}));const Qt=t=>()=>t;function Jt(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Qt(isNaN(t)?e:t)}const Zt=function t(e){var n=function(t){return 1==(t=+t)?Jt:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Qt(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=Lt(t)).r,(e=Lt(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),s=Jt(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=s(e),t+""}}return r.gamma=t,r}(1);function te(t){return function(e){var n,r,i=e.length,o=new Array(i),s=new Array(i),a=new Array(i);for(n=0;n<i;++n)r=Lt(e[n]),o[n]=r.r||0,s[n]=r.g||0,a[n]=r.b||0;return o=t(o),s=t(s),a=t(a),r.opacity=1,function(t){return r.r=o(t),r.g=s(t),r.b=a(t),r+""}}}te((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],s=r>0?t[r-1]:2*i-o,a=r<e-1?t[r+2]:2*o-i;return Kt((n-r/e)*e,s,i,o,a)}})),te((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],s=t[(r+1)%e],a=t[(r+2)%e];return Kt((n-r/e)*e,i,o,s,a)}}));var ee=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ne=new RegExp(ee.source,"g");function re(t,e){var n,r,i,o=ee.lastIndex=ne.lastIndex=0,s=-1,a=[],u=[];for(t+="",e+="";(n=ee.exec(t))&&(r=ne.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),a[s]?a[s]+=i:a[++s]=i),(n=n[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,u.push({i:s,x:N(n,r)})),o=ne.lastIndex;return o<e.length&&(i=e.slice(o),a[s]?a[s]+=i:a[++s]=i),a.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)a[(n=u[r]).i]=n.x(t);return a.join("")})}function ie(t,e){var n;return("number"==typeof e?N:e instanceof et?Zt:(n=et(e))?(e=n,Zt):re)(t,e)}function oe(t){return function(){this.removeAttribute(t)}}function se(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ae(t,e,n){var r,i,o=n+"";return function(){var s=this.getAttribute(t);return s===o?null:s===r?i:i=e(r=s,n)}}function ue(t,e,n){var r,i,o=n+"";return function(){var s=this.getAttributeNS(t.space,t.local);return s===o?null:s===r?i:i=e(r=s,n)}}function he(t,e,n){var r,i,o;return function(){var s,a,u=n(this);if(null!=u)return(s=this.getAttribute(t))===(a=u+"")?null:s===r&&a===i?o:(i=a,o=e(r=s,u));this.removeAttribute(t)}}function ce(t,e,n){var r,i,o;return function(){var s,a,u=n(this);if(null!=u)return(s=this.getAttributeNS(t.space,t.local))===(a=u+"")?null:s===r&&a===i?o:(i=a,o=e(r=s,u));this.removeAttributeNS(t.space,t.local)}}function le(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,i)),n}return i._value=e,i}function fe(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,i)),n}return i._value=e,i}function de(t,e){return function(){b(this,t).delay=+e.apply(this,arguments)}}function pe(t,e){return e=+e,function(){b(this,t).delay=e}}function ge(t,e){return function(){x(this,t).duration=+e.apply(this,arguments)}}function ve(t,e){return e=+e,function(){x(this,t).duration=e}}var _e=n(2474),ye=n(4715),me=n(3972),we=c.Ay.prototype.constructor,be=n(5632);function xe(t){return function(){this.style.removeProperty(t)}}var Ee=0;function ke(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ne(){return++Ee}var Ae=c.Ay.prototype;ke.prototype=function(t){return(0,c.Ay)().transition(t)}.prototype={constructor:ke,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=(0,ye.A)(t));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var a,u,h=r[s],c=h.length,l=o[s]=new Array(c),f=0;f<c;++f)(a=h[f])&&(u=t.call(a,a.__data__,f,h))&&("__data__"in a&&(u.__data__=a.__data__),l[f]=u,w(l[f],e,n,f,l,E(a,n)));return new ke(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=(0,me.A)(t));for(var r=this._groups,i=r.length,o=[],s=[],a=0;a<i;++a)for(var u,h=r[a],c=h.length,l=0;l<c;++l)if(u=h[l]){for(var f,d=t.call(u,u.__data__,l,h),p=E(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&w(f,e,n,g,d,p);o.push(d),s.push(u)}return new ke(o,s,e,n)},selectChild:Ae.selectChild,selectChildren:Ae.selectChildren,filter:function(t){"function"!=typeof t&&(t=(0,_e.A)(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,s=e[i],a=s.length,u=r[i]=[],h=0;h<a;++h)(o=s[h])&&t.call(o,o.__data__,h,s)&&u.push(o);return new ke(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),s=new Array(r),a=0;a<o;++a)for(var u,h=e[a],c=n[a],l=h.length,f=s[a]=new Array(l),d=0;d<l;++d)(u=h[d]||c[d])&&(f[d]=u);for(;a<r;++a)s[a]=e[a];return new ke(s,this._parents,this._name,this._id)},selection:function(){return new we(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Ne(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s,a=r[o],u=a.length,h=0;h<u;++h)if(s=a[h]){var c=E(s,e);w(s,t,n,h,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new ke(r,this._parents,t,n)},call:Ae.call,nodes:Ae.nodes,node:Ae.node,size:Ae.size,empty:Ae.empty,each:Ae.each,on:function(t,e){var n=this._id;return arguments.length<2?E(this.node(),n).on.on(t):this.each(function(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?b:x;return function(){var s=o(this,t),a=s.on;a!==r&&(i=(r=a).copy()).on(e,n),s.on=i}}(n,t,e))},attr:function(t,e){var n=(0,S.A)(t),r="transform"===n?I:ie;return this.attrTween(t,"function"==typeof e?(n.local?ce:he)(n,r,z(this,"attr."+t,e)):null==e?(n.local?se:oe)(n):(n.local?ue:ae)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=(0,S.A)(t);return this.tween(n,(r.local?le:fe)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?P:ie;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=(0,be.j)(this,t),s=(this.style.removeProperty(t),(0,be.j)(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}(t,r)).on("end.style."+t,xe(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var s=(0,be.j)(this,t),a=n(this),u=a+"";return null==a&&(this.style.removeProperty(t),u=a=(0,be.j)(this,t)),s===u?null:s===r&&u===i?o:(i=u,o=e(r=s,a))}}(t,r,z(this,"style."+t,e))).each(function(t,e){var n,r,i,o,s="style."+e,a="end."+s;return function(){var u=x(this,t),h=u.on,c=null==u.value[s]?o||(o=xe(e)):void 0;h===n&&i===c||(r=(n=h).copy()).on(a,i=c),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var s=(0,be.j)(this,t);return s===o?null:s===r?i:i=e(r=s,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,o,n)),r}return o._value=e,o}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(z(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=E(this.node(),n).tween,o=0,s=i.length;o<s;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?C:j)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?de:pe)(e,t)):E(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ge:ve)(e,t)):E(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){x(this,t).ease=e}}(e,t)):E(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;x(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,s){var a={value:s},u={value:function(){0==--i&&o()}};n.each((function(){var n=x(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(a),e._.interrupt.push(a),e._.end.push(u)),n.on=e})),0===i&&o()}))},[Symbol.iterator]:Ae[Symbol.iterator]};var Me={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Oe(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}c.Ay.prototype.interrupt=function(t){return this.each((function(){k(this,t)}))},c.Ay.prototype.transition=function(t){var e,n;t instanceof ke?(e=t._id,t=t._name):(e=Ne(),(n=Me).time=(0,l.tB)(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s,a=r[o],u=a.length,h=0;h<u;++h)(s=a[h])&&w(s,t,e,h,a,n||Oe(s,e));return new ke(r,this._parents,t,e)};const $e=t=>()=>t;function Te(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Pe(t,e,n){this.k=t,this.x=e,this.y=n}Pe.prototype={constructor:Pe,scale:function(t){return 1===t?this:new Pe(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Pe(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ie=new Pe(1,0,0);function Se(t){t.stopImmediatePropagation()}function Ce(t){t.preventDefault(),t.stopImmediatePropagation()}function je(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function ze(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function Le(){return this.__zoom||Ie}function Re(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function qe(){return navigator.maxTouchPoints||"ontouchstart"in this}function De(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],s=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function Ve(){var t,e,n,a=je,c=ze,l=De,f=Re,d=qe,p=[0,1/0],g=[[-1/0,-1/0],[1/0,1/0]],v=250,_=u,y=(0,r.A)("start","zoom","end"),m=500,w=150,b=0,x=10;function E(t){t.property("__zoom",Le).on("wheel.zoom",P,{passive:!1}).on("mousedown.zoom",I).on("dblclick.zoom",S).filter(d).on("touchstart.zoom",C).on("touchmove.zoom",j).on("touchend.zoom touchcancel.zoom",z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function N(t,e){return(e=Math.max(p[0],Math.min(p[1],e)))===t.k?t:new Pe(e,t.x,t.y)}function A(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new Pe(t.k,r,i)}function M(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function O(t,e,n,r){t.on("start.zoom",(function(){$(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){$(this,arguments).event(r).end()})).tween("zoom",(function(){var t=this,i=arguments,o=$(t,i).event(r),s=c.apply(t,i),a=null==n?M(s):"function"==typeof n?n.apply(t,i):n,u=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),h=t.__zoom,l="function"==typeof e?e.apply(t,i):e,f=_(h.invert(a).concat(u/h.k),l.invert(a).concat(u/l.k));return function(t){if(1===t)t=l;else{var e=f(t),n=u/e[2];t=new Pe(n,a[0]-e[0]*n,a[1]-e[1]*n)}o.zoom(null,t)}}))}function $(t,e,n){return!n&&t.__zooming||new T(t,e)}function T(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=c.apply(t,e),this.taps=0}function P(t,...e){if(a.apply(this,arguments)){var n=$(this,e).event(t),r=this.__zoom,i=Math.max(p[0],Math.min(p[1],r.k*Math.pow(2,f.apply(this,arguments)))),o=h(t);if(n.wheel)n.mouse[0][0]===o[0]&&n.mouse[0][1]===o[1]||(n.mouse[1]=r.invert(n.mouse[0]=o)),clearTimeout(n.wheel);else{if(r.k===i)return;n.mouse=[o,r.invert(o)],k(this),n.start()}Ce(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),w),n.zoom("mouse",l(A(N(r,i),n.mouse[0],n.mouse[1]),n.extent,g))}}function I(t,...e){if(!n&&a.apply(this,arguments)){var r=t.currentTarget,u=$(this,e,!0).event(t),c=(0,i.A)(t.view).on("mousemove.zoom",(function(t){if(Ce(t),!u.moved){var e=t.clientX-d,n=t.clientY-p;u.moved=e*e+n*n>b}u.event(t).zoom("mouse",l(A(u.that.__zoom,u.mouse[0]=h(t,r),u.mouse[1]),u.extent,g))}),!0).on("mouseup.zoom",(function(t){c.on("mousemove.zoom mouseup.zoom",null),function(t,e){var n=t.document.documentElement,r=(0,i.A)(t).on("dragstart.drag",null);e&&(r.on("click.drag",s,o),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(t.view,u.moved),Ce(t),u.event(t).end()}),!0),f=h(t,r),d=t.clientX,p=t.clientY;!function(t){var e=t.document.documentElement,n=(0,i.A)(t).on("dragstart.drag",s,o);"onselectstart"in e?n.on("selectstart.drag",s,o):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(t.view),Se(t),u.mouse=[f,this.__zoom.invert(f)],k(this),u.start()}}function S(t,...e){if(a.apply(this,arguments)){var n=this.__zoom,r=h(t.changedTouches?t.changedTouches[0]:t,this),o=n.invert(r),s=n.k*(t.shiftKey?.5:2),u=l(A(N(n,s),r,o),c.apply(this,e),g);Ce(t),v>0?(0,i.A)(this).transition().duration(v).call(O,u,r,t):(0,i.A)(this).call(E.transform,u,r,t)}}function C(n,...r){if(a.apply(this,arguments)){var i,o,s,u,c=n.touches,l=c.length,f=$(this,r,n.changedTouches.length===l).event(n);for(Se(n),o=0;o<l;++o)u=[u=h(s=c[o],this),this.__zoom.invert(u),s.identifier],f.touch0?f.touch1||f.touch0[2]===u[2]||(f.touch1=u,f.taps=0):(f.touch0=u,i=!0,f.taps=1+!!t);t&&(t=clearTimeout(t)),i&&(f.taps<2&&(e=u[0],t=setTimeout((function(){t=null}),m)),k(this),f.start())}}function j(t,...e){if(this.__zooming){var n,r,i,o,s=$(this,e).event(t),a=t.changedTouches,u=a.length;for(Ce(t),n=0;n<u;++n)i=h(r=a[n],this),s.touch0&&s.touch0[2]===r.identifier?s.touch0[0]=i:s.touch1&&s.touch1[2]===r.identifier&&(s.touch1[0]=i);if(r=s.that.__zoom,s.touch1){var c=s.touch0[0],f=s.touch0[1],d=s.touch1[0],p=s.touch1[1],v=(v=d[0]-c[0])*v+(v=d[1]-c[1])*v,_=(_=p[0]-f[0])*_+(_=p[1]-f[1])*_;r=N(r,Math.sqrt(v/_)),i=[(c[0]+d[0])/2,(c[1]+d[1])/2],o=[(f[0]+p[0])/2,(f[1]+p[1])/2]}else{if(!s.touch0)return;i=s.touch0[0],o=s.touch0[1]}s.zoom("touch",l(A(r,i,o),s.extent,g))}}function z(t,...r){if(this.__zooming){var o,s,a=$(this,r).event(t),u=t.changedTouches,c=u.length;for(Se(t),n&&clearTimeout(n),n=setTimeout((function(){n=null}),m),o=0;o<c;++o)s=u[o],a.touch0&&a.touch0[2]===s.identifier?delete a.touch0:a.touch1&&a.touch1[2]===s.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(s=h(s,this),Math.hypot(e[0]-s[0],e[1]-s[1])<x)){var l=(0,i.A)(this).on("dblclick.zoom");l&&l.apply(this,arguments)}}}return E.transform=function(t,e,n,r){var i=t.selection?t.selection():t;i.property("__zoom",Le),t!==i?O(t,e,n,r):i.interrupt().each((function(){$(this,arguments).event(r).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},E.scaleBy=function(t,e,n,r){E.scaleTo(t,(function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)}),n,r)},E.scaleTo=function(t,e,n,r){E.transform(t,(function(){var t=c.apply(this,arguments),r=this.__zoom,i=null==n?M(t):"function"==typeof n?n.apply(this,arguments):n,o=r.invert(i),s="function"==typeof e?e.apply(this,arguments):e;return l(A(N(r,s),i,o),t,g)}),n,r)},E.translateBy=function(t,e,n,r){E.transform(t,(function(){return l(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),c.apply(this,arguments),g)}),null,r)},E.translateTo=function(t,e,n,r,i){E.transform(t,(function(){var t=c.apply(this,arguments),i=this.__zoom,o=null==r?M(t):"function"==typeof r?r.apply(this,arguments):r;return l(Ie.translate(o[0],o[1]).scale(i.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,g)}),r,i)},T.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=(0,i.A)(this.that).datum();y.call(t,this.that,new Te(t,{sourceEvent:this.sourceEvent,target:E,type:t,transform:this.that.__zoom,dispatch:y}),e)}},E.wheelDelta=function(t){return arguments.length?(f="function"==typeof t?t:$e(+t),E):f},E.filter=function(t){return arguments.length?(a="function"==typeof t?t:$e(!!t),E):a},E.touchable=function(t){return arguments.length?(d="function"==typeof t?t:$e(!!t),E):d},E.extent=function(t){return arguments.length?(c="function"==typeof t?t:$e([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),E):c},E.scaleExtent=function(t){return arguments.length?(p[0]=+t[0],p[1]=+t[1],E):[p[0],p[1]]},E.translateExtent=function(t){return arguments.length?(g[0][0]=+t[0][0],g[1][0]=+t[1][0],g[0][1]=+t[0][1],g[1][1]=+t[1][1],E):[[g[0][0],g[0][1]],[g[1][0],g[1][1]]]},E.constrain=function(t){return arguments.length?(l=t,E):l},E.duration=function(t){return arguments.length?(v=+t,E):v},E.interpolate=function(t){return arguments.length?(_=t,E):_},E.on=function(){var t=y.on.apply(y,arguments);return t===y?E:t},E.clickDistance=function(t){return arguments.length?(b=(t=+t)*t,E):Math.sqrt(b)},E.tapDistance=function(t){return arguments.length?(x=+t,E):x},E}Pe.prototype}}]);
|
|
3
|
+
//# sourceMappingURL=3025.d4a92d85.js.map
|