@marimo-team/frontend 0.10.15-dev12 → 0.10.15-dev13
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/assets/{ConnectedDataExplorerComponent-CGJTDZx_.js → ConnectedDataExplorerComponent-Csu-_XDt.js} +1 -1
- package/dist/assets/{VegaLite-CG60FM36.js → VegaLite-DtiEe_YT.js} +1 -1
- package/dist/assets/{_baseEach-BECjw4fP.js → _baseEach-DOAG0BEG.js} +1 -1
- package/dist/assets/_baseMap-CqhBNq7O.js +1 -0
- package/dist/assets/{_baseUniq-DtBIGl1c.js → _baseUniq-BcwBmK9M.js} +1 -1
- package/dist/assets/{any-language-editor-DhIqcM5K.js → any-language-editor-0326a9Ck.js} +1 -1
- package/dist/assets/{architectureDiagram-IFBEXTG3-D9Nin7w3.js → architectureDiagram-IFBEXTG3-DK7EWX-S.js} +1 -1
- package/dist/assets/{blockDiagram-TCMKQVZ6-CDGxJAMk.js → blockDiagram-TCMKQVZ6-CHAH1Gfl.js} +1 -1
- package/dist/assets/{c4Diagram-ZCSEYPFN-DQ3kZQ4S.js → c4Diagram-ZCSEYPFN-B72nwcpx.js} +1 -1
- package/dist/assets/channel-lPGIrDzN.js +1 -0
- package/dist/assets/{chunk-4LC2V6XN-CeSlNLLb.js → chunk-4LC2V6XN-D4PlKUuP.js} +1 -1
- package/dist/assets/{chunk-5RIWM3LS-CjbA3NE0.js → chunk-5RIWM3LS-Dd6M-5YE.js} +1 -1
- package/dist/assets/{chunk-6JKP7OK7-fPjcuK_d.js → chunk-6JKP7OK7-D6ntEf6O.js} +1 -1
- package/dist/assets/{chunk-NGC4727B-7chF31MF.js → chunk-NGC4727B-JUZQDyt9.js} +1 -1
- package/dist/assets/{chunk-REEJFE46-PpQ51NJT.js → chunk-REEJFE46-DYdi0Vea.js} +1 -1
- package/dist/assets/{chunk-RYO7GUH3-HCQvzFDl.js → chunk-RYO7GUH3-ggk3rKKJ.js} +1 -1
- package/dist/assets/{chunk-V35ELUW5-BujaxYvT.js → chunk-V35ELUW5-D9lnJrJb.js} +1 -1
- package/dist/assets/{classDiagram-Q73GJZWF-qCitAb4j.js → classDiagram-Q73GJZWF-C1WH49gX.js} +1 -1
- package/dist/assets/{classDiagram-v2-C6QPLPW4-CortFVPg.js → classDiagram-v2-C6QPLPW4-BdcBjaeq.js} +1 -1
- package/dist/assets/clone-izzhhHtJ.js +1 -0
- package/dist/assets/{compile-DErOOkU_.js → compile-BoplFkz1.js} +1 -1
- package/dist/assets/{createWsUrl-CnsNqVKP.js → createWsUrl-ChWbnl6b.js} +1 -1
- package/dist/assets/{dagre-7KT5K2WU-D3cpxIWq.js → dagre-7KT5K2WU-D-5GlJT-.js} +1 -1
- package/dist/assets/{data-editor-82RX1fUz.js → data-editor-O6kJvyhS.js} +1 -1
- package/dist/assets/{diagram-AVGMFHF7-CRJxDPCu.js → diagram-AVGMFHF7-DOiefd53.js} +1 -1
- package/dist/assets/{edit-page-Dar_FcrC.js → edit-page-DpI16rTs.js} +3 -3
- package/dist/assets/{erDiagram-DKC2X5TE-Tp162PR9.js → erDiagram-DKC2X5TE-Dn5W7hl6.js} +1 -1
- package/dist/assets/{flowDiagram-NWEUNK3L-BwSBbSjZ.js → flowDiagram-NWEUNK3L-OykhebDA.js} +1 -1
- package/dist/assets/{ganttDiagram-HLVPPPRE-BOFp4sxY.js → ganttDiagram-HLVPPPRE-Be7A8eni.js} +1 -1
- package/dist/assets/{gitGraph-YCYPL57B-BWZrov6a.js → gitGraph-YCYPL57B-DcFcFCzG.js} +1 -1
- package/dist/assets/{gitGraphDiagram-JPZ3KUXI-BMfGJMKL.js → gitGraphDiagram-JPZ3KUXI-ByK2MbFR.js} +1 -1
- package/dist/assets/{graph-BqdrJ-zb.js → graph-sFWqoscH.js} +1 -1
- package/dist/assets/{home-page-DAygv4Vq.js → home-page-C5HXNx_c.js} +1 -1
- package/dist/assets/{index-DEE3lg2L.js → index-2ug5TmwY.js} +6 -6
- package/dist/assets/{index-Dh1xFR3U.js → index-7KK2pI4u.js} +1 -1
- package/dist/assets/{index-dNe8o5o_.js → index-BHnsWUpQ.js} +1 -1
- package/dist/assets/{index-42K2Ykmd.js → index-BU59tagF.js} +1 -1
- package/dist/assets/{index-jXedeoU4.js → index-BVCLURfO.js} +1 -1
- package/dist/assets/{index-IzY2yjYB.js → index-C16pmboh.js} +1 -1
- package/dist/assets/{index-LSehbbY1.js → index-Czh9GOOE.js} +1 -1
- package/dist/assets/{index-Z9HQHBf3.js → index-D3vV_xUP.js} +1 -1
- package/dist/assets/{index-DiEcLaQR.js → index-D_-WhHD0.js} +1 -1
- package/dist/assets/{index-D9h3pX_X.js → index-Dj2nZ4fQ.js} +1 -1
- package/dist/assets/{index-DrDwawM8.js → index-Dn5kFv90.js} +1 -1
- package/dist/assets/{index-K0cZSRB2.js → index-DphFDx_P.js} +1 -1
- package/dist/assets/{index-Bp25x3d7.js → index-QGl4Ma0A.js} +1 -1
- package/dist/assets/{index-Chsey3uK.js → index-oL0Sa5CM.js} +1 -1
- package/dist/assets/{index-Cnlzue6D.js → index-qDQaZyCv.js} +1 -1
- package/dist/assets/{index-NerlhDpY.js → index-sayWSJS-.js} +1 -1
- package/dist/assets/{index-D4wBj1zP.js → index-yv6Dt_pB.js} +1 -1
- package/dist/assets/{infoDiagram-RZZSJVI2-BMU4TG22.js → infoDiagram-RZZSJVI2-NrQwlhcZ.js} +1 -1
- package/dist/assets/{journeyDiagram-BLD6N6MZ-Coig5X-n.js → journeyDiagram-BLD6N6MZ-Bv4V6aCy.js} +1 -1
- package/dist/assets/{json-Do5z78sE.js → json-CSQCR4Eh.js} +1 -1
- package/dist/assets/{layout-DMkierF1.js → layout-BmKucNIP.js} +1 -1
- package/dist/assets/{linear-D-pDgViZ.js → linear-xdRmhUrU.js} +1 -1
- package/dist/assets/main-cdvIQCIX.js +1 -0
- package/dist/assets/{mermaid-B4gvKJNB.js → mermaid-HZ3ARM5o.js} +3 -3
- package/dist/assets/{min-TmOgLHFM.js → min-Bd2lSXr_.js} +1 -1
- package/dist/assets/{mindmap-definition-OEB2RXX2-wXleG7NK.js → mindmap-definition-OEB2RXX2-B60pqfhg.js} +1 -1
- package/dist/assets/{pieDiagram-X7YZ5ZEZ-DhncOmYZ.js → pieDiagram-X7YZ5ZEZ-CItq-fbS.js} +1 -1
- package/dist/assets/{quadrantDiagram-F36EZAVT-DkdTPb3L.js → quadrantDiagram-F36EZAVT-YySdiMgM.js} +1 -1
- package/dist/assets/{react-plotly-DSSK9GTB.js → react-plotly-BAzHXTvu.js} +1 -1
- package/dist/assets/{requirementDiagram-JG2LMPGF-CtyRmPoN.js → requirementDiagram-JG2LMPGF-yJH-XhfC.js} +1 -1
- package/dist/assets/{run-page-s-0UC4IB.js → run-page-BwfnA784.js} +1 -1
- package/dist/assets/{sankeyDiagram-ATFNWWW6-D3yz7Zl4.js → sankeyDiagram-ATFNWWW6-A6QdN-a7.js} +1 -1
- package/dist/assets/{sequenceDiagram-WK7YDQ3N-DGy_lNqQ.js → sequenceDiagram-WK7YDQ3N-Cn349C80.js} +1 -1
- package/dist/assets/{slides-component-CAbyV-xD.js → slides-component-sWY9v43I.js} +1 -1
- package/dist/assets/{sortBy-DwvsBoo4.js → sortBy-DLnLhZ4F.js} +1 -1
- package/dist/assets/{stateDiagram-4JV6CC6H-XeIjl-2M.js → stateDiagram-4JV6CC6H-CRBBt9tG.js} +1 -1
- package/dist/assets/stateDiagram-v2-7KT6RKTD-BW_Ym0Uk.js +1 -0
- package/dist/assets/{terminal-sUEZa_RY.js → terminal-B6_n3XLj.js} +1 -1
- package/dist/assets/{time-Bb40P6AO.js → time-CH0rrVLq.js} +1 -1
- package/dist/assets/{timeline-definition-3ZMEY6HS-BP7z3cMH.js → timeline-definition-3ZMEY6HS-Z3zuQvQb.js} +1 -1
- package/dist/assets/tree-BqhCR1HN.js +14 -0
- package/dist/assets/{useMarimoWebSocket-Ckjhj75v.js → useMarimoWebSocket-DLcw1ebH.js} +3 -3
- package/dist/assets/{vega-component-1t3TvgwJ.js → vega-component-DsoTWgSD.js} +1 -1
- package/dist/assets/{xychartDiagram-KECQ2H5Q-DeYWM9-U.js → xychartDiagram-KECQ2H5Q-DRkC9rlv.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/_baseMap-B1DhxNnx.js +0 -1
- package/dist/assets/channel-BSjt66hH.js +0 -1
- package/dist/assets/clone-DiTshfa4.js +0 -1
- package/dist/assets/main-CEaoNRsh.js +0 -1
- package/dist/assets/stateDiagram-v2-7KT6RKTD-anfoLlvF.js +0 -1
- package/dist/assets/tree-OB3rIAWv.js +0 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
import{an as e,ao as t,G as n,ap as a,P as r,ac as i,J as o,aq as s,ar as c,as as l,at as u,au as m,av as p,aw as d,ax as f,ay as h,az as g,aA as y,aB as v}from"./index-
|
|
1
|
+
import{an as e,ao as t,G as n,ap as a,P as r,ac as i,J as o,aq as s,ar as c,as as l,at as u,au as m,av as p,aw as d,ax as f,ay as h,az as g,aA as y,aB as v}from"./index-2ug5TmwY.js";import{M as k}from"./compile-BoplFkz1.js";import{a as w}from"./VegaLite-DtiEe_YT.js";import"./time-CH0rrVLq.js";import"./step-DY8hpDjU.js";import"./linear-xdRmhUrU.js";import"./init-DLRA0X12.js";import"./range-CtcPcB_L.js";import"./ordinal-BcaZTuz9.js";import"./colors-bszWmPJw.js";import"./arc-y9WbYkJu.js";import"./index-qDQaZyCv.js";const x={getMarkType(e){const t="string"==typeof e?e:e.type;if("boxplot"===t||"errorband"===t||"errorbar"===t)throw new Error("Not supported");return t},makeClickable(e){const t="string"==typeof e?e:e.type;return t in k?"string"==typeof e?{type:e,cursor:"pointer",tooltip:!0}:{...e,type:t,cursor:"pointer",tooltip:!0}:e},getOpacity:e=>"string"==typeof e?null:"opacity"in e&&"number"==typeof e.opacity?e.opacity:null};const j=new Set(["color","fill","fillOpacity","opacity","shape","size"]);function b(e,t,n,a){const r={and:n.map((e=>({param:e})))};if("opacity"===e){const e=x.getOpacity(a)||1;return{...t,opacity:{condition:{test:r,value:e},value:e/5}}}return t}const S={point:e=>null==e?"select_point":`select_point_${e}`,interval:e=>null==e?"select_interval":`select_interval_${e}`,legendSelection:e=>`legend_selection_${e}`,HIGHLIGHT:"highlight",PAN_ZOOM:"pan_zoom",hasPoint:e=>e.some((e=>e.startsWith("select_point"))),hasInterval:e=>e.some((e=>e.startsWith("select_interval"))),hasLegend:e=>e.some((e=>e.startsWith("legend_selection"))),hasPanZoom:e=>e.some((e=>e.startsWith("pan_zoom")))},_={highlight:()=>({name:S.HIGHLIGHT,select:{type:"point",on:"mouseover"}}),interval:(e,t)=>({name:S.interval(t),select:{type:"interval",encodings:P(e),mark:{fill:"#669EFF",fillOpacity:.07,stroke:"#669EFF",strokeOpacity:.4},on:"[mousedown[!event.metaKey], mouseup] > mousemove[!event.metaKey]",translate:"[mousedown[!event.metaKey], mouseup] > mousemove[!event.metaKey]"}}),point:(e,t)=>({name:S.point(t),select:{type:"point",encodings:P(e),on:"click[!event.metaKey]"}}),legend:e=>({name:S.legendSelection(e),select:{type:"point",fields:[e]},bind:"legend"}),panZoom:()=>({name:S.PAN_ZOOM,bind:"scales",select:{type:"interval",on:"[mousedown[event.metaKey], window:mouseup] > window:mousemove!",translate:"[mousedown[event.metaKey], window:mouseup] > window:mousemove!",zoom:"wheel![event.metaKey]"}})};function P(e){switch(x.getMarkType(e.mark)){case k.image:case k.trail:return;case k.area:case k.arc:return["color"];case k.bar:{const t=function(e){var t,n;if(!e||!("mark"in e))return;const a=null==(t=e.encoding)?void 0:t.x,r=null==(n=e.encoding)?void 0:n.y;if(a&&"type"in a&&"nominal"===a.type)return"vertical";if(r&&"type"in r&&"nominal"===r.type)return"horizontal";if(a&&"aggregate"in a)return"horizontal";if(r&&"aggregate"in r)return"vertical";return}(e);return"horizontal"===t?["y"]:"vertical"===t?["x"]:void 0}case k.circle:case k.geoshape:case k.line:case k.point:case k.rect:case k.rule:case k.square:case k.text:case k.tick:return["x","y"]}}function M(e){if("params"in e&&e.params&&e.params.length>0){return e.params.filter((e=>null!=e&&("select"in e&&void 0!==e.select))).map((e=>e.name))}return"layer"in e?[...new Set(e.layer.flatMap(M))]:[]}function O(e,t){var n,a;let{chartSelection:r=!0,fieldSelection:i=!0}=t;if(!r&&!i)return e;(null==(n=e.params)?void 0:n.some((e=>"legend"===e.bind)))&&(i=!1);if((null==(a=e.params)?void 0:a.some((e=>!e.bind)))&&(r=!1),"vconcat"in e){const t=e.vconcat.map((e=>"mark"in e?z(e):e));return{...e,vconcat:t}}if("hconcat"in e){const t=e.hconcat.map((e=>"mark"in e?z(e):e));return{...e,hconcat:t}}if("layer"in e){const t=e.layer.map(((e,t)=>{if(!("mark"in e))return e;let n=e;return n=N(n,r,t),n=z(n),0===t&&(n=V(n)),n}));return{...e,layer:t}}if(!("mark"in e))return e;let o=e;return o=function(e,t){if(!1===t)return e;let n=function(e){if(!e||!("encoding"in e))return[];const{encoding:t}=e;return t?Object.entries(t).flatMap((e=>{const[t,n]=e;return n&&j.has(t)?"field"in n&&"string"==typeof n.field?[n.field]:"condition"in n&&n.condition&&"object"==typeof n.condition&&"field"in n.condition&&n.condition.field&&"string"==typeof n.condition.field?[n.condition.field]:[]:[]})):[]}(e);Array.isArray(t)&&(n=n.filter((e=>t.includes(e))));const a=n.map((e=>_.legend(e))),r=[...e.params||[],...a];return{...e,params:r}}(o,i),o=N(o,r,void 0),o=z(o),o=V(o),o}function N(e,t,n){if(!1===t)return e;let a;try{a=x.getMarkType(e.mark)}catch{return e}if("geoshape"===a||"text"===a)return e;const r=!0===t?function(e){switch(e){case"text":case"arc":case"area":return["point"];case"bar":default:return["point","interval"];case"line":return}}(a):[t];if(!r)return e;const i=r.map((t=>"interval"===t?_.interval(e,n):_.point(e,n))),o=[...e.params||[],...i];return{...e,params:o}}function V(e){let t;try{t=x.getMarkType(e.mark)}catch{}if("geoshape"===t)return e;const n=e.params||[];return n.some((e=>"scales"===e.bind))?e:{...e,params:[...n,_.panZoom()]}}function z(e){const t="encoding"in e?e.encoding:void 0,n=e.params||[],a=n.map((e=>e.name));if(0===n.length)return e;return"text"===x.getMarkType(e.mark)?e:{...e,mark:x.makeClickable(e.mark),encoding:b("opacity",t||{},a,e.mark)}}const A=i=>{const o=n(11),{value:s,setValue:c,chartSelection:l,fieldSelection:u,spec:m}=i;let p,f;o[0]!==m?(p=async()=>async function(n){if(!n)return n;const a="datasets"in n?{...n.datasets}:{},r=async n=>{if(!n)return n;if("layer"in n){const e=await Promise.all(n.layer.map(r));n={...n,layer:e}}if("hconcat"in n){const e=await Promise.all(n.hconcat.map(r));n={...n,hconcat:e}}if("vconcat"in n){const e=await Promise.all(n.vconcat.map(r));n={...n,vconcat:e}}if(!n.data)return n;if(!("url"in n.data))return n;let i;try{i=e(n.data.url)}catch{return n}const o=await t(i.href,n.data.format);return a[i.pathname]=o,{...n,data:{name:i.pathname}}},i=await r(n);return 0===Object.keys(a).length?i:{...i,datasets:a}}(m),f=[m],o[0]=m,o[1]=p,o[2]=f):(p=o[1],f=o[2]);const{data:h,error:g}=a(p,f);if(g){let e;return o[3]!==g?(e=r.jsx(d,{error:g}),o[3]=g,o[4]=e):e=o[4],e}if(!h)return null;let y;return o[5]!==s||o[6]!==c||o[7]!==l||o[8]!==u||o[9]!==h?(y=r.jsx(K,{value:s,setValue:c,chartSelection:l,fieldSelection:u,spec:h}),o[5]=s,o[6]=c,o[7]=l,o[8]=u,o[9]=h,o[10]=y):y=o[10],y},K=({value:t,setValue:n,chartSelection:a,fieldSelection:d,spec:v})=>{const{theme:k}=i(),x=o.useRef(),[j,b]=o.useState(),_=s(v),P=o.useMemo((()=>O(function(t){return t.data&&"url"in t.data&&(t.data.url=e(t.data.url).href),t}(_),{chartSelection:a,fieldSelection:d})),[_,a,d]),N=o.useMemo((()=>M(P)),[P]),V=c((e=>{n({...t,...e})})),z=s(N),A=o.useMemo((()=>z.reduce(((e,t)=>(S.PAN_ZOOM===t||(e[t]=l(((e,t)=>{f.debug("[Vega signal]",e,t);let n=h.mapValues(t,I);n=h.mapValues(n,Z),V({[e]:n})}),100)),e)),{})),[z,V]),K=c((e=>{f.error(e),f.debug(P),b(e)})),L=c((e=>{f.debug("[Vega view] created",e),x.current=e,b(void 0)}));return r.jsxs(r.Fragment,{children:[j&&r.jsxs(u,{variant:"destructive",children:[r.jsx(m,{children:j.message}),r.jsx("div",{className:"text-md",children:j.stack})]}),r.jsxs("div",{className:"relative",onPointerDown:p.stopPropagation(),children:[r.jsx(w,{spec:P,theme:"dark"===k?"dark":void 0,actions:T,signalListeners:A,onError:K,onNewView:L}),(()=>{const e=[];return S.hasPoint(N)&&e.push(["Point selection","click to select a point; hold shift for multi-select"]),S.hasInterval(N)&&e.push(["Interval selection","click and drag to select an interval"]),S.hasLegend(N)&&e.push(["Legend selection","click to select a legend item; hold shift for multi-select"]),S.hasPanZoom(N)&&e.push(["Pan","hold the meta key and drag"],["Zoom","hold the meta key and scroll"]),0===e.length?null:r.jsx(g,{delayDuration:300,side:"left",content:r.jsx("div",{className:"text-xs flex flex-col",children:e.map(((e,t)=>r.jsxs("div",{children:[r.jsxs("span",{className:"font-bold tracking-wide",children:[e[0],":"]})," ",e[1]]},t)))}),children:r.jsx(y,{className:"absolute bottom-1 right-0 m-2 h-4 w-4 cursor-help text-muted-foreground hover:text-foreground"})})})()]})]})},T={source:!1,compiled:!1};function Z(e){return e instanceof Set?[...e]:e}function I(e){return Array.isArray(e)?e.map((e=>e instanceof Date&&v(e)?new Date(e).getTime():e)):e}export{A as default};
|
package/dist/assets/{xychartDiagram-KECQ2H5Q-DeYWM9-U.js → xychartDiagram-KECQ2H5Q-DRkC9rlv.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t,i,e,s,n,a,o,h,r,l;import{_ as c,ai as g,l as u,I as x,D as d,B as p,A as f,i as m,q as y,s as b,g as A,p as S,b as w,c as C,t as k,G as _,j as T}from"./mermaid-B4gvKJNB.js";import"./transform-C6EuPmuu.js";import{i as R}from"./init-DLRA0X12.js";import{o as D}from"./ordinal-BcaZTuz9.js";import{r as L}from"./range-CtcPcB_L.js";import{l as P}from"./linear-D-pDgViZ.js";import{l as v}from"./step-DY8hpDjU.js";import"./index-DEE3lg2L.js";function E(){var t,i,e=D().unknown(void 0),s=e.domain,n=e.range,a=0,o=1,h=!1,r=0,l=0,c=.5;function g(){var e=s().length,g=o<a,u=g?o:a,x=g?a:o;t=(x-u)/Math.max(1,e-r+2*l),h&&(t=Math.floor(t)),u+=(x-u-t*(e-r))*c,i=t*(1-r),h&&(u=Math.round(u),i=Math.round(i));var d=L(e).map((function(i){return u+t*i}));return n(g?d.reverse():d)}return delete e.unknown,e.domain=function(t){return arguments.length?(s(t),g()):s()},e.range=function(t){return arguments.length?([a,o]=t,a=+a,o=+o,g()):[a,o]},e.rangeRound=function(t){return[a,o]=t,a=+a,o=+o,h=!0,g()},e.bandwidth=function(){return i},e.step=function(){return t},e.round=function(t){return arguments.length?(h=!!t,g()):h},e.padding=function(t){return arguments.length?(r=Math.min(1,l=+t),g()):r},e.paddingInner=function(t){return arguments.length?(r=Math.min(1,t),g()):r},e.paddingOuter=function(t){return arguments.length?(l=+t,g()):l},e.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),g()):c},e.copy=function(){return E(s(),[a,o]).round(h).paddingInner(r).paddingOuter(l).align(c)},R.apply(g(),arguments)}var M=function(){var t=c((function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e}),"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],n=[1,5],a=[1,6],o=[1,7],h=[1,5,10,12,14,16,18,19,21,23,34,35,36],r=[1,25],l=[1,26],g=[1,28],u=[1,29],x=[1,30],d=[1,31],p=[1,32],f=[1,33],m=[1,34],y=[1,35],b=[1,36],A=[1,37],S=[1,43],w=[1,42],C=[1,47],k=[1,50],_=[1,10,12,14,16,18,19,21,23,34,35,36],T=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],R=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],D=[1,64],L={trace:c((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:c((function(t,i,e,s,n,a,o){var h=a.length-1;switch(n){case 5:s.setOrientation(a[h]);break;case 9:s.setDiagramTitle(a[h].text.trim());break;case 12:s.setLineData({text:"",type:"text"},a[h]);break;case 13:s.setLineData(a[h-1],a[h]);break;case 14:s.setBarData({text:"",type:"text"},a[h]);break;case 15:s.setBarData(a[h-1],a[h]);break;case 16:this.$=a[h].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=a[h].trim(),s.setAccDescription(this.$);break;case 19:case 27:this.$=a[h-1];break;case 20:this.$=[Number(a[h-2]),...a[h]];break;case 21:this.$=[Number(a[h])];break;case 22:s.setXAxisTitle(a[h]);break;case 23:s.setXAxisTitle(a[h-1]);break;case 24:s.setXAxisTitle({type:"text",text:""});break;case 25:s.setXAxisBand(a[h]);break;case 26:s.setXAxisRangeData(Number(a[h-2]),Number(a[h]));break;case 28:this.$=[a[h-2],...a[h]];break;case 29:this.$=[a[h]];break;case 30:s.setYAxisTitle(a[h]);break;case 31:s.setYAxisTitle(a[h-1]);break;case 32:s.setYAxisTitle({type:"text",text:""});break;case 33:s.setYAxisRangeData(Number(a[h-2]),Number(a[h]));break;case 37:case 38:this.$={text:a[h],type:"text"};break;case 39:this.$={text:a[h],type:"markdown"};break;case 40:this.$=a[h];break;case 41:this.$=a[h-1]+""+a[h]}}),"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:n,35:a,36:o}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:n,35:a,36:o}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:a,36:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(h,[2,34]),t(h,[2,35]),t(h,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:n,35:a,36:o}),{1:[2,3]},t(h,[2,5]),t(i,[2,7],{4:22,34:n,35:a,36:o}),{11:23,37:24,38:r,39:l,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},{11:39,13:38,24:S,27:w,29:40,30:41,37:24,38:r,39:l,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},{11:45,15:44,27:C,33:46,37:24,38:r,39:l,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},{11:49,17:48,24:k,37:24,38:r,39:l,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},{11:52,17:51,24:k,37:24,38:r,39:l,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},{20:[1,53]},{22:[1,54]},t(_,[2,18]),{1:[2,2]},t(_,[2,8]),t(_,[2,9]),t(T,[2,37],{40:55,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A}),t(T,[2,38]),t(T,[2,39]),t(R,[2,40]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(_,[2,10]),t(_,[2,22],{30:41,29:56,24:S,27:w}),t(_,[2,24]),t(_,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:r,39:l,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},t(_,[2,11]),t(_,[2,30],{33:60,27:C}),t(_,[2,32]),{31:[1,61]},t(_,[2,12]),{17:62,24:k},{25:63,27:D},t(_,[2,14]),{17:65,24:k},t(_,[2,16]),t(_,[2,17]),t(R,[2,41]),t(_,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(_,[2,31]),{27:[1,69]},t(_,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(_,[2,15]),t(_,[2,26]),t(_,[2,27]),{11:59,32:72,37:24,38:r,39:l,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},t(_,[2,33]),t(_,[2,19]),{25:73,27:D},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:c((function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)}),"parseError"),parse:c((function(t){var i=this,e=[0],s=[],n=[null],a=[],o=this.table,h="",r=0,l=0,g=a.slice.call(arguments,1),u=Object.create(this.lexer),x={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(x.yy[d]=this.yy[d]);u.setInput(t,x.yy),x.yy.lexer=u,x.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var p=u.yylloc;a.push(p);var f=u.options&&u.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||u.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof x.yy.parseError?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,c((function(t){e.length=e.length-2*t,n.length=n.length-t,a.length=a.length-t}),"popStack"),c(m,"lex");for(var y,b,A,S,w,C,k,_,T={};;){if(b=e[e.length-1],this.defaultActions[b]?A=this.defaultActions[b]:(null==y&&(y=m()),A=o[b]&&o[b][y]),void 0===A||!A.length||!A[0]){var R="";for(w in _=[],o[b])this.terminals_[w]&&w>2&&_.push("'"+this.terminals_[w]+"'");R=u.showPosition?"Parse error on line "+(r+1)+":\n"+u.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(r+1)+": Unexpected "+(1==y?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(R,{text:u.match,token:this.terminals_[y]||y,line:u.yylineno,loc:p,expected:_})}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+y);switch(A[0]){case 1:e.push(y),n.push(u.yytext),a.push(u.yylloc),e.push(A[1]),y=null,l=u.yyleng,h=u.yytext,r=u.yylineno,p=u.yylloc;break;case 2:if(C=this.productions_[A[1]][1],T.$=n[n.length-C],T._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},f&&(T._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(S=this.performAction.apply(T,[h,l,r,x.yy,A[1],n,a].concat(g))))return S;C&&(e=e.slice(0,-1*C*2),n=n.slice(0,-1*C),a=a.slice(0,-1*C)),e.push(this.productions_[A[1]][0]),n.push(T.$),a.push(T._$),k=o[e[e.length-2]][e[e.length-1]],e.push(k);break;case 3:return!0}}return!0}),"parse")},P=function(){return{EOF:1,parseError:c((function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)}),"parseError"),setInput:c((function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:c((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:c((function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this}),"unput"),more:c((function(){return this._more=!0,this}),"more"),reject:c((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:c((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:c((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:c((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:c((function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"}),"showPosition"),test_match:c((function(t,i){var e,s,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var a in n)this[a]=n[a];return!1}return!1}),"test_match"),next:c((function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((e=this._input.match(this.rules[n[a]]))&&(!i||e[0].length>i[0].length)){if(i=e,s=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,n[a])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,n[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:c((function(){var t=this.next();return t||this.lex()}),"lex"),begin:c((function(t){this.conditionStack.push(t)}),"begin"),popState:c((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:c((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:c((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:c((function(t){this.begin(t)}),"pushState"),stateStackSize:c((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:c((function(t,i,e,s){switch(e){case 0:case 1:case 5:case 43:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 25:case 27:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 26:this.pushState("string");break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 44:return 35;case 45:return 36}}),"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}}}();function v(){this.yy={}}return L.lexer=P,c(v,"Parser"),v.prototype=L,L.Parser=v,new v}();M.parser=M;var I=M;function $(t){return"bar"===t.type}function B(t){return"band"===t.type}function z(t){return"linear"===t.type}c($,"isBarPlot"),c(B,"isBandAxisData"),c(z,"isLinearAxisData");var O=(c(t=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce(((t,i)=>Math.max(i.length,t)),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const n of t){const t=g(s,1,n),a=t?t.width:n.length*i,o=t?t.height:i;e.width=Math.max(e.width,a),e.height=Math.max(e.height,o)}return s.remove(),e}},"TextDimensionCalculatorWithFont"),t),W=(c(i=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((t=>t.toString())),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.width;this.outerPadding=Math.min(e.width/2,s);const n=e.height+2*this.axisConfig.labelPadding;this.labelTextHeight=e.height,n<=i&&(i-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);const n=e.width+2*this.axisConfig.labelPadding;n<=i&&(i-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"})))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${i},${this.getScaleValue(t)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"})))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${this.getScaleValue(t)},${i} L ${this.getScaleValue(t)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"})))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${this.getScaleValue(t)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},"BaseAxis"),i),F=(c(e=class extends W{constructor(t,i,e,s,n){super(t,s,n,i),this.categories=e,this.scale=E().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=E().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),u.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},"BandAxis"),e),N=(c(s=class extends W{constructor(t,i,e,s,n){super(t,s,n,i),this.domain=e,this.scale=P().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=P().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},"LinearAxis"),s);function X(t,i,e,s){const n=new O(s);return B(t)?new F(i,e,t.categories,t.title,n):new N(i,e,[t.min,t.max],t.title,n)}c(X,"getAxis");var V=(c(n=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},"ChartTitle"),n);function Y(t,i,e,s){const n=new O(s);return new V(n,t,i,e)}c(Y,"getChartTitleComponent");var U=(c(a=class{constructor(t,i,e,s,n){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=n}getDrawableElement(){const t=this.plotData.data.map((t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]));let i;return i="horizontal"===this.orientation?v().y((t=>t[0])).x((t=>t[1]))(t):v().x((t=>t[0])).y((t=>t[1]))(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},"LinePlot"),a),H=(c(o=class{constructor(t,i,e,s,n,a){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=n,this.plotIndex=a}getDrawableElement(){const t=this.barData.data.map((t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])])),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),e=i/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((t=>({x:this.boundingRect.x,y:t[0]-e,height:i,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill})))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((t=>({x:t[0]-e,y:t[1],width:i,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill})))}]}},"BarPlot"),o),j=(c(h=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new U(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new H(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}},"BasePlot"),h);function G(t,i,e){return new j(t,i,e)}c(G,"getPlotComponent");var Q,K=(c(r=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:Y(t,i,e,s),plot:G(t,i,e),xAxis:X(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:X(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:n,height:a});t-=o.width,i-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=o.height,i-=o.height,this.componentStore.xAxis.setAxisPosition("bottom"),o=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=o.height,this.componentStore.yAxis.setAxisPosition("left"),o=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=o.width,t-=o.width,t>0&&(n+=t,t=0),i>0&&(a+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:a}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+n]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+a}),this.componentStore.yAxis.setRange([s,s+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some((t=>$(t)))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,n=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:a,height:o});t-=h.width,i-=h.height,h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=h.height,i-=h.height,this.componentStore.xAxis.setAxisPosition("left"),h=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=h.width,s=h.width,this.componentStore.yAxis.setAxisPosition("top"),h=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=h.height,n=e+h.height,t>0&&(a+=t,t=0),i>0&&(o+=i,i=0),this.componentStore.plot.calculateSpace({width:a,height:o}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.yAxis.setRange([s,s+a]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([n,n+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((t=>$(t)))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},"Orchestrator"),r),q=(c(l=class{static build(t,i,e,s){return new K(t,i,e,s).getDrawableElement()}},"XYChartBuilder"),l),Z=0,J=ot(),tt=at(),it=ht(),et=tt.plotColorPalette.split(",").map((t=>t.trim())),st=!1,nt=!1;function at(){const t=x(),i=d();return p(t.xyChart,i.themeVariables.xyChart)}function ot(){const t=d();return p(f.xyChart,t.xyChart)}function ht(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function rt(t){const i=d();return m(t.trim(),i)}function lt(t){Q=t}function ct(t){J.chartOrientation="horizontal"===t?"horizontal":"vertical"}function gt(t){it.xAxis.title=rt(t.text)}function ut(t,i){it.xAxis={type:"linear",title:it.xAxis.title,min:t,max:i},st=!0}function xt(t){it.xAxis={type:"band",title:it.xAxis.title,categories:t.map((t=>rt(t.text)))},st=!0}function dt(t){it.yAxis.title=rt(t.text)}function pt(t,i){it.yAxis={type:"linear",title:it.yAxis.title,min:t,max:i},nt=!0}function ft(t){const i=Math.min(...t),e=Math.max(...t),s=z(it.yAxis)?it.yAxis.min:1/0,n=z(it.yAxis)?it.yAxis.max:-1/0;it.yAxis={type:"linear",title:it.yAxis.title,min:Math.min(s,i),max:Math.max(n,e)}}function mt(t){let i=[];if(0===t.length)return i;if(!st){const i=z(it.xAxis)?it.xAxis.min:1/0,e=z(it.xAxis)?it.xAxis.max:-1/0;ut(Math.min(i,1),Math.max(e,t.length))}if(nt||ft(t),B(it.xAxis)&&(i=it.xAxis.categories.map(((i,e)=>[i,t[e]]))),z(it.xAxis)){const e=it.xAxis.min,s=it.xAxis.max,n=(s-e)/(t.length-1),a=[];for(let t=e;t<=s;t+=n)a.push(`${t}`);i=a.map(((i,e)=>[i,t[e]]))}return i}function yt(t){return et[0===t?0:t%et.length]}function bt(t,i){const e=mt(i);it.plots.push({type:"line",strokeFill:yt(Z),strokeWidth:2,data:e}),Z++}function At(t,i){const e=mt(i);it.plots.push({type:"bar",fill:yt(Z),data:e}),Z++}function St(){if(0===it.plots.length)throw Error("No Plot to render, please provide a plot with some data");return it.title=y(),q.build(J,it,tt,Q)}function wt(){return tt}function Ct(){return J}c(at,"getChartDefaultThemeConfig"),c(ot,"getChartDefaultConfig"),c(ht,"getChartDefaultData"),c(rt,"textSanitizer"),c(lt,"setTmpSVGG"),c(ct,"setOrientation"),c(gt,"setXAxisTitle"),c(ut,"setXAxisRangeData"),c(xt,"setXAxisBand"),c(dt,"setYAxisTitle"),c(pt,"setYAxisRangeData"),c(ft,"setYAxisRangeFromPlotData"),c(mt,"transformDataWithoutCategory"),c(yt,"getPlotColorFromPalette"),c(bt,"setLineData"),c(At,"setBarData"),c(St,"getDrawableElem"),c(wt,"getChartThemeConfig"),c(Ct,"getChartConfig");var kt={parser:I,db:{getDrawableElem:St,clear:c((function(){k(),Z=0,J=ot(),it={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},tt=at(),et=tt.plotColorPalette.split(",").map((t=>t.trim())),st=!1,nt=!1}),"clear"),setAccTitle:b,getAccTitle:A,setDiagramTitle:S,getDiagramTitle:y,getAccDescription:w,setAccDescription:C,setOrientation:ct,setXAxisTitle:gt,setXAxisRangeData:ut,setXAxisBand:xt,setYAxisTitle:dt,setYAxisRangeData:pt,setLineData:bt,setBarData:At,setTmpSVGG:lt,getChartThemeConfig:wt,getChartConfig:Ct},renderer:{draw:c(((t,i,e,s)=>{const n=s.db,a=n.getChartThemeConfig(),o=n.getChartConfig();function h(t){return"top"===t?"text-before-edge":"middle"}function r(t){return"left"===t?"start":"right"===t?"end":"middle"}function l(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}c(h,"getDominantBaseLine"),c(r,"getTextAnchor"),c(l,"getTextTransformation"),u.debug("Rendering xychart chart\n"+t);const g=_(i),x=g.append("g").attr("class","main"),d=x.append("rect").attr("width",o.width).attr("height",o.height).attr("class","background");T(g,o.height,o.width,!0),g.attr("viewBox",`0 0 ${o.width} ${o.height}`),d.attr("fill",a.backgroundColor),n.setTmpSVGG(g.append("g").attr("class","mermaid-tmp-group"));const p=n.getDrawableElem(),f={};function m(t){let i=x,e="";for(const[s]of t.entries()){let n=x;s>0&&f[e]&&(n=f[e]),e+=t[s],i=f[e],i||(i=f[e]=n.append("g").attr("class",t[s]))}return i}c(m,"getGroup");for(const c of p){if(0===c.data.length)continue;const t=m(c.groupTexts);switch(c.type){case"rect":t.selectAll("rect").data(c.data).enter().append("rect").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("fill",(t=>t.fill)).attr("stroke",(t=>t.strokeFill)).attr("stroke-width",(t=>t.strokeWidth));break;case"text":t.selectAll("text").data(c.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(t=>t.fill)).attr("font-size",(t=>t.fontSize)).attr("dominant-baseline",(t=>h(t.verticalPos))).attr("text-anchor",(t=>r(t.horizontalPos))).attr("transform",(t=>l(t))).text((t=>t.text));break;case"path":t.selectAll("path").data(c.data).enter().append("path").attr("d",(t=>t.path)).attr("fill",(t=>t.fill?t.fill:"none")).attr("stroke",(t=>t.strokeFill)).attr("stroke-width",(t=>t.strokeWidth))}}}),"draw")}};export{kt as diagram};
|
|
1
|
+
var t,i,e,s,n,a,o,h,r,l;import{_ as c,ai as g,l as u,I as x,D as d,B as p,A as f,i as m,q as y,s as b,g as A,p as S,b as w,c as C,t as k,G as _,j as T}from"./mermaid-HZ3ARM5o.js";import"./transform-C6EuPmuu.js";import{i as R}from"./init-DLRA0X12.js";import{o as D}from"./ordinal-BcaZTuz9.js";import{r as L}from"./range-CtcPcB_L.js";import{l as P}from"./linear-xdRmhUrU.js";import{l as v}from"./step-DY8hpDjU.js";import"./index-2ug5TmwY.js";function E(){var t,i,e=D().unknown(void 0),s=e.domain,n=e.range,a=0,o=1,h=!1,r=0,l=0,c=.5;function g(){var e=s().length,g=o<a,u=g?o:a,x=g?a:o;t=(x-u)/Math.max(1,e-r+2*l),h&&(t=Math.floor(t)),u+=(x-u-t*(e-r))*c,i=t*(1-r),h&&(u=Math.round(u),i=Math.round(i));var d=L(e).map((function(i){return u+t*i}));return n(g?d.reverse():d)}return delete e.unknown,e.domain=function(t){return arguments.length?(s(t),g()):s()},e.range=function(t){return arguments.length?([a,o]=t,a=+a,o=+o,g()):[a,o]},e.rangeRound=function(t){return[a,o]=t,a=+a,o=+o,h=!0,g()},e.bandwidth=function(){return i},e.step=function(){return t},e.round=function(t){return arguments.length?(h=!!t,g()):h},e.padding=function(t){return arguments.length?(r=Math.min(1,l=+t),g()):r},e.paddingInner=function(t){return arguments.length?(r=Math.min(1,t),g()):r},e.paddingOuter=function(t){return arguments.length?(l=+t,g()):l},e.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),g()):c},e.copy=function(){return E(s(),[a,o]).round(h).paddingInner(r).paddingOuter(l).align(c)},R.apply(g(),arguments)}var M=function(){var t=c((function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e}),"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],n=[1,5],a=[1,6],o=[1,7],h=[1,5,10,12,14,16,18,19,21,23,34,35,36],r=[1,25],l=[1,26],g=[1,28],u=[1,29],x=[1,30],d=[1,31],p=[1,32],f=[1,33],m=[1,34],y=[1,35],b=[1,36],A=[1,37],S=[1,43],w=[1,42],C=[1,47],k=[1,50],_=[1,10,12,14,16,18,19,21,23,34,35,36],T=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],R=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],D=[1,64],L={trace:c((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:c((function(t,i,e,s,n,a,o){var h=a.length-1;switch(n){case 5:s.setOrientation(a[h]);break;case 9:s.setDiagramTitle(a[h].text.trim());break;case 12:s.setLineData({text:"",type:"text"},a[h]);break;case 13:s.setLineData(a[h-1],a[h]);break;case 14:s.setBarData({text:"",type:"text"},a[h]);break;case 15:s.setBarData(a[h-1],a[h]);break;case 16:this.$=a[h].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=a[h].trim(),s.setAccDescription(this.$);break;case 19:case 27:this.$=a[h-1];break;case 20:this.$=[Number(a[h-2]),...a[h]];break;case 21:this.$=[Number(a[h])];break;case 22:s.setXAxisTitle(a[h]);break;case 23:s.setXAxisTitle(a[h-1]);break;case 24:s.setXAxisTitle({type:"text",text:""});break;case 25:s.setXAxisBand(a[h]);break;case 26:s.setXAxisRangeData(Number(a[h-2]),Number(a[h]));break;case 28:this.$=[a[h-2],...a[h]];break;case 29:this.$=[a[h]];break;case 30:s.setYAxisTitle(a[h]);break;case 31:s.setYAxisTitle(a[h-1]);break;case 32:s.setYAxisTitle({type:"text",text:""});break;case 33:s.setYAxisRangeData(Number(a[h-2]),Number(a[h]));break;case 37:case 38:this.$={text:a[h],type:"text"};break;case 39:this.$={text:a[h],type:"markdown"};break;case 40:this.$=a[h];break;case 41:this.$=a[h-1]+""+a[h]}}),"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:n,35:a,36:o}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:n,35:a,36:o}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:a,36:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(h,[2,34]),t(h,[2,35]),t(h,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:n,35:a,36:o}),{1:[2,3]},t(h,[2,5]),t(i,[2,7],{4:22,34:n,35:a,36:o}),{11:23,37:24,38:r,39:l,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},{11:39,13:38,24:S,27:w,29:40,30:41,37:24,38:r,39:l,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},{11:45,15:44,27:C,33:46,37:24,38:r,39:l,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},{11:49,17:48,24:k,37:24,38:r,39:l,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},{11:52,17:51,24:k,37:24,38:r,39:l,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},{20:[1,53]},{22:[1,54]},t(_,[2,18]),{1:[2,2]},t(_,[2,8]),t(_,[2,9]),t(T,[2,37],{40:55,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A}),t(T,[2,38]),t(T,[2,39]),t(R,[2,40]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(_,[2,10]),t(_,[2,22],{30:41,29:56,24:S,27:w}),t(_,[2,24]),t(_,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:r,39:l,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},t(_,[2,11]),t(_,[2,30],{33:60,27:C}),t(_,[2,32]),{31:[1,61]},t(_,[2,12]),{17:62,24:k},{25:63,27:D},t(_,[2,14]),{17:65,24:k},t(_,[2,16]),t(_,[2,17]),t(R,[2,41]),t(_,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(_,[2,31]),{27:[1,69]},t(_,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(_,[2,15]),t(_,[2,26]),t(_,[2,27]),{11:59,32:72,37:24,38:r,39:l,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},t(_,[2,33]),t(_,[2,19]),{25:73,27:D},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:c((function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)}),"parseError"),parse:c((function(t){var i=this,e=[0],s=[],n=[null],a=[],o=this.table,h="",r=0,l=0,g=a.slice.call(arguments,1),u=Object.create(this.lexer),x={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(x.yy[d]=this.yy[d]);u.setInput(t,x.yy),x.yy.lexer=u,x.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var p=u.yylloc;a.push(p);var f=u.options&&u.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||u.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof x.yy.parseError?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,c((function(t){e.length=e.length-2*t,n.length=n.length-t,a.length=a.length-t}),"popStack"),c(m,"lex");for(var y,b,A,S,w,C,k,_,T={};;){if(b=e[e.length-1],this.defaultActions[b]?A=this.defaultActions[b]:(null==y&&(y=m()),A=o[b]&&o[b][y]),void 0===A||!A.length||!A[0]){var R="";for(w in _=[],o[b])this.terminals_[w]&&w>2&&_.push("'"+this.terminals_[w]+"'");R=u.showPosition?"Parse error on line "+(r+1)+":\n"+u.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(r+1)+": Unexpected "+(1==y?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(R,{text:u.match,token:this.terminals_[y]||y,line:u.yylineno,loc:p,expected:_})}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+y);switch(A[0]){case 1:e.push(y),n.push(u.yytext),a.push(u.yylloc),e.push(A[1]),y=null,l=u.yyleng,h=u.yytext,r=u.yylineno,p=u.yylloc;break;case 2:if(C=this.productions_[A[1]][1],T.$=n[n.length-C],T._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},f&&(T._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(S=this.performAction.apply(T,[h,l,r,x.yy,A[1],n,a].concat(g))))return S;C&&(e=e.slice(0,-1*C*2),n=n.slice(0,-1*C),a=a.slice(0,-1*C)),e.push(this.productions_[A[1]][0]),n.push(T.$),a.push(T._$),k=o[e[e.length-2]][e[e.length-1]],e.push(k);break;case 3:return!0}}return!0}),"parse")},P=function(){return{EOF:1,parseError:c((function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)}),"parseError"),setInput:c((function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:c((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:c((function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this}),"unput"),more:c((function(){return this._more=!0,this}),"more"),reject:c((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:c((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:c((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:c((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:c((function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"}),"showPosition"),test_match:c((function(t,i){var e,s,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var a in n)this[a]=n[a];return!1}return!1}),"test_match"),next:c((function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((e=this._input.match(this.rules[n[a]]))&&(!i||e[0].length>i[0].length)){if(i=e,s=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,n[a])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,n[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:c((function(){var t=this.next();return t||this.lex()}),"lex"),begin:c((function(t){this.conditionStack.push(t)}),"begin"),popState:c((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:c((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:c((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:c((function(t){this.begin(t)}),"pushState"),stateStackSize:c((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:c((function(t,i,e,s){switch(e){case 0:case 1:case 5:case 43:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 25:case 27:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 26:this.pushState("string");break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 44:return 35;case 45:return 36}}),"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}}}();function v(){this.yy={}}return L.lexer=P,c(v,"Parser"),v.prototype=L,L.Parser=v,new v}();M.parser=M;var I=M;function $(t){return"bar"===t.type}function B(t){return"band"===t.type}function z(t){return"linear"===t.type}c($,"isBarPlot"),c(B,"isBandAxisData"),c(z,"isLinearAxisData");var O=(c(t=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce(((t,i)=>Math.max(i.length,t)),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const n of t){const t=g(s,1,n),a=t?t.width:n.length*i,o=t?t.height:i;e.width=Math.max(e.width,a),e.height=Math.max(e.height,o)}return s.remove(),e}},"TextDimensionCalculatorWithFont"),t),W=(c(i=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((t=>t.toString())),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.width;this.outerPadding=Math.min(e.width/2,s);const n=e.height+2*this.axisConfig.labelPadding;this.labelTextHeight=e.height,n<=i&&(i-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);const n=e.width+2*this.axisConfig.labelPadding;n<=i&&(i-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"})))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${i},${this.getScaleValue(t)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"})))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${this.getScaleValue(t)},${i} L ${this.getScaleValue(t)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"})))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${this.getScaleValue(t)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},"BaseAxis"),i),F=(c(e=class extends W{constructor(t,i,e,s,n){super(t,s,n,i),this.categories=e,this.scale=E().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=E().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),u.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},"BandAxis"),e),N=(c(s=class extends W{constructor(t,i,e,s,n){super(t,s,n,i),this.domain=e,this.scale=P().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=P().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},"LinearAxis"),s);function X(t,i,e,s){const n=new O(s);return B(t)?new F(i,e,t.categories,t.title,n):new N(i,e,[t.min,t.max],t.title,n)}c(X,"getAxis");var V=(c(n=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},"ChartTitle"),n);function Y(t,i,e,s){const n=new O(s);return new V(n,t,i,e)}c(Y,"getChartTitleComponent");var U=(c(a=class{constructor(t,i,e,s,n){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=n}getDrawableElement(){const t=this.plotData.data.map((t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]));let i;return i="horizontal"===this.orientation?v().y((t=>t[0])).x((t=>t[1]))(t):v().x((t=>t[0])).y((t=>t[1]))(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},"LinePlot"),a),H=(c(o=class{constructor(t,i,e,s,n,a){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=n,this.plotIndex=a}getDrawableElement(){const t=this.barData.data.map((t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])])),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),e=i/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((t=>({x:this.boundingRect.x,y:t[0]-e,height:i,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill})))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((t=>({x:t[0]-e,y:t[1],width:i,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill})))}]}},"BarPlot"),o),j=(c(h=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new U(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new H(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}},"BasePlot"),h);function G(t,i,e){return new j(t,i,e)}c(G,"getPlotComponent");var Q,K=(c(r=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:Y(t,i,e,s),plot:G(t,i,e),xAxis:X(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:X(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:n,height:a});t-=o.width,i-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=o.height,i-=o.height,this.componentStore.xAxis.setAxisPosition("bottom"),o=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=o.height,this.componentStore.yAxis.setAxisPosition("left"),o=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=o.width,t-=o.width,t>0&&(n+=t,t=0),i>0&&(a+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:a}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+n]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+a}),this.componentStore.yAxis.setRange([s,s+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some((t=>$(t)))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,n=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:a,height:o});t-=h.width,i-=h.height,h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=h.height,i-=h.height,this.componentStore.xAxis.setAxisPosition("left"),h=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=h.width,s=h.width,this.componentStore.yAxis.setAxisPosition("top"),h=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=h.height,n=e+h.height,t>0&&(a+=t,t=0),i>0&&(o+=i,i=0),this.componentStore.plot.calculateSpace({width:a,height:o}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.yAxis.setRange([s,s+a]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([n,n+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((t=>$(t)))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},"Orchestrator"),r),q=(c(l=class{static build(t,i,e,s){return new K(t,i,e,s).getDrawableElement()}},"XYChartBuilder"),l),Z=0,J=ot(),tt=at(),it=ht(),et=tt.plotColorPalette.split(",").map((t=>t.trim())),st=!1,nt=!1;function at(){const t=x(),i=d();return p(t.xyChart,i.themeVariables.xyChart)}function ot(){const t=d();return p(f.xyChart,t.xyChart)}function ht(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function rt(t){const i=d();return m(t.trim(),i)}function lt(t){Q=t}function ct(t){J.chartOrientation="horizontal"===t?"horizontal":"vertical"}function gt(t){it.xAxis.title=rt(t.text)}function ut(t,i){it.xAxis={type:"linear",title:it.xAxis.title,min:t,max:i},st=!0}function xt(t){it.xAxis={type:"band",title:it.xAxis.title,categories:t.map((t=>rt(t.text)))},st=!0}function dt(t){it.yAxis.title=rt(t.text)}function pt(t,i){it.yAxis={type:"linear",title:it.yAxis.title,min:t,max:i},nt=!0}function ft(t){const i=Math.min(...t),e=Math.max(...t),s=z(it.yAxis)?it.yAxis.min:1/0,n=z(it.yAxis)?it.yAxis.max:-1/0;it.yAxis={type:"linear",title:it.yAxis.title,min:Math.min(s,i),max:Math.max(n,e)}}function mt(t){let i=[];if(0===t.length)return i;if(!st){const i=z(it.xAxis)?it.xAxis.min:1/0,e=z(it.xAxis)?it.xAxis.max:-1/0;ut(Math.min(i,1),Math.max(e,t.length))}if(nt||ft(t),B(it.xAxis)&&(i=it.xAxis.categories.map(((i,e)=>[i,t[e]]))),z(it.xAxis)){const e=it.xAxis.min,s=it.xAxis.max,n=(s-e)/(t.length-1),a=[];for(let t=e;t<=s;t+=n)a.push(`${t}`);i=a.map(((i,e)=>[i,t[e]]))}return i}function yt(t){return et[0===t?0:t%et.length]}function bt(t,i){const e=mt(i);it.plots.push({type:"line",strokeFill:yt(Z),strokeWidth:2,data:e}),Z++}function At(t,i){const e=mt(i);it.plots.push({type:"bar",fill:yt(Z),data:e}),Z++}function St(){if(0===it.plots.length)throw Error("No Plot to render, please provide a plot with some data");return it.title=y(),q.build(J,it,tt,Q)}function wt(){return tt}function Ct(){return J}c(at,"getChartDefaultThemeConfig"),c(ot,"getChartDefaultConfig"),c(ht,"getChartDefaultData"),c(rt,"textSanitizer"),c(lt,"setTmpSVGG"),c(ct,"setOrientation"),c(gt,"setXAxisTitle"),c(ut,"setXAxisRangeData"),c(xt,"setXAxisBand"),c(dt,"setYAxisTitle"),c(pt,"setYAxisRangeData"),c(ft,"setYAxisRangeFromPlotData"),c(mt,"transformDataWithoutCategory"),c(yt,"getPlotColorFromPalette"),c(bt,"setLineData"),c(At,"setBarData"),c(St,"getDrawableElem"),c(wt,"getChartThemeConfig"),c(Ct,"getChartConfig");var kt={parser:I,db:{getDrawableElem:St,clear:c((function(){k(),Z=0,J=ot(),it={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},tt=at(),et=tt.plotColorPalette.split(",").map((t=>t.trim())),st=!1,nt=!1}),"clear"),setAccTitle:b,getAccTitle:A,setDiagramTitle:S,getDiagramTitle:y,getAccDescription:w,setAccDescription:C,setOrientation:ct,setXAxisTitle:gt,setXAxisRangeData:ut,setXAxisBand:xt,setYAxisTitle:dt,setYAxisRangeData:pt,setLineData:bt,setBarData:At,setTmpSVGG:lt,getChartThemeConfig:wt,getChartConfig:Ct},renderer:{draw:c(((t,i,e,s)=>{const n=s.db,a=n.getChartThemeConfig(),o=n.getChartConfig();function h(t){return"top"===t?"text-before-edge":"middle"}function r(t){return"left"===t?"start":"right"===t?"end":"middle"}function l(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}c(h,"getDominantBaseLine"),c(r,"getTextAnchor"),c(l,"getTextTransformation"),u.debug("Rendering xychart chart\n"+t);const g=_(i),x=g.append("g").attr("class","main"),d=x.append("rect").attr("width",o.width).attr("height",o.height).attr("class","background");T(g,o.height,o.width,!0),g.attr("viewBox",`0 0 ${o.width} ${o.height}`),d.attr("fill",a.backgroundColor),n.setTmpSVGG(g.append("g").attr("class","mermaid-tmp-group"));const p=n.getDrawableElem(),f={};function m(t){let i=x,e="";for(const[s]of t.entries()){let n=x;s>0&&f[e]&&(n=f[e]),e+=t[s],i=f[e],i||(i=f[e]=n.append("g").attr("class",t[s]))}return i}c(m,"getGroup");for(const c of p){if(0===c.data.length)continue;const t=m(c.groupTexts);switch(c.type){case"rect":t.selectAll("rect").data(c.data).enter().append("rect").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("fill",(t=>t.fill)).attr("stroke",(t=>t.strokeFill)).attr("stroke-width",(t=>t.strokeWidth));break;case"text":t.selectAll("text").data(c.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(t=>t.fill)).attr("font-size",(t=>t.fontSize)).attr("dominant-baseline",(t=>h(t.verticalPos))).attr("text-anchor",(t=>r(t.horizontalPos))).attr("transform",(t=>l(t))).text((t=>t.text));break;case"path":t.selectAll("path").data(c.data).enter().append("path").attr("d",(t=>t.path)).attr("fill",(t=>t.fill?t.fill:"none")).attr("stroke",(t=>t.strokeFill)).attr("stroke-width",(t=>t.strokeWidth))}}}),"draw")}};export{kt as diagram};
|
package/dist/index.html
CHANGED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
<marimo-app-config data-config='{{ app_config }}' hidden></marimo-app-config>
|
|
60
60
|
<marimo-server-token data-token='{{ server_token }}' hidden></marimo-server-token>
|
|
61
61
|
<title>{{ title }}</title>
|
|
62
|
-
<script type="module" crossorigin src="./assets/index-
|
|
62
|
+
<script type="module" crossorigin src="./assets/index-2ug5TmwY.js"></script>
|
|
63
63
|
<link rel="stylesheet" crossorigin href="./assets/index-p7XgZ0ex.css">
|
|
64
64
|
</head>
|
|
65
65
|
<body>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./_baseEach-BECjw4fP.js";import{n}from"./index-DEE3lg2L.js";function a(a,o){var t=-1,s=n(a)?Array(a.length):[];return r(a,(function(r,n,a){s[++t]=o(r,n,a)})),s}export{a as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as a,C as r}from"./mermaid-B4gvKJNB.js";const s=(s,o)=>a.lang.round(r.parse(s)[o]);export{s as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./_baseUniq-DtBIGl1c.js";function n(n){return r(n,4)}export{n as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e,t={};function n(){if(e)return t;function n(e){return"string"==typeof e||e instanceof String}function i(e){return Array.isArray(e)}return e=1,Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>n(e)))},t}var i,r,o={},s={};function a(){if(i)return s;let e;function t(){if(void 0===e)throw new Error("No runtime abstraction layer installed");return e}return i=1,Object.defineProperty(s,"__esModule",{value:!0}),(t||(t={})).install=function(t){if(void 0===t)throw new Error("No runtime abstraction layer provided");e=t},s.default=t,s}function c(){if(r)return o;r=1,Object.defineProperty(o,"__esModule",{value:!0}),o.Emitter=o.Event=void 0;const e=a();var t;!function(e){const t={dispose(){}};e.None=function(){return t}}(t||(o.Event=t={}));class n{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let i=0,r=this._callbacks.length;i<r;i++)if(this._callbacks[i]===e){if(this._contexts[i]===t)return this._callbacks.splice(i,1),void this._contexts.splice(i,1);n=!0}if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...t){if(!this._callbacks)return[];const n=[],i=this._callbacks.slice(0),r=this._contexts.slice(0);for(let s=0,a=i.length;s<a;s++)try{n.push(i[s].apply(r[s],t))}catch(o){(0,e.default)().console.error(o)}return n}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class i{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const o={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),o.dispose=i._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(o),o}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}return o.Emitter=i,i._noop=function(){},o}var u,d,l,g,f,h,m,p,v,_,b,k,y,C,E,A,x,I,w,L,T,R,j,S,M,D,O,N,P,F,V,U,K,z,W,q,X,H,$,B,Q,G,J,Y,Z,ee,te,ne,ie,re,oe,se,ae,ce,ue,de,le,ge,fe,he,me,pe,ve,_e,be,ke,ye,Ce,Ee,Ae,xe,Ie,we,Le,Te,Re,je,Se,Me,De,Oe,Ne,Pe,Fe,Ve,Ue,Ke,ze,We,qe,Xe,He,$e,Be,Qe,Ge,Je,Ye,Ze,et,tt,nt,it,rt,ot,st,at,ct,ut,dt,lt,gt,ft,ht,mt,pt,vt,_t,bt,kt,yt,Ct,Et,At,xt,It,wt,Lt,Tt,Rt,jt,St,Mt,Dt={};function Ot(){if(u)return Dt;u=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.CancellationTokenSource=Dt.CancellationToken=void 0;const e=a(),t=n(),i=c();var r,o;(o=r||(Dt.CancellationToken=r={})).None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Event.None}),o.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i.Event.None}),o.is=function(e){const n=e;return n&&(n===o.None||n===o.Cancelled||t.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)};const s=Object.freeze((function(t,n){const i=(0,e.default)().timer.setTimeout(t.bind(n),0);return{dispose(){i.dispose()}}}));class d{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?s:(this._emitter||(this._emitter=new i.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}return Dt.CancellationTokenSource=class{get token(){return this._token||(this._token=new d),this._token}cancel(){this._token?this._token.cancel():this._token=r.Cancelled}dispose(){this._token?this._token instanceof d&&this._token.dispose():this._token=r.None}},Dt}(d||(d={})).is=function(e){return"string"==typeof e},(l||(l={})).is=function(e){return"string"==typeof e},(f=g||(g={})).MIN_VALUE=-2147483648,f.MAX_VALUE=2147483647,f.is=function(e){return"number"==typeof e&&f.MIN_VALUE<=e&&e<=f.MAX_VALUE},(m=h||(h={})).MIN_VALUE=0,m.MAX_VALUE=2147483647,m.is=function(e){return"number"==typeof e&&m.MIN_VALUE<=e&&e<=m.MAX_VALUE},(v=p||(p={})).create=function(e,t){return e===Number.MAX_VALUE&&(e=h.MAX_VALUE),t===Number.MAX_VALUE&&(t=h.MAX_VALUE),{line:e,character:t}},v.is=function(e){let t=e;return Vt.objectLiteral(t)&&Vt.uinteger(t.line)&&Vt.uinteger(t.character)},(b=_||(_={})).create=function(e,t,n,i){if(Vt.uinteger(e)&&Vt.uinteger(t)&&Vt.uinteger(n)&&Vt.uinteger(i))return{start:p.create(e,t),end:p.create(n,i)};if(p.is(e)&&p.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${i}]`)},b.is=function(e){let t=e;return Vt.objectLiteral(t)&&p.is(t.start)&&p.is(t.end)},(y=k||(k={})).create=function(e,t){return{uri:e,range:t}},y.is=function(e){let t=e;return Vt.objectLiteral(t)&&_.is(t.range)&&(Vt.string(t.uri)||Vt.undefined(t.uri))},(E=C||(C={})).create=function(e,t,n,i){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:i}},E.is=function(e){let t=e;return Vt.objectLiteral(t)&&_.is(t.targetRange)&&Vt.string(t.targetUri)&&_.is(t.targetSelectionRange)&&(_.is(t.originSelectionRange)||Vt.undefined(t.originSelectionRange))},(x=A||(A={})).create=function(e,t,n,i){return{red:e,green:t,blue:n,alpha:i}},x.is=function(e){const t=e;return Vt.objectLiteral(t)&&Vt.numberRange(t.red,0,1)&&Vt.numberRange(t.green,0,1)&&Vt.numberRange(t.blue,0,1)&&Vt.numberRange(t.alpha,0,1)},(w=I||(I={})).create=function(e,t){return{range:e,color:t}},w.is=function(e){const t=e;return Vt.objectLiteral(t)&&_.is(t.range)&&A.is(t.color)},(T=L||(L={})).create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},T.is=function(e){const t=e;return Vt.objectLiteral(t)&&Vt.string(t.label)&&(Vt.undefined(t.textEdit)||X.is(t))&&(Vt.undefined(t.additionalTextEdits)||Vt.typedArray(t.additionalTextEdits,X.is))},(j=R||(R={})).Comment="comment",j.Imports="imports",j.Region="region",(M=S||(S={})).create=function(e,t,n,i,r,o){const s={startLine:e,endLine:t};return Vt.defined(n)&&(s.startCharacter=n),Vt.defined(i)&&(s.endCharacter=i),Vt.defined(r)&&(s.kind=r),Vt.defined(o)&&(s.collapsedText=o),s},M.is=function(e){const t=e;return Vt.objectLiteral(t)&&Vt.uinteger(t.startLine)&&Vt.uinteger(t.startLine)&&(Vt.undefined(t.startCharacter)||Vt.uinteger(t.startCharacter))&&(Vt.undefined(t.endCharacter)||Vt.uinteger(t.endCharacter))&&(Vt.undefined(t.kind)||Vt.string(t.kind))},(O=D||(D={})).create=function(e,t){return{location:e,message:t}},O.is=function(e){let t=e;return Vt.defined(t)&&k.is(t.location)&&Vt.string(t.message)},(P=N||(N={})).Error=1,P.Warning=2,P.Information=3,P.Hint=4,(V=F||(F={})).Unnecessary=1,V.Deprecated=2,(U||(U={})).is=function(e){const t=e;return Vt.objectLiteral(t)&&Vt.string(t.href)},(z=K||(K={})).create=function(e,t,n,i,r,o){let s={range:e,message:t};return Vt.defined(n)&&(s.severity=n),Vt.defined(i)&&(s.code=i),Vt.defined(r)&&(s.source=r),Vt.defined(o)&&(s.relatedInformation=o),s},z.is=function(e){var t;let n=e;return Vt.defined(n)&&_.is(n.range)&&Vt.string(n.message)&&(Vt.number(n.severity)||Vt.undefined(n.severity))&&(Vt.integer(n.code)||Vt.string(n.code)||Vt.undefined(n.code))&&(Vt.undefined(n.codeDescription)||Vt.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Vt.string(n.source)||Vt.undefined(n.source))&&(Vt.undefined(n.relatedInformation)||Vt.typedArray(n.relatedInformation,D.is))},(q=W||(W={})).create=function(e,t,...n){let i={title:e,command:t};return Vt.defined(n)&&n.length>0&&(i.arguments=n),i},q.is=function(e){let t=e;return Vt.defined(t)&&Vt.string(t.title)&&Vt.string(t.command)},(H=X||(X={})).replace=function(e,t){return{range:e,newText:t}},H.insert=function(e,t){return{range:{start:e,end:e},newText:t}},H.del=function(e){return{range:e,newText:""}},H.is=function(e){const t=e;return Vt.objectLiteral(t)&&Vt.string(t.newText)&&_.is(t.range)},(B=$||($={})).create=function(e,t,n){const i={label:e};return void 0!==t&&(i.needsConfirmation=t),void 0!==n&&(i.description=n),i},B.is=function(e){const t=e;return Vt.objectLiteral(t)&&Vt.string(t.label)&&(Vt.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Vt.string(t.description)||void 0===t.description)},(Q||(Q={})).is=function(e){const t=e;return Vt.string(t)},(J=G||(G={})).replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},J.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},J.del=function(e,t){return{range:e,newText:"",annotationId:t}},J.is=function(e){const t=e;return X.is(t)&&($.is(t.annotationId)||Q.is(t.annotationId))},(Z=Y||(Y={})).create=function(e,t){return{textDocument:e,edits:t}},Z.is=function(e){let t=e;return Vt.defined(t)&&le.is(t.textDocument)&&Array.isArray(t.edits)},(te=ee||(ee={})).create=function(e,t,n){let i={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},te.is=function(e){let t=e;return t&&"create"===t.kind&&Vt.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Vt.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Vt.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Q.is(t.annotationId))},(ie=ne||(ne={})).create=function(e,t,n,i){let r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),void 0!==i&&(r.annotationId=i),r},ie.is=function(e){let t=e;return t&&"rename"===t.kind&&Vt.string(t.oldUri)&&Vt.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Vt.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Vt.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Q.is(t.annotationId))},(oe=re||(re={})).create=function(e,t,n){let i={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},oe.is=function(e){let t=e;return t&&"delete"===t.kind&&Vt.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Vt.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Vt.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||Q.is(t.annotationId))},(se||(se={})).is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Vt.string(e.kind)?ee.is(e)||ne.is(e)||re.is(e):Y.is(e))))};class Nt{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let i,r;if(void 0===n?i=X.insert(e,t):Q.is(n)?(r=n,i=G.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=G.insert(e,t,r)),this.edits.push(i),void 0!==r)return r}replace(e,t,n){let i,r;if(void 0===n?i=X.replace(e,t):Q.is(n)?(r=n,i=G.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=G.replace(e,t,r)),this.edits.push(i),void 0!==r)return r}delete(e,t){let n,i;if(void 0===t?n=X.del(e):Q.is(t)?(i=t,n=G.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),n=G.del(e,i)),this.edits.push(n),void 0!==i)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}}class Pt{constructor(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(Q.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error(`Id ${n} is already in use.`);if(void 0===t)throw new Error(`No annotation provided for id ${n}`);return this._annotations[n]=t,this._size++,n}nextId(){return this._counter++,this._counter.toString()}}(ce=ae||(ae={})).create=function(e){return{uri:e}},ce.is=function(e){let t=e;return Vt.defined(t)&&Vt.string(t.uri)},(de=ue||(ue={})).create=function(e,t){return{uri:e,version:t}},de.is=function(e){let t=e;return Vt.defined(t)&&Vt.string(t.uri)&&Vt.integer(t.version)},(ge=le||(le={})).create=function(e,t){return{uri:e,version:t}},ge.is=function(e){let t=e;return Vt.defined(t)&&Vt.string(t.uri)&&(null===t.version||Vt.integer(t.version))},(he=fe||(fe={})).create=function(e,t,n,i){return{uri:e,languageId:t,version:n,text:i}},he.is=function(e){let t=e;return Vt.defined(t)&&Vt.string(t.uri)&&Vt.string(t.languageId)&&Vt.integer(t.version)&&Vt.string(t.text)},(pe=me||(me={})).PlainText="plaintext",pe.Markdown="markdown",pe.is=function(e){const t=e;return t===pe.PlainText||t===pe.Markdown},(ve||(ve={})).is=function(e){const t=e;return Vt.objectLiteral(e)&&me.is(t.kind)&&Vt.string(t.value)},(be=_e||(_e={})).Text=1,be.Method=2,be.Function=3,be.Constructor=4,be.Field=5,be.Variable=6,be.Class=7,be.Interface=8,be.Module=9,be.Property=10,be.Unit=11,be.Value=12,be.Enum=13,be.Keyword=14,be.Snippet=15,be.Color=16,be.File=17,be.Reference=18,be.Folder=19,be.EnumMember=20,be.Constant=21,be.Struct=22,be.Event=23,be.Operator=24,be.TypeParameter=25,(ye=ke||(ke={})).PlainText=1,ye.Snippet=2,(Ce||(Ce={})).Deprecated=1,(Ae=Ee||(Ee={})).create=function(e,t,n){return{newText:e,insert:t,replace:n}},Ae.is=function(e){const t=e;return t&&Vt.string(t.newText)&&_.is(t.insert)&&_.is(t.replace)},(Ie=xe||(xe={})).asIs=1,Ie.adjustIndentation=2,(we||(we={})).is=function(e){const t=e;return t&&(Vt.string(t.detail)||void 0===t.detail)&&(Vt.string(t.description)||void 0===t.description)},(Le||(Le={})).create=function(e){return{label:e}},(Te||(Te={})).create=function(e,t){return{items:e||[],isIncomplete:!!t}},(je=Re||(Re={})).fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},je.is=function(e){const t=e;return Vt.string(t)||Vt.objectLiteral(t)&&Vt.string(t.language)&&Vt.string(t.value)},(Se||(Se={})).is=function(e){let t=e;return!!t&&Vt.objectLiteral(t)&&(ve.is(t.contents)||Re.is(t.contents)||Vt.typedArray(t.contents,Re.is))&&(void 0===e.range||_.is(e.range))},(Me||(Me={})).create=function(e,t){return t?{label:e,documentation:t}:{label:e}},(De||(De={})).create=function(e,t,...n){let i={label:e};return Vt.defined(t)&&(i.documentation=t),Vt.defined(n)?i.parameters=n:i.parameters=[],i},(Ne=Oe||(Oe={})).Text=1,Ne.Read=2,Ne.Write=3,(Pe||(Pe={})).create=function(e,t){let n={range:e};return Vt.number(t)&&(n.kind=t),n},(Ve=Fe||(Fe={})).File=1,Ve.Module=2,Ve.Namespace=3,Ve.Package=4,Ve.Class=5,Ve.Method=6,Ve.Property=7,Ve.Field=8,Ve.Constructor=9,Ve.Enum=10,Ve.Interface=11,Ve.Function=12,Ve.Variable=13,Ve.Constant=14,Ve.String=15,Ve.Number=16,Ve.Boolean=17,Ve.Array=18,Ve.Object=19,Ve.Key=20,Ve.Null=21,Ve.EnumMember=22,Ve.Struct=23,Ve.Event=24,Ve.Operator=25,Ve.TypeParameter=26,(Ue||(Ue={})).Deprecated=1,(Ke||(Ke={})).create=function(e,t,n,i,r){let o={name:e,kind:t,location:{uri:i,range:n}};return r&&(o.containerName=r),o},(ze||(ze={})).create=function(e,t,n,i){return void 0!==i?{name:e,kind:t,location:{uri:n,range:i}}:{name:e,kind:t,location:{uri:n}}},(qe=We||(We={})).create=function(e,t,n,i,r,o){let s={name:e,detail:t,kind:n,range:i,selectionRange:r};return void 0!==o&&(s.children=o),s},qe.is=function(e){let t=e;return t&&Vt.string(t.name)&&Vt.number(t.kind)&&_.is(t.range)&&_.is(t.selectionRange)&&(void 0===t.detail||Vt.string(t.detail))&&(void 0===t.deprecated||Vt.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))},(He=Xe||(Xe={})).Empty="",He.QuickFix="quickfix",He.Refactor="refactor",He.RefactorExtract="refactor.extract",He.RefactorInline="refactor.inline",He.RefactorRewrite="refactor.rewrite",He.Source="source",He.SourceOrganizeImports="source.organizeImports",He.SourceFixAll="source.fixAll",(Be=$e||($e={})).Invoked=1,Be.Automatic=2,(Ge=Qe||(Qe={})).create=function(e,t,n){let i={diagnostics:e};return null!=t&&(i.only=t),null!=n&&(i.triggerKind=n),i},Ge.is=function(e){let t=e;return Vt.defined(t)&&Vt.typedArray(t.diagnostics,K.is)&&(void 0===t.only||Vt.typedArray(t.only,Vt.string))&&(void 0===t.triggerKind||t.triggerKind===$e.Invoked||t.triggerKind===$e.Automatic)},(Ye=Je||(Je={})).create=function(e,t,n){let i={title:e},r=!0;return"string"==typeof t?(r=!1,i.kind=t):W.is(t)?i.command=t:i.edit=t,r&&void 0!==n&&(i.kind=n),i},Ye.is=function(e){let t=e;return t&&Vt.string(t.title)&&(void 0===t.diagnostics||Vt.typedArray(t.diagnostics,K.is))&&(void 0===t.kind||Vt.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||W.is(t.command))&&(void 0===t.isPreferred||Vt.boolean(t.isPreferred))&&(void 0===t.edit||se.is(t.edit))},(et=Ze||(Ze={})).create=function(e,t){let n={range:e};return Vt.defined(t)&&(n.data=t),n},et.is=function(e){let t=e;return Vt.defined(t)&&_.is(t.range)&&(Vt.undefined(t.command)||W.is(t.command))},(nt=tt||(tt={})).create=function(e,t){return{tabSize:e,insertSpaces:t}},nt.is=function(e){let t=e;return Vt.defined(t)&&Vt.uinteger(t.tabSize)&&Vt.boolean(t.insertSpaces)},(rt=it||(it={})).create=function(e,t,n){return{range:e,target:t,data:n}},rt.is=function(e){let t=e;return Vt.defined(t)&&_.is(t.range)&&(Vt.undefined(t.target)||Vt.string(t.target))},(st=ot||(ot={})).create=function(e,t){return{range:e,parent:t}},st.is=function(e){let t=e;return Vt.objectLiteral(t)&&_.is(t.range)&&(void 0===t.parent||st.is(t.parent))},(ct=at||(at={})).namespace="namespace",ct.type="type",ct.class="class",ct.enum="enum",ct.interface="interface",ct.struct="struct",ct.typeParameter="typeParameter",ct.parameter="parameter",ct.variable="variable",ct.property="property",ct.enumMember="enumMember",ct.event="event",ct.function="function",ct.method="method",ct.macro="macro",ct.keyword="keyword",ct.modifier="modifier",ct.comment="comment",ct.string="string",ct.number="number",ct.regexp="regexp",ct.operator="operator",ct.decorator="decorator",(dt=ut||(ut={})).declaration="declaration",dt.definition="definition",dt.readonly="readonly",dt.static="static",dt.deprecated="deprecated",dt.abstract="abstract",dt.async="async",dt.modification="modification",dt.documentation="documentation",dt.defaultLibrary="defaultLibrary",(lt||(lt={})).is=function(e){const t=e;return Vt.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])},(ft=gt||(gt={})).create=function(e,t){return{range:e,text:t}},ft.is=function(e){const t=e;return null!=t&&_.is(t.range)&&Vt.string(t.text)},(mt=ht||(ht={})).create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},mt.is=function(e){const t=e;return null!=t&&_.is(t.range)&&Vt.boolean(t.caseSensitiveLookup)&&(Vt.string(t.variableName)||void 0===t.variableName)},(vt=pt||(pt={})).create=function(e,t){return{range:e,expression:t}},vt.is=function(e){const t=e;return null!=t&&_.is(t.range)&&(Vt.string(t.expression)||void 0===t.expression)},(bt=_t||(_t={})).create=function(e,t){return{frameId:e,stoppedLocation:t}},bt.is=function(e){const t=e;return Vt.defined(t)&&_.is(e.stoppedLocation)},(yt=kt||(kt={})).Type=1,yt.Parameter=2,yt.is=function(e){return 1===e||2===e},(Et=Ct||(Ct={})).create=function(e){return{value:e}},Et.is=function(e){const t=e;return Vt.objectLiteral(t)&&(void 0===t.tooltip||Vt.string(t.tooltip)||ve.is(t.tooltip))&&(void 0===t.location||k.is(t.location))&&(void 0===t.command||W.is(t.command))},(xt=At||(At={})).create=function(e,t,n){const i={position:e,label:t};return void 0!==n&&(i.kind=n),i},xt.is=function(e){const t=e;return Vt.objectLiteral(t)&&p.is(t.position)&&(Vt.string(t.label)||Vt.typedArray(t.label,Ct.is))&&(void 0===t.kind||kt.is(t.kind))&&void 0===t.textEdits||Vt.typedArray(t.textEdits,X.is)&&(void 0===t.tooltip||Vt.string(t.tooltip)||ve.is(t.tooltip))&&(void 0===t.paddingLeft||Vt.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Vt.boolean(t.paddingRight))},(It||(It={})).createSnippet=function(e){return{kind:"snippet",value:e}},(wt||(wt={})).create=function(e,t,n,i){return{insertText:e,filterText:t,range:n,command:i}},(Lt||(Lt={})).create=function(e){return{items:e}},(Rt=Tt||(Tt={})).Invoked=0,Rt.Automatic=1,(jt||(jt={})).create=function(e,t){return{range:e,text:t}},(St||(St={})).create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}},(Mt||(Mt={})).is=function(e){const t=e;return Vt.objectLiteral(t)&&l.is(t.uri)&&Vt.string(t.name)};var Ft,Vt;!function(e){function t(e,n){if(e.length<=1)return e;const i=e.length/2|0,r=e.slice(0,i),o=e.slice(i);t(r,n),t(o,n);let s=0,a=0,c=0;for(;s<r.length&&a<o.length;){let t=n(r[s],o[a]);e[c++]=t<=0?r[s++]:o[a++]}for(;s<r.length;)e[c++]=r[s++];for(;a<o.length;)e[c++]=o[a++];return e}e.create=function(e,t,n,i){return new Ut(e,t,n,i)},e.is=function(e){let t=e;return!!(Vt.defined(t)&&Vt.string(t.uri)&&(Vt.undefined(t.languageId)||Vt.string(t.languageId))&&Vt.uinteger(t.lineCount)&&Vt.func(t.getText)&&Vt.func(t.positionAt)&&Vt.func(t.offsetAt))},e.applyEdits=function(e,n){let i=e.getText(),r=t(n,((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),o=i.length;for(let t=r.length-1;t>=0;t--){let n=r[t],s=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=o))throw new Error("Overlapping edit");i=i.substring(0,s)+n.newText+i.substring(a,i.length),o=s}return i}}(Ft||(Ft={}));class Ut{constructor(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let i=0;i<t.length;i++){n&&(e.push(i),n=!1);let r=t.charAt(i);n="\r"===r||"\n"===r,"\r"===r&&i+1<t.length&&"\n"===t.charAt(i+1)&&i++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return p.create(0,e);for(;n<i;){let r=Math.floor((n+i)/2);t[r]>e?i=r:n=r+1}let r=n-1;return p.create(r,e-t[r])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],i=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,i),n)}get lineCount(){return this.getLineOffsets().length}}!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,i){return"[object Number]"===t.call(e)&&n<=e&&e<=i},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(Vt||(Vt={}));const Kt=Object.freeze(Object.defineProperty({__proto__:null,get AnnotatedTextEdit(){return G},get ChangeAnnotation(){return $},get ChangeAnnotationIdentifier(){return Q},get CodeAction(){return Je},get CodeActionContext(){return Qe},get CodeActionKind(){return Xe},get CodeActionTriggerKind(){return $e},get CodeDescription(){return U},get CodeLens(){return Ze},get Color(){return A},get ColorInformation(){return I},get ColorPresentation(){return L},get Command(){return W},get CompletionItem(){return Le},get CompletionItemKind(){return _e},get CompletionItemLabelDetails(){return we},get CompletionItemTag(){return Ce},get CompletionList(){return Te},get CreateFile(){return ee},get DeleteFile(){return re},get Diagnostic(){return K},get DiagnosticRelatedInformation(){return D},get DiagnosticSeverity(){return N},get DiagnosticTag(){return F},get DocumentHighlight(){return Pe},get DocumentHighlightKind(){return Oe},get DocumentLink(){return it},get DocumentSymbol(){return We},get DocumentUri(){return d},EOL:["\n","\r\n","\r"],get FoldingRange(){return S},get FoldingRangeKind(){return R},get FormattingOptions(){return tt},get Hover(){return Se},get InlayHint(){return At},get InlayHintKind(){return kt},get InlayHintLabelPart(){return Ct},get InlineCompletionContext(){return St},get InlineCompletionItem(){return wt},get InlineCompletionList(){return Lt},get InlineCompletionTriggerKind(){return Tt},get InlineValueContext(){return _t},get InlineValueEvaluatableExpression(){return pt},get InlineValueText(){return gt},get InlineValueVariableLookup(){return ht},get InsertReplaceEdit(){return Ee},get InsertTextFormat(){return ke},get InsertTextMode(){return xe},get Location(){return k},get LocationLink(){return C},get MarkedString(){return Re},get MarkupContent(){return ve},get MarkupKind(){return me},get OptionalVersionedTextDocumentIdentifier(){return le},get ParameterInformation(){return Me},get Position(){return p},get Range(){return _},get RenameFile(){return ne},get SelectedCompletionInfo(){return jt},get SelectionRange(){return ot},get SemanticTokenModifiers(){return ut},get SemanticTokenTypes(){return at},get SemanticTokens(){return lt},get SignatureInformation(){return De},get StringValue(){return It},get SymbolInformation(){return Ke},get SymbolKind(){return Fe},get SymbolTag(){return Ue},get TextDocument(){return Ft},get TextDocumentEdit(){return Y},get TextDocumentIdentifier(){return ae},get TextDocumentItem(){return fe},get TextEdit(){return X},get URI(){return l},get VersionedTextDocumentIdentifier(){return ue},WorkspaceChange:class{constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Pt(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((e=>{if(Y.is(e)){const t=new Nt(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}}))):e.changes&&Object.keys(e.changes).forEach((t=>{const n=new Nt(e.changes[t]);this._textEditChanges[t]=n}))):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(le.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let n=this._textEditChanges[t.uri];if(!n){const e=[],i={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(i),n=new Nt(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let n=[];this._workspaceEdit.changes[e]=n,t=new Nt(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Pt,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i,r,o;if($.is(t)||Q.is(t)?i=t:n=t,void 0===i?r=ee.create(e,n):(o=Q.is(i)?i:this._changeAnnotations.manage(i),r=ee.create(e,n,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o}renameFile(e,t,n,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,o,s;if($.is(n)||Q.is(n)?r=n:i=n,void 0===r?o=ne.create(e,t,i):(s=Q.is(r)?r:this._changeAnnotations.manage(r),o=ne.create(e,t,i,s)),this._workspaceEdit.documentChanges.push(o),void 0!==s)return s}deleteFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i,r,o;if($.is(t)||Q.is(t)?i=t:n=t,void 0===i?r=re.create(e,n):(o=Q.is(i)?i:this._changeAnnotations.manage(i),r=re.create(e,n,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o}},get WorkspaceEdit(){return se},get WorkspaceFolder(){return Mt},get WorkspaceSymbol(){return ze},get integer(){return g},get uinteger(){return h}},Symbol.toStringTag,{value:"Module"}));export{p as P,_ as R,Ot as a,a as b,c,Kt as m,n as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as r,a as s,c as t,b as a}from"./chunk-5RIWM3LS-CjbA3NE0.js";import{_ as e}from"./mermaid-B4gvKJNB.js";import"./transform-C6EuPmuu.js";import"./chunk-4LC2V6XN-CeSlNLLb.js";import"./index-DEE3lg2L.js";import"./step-DY8hpDjU.js";var o={parser:r,db:s,renderer:t,styles:a,init:e((r=>{r.state||(r.state={}),r.state.arrowMarkerAbsolute=r.arrowMarkerAbsolute,s.clear()}),"init")};export{o as diagram};
|