@pb33f/cowboy-components 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{_baseUniq-D4w9OEfi.cjs → _baseUniq-BCBHARBa.cjs} +1 -1
- package/dist/{_baseUniq-CwhnPBuZ.js → _baseUniq-DxKTOiyd.js} +74 -74
- package/dist/arc-BuSUjh0s.js +84 -0
- package/dist/arc-CH-0H1TF.cjs +1 -0
- package/dist/{architecture-YZFGNWBL-BSnkfFiL.cjs → architecture-YZFGNWBL-BPn_727R.cjs} +1 -1
- package/dist/{architecture-YZFGNWBL-Cv-BGlq1.js → architecture-YZFGNWBL-BTpBH05L.js} +1 -1
- package/dist/{architectureDiagram-Q4EWVU46-Bi5_oLbN.js → architectureDiagram-Q4EWVU46-CYewkKfJ.js} +4 -4
- package/dist/{architectureDiagram-Q4EWVU46-7qN01149.cjs → architectureDiagram-Q4EWVU46-DiD3e6PQ.cjs} +1 -1
- package/dist/blockDiagram-DXYQGD6D-B1FzGfTA.cjs +132 -0
- package/dist/{blockDiagram-DXYQGD6D-DPZDIH8c.js → blockDiagram-DXYQGD6D-C1Xzgnrv.js} +18 -17
- package/dist/{c4Diagram-AHTNJAMY-CzTGAiLN.js → c4Diagram-AHTNJAMY-L6Az2dvx.js} +2 -2
- package/dist/{c4Diagram-AHTNJAMY-vYFfYNT2.cjs → c4Diagram-AHTNJAMY-c5bsYT5q.cjs} +1 -1
- package/dist/change-list-item-4xBSo3-U.cjs +4586 -0
- package/dist/change-list-item-Bu_mPv-k.js +19108 -0
- package/dist/{channel-xkWi7eyU.cjs → channel-BR_Krb9l.cjs} +1 -1
- package/dist/channel-Bo_TnECw.js +5 -0
- package/dist/{chunk-4BX2VUAB-D5fkGnKT.cjs → chunk-4BX2VUAB-B1uaSl0e.cjs} +1 -1
- package/dist/{chunk-4BX2VUAB-Crsil6rQ.js → chunk-4BX2VUAB-ClX8oE7L.js} +1 -1
- package/dist/{chunk-4TB4RGXK-BK_Zwn1u.cjs → chunk-4TB4RGXK-D0JpJZOs.cjs} +1 -1
- package/dist/{chunk-4TB4RGXK-CqgUAjqs.js → chunk-4TB4RGXK-DzEEAztK.js} +5 -5
- package/dist/{chunk-55IACEB6-CVOd63y7.cjs → chunk-55IACEB6-595ZDi6s.cjs} +1 -1
- package/dist/{chunk-55IACEB6-BHM-gGnN.js → chunk-55IACEB6-DL_DHCyZ.js} +1 -1
- package/dist/{chunk-EDXVE4YY-XhKW7gue.js → chunk-EDXVE4YY-BII9TpbV.js} +1 -1
- package/dist/{chunk-EDXVE4YY-Cg8LIvnn.cjs → chunk-EDXVE4YY-CQbtNtXr.cjs} +1 -1
- package/dist/{chunk-FMBD7UC4-ClqO-tFT.cjs → chunk-FMBD7UC4-BO92YnlB.cjs} +1 -1
- package/dist/{chunk-FMBD7UC4-DZgUWYcc.js → chunk-FMBD7UC4-cN7XywSK.js} +1 -1
- package/dist/{chunk-OYMX7WX6-DPeZUR-5.cjs → chunk-OYMX7WX6-BxqhsynN.cjs} +1 -1
- package/dist/{chunk-OYMX7WX6-DDhPRCvb.js → chunk-OYMX7WX6-DTXPUCgU.js} +35 -35
- package/dist/{chunk-QZHKN3VN-CEfUDcqe.js → chunk-QZHKN3VN-Biauj3yN.js} +1 -1
- package/dist/{chunk-QZHKN3VN-DfLK5brs.cjs → chunk-QZHKN3VN-C-mnteH7.cjs} +1 -1
- package/dist/{chunk-YZCP3GAM-CUdZyEqp.cjs → chunk-YZCP3GAM-WiD5REgL.cjs} +1 -1
- package/dist/{chunk-YZCP3GAM-BseNjeX_.js → chunk-YZCP3GAM-eo-UEr6G.js} +1 -1
- package/dist/{classDiagram-v2-HSJHXN6E-DY4pBvUq.js → classDiagram-6PBFFD2Q-8kzuzUL4.js} +2 -2
- package/dist/{classDiagram-6PBFFD2Q-DANanUVD.cjs → classDiagram-6PBFFD2Q-ay2Efc0y.cjs} +1 -1
- package/dist/{classDiagram-6PBFFD2Q-DY4pBvUq.js → classDiagram-v2-HSJHXN6E-8kzuzUL4.js} +2 -2
- package/dist/{classDiagram-v2-HSJHXN6E-DANanUVD.cjs → classDiagram-v2-HSJHXN6E-ay2Efc0y.cjs} +1 -1
- package/dist/{clone-Dd6Qonyi.js → clone-CC2YvoOD.js} +1 -1
- package/dist/clone-DAIpdsWe.cjs +1 -0
- package/dist/components/diff-viewer/diff-viewer.d.ts +3 -0
- package/dist/components/diff-viewer/diff-viewer.js +34 -37
- package/dist/components/diff-viewer/line-renderer.d.ts +15 -0
- package/dist/components/diff-viewer/line-renderer.js +49 -0
- package/dist/components/footer/footer.d.ts +3 -0
- package/dist/components/footer/footer.js +10 -4
- package/dist/components/logo-wall/logos/apache.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/apache.svg.js +100 -0
- package/dist/components/logo-wall/logos/apideck.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/apideck.svg.js +14 -0
- package/dist/components/logo-wall/logos/apigee.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/apigee.svg.js +16 -0
- package/dist/components/logo-wall/logos/bump.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/bump.svg.js +14 -0
- package/dist/components/logo-wall/logos/bytebase.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/bytebase.svg.js +11 -0
- package/dist/components/logo-wall/logos/chainlink.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/chainlink.svg.js +18 -0
- package/dist/components/logo-wall/logos/cisco.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/cisco.svg.js +14 -0
- package/dist/components/logo-wall/logos/elastic.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/elastic.svg.js +14 -0
- package/dist/components/logo-wall/logos/google.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/google.svg.js +12 -0
- package/dist/components/logo-wall/logos/grafana.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/grafana.svg.js +14 -0
- package/dist/components/logo-wall/logos/hashicorp.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/hashicorp.svg.js +18 -0
- package/dist/components/logo-wall/logos/hasura.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/hasura.svg.js +14 -0
- package/dist/components/logo-wall/logos/jpmorgan.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/jpmorgan.svg.js +22 -0
- package/dist/components/logo-wall/logos/kong.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/kong.svg.js +13 -0
- package/dist/components/logo-wall/logos/mongodb.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/mongodb.svg.js +17 -0
- package/dist/components/logo-wall/logos/nhost.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/nhost.svg.js +9 -0
- package/dist/components/logo-wall/logos/okta.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/okta.svg.js +8 -0
- package/dist/components/logo-wall/logos/opentelemetry.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/opentelemetry.svg.js +8 -0
- package/dist/components/logo-wall/logos/prometheus.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/prometheus.svg.js +8 -0
- package/dist/components/logo-wall/logos/pulumi.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/pulumi.svg.js +10 -0
- package/dist/components/logo-wall/logos/redhat.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/redhat.svg.js +8 -0
- package/dist/components/logo-wall/logos/scalar.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/scalar.svg.js +19 -0
- package/dist/components/logo-wall/logos/splunk.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/splunk.svg.js +8 -0
- package/dist/components/logo-wall/logos/unkey.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/unkey.svg.js +15 -0
- package/dist/components/logo-wall/logowall.d.ts +2 -24
- package/dist/components/logo-wall/logowall.js +58 -373
- package/dist/components/model-tree/tree.js +1 -2
- package/dist/components/premium-gate/premium-gate.css.js +18 -1
- package/dist/components/premium-gate/premium-gate.js +2 -2
- package/dist/components/problem-list/problem-item.js +3 -2
- package/dist/components/problem-list/problem-list.d.ts +2 -0
- package/dist/components/problem-list/problem-list.js +26 -7
- package/dist/components/problems-overview/problem-overview-group.js +2 -1
- package/dist/components/visualizer/edge.d.ts +6 -2
- package/dist/components/visualizer/edge.js +26 -4
- package/dist/components/visualizer/equalizer.css.js +11 -2
- package/dist/components/visualizer/explorer.d.ts +3 -1
- package/dist/components/visualizer/explorer.js +51 -59
- package/dist/components/visualizer/nodes/change-view-node.d.ts +2 -2
- package/dist/components/visualizer/nodes/change-view-node.js +10 -6
- package/dist/components/visualizer/nodes/graph-node.d.ts +12 -8
- package/dist/components/visualizer/nodes/graph-node.js +47 -25
- package/dist/components/visualizer/nodes/schema.d.ts +7 -0
- package/dist/components/visualizer/nodes/schema.js +81 -59
- package/dist/components/visualizer/shared.css.js +48 -10
- package/dist/components/visualizer/viewport-position.d.ts +28 -0
- package/dist/components/visualizer/viewport-position.js +38 -0
- package/dist/components/workspaces/workspace-view.js +10 -7
- package/dist/components/yaml-viewer/yaml-viewer.css.d.ts +2 -0
- package/dist/components/yaml-viewer/yaml-viewer.css.js +45 -0
- package/dist/components/yaml-viewer/yaml-viewer.d.ts +22 -0
- package/dist/components/yaml-viewer/yaml-viewer.js +86 -0
- package/dist/controllers/problem-controller.d.ts +1 -0
- package/dist/controllers/problem-controller.js +40 -24
- package/dist/{cose-bilkent-S5V4N54A-CPd0mzpZ.js → cose-bilkent-S5V4N54A-BvU_SKfP.js} +2 -2
- package/dist/{cose-bilkent-S5V4N54A-BEI30FIt.cjs → cose-bilkent-S5V4N54A-CjLPT2aq.cjs} +1 -1
- package/dist/{cowboy-components-C1bHeXpH.js → cowboy-components-B5MDHQs5.js} +8691 -8836
- package/dist/{cowboy-components-BDlH5KPd.cjs → cowboy-components-DMQv-nwp.cjs} +561 -489
- package/dist/{dagre-KV5264BT-lXj1bQdQ.cjs → dagre-KV5264BT-BJ3g2OfF.cjs} +1 -1
- package/dist/{dagre-KV5264BT-DKYFh03U.js → dagre-KV5264BT-CZZ7IWMJ.js} +29 -29
- package/dist/{diagram-5BDNPKRD-B5z67jan.js → diagram-5BDNPKRD-BtgWDNH6.js} +4 -4
- package/dist/{diagram-5BDNPKRD-BxdT4j_p.cjs → diagram-5BDNPKRD-C8f_rKrj.cjs} +1 -1
- package/dist/{diagram-G4DWMVQ6-CYhKfvVo.cjs → diagram-G4DWMVQ6-CdbbbjZ1.cjs} +1 -1
- package/dist/{diagram-G4DWMVQ6-CW505eM5.js → diagram-G4DWMVQ6-Cvo7MOEn.js} +4 -4
- package/dist/{diagram-MMDJMWI5-CguvhYVm.js → diagram-MMDJMWI5-BBZMNBAZ.js} +3 -3
- package/dist/{diagram-MMDJMWI5-CnbCy2d4.cjs → diagram-MMDJMWI5-CmuOqtUd.cjs} +1 -1
- package/dist/{diagram-TYMM5635-CTqk1SDy.cjs → diagram-TYMM5635-BDWJ5rTp.cjs} +1 -1
- package/dist/{diagram-TYMM5635-DNaputK9.js → diagram-TYMM5635-BJ6YAfrg.js} +3 -3
- package/dist/{erDiagram-SMLLAGMA-CbVmsYT2.js → erDiagram-SMLLAGMA-CYctRkDG.js} +4 -4
- package/dist/{erDiagram-SMLLAGMA-C8J_QyFx.cjs → erDiagram-SMLLAGMA-oQiAbd77.cjs} +1 -1
- package/dist/events/doctor.d.ts +2 -1
- package/dist/factories/explorer-component-factory.d.ts +2 -1
- package/dist/factories/explorer-component-factory.js +1 -0
- package/dist/{flowDiagram-DWJPFMVM-CilWme2B.cjs → flowDiagram-DWJPFMVM-Cl2ZAgx-.cjs} +1 -1
- package/dist/{flowDiagram-DWJPFMVM-CzhP7Mva.js → flowDiagram-DWJPFMVM-XzVvDcKE.js} +6 -6
- package/dist/{ganttDiagram-T4ZO3ILL-D1VjNn5T.js → ganttDiagram-T4ZO3ILL-Bw3whz8Z.js} +3 -3
- package/dist/{ganttDiagram-T4ZO3ILL-CJPTfw3M.cjs → ganttDiagram-T4ZO3ILL-D6p69Xut.cjs} +1 -1
- package/dist/{gitGraph-7Q5UKJZL-KIImqmsm.js → gitGraph-7Q5UKJZL-CV8uXlc6.js} +1 -1
- package/dist/{gitGraph-7Q5UKJZL-Dt7RPGLj.cjs → gitGraph-7Q5UKJZL-Dc00T47S.cjs} +1 -1
- package/dist/{gitGraphDiagram-UUTBAWPF-RgZxgljz.cjs → gitGraphDiagram-UUTBAWPF-DO7-Vg9n.cjs} +1 -1
- package/dist/{gitGraphDiagram-UUTBAWPF-oNmbFzsW.js → gitGraphDiagram-UUTBAWPF-DyF52xzw.js} +4 -4
- package/dist/{graph-CFIa3BqY.js → graph-BNtv6wPN.js} +43 -43
- package/dist/{graph-D7t_ZgqQ.cjs → graph-nnOjqfSF.cjs} +1 -1
- package/dist/info-OMHHGYJF-BEJOj8rC.js +5 -0
- package/dist/{info-OMHHGYJF-DNwPREtC.cjs → info-OMHHGYJF-DenwEztT.cjs} +1 -1
- package/dist/{infoDiagram-42DDH7IO-xpnPsX13.cjs → infoDiagram-42DDH7IO-CDwaPJgE.cjs} +1 -1
- package/dist/{infoDiagram-42DDH7IO-D6tfy_kQ.js → infoDiagram-42DDH7IO-D5ZWT_PY.js} +2 -2
- package/dist/{ishikawaDiagram-UXIWVN3A-1C3ML4wN.js → ishikawaDiagram-UXIWVN3A-DO1TQj8y.js} +1 -1
- package/dist/{ishikawaDiagram-UXIWVN3A-cN7Egzi1.cjs → ishikawaDiagram-UXIWVN3A-DgxKja6G.cjs} +1 -1
- package/dist/{journeyDiagram-VCZTEJTY-BBnQnZeo.js → journeyDiagram-VCZTEJTY-BOrvmHFC.js} +4 -4
- package/dist/{journeyDiagram-VCZTEJTY-CuHlve7g.cjs → journeyDiagram-VCZTEJTY-CJCEu2Bp.cjs} +1 -1
- package/dist/{kanban-definition-6JOO6SKY-w_-A-pcU.cjs → kanban-definition-6JOO6SKY-DEuqG8My.cjs} +1 -1
- package/dist/{kanban-definition-6JOO6SKY-CIUOm1v3.js → kanban-definition-6JOO6SKY-DbcLaE1y.js} +22 -22
- package/dist/{layout-DkbTnSOk.cjs → layout-C5IxZs51.cjs} +1 -1
- package/dist/{layout-B94Gbndw.js → layout-US8yryxu.js} +89 -89
- package/dist/linear-Bmlq6WJ8.cjs +1 -0
- package/dist/{linear-ofqYQwLM.js → linear-D6nUCk2i.js} +26 -26
- package/dist/{mermaid-parser.core-D5yJiPW9.cjs → mermaid-parser.core-COvBhcPG.cjs} +2 -2
- package/dist/{mermaid-parser.core-SWTLxzuR.js → mermaid-parser.core-DvOBQD0s.js} +13 -13
- package/dist/{min-CCJ14kSC.cjs → min-BeG6JEx2.cjs} +1 -1
- package/dist/{min-BVt52F4Z.js → min-gCZaz5eW.js} +8 -8
- package/dist/{mindmap-definition-QFDTVHPH-BBABzpZ_.js → mindmap-definition-QFDTVHPH-Bf7uOPBO.js} +11 -11
- package/dist/{mindmap-definition-QFDTVHPH-DkHlEc6j.cjs → mindmap-definition-QFDTVHPH-Bh_mtad8.cjs} +1 -1
- package/dist/{packet-4T2RLAQJ-C_GHj8I6.js → packet-4T2RLAQJ-CnjxgpUP.js} +1 -1
- package/dist/{packet-4T2RLAQJ-D-3BTAOL.cjs → packet-4T2RLAQJ-EX3JjNtR.cjs} +1 -1
- package/dist/pie-ZZUOXDRM-B0-esN8S.js +5 -0
- package/dist/{pie-ZZUOXDRM-CCr4-X6f.cjs → pie-ZZUOXDRM-S9g0lXgu.cjs} +1 -1
- package/dist/pieDiagram-DEJITSTG-An0q-g5y.cjs +30 -0
- package/dist/{pieDiagram-DEJITSTG-oeQHkFGB.js → pieDiagram-DEJITSTG-DIkSdQCd.js} +43 -42
- package/dist/{quadrantDiagram-34T5L4WZ-CHmpNV-R.cjs → quadrantDiagram-34T5L4WZ-B5f35ihC.cjs} +1 -1
- package/dist/{quadrantDiagram-34T5L4WZ-OYjSZG43.js → quadrantDiagram-34T5L4WZ-CBlxIaIn.js} +2 -2
- package/dist/radar-PYXPWWZC-1Ezs-b76.js +5 -0
- package/dist/{radar-PYXPWWZC-C1rOl50T.cjs → radar-PYXPWWZC-C0zC2ZSo.cjs} +1 -1
- package/dist/{requirementDiagram-MS252O5E-CD_xeIto.cjs → requirementDiagram-MS252O5E-C2bJ8iZf.cjs} +1 -1
- package/dist/{requirementDiagram-MS252O5E-CwRW6-r7.js → requirementDiagram-MS252O5E-CLQv0oWl.js} +3 -3
- package/dist/{sankeyDiagram-XADWPNL6-RMkMjKAW.cjs → sankeyDiagram-XADWPNL6--gS8yJdi.cjs} +1 -1
- package/dist/{sankeyDiagram-XADWPNL6-CQfVCItY.js → sankeyDiagram-XADWPNL6-BPSHvjZ8.js} +1 -1
- package/dist/{sequenceDiagram-FGHM5R23-Bg1onFX3.cjs → sequenceDiagram-FGHM5R23-C8D7r5pW.cjs} +1 -1
- package/dist/{sequenceDiagram-FGHM5R23-CHy2erSS.js → sequenceDiagram-FGHM5R23-Pz7V2MNd.js} +3 -3
- package/dist/services/workspace-service.js +3 -3
- package/dist/stateDiagram-FHFEXIEX-BAF5DJ1S.cjs +1 -0
- package/dist/{stateDiagram-FHFEXIEX-CMl5lVVr.js → stateDiagram-FHFEXIEX-D5m6EHM0.js} +44 -43
- package/dist/{stateDiagram-v2-QKLJ7IA2-Ddx6MvoK.js → stateDiagram-v2-QKLJ7IA2-Bewn3XVh.js} +2 -2
- package/dist/{stateDiagram-v2-QKLJ7IA2-k0ixVO2x.cjs → stateDiagram-v2-QKLJ7IA2-D8ygFuIi.cjs} +1 -1
- package/dist/{timeline-definition-GMOUNBTQ-tsduD7s8.cjs → timeline-definition-GMOUNBTQ-DGnNWVK8.cjs} +1 -1
- package/dist/{timeline-definition-GMOUNBTQ-wGoPQPZW.js → timeline-definition-GMOUNBTQ-D_q_Aq0R.js} +23 -23
- package/dist/{treeView-SZITEDCU-DLnrlNgm.js → treeView-SZITEDCU-CJ-dtg22.js} +1 -1
- package/dist/{treeView-SZITEDCU-0cNlhBgJ.cjs → treeView-SZITEDCU-D_h6_ShC.cjs} +1 -1
- package/dist/{treemap-W4RFUUIX-BhmjFGQ3.js → treemap-W4RFUUIX-B9GQw9aZ.js} +1 -1
- package/dist/{treemap-W4RFUUIX-CKAFw4rq.cjs → treemap-W4RFUUIX-BtKxSF22.cjs} +1 -1
- package/dist/{vennDiagram-DHZGUBPP-D0_k6R1t.js → vennDiagram-DHZGUBPP-JEim8wmH.js} +59 -59
- package/dist/{vennDiagram-DHZGUBPP-cIbatSRt.cjs → vennDiagram-DHZGUBPP-amyk4YMx.cjs} +1 -1
- package/dist/{wardley-RL74JXVD-E_57jQp4.cjs → wardley-RL74JXVD-Cni1Bfk_.cjs} +1 -1
- package/dist/{wardley-RL74JXVD-ClNl5KuH.js → wardley-RL74JXVD-sMbm0y_r.js} +1 -1
- package/dist/{wardleyDiagram-NUSXRM2D-DrU9h_lF.cjs → wardleyDiagram-NUSXRM2D-BxrRpNG2.cjs} +1 -1
- package/dist/{wardleyDiagram-NUSXRM2D-CdC2HbGc.js → wardleyDiagram-NUSXRM2D-C2MLJ-IT.js} +3 -3
- package/dist/workers/elk-fake-worker.generated.d.ts +3 -0
- package/dist/workers/elk-fake-worker.generated.js +50224 -0
- package/dist/workers/elk-layout-blob.generated.js +16 -18
- package/dist/workers/elk-layout.worker.js +5 -2
- package/dist/{xychartDiagram-5P7HB3ND-y-_Hnheq.js → xychartDiagram-5P7HB3ND-CSCEAZnj.js} +8 -7
- package/dist/{xychartDiagram-5P7HB3ND-BsPkSpoT.cjs → xychartDiagram-5P7HB3ND-CpDJRyka.cjs} +4 -4
- package/package.json +11 -2
- package/dist/arc-C1ekKGkb.js +0 -83
- package/dist/arc-R701-DfQ.cjs +0 -1
- package/dist/blockDiagram-DXYQGD6D-C72mCfQb.cjs +0 -132
- package/dist/change-list-item-BEl0JMXU.js +0 -18744
- package/dist/change-list-item-BQAfTtYI.cjs +0 -4535
- package/dist/channel-Bcdtr5hc.js +0 -5
- package/dist/clone-xz9tAnT8.cjs +0 -1
- package/dist/info-OMHHGYJF-CoCJYW0-.js +0 -5
- package/dist/linear-C0WOPIXr.cjs +0 -1
- package/dist/pie-ZZUOXDRM-BZwBUxgW.js +0 -5
- package/dist/pieDiagram-DEJITSTG-DpV5UNcT.cjs +0 -30
- package/dist/radar-PYXPWWZC-CeYN6kDE.js +0 -5
- package/dist/stateDiagram-FHFEXIEX-CYMON_a_.cjs +0 -1
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import ELK from 'elkjs/lib/elk.
|
|
2
|
-
|
|
1
|
+
import ELK from 'elkjs/lib/elk-api.js';
|
|
2
|
+
import ElkWorker from './elk-fake-worker.generated.js';
|
|
3
|
+
const elk = new ELK({
|
|
4
|
+
workerFactory: (workerUrl) => new ElkWorker(workerUrl)
|
|
5
|
+
});
|
|
3
6
|
export default onmessage = async function (e) {
|
|
4
7
|
const { graph, layoutOptions, requestId } = e.data;
|
|
5
8
|
if (!graph || !layoutOptions) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { _ as a, s as gi, g as xi, q as Xt, p as di, a as fi, b as pi, l as Yt, I as mi, e as yi, z as bi, D as _t, F as Nt, G as Ai, K as wi, i as Ci,
|
|
1
|
+
import { _ as a, s as gi, g as xi, q as Xt, p as di, a as fi, b as pi, l as Yt, I as mi, e as yi, z as bi, D as _t, F as Nt, G as Ai, K as wi, i as Ci, ay as Si } from "./cowboy-components-B5MDHQs5.js";
|
|
2
2
|
import { i as _i } from "./init-DjUOC4st.js";
|
|
3
3
|
import { o as ki } from "./ordinal-DfAQgscy.js";
|
|
4
|
-
import { l as
|
|
4
|
+
import { l as Wt } from "./linear-D6nUCk2i.js";
|
|
5
|
+
import { l as zt } from "./change-list-item-Bu_mPv-k.js";
|
|
5
6
|
function Ri(e, t, i) {
|
|
6
7
|
e = +e, t = +t, i = (n = arguments.length) < 2 ? (t = e, e = 0, 1) : n < 3 ? 1 : +i;
|
|
7
8
|
for (var s = -1, n = Math.max(0, Math.ceil((t - e) / i)) | 0, o = new Array(n); ++s < n; )
|
|
@@ -810,14 +811,14 @@ var Q, Ht = (Q = class {
|
|
|
810
811
|
}
|
|
811
812
|
}, a(Z, "BandAxis"), Z), J, vi = (J = class extends Ut {
|
|
812
813
|
constructor(t, i, s, n, o) {
|
|
813
|
-
super(t, n, o, i), this.domain = s, this.scale =
|
|
814
|
+
super(t, n, o, i), this.domain = s, this.scale = Wt().domain(this.domain).range(this.getRange());
|
|
814
815
|
}
|
|
815
816
|
getTickValues() {
|
|
816
817
|
return this.scale.ticks();
|
|
817
818
|
}
|
|
818
819
|
recalculateScale() {
|
|
819
820
|
const t = [...this.domain];
|
|
820
|
-
this.axisPosition === "left" && t.reverse(), this.scale =
|
|
821
|
+
this.axisPosition === "left" && t.reverse(), this.scale = Wt().domain(t).range(this.getRange());
|
|
821
822
|
}
|
|
822
823
|
getScaleValue(t) {
|
|
823
824
|
return this.scale(t);
|
|
@@ -897,7 +898,7 @@ var it, Li = (it = class {
|
|
|
897
898
|
this.yAxis.getScaleValue(s[1])
|
|
898
899
|
]);
|
|
899
900
|
let i;
|
|
900
|
-
return this.orientation === "horizontal" ? i =
|
|
901
|
+
return this.orientation === "horizontal" ? i = zt().y((s) => s[0]).x((s) => s[1])(t) : i = zt().x((s) => s[0]).y((s) => s[1])(t), i ? [
|
|
901
902
|
{
|
|
902
903
|
groupTexts: ["plot", `line-plot-${this.plotIndex}`],
|
|
903
904
|
type: "path",
|
|
@@ -1332,11 +1333,11 @@ var Bi = /* @__PURE__ */ a(function() {
|
|
|
1332
1333
|
}
|
|
1333
1334
|
}, "draw"), Oi = {
|
|
1334
1335
|
draw: zi
|
|
1335
|
-
},
|
|
1336
|
+
}, Ui = {
|
|
1336
1337
|
parser: Ti,
|
|
1337
1338
|
db: Wi,
|
|
1338
1339
|
renderer: Oi
|
|
1339
1340
|
};
|
|
1340
1341
|
export {
|
|
1341
|
-
|
|
1342
|
+
Ui as diagram
|
|
1342
1343
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./cowboy-components-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./cowboy-components-DMQv-nwp.cjs"),he=require("./init-CHZsXQcr.cjs"),le=require("./ordinal-CagbB1m8.cjs"),Bt=require("./linear-Bmlq6WJ8.cjs"),Wt=require("./change-list-item-4xBSo3-U.cjs");function ce(i,t,e){i=+i,t=+t,e=(a=arguments.length)<2?(t=i,i=0,1):a<3?1:+e;for(var s=-1,a=Math.max(0,Math.ceil((t-i)/e))|0,o=new Array(a);++s<a;)o[s]=i+s*e;return o}function _t(){var i=le.ordinal().unknown(void 0),t=i.domain,e=i.range,s=0,a=1,o,u,p=!1,f=0,R=0,P=.5;delete i.unknown;function S(){var y=t().length,E=a<s,v=E?a:s,L=E?s:a;o=(L-v)/Math.max(1,y-f+R*2),p&&(o=Math.floor(o)),v+=(L-v-o*(y-f))*P,u=o*(1-f),p&&(v=Math.round(v),u=Math.round(u));var M=ce(y).map(function(m){return v+o*m});return e(E?M.reverse():M)}return i.domain=function(y){return arguments.length?(t(y),S()):t()},i.range=function(y){return arguments.length?([s,a]=y,s=+s,a=+a,S()):[s,a]},i.rangeRound=function(y){return[s,a]=y,s=+s,a=+a,p=!0,S()},i.bandwidth=function(){return u},i.step=function(){return o},i.round=function(y){return arguments.length?(p=!!y,S()):p},i.padding=function(y){return arguments.length?(f=Math.min(1,R=+y),S()):f},i.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),S()):f},i.paddingOuter=function(y){return arguments.length?(R=+y,S()):R},i.align=function(y){return arguments.length?(P=Math.max(0,Math.min(1,y)),S()):P},i.copy=function(){return _t(t(),[s,a]).round(p).paddingInner(f).paddingOuter(R).align(P)},he.initRange.apply(S(),arguments)}var bt=(function(){var i=n.__name(function(F,h,c,g){for(c=c||{},g=F.length;g--;c[F[g]]=h);return c},"o"),t=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],o=[1,6],u=[1,7],p=[1,5,10,12,14,16,18,19,21,23,34,35,36],f=[1,25],R=[1,26],P=[1,28],S=[1,29],y=[1,30],E=[1,31],v=[1,32],L=[1,33],M=[1,34],m=[1,35],T=[1,36],l=[1,37],W=[1,43],z=[1,42],X=[1,47],Y=[1,50],C=[1,10,12,14,16,18,19,21,23,34,35,36],U=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],_=[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],A=[1,64],V={trace:n.__name(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:n.__name(function(h,c,g,x,w,r,rt){var d=r.length-1;switch(w){case 5:x.setOrientation(r[d]);break;case 9:x.setDiagramTitle(r[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},r[d]);break;case 13:x.setLineData(r[d-1],r[d]);break;case 14:x.setBarData({text:"",type:"text"},r[d]);break;case 15:x.setBarData(r[d-1],r[d]);break;case 16:this.$=r[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=r[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=r[d-1];break;case 20:this.$=[Number(r[d-2]),...r[d]];break;case 21:this.$=[Number(r[d])];break;case 22:x.setXAxisTitle(r[d]);break;case 23:x.setXAxisTitle(r[d-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(r[d]);break;case 26:x.setXAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 27:this.$=r[d-1];break;case 28:this.$=[r[d-2],...r[d]];break;case 29:this.$=[r[d]];break;case 30:x.setYAxisTitle(r[d]);break;case 31:x.setYAxisTitle(r[d-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 37:this.$={text:r[d],type:"text"};break;case 38:this.$={text:r[d],type:"text"};break;case 39:this.$={text:r[d],type:"markdown"};break;case 40:this.$=r[d];break;case 41:this.$=r[d-1]+""+r[d];break}},"anonymous"),table:[i(t,e,{3:1,4:2,7:4,5:s,34:a,35:o,36:u}),{1:[3]},i(t,e,{4:2,7:4,3:8,5:s,34:a,35:o,36:u}),i(t,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:a,35:o,36:u}),{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]},i(p,[2,34]),i(p,[2,35]),i(p,[2,36]),{1:[2,1]},i(t,e,{4:2,7:4,3:21,5:s,34:a,35:o,36:u}),{1:[2,3]},i(p,[2,5]),i(t,[2,7],{4:22,34:a,35:o,36:u}),{11:23,37:24,38:f,39:R,40:27,41:P,42:S,43:y,44:E,45:v,46:L,47:M,48:m,49:T,50:l},{11:39,13:38,24:W,27:z,29:40,30:41,37:24,38:f,39:R,40:27,41:P,42:S,43:y,44:E,45:v,46:L,47:M,48:m,49:T,50:l},{11:45,15:44,27:X,33:46,37:24,38:f,39:R,40:27,41:P,42:S,43:y,44:E,45:v,46:L,47:M,48:m,49:T,50:l},{11:49,17:48,24:Y,37:24,38:f,39:R,40:27,41:P,42:S,43:y,44:E,45:v,46:L,47:M,48:m,49:T,50:l},{11:52,17:51,24:Y,37:24,38:f,39:R,40:27,41:P,42:S,43:y,44:E,45:v,46:L,47:M,48:m,49:T,50:l},{20:[1,53]},{22:[1,54]},i(C,[2,18]),{1:[2,2]},i(C,[2,8]),i(C,[2,9]),i(U,[2,37],{40:55,41:P,42:S,43:y,44:E,45:v,46:L,47:M,48:m,49:T,50:l}),i(U,[2,38]),i(U,[2,39]),i(_,[2,40]),i(_,[2,42]),i(_,[2,43]),i(_,[2,44]),i(_,[2,45]),i(_,[2,46]),i(_,[2,47]),i(_,[2,48]),i(_,[2,49]),i(_,[2,50]),i(_,[2,51]),i(C,[2,10]),i(C,[2,22],{30:41,29:56,24:W,27:z}),i(C,[2,24]),i(C,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:f,39:R,40:27,41:P,42:S,43:y,44:E,45:v,46:L,47:M,48:m,49:T,50:l},i(C,[2,11]),i(C,[2,30],{33:60,27:X}),i(C,[2,32]),{31:[1,61]},i(C,[2,12]),{17:62,24:Y},{25:63,27:A},i(C,[2,14]),{17:65,24:Y},i(C,[2,16]),i(C,[2,17]),i(_,[2,41]),i(C,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},i(C,[2,31]),{27:[1,69]},i(C,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},i(C,[2,15]),i(C,[2,26]),i(C,[2,27]),{11:59,32:72,37:24,38:f,39:R,40:27,41:P,42:S,43:y,44:E,45:v,46:L,47:M,48:m,49:T,50:l},i(C,[2,33]),i(C,[2,19]),{25:73,27:A},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n.__name(function(h,c){if(c.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=c,g}},"parseError"),parse:n.__name(function(h){var c=this,g=[0],x=[],w=[null],r=[],rt=this.table,d="",ct=0,Et=0,ne=2,Mt=1,ae=r.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&($.yy[ft]=this.yy[ft]);D.setInput(h,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var pt=D.yylloc;r.push(pt);var re=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function oe(B){g.length=g.length-2*B,w.length=w.length-B,r.length=r.length-B}n.__name(oe,"popStack");function It(){var B;return B=x.pop()||D.lex()||Mt,typeof B!="number"&&(B instanceof Array&&(x=B,B=x.pop()),B=c.symbols_[B]||B),B}n.__name(It,"lex");for(var I,q,O,mt,j={},ut,N,Vt,gt;;){if(q=g[g.length-1],this.defaultActions[q]?O=this.defaultActions[q]:((I===null||typeof I>"u")&&(I=It()),O=rt[q]&&rt[q][I]),typeof O>"u"||!O.length||!O[0]){var yt="";gt=[];for(ut in rt[q])this.terminals_[ut]&&ut>ne&>.push("'"+this.terminals_[ut]+"'");D.showPosition?yt="Parse error on line "+(ct+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
|
-
Expecting `+gt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":yt="Parse error on line "+(ct+1)+": Unexpected "+(I==Mt?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(yt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:pt,expected:gt})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+I);switch(O[0]){case 1:g.push(I),w.push(D.yytext),r.push(D.yylloc),g.push(O[1]),I=null,Et=D.yyleng,d=D.yytext,ct=D.yylineno,pt=D.yylloc;break;case 2:if(N=this.productions_[O[1]][1],j.$=w[w.length-N],j._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},
|
|
3
|
+
Expecting `+gt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":yt="Parse error on line "+(ct+1)+": Unexpected "+(I==Mt?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(yt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:pt,expected:gt})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+I);switch(O[0]){case 1:g.push(I),w.push(D.yytext),r.push(D.yylloc),g.push(O[1]),I=null,Et=D.yyleng,d=D.yytext,ct=D.yylineno,pt=D.yylloc;break;case 2:if(N=this.productions_[O[1]][1],j.$=w[w.length-N],j._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},re&&(j._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),mt=this.performAction.apply(j,[d,Et,ct,$.yy,O[1],w,r].concat(ae)),typeof mt<"u")return mt;N&&(g=g.slice(0,-1*N*2),w=w.slice(0,-1*N),r=r.slice(0,-1*N)),g.push(this.productions_[O[1]][0]),w.push(j.$),r.push(j._$),Vt=rt[g[g.length-2]][g[g.length-1]],g.push(Vt);break;case 3:return!0}}return!0},"parse")},k=(function(){var F={EOF:1,parseError:n.__name(function(c,g){if(this.yy.parser)this.yy.parser.parseError(c,g);else throw new Error(c)},"parseError"),setInput:n.__name(function(h,c){return this.yy=c||this.yy||{},this._input=h,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:n.__name(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var c=h.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:n.__name(function(h){var c=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=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),g.length-1&&(this.yylineno-=g.length-1);var w=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:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:n.__name(function(){return this._more=!0,this},"more"),reject:n.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n.__name(function(h){this.unput(this.match.slice(h))},"less"),pastInput:n.__name(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n.__name(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n.__name(function(){var h=this.pastInput(),c=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
|
5
5
|
`+c+"^"},"showPosition"),test_match:n.__name(function(h,c){var g,x,w;if(this.options.backtrack_lexer&&(w={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&&(w.yylloc.range=this.yylloc.range.slice(0))),x=h[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,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(h[0].length),this.matched+=h[0],g=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var r in w)this[r]=w[r];return!1}return!1},"test_match"),next:n.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,c,g,x;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),r=0;r<w.length;r++)if(g=this._input.match(this.rules[w[r]]),g&&(!c||g[0].length>c[0].length)){if(c=g,x=r,this.options.backtrack_lexer){if(h=this.test_match(g,w[r]),h!==!1)return h;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(h=this.test_match(c,w[x]),h!==!1?h:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:n.__name(function(){var c=this.next();return c||this.lex()},"lex"),begin:n.__name(function(c){this.conditionStack.push(c)},"begin"),popState:n.__name(function(){var c=this.conditionStack.length-1;return c>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n.__name(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:n.__name(function(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},"topState"),pushState:n.__name(function(c){this.begin(c)},"pushState"),stateStackSize:n.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:n.__name(function(c,g,x,w){switch(x){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;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:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46: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,/^(?:xychart\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,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],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:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return F})();V.lexer=k;function H(){this.yy={}}return n.__name(H,"Parser"),H.prototype=V,V.Parser=H,new H})();bt.parser=bt;var ce=bt;function At(i){return i.type==="bar"}n.__name(At,"isBarPlot");function St(i){return i.type==="band"}n.__name(St,"isBandAxisData");function G(i){return i.type==="linear"}n.__name(G,"isLinearAxisData");var Q,zt=(Q=class{constructor(t){this.parentGroup=t}getMaxDimension(t,e){if(!this.parentGroup)return{width:t.reduce((o,u)=>Math.max(u.length,o),0)*e,height:e};const s={width:0,height:0},a=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e);for(const o of t){const u=n.computeDimensionOfText(a,1,o),p=u?u.width:o.length*e,f=u?u.height:e;s.width=Math.max(s.width,p),s.height=Math.max(s.height,f)}return a.remove(),s}},n.__name(Q,"TextDimensionCalculatorWithFont"),Q),Wt=.7,Ot=.2,K,Ft=(K=class{constructor(t,e,s,a){this.axisConfig=t,this.title=e,this.textDimensionCalculator=s,this.axisThemeConfig=a,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,this.axisPosition==="left"||this.axisPosition==="right"?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(){Wt*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Wt*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let e=t.height;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),a=Ot*t.width;this.outerPadding=Math.min(s.width/2,a);const o=s.height+this.axisConfig.labelPadding*2;this.labelTextHeight=s.height,o<=e&&(e-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,a<=e&&(e-=a,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-e}calculateSpaceIfDrawnVertical(t){let e=t.width;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),a=Ot*t.height;this.outerPadding=Math.min(s.height/2,a);const o=s.width+this.axisConfig.labelPadding*2;o<=e&&(e-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,a<=e&&(e-=a,this.showTitle=!0)}this.boundingRect.width=t.width-e,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?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 e=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${e},${this.boundingRect.y} L ${e},${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(e=>({text:e.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(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const e=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${e},${this.getScaleValue(s)} L ${e-this.axisConfig.tickLength},${this.getScaleValue(s)}`,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 e=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),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 e=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${e} L ${this.getScaleValue(s)},${e+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 e=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},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const e=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${e+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${e+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(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},n.__name(K,"BaseAxis"),K),Z,ue=(Z=class extends Ft{constructor(t,e,s,a,o){super(t,a,o,e),this.categories=s,this.scale=_t().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=_t().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),n.log.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},n.__name(Z,"BandAxis"),Z),J,ge=(J=class extends Ft{constructor(t,e,s,a,o){super(t,a,o,e),this.domain=s,this.scale=Bt.linear().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Bt.linear().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},n.__name(J,"LinearAxis"),J);function wt(i,t,e,s){const a=new zt(s);return St(i)?new ue(t,e,i.categories,i.title,a):new ge(t,e,[i.min,i.max],i.title,a)}n.__name(wt,"getAxis");var tt,xe=(tt=class{constructor(t,e,s,a){this.textDimensionCalculator=t,this.chartConfig=e,this.chartData=s,this.chartThemeConfig=a,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 e=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(e.width,t.width),a=e.height+2*this.chartConfig.titlePadding;return e.width<=s&&e.height<=a&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=a,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}},n.__name(tt,"ChartTitle"),tt);function Xt(i,t,e,s){const a=new zt(s);return new xe(a,i,t,e)}n.__name(Xt,"getChartTitleComponent");var et,de=(et=class{constructor(t,e,s,a,o){this.plotData=t,this.xAxis=e,this.yAxis=s,this.orientation=a,this.plotIndex=o}getDrawableElement(){const t=this.plotData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]);let e;return this.orientation==="horizontal"?e=n.line().y(s=>s[0]).x(s=>s[1])(t):e=n.line().x(s=>s[0]).y(s=>s[1])(t),e?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:e,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},n.__name(et,"LinePlot"),et),it,fe=(it=class{constructor(t,e,s,a,o,u){this.barData=t,this.boundingRect=e,this.xAxis=s,this.yAxis=a,this.orientation=o,this.plotIndex=u}getDrawableElement(){const t=this.barData.data.map(o=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),a=s/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:this.boundingRect.x,y:o[0]-a,height:s,width:o[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(o=>({x:o[0]-a,y:o[1],width:s,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},n.__name(it,"BarPlot"),it),st,pe=(st=class{constructor(t,e,s){this.chartConfig=t,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,e){this.xAxis=t,this.yAxis=e}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[e,s]of this.chartData.plots.entries())switch(s.type){case"line":{const a=new de(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...a.getDrawableElement())}break;case"bar":{const a=new fe(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...a.getDrawableElement())}break}return t}},n.__name(st,"BasePlot"),st);function Yt(i,t,e){return new pe(i,t,e)}n.__name(Yt,"getPlotComponent");var nt,me=(nt=class{constructor(t,e,s,a){this.chartConfig=t,this.chartData=e,this.componentStore={title:Xt(t,e,s,a),plot:Yt(t,e,s),xAxis:wt(e.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},a),yAxis:wt(e.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},a)}}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,s=0,a=0,o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),u=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),p=this.componentStore.plot.calculateSpace({width:o,height:u});t-=p.width,e-=p.height,p=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),a=p.height,e-=p.height,this.componentStore.xAxis.setAxisPosition("bottom"),p=this.componentStore.xAxis.calculateSpace({width:t,height:e}),e-=p.height,this.componentStore.yAxis.setAxisPosition("left"),p=this.componentStore.yAxis.calculateSpace({width:t,height:e}),s=p.width,t-=p.width,t>0&&(o+=t,t=0),e>0&&(u+=e,e=0),this.componentStore.plot.calculateSpace({width:o,height:u}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.xAxis.setRange([s,s+o]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:a+u}),this.componentStore.yAxis.setRange([a,a+u]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(f=>At(f))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,s=0,a=0,o=0,u=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),p=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:u,height:p});t-=f.width,e-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),s=f.height,e-=f.height,this.componentStore.xAxis.setAxisPosition("left"),f=this.componentStore.xAxis.calculateSpace({width:t,height:e}),t-=f.width,a=f.width,this.componentStore.yAxis.setAxisPosition("top"),f=this.componentStore.yAxis.calculateSpace({width:t,height:e}),e-=f.height,o=s+f.height,t>0&&(u+=t,t=0),e>0&&(p+=e,e=0),this.componentStore.plot.calculateSpace({width:u,height:p}),this.componentStore.plot.setBoundingBoxXY({x:a,y:o}),this.componentStore.yAxis.setRange([a,a+u]),this.componentStore.yAxis.setBoundingBoxXY({x:a,y:s}),this.componentStore.xAxis.setRange([o,o+p]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some(R=>At(R))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const e of Object.values(this.componentStore))t.push(...e.getDrawableElements());return t}},n.__name(nt,"Orchestrator"),nt),at,ye=(at=class{static build(t,e,s,a){return new me(t,e,s,a).getDrawableElement()}},n.__name(at,"XYChartBuilder"),at),ot=0,Nt,ht=Rt(),lt=Tt(),b=Dt(),Ct=lt.plotColorPalette.split(",").map(i=>i.trim()),xt=!1,kt=!1;function Tt(){const i=n.getThemeVariables3(),t=n.getConfig();return n.cleanAndMerge(i.xyChart,t.themeVariables.xyChart)}n.__name(Tt,"getChartDefaultThemeConfig");function Rt(){const i=n.getConfig();return n.cleanAndMerge(n.defaultConfig_default.xyChart,i.xyChart)}n.__name(Rt,"getChartDefaultConfig");function Dt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}n.__name(Dt,"getChartDefaultData");function dt(i){const t=n.getConfig();return n.sanitizeText(i.trim(),t)}n.__name(dt,"textSanitizer");function Ht(i){Nt=i}n.__name(Ht,"setTmpSVGG");function Ut(i){i==="horizontal"?ht.chartOrientation="horizontal":ht.chartOrientation="vertical"}n.__name(Ut,"setOrientation");function $t(i){b.xAxis.title=dt(i.text)}n.__name($t,"setXAxisTitle");function vt(i,t){b.xAxis={type:"linear",title:b.xAxis.title,min:i,max:t},xt=!0}n.__name(vt,"setXAxisRangeData");function qt(i){b.xAxis={type:"band",title:b.xAxis.title,categories:i.map(t=>dt(t.text))},xt=!0}n.__name(qt,"setXAxisBand");function jt(i){b.yAxis.title=dt(i.text)}n.__name(jt,"setYAxisTitle");function Gt(i,t){b.yAxis={type:"linear",title:b.yAxis.title,min:i,max:t},kt=!0}n.__name(Gt,"setYAxisRangeData");function Qt(i){const t=Math.min(...i),e=Math.max(...i),s=G(b.yAxis)?b.yAxis.min:1/0,a=G(b.yAxis)?b.yAxis.max:-1/0;b.yAxis={type:"linear",title:b.yAxis.title,min:Math.min(s,t),max:Math.max(a,e)}}n.__name(Qt,"setYAxisRangeFromPlotData");function Pt(i){let t=[];if(i.length===0)return t;if(!xt){const e=G(b.xAxis)?b.xAxis.min:1/0,s=G(b.xAxis)?b.xAxis.max:-1/0;vt(Math.min(e,1),Math.max(s,i.length))}if(kt||Qt(i),St(b.xAxis)&&(t=b.xAxis.categories.map((e,s)=>[e,i[s]])),G(b.xAxis)){const e=b.xAxis.min,s=b.xAxis.max,a=(s-e)/(i.length-1),o=[];for(let u=e;u<=s;u+=a)o.push(`${u}`);t=o.map((u,p)=>[u,i[p]])}return t}n.__name(Pt,"transformDataWithoutCategory");function Lt(i){return Ct[i===0?0:i%Ct.length]}n.__name(Lt,"getPlotColorFromPalette");function Kt(i,t){const e=Pt(t);b.plots.push({type:"line",strokeFill:Lt(ot),strokeWidth:2,data:e}),ot++}n.__name(Kt,"setLineData");function Zt(i,t){const e=Pt(t);b.plots.push({type:"bar",fill:Lt(ot),data:e}),ot++}n.__name(Zt,"setBarData");function Jt(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=n.getDiagramTitle(),ye.build(ht,b,lt,Nt)}n.__name(Jt,"getDrawableElem");function te(){return lt}n.__name(te,"getChartThemeConfig");function ee(){return ht}n.__name(ee,"getChartConfig");function ie(){return b}n.__name(ie,"getXYChartData");var _e=n.__name(function(){n.clear(),ot=0,ht=Rt(),b=Dt(),lt=Tt(),Ct=lt.plotColorPalette.split(",").map(i=>i.trim()),xt=!1,kt=!1},"clear"),be={getDrawableElem:Jt,clear:_e,setAccTitle:n.setAccTitle,getAccTitle:n.getAccTitle,setDiagramTitle:n.setDiagramTitle,getDiagramTitle:n.getDiagramTitle,getAccDescription:n.getAccDescription,setAccDescription:n.setAccDescription,setOrientation:Ut,setXAxisTitle:$t,setXAxisRangeData:vt,setXAxisBand:qt,setYAxisTitle:jt,setYAxisRangeData:Gt,setLineData:Kt,setBarData:Zt,setTmpSVGG:Ht,getChartThemeConfig:te,getChartConfig:ee,getXYChartData:ie},Ae=n.__name((i,t,e,s)=>{const a=s.db,o=a.getChartThemeConfig(),u=a.getChartConfig(),p=a.getXYChartData().plots[0].data.map(m=>m[1]);function f(m){return m==="top"?"text-before-edge":"middle"}n.__name(f,"getDominantBaseLine");function R(m){return m==="left"?"start":m==="right"?"end":"middle"}n.__name(R,"getTextAnchor");function P(m){return`translate(${m.x}, ${m.y}) rotate(${m.rotation||0})`}n.__name(P,"getTextTransformation"),n.log.debug(`Rendering xychart chart
|
|
7
|
-
`+i);const S=n.selectSvgElement(t),y=S.append("g").attr("class","main"),E=y.append("rect").attr("width",u.width).attr("height",u.height).attr("class","background");n.configureSvgSize(S,u.height,u.width,!0),S.attr("viewBox",`0 0 ${u.width} ${u.height}`),E.attr("fill",o.backgroundColor),a.setTmpSVGG(S.append("g").attr("class","mermaid-tmp-group"));const v=a.getDrawableElem(),L={};function M(m){let T=y,l="";for(const[W]of m.entries()){let z=y;W>0&&L[l]&&(z=L[l]),l+=m[W],T=L[l],T||(T=L[l]=z.append("g").attr("class",m[W]))}return T}n.__name(M,"getGroup");for(const m of v){if(m.data.length===0)continue;const T=M(m.groupTexts);switch(m.type){case"rect":if(T.selectAll("rect").data(m.data).enter().append("rect").attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height).attr("fill",l=>l.fill).attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth),u.showDataLabel){const l=u.showDataLabelOutsideBar;if(u.chartOrientation==="horizontal"){let W=function(A,V){const{data:k,label:H}=A;return V*H.length*z<=k.width-X};n.__name(W,"fitsHorizontally");const z=.7,X=10,Y=m.data.map((A,V)=>({data:A,label:p[V].toString()})).filter(A=>A.data.width>0&&A.data.height>0),C=Y.map(A=>{const{data:V}=A;let k=V.height*.7;for(;!W(A,k)&&k>0;)k-=1;return k}),U=Math.floor(Math.min(...C)),_=n.__name(A=>l?A.data.x+A.data.width+X:A.data.x+A.data.width-X,"determineLabelXPosition");T.selectAll("text").data(Y).enter().append("text").attr("x",_).attr("y",A=>A.data.y+A.data.height/2).attr("text-anchor",l?"start":"end").attr("dominant-baseline","middle").attr("fill",o.dataLabelColor).attr("font-size",`${U}px`).text(A=>A.label)}else{let W=function(_,A,V){const{data:k,label:H}=_,h=A*H.length*.7,c=k.x+k.width/2,g=c-h/2,x=c+h/2,w=g>=k.x&&x<=k.x+k.width,r=k.y+V+A<=k.y+k.height;return w&&r};n.__name(W,"fitsInBar");const z=10,X=m.data.map((_,A)=>({data:_,label:p[A].toString()})).filter(_=>_.data.width>0&&_.data.height>0),Y=X.map(_=>{const{data:A,label:V}=_;let k=A.width/(V.length*.7);for(;!W(_,k,z)&&k>0;)k-=1;return k}),C=Math.floor(Math.min(...Y)),U=n.__name(_=>l?_.data.y-z:_.data.y+z,"determineLabelYPosition");T.selectAll("text").data(X).enter().append("text").attr("x",_=>_.data.x+_.data.width/2).attr("y",U).attr("text-anchor","middle").attr("dominant-baseline",l?"auto":"hanging").attr("fill",o.dataLabelColor).attr("font-size",`${C}px`).text(_=>_.label)}}break;case"text":T.selectAll("text").data(m.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",l=>l.fill).attr("font-size",l=>l.fontSize).attr("dominant-baseline",l=>f(l.verticalPos)).attr("text-anchor",l=>R(l.horizontalPos)).attr("transform",l=>P(l)).text(l=>l.text);break;case"path":T.selectAll("path").data(m.data).enter().append("path").attr("d",l=>l.path).attr("fill",l=>l.fill?l.fill:"none").attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break}}},"draw"),
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:n.__name(function(){var c=this.next();return c||this.lex()},"lex"),begin:n.__name(function(c){this.conditionStack.push(c)},"begin"),popState:n.__name(function(){var c=this.conditionStack.length-1;return c>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n.__name(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:n.__name(function(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},"topState"),pushState:n.__name(function(c){this.begin(c)},"pushState"),stateStackSize:n.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:n.__name(function(c,g,x,w){switch(x){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;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:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46: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,/^(?:xychart\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,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],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:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return F})();V.lexer=k;function H(){this.yy={}}return n.__name(H,"Parser"),H.prototype=V,V.Parser=H,new H})();bt.parser=bt;var ue=bt;function At(i){return i.type==="bar"}n.__name(At,"isBarPlot");function St(i){return i.type==="band"}n.__name(St,"isBandAxisData");function G(i){return i.type==="linear"}n.__name(G,"isLinearAxisData");var Q,Ft=(Q=class{constructor(t){this.parentGroup=t}getMaxDimension(t,e){if(!this.parentGroup)return{width:t.reduce((o,u)=>Math.max(u.length,o),0)*e,height:e};const s={width:0,height:0},a=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e);for(const o of t){const u=n.computeDimensionOfText(a,1,o),p=u?u.width:o.length*e,f=u?u.height:e;s.width=Math.max(s.width,p),s.height=Math.max(s.height,f)}return a.remove(),s}},n.__name(Q,"TextDimensionCalculatorWithFont"),Q),Ot=.7,zt=.2,K,Xt=(K=class{constructor(t,e,s,a){this.axisConfig=t,this.title=e,this.textDimensionCalculator=s,this.axisThemeConfig=a,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,this.axisPosition==="left"||this.axisPosition==="right"?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(){Ot*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Ot*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let e=t.height;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),a=zt*t.width;this.outerPadding=Math.min(s.width/2,a);const o=s.height+this.axisConfig.labelPadding*2;this.labelTextHeight=s.height,o<=e&&(e-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,a<=e&&(e-=a,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-e}calculateSpaceIfDrawnVertical(t){let e=t.width;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),a=zt*t.height;this.outerPadding=Math.min(s.height/2,a);const o=s.width+this.axisConfig.labelPadding*2;o<=e&&(e-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,a<=e&&(e-=a,this.showTitle=!0)}this.boundingRect.width=t.width-e,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?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 e=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${e},${this.boundingRect.y} L ${e},${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(e=>({text:e.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(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const e=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${e},${this.getScaleValue(s)} L ${e-this.axisConfig.tickLength},${this.getScaleValue(s)}`,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 e=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),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 e=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${e} L ${this.getScaleValue(s)},${e+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 e=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},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const e=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${e+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${e+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(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},n.__name(K,"BaseAxis"),K),Z,ge=(Z=class extends Xt{constructor(t,e,s,a,o){super(t,a,o,e),this.categories=s,this.scale=_t().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=_t().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),n.log.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},n.__name(Z,"BandAxis"),Z),J,xe=(J=class extends Xt{constructor(t,e,s,a,o){super(t,a,o,e),this.domain=s,this.scale=Bt.linear().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Bt.linear().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},n.__name(J,"LinearAxis"),J);function wt(i,t,e,s){const a=new Ft(s);return St(i)?new ge(t,e,i.categories,i.title,a):new xe(t,e,[i.min,i.max],i.title,a)}n.__name(wt,"getAxis");var tt,de=(tt=class{constructor(t,e,s,a){this.textDimensionCalculator=t,this.chartConfig=e,this.chartData=s,this.chartThemeConfig=a,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 e=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(e.width,t.width),a=e.height+2*this.chartConfig.titlePadding;return e.width<=s&&e.height<=a&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=a,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}},n.__name(tt,"ChartTitle"),tt);function Yt(i,t,e,s){const a=new Ft(s);return new de(a,i,t,e)}n.__name(Yt,"getChartTitleComponent");var et,fe=(et=class{constructor(t,e,s,a,o){this.plotData=t,this.xAxis=e,this.yAxis=s,this.orientation=a,this.plotIndex=o}getDrawableElement(){const t=this.plotData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]);let e;return this.orientation==="horizontal"?e=Wt.line().y(s=>s[0]).x(s=>s[1])(t):e=Wt.line().x(s=>s[0]).y(s=>s[1])(t),e?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:e,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},n.__name(et,"LinePlot"),et),it,pe=(it=class{constructor(t,e,s,a,o,u){this.barData=t,this.boundingRect=e,this.xAxis=s,this.yAxis=a,this.orientation=o,this.plotIndex=u}getDrawableElement(){const t=this.barData.data.map(o=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),a=s/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:this.boundingRect.x,y:o[0]-a,height:s,width:o[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(o=>({x:o[0]-a,y:o[1],width:s,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},n.__name(it,"BarPlot"),it),st,me=(st=class{constructor(t,e,s){this.chartConfig=t,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,e){this.xAxis=t,this.yAxis=e}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[e,s]of this.chartData.plots.entries())switch(s.type){case"line":{const a=new fe(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...a.getDrawableElement())}break;case"bar":{const a=new pe(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...a.getDrawableElement())}break}return t}},n.__name(st,"BasePlot"),st);function Nt(i,t,e){return new me(i,t,e)}n.__name(Nt,"getPlotComponent");var nt,ye=(nt=class{constructor(t,e,s,a){this.chartConfig=t,this.chartData=e,this.componentStore={title:Yt(t,e,s,a),plot:Nt(t,e,s),xAxis:wt(e.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},a),yAxis:wt(e.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},a)}}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,s=0,a=0,o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),u=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),p=this.componentStore.plot.calculateSpace({width:o,height:u});t-=p.width,e-=p.height,p=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),a=p.height,e-=p.height,this.componentStore.xAxis.setAxisPosition("bottom"),p=this.componentStore.xAxis.calculateSpace({width:t,height:e}),e-=p.height,this.componentStore.yAxis.setAxisPosition("left"),p=this.componentStore.yAxis.calculateSpace({width:t,height:e}),s=p.width,t-=p.width,t>0&&(o+=t,t=0),e>0&&(u+=e,e=0),this.componentStore.plot.calculateSpace({width:o,height:u}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.xAxis.setRange([s,s+o]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:a+u}),this.componentStore.yAxis.setRange([a,a+u]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(f=>At(f))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,s=0,a=0,o=0,u=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),p=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:u,height:p});t-=f.width,e-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),s=f.height,e-=f.height,this.componentStore.xAxis.setAxisPosition("left"),f=this.componentStore.xAxis.calculateSpace({width:t,height:e}),t-=f.width,a=f.width,this.componentStore.yAxis.setAxisPosition("top"),f=this.componentStore.yAxis.calculateSpace({width:t,height:e}),e-=f.height,o=s+f.height,t>0&&(u+=t,t=0),e>0&&(p+=e,e=0),this.componentStore.plot.calculateSpace({width:u,height:p}),this.componentStore.plot.setBoundingBoxXY({x:a,y:o}),this.componentStore.yAxis.setRange([a,a+u]),this.componentStore.yAxis.setBoundingBoxXY({x:a,y:s}),this.componentStore.xAxis.setRange([o,o+p]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some(R=>At(R))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const e of Object.values(this.componentStore))t.push(...e.getDrawableElements());return t}},n.__name(nt,"Orchestrator"),nt),at,_e=(at=class{static build(t,e,s,a){return new ye(t,e,s,a).getDrawableElement()}},n.__name(at,"XYChartBuilder"),at),ot=0,Ht,ht=Rt(),lt=Tt(),b=Dt(),Ct=lt.plotColorPalette.split(",").map(i=>i.trim()),xt=!1,kt=!1;function Tt(){const i=n.getThemeVariables3(),t=n.getConfig();return n.cleanAndMerge(i.xyChart,t.themeVariables.xyChart)}n.__name(Tt,"getChartDefaultThemeConfig");function Rt(){const i=n.getConfig();return n.cleanAndMerge(n.defaultConfig_default.xyChart,i.xyChart)}n.__name(Rt,"getChartDefaultConfig");function Dt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}n.__name(Dt,"getChartDefaultData");function dt(i){const t=n.getConfig();return n.sanitizeText(i.trim(),t)}n.__name(dt,"textSanitizer");function Ut(i){Ht=i}n.__name(Ut,"setTmpSVGG");function $t(i){i==="horizontal"?ht.chartOrientation="horizontal":ht.chartOrientation="vertical"}n.__name($t,"setOrientation");function qt(i){b.xAxis.title=dt(i.text)}n.__name(qt,"setXAxisTitle");function vt(i,t){b.xAxis={type:"linear",title:b.xAxis.title,min:i,max:t},xt=!0}n.__name(vt,"setXAxisRangeData");function jt(i){b.xAxis={type:"band",title:b.xAxis.title,categories:i.map(t=>dt(t.text))},xt=!0}n.__name(jt,"setXAxisBand");function Gt(i){b.yAxis.title=dt(i.text)}n.__name(Gt,"setYAxisTitle");function Qt(i,t){b.yAxis={type:"linear",title:b.yAxis.title,min:i,max:t},kt=!0}n.__name(Qt,"setYAxisRangeData");function Kt(i){const t=Math.min(...i),e=Math.max(...i),s=G(b.yAxis)?b.yAxis.min:1/0,a=G(b.yAxis)?b.yAxis.max:-1/0;b.yAxis={type:"linear",title:b.yAxis.title,min:Math.min(s,t),max:Math.max(a,e)}}n.__name(Kt,"setYAxisRangeFromPlotData");function Pt(i){let t=[];if(i.length===0)return t;if(!xt){const e=G(b.xAxis)?b.xAxis.min:1/0,s=G(b.xAxis)?b.xAxis.max:-1/0;vt(Math.min(e,1),Math.max(s,i.length))}if(kt||Kt(i),St(b.xAxis)&&(t=b.xAxis.categories.map((e,s)=>[e,i[s]])),G(b.xAxis)){const e=b.xAxis.min,s=b.xAxis.max,a=(s-e)/(i.length-1),o=[];for(let u=e;u<=s;u+=a)o.push(`${u}`);t=o.map((u,p)=>[u,i[p]])}return t}n.__name(Pt,"transformDataWithoutCategory");function Lt(i){return Ct[i===0?0:i%Ct.length]}n.__name(Lt,"getPlotColorFromPalette");function Zt(i,t){const e=Pt(t);b.plots.push({type:"line",strokeFill:Lt(ot),strokeWidth:2,data:e}),ot++}n.__name(Zt,"setLineData");function Jt(i,t){const e=Pt(t);b.plots.push({type:"bar",fill:Lt(ot),data:e}),ot++}n.__name(Jt,"setBarData");function te(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=n.getDiagramTitle(),_e.build(ht,b,lt,Ht)}n.__name(te,"getDrawableElem");function ee(){return lt}n.__name(ee,"getChartThemeConfig");function ie(){return ht}n.__name(ie,"getChartConfig");function se(){return b}n.__name(se,"getXYChartData");var be=n.__name(function(){n.clear(),ot=0,ht=Rt(),b=Dt(),lt=Tt(),Ct=lt.plotColorPalette.split(",").map(i=>i.trim()),xt=!1,kt=!1},"clear"),Ae={getDrawableElem:te,clear:be,setAccTitle:n.setAccTitle,getAccTitle:n.getAccTitle,setDiagramTitle:n.setDiagramTitle,getDiagramTitle:n.getDiagramTitle,getAccDescription:n.getAccDescription,setAccDescription:n.setAccDescription,setOrientation:$t,setXAxisTitle:qt,setXAxisRangeData:vt,setXAxisBand:jt,setYAxisTitle:Gt,setYAxisRangeData:Qt,setLineData:Zt,setBarData:Jt,setTmpSVGG:Ut,getChartThemeConfig:ee,getChartConfig:ie,getXYChartData:se},we=n.__name((i,t,e,s)=>{const a=s.db,o=a.getChartThemeConfig(),u=a.getChartConfig(),p=a.getXYChartData().plots[0].data.map(m=>m[1]);function f(m){return m==="top"?"text-before-edge":"middle"}n.__name(f,"getDominantBaseLine");function R(m){return m==="left"?"start":m==="right"?"end":"middle"}n.__name(R,"getTextAnchor");function P(m){return`translate(${m.x}, ${m.y}) rotate(${m.rotation||0})`}n.__name(P,"getTextTransformation"),n.log.debug(`Rendering xychart chart
|
|
7
|
+
`+i);const S=n.selectSvgElement(t),y=S.append("g").attr("class","main"),E=y.append("rect").attr("width",u.width).attr("height",u.height).attr("class","background");n.configureSvgSize(S,u.height,u.width,!0),S.attr("viewBox",`0 0 ${u.width} ${u.height}`),E.attr("fill",o.backgroundColor),a.setTmpSVGG(S.append("g").attr("class","mermaid-tmp-group"));const v=a.getDrawableElem(),L={};function M(m){let T=y,l="";for(const[W]of m.entries()){let z=y;W>0&&L[l]&&(z=L[l]),l+=m[W],T=L[l],T||(T=L[l]=z.append("g").attr("class",m[W]))}return T}n.__name(M,"getGroup");for(const m of v){if(m.data.length===0)continue;const T=M(m.groupTexts);switch(m.type){case"rect":if(T.selectAll("rect").data(m.data).enter().append("rect").attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height).attr("fill",l=>l.fill).attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth),u.showDataLabel){const l=u.showDataLabelOutsideBar;if(u.chartOrientation==="horizontal"){let W=function(A,V){const{data:k,label:H}=A;return V*H.length*z<=k.width-X};n.__name(W,"fitsHorizontally");const z=.7,X=10,Y=m.data.map((A,V)=>({data:A,label:p[V].toString()})).filter(A=>A.data.width>0&&A.data.height>0),C=Y.map(A=>{const{data:V}=A;let k=V.height*.7;for(;!W(A,k)&&k>0;)k-=1;return k}),U=Math.floor(Math.min(...C)),_=n.__name(A=>l?A.data.x+A.data.width+X:A.data.x+A.data.width-X,"determineLabelXPosition");T.selectAll("text").data(Y).enter().append("text").attr("x",_).attr("y",A=>A.data.y+A.data.height/2).attr("text-anchor",l?"start":"end").attr("dominant-baseline","middle").attr("fill",o.dataLabelColor).attr("font-size",`${U}px`).text(A=>A.label)}else{let W=function(_,A,V){const{data:k,label:H}=_,h=A*H.length*.7,c=k.x+k.width/2,g=c-h/2,x=c+h/2,w=g>=k.x&&x<=k.x+k.width,r=k.y+V+A<=k.y+k.height;return w&&r};n.__name(W,"fitsInBar");const z=10,X=m.data.map((_,A)=>({data:_,label:p[A].toString()})).filter(_=>_.data.width>0&&_.data.height>0),Y=X.map(_=>{const{data:A,label:V}=_;let k=A.width/(V.length*.7);for(;!W(_,k,z)&&k>0;)k-=1;return k}),C=Math.floor(Math.min(...Y)),U=n.__name(_=>l?_.data.y-z:_.data.y+z,"determineLabelYPosition");T.selectAll("text").data(X).enter().append("text").attr("x",_=>_.data.x+_.data.width/2).attr("y",U).attr("text-anchor","middle").attr("dominant-baseline",l?"auto":"hanging").attr("fill",o.dataLabelColor).attr("font-size",`${C}px`).text(_=>_.label)}}break;case"text":T.selectAll("text").data(m.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",l=>l.fill).attr("font-size",l=>l.fontSize).attr("dominant-baseline",l=>f(l.verticalPos)).attr("text-anchor",l=>R(l.horizontalPos)).attr("transform",l=>P(l)).text(l=>l.text);break;case"path":T.selectAll("path").data(m.data).enter().append("path").attr("d",l=>l.path).attr("fill",l=>l.fill?l.fill:"none").attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break}}},"draw"),Ce={draw:we},Se={parser:ue,db:Ae,renderer:Ce};exports.diagram=Se;
|
package/package.json
CHANGED
|
@@ -3,20 +3,28 @@
|
|
|
3
3
|
"description": "Princess Beef Heavy Industries Cowboy Components",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.14.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./dist/cowboy-components.umd.cjs",
|
|
9
9
|
"module": "./dist/cowboy-components.js",
|
|
10
10
|
"scripts": {
|
|
11
|
+
"generate:workers": "node scripts/build-elk-worker-blob.js",
|
|
12
|
+
"predev": "npm run generate:workers",
|
|
11
13
|
"dev": "vite",
|
|
12
|
-
"build": "
|
|
14
|
+
"build": "npm run generate:workers && vite build && tsc -p tsconfig.build.json",
|
|
13
15
|
"preview": "vite preview",
|
|
14
16
|
"test": "npm run test:unit && npm run test:component",
|
|
17
|
+
"pretest:unit": "npm run generate:workers",
|
|
15
18
|
"test:unit": "vitest run",
|
|
19
|
+
"pretest:unit:watch": "npm run generate:workers",
|
|
16
20
|
"test:unit:watch": "vitest",
|
|
21
|
+
"pretest:unit:coverage": "npm run generate:workers",
|
|
17
22
|
"test:unit:coverage": "vitest run --coverage",
|
|
23
|
+
"pretest:component": "npm run generate:workers",
|
|
18
24
|
"test:component": "web-test-runner",
|
|
25
|
+
"pretest:watch": "npm run generate:workers",
|
|
19
26
|
"test:watch": "web-test-runner --watch",
|
|
27
|
+
"pretest:integration": "npm run generate:workers",
|
|
20
28
|
"test:integration": "vitest run --config vitest.integration.config.ts"
|
|
21
29
|
},
|
|
22
30
|
"exports": {
|
|
@@ -35,6 +43,7 @@
|
|
|
35
43
|
"./css/*": "./dist/css/*",
|
|
36
44
|
"./components/*": "./dist/components/*",
|
|
37
45
|
"./model/*": "./dist/model/*",
|
|
46
|
+
"./components/yaml-viewer/yaml-viewer.js": "./dist/components/yaml-viewer/yaml-viewer.js",
|
|
38
47
|
"./services/*": "./dist/services/*",
|
|
39
48
|
"./workers/*": "./dist/workers/*",
|
|
40
49
|
"./events/*": "./dist/events/*",
|
package/dist/arc-C1ekKGkb.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { a0 as ln, a1 as an, a2 as y, a3 as tn, a4 as H, a5 as q, a6 as _, a7 as un, a8 as B, a9 as rn, aa as L, ab as o, ac as sn, ad as on, ae as fn } from "./cowboy-components-C1bHeXpH.js";
|
|
2
|
-
function cn(l) {
|
|
3
|
-
return l.innerRadius;
|
|
4
|
-
}
|
|
5
|
-
function yn(l) {
|
|
6
|
-
return l.outerRadius;
|
|
7
|
-
}
|
|
8
|
-
function gn(l) {
|
|
9
|
-
return l.startAngle;
|
|
10
|
-
}
|
|
11
|
-
function dn(l) {
|
|
12
|
-
return l.endAngle;
|
|
13
|
-
}
|
|
14
|
-
function mn(l) {
|
|
15
|
-
return l && l.padAngle;
|
|
16
|
-
}
|
|
17
|
-
function pn(l, h, I, D, v, A, C, a) {
|
|
18
|
-
var O = I - l, i = D - h, n = C - v, d = a - A, u = d * O - n * i;
|
|
19
|
-
if (!(u * u < y))
|
|
20
|
-
return u = (n * (h - A) - d * (l - v)) / u, [l + u * O, h + u * i];
|
|
21
|
-
}
|
|
22
|
-
function W(l, h, I, D, v, A, C) {
|
|
23
|
-
var a = l - I, O = h - D, i = (C ? A : -A) / L(a * a + O * O), n = i * O, d = -i * a, u = l + n, s = h + d, f = I + n, c = D + d, F = (u + f) / 2, t = (s + c) / 2, m = f - u, g = c - s, R = m * m + g * g, T = v - A, P = u * c - f * s, S = (g < 0 ? -1 : 1) * L(fn(0, T * T * R - P * P)), j = (P * g - m * S) / R, z = (-P * m - g * S) / R, w = (P * g + m * S) / R, p = (-P * m + g * S) / R, x = j - F, e = z - t, r = w - F, G = p - t;
|
|
24
|
-
return x * x + e * e > r * r + G * G && (j = w, z = p), {
|
|
25
|
-
cx: j,
|
|
26
|
-
cy: z,
|
|
27
|
-
x01: -n,
|
|
28
|
-
y01: -d,
|
|
29
|
-
x11: j * (v / T - 1),
|
|
30
|
-
y11: z * (v / T - 1)
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
function hn() {
|
|
34
|
-
var l = cn, h = yn, I = B(0), D = null, v = gn, A = dn, C = mn, a = null, O = ln(i);
|
|
35
|
-
function i() {
|
|
36
|
-
var n, d, u = +l.apply(this, arguments), s = +h.apply(this, arguments), f = v.apply(this, arguments) - an, c = A.apply(this, arguments) - an, F = un(c - f), t = c > f;
|
|
37
|
-
if (a || (a = n = O()), s < u && (d = s, s = u, u = d), !(s > y)) a.moveTo(0, 0);
|
|
38
|
-
else if (F > tn - y)
|
|
39
|
-
a.moveTo(s * H(f), s * q(f)), a.arc(0, 0, s, f, c, !t), u > y && (a.moveTo(u * H(c), u * q(c)), a.arc(0, 0, u, c, f, t));
|
|
40
|
-
else {
|
|
41
|
-
var m = f, g = c, R = f, T = c, P = F, S = F, j = C.apply(this, arguments) / 2, z = j > y && (D ? +D.apply(this, arguments) : L(u * u + s * s)), w = _(un(s - u) / 2, +I.apply(this, arguments)), p = w, x = w, e, r;
|
|
42
|
-
if (z > y) {
|
|
43
|
-
var G = sn(z / u * q(j)), M = sn(z / s * q(j));
|
|
44
|
-
(P -= G * 2) > y ? (G *= t ? 1 : -1, R += G, T -= G) : (P = 0, R = T = (f + c) / 2), (S -= M * 2) > y ? (M *= t ? 1 : -1, m += M, g -= M) : (S = 0, m = g = (f + c) / 2);
|
|
45
|
-
}
|
|
46
|
-
var J = s * H(m), K = s * q(m), N = u * H(T), Q = u * q(T);
|
|
47
|
-
if (w > y) {
|
|
48
|
-
var U = s * H(g), V = s * q(g), X = u * H(R), Y = u * q(R), E;
|
|
49
|
-
if (F < rn)
|
|
50
|
-
if (E = pn(J, K, X, Y, U, V, N, Q)) {
|
|
51
|
-
var Z = J - E[0], $ = K - E[1], b = U - E[0], k = V - E[1], nn = 1 / q(on((Z * b + $ * k) / (L(Z * Z + $ * $) * L(b * b + k * k))) / 2), en = L(E[0] * E[0] + E[1] * E[1]);
|
|
52
|
-
p = _(w, (u - en) / (nn - 1)), x = _(w, (s - en) / (nn + 1));
|
|
53
|
-
} else
|
|
54
|
-
p = x = 0;
|
|
55
|
-
}
|
|
56
|
-
S > y ? x > y ? (e = W(X, Y, J, K, s, x, t), r = W(U, V, N, Q, s, x, t), a.moveTo(e.cx + e.x01, e.cy + e.y01), x < w ? a.arc(e.cx, e.cy, x, o(e.y01, e.x01), o(r.y01, r.x01), !t) : (a.arc(e.cx, e.cy, x, o(e.y01, e.x01), o(e.y11, e.x11), !t), a.arc(0, 0, s, o(e.cy + e.y11, e.cx + e.x11), o(r.cy + r.y11, r.cx + r.x11), !t), a.arc(r.cx, r.cy, x, o(r.y11, r.x11), o(r.y01, r.x01), !t))) : (a.moveTo(J, K), a.arc(0, 0, s, m, g, !t)) : a.moveTo(J, K), !(u > y) || !(P > y) ? a.lineTo(N, Q) : p > y ? (e = W(N, Q, U, V, u, -p, t), r = W(J, K, X, Y, u, -p, t), a.lineTo(e.cx + e.x01, e.cy + e.y01), p < w ? a.arc(e.cx, e.cy, p, o(e.y01, e.x01), o(r.y01, r.x01), !t) : (a.arc(e.cx, e.cy, p, o(e.y01, e.x01), o(e.y11, e.x11), !t), a.arc(0, 0, u, o(e.cy + e.y11, e.cx + e.x11), o(r.cy + r.y11, r.cx + r.x11), t), a.arc(r.cx, r.cy, p, o(r.y11, r.x11), o(r.y01, r.x01), !t))) : a.arc(0, 0, u, T, R, t);
|
|
57
|
-
}
|
|
58
|
-
if (a.closePath(), n) return a = null, n + "" || null;
|
|
59
|
-
}
|
|
60
|
-
return i.centroid = function() {
|
|
61
|
-
var n = (+l.apply(this, arguments) + +h.apply(this, arguments)) / 2, d = (+v.apply(this, arguments) + +A.apply(this, arguments)) / 2 - rn / 2;
|
|
62
|
-
return [H(d) * n, q(d) * n];
|
|
63
|
-
}, i.innerRadius = function(n) {
|
|
64
|
-
return arguments.length ? (l = typeof n == "function" ? n : B(+n), i) : l;
|
|
65
|
-
}, i.outerRadius = function(n) {
|
|
66
|
-
return arguments.length ? (h = typeof n == "function" ? n : B(+n), i) : h;
|
|
67
|
-
}, i.cornerRadius = function(n) {
|
|
68
|
-
return arguments.length ? (I = typeof n == "function" ? n : B(+n), i) : I;
|
|
69
|
-
}, i.padRadius = function(n) {
|
|
70
|
-
return arguments.length ? (D = n == null ? null : typeof n == "function" ? n : B(+n), i) : D;
|
|
71
|
-
}, i.startAngle = function(n) {
|
|
72
|
-
return arguments.length ? (v = typeof n == "function" ? n : B(+n), i) : v;
|
|
73
|
-
}, i.endAngle = function(n) {
|
|
74
|
-
return arguments.length ? (A = typeof n == "function" ? n : B(+n), i) : A;
|
|
75
|
-
}, i.padAngle = function(n) {
|
|
76
|
-
return arguments.length ? (C = typeof n == "function" ? n : B(+n), i) : C;
|
|
77
|
-
}, i.context = function(n) {
|
|
78
|
-
return arguments.length ? (a = n ?? null, i) : a;
|
|
79
|
-
}, i;
|
|
80
|
-
}
|
|
81
|
-
export {
|
|
82
|
-
hn as d
|
|
83
|
-
};
|
package/dist/arc-R701-DfQ.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const n=require("./cowboy-components-BDlH5KPd.cjs");function Z(o){return o.innerRadius}function $(o){return o.outerRadius}function k(o){return o.startAngle}function _(o){return o.endAngle}function nn(o){return o&&o.padAngle}function en(o,x,C,P,h,v,S,s){var D=C-o,r=P-x,e=S-h,y=s-v,i=y*D-e*r;if(!(i*i<n.epsilon))return i=(e*(x-v)-y*(o-h))/i,[o+i*D,x+i*r]}function L(o,x,C,P,h,v,S){var s=o-C,D=x-P,r=(S?v:-v)/n.sqrt(s*s+D*D),e=r*D,y=-r*s,i=o+e,u=x+y,c=C+e,f=P+y,b=(i+c)/2,l=(u+f)/2,g=c-i,p=f-u,A=g*g+p*p,R=h-v,T=i*f-c*u,E=(p<0?-1:1)*n.sqrt(n.max(0,R*R*A-T*T)),I=(T*p-g*E)/A,O=(-T*g-p*E)/A,q=(T*p+g*E)/A,m=(-T*g+p*E)/A,d=I-b,a=O-l,t=q-b,j=m-l;return d*d+a*a>t*t+j*j&&(I=q,O=m),{cx:I,cy:O,x01:-e,y01:-y,x11:I*(h/R-1),y11:O*(h/R-1)}}function an(){var o=Z,x=$,C=n.constant(0),P=null,h=k,v=_,S=nn,s=null,D=n.withPath(r);function r(){var e,y,i=+o.apply(this,arguments),u=+x.apply(this,arguments),c=h.apply(this,arguments)-n.halfPi,f=v.apply(this,arguments)-n.halfPi,b=n.abs(f-c),l=f>c;if(s||(s=e=D()),u<i&&(y=u,u=i,i=y),!(u>n.epsilon))s.moveTo(0,0);else if(b>n.tau-n.epsilon)s.moveTo(u*n.cos(c),u*n.sin(c)),s.arc(0,0,u,c,f,!l),i>n.epsilon&&(s.moveTo(i*n.cos(f),i*n.sin(f)),s.arc(0,0,i,f,c,l));else{var g=c,p=f,A=c,R=f,T=b,E=b,I=S.apply(this,arguments)/2,O=I>n.epsilon&&(P?+P.apply(this,arguments):n.sqrt(i*i+u*u)),q=n.min(n.abs(u-i)/2,+C.apply(this,arguments)),m=q,d=q,a,t;if(O>n.epsilon){var j=n.asin(O/i*n.sin(I)),F=n.asin(O/u*n.sin(I));(T-=j*2)>n.epsilon?(j*=l?1:-1,A+=j,R-=j):(T=0,A=R=(c+f)/2),(E-=F*2)>n.epsilon?(F*=l?1:-1,g+=F,p-=F):(E=0,g=p=(c+f)/2)}var z=u*n.cos(g),B=u*n.sin(g),G=i*n.cos(R),H=i*n.sin(R);if(q>n.epsilon){var J=u*n.cos(p),K=u*n.sin(p),M=i*n.cos(A),N=i*n.sin(A),w;if(b<n.pi)if(w=en(z,B,M,N,J,K,G,H)){var Q=z-w[0],U=B-w[1],V=J-w[0],W=K-w[1],X=1/n.sin(n.acos((Q*V+U*W)/(n.sqrt(Q*Q+U*U)*n.sqrt(V*V+W*W)))/2),Y=n.sqrt(w[0]*w[0]+w[1]*w[1]);m=n.min(q,(i-Y)/(X-1)),d=n.min(q,(u-Y)/(X+1))}else m=d=0}E>n.epsilon?d>n.epsilon?(a=L(M,N,z,B,u,d,l),t=L(J,K,G,H,u,d,l),s.moveTo(a.cx+a.x01,a.cy+a.y01),d<q?s.arc(a.cx,a.cy,d,n.atan2(a.y01,a.x01),n.atan2(t.y01,t.x01),!l):(s.arc(a.cx,a.cy,d,n.atan2(a.y01,a.x01),n.atan2(a.y11,a.x11),!l),s.arc(0,0,u,n.atan2(a.cy+a.y11,a.cx+a.x11),n.atan2(t.cy+t.y11,t.cx+t.x11),!l),s.arc(t.cx,t.cy,d,n.atan2(t.y11,t.x11),n.atan2(t.y01,t.x01),!l))):(s.moveTo(z,B),s.arc(0,0,u,g,p,!l)):s.moveTo(z,B),!(i>n.epsilon)||!(T>n.epsilon)?s.lineTo(G,H):m>n.epsilon?(a=L(G,H,J,K,i,-m,l),t=L(z,B,M,N,i,-m,l),s.lineTo(a.cx+a.x01,a.cy+a.y01),m<q?s.arc(a.cx,a.cy,m,n.atan2(a.y01,a.x01),n.atan2(t.y01,t.x01),!l):(s.arc(a.cx,a.cy,m,n.atan2(a.y01,a.x01),n.atan2(a.y11,a.x11),!l),s.arc(0,0,i,n.atan2(a.cy+a.y11,a.cx+a.x11),n.atan2(t.cy+t.y11,t.cx+t.x11),l),s.arc(t.cx,t.cy,m,n.atan2(t.y11,t.x11),n.atan2(t.y01,t.x01),!l))):s.arc(0,0,i,R,A,l)}if(s.closePath(),e)return s=null,e+""||null}return r.centroid=function(){var e=(+o.apply(this,arguments)+ +x.apply(this,arguments))/2,y=(+h.apply(this,arguments)+ +v.apply(this,arguments))/2-n.pi/2;return[n.cos(y)*e,n.sin(y)*e]},r.innerRadius=function(e){return arguments.length?(o=typeof e=="function"?e:n.constant(+e),r):o},r.outerRadius=function(e){return arguments.length?(x=typeof e=="function"?e:n.constant(+e),r):x},r.cornerRadius=function(e){return arguments.length?(C=typeof e=="function"?e:n.constant(+e),r):C},r.padRadius=function(e){return arguments.length?(P=e==null?null:typeof e=="function"?e:n.constant(+e),r):P},r.startAngle=function(e){return arguments.length?(h=typeof e=="function"?e:n.constant(+e),r):h},r.endAngle=function(e){return arguments.length?(v=typeof e=="function"?e:n.constant(+e),r):v},r.padAngle=function(e){return arguments.length?(S=typeof e=="function"?e:n.constant(+e),r):S},r.context=function(e){return arguments.length?(s=e??null,r):s},r}exports.d3arc=an;
|