@orangelogic/design-system 2.162.0 → 2.164.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/library/chunks/{AxisLabelRadial.lE2gKah-.js → AxisLabelRadial.fe7zjixN.js} +1 -1
- package/library/chunks/{BaseColumnSeries.B57B3iHh.js → BaseColumnSeries.8Mpxz385.js} +1 -1
- package/library/chunks/{CandlestickSeries.CmmI426l.js → CandlestickSeries.DuadaOTa.js} +19 -19
- package/library/chunks/{Circle.DAhHYhrc.js → Circle.6LomW0ej.js} +1 -1
- package/library/chunks/{ColumnSeries.DBgXk-b4.js → ColumnSeries.D1NLfRh5.js} +2 -2
- package/library/chunks/{EditableAxisLabel.C6H99qiS.js → EditableAxisLabel.Bi9vxLDV.js} +2 -2
- package/library/chunks/{EditableLabel.B7HB7Cu4.js → EditableLabel.CMR3O9E-.js} +1 -1
- package/library/chunks/{Gradient.DHhBnhFd.js → Gradient.CquE8_a4.js} +1 -1
- package/library/chunks/{LinearGradient.CGx00O8B.js → LinearGradient.CVN1VJp-.js} +9 -9
- package/library/chunks/{Picture.DYltTVSo.js → Picture.BYTZ_I8g.js} +1 -1
- package/library/chunks/{Polygon.BCrxKagx.js → Polygon.CU2sMltE.js} +1 -1
- package/library/chunks/{ProgressPie.CXksPJFv.js → ProgressPie.Dd74dbmm.js} +6 -6
- package/library/chunks/{RadialLabel.BYH69FGU.js → RadialLabel.7ka6ND-t.js} +1 -1
- package/library/chunks/{Scrollbar.DEv50o4R.js → Scrollbar.DqUnZReo.js} +1 -1
- package/library/chunks/Slice.BVI8rfHI.js +34 -0
- package/library/chunks/{Slider.BX8g2iGv.js → Slider.DtjYaJOw.js} +1 -1
- package/library/chunks/{SpriteResizer.CfIBMSp3.js → SpriteResizer.Ci2Wt2YJ.js} +11 -11
- package/library/chunks/{Triangle.CNY8-QfL.js → Triangle.C75emy3D.js} +1 -1
- package/library/chunks/{ZoomTools.6jZrzA7x.js → ZoomTools.CA9mtHI8.js} +2 -2
- package/library/chunks/_arrayEach.DU4X1H_a.js +8 -0
- package/library/chunks/_baseClone.BHNjfIdS.js +215 -0
- package/library/chunks/_baseEach.DQk0As2f.js +32 -0
- package/library/chunks/{_baseIteratee.BdKyHJ5i.js → _baseIteratee.sC2wLi2m.js} +3 -2
- package/library/chunks/{_baseUniq.je-HWbb3.js → _baseUniq.lwMgmtt2.js} +16 -15
- package/library/chunks/_baseXor.DixEm6JQ.js +35 -0
- package/library/chunks/_flatRest.D3ZVApI5.js +30 -0
- package/library/chunks/abnfDiagram-VRR7QNED.DKqYa5p7.js +89 -0
- package/library/chunks/{am-chart.CqdmTS0P.js → am-chart.Cr-vMjcY.js} +1577 -1727
- package/library/chunks/{animation.S74lUDDc.js → animation.BD-1xugN.js} +1 -1
- package/library/chunks/arc.xqNd6x9S.js +84 -0
- package/library/chunks/architectureDiagram-ZJ3FMSHR.CBIOk9Kp.js +4757 -0
- package/library/chunks/{asset-link-format.DLAzKfhk.js → asset-link-format.0q_MQOYh.js} +691 -635
- package/library/chunks/asset-link-format.ClaYu_v8.js +7 -0
- package/library/chunks/blockDiagram-677ZJIJ3.CeQxLPwj.js +2428 -0
- package/library/chunks/{button.8syoJXYs.js → button.DGyqdBou.js} +2 -2
- package/library/chunks/c4Diagram-LMCZKHZV.B73xdpNh.js +1580 -0
- package/library/chunks/{capitalize.BTYI3NfM.js → capitalize.CIBKBL10.js} +1 -1
- package/library/chunks/{cardinal.BCA_LB0u.js → cardinal.BXTAeOLk.js} +1 -0
- package/library/chunks/cardinalClosed.Mdce1x5M.js +59 -0
- package/library/chunks/channel.s_XjcUYI.js +5 -0
- package/library/chunks/chunk-2Q5K7J3B.Dy1Z-bMH.js +15 -0
- package/library/chunks/chunk-32BRIVSS.BbIrVi3j.js +71 -0
- package/library/chunks/chunk-5VM5RSS4.D0-lddDM.js +19 -0
- package/library/chunks/chunk-EX3LRPZG.L693y8d4.js +1412 -0
- package/library/chunks/chunk-JWPE2WC7.BV0i4LDu.js +8 -0
- package/library/chunks/chunk-MOJQB5TN.BZstBMYC.js +664 -0
- package/library/chunks/chunk-RYQCIY6F.BMsuG7ya.js +314 -0
- package/library/chunks/chunk-V7JOEXUC.DcJlyQO0.js +1537 -0
- package/library/chunks/chunk-VR4S4FIN.BpryBs7q.js +19 -0
- package/library/chunks/chunk-XXDRQBXY.CSOjab1V.js +11 -0
- package/library/chunks/classDiagram-OUVF2IWQ.Dvz7CNwe.js +18 -0
- package/library/chunks/classDiagram-v2-EOCWNBFH.Dvz7CNwe.js +18 -0
- package/library/chunks/cloneDeep.B-5z5SI3.js +51 -0
- package/library/chunks/{color-swatch-group.CLv1LSZy.js → color-swatch-group.ChP9amU9.js} +2576 -2723
- package/library/chunks/{color-swatch.DsWP2fd-.js → color-swatch.QsHoy_K1.js} +1 -1
- package/library/chunks/{colorPicker.GYgA76kc.js → colorPicker.Cg6Zxf8f.js} +5 -5
- package/library/chunks/{confirm-popover.C-eHPJaU.js → confirm-popover.D8mdy6KG.js} +2 -2
- package/library/chunks/constant.BQ4UJ-kW.js +12 -0
- package/library/chunks/cose-bilkent-JH36ORCC.cfzS2XsK.js +2612 -0
- package/library/chunks/cynefin-VYW2F7L2.c7H5z9nQ.js +23790 -0
- package/library/chunks/cynefinDiagram-TSTJHNR4.C8SgNXWI.js +299 -0
- package/library/chunks/cytoscape.esm.Cbrwqewp.js +18786 -0
- package/library/chunks/dagre-VKFMJZFB.D5B1cAri.js +343 -0
- package/library/chunks/debounce.Bv1rtE8D.js +55 -0
- package/library/chunks/defaultLocale.CPy_WVtp.js +171 -0
- package/library/chunks/descending.AD5n-tFs.js +10 -0
- package/library/chunks/diagram-FQU43EPY.DJukDcLl.js +466 -0
- package/library/chunks/diagram-G47NLZAW.BBOvcbcR.js +316 -0
- package/library/chunks/diagram-NH7WQ7WH.DOpRwmC2.js +142 -0
- package/library/chunks/diagram-OA4YK3LP.Dm5WJs91.js +350 -0
- package/library/chunks/diagram-WEI45ONY.COuzdmSR.js +217 -0
- package/library/chunks/{dialog.Bzf4-IgH.js → dialog.05FgdLBZ.js} +2 -2
- package/library/chunks/{document-viewer.CGyOG1yw.js → document-viewer.Cng07M-1.js} +7 -7
- package/library/chunks/{dot-pagination.BdZc-K0r.js → dot-pagination.Pg9O0nIh.js} +1 -1
- package/library/chunks/ebnfDiagram-CCIWWBDH.Dz-QBH6Y.js +111 -0
- package/library/chunks/erDiagram-Q63AITRT.sSw_w-2B.js +913 -0
- package/library/chunks/{exporting.DQhKH1BX.js → exporting.Djsoh75g.js} +11 -11
- package/library/chunks/flow.aZRVH3p1.js +1304 -0
- package/library/chunks/flowDiagram-23GEKE2U.CMMbuUHf.js +1642 -0
- package/library/chunks/{folder-select.BKAuh4GE.js → folder-select.Dw1ZKZAq.js} +160 -140
- package/library/chunks/{gantt.tu-w6fQ5.js → gantt.Bv6_3H9y.js} +22 -22
- package/library/chunks/ganttDiagram-NO4QXBWP.DZdwd0O4.js +2715 -0
- package/library/chunks/gitGraphDiagram-IHSO6WYX.F6mwS3uS.js +818 -0
- package/library/chunks/graph.XHMI5hta.js +653 -0
- package/library/chunks/{header.e1FLwywx.js → header.DDI0MfJA.js} +1 -1
- package/library/chunks/{hierarchy.CTnBzzmQ.js → hierarchy.C4LxmFxx.js} +836 -904
- package/library/chunks/{hub-connection.CA_wS_wh.js → hub-connection.BtevPWYb.js} +1 -1
- package/library/chunks/{icon-button.DbVIFgu7.js → icon-button.BwmMJ0bI.js} +1 -1
- package/library/chunks/{icon.mxNZ85k0.js → icon.D5iM9wXS.js} +1 -1
- package/library/chunks/{iframe.DcHjOcLG.js → iframe.Cc-xZIm_.js} +1 -1
- package/library/chunks/{image.5mhGPvMN.js → image.BgODrAzQ.js} +2 -2
- package/library/chunks/{image.QVlPFadX.js → image.Y5c_hFx8.js} +1 -1
- package/library/chunks/{index.BVDhdCk-.js → index.2SOQHTpX.js} +23 -23
- package/library/chunks/index.BDn1QW8J.js +167 -0
- package/library/chunks/{index.DcjJFMlq.js → index.CrhRU5m8.js} +284 -273
- package/library/chunks/index.thKLME8E.js +77 -0
- package/library/chunks/infoDiagram-FWYZ7A6U.BnktKL7i.js +24 -0
- package/library/chunks/init.DjUOC4st.js +16 -0
- package/library/chunks/{input.BcyLZUmv.js → input.DOorVTYZ.js} +2 -2
- package/library/chunks/isArrayLikeObject.D7afXo-f.js +86 -0
- package/library/chunks/isEmpty.DtTJTUcf.js +27 -0
- package/library/chunks/ishikawaDiagram-FXEZZL3T.CFp-9Kes.js +621 -0
- package/library/chunks/journeyDiagram-5HDEW3XC.BxO1aPu_.js +837 -0
- package/library/chunks/{json.D7WeFaJm.js → json.Dz5QFEi5.js} +3 -3
- package/library/chunks/kanban-definition-HUTT4EX6.Bk8vmLFK.js +724 -0
- package/library/chunks/katex.DoRnZ_sp.js +11682 -0
- package/library/chunks/layout.DZcMFKol.js +1446 -0
- package/library/chunks/line.DP-iSN_J.js +157 -0
- package/library/chunks/linear.TNHhsH1m.js +215 -0
- package/library/chunks/{map.BjtxEozr.js → map.CBcV0WVq.js} +100 -105
- package/library/chunks/map.DJnohTgl.js +18 -0
- package/library/chunks/markdown.I1AJG75v.js +4180 -0
- package/library/chunks/math.D2lKC7md.js +22 -0
- package/library/chunks/mermaid.core.Dspbw7Ig.js +13598 -0
- package/library/chunks/mindmap-definition-LN4V7U3C.DuCBBYwE.js +808 -0
- package/library/chunks/{number.CtCaI0T_.js → number.Cx2ncfJJ.js} +2 -2
- package/library/chunks/{option.qN3aaqVI.js → option.DyNR1vzy.js} +2 -2
- package/library/chunks/ordinal.bqVaUip-.js +61 -0
- package/library/chunks/{pagination.Cupa46TN.js → pagination.qFmncShC.js} +5 -5
- package/library/chunks/pegDiagram-2B236MQR.DQrkEdJr.js +97 -0
- package/library/chunks/{percent.D_CkaRGb.js → percent.D8mkiJ2G.js} +17 -17
- package/library/chunks/pieDiagram-ENE6RG2P.B6nPW8Pj.js +212 -0
- package/library/chunks/position-picker.DjnhxIKF.js +4 -0
- package/library/chunks/quadrantDiagram-ABIIQ3AL.BFy9moxz.js +1026 -0
- package/library/chunks/{radar.BMKaNvJH.js → radar.B3p5bRix.js} +78 -129
- package/library/chunks/railroadDiagram-RFXS5EU6.CSao8YZX.js +79 -0
- package/library/chunks/range.DdOGybNB.js +9 -0
- package/library/chunks/requirementDiagram-TGXJPOKE.CjpliZnF.js +882 -0
- package/library/chunks/sankey.BR94A-8L.js +294 -0
- package/library/chunks/sankeyDiagram-HTMAVEWB.D8aAxVGe.js +564 -0
- package/library/chunks/select.C6_sM3Pr.js +7 -0
- package/library/chunks/sequenceDiagram-DBY2YBRQ.Cu9MV3h-.js +2891 -0
- package/library/chunks/sizeCapture-X5ZJPWSS.BDByEFcW.js +46 -0
- package/library/chunks/{sliceGrouper.C-t5ZRrz.js → sliceGrouper.CcRqQhZX.js} +1 -1
- package/library/chunks/stateDiagram-2N3HPSRC.DvrAW9Ck.js +267 -0
- package/library/chunks/stateDiagram-v2-6OUMAXLB.CFfuaFM1.js +18 -0
- package/library/chunks/step.almIqwJ6.js +51 -0
- package/library/chunks/{stock.vF_pji1F.js → stock.CQbn6zW4.js} +9 -9
- package/library/chunks/swimlanes-5IMT3BWC.AtMD47q7.js +5332 -0
- package/library/chunks/swimlanesDiagram-G3AALYLV.26A1eX7s.js +15 -0
- package/library/chunks/{tab-group.kSg5_10g.js → tab-group.1Y71_aN8.js} +3 -3
- package/library/chunks/{time.DWfbnPnM.js → time.DYWuX2id.js} +1 -1
- package/library/chunks/timeline-definition-FHXFAJF6.CYSh6xl5.js +1058 -0
- package/library/chunks/{timeline.gWu0up6r.js → timeline.Czz_uBEd.js} +33 -32
- package/library/chunks/toNumber.MuDz8DgU.js +31 -0
- package/library/chunks/{toString.Dcbz5jVT.js → toString.B1zKIiZc.js} +1 -1
- package/library/chunks/{toast.TDU3wVhq.js → toast.CXEAfCvN.js} +1 -1
- package/library/chunks/transformation.8uLv6uwG.js +264 -0
- package/library/chunks/{tree.C2dPd6gt.js → tree.vn5sHbdt.js} +123 -117
- package/library/chunks/value.BXEGBVFV.js +44 -0
- package/library/chunks/{venn.BVBe-JXs.js → venn.B5Jl-c4i.js} +2 -2
- package/library/chunks/vennDiagram-L72KCM5P.CSk1WWlu.js +1581 -0
- package/library/chunks/wardleyDiagram-EHGQE667.C7UzXYG7.js +675 -0
- package/library/chunks/{watch.DOt4Mabe.js → watch.DJF5K-8U.js} +27 -27
- package/library/chunks/{wc.DTNpfIc1.js → wc.B2THb2Kk.js} +18 -18
- package/library/chunks/xy.BO6U5QrZ.js +294 -0
- package/library/chunks/xychartDiagram-FW5EYKEG.idiZWvYS.js +1383 -0
- package/library/components/alert.js +2 -2
- package/library/components/am-chart.js +3 -3
- package/library/components/animated-image.js +2 -2
- package/library/components/animation.js +2 -2
- package/library/components/array-line-clamp.js +1 -1
- package/library/components/asset-link-format.js +8 -7
- package/library/components/atoms.js +29 -29
- package/library/components/audio.js +3 -3
- package/library/components/avatar.js +2 -2
- package/library/components/border-input-group.js +1 -1
- package/library/components/breadcrumb-item.js +1 -1
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +3 -3
- package/library/components/checkbox.js +195 -18
- package/library/components/color-picker.js +4 -4
- package/library/components/color-swatch-group.js +5 -5
- package/library/components/color-swatch.js +2 -2
- package/library/components/confirm-popover.js +3 -3
- package/library/components/copy-button.js +2 -2
- package/library/components/corner-position-input-group.js +2 -2
- package/library/components/cropper.js +4 -4
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +2 -2
- package/library/components/dialog.js +3 -3
- package/library/components/diff.js +1 -1
- package/library/components/divider.js +1 -1
- package/library/components/document-viewer.js +3 -3
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +3 -3
- package/library/components/dropdown.js +2 -2
- package/library/components/dynamic-select.js +6 -6
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +350 -374
- package/library/components/folder-select.js +5 -5
- package/library/components/format-time.js +2 -2
- package/library/components/grid-item.js +1 -1
- package/library/components/header.js +2 -2
- package/library/components/hub-connection.js +2 -2
- package/library/components/icon-button.js +2 -2
- package/library/components/icon.js +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +2 -2
- package/library/components/image.js +3 -3
- package/library/components/include.js +1 -1
- package/library/components/input.js +3 -3
- package/library/components/line-clamp.js +1 -1
- package/library/components/markdown.js +11 -2704
- package/library/components/masonry.js +76 -73
- package/library/components/menu-item.js +2 -2
- package/library/components/molecules.js +3 -3
- package/library/components/mutation-observer.js +1 -1
- package/library/components/option.js +3 -3
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +6 -6
- package/library/components/position-picker.js +25 -25
- package/library/components/qr-code.js +1 -1
- package/library/components/radio-button.js +1 -1
- package/library/components/radio-card.js +1 -1
- package/library/components/radio-group.js +1 -1
- package/library/components/radio.js +2 -2
- package/library/components/range.js +1 -1
- package/library/components/rating.js +2 -2
- package/library/components/resize-observer.js +1 -1
- package/library/components/select.js +3 -3
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +2 -2
- package/library/components/sidebar.js +3 -3
- package/library/components/size-input-group.js +3 -3
- package/library/components/split-panel.js +1 -1
- package/library/components/step.js +1 -1
- package/library/components/stepper-wizard.js +1 -1
- package/library/components/stepper.js +1 -1
- package/library/components/switch.js +1 -1
- package/library/components/tab-group.js +4 -4
- package/library/components/tab-panel.js +1 -1
- package/library/components/tab.js +2 -2
- package/library/components/tag.js +1 -1
- package/library/components/textarea.js +1 -1
- package/library/components/timecode.js +1 -1
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +4 -4
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +122327 -120686
- package/library/components/video.js +2 -2
- package/library/package.json +2 -1
- package/library/packages/atoms/src/components/markdown/markdown.d.ts +41 -1
- package/library/packages/atoms/src/components/markdown/parser.d.ts +18 -3
- package/library/packages/atoms/src/components/markdown/styles.d.ts +17 -0
- package/library/packages/atoms/src/components/tree/tree.d.ts +7 -1
- package/library/packages/atoms/src/components/tree-item/tree-item.d.ts +11 -1
- package/library/packages/events/src/cx-folder-select-loading-change.d.ts +8 -0
- package/library/packages/events/src/events.d.ts +1 -0
- package/library/packages/hybrid/table-core/src/table/styles/table-frozen.styles.d.ts +8 -0
- package/library/packages/hybrid/table-core/src/table/table.d.ts +9 -1
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/FrozenColumns/FrozenColumns.d.ts +14 -1
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/ResizeColumns/ResizeColumns.d.ts +18 -1
- package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +7 -0
- package/library/packages/molecules/src/folder-select/folder-select.d.ts +7 -0
- package/library/packages/molecules/src/index.d.ts +1 -0
- package/library/packages/molecules/src/markdown-viewer/markdown-viewer.d.ts +124 -0
- package/library/packages/molecules/src/markdown-viewer/markdown-viewer.styles.d.ts +6 -0
- package/library/packages/molecules/src/masonry/masonry.d.ts +5 -0
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +9 -0
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-crop/asset-link-format-crop.d.ts +30 -0
- package/library/packages/tools/src/tiptap/utils/md/editor-controller.d.ts +57 -0
- package/library/packages/tools/src/tiptap/utils/md/from-markdown.d.ts +11 -0
- package/library/packages/tools/src/tiptap/utils/md/input-rules.d.ts +15 -0
- package/library/packages/tools/src/tiptap/utils/md/schema.d.ts +13 -0
- package/library/packages/tools/src/tiptap/utils/md/to-markdown.d.ts +14 -0
- package/library/packages/types/src/asset-link-format.d.ts +19 -0
- package/library/packages/types/src/markdown-viewer.d.ts +12 -0
- package/library/packages/types/src/tree-item.d.ts +12 -0
- package/library/react-web-component.d.ts +86 -8
- package/library/utils.js +64 -65
- package/package.json +2 -1
- package/library/chunks/Slice.C5lVu2g_.js +0 -120
- package/library/chunks/_baseXor.VohG8cOH.js +0 -116
- package/library/chunks/asset-link-format.QzzboHHE.js +0 -6
- package/library/chunks/checkbox.3i2j3PHc.js +0 -198
- package/library/chunks/content-builder.BU8X7I6V.js +0 -60
- package/library/chunks/debounce.C_J-9zJi.js +0 -82
- package/library/chunks/flow.hz0UDjCb.js +0 -1594
- package/library/chunks/index.DU0XUO4k.js +0 -176
- package/library/chunks/transformation.D1alV_s4.js +0 -189
- package/library/chunks/xy.BNgyrwGD.js +0 -333
|
@@ -0,0 +1,1383 @@
|
|
|
1
|
+
import { _ as n, s as xi, g as di, o as Yt, n as fi, a as pi, b as mi, l as Nt, E as yi, d as bi, p as Ai, y as kt, A as Ht, B as wi, F as Ci, h as Si, ak as Ri } from "./mermaid.core.Dspbw7Ig.js";
|
|
2
|
+
import "./index.CrhRU5m8.js";
|
|
3
|
+
import "./transform.BuqENXeT.js";
|
|
4
|
+
import { i as _i } from "./init.DjUOC4st.js";
|
|
5
|
+
import { o as ki } from "./ordinal.bqVaUip-.js";
|
|
6
|
+
import { r as Ti } from "./range.DdOGybNB.js";
|
|
7
|
+
import { l as Ot } from "./linear.TNHhsH1m.js";
|
|
8
|
+
import { l as Wt } from "./line.DP-iSN_J.js";
|
|
9
|
+
function wt() {
|
|
10
|
+
var e = ki().unknown(void 0), t = e.domain, i = e.range, s = 0, a = 1, o, l, f = !1, d = 0, k = 0, T = 0.5;
|
|
11
|
+
delete e.unknown;
|
|
12
|
+
function _() {
|
|
13
|
+
var b = t().length, E = a < s, L = E ? a : s, P = E ? s : a;
|
|
14
|
+
o = (P - L) / Math.max(1, b - d + k * 2), f && (o = Math.floor(o)), L += (P - L - o * (b - d)) * T, l = o * (1 - d), f && (L = Math.round(L), l = Math.round(l));
|
|
15
|
+
var I = Ti(b).map(function(m) {
|
|
16
|
+
return L + o * m;
|
|
17
|
+
});
|
|
18
|
+
return i(E ? I.reverse() : I);
|
|
19
|
+
}
|
|
20
|
+
return e.domain = function(b) {
|
|
21
|
+
return arguments.length ? (t(b), _()) : t();
|
|
22
|
+
}, e.range = function(b) {
|
|
23
|
+
return arguments.length ? ([s, a] = b, s = +s, a = +a, _()) : [s, a];
|
|
24
|
+
}, e.rangeRound = function(b) {
|
|
25
|
+
return [s, a] = b, s = +s, a = +a, f = !0, _();
|
|
26
|
+
}, e.bandwidth = function() {
|
|
27
|
+
return l;
|
|
28
|
+
}, e.step = function() {
|
|
29
|
+
return o;
|
|
30
|
+
}, e.round = function(b) {
|
|
31
|
+
return arguments.length ? (f = !!b, _()) : f;
|
|
32
|
+
}, e.padding = function(b) {
|
|
33
|
+
return arguments.length ? (d = Math.min(1, k = +b), _()) : d;
|
|
34
|
+
}, e.paddingInner = function(b) {
|
|
35
|
+
return arguments.length ? (d = Math.min(1, b), _()) : d;
|
|
36
|
+
}, e.paddingOuter = function(b) {
|
|
37
|
+
return arguments.length ? (k = +b, _()) : k;
|
|
38
|
+
}, e.align = function(b) {
|
|
39
|
+
return arguments.length ? (T = Math.max(0, Math.min(1, b)), _()) : T;
|
|
40
|
+
}, e.copy = function() {
|
|
41
|
+
return wt(t(), [s, a]).round(f).paddingInner(d).paddingOuter(k).align(T);
|
|
42
|
+
}, _i.apply(_(), arguments);
|
|
43
|
+
}
|
|
44
|
+
var Ct = function() {
|
|
45
|
+
var e = /* @__PURE__ */ n(function(F, h, u, g) {
|
|
46
|
+
for (u = u || {}, g = F.length; g--; u[F[g]] = h) ;
|
|
47
|
+
return u;
|
|
48
|
+
}, "o"), t = [1, 10, 12, 14, 16, 18, 19, 21, 23], i = [2, 6], s = [1, 3], a = [1, 5], o = [1, 6], l = [1, 7], f = [1, 5, 10, 12, 14, 16, 18, 19, 21, 23, 36, 37, 38], d = [1, 25], k = [1, 26], T = [1, 28], _ = [1, 29], b = [1, 30], E = [1, 31], L = [1, 32], P = [1, 33], I = [1, 34], m = [1, 35], D = [1, 36], c = [1, 37], B = [1, 43], W = [1, 42], X = [1, 47], Y = [1, 50], S = [1, 10, 12, 14, 16, 18, 19, 21, 23, 36, 37, 38], H = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 28, 29, 36, 37, 38], A = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 28, 29, 36, 37, 38, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], w = [1, 65], V = [26, 28], R = {
|
|
49
|
+
trace: /* @__PURE__ */ n(function() {
|
|
50
|
+
}, "trace"),
|
|
51
|
+
yy: {},
|
|
52
|
+
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, dataPoints: 25, SQUARE_BRACES_END: 26, dataPoint: 27, COMMA: 28, NUMBER_WITH_DECIMAL: 29, STR: 30, xAxisData: 31, bandData: 32, ARROW_DELIMITER: 33, commaSeparatedTexts: 34, yAxisData: 35, NEWLINE: 36, SEMI: 37, EOF: 38, alphaNum: 39, MD_STR: 40, alphaNumToken: 41, AMP: 42, NUM: 43, ALPHA: 44, PLUS: 45, EQUALS: 46, MULT: 47, DOT: 48, BRKT: 49, MINUS: 50, UNDERSCORE: 51, $accept: 0, $end: 1 },
|
|
53
|
+
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", 28: "COMMA", 29: "NUMBER_WITH_DECIMAL", 30: "STR", 33: "ARROW_DELIMITER", 36: "NEWLINE", 37: "SEMI", 38: "EOF", 40: "MD_STR", 42: "AMP", 43: "NUM", 44: "ALPHA", 45: "PLUS", 46: "EQUALS", 47: "MULT", 48: "DOT", 49: "BRKT", 50: "MINUS", 51: "UNDERSCORE" },
|
|
54
|
+
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], [27, 2], [27, 1], [13, 1], [13, 2], [13, 1], [31, 1], [31, 3], [32, 3], [34, 3], [34, 1], [15, 1], [15, 2], [15, 1], [35, 3], [4, 1], [4, 1], [4, 1], [11, 1], [11, 1], [11, 1], [39, 1], [39, 2], [41, 1], [41, 1], [41, 1], [41, 1], [41, 1], [41, 1], [41, 1], [41, 1], [41, 1], [41, 1]],
|
|
55
|
+
performAction: /* @__PURE__ */ n(function(h, u, g, x, C, r, rt) {
|
|
56
|
+
var p = r.length - 1;
|
|
57
|
+
switch (C) {
|
|
58
|
+
case 5:
|
|
59
|
+
x.setOrientation(r[p]);
|
|
60
|
+
break;
|
|
61
|
+
case 9:
|
|
62
|
+
x.setDiagramTitle(r[p].text.trim());
|
|
63
|
+
break;
|
|
64
|
+
case 12:
|
|
65
|
+
x.setLineData({ text: "", type: "text" }, r[p]);
|
|
66
|
+
break;
|
|
67
|
+
case 13:
|
|
68
|
+
x.setLineData(r[p - 1], r[p]);
|
|
69
|
+
break;
|
|
70
|
+
case 14:
|
|
71
|
+
x.setBarData({ text: "", type: "text" }, r[p]);
|
|
72
|
+
break;
|
|
73
|
+
case 15:
|
|
74
|
+
x.setBarData(r[p - 1], r[p]);
|
|
75
|
+
break;
|
|
76
|
+
case 16:
|
|
77
|
+
this.$ = r[p].trim(), x.setAccTitle(this.$);
|
|
78
|
+
break;
|
|
79
|
+
case 17:
|
|
80
|
+
case 18:
|
|
81
|
+
this.$ = r[p].trim(), x.setAccDescription(this.$);
|
|
82
|
+
break;
|
|
83
|
+
case 19:
|
|
84
|
+
this.$ = r[p - 1];
|
|
85
|
+
break;
|
|
86
|
+
case 20:
|
|
87
|
+
case 30:
|
|
88
|
+
this.$ = [r[p - 2], ...r[p]];
|
|
89
|
+
break;
|
|
90
|
+
case 21:
|
|
91
|
+
case 31:
|
|
92
|
+
this.$ = [r[p]];
|
|
93
|
+
break;
|
|
94
|
+
case 22:
|
|
95
|
+
this.$ = { value: Number(r[p - 1]), label: r[p] };
|
|
96
|
+
break;
|
|
97
|
+
case 23:
|
|
98
|
+
this.$ = { value: Number(r[p]), label: "" };
|
|
99
|
+
break;
|
|
100
|
+
case 24:
|
|
101
|
+
x.setXAxisTitle(r[p]);
|
|
102
|
+
break;
|
|
103
|
+
case 25:
|
|
104
|
+
x.setXAxisTitle(r[p - 1]);
|
|
105
|
+
break;
|
|
106
|
+
case 26:
|
|
107
|
+
x.setXAxisTitle({ type: "text", text: "" });
|
|
108
|
+
break;
|
|
109
|
+
case 27:
|
|
110
|
+
x.setXAxisBand(r[p]);
|
|
111
|
+
break;
|
|
112
|
+
case 28:
|
|
113
|
+
x.setXAxisRangeData(Number(r[p - 2]), Number(r[p]));
|
|
114
|
+
break;
|
|
115
|
+
case 29:
|
|
116
|
+
this.$ = r[p - 1];
|
|
117
|
+
break;
|
|
118
|
+
case 32:
|
|
119
|
+
x.setYAxisTitle(r[p]);
|
|
120
|
+
break;
|
|
121
|
+
case 33:
|
|
122
|
+
x.setYAxisTitle(r[p - 1]);
|
|
123
|
+
break;
|
|
124
|
+
case 34:
|
|
125
|
+
x.setYAxisTitle({ type: "text", text: "" });
|
|
126
|
+
break;
|
|
127
|
+
case 35:
|
|
128
|
+
x.setYAxisRangeData(Number(r[p - 2]), Number(r[p]));
|
|
129
|
+
break;
|
|
130
|
+
case 39:
|
|
131
|
+
this.$ = { text: r[p], type: "text" };
|
|
132
|
+
break;
|
|
133
|
+
case 40:
|
|
134
|
+
this.$ = { text: r[p], type: "text" };
|
|
135
|
+
break;
|
|
136
|
+
case 41:
|
|
137
|
+
this.$ = { text: r[p], type: "markdown" };
|
|
138
|
+
break;
|
|
139
|
+
case 42:
|
|
140
|
+
this.$ = r[p];
|
|
141
|
+
break;
|
|
142
|
+
case 43:
|
|
143
|
+
this.$ = r[p - 1] + "" + r[p];
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
}, "anonymous"),
|
|
147
|
+
table: [e(t, i, { 3: 1, 4: 2, 7: 4, 5: s, 36: a, 37: o, 38: l }), { 1: [3] }, e(t, i, { 4: 2, 7: 4, 3: 8, 5: s, 36: a, 37: o, 38: l }), e(t, i, { 4: 2, 7: 4, 6: 9, 3: 10, 5: s, 8: [1, 11], 36: a, 37: o, 38: l }), { 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] }, e(f, [2, 36]), e(f, [2, 37]), e(f, [2, 38]), { 1: [2, 1] }, e(t, i, { 4: 2, 7: 4, 3: 21, 5: s, 36: a, 37: o, 38: l }), { 1: [2, 3] }, e(f, [2, 5]), e(t, [2, 7], { 4: 22, 36: a, 37: o, 38: l }), { 11: 23, 30: d, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 39, 13: 38, 24: B, 29: W, 30: d, 31: 40, 32: 41, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 45, 15: 44, 29: X, 30: d, 35: 46, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 49, 17: 48, 24: Y, 30: d, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 52, 17: 51, 24: Y, 30: d, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 20: [1, 53] }, { 22: [1, 54] }, e(S, [2, 18]), { 1: [2, 2] }, e(S, [2, 8]), e(S, [2, 9]), e(H, [2, 39], { 41: 55, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }), e(H, [2, 40]), e(H, [2, 41]), e(A, [2, 42]), e(A, [2, 44]), e(A, [2, 45]), e(A, [2, 46]), e(A, [2, 47]), e(A, [2, 48]), e(A, [2, 49]), e(A, [2, 50]), e(A, [2, 51]), e(A, [2, 52]), e(A, [2, 53]), e(S, [2, 10]), e(S, [2, 24], { 32: 41, 31: 56, 24: B, 29: W }), e(S, [2, 26]), e(S, [2, 27]), { 33: [1, 57] }, { 11: 59, 30: d, 34: 58, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, e(S, [2, 11]), e(S, [2, 32], { 35: 60, 29: X }), e(S, [2, 34]), { 33: [1, 61] }, e(S, [2, 12]), { 17: 62, 24: Y }, { 25: 63, 27: 64, 29: w }, e(S, [2, 14]), { 17: 66, 24: Y }, e(S, [2, 16]), e(S, [2, 17]), e(A, [2, 43]), e(S, [2, 25]), { 29: [1, 67] }, { 26: [1, 68] }, { 26: [2, 31], 28: [1, 69] }, e(S, [2, 33]), { 29: [1, 70] }, e(S, [2, 13]), { 26: [1, 71] }, { 26: [2, 21], 28: [1, 72] }, e(V, [2, 23], { 30: [1, 73] }), e(S, [2, 15]), e(S, [2, 28]), e(S, [2, 29]), { 11: 59, 30: d, 34: 74, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, e(S, [2, 35]), e(S, [2, 19]), { 25: 75, 27: 64, 29: w }, e(V, [2, 22]), { 26: [2, 30] }, { 26: [2, 20] }],
|
|
148
|
+
defaultActions: { 8: [2, 1], 10: [2, 3], 21: [2, 2], 74: [2, 30], 75: [2, 20] },
|
|
149
|
+
parseError: /* @__PURE__ */ n(function(h, u) {
|
|
150
|
+
if (u.recoverable)
|
|
151
|
+
this.trace(h);
|
|
152
|
+
else {
|
|
153
|
+
var g = new Error(h);
|
|
154
|
+
throw g.hash = u, g;
|
|
155
|
+
}
|
|
156
|
+
}, "parseError"),
|
|
157
|
+
parse: /* @__PURE__ */ n(function(h) {
|
|
158
|
+
var u = this, g = [0], x = [], C = [null], r = [], rt = this.table, p = "", gt = 0, Mt = 0, li = 2, zt = 1, ci = r.slice.call(arguments, 1), v = Object.create(this.lexer), U = { yy: {} };
|
|
159
|
+
for (var mt in this.yy)
|
|
160
|
+
Object.prototype.hasOwnProperty.call(this.yy, mt) && (U.yy[mt] = this.yy[mt]);
|
|
161
|
+
v.setInput(h, U.yy), U.yy.lexer = v, U.yy.parser = this, typeof v.yylloc > "u" && (v.yylloc = {});
|
|
162
|
+
var yt = v.yylloc;
|
|
163
|
+
r.push(yt);
|
|
164
|
+
var ui = v.options && v.options.ranges;
|
|
165
|
+
typeof U.yy.parseError == "function" ? this.parseError = U.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
166
|
+
function gi(z) {
|
|
167
|
+
g.length = g.length - 2 * z, C.length = C.length - z, r.length = r.length - z;
|
|
168
|
+
}
|
|
169
|
+
n(gi, "popStack");
|
|
170
|
+
function Bt() {
|
|
171
|
+
var z;
|
|
172
|
+
return z = x.pop() || v.lex() || zt, typeof z != "number" && (z instanceof Array && (x = z, z = x.pop()), z = u.symbols_[z] || z), z;
|
|
173
|
+
}
|
|
174
|
+
n(Bt, "lex");
|
|
175
|
+
for (var M, $, O, bt, G = {}, xt, N, Vt, dt; ; ) {
|
|
176
|
+
if ($ = g[g.length - 1], this.defaultActions[$] ? O = this.defaultActions[$] : ((M === null || typeof M > "u") && (M = Bt()), O = rt[$] && rt[$][M]), typeof O > "u" || !O.length || !O[0]) {
|
|
177
|
+
var At = "";
|
|
178
|
+
dt = [];
|
|
179
|
+
for (xt in rt[$])
|
|
180
|
+
this.terminals_[xt] && xt > li && dt.push("'" + this.terminals_[xt] + "'");
|
|
181
|
+
v.showPosition ? At = "Parse error on line " + (gt + 1) + `:
|
|
182
|
+
` + v.showPosition() + `
|
|
183
|
+
Expecting ` + dt.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : At = "Parse error on line " + (gt + 1) + ": Unexpected " + (M == zt ? "end of input" : "'" + (this.terminals_[M] || M) + "'"), this.parseError(At, {
|
|
184
|
+
text: v.match,
|
|
185
|
+
token: this.terminals_[M] || M,
|
|
186
|
+
line: v.yylineno,
|
|
187
|
+
loc: yt,
|
|
188
|
+
expected: dt
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
if (O[0] instanceof Array && O.length > 1)
|
|
192
|
+
throw new Error("Parse Error: multiple actions possible at state: " + $ + ", token: " + M);
|
|
193
|
+
switch (O[0]) {
|
|
194
|
+
case 1:
|
|
195
|
+
g.push(M), C.push(v.yytext), r.push(v.yylloc), g.push(O[1]), M = null, Mt = v.yyleng, p = v.yytext, gt = v.yylineno, yt = v.yylloc;
|
|
196
|
+
break;
|
|
197
|
+
case 2:
|
|
198
|
+
if (N = this.productions_[O[1]][1], G.$ = C[C.length - N], G._$ = {
|
|
199
|
+
first_line: r[r.length - (N || 1)].first_line,
|
|
200
|
+
last_line: r[r.length - 1].last_line,
|
|
201
|
+
first_column: r[r.length - (N || 1)].first_column,
|
|
202
|
+
last_column: r[r.length - 1].last_column
|
|
203
|
+
}, ui && (G._$.range = [
|
|
204
|
+
r[r.length - (N || 1)].range[0],
|
|
205
|
+
r[r.length - 1].range[1]
|
|
206
|
+
]), bt = this.performAction.apply(G, [
|
|
207
|
+
p,
|
|
208
|
+
Mt,
|
|
209
|
+
gt,
|
|
210
|
+
U.yy,
|
|
211
|
+
O[1],
|
|
212
|
+
C,
|
|
213
|
+
r
|
|
214
|
+
].concat(ci)), typeof bt < "u")
|
|
215
|
+
return bt;
|
|
216
|
+
N && (g = g.slice(0, -1 * N * 2), C = C.slice(0, -1 * N), r = r.slice(0, -1 * N)), g.push(this.productions_[O[1]][0]), C.push(G.$), r.push(G._$), Vt = rt[g[g.length - 2]][g[g.length - 1]], g.push(Vt);
|
|
217
|
+
break;
|
|
218
|
+
case 3:
|
|
219
|
+
return !0;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return !0;
|
|
223
|
+
}, "parse")
|
|
224
|
+
}, ot = /* @__PURE__ */ function() {
|
|
225
|
+
var F = {
|
|
226
|
+
EOF: 1,
|
|
227
|
+
parseError: /* @__PURE__ */ n(function(u, g) {
|
|
228
|
+
if (this.yy.parser)
|
|
229
|
+
this.yy.parser.parseError(u, g);
|
|
230
|
+
else
|
|
231
|
+
throw new Error(u);
|
|
232
|
+
}, "parseError"),
|
|
233
|
+
// resets the lexer, sets new input
|
|
234
|
+
setInput: /* @__PURE__ */ n(function(h, u) {
|
|
235
|
+
return this.yy = u || 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 = {
|
|
236
|
+
first_line: 1,
|
|
237
|
+
first_column: 0,
|
|
238
|
+
last_line: 1,
|
|
239
|
+
last_column: 0
|
|
240
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
241
|
+
}, "setInput"),
|
|
242
|
+
// consumes and returns one char from the input
|
|
243
|
+
input: /* @__PURE__ */ n(function() {
|
|
244
|
+
var h = this._input[0];
|
|
245
|
+
this.yytext += h, this.yyleng++, this.offset++, this.match += h, this.matched += h;
|
|
246
|
+
var u = h.match(/(?:\r\n?|\n).*/g);
|
|
247
|
+
return u ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), h;
|
|
248
|
+
}, "input"),
|
|
249
|
+
// unshifts one char (or a string) into the input
|
|
250
|
+
unput: /* @__PURE__ */ n(function(h) {
|
|
251
|
+
var u = h.length, g = h.split(/(?:\r\n?|\n)/g);
|
|
252
|
+
this._input = h + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - u), this.offset -= u;
|
|
253
|
+
var x = this.match.split(/(?:\r\n?|\n)/g);
|
|
254
|
+
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);
|
|
255
|
+
var C = this.yylloc.range;
|
|
256
|
+
return this.yylloc = {
|
|
257
|
+
first_line: this.yylloc.first_line,
|
|
258
|
+
last_line: this.yylineno + 1,
|
|
259
|
+
first_column: this.yylloc.first_column,
|
|
260
|
+
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 - u
|
|
261
|
+
}, this.options.ranges && (this.yylloc.range = [C[0], C[0] + this.yyleng - u]), this.yyleng = this.yytext.length, this;
|
|
262
|
+
}, "unput"),
|
|
263
|
+
// When called from action, caches matched text and appends it on next action
|
|
264
|
+
more: /* @__PURE__ */ n(function() {
|
|
265
|
+
return this._more = !0, this;
|
|
266
|
+
}, "more"),
|
|
267
|
+
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
|
268
|
+
reject: /* @__PURE__ */ n(function() {
|
|
269
|
+
if (this.options.backtrack_lexer)
|
|
270
|
+
this._backtrack = !0;
|
|
271
|
+
else
|
|
272
|
+
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).
|
|
273
|
+
` + this.showPosition(), {
|
|
274
|
+
text: "",
|
|
275
|
+
token: null,
|
|
276
|
+
line: this.yylineno
|
|
277
|
+
});
|
|
278
|
+
return this;
|
|
279
|
+
}, "reject"),
|
|
280
|
+
// retain first n characters of the match
|
|
281
|
+
less: /* @__PURE__ */ n(function(h) {
|
|
282
|
+
this.unput(this.match.slice(h));
|
|
283
|
+
}, "less"),
|
|
284
|
+
// displays already matched input, i.e. for error messages
|
|
285
|
+
pastInput: /* @__PURE__ */ n(function() {
|
|
286
|
+
var h = this.matched.substr(0, this.matched.length - this.match.length);
|
|
287
|
+
return (h.length > 20 ? "..." : "") + h.substr(-20).replace(/\n/g, "");
|
|
288
|
+
}, "pastInput"),
|
|
289
|
+
// displays upcoming input, i.e. for error messages
|
|
290
|
+
upcomingInput: /* @__PURE__ */ n(function() {
|
|
291
|
+
var h = this.match;
|
|
292
|
+
return h.length < 20 && (h += this._input.substr(0, 20 - h.length)), (h.substr(0, 20) + (h.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
293
|
+
}, "upcomingInput"),
|
|
294
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
295
|
+
showPosition: /* @__PURE__ */ n(function() {
|
|
296
|
+
var h = this.pastInput(), u = new Array(h.length + 1).join("-");
|
|
297
|
+
return h + this.upcomingInput() + `
|
|
298
|
+
` + u + "^";
|
|
299
|
+
}, "showPosition"),
|
|
300
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
301
|
+
test_match: /* @__PURE__ */ n(function(h, u) {
|
|
302
|
+
var g, x, C;
|
|
303
|
+
if (this.options.backtrack_lexer && (C = {
|
|
304
|
+
yylineno: this.yylineno,
|
|
305
|
+
yylloc: {
|
|
306
|
+
first_line: this.yylloc.first_line,
|
|
307
|
+
last_line: this.last_line,
|
|
308
|
+
first_column: this.yylloc.first_column,
|
|
309
|
+
last_column: this.yylloc.last_column
|
|
310
|
+
},
|
|
311
|
+
yytext: this.yytext,
|
|
312
|
+
match: this.match,
|
|
313
|
+
matches: this.matches,
|
|
314
|
+
matched: this.matched,
|
|
315
|
+
yyleng: this.yyleng,
|
|
316
|
+
offset: this.offset,
|
|
317
|
+
_more: this._more,
|
|
318
|
+
_input: this._input,
|
|
319
|
+
yy: this.yy,
|
|
320
|
+
conditionStack: this.conditionStack.slice(0),
|
|
321
|
+
done: this.done
|
|
322
|
+
}, this.options.ranges && (C.yylloc.range = this.yylloc.range.slice(0))), x = h[0].match(/(?:\r\n?|\n).*/g), x && (this.yylineno += x.length), this.yylloc = {
|
|
323
|
+
first_line: this.yylloc.last_line,
|
|
324
|
+
last_line: this.yylineno + 1,
|
|
325
|
+
first_column: this.yylloc.last_column,
|
|
326
|
+
last_column: x ? x[x.length - 1].length - x[x.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + h[0].length
|
|
327
|
+
}, 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, u, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), g)
|
|
328
|
+
return g;
|
|
329
|
+
if (this._backtrack) {
|
|
330
|
+
for (var r in C)
|
|
331
|
+
this[r] = C[r];
|
|
332
|
+
return !1;
|
|
333
|
+
}
|
|
334
|
+
return !1;
|
|
335
|
+
}, "test_match"),
|
|
336
|
+
// return next match in input
|
|
337
|
+
next: /* @__PURE__ */ n(function() {
|
|
338
|
+
if (this.done)
|
|
339
|
+
return this.EOF;
|
|
340
|
+
this._input || (this.done = !0);
|
|
341
|
+
var h, u, g, x;
|
|
342
|
+
this._more || (this.yytext = "", this.match = "");
|
|
343
|
+
for (var C = this._currentRules(), r = 0; r < C.length; r++)
|
|
344
|
+
if (g = this._input.match(this.rules[C[r]]), g && (!u || g[0].length > u[0].length)) {
|
|
345
|
+
if (u = g, x = r, this.options.backtrack_lexer) {
|
|
346
|
+
if (h = this.test_match(g, C[r]), h !== !1)
|
|
347
|
+
return h;
|
|
348
|
+
if (this._backtrack) {
|
|
349
|
+
u = !1;
|
|
350
|
+
continue;
|
|
351
|
+
} else
|
|
352
|
+
return !1;
|
|
353
|
+
} else if (!this.options.flex)
|
|
354
|
+
break;
|
|
355
|
+
}
|
|
356
|
+
return u ? (h = this.test_match(u, C[x]), h !== !1 ? h : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
357
|
+
` + this.showPosition(), {
|
|
358
|
+
text: "",
|
|
359
|
+
token: null,
|
|
360
|
+
line: this.yylineno
|
|
361
|
+
});
|
|
362
|
+
}, "next"),
|
|
363
|
+
// return next match that has a token
|
|
364
|
+
lex: /* @__PURE__ */ n(function() {
|
|
365
|
+
var u = this.next();
|
|
366
|
+
return u || this.lex();
|
|
367
|
+
}, "lex"),
|
|
368
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
369
|
+
begin: /* @__PURE__ */ n(function(u) {
|
|
370
|
+
this.conditionStack.push(u);
|
|
371
|
+
}, "begin"),
|
|
372
|
+
// pop the previously active lexer condition state off the condition stack
|
|
373
|
+
popState: /* @__PURE__ */ n(function() {
|
|
374
|
+
var u = this.conditionStack.length - 1;
|
|
375
|
+
return u > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
376
|
+
}, "popState"),
|
|
377
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
378
|
+
_currentRules: /* @__PURE__ */ n(function() {
|
|
379
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
380
|
+
}, "_currentRules"),
|
|
381
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
382
|
+
topState: /* @__PURE__ */ n(function(u) {
|
|
383
|
+
return u = this.conditionStack.length - 1 - Math.abs(u || 0), u >= 0 ? this.conditionStack[u] : "INITIAL";
|
|
384
|
+
}, "topState"),
|
|
385
|
+
// alias for begin(condition)
|
|
386
|
+
pushState: /* @__PURE__ */ n(function(u) {
|
|
387
|
+
this.begin(u);
|
|
388
|
+
}, "pushState"),
|
|
389
|
+
// return the number of states currently on the stack
|
|
390
|
+
stateStackSize: /* @__PURE__ */ n(function() {
|
|
391
|
+
return this.conditionStack.length;
|
|
392
|
+
}, "stateStackSize"),
|
|
393
|
+
options: { "case-insensitive": !0 },
|
|
394
|
+
performAction: /* @__PURE__ */ n(function(u, g, x, C) {
|
|
395
|
+
switch (x) {
|
|
396
|
+
case 0:
|
|
397
|
+
break;
|
|
398
|
+
case 1:
|
|
399
|
+
break;
|
|
400
|
+
case 2:
|
|
401
|
+
return this.popState(), 36;
|
|
402
|
+
case 3:
|
|
403
|
+
return this.popState(), 36;
|
|
404
|
+
case 4:
|
|
405
|
+
return 36;
|
|
406
|
+
case 5:
|
|
407
|
+
break;
|
|
408
|
+
case 6:
|
|
409
|
+
return 10;
|
|
410
|
+
case 7:
|
|
411
|
+
return this.pushState("acc_title"), 19;
|
|
412
|
+
case 8:
|
|
413
|
+
return this.popState(), "acc_title_value";
|
|
414
|
+
case 9:
|
|
415
|
+
return this.pushState("acc_descr"), 21;
|
|
416
|
+
case 10:
|
|
417
|
+
return this.popState(), "acc_descr_value";
|
|
418
|
+
case 11:
|
|
419
|
+
this.pushState("acc_descr_multiline");
|
|
420
|
+
break;
|
|
421
|
+
case 12:
|
|
422
|
+
this.popState();
|
|
423
|
+
break;
|
|
424
|
+
case 13:
|
|
425
|
+
return "acc_descr_multiline_value";
|
|
426
|
+
case 14:
|
|
427
|
+
return 5;
|
|
428
|
+
case 15:
|
|
429
|
+
return 5;
|
|
430
|
+
case 16:
|
|
431
|
+
return 8;
|
|
432
|
+
case 17:
|
|
433
|
+
return this.pushState("axis_data"), "X_AXIS";
|
|
434
|
+
case 18:
|
|
435
|
+
return this.pushState("axis_data"), "Y_AXIS";
|
|
436
|
+
case 19:
|
|
437
|
+
return this.pushState("axis_band_data"), 24;
|
|
438
|
+
case 20:
|
|
439
|
+
return 33;
|
|
440
|
+
case 21:
|
|
441
|
+
return this.pushState("data"), 16;
|
|
442
|
+
case 22:
|
|
443
|
+
return this.pushState("data"), 18;
|
|
444
|
+
case 23:
|
|
445
|
+
return this.pushState("data_inner"), 24;
|
|
446
|
+
case 24:
|
|
447
|
+
return 29;
|
|
448
|
+
case 25:
|
|
449
|
+
return this.popState(), 26;
|
|
450
|
+
case 26:
|
|
451
|
+
this.popState();
|
|
452
|
+
break;
|
|
453
|
+
case 27:
|
|
454
|
+
this.pushState("string");
|
|
455
|
+
break;
|
|
456
|
+
case 28:
|
|
457
|
+
this.popState();
|
|
458
|
+
break;
|
|
459
|
+
case 29:
|
|
460
|
+
return "STR";
|
|
461
|
+
case 30:
|
|
462
|
+
return 24;
|
|
463
|
+
case 31:
|
|
464
|
+
return 26;
|
|
465
|
+
case 32:
|
|
466
|
+
return 44;
|
|
467
|
+
case 33:
|
|
468
|
+
return "COLON";
|
|
469
|
+
case 34:
|
|
470
|
+
return 45;
|
|
471
|
+
case 35:
|
|
472
|
+
return 28;
|
|
473
|
+
case 36:
|
|
474
|
+
return 46;
|
|
475
|
+
case 37:
|
|
476
|
+
return 47;
|
|
477
|
+
case 38:
|
|
478
|
+
return 49;
|
|
479
|
+
case 39:
|
|
480
|
+
return 51;
|
|
481
|
+
case 40:
|
|
482
|
+
return 48;
|
|
483
|
+
case 41:
|
|
484
|
+
return 42;
|
|
485
|
+
case 42:
|
|
486
|
+
return 50;
|
|
487
|
+
case 43:
|
|
488
|
+
return 43;
|
|
489
|
+
case 44:
|
|
490
|
+
break;
|
|
491
|
+
case 45:
|
|
492
|
+
return 37;
|
|
493
|
+
case 46:
|
|
494
|
+
return 38;
|
|
495
|
+
}
|
|
496
|
+
}, "anonymous"),
|
|
497
|
+
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],
|
|
498
|
+
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 } }
|
|
499
|
+
};
|
|
500
|
+
return F;
|
|
501
|
+
}();
|
|
502
|
+
R.lexer = ot;
|
|
503
|
+
function q() {
|
|
504
|
+
this.yy = {};
|
|
505
|
+
}
|
|
506
|
+
return n(q, "Parser"), q.prototype = R, R.Parser = q, new q();
|
|
507
|
+
}();
|
|
508
|
+
Ct.parser = Ct;
|
|
509
|
+
var Di = Ct;
|
|
510
|
+
function St(e) {
|
|
511
|
+
return e.type === "bar";
|
|
512
|
+
}
|
|
513
|
+
n(St, "isBarPlot");
|
|
514
|
+
function ft(e) {
|
|
515
|
+
return e.type === "band";
|
|
516
|
+
}
|
|
517
|
+
n(ft, "isBandAxisData");
|
|
518
|
+
function j(e) {
|
|
519
|
+
return e.type === "linear";
|
|
520
|
+
}
|
|
521
|
+
n(j, "isLinearAxisData");
|
|
522
|
+
var Q, Ut = (Q = class {
|
|
523
|
+
constructor(t) {
|
|
524
|
+
this.parentGroup = t;
|
|
525
|
+
}
|
|
526
|
+
getMaxDimension(t, i) {
|
|
527
|
+
if (!this.parentGroup)
|
|
528
|
+
return {
|
|
529
|
+
width: t.reduce((o, l) => Math.max(l.length, o), 0) * i,
|
|
530
|
+
height: i
|
|
531
|
+
};
|
|
532
|
+
const s = {
|
|
533
|
+
width: 0,
|
|
534
|
+
height: 0
|
|
535
|
+
}, a = this.parentGroup.append("g").attr("visibility", "hidden").attr("font-size", i);
|
|
536
|
+
for (const o of t) {
|
|
537
|
+
const l = Ri(a, 1, o), f = l ? l.width : o.length * i, d = l ? l.height : i;
|
|
538
|
+
s.width = Math.max(s.width, f), s.height = Math.max(s.height, d);
|
|
539
|
+
}
|
|
540
|
+
return a.remove(), s;
|
|
541
|
+
}
|
|
542
|
+
}, n(Q, "TextDimensionCalculatorWithFont"), Q), Ft = 0.7, Xt = 0.2, K, $t = (K = class {
|
|
543
|
+
constructor(t, i, s, a) {
|
|
544
|
+
this.axisConfig = t, this.title = i, 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.normalizedLabelRotationInRad = 0, this.range = [0, 10], this.boundingRect = { x: 0, y: 0, width: 0, height: 0 }, this.axisPosition = "left", this.normalizedLabelRotationInRad = this.axisConfig.labelRotation >= -90 && this.axisConfig.labelRotation <= 90 ? this.axisConfig.labelRotation * Math.PI / 180 : 0;
|
|
545
|
+
}
|
|
546
|
+
setRange(t) {
|
|
547
|
+
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();
|
|
548
|
+
}
|
|
549
|
+
getRange() {
|
|
550
|
+
return [this.range[0] + this.outerPadding, this.range[1] - this.outerPadding];
|
|
551
|
+
}
|
|
552
|
+
setAxisPosition(t) {
|
|
553
|
+
this.axisPosition = t, this.setRange(this.range);
|
|
554
|
+
}
|
|
555
|
+
getTickDistance() {
|
|
556
|
+
const t = this.getRange();
|
|
557
|
+
return Math.abs(t[0] - t[1]) / this.getTickValues().length;
|
|
558
|
+
}
|
|
559
|
+
getAxisOuterPadding() {
|
|
560
|
+
return this.outerPadding;
|
|
561
|
+
}
|
|
562
|
+
getLabelDimension() {
|
|
563
|
+
return this.textDimensionCalculator.getMaxDimension(
|
|
564
|
+
this.getTickValues().map((t) => t.toString()),
|
|
565
|
+
this.axisConfig.labelFontSize
|
|
566
|
+
);
|
|
567
|
+
}
|
|
568
|
+
recalculateOuterPaddingToDrawBar() {
|
|
569
|
+
Ft * this.getTickDistance() > this.outerPadding * 2 && (this.outerPadding = Math.floor(Ft * this.getTickDistance() / 2)), this.recalculateScale();
|
|
570
|
+
}
|
|
571
|
+
calculateSpaceIfDrawnHorizontally(t) {
|
|
572
|
+
let i = t.height;
|
|
573
|
+
if (this.axisConfig.showAxisLine && i > this.axisConfig.axisLineWidth && (i -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
|
|
574
|
+
const s = this.getLabelDimension(), a = Xt * t.width;
|
|
575
|
+
this.outerPadding = Math.min(s.width / 2, a);
|
|
576
|
+
let o = s.height;
|
|
577
|
+
this.axisPosition === "bottom" && this.normalizedLabelRotationInRad !== 0 && (o = Math.max(
|
|
578
|
+
o,
|
|
579
|
+
Math.abs(Math.sin(this.normalizedLabelRotationInRad) * s.width) + Math.abs(Math.cos(this.normalizedLabelRotationInRad) * s.height)
|
|
580
|
+
)), o += this.axisConfig.labelPadding * 2, this.labelTextHeight = s.height, o <= i && (i -= o, this.showLabel = !0);
|
|
581
|
+
}
|
|
582
|
+
if (this.axisConfig.showTick && i >= this.axisConfig.tickLength && (this.showTick = !0, i -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
|
|
583
|
+
const s = this.textDimensionCalculator.getMaxDimension(
|
|
584
|
+
[this.title],
|
|
585
|
+
this.axisConfig.titleFontSize
|
|
586
|
+
), a = s.height + this.axisConfig.titlePadding * 2;
|
|
587
|
+
this.titleTextHeight = s.height, a <= i && (i -= a, this.showTitle = !0);
|
|
588
|
+
}
|
|
589
|
+
this.boundingRect.width = t.width, this.boundingRect.height = t.height - i;
|
|
590
|
+
}
|
|
591
|
+
calculateSpaceIfDrawnVertical(t) {
|
|
592
|
+
let i = t.width;
|
|
593
|
+
if (this.axisConfig.showAxisLine && i > this.axisConfig.axisLineWidth && (i -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
|
|
594
|
+
const s = this.getLabelDimension(), a = Xt * t.height;
|
|
595
|
+
this.outerPadding = Math.min(s.height / 2, a);
|
|
596
|
+
const o = s.width + this.axisConfig.labelPadding * 2;
|
|
597
|
+
o <= i && (i -= o, this.showLabel = !0);
|
|
598
|
+
}
|
|
599
|
+
if (this.axisConfig.showTick && i >= this.axisConfig.tickLength && (this.showTick = !0, i -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
|
|
600
|
+
const s = this.textDimensionCalculator.getMaxDimension(
|
|
601
|
+
[this.title],
|
|
602
|
+
this.axisConfig.titleFontSize
|
|
603
|
+
), a = s.height + this.axisConfig.titlePadding * 2;
|
|
604
|
+
this.titleTextHeight = s.height, a <= i && (i -= a, this.showTitle = !0);
|
|
605
|
+
}
|
|
606
|
+
this.boundingRect.width = t.width - i, this.boundingRect.height = t.height;
|
|
607
|
+
}
|
|
608
|
+
calculateSpace(t) {
|
|
609
|
+
return this.axisPosition === "left" || this.axisPosition === "right" ? this.calculateSpaceIfDrawnVertical(t) : this.calculateSpaceIfDrawnHorizontally(t), this.recalculateScale(), {
|
|
610
|
+
width: this.boundingRect.width,
|
|
611
|
+
height: this.boundingRect.height
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
setBoundingBoxXY(t) {
|
|
615
|
+
this.boundingRect.x = t.x, this.boundingRect.y = t.y;
|
|
616
|
+
}
|
|
617
|
+
calculateOffsetByRotation(t) {
|
|
618
|
+
const i = this.normalizedLabelRotationInRad;
|
|
619
|
+
return i === 0 ? 0 : Math.sin(i) * this.getLabelDimension()[t] / 2;
|
|
620
|
+
}
|
|
621
|
+
getDrawableElementsForLeftAxis() {
|
|
622
|
+
const t = [];
|
|
623
|
+
if (this.showAxisLine) {
|
|
624
|
+
const i = this.boundingRect.x + this.boundingRect.width - this.axisConfig.axisLineWidth / 2;
|
|
625
|
+
t.push({
|
|
626
|
+
type: "path",
|
|
627
|
+
groupTexts: ["left-axis", "axisl-line"],
|
|
628
|
+
data: [
|
|
629
|
+
{
|
|
630
|
+
path: `M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y + this.boundingRect.height} `,
|
|
631
|
+
strokeFill: this.axisThemeConfig.axisLineColor,
|
|
632
|
+
strokeWidth: this.axisConfig.axisLineWidth
|
|
633
|
+
}
|
|
634
|
+
]
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
if (this.showLabel && t.push({
|
|
638
|
+
type: "text",
|
|
639
|
+
groupTexts: ["left-axis", "label"],
|
|
640
|
+
data: this.getTickValues().map((i) => ({
|
|
641
|
+
text: i.toString(),
|
|
642
|
+
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),
|
|
643
|
+
y: this.getScaleValue(i),
|
|
644
|
+
fill: this.axisThemeConfig.labelColor,
|
|
645
|
+
fontSize: this.axisConfig.labelFontSize,
|
|
646
|
+
rotation: 0,
|
|
647
|
+
verticalPos: "middle",
|
|
648
|
+
horizontalPos: "right"
|
|
649
|
+
}))
|
|
650
|
+
}), this.showTick) {
|
|
651
|
+
const i = this.boundingRect.x + this.boundingRect.width - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
|
|
652
|
+
t.push({
|
|
653
|
+
type: "path",
|
|
654
|
+
groupTexts: ["left-axis", "ticks"],
|
|
655
|
+
data: this.getTickValues().map((s) => ({
|
|
656
|
+
path: `M ${i},${this.getScaleValue(s)} L ${i - this.axisConfig.tickLength},${this.getScaleValue(s)}`,
|
|
657
|
+
strokeFill: this.axisThemeConfig.tickColor,
|
|
658
|
+
strokeWidth: this.axisConfig.tickWidth
|
|
659
|
+
}))
|
|
660
|
+
});
|
|
661
|
+
}
|
|
662
|
+
return this.showTitle && t.push({
|
|
663
|
+
type: "text",
|
|
664
|
+
groupTexts: ["left-axis", "title"],
|
|
665
|
+
data: [
|
|
666
|
+
{
|
|
667
|
+
text: this.title,
|
|
668
|
+
x: this.boundingRect.x + this.axisConfig.titlePadding,
|
|
669
|
+
y: this.boundingRect.y + this.boundingRect.height / 2,
|
|
670
|
+
fill: this.axisThemeConfig.titleColor,
|
|
671
|
+
fontSize: this.axisConfig.titleFontSize,
|
|
672
|
+
rotation: 270,
|
|
673
|
+
verticalPos: "top",
|
|
674
|
+
horizontalPos: "center"
|
|
675
|
+
}
|
|
676
|
+
]
|
|
677
|
+
}), t;
|
|
678
|
+
}
|
|
679
|
+
getDrawableElementsForBottomAxis() {
|
|
680
|
+
const t = [];
|
|
681
|
+
if (this.showAxisLine) {
|
|
682
|
+
const i = this.boundingRect.y + this.axisConfig.axisLineWidth / 2;
|
|
683
|
+
t.push({
|
|
684
|
+
type: "path",
|
|
685
|
+
groupTexts: ["bottom-axis", "axis-line"],
|
|
686
|
+
data: [
|
|
687
|
+
{
|
|
688
|
+
path: `M ${this.boundingRect.x},${i} L ${this.boundingRect.x + this.boundingRect.width},${i}`,
|
|
689
|
+
strokeFill: this.axisThemeConfig.axisLineColor,
|
|
690
|
+
strokeWidth: this.axisConfig.axisLineWidth
|
|
691
|
+
}
|
|
692
|
+
]
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
if (this.showLabel && t.push({
|
|
696
|
+
type: "text",
|
|
697
|
+
groupTexts: ["bottom-axis", "label"],
|
|
698
|
+
data: this.getTickValues().map((i) => ({
|
|
699
|
+
text: i.toString(),
|
|
700
|
+
x: this.getScaleValue(i) + this.calculateOffsetByRotation("height"),
|
|
701
|
+
y: this.boundingRect.y + this.axisConfig.labelPadding + (this.showTick ? this.axisConfig.tickLength : 0) + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0) + Math.abs(this.calculateOffsetByRotation("width")),
|
|
702
|
+
fill: this.axisThemeConfig.labelColor,
|
|
703
|
+
fontSize: this.axisConfig.labelFontSize,
|
|
704
|
+
rotation: this.normalizedLabelRotationInRad * 180 / Math.PI,
|
|
705
|
+
verticalPos: "top",
|
|
706
|
+
horizontalPos: "center"
|
|
707
|
+
}))
|
|
708
|
+
}), this.showTick) {
|
|
709
|
+
const i = this.boundingRect.y + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
|
|
710
|
+
t.push({
|
|
711
|
+
type: "path",
|
|
712
|
+
groupTexts: ["bottom-axis", "ticks"],
|
|
713
|
+
data: this.getTickValues().map((s) => ({
|
|
714
|
+
path: `M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i + this.axisConfig.tickLength}`,
|
|
715
|
+
strokeFill: this.axisThemeConfig.tickColor,
|
|
716
|
+
strokeWidth: this.axisConfig.tickWidth
|
|
717
|
+
}))
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
return this.showTitle && t.push({
|
|
721
|
+
type: "text",
|
|
722
|
+
groupTexts: ["bottom-axis", "title"],
|
|
723
|
+
data: [
|
|
724
|
+
{
|
|
725
|
+
text: this.title,
|
|
726
|
+
x: this.range[0] + (this.range[1] - this.range[0]) / 2,
|
|
727
|
+
y: this.boundingRect.y + this.boundingRect.height - this.axisConfig.titlePadding - this.titleTextHeight,
|
|
728
|
+
fill: this.axisThemeConfig.titleColor,
|
|
729
|
+
fontSize: this.axisConfig.titleFontSize,
|
|
730
|
+
rotation: 0,
|
|
731
|
+
verticalPos: "top",
|
|
732
|
+
horizontalPos: "center"
|
|
733
|
+
}
|
|
734
|
+
]
|
|
735
|
+
}), t;
|
|
736
|
+
}
|
|
737
|
+
getDrawableElementsForTopAxis() {
|
|
738
|
+
const t = [];
|
|
739
|
+
if (this.showAxisLine) {
|
|
740
|
+
const i = this.boundingRect.y + this.boundingRect.height - this.axisConfig.axisLineWidth / 2;
|
|
741
|
+
t.push({
|
|
742
|
+
type: "path",
|
|
743
|
+
groupTexts: ["top-axis", "axis-line"],
|
|
744
|
+
data: [
|
|
745
|
+
{
|
|
746
|
+
path: `M ${this.boundingRect.x},${i} L ${this.boundingRect.x + this.boundingRect.width},${i}`,
|
|
747
|
+
strokeFill: this.axisThemeConfig.axisLineColor,
|
|
748
|
+
strokeWidth: this.axisConfig.axisLineWidth
|
|
749
|
+
}
|
|
750
|
+
]
|
|
751
|
+
});
|
|
752
|
+
}
|
|
753
|
+
if (this.showLabel && t.push({
|
|
754
|
+
type: "text",
|
|
755
|
+
groupTexts: ["top-axis", "label"],
|
|
756
|
+
data: this.getTickValues().map((i) => ({
|
|
757
|
+
text: i.toString(),
|
|
758
|
+
x: this.getScaleValue(i),
|
|
759
|
+
y: this.boundingRect.y + (this.showTitle ? this.titleTextHeight + this.axisConfig.titlePadding * 2 : 0) + this.axisConfig.labelPadding,
|
|
760
|
+
fill: this.axisThemeConfig.labelColor,
|
|
761
|
+
fontSize: this.axisConfig.labelFontSize,
|
|
762
|
+
rotation: 0,
|
|
763
|
+
verticalPos: "top",
|
|
764
|
+
horizontalPos: "center"
|
|
765
|
+
}))
|
|
766
|
+
}), this.showTick) {
|
|
767
|
+
const i = this.boundingRect.y;
|
|
768
|
+
t.push({
|
|
769
|
+
type: "path",
|
|
770
|
+
groupTexts: ["top-axis", "ticks"],
|
|
771
|
+
data: this.getTickValues().map((s) => ({
|
|
772
|
+
path: `M ${this.getScaleValue(s)},${i + this.boundingRect.height - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)} L ${this.getScaleValue(s)},${i + this.boundingRect.height - this.axisConfig.tickLength - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)}`,
|
|
773
|
+
strokeFill: this.axisThemeConfig.tickColor,
|
|
774
|
+
strokeWidth: this.axisConfig.tickWidth
|
|
775
|
+
}))
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
return this.showTitle && t.push({
|
|
779
|
+
type: "text",
|
|
780
|
+
groupTexts: ["top-axis", "title"],
|
|
781
|
+
data: [
|
|
782
|
+
{
|
|
783
|
+
text: this.title,
|
|
784
|
+
x: this.boundingRect.x + this.boundingRect.width / 2,
|
|
785
|
+
y: this.boundingRect.y + this.axisConfig.titlePadding,
|
|
786
|
+
fill: this.axisThemeConfig.titleColor,
|
|
787
|
+
fontSize: this.axisConfig.titleFontSize,
|
|
788
|
+
rotation: 0,
|
|
789
|
+
verticalPos: "top",
|
|
790
|
+
horizontalPos: "center"
|
|
791
|
+
}
|
|
792
|
+
]
|
|
793
|
+
}), t;
|
|
794
|
+
}
|
|
795
|
+
getDrawableElements() {
|
|
796
|
+
if (this.axisPosition === "left")
|
|
797
|
+
return this.getDrawableElementsForLeftAxis();
|
|
798
|
+
if (this.axisPosition === "right")
|
|
799
|
+
throw Error("Drawing of right axis is not implemented");
|
|
800
|
+
return this.axisPosition === "bottom" ? this.getDrawableElementsForBottomAxis() : this.axisPosition === "top" ? this.getDrawableElementsForTopAxis() : [];
|
|
801
|
+
}
|
|
802
|
+
}, n(K, "BaseAxis"), K), Z, vi = (Z = class extends $t {
|
|
803
|
+
constructor(t, i, s, a, o) {
|
|
804
|
+
super(t, a, o, i), this.categories = s, this.scale = wt().domain(this.categories).range(this.getRange());
|
|
805
|
+
}
|
|
806
|
+
setRange(t) {
|
|
807
|
+
super.setRange(t);
|
|
808
|
+
}
|
|
809
|
+
recalculateScale() {
|
|
810
|
+
this.scale = wt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5), Nt.trace("BandAxis axis final categories, range: ", this.categories, this.getRange());
|
|
811
|
+
}
|
|
812
|
+
getTickValues() {
|
|
813
|
+
return this.categories;
|
|
814
|
+
}
|
|
815
|
+
getScaleValue(t) {
|
|
816
|
+
return this.scale(t) ?? this.getRange()[0];
|
|
817
|
+
}
|
|
818
|
+
}, n(Z, "BandAxis"), Z), J, Li = (J = class extends $t {
|
|
819
|
+
constructor(t, i, s, a, o) {
|
|
820
|
+
super(t, a, o, i), this.domain = s, this.scale = Ot().domain(this.domain).range(this.getRange());
|
|
821
|
+
}
|
|
822
|
+
getTickValues() {
|
|
823
|
+
return this.scale.ticks();
|
|
824
|
+
}
|
|
825
|
+
recalculateScale() {
|
|
826
|
+
const t = [...this.domain];
|
|
827
|
+
this.axisPosition === "left" && t.reverse(), this.scale = Ot().domain(t).range(this.getRange());
|
|
828
|
+
}
|
|
829
|
+
getScaleValue(t) {
|
|
830
|
+
return this.scale(t);
|
|
831
|
+
}
|
|
832
|
+
}, n(J, "LinearAxis"), J);
|
|
833
|
+
function Rt(e, t, i, s) {
|
|
834
|
+
const a = new Ut(s);
|
|
835
|
+
return ft(e) ? new vi(
|
|
836
|
+
t,
|
|
837
|
+
i,
|
|
838
|
+
e.categories,
|
|
839
|
+
e.title,
|
|
840
|
+
a
|
|
841
|
+
) : new Li(
|
|
842
|
+
t,
|
|
843
|
+
i,
|
|
844
|
+
[e.min, e.max],
|
|
845
|
+
e.title,
|
|
846
|
+
a
|
|
847
|
+
);
|
|
848
|
+
}
|
|
849
|
+
n(Rt, "getAxis");
|
|
850
|
+
var tt, Pi = (tt = class {
|
|
851
|
+
constructor(t, i, s, a) {
|
|
852
|
+
this.textDimensionCalculator = t, this.chartConfig = i, this.chartData = s, this.chartThemeConfig = a, this.boundingRect = {
|
|
853
|
+
x: 0,
|
|
854
|
+
y: 0,
|
|
855
|
+
width: 0,
|
|
856
|
+
height: 0
|
|
857
|
+
}, this.showChartTitle = !1;
|
|
858
|
+
}
|
|
859
|
+
setBoundingBoxXY(t) {
|
|
860
|
+
this.boundingRect.x = t.x, this.boundingRect.y = t.y;
|
|
861
|
+
}
|
|
862
|
+
calculateSpace(t) {
|
|
863
|
+
const i = this.textDimensionCalculator.getMaxDimension(
|
|
864
|
+
[this.chartData.title],
|
|
865
|
+
this.chartConfig.titleFontSize
|
|
866
|
+
), s = Math.max(i.width, t.width), a = i.height + 2 * this.chartConfig.titlePadding;
|
|
867
|
+
return i.width <= s && i.height <= a && this.chartConfig.showTitle && this.chartData.title && (this.boundingRect.width = s, this.boundingRect.height = a, this.showChartTitle = !0), {
|
|
868
|
+
width: this.boundingRect.width,
|
|
869
|
+
height: this.boundingRect.height
|
|
870
|
+
};
|
|
871
|
+
}
|
|
872
|
+
getDrawableElements() {
|
|
873
|
+
const t = [];
|
|
874
|
+
return this.showChartTitle && t.push({
|
|
875
|
+
groupTexts: ["chart-title"],
|
|
876
|
+
type: "text",
|
|
877
|
+
data: [
|
|
878
|
+
{
|
|
879
|
+
fontSize: this.chartConfig.titleFontSize,
|
|
880
|
+
text: this.chartData.title,
|
|
881
|
+
verticalPos: "middle",
|
|
882
|
+
horizontalPos: "center",
|
|
883
|
+
x: this.boundingRect.x + this.boundingRect.width / 2,
|
|
884
|
+
y: this.boundingRect.y + this.boundingRect.height / 2,
|
|
885
|
+
fill: this.chartThemeConfig.titleColor,
|
|
886
|
+
rotation: 0
|
|
887
|
+
}
|
|
888
|
+
]
|
|
889
|
+
}), t;
|
|
890
|
+
}
|
|
891
|
+
}, n(tt, "ChartTitle"), tt);
|
|
892
|
+
function qt(e, t, i, s) {
|
|
893
|
+
const a = new Ut(s);
|
|
894
|
+
return new Pi(a, e, t, i);
|
|
895
|
+
}
|
|
896
|
+
n(qt, "getChartTitleComponent");
|
|
897
|
+
var it, Ei = (it = class {
|
|
898
|
+
constructor(t, i, s, a, o) {
|
|
899
|
+
this.plotData = t, this.xAxis = i, this.yAxis = s, this.orientation = a, this.plotIndex = o;
|
|
900
|
+
}
|
|
901
|
+
getDrawableElement() {
|
|
902
|
+
const t = this.plotData.data.map((a) => [
|
|
903
|
+
this.xAxis.getScaleValue(a[0]),
|
|
904
|
+
this.yAxis.getScaleValue(a[1])
|
|
905
|
+
]);
|
|
906
|
+
let i;
|
|
907
|
+
if (this.orientation === "horizontal" ? i = Wt().y((a) => a[0]).x((a) => a[1])(t) : i = Wt().x((a) => a[0]).y((a) => a[1])(t), !i)
|
|
908
|
+
return [];
|
|
909
|
+
const s = [
|
|
910
|
+
{
|
|
911
|
+
groupTexts: ["plot", `line-plot-${this.plotIndex}`],
|
|
912
|
+
type: "path",
|
|
913
|
+
data: [
|
|
914
|
+
{
|
|
915
|
+
path: i,
|
|
916
|
+
strokeFill: this.plotData.strokeFill,
|
|
917
|
+
strokeWidth: this.plotData.strokeWidth
|
|
918
|
+
}
|
|
919
|
+
]
|
|
920
|
+
}
|
|
921
|
+
];
|
|
922
|
+
if (this.plotData.pointLabels && this.plotData.pointLabels.length > 0) {
|
|
923
|
+
const l = [];
|
|
924
|
+
for (const [f, [d, k]] of t.entries()) {
|
|
925
|
+
const T = this.plotData.pointLabels[f];
|
|
926
|
+
T && (this.orientation === "horizontal" ? l.push({
|
|
927
|
+
x: k + 10,
|
|
928
|
+
y: d,
|
|
929
|
+
text: T,
|
|
930
|
+
fill: this.plotData.strokeFill,
|
|
931
|
+
verticalPos: "middle",
|
|
932
|
+
horizontalPos: "left",
|
|
933
|
+
fontSize: 12,
|
|
934
|
+
rotation: 0
|
|
935
|
+
}) : l.push({
|
|
936
|
+
x: d,
|
|
937
|
+
y: k - 10,
|
|
938
|
+
text: T,
|
|
939
|
+
fill: this.plotData.strokeFill,
|
|
940
|
+
verticalPos: "middle",
|
|
941
|
+
horizontalPos: "center",
|
|
942
|
+
fontSize: 12,
|
|
943
|
+
rotation: 0
|
|
944
|
+
}));
|
|
945
|
+
}
|
|
946
|
+
l.length > 0 && s.push({
|
|
947
|
+
groupTexts: ["plot", `line-plot-${this.plotIndex}`, "labels"],
|
|
948
|
+
type: "text",
|
|
949
|
+
data: l
|
|
950
|
+
});
|
|
951
|
+
}
|
|
952
|
+
return s;
|
|
953
|
+
}
|
|
954
|
+
}, n(it, "LinePlot"), it), et, Ii = (et = class {
|
|
955
|
+
constructor(t, i, s, a, o, l) {
|
|
956
|
+
this.barData = t, this.boundingRect = i, this.xAxis = s, this.yAxis = a, this.orientation = o, this.plotIndex = l;
|
|
957
|
+
}
|
|
958
|
+
getDrawableElement() {
|
|
959
|
+
const t = this.barData.data.map((o) => [
|
|
960
|
+
this.xAxis.getScaleValue(o[0]),
|
|
961
|
+
this.yAxis.getScaleValue(o[1])
|
|
962
|
+
]), s = Math.min(this.xAxis.getAxisOuterPadding() * 2, this.xAxis.getTickDistance()) * (1 - 0.05), a = s / 2;
|
|
963
|
+
return this.orientation === "horizontal" ? [
|
|
964
|
+
{
|
|
965
|
+
groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
|
|
966
|
+
type: "rect",
|
|
967
|
+
data: t.map((o) => ({
|
|
968
|
+
x: this.boundingRect.x,
|
|
969
|
+
y: o[0] - a,
|
|
970
|
+
height: s,
|
|
971
|
+
width: o[1] - this.boundingRect.x,
|
|
972
|
+
fill: this.barData.fill,
|
|
973
|
+
strokeWidth: 0,
|
|
974
|
+
strokeFill: this.barData.fill
|
|
975
|
+
}))
|
|
976
|
+
}
|
|
977
|
+
] : [
|
|
978
|
+
{
|
|
979
|
+
groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
|
|
980
|
+
type: "rect",
|
|
981
|
+
data: t.map((o) => ({
|
|
982
|
+
x: o[0] - a,
|
|
983
|
+
y: o[1],
|
|
984
|
+
width: s,
|
|
985
|
+
height: this.boundingRect.y + this.boundingRect.height - o[1],
|
|
986
|
+
fill: this.barData.fill,
|
|
987
|
+
strokeWidth: 0,
|
|
988
|
+
strokeFill: this.barData.fill
|
|
989
|
+
}))
|
|
990
|
+
}
|
|
991
|
+
];
|
|
992
|
+
}
|
|
993
|
+
}, n(et, "BarPlot"), et), st, Mi = (st = class {
|
|
994
|
+
constructor(t, i, s) {
|
|
995
|
+
this.chartConfig = t, this.chartData = i, this.chartThemeConfig = s, this.boundingRect = {
|
|
996
|
+
x: 0,
|
|
997
|
+
y: 0,
|
|
998
|
+
width: 0,
|
|
999
|
+
height: 0
|
|
1000
|
+
};
|
|
1001
|
+
}
|
|
1002
|
+
setAxes(t, i) {
|
|
1003
|
+
this.xAxis = t, this.yAxis = i;
|
|
1004
|
+
}
|
|
1005
|
+
setBoundingBoxXY(t) {
|
|
1006
|
+
this.boundingRect.x = t.x, this.boundingRect.y = t.y;
|
|
1007
|
+
}
|
|
1008
|
+
calculateSpace(t) {
|
|
1009
|
+
return this.boundingRect.width = t.width, this.boundingRect.height = t.height, {
|
|
1010
|
+
width: this.boundingRect.width,
|
|
1011
|
+
height: this.boundingRect.height
|
|
1012
|
+
};
|
|
1013
|
+
}
|
|
1014
|
+
getDrawableElements() {
|
|
1015
|
+
if (!(this.xAxis && this.yAxis))
|
|
1016
|
+
throw Error("Axes must be passed to render Plots");
|
|
1017
|
+
const t = [];
|
|
1018
|
+
for (const [i, s] of this.chartData.plots.entries())
|
|
1019
|
+
switch (s.type) {
|
|
1020
|
+
case "line":
|
|
1021
|
+
{
|
|
1022
|
+
const a = new Ei(
|
|
1023
|
+
s,
|
|
1024
|
+
this.xAxis,
|
|
1025
|
+
this.yAxis,
|
|
1026
|
+
this.chartConfig.chartOrientation,
|
|
1027
|
+
i
|
|
1028
|
+
);
|
|
1029
|
+
t.push(...a.getDrawableElement());
|
|
1030
|
+
}
|
|
1031
|
+
break;
|
|
1032
|
+
case "bar":
|
|
1033
|
+
{
|
|
1034
|
+
const a = new Ii(
|
|
1035
|
+
s,
|
|
1036
|
+
this.boundingRect,
|
|
1037
|
+
this.xAxis,
|
|
1038
|
+
this.yAxis,
|
|
1039
|
+
this.chartConfig.chartOrientation,
|
|
1040
|
+
i
|
|
1041
|
+
);
|
|
1042
|
+
t.push(...a.getDrawableElement());
|
|
1043
|
+
}
|
|
1044
|
+
break;
|
|
1045
|
+
}
|
|
1046
|
+
return t;
|
|
1047
|
+
}
|
|
1048
|
+
}, n(st, "BasePlot"), st);
|
|
1049
|
+
function Gt(e, t, i) {
|
|
1050
|
+
return new Mi(e, t, i);
|
|
1051
|
+
}
|
|
1052
|
+
n(Gt, "getPlotComponent");
|
|
1053
|
+
var at, zi = (at = class {
|
|
1054
|
+
constructor(t, i, s, a) {
|
|
1055
|
+
this.chartConfig = t, this.chartData = i, this.componentStore = {
|
|
1056
|
+
title: qt(t, i, s, a),
|
|
1057
|
+
plot: Gt(t, i, s),
|
|
1058
|
+
xAxis: Rt(
|
|
1059
|
+
i.xAxis,
|
|
1060
|
+
t.xAxis,
|
|
1061
|
+
{
|
|
1062
|
+
titleColor: s.xAxisTitleColor,
|
|
1063
|
+
labelColor: s.xAxisLabelColor,
|
|
1064
|
+
tickColor: s.xAxisTickColor,
|
|
1065
|
+
axisLineColor: s.xAxisLineColor
|
|
1066
|
+
},
|
|
1067
|
+
a
|
|
1068
|
+
),
|
|
1069
|
+
yAxis: Rt(
|
|
1070
|
+
i.yAxis,
|
|
1071
|
+
t.yAxis,
|
|
1072
|
+
{
|
|
1073
|
+
titleColor: s.yAxisTitleColor,
|
|
1074
|
+
labelColor: s.yAxisLabelColor,
|
|
1075
|
+
tickColor: s.yAxisTickColor,
|
|
1076
|
+
axisLineColor: s.yAxisLineColor
|
|
1077
|
+
},
|
|
1078
|
+
a
|
|
1079
|
+
)
|
|
1080
|
+
};
|
|
1081
|
+
}
|
|
1082
|
+
calculateVerticalSpace() {
|
|
1083
|
+
let t = this.chartConfig.width, i = this.chartConfig.height, s = 0, a = 0, o = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), l = Math.floor(
|
|
1084
|
+
i * this.chartConfig.plotReservedSpacePercent / 100
|
|
1085
|
+
), f = this.componentStore.plot.calculateSpace({
|
|
1086
|
+
width: o,
|
|
1087
|
+
height: l
|
|
1088
|
+
});
|
|
1089
|
+
t -= f.width, i -= f.height, f = this.componentStore.title.calculateSpace({
|
|
1090
|
+
width: this.chartConfig.width,
|
|
1091
|
+
height: i
|
|
1092
|
+
}), a = f.height, i -= f.height, this.componentStore.xAxis.setAxisPosition("bottom"), f = this.componentStore.xAxis.calculateSpace({
|
|
1093
|
+
width: t,
|
|
1094
|
+
height: i
|
|
1095
|
+
}), i -= f.height, this.componentStore.yAxis.setAxisPosition("left"), f = this.componentStore.yAxis.calculateSpace({
|
|
1096
|
+
width: t,
|
|
1097
|
+
height: i
|
|
1098
|
+
}), s = f.width, t -= f.width, t > 0 && (o += t, t = 0), i > 0 && (l += i, i = 0), this.componentStore.plot.calculateSpace({
|
|
1099
|
+
width: o,
|
|
1100
|
+
height: l
|
|
1101
|
+
}), this.componentStore.plot.setBoundingBoxXY({ x: s, y: a }), this.componentStore.xAxis.setRange([s, s + o]), this.componentStore.xAxis.setBoundingBoxXY({ x: s, y: a + l }), this.componentStore.yAxis.setRange([a, a + l]), this.componentStore.yAxis.setBoundingBoxXY({ x: 0, y: a }), this.chartData.plots.some((d) => St(d)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
|
|
1102
|
+
}
|
|
1103
|
+
calculateHorizontalSpace() {
|
|
1104
|
+
let t = this.chartConfig.width, i = this.chartConfig.height, s = 0, a = 0, o = 0, l = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), f = Math.floor(
|
|
1105
|
+
i * this.chartConfig.plotReservedSpacePercent / 100
|
|
1106
|
+
), d = this.componentStore.plot.calculateSpace({
|
|
1107
|
+
width: l,
|
|
1108
|
+
height: f
|
|
1109
|
+
});
|
|
1110
|
+
t -= d.width, i -= d.height, d = this.componentStore.title.calculateSpace({
|
|
1111
|
+
width: this.chartConfig.width,
|
|
1112
|
+
height: i
|
|
1113
|
+
}), s = d.height, i -= d.height, this.componentStore.xAxis.setAxisPosition("left"), d = this.componentStore.xAxis.calculateSpace({
|
|
1114
|
+
width: t,
|
|
1115
|
+
height: i
|
|
1116
|
+
}), t -= d.width, a = d.width, this.componentStore.yAxis.setAxisPosition("top"), d = this.componentStore.yAxis.calculateSpace({
|
|
1117
|
+
width: t,
|
|
1118
|
+
height: i
|
|
1119
|
+
}), i -= d.height, o = s + d.height, t > 0 && (l += t, t = 0), i > 0 && (f += i, i = 0), this.componentStore.plot.calculateSpace({
|
|
1120
|
+
width: l,
|
|
1121
|
+
height: f
|
|
1122
|
+
}), this.componentStore.plot.setBoundingBoxXY({ x: a, y: o }), this.componentStore.yAxis.setRange([a, a + l]), this.componentStore.yAxis.setBoundingBoxXY({ x: a, y: s }), this.componentStore.xAxis.setRange([o, o + f]), this.componentStore.xAxis.setBoundingBoxXY({ x: 0, y: o }), this.chartData.plots.some((k) => St(k)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
|
|
1123
|
+
}
|
|
1124
|
+
calculateSpace() {
|
|
1125
|
+
this.chartConfig.chartOrientation === "horizontal" ? this.calculateHorizontalSpace() : this.calculateVerticalSpace();
|
|
1126
|
+
}
|
|
1127
|
+
getDrawableElement() {
|
|
1128
|
+
this.calculateSpace();
|
|
1129
|
+
const t = [];
|
|
1130
|
+
this.componentStore.plot.setAxes(this.componentStore.xAxis, this.componentStore.yAxis);
|
|
1131
|
+
for (const i of Object.values(this.componentStore))
|
|
1132
|
+
t.push(...i.getDrawableElements());
|
|
1133
|
+
return t;
|
|
1134
|
+
}
|
|
1135
|
+
}, n(at, "Orchestrator"), at), nt, Bi = (nt = class {
|
|
1136
|
+
static build(t, i, s, a) {
|
|
1137
|
+
return new zi(t, i, s, a).getDrawableElement();
|
|
1138
|
+
}
|
|
1139
|
+
}, n(nt, "XYChartBuilder"), nt), ht = 0, jt, lt = vt(), ct = Dt(), y = Lt(), _t = ct.plotColorPalette.split(",").map((e) => e.trim()), pt = !1, Tt = !1;
|
|
1140
|
+
function Dt() {
|
|
1141
|
+
const e = Ci(), t = kt();
|
|
1142
|
+
return Ht(e.xyChart, t.themeVariables.xyChart);
|
|
1143
|
+
}
|
|
1144
|
+
n(Dt, "getChartDefaultThemeConfig");
|
|
1145
|
+
function vt() {
|
|
1146
|
+
const e = kt();
|
|
1147
|
+
return Ht(
|
|
1148
|
+
wi.xyChart,
|
|
1149
|
+
e.xyChart
|
|
1150
|
+
);
|
|
1151
|
+
}
|
|
1152
|
+
n(vt, "getChartDefaultConfig");
|
|
1153
|
+
function Lt() {
|
|
1154
|
+
return {
|
|
1155
|
+
yAxis: {
|
|
1156
|
+
type: "linear",
|
|
1157
|
+
title: "",
|
|
1158
|
+
min: 1 / 0,
|
|
1159
|
+
max: -1 / 0
|
|
1160
|
+
},
|
|
1161
|
+
xAxis: {
|
|
1162
|
+
type: "band",
|
|
1163
|
+
title: "",
|
|
1164
|
+
categories: []
|
|
1165
|
+
},
|
|
1166
|
+
title: "",
|
|
1167
|
+
plots: []
|
|
1168
|
+
};
|
|
1169
|
+
}
|
|
1170
|
+
n(Lt, "getChartDefaultData");
|
|
1171
|
+
function ut(e) {
|
|
1172
|
+
const t = kt();
|
|
1173
|
+
return Si(e.trim(), t);
|
|
1174
|
+
}
|
|
1175
|
+
n(ut, "textSanitizer");
|
|
1176
|
+
function Qt(e) {
|
|
1177
|
+
jt = e;
|
|
1178
|
+
}
|
|
1179
|
+
n(Qt, "setTmpSVGG");
|
|
1180
|
+
function Kt(e) {
|
|
1181
|
+
e === "horizontal" ? lt.chartOrientation = "horizontal" : lt.chartOrientation = "vertical";
|
|
1182
|
+
}
|
|
1183
|
+
n(Kt, "setOrientation");
|
|
1184
|
+
function Zt(e) {
|
|
1185
|
+
y.xAxis.title = ut(e.text);
|
|
1186
|
+
}
|
|
1187
|
+
n(Zt, "setXAxisTitle");
|
|
1188
|
+
function Pt(e, t) {
|
|
1189
|
+
y.xAxis = { type: "linear", title: y.xAxis.title, min: e, max: t }, pt = !0;
|
|
1190
|
+
}
|
|
1191
|
+
n(Pt, "setXAxisRangeData");
|
|
1192
|
+
function Jt(e) {
|
|
1193
|
+
y.xAxis = {
|
|
1194
|
+
type: "band",
|
|
1195
|
+
title: y.xAxis.title,
|
|
1196
|
+
categories: e.map((t) => ut(t.text))
|
|
1197
|
+
}, pt = !0;
|
|
1198
|
+
}
|
|
1199
|
+
n(Jt, "setXAxisBand");
|
|
1200
|
+
function ti(e) {
|
|
1201
|
+
y.yAxis.title = ut(e.text);
|
|
1202
|
+
}
|
|
1203
|
+
n(ti, "setYAxisTitle");
|
|
1204
|
+
function ii(e, t) {
|
|
1205
|
+
y.yAxis = { type: "linear", title: y.yAxis.title, min: e, max: t }, Tt = !0;
|
|
1206
|
+
}
|
|
1207
|
+
n(ii, "setYAxisRangeData");
|
|
1208
|
+
function ei(e) {
|
|
1209
|
+
const t = Math.min(...e), i = Math.max(...e), s = j(y.yAxis) ? y.yAxis.min : 1 / 0, a = j(y.yAxis) ? y.yAxis.max : -1 / 0;
|
|
1210
|
+
y.yAxis = {
|
|
1211
|
+
type: "linear",
|
|
1212
|
+
title: y.yAxis.title,
|
|
1213
|
+
min: Math.min(s, t),
|
|
1214
|
+
max: Math.max(a, i)
|
|
1215
|
+
};
|
|
1216
|
+
}
|
|
1217
|
+
n(ei, "setYAxisRangeFromPlotData");
|
|
1218
|
+
function Et(e) {
|
|
1219
|
+
let t = [];
|
|
1220
|
+
if (e.length === 0)
|
|
1221
|
+
return t;
|
|
1222
|
+
if (!pt) {
|
|
1223
|
+
const i = j(y.xAxis) ? y.xAxis.min : 1 / 0, s = j(y.xAxis) ? y.xAxis.max : -1 / 0;
|
|
1224
|
+
Pt(Math.min(i, 1), Math.max(s, e.length));
|
|
1225
|
+
}
|
|
1226
|
+
if (ft(y.xAxis) && e.length > y.xAxis.categories.length && (e = e.slice(0, y.xAxis.categories.length)), Tt || ei(e), ft(y.xAxis) && (t = y.xAxis.categories.map((i, s) => [i, e[s]])), j(y.xAxis)) {
|
|
1227
|
+
const i = y.xAxis.min, s = y.xAxis.max, a = (s - i) / (e.length - 1), o = [];
|
|
1228
|
+
for (let l = i; l <= s; l += a)
|
|
1229
|
+
o.push(`${l}`);
|
|
1230
|
+
t = o.map((l, f) => [l, e[f]]);
|
|
1231
|
+
}
|
|
1232
|
+
return t;
|
|
1233
|
+
}
|
|
1234
|
+
n(Et, "transformDataWithoutCategory");
|
|
1235
|
+
function It(e) {
|
|
1236
|
+
return _t[e === 0 ? 0 : e % _t.length];
|
|
1237
|
+
}
|
|
1238
|
+
n(It, "getPlotColorFromPalette");
|
|
1239
|
+
function si(e, t) {
|
|
1240
|
+
const i = t.map((l) => l.value), s = t.map((l) => l.label ? ut(l.label) : ""), a = Et(i), o = s.some((l) => l !== "");
|
|
1241
|
+
y.plots.push({
|
|
1242
|
+
type: "line",
|
|
1243
|
+
strokeFill: It(ht),
|
|
1244
|
+
strokeWidth: 2,
|
|
1245
|
+
data: a,
|
|
1246
|
+
...o ? { pointLabels: s } : {}
|
|
1247
|
+
}), ht++;
|
|
1248
|
+
}
|
|
1249
|
+
n(si, "setLineData");
|
|
1250
|
+
function ai(e, t) {
|
|
1251
|
+
const i = t.map((a) => a.value), s = Et(i);
|
|
1252
|
+
y.plots.push({
|
|
1253
|
+
type: "bar",
|
|
1254
|
+
fill: It(ht),
|
|
1255
|
+
data: s
|
|
1256
|
+
}), ht++;
|
|
1257
|
+
}
|
|
1258
|
+
n(ai, "setBarData");
|
|
1259
|
+
function ni() {
|
|
1260
|
+
if (y.plots.length === 0)
|
|
1261
|
+
throw Error("No Plot to render, please provide a plot with some data");
|
|
1262
|
+
return y.title = Yt(), Bi.build(lt, y, ct, jt);
|
|
1263
|
+
}
|
|
1264
|
+
n(ni, "getDrawableElem");
|
|
1265
|
+
function oi() {
|
|
1266
|
+
return ct;
|
|
1267
|
+
}
|
|
1268
|
+
n(oi, "getChartThemeConfig");
|
|
1269
|
+
function ri() {
|
|
1270
|
+
return lt;
|
|
1271
|
+
}
|
|
1272
|
+
n(ri, "getChartConfig");
|
|
1273
|
+
function hi() {
|
|
1274
|
+
return y;
|
|
1275
|
+
}
|
|
1276
|
+
n(hi, "getXYChartData");
|
|
1277
|
+
var Vi = /* @__PURE__ */ n(function() {
|
|
1278
|
+
Ai(), ht = 0, lt = vt(), y = Lt(), ct = Dt(), _t = ct.plotColorPalette.split(",").map((e) => e.trim()), pt = !1, Tt = !1;
|
|
1279
|
+
}, "clear"), Oi = {
|
|
1280
|
+
getDrawableElem: ni,
|
|
1281
|
+
clear: Vi,
|
|
1282
|
+
setAccTitle: mi,
|
|
1283
|
+
getAccTitle: pi,
|
|
1284
|
+
setDiagramTitle: fi,
|
|
1285
|
+
getDiagramTitle: Yt,
|
|
1286
|
+
getAccDescription: di,
|
|
1287
|
+
setAccDescription: xi,
|
|
1288
|
+
setOrientation: Kt,
|
|
1289
|
+
setXAxisTitle: Zt,
|
|
1290
|
+
setXAxisRangeData: Pt,
|
|
1291
|
+
setXAxisBand: Jt,
|
|
1292
|
+
setYAxisTitle: ti,
|
|
1293
|
+
setYAxisRangeData: ii,
|
|
1294
|
+
setLineData: si,
|
|
1295
|
+
setBarData: ai,
|
|
1296
|
+
setTmpSVGG: Qt,
|
|
1297
|
+
getChartThemeConfig: oi,
|
|
1298
|
+
getChartConfig: ri,
|
|
1299
|
+
getXYChartData: hi
|
|
1300
|
+
}, Wi = /* @__PURE__ */ n((e, t, i, s) => {
|
|
1301
|
+
const a = s.db, o = a.getChartThemeConfig(), l = a.getChartConfig(), f = a.getXYChartData().plots[0].data.map((m) => m[1]);
|
|
1302
|
+
function d(m) {
|
|
1303
|
+
return m === "top" ? "text-before-edge" : "middle";
|
|
1304
|
+
}
|
|
1305
|
+
n(d, "getDominantBaseLine");
|
|
1306
|
+
function k(m) {
|
|
1307
|
+
return m === "left" ? "start" : m === "right" ? "end" : "middle";
|
|
1308
|
+
}
|
|
1309
|
+
n(k, "getTextAnchor");
|
|
1310
|
+
function T(m) {
|
|
1311
|
+
return `translate(${m.x}, ${m.y}) rotate(${m.rotation || 0})`;
|
|
1312
|
+
}
|
|
1313
|
+
n(T, "getTextTransformation"), Nt.debug(`Rendering xychart chart
|
|
1314
|
+
` + e);
|
|
1315
|
+
const _ = yi(t), b = _.append("g").attr("class", "main"), E = b.append("rect").attr("width", l.width).attr("height", l.height).attr("class", "background");
|
|
1316
|
+
bi(_, l.height, l.width, !0), _.attr("viewBox", `0 0 ${l.width} ${l.height}`), E.attr("fill", o.backgroundColor), a.setTmpSVGG(_.append("g").attr("class", "mermaid-tmp-group"));
|
|
1317
|
+
const L = a.getDrawableElem(), P = {};
|
|
1318
|
+
function I(m) {
|
|
1319
|
+
let D = b, c = "";
|
|
1320
|
+
for (const [B] of m.entries()) {
|
|
1321
|
+
let W = b;
|
|
1322
|
+
B > 0 && P[c] && (W = P[c]), c += m[B], D = P[c], D || (D = P[c] = W.append("g").attr("class", m[B]));
|
|
1323
|
+
}
|
|
1324
|
+
return D;
|
|
1325
|
+
}
|
|
1326
|
+
n(I, "getGroup");
|
|
1327
|
+
for (const m of L) {
|
|
1328
|
+
if (m.data.length === 0)
|
|
1329
|
+
continue;
|
|
1330
|
+
const D = I(m.groupTexts);
|
|
1331
|
+
switch (m.type) {
|
|
1332
|
+
case "rect":
|
|
1333
|
+
if (D.selectAll("rect").data(m.data).enter().append("rect").attr("x", (c) => c.x).attr("y", (c) => c.y).attr("width", (c) => c.width).attr("height", (c) => c.height).attr("fill", (c) => c.fill).attr("stroke", (c) => c.strokeFill).attr("stroke-width", (c) => c.strokeWidth), l.showDataLabel) {
|
|
1334
|
+
const c = l.showDataLabelOutsideBar;
|
|
1335
|
+
if (l.chartOrientation === "horizontal") {
|
|
1336
|
+
let B = function(w, V) {
|
|
1337
|
+
const { data: R, label: ot } = w;
|
|
1338
|
+
return V * ot.length * W <= R.width - X;
|
|
1339
|
+
};
|
|
1340
|
+
n(B, "fitsHorizontally");
|
|
1341
|
+
const W = 0.7, X = 10, Y = m.data.map((w, V) => ({ data: w, label: f[V].toString() })).filter((w) => w.data.width > 0 && w.data.height > 0), S = Y.map((w) => {
|
|
1342
|
+
const { data: V } = w;
|
|
1343
|
+
let R = V.height * 0.7;
|
|
1344
|
+
for (; !B(w, R) && R > 0; )
|
|
1345
|
+
R -= 1;
|
|
1346
|
+
return R;
|
|
1347
|
+
}), H = Math.floor(Math.min(...S)), A = /* @__PURE__ */ n((w) => c ? w.data.x + w.data.width + X : w.data.x + w.data.width - X, "determineLabelXPosition");
|
|
1348
|
+
D.selectAll("text").data(Y).enter().append("text").attr("x", A).attr("y", (w) => w.data.y + w.data.height / 2).attr("text-anchor", c ? "start" : "end").attr("dominant-baseline", "middle").attr("fill", o.dataLabelColor).attr("font-size", `${H}px`).text((w) => w.label);
|
|
1349
|
+
} else {
|
|
1350
|
+
let B = function(A, w, V) {
|
|
1351
|
+
const { data: R, label: ot } = A, F = w * ot.length * 0.7, h = R.x + R.width / 2, u = h - F / 2, g = h + F / 2, x = u >= R.x && g <= R.x + R.width, C = R.y + V + w <= R.y + R.height;
|
|
1352
|
+
return x && C;
|
|
1353
|
+
};
|
|
1354
|
+
n(B, "fitsInBar");
|
|
1355
|
+
const W = 10, X = m.data.map((A, w) => ({ data: A, label: f[w].toString() })).filter((A) => A.data.width > 0 && A.data.height > 0), Y = X.map((A) => {
|
|
1356
|
+
const { data: w, label: V } = A;
|
|
1357
|
+
let R = w.width / (V.length * 0.7);
|
|
1358
|
+
for (; !B(A, R, W) && R > 0; )
|
|
1359
|
+
R -= 1;
|
|
1360
|
+
return R;
|
|
1361
|
+
}), S = Math.floor(Math.min(...Y)), H = /* @__PURE__ */ n((A) => c ? A.data.y - W : A.data.y + W, "determineLabelYPosition");
|
|
1362
|
+
D.selectAll("text").data(X).enter().append("text").attr("x", (A) => A.data.x + A.data.width / 2).attr("y", H).attr("text-anchor", "middle").attr("dominant-baseline", c ? "auto" : "hanging").attr("fill", o.dataLabelColor).attr("font-size", `${S}px`).text((A) => A.label);
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
break;
|
|
1366
|
+
case "text":
|
|
1367
|
+
D.selectAll("text").data(m.data).enter().append("text").attr("x", 0).attr("y", 0).attr("fill", (c) => c.fill).attr("font-size", (c) => c.fontSize).attr("dominant-baseline", (c) => d(c.verticalPos)).attr("text-anchor", (c) => k(c.horizontalPos)).attr("transform", (c) => T(c)).text((c) => c.text);
|
|
1368
|
+
break;
|
|
1369
|
+
case "path":
|
|
1370
|
+
D.selectAll("path").data(m.data).enter().append("path").attr("d", (c) => c.path).attr("fill", (c) => c.fill ? c.fill : "none").attr("stroke", (c) => c.strokeFill).attr("stroke-width", (c) => c.strokeWidth);
|
|
1371
|
+
break;
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
}, "draw"), Fi = {
|
|
1375
|
+
draw: Wi
|
|
1376
|
+
}, ji = {
|
|
1377
|
+
parser: Di,
|
|
1378
|
+
db: Oi,
|
|
1379
|
+
renderer: Fi
|
|
1380
|
+
};
|
|
1381
|
+
export {
|
|
1382
|
+
ji as diagram
|
|
1383
|
+
};
|