@sme.up/ketchup2 2.1.0 → 2.3.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/{arc-Klgb378K.js → arc-D80gVCcI.js} +2 -2
- package/dist/{arc-CqG9Hxdf.cjs → arc-MUYNnJxV.cjs} +1 -1
- package/dist/architecture-7EHR7CIX-Bnyu5zgG.js +3 -0
- package/dist/architecture-7EHR7CIX-CKF7-4kH.cjs +1 -0
- package/dist/architectureDiagram-3BPJPVTR-BrmPrClJ.cjs +36 -0
- package/dist/{architectureDiagram-Q4EWVU46-u2vgZv3N.js → architectureDiagram-3BPJPVTR-EFK4DMha.js} +167 -166
- package/dist/assets/buttonListAssets.d.ts +8 -0
- package/dist/assets/buttonListAssets.d.ts.map +1 -1
- package/dist/basic-components/button/button-types.d.ts +4 -0
- package/dist/basic-components/button/button-types.d.ts.map +1 -1
- package/dist/basic-components/button-dropdown/button-dropdown-types.d.ts +16 -0
- package/dist/basic-components/button-dropdown/button-dropdown-types.d.ts.map +1 -0
- package/dist/basic-components/button-dropdown/button-dropdown.d.ts +4 -0
- package/dist/basic-components/button-dropdown/button-dropdown.d.ts.map +1 -0
- package/dist/basic-components/button-list/button-list-types.d.ts +6 -0
- package/dist/basic-components/button-list/button-list-types.d.ts.map +1 -1
- package/dist/basic-components/button-list/button-list.d.ts.map +1 -1
- package/dist/basic-components/cell/cell-utils.d.ts +13 -5
- package/dist/basic-components/cell/cell-utils.d.ts.map +1 -1
- package/dist/basic-components/cell/cell.d.ts.map +1 -1
- package/dist/basic-components/icon/icon.d.ts.map +1 -1
- package/dist/basic-components/image/image.d.ts.map +1 -1
- package/dist/basic-components/image-cell/image-cell-types.d.ts +12 -3
- package/dist/basic-components/image-cell/image-cell-types.d.ts.map +1 -1
- package/dist/basic-components/image-cell/image-cell.d.ts.map +1 -1
- package/dist/basic-components/input-number/input-number.d.ts.map +1 -1
- package/dist/basic-components/text/text.d.ts.map +1 -1
- package/dist/basic-components/text-editor/text-editor-utils.d.ts +11 -0
- package/dist/basic-components/text-editor/text-editor-utils.d.ts.map +1 -1
- package/dist/basic-components/text-editor/text-editor.d.ts.map +1 -1
- package/dist/basic-components/textarea/textarea-types.d.ts +2 -2
- package/dist/basic-components/textarea/textarea-types.d.ts.map +1 -1
- package/dist/basic-components/textarea/textarea.d.ts.map +1 -1
- package/dist/basic-components/textfield/textfield.d.ts.map +1 -1
- package/dist/{blockDiagram-DXYQGD6D-BpB6_kTP.js → blockDiagram-GPEHLZMM-C3UgY0Z5.js} +999 -877
- package/dist/blockDiagram-GPEHLZMM-CuzoKhJT.cjs +132 -0
- package/dist/{c4Diagram-AHTNJAMY-CX5IjREU.cjs → c4Diagram-AAUBKEIU-DU8uXbgK.cjs} +6 -6
- package/dist/{c4Diagram-AHTNJAMY-B5Z8nO1s.js → c4Diagram-AAUBKEIU-klnmEOUo.js} +279 -279
- package/dist/channel-BbRDdbmM.js +5 -0
- package/dist/channel-intTktDQ.cjs +1 -0
- package/dist/chunk-2J33WTMH-EmvF7iYC.js +25 -0
- package/dist/chunk-2J33WTMH-PlcpVW8G.cjs +1 -0
- package/dist/{chunk-5FUZZQ4R-2kdZJWq2.js → chunk-3OPIFGDE-C7wE5oN7.js} +957 -929
- package/dist/chunk-3OPIFGDE-CT5oNC5X.cjs +62 -0
- package/dist/{chunk-4BX2VUAB-BW54-JWg.js → chunk-4BX2VUAB-BO1KRGb1.js} +1 -1
- package/dist/{chunk-4BX2VUAB-Qba52sxc.cjs → chunk-4BX2VUAB-CtDGlaPx.cjs} +1 -1
- package/dist/{chunk-7N4EOEYR-C-GuhRgW.js → chunk-4EGX6M5U-BMVrizoY.js} +12 -12
- package/dist/{chunk-7N4EOEYR-jNBQwvHx.cjs → chunk-4EGX6M5U-VENLmgBt.cjs} +1 -1
- package/dist/{chunk-55IACEB6-DPatBzu7.cjs → chunk-55IACEB6-VJP3Osm7.cjs} +1 -1
- package/dist/{chunk-55IACEB6-Bu3k0Yz5.js → chunk-55IACEB6-b_Ivgrk-.js} +1 -1
- package/dist/chunk-5DO6E6H7-Cx6Mfbjl.cjs +1 -0
- package/dist/chunk-5DO6E6H7-QuTLwcim.js +23 -0
- package/dist/chunk-5ZQYHXKU-BMnKD7Zq.cjs +2 -0
- package/dist/{chunk-5PVQY5BW-C5U7sJAA.js → chunk-5ZQYHXKU-C4uam08j.js} +527 -461
- package/dist/chunk-727SXJPM-DTmqhRKX.cjs +206 -0
- package/dist/{chunk-4TB4RGXK-CKyHmNcP.js → chunk-727SXJPM-Dof0vDVV.js} +650 -554
- package/dist/{chunk-OYMX7WX6-BCT45RPu.cjs → chunk-AQP2D5EJ-DdWeFQ4O.cjs} +5 -5
- package/dist/{chunk-OYMX7WX6-BQADsxYi.js → chunk-AQP2D5EJ-N9ii4fwJ.js} +349 -339
- package/dist/{chunk-LIHQZDEY-59I4-LWb.js → chunk-BR22UD5L-CS6hURQQ.js} +15 -15
- package/dist/{chunk-LIHQZDEY-CrogR3nT.cjs → chunk-BR22UD5L-wI1vkyAT.cjs} +1 -1
- package/dist/{chunk-BSJP7CBP-oNTXVRA7.js → chunk-BSJP7CBP-Bx5APwBA.js} +1 -1
- package/dist/{chunk-BSJP7CBP-CFzYPvgr.cjs → chunk-BSJP7CBP-CaeBFqNU.cjs} +1 -1
- package/dist/{chunk-ICPOFSXX-Sn6LWD0k.js → chunk-CSCIHK7Q-9WKhcDqw.js} +558 -460
- package/dist/chunk-CSCIHK7Q-BPMuICCz.cjs +123 -0
- package/dist/chunk-FHYWG6QK-CfRqYwCI.js +23 -0
- package/dist/chunk-FHYWG6QK-DxmnARsZ.cjs +1 -0
- package/dist/{chunk-FMBD7UC4-RRSc9jqt.js → chunk-FMBD7UC4-BbggSGOg.js} +1 -1
- package/dist/{chunk-FMBD7UC4-CS9_r76V.cjs → chunk-FMBD7UC4-CiO_59ls.cjs} +1 -1
- package/dist/{chunk-ENJZ2VHE-BluGQPyl.js → chunk-KSCS5N6A-BY1s4eGg.js} +205 -205
- package/dist/chunk-KSCS5N6A-DO8jEi0y.cjs +10 -0
- package/dist/{chunk-ZZ45TVLE-AQQsnXy4.cjs → chunk-L5ZTLDWV-BE9udiOh.cjs} +1 -1
- package/dist/{chunk-ZZ45TVLE-CIYrdg-O.js → chunk-L5ZTLDWV-D3UwMopa.js} +8 -8
- package/dist/{chunk-336JU56O-CuXRn1VH.cjs → chunk-LZXEDZCA-Dpz_wx3M.cjs} +1 -1
- package/dist/{chunk-336JU56O-xKPgkG3O.js → chunk-LZXEDZCA-KzBFuWPU.js} +18 -18
- package/dist/chunk-MPE355IW-4bpROspE.js +23 -0
- package/dist/chunk-MPE355IW-CxPw_dPP.cjs +1 -0
- package/dist/chunk-MZUSXYTE-DA5mUG5B.js +30 -0
- package/dist/chunk-MZUSXYTE-DIg1BPts.cjs +1 -0
- package/dist/chunk-N66VUXT2-DSbygtq1.cjs +1 -0
- package/dist/chunk-N66VUXT2-pDZ1b-B3.js +54 -0
- package/dist/{chunk-YZCP3GAM-9K9WNdyN.js → chunk-ND2GUHAM-CHTke4K8.js} +17 -17
- package/dist/{chunk-YZCP3GAM-BmaAafMm.cjs → chunk-ND2GUHAM-DdBSZTft.cjs} +1 -1
- package/dist/chunk-NNHCCRGN-D_orSz6n.js +20630 -0
- package/dist/chunk-NNHCCRGN-aKMHXBzL.cjs +159 -0
- package/dist/{chunk-X2U36JSP-CY7mJR8m.js → chunk-NZK2D7GU-BVOINLmx.js} +13 -13
- package/dist/{chunk-X2U36JSP-D1RYKjVc.cjs → chunk-NZK2D7GU-_twqedIe.cjs} +1 -1
- package/dist/{chunk-U2HBQHQK-D0AoQWxK.cjs → chunk-O5CBEL6O-CDvi2oZo.cjs} +6 -6
- package/dist/{chunk-U2HBQHQK-BZ3YFMXB.js → chunk-O5CBEL6O-VsMF4aZB.js} +108 -108
- package/dist/chunk-PUPMXCY4-CKjhJQnN.js +23 -0
- package/dist/chunk-PUPMXCY4-DsS_t57r.cjs +1 -0
- package/dist/{chunk-QZHKN3VN-CSMKL2rB.cjs → chunk-QZHKN3VN-CHjRGMI2.cjs} +1 -1
- package/dist/{chunk-QZHKN3VN-Bx8I6l3c.js → chunk-QZHKN3VN-DCddt14Q.js} +1 -1
- package/dist/chunk-UIBZB4QT-BZf7vqd9.cjs +1 -0
- package/dist/chunk-UIBZB4QT-BvFllM0Q.js +23 -0
- package/dist/chunk-WCWK7LTN-D_C1as0Y.js +31 -0
- package/dist/chunk-WCWK7LTN-Dl2uC9ZD.cjs +1 -0
- package/dist/chunk-WU5MYG2G-DgyP9QDj.cjs +1 -0
- package/dist/chunk-WU5MYG2G-mQn7Wt-i.js +9 -0
- package/dist/{chunk-XPW4576I-BcWkx-AL.js → chunk-XPW4576I-BCowsgDU.js} +1 -1
- package/dist/{chunk-XPW4576I-D8Pp6a3j.cjs → chunk-XPW4576I-D_mwgMVU.cjs} +1 -1
- package/dist/classDiagram-4FO5ZUOK-5DyhpZRK.cjs +1 -0
- package/dist/classDiagram-4FO5ZUOK-BHGLQIkz.js +29 -0
- package/dist/classDiagram-v2-Q7XG4LA2-CCAbBo05.js +29 -0
- package/dist/classDiagram-v2-Q7XG4LA2-D4TX4CLT.cjs +1 -0
- package/dist/components/dash-list/assets/dash-list.data.d.ts +1 -0
- package/dist/components/dash-list/assets/dash-list.data.d.ts.map +1 -1
- package/dist/components/dash-list/dash-list-types.d.ts +1 -0
- package/dist/components/dash-list/dash-list-types.d.ts.map +1 -1
- package/dist/components/dash-list/dash-list.d.ts.map +1 -1
- package/dist/components/dash-list/dash-list.utils.d.ts +0 -3
- package/dist/components/dash-list/dash-list.utils.d.ts.map +1 -1
- package/dist/components/drawer/drawer-types.d.ts +4 -0
- package/dist/components/drawer/drawer-types.d.ts.map +1 -1
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/htm/htm-types.d.ts +4 -0
- package/dist/components/htm/htm-types.d.ts.map +1 -1
- package/dist/components/htm/htm.d.ts.map +1 -1
- package/dist/components/image-list/components/items/image-list-item.d.ts.map +1 -1
- package/dist/components/input-panel/input-panel-utils.d.ts.map +1 -1
- package/dist/components/pdf/pdf-types.d.ts +8 -0
- package/dist/components/pdf/pdf-types.d.ts.map +1 -1
- package/dist/components/pdf/pdf-utils.d.ts +1 -1
- package/dist/components/pdf/pdf-utils.d.ts.map +1 -1
- package/dist/components/pdf/pdf.d.ts.map +1 -1
- package/dist/components/planner/planner-assets.d.ts +2 -2
- package/dist/components/planner/planner-assets.d.ts.map +1 -1
- package/dist/components/planner/planner-types.d.ts +1 -1
- package/dist/components/planner/planner-types.d.ts.map +1 -1
- package/dist/components/planner/planner-utils.d.ts +7 -5
- package/dist/components/planner/planner-utils.d.ts.map +1 -1
- package/dist/components/planner/planner.d.ts.map +1 -1
- package/dist/components/scaffold/context/scaffold-provider.d.ts.map +1 -1
- package/dist/components/scaffold/scaffold-types.d.ts +1 -0
- package/dist/components/scaffold/scaffold-types.d.ts.map +1 -1
- package/dist/components/timeline/timeline-types.d.ts +6 -2
- package/dist/components/timeline/timeline-types.d.ts.map +1 -1
- package/dist/components/timeline/timeline.d.ts.map +1 -1
- package/dist/components/toolbar/toolbar.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip-assets.d.ts +1 -0
- package/dist/components/tooltip/tooltip-assets.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip-types.d.ts +4 -16
- package/dist/components/tooltip/tooltip-types.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/{cose-bilkent-S5V4N54A-B30Rh9DR.js → cose-bilkent-S5V4N54A-Bfb7U01p.js} +26 -27
- package/dist/cose-bilkent-S5V4N54A-CE-7Sw0Y.cjs +1 -0
- package/dist/dagre-BM42HDAG-BhbA1R8l.cjs +4 -0
- package/dist/dagre-BM42HDAG-D87Rv2R4.js +297 -0
- package/dist/dagre-CC68z3y6.cjs +1 -0
- package/dist/dagre-Cg4CV48I.js +1936 -0
- package/dist/diagram-2AECGRRQ-C6vI3yau.cjs +43 -0
- package/dist/{diagram-MMDJMWI5-DUUVPi55.js → diagram-2AECGRRQ-OSYCK0tv.js} +36 -36
- package/dist/diagram-5GNKFQAL-BS9rRMAe.cjs +10 -0
- package/dist/diagram-5GNKFQAL-DnquluB9.js +101 -0
- package/dist/diagram-KO2AKTUF-CFi6eQYd.js +431 -0
- package/dist/diagram-KO2AKTUF-CjA_KTJj.cjs +3 -0
- package/dist/{diagram-TYMM5635-Cpj8wfoJ.js → diagram-LMA3HP47-Cwm5bzeM.js} +38 -38
- package/dist/diagram-LMA3HP47-DBwSTp2j.cjs +24 -0
- package/dist/diagram-OG6HWLK6-BdLnbUYy.cjs +24 -0
- package/dist/{diagram-G4DWMVQ6-BkQnbCLv.js → diagram-OG6HWLK6-DvGk1j55.js} +93 -93
- package/dist/{dist-DL30VIBI.js → dist-9MKIBfY4.js} +1 -1
- package/dist/dist-DC1YYeHc.cjs +1 -0
- package/dist/{erDiagram-SMLLAGMA-D_ByPk0C.js → erDiagram-TEJ5UH35-B17mqgD_.js} +164 -164
- package/dist/erDiagram-TEJ5UH35-NlRiP_bX.cjs +85 -0
- package/dist/eventmodeling-FCH6USID-BVaFiLQO.js +3 -0
- package/dist/eventmodeling-FCH6USID-leiC8dtX.cjs +1 -0
- package/dist/{flowDiagram-DWJPFMVM-BWrkDnqc.js → flowDiagram-I6XJVG4X-C2G6Tgw_.js} +444 -444
- package/dist/{flowDiagram-DWJPFMVM-BbK42NaF.cjs → flowDiagram-I6XJVG4X-ChI_6giU.cjs} +9 -9
- package/dist/functional-components/action/action-types.d.ts +26 -1
- package/dist/functional-components/action/action-types.d.ts.map +1 -1
- package/dist/functional-components/action/action-utils.d.ts +13 -1
- package/dist/functional-components/action/action-utils.d.ts.map +1 -1
- package/dist/functional-components/action/action.d.ts.map +1 -1
- package/dist/functional-components/action-list/action-list.d.ts.map +1 -1
- package/dist/functional-components/action-list/dual-list/dual-list.d.ts.map +1 -1
- package/dist/functional-components/timeline-engine/components/gantt/bar/gantt-bar.d.ts +18 -0
- package/dist/functional-components/timeline-engine/components/gantt/bar/gantt-bar.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/components/gantt/farrow/gantt-farrow-utils.d.ts +106 -0
- package/dist/functional-components/timeline-engine/components/gantt/farrow/gantt-farrow-utils.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/components/gantt/farrow/gantt-farrow-utils.test.d.ts +2 -0
- package/dist/functional-components/timeline-engine/components/gantt/farrow/gantt-farrow-utils.test.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/components/gantt/farrow/gantt-farrow.d.ts +38 -0
- package/dist/functional-components/timeline-engine/components/gantt/farrow/gantt-farrow.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/components/gantt/gantt-assets.d.ts +60 -0
- package/dist/functional-components/timeline-engine/components/gantt/gantt-assets.d.ts.map +1 -0
- package/dist/functional-components/{gantt → timeline-engine/components/gantt}/gantt.d.ts +3 -3
- package/dist/functional-components/timeline-engine/components/gantt/gantt.d.ts.map +1 -0
- package/dist/functional-components/{gantt → timeline-engine/components/gantt}/grid/gantt-grid.d.ts +3 -5
- package/dist/functional-components/timeline-engine/components/gantt/grid/gantt-grid.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/components/gantt/header/gantt-header.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/components/gantt/today-indicator/gantt-today-indicator.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/components/gantt/types/gantt-types.d.ts +79 -0
- package/dist/functional-components/timeline-engine/components/gantt/types/gantt-types.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/components/task-list/task-list-types.d.ts +27 -0
- package/dist/functional-components/timeline-engine/components/task-list/task-list-types.d.ts.map +1 -0
- package/dist/functional-components/{task-list → timeline-engine/components/task-list}/task-list-utils.d.ts +4 -4
- package/dist/functional-components/timeline-engine/components/task-list/task-list-utils.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/components/task-list/task-list.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/timeline-engine-types.d.ts +28 -0
- package/dist/functional-components/timeline-engine/timeline-engine-types.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/timeline-engine-utils.d.ts +143 -0
- package/dist/functional-components/timeline-engine/timeline-engine-utils.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/timeline-engine-utils.test.d.ts +2 -0
- package/dist/functional-components/timeline-engine/timeline-engine-utils.test.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/timeline-engine.d.ts +8 -0
- package/dist/functional-components/timeline-engine/timeline-engine.d.ts.map +1 -0
- package/dist/ganttDiagram-6RSMTGT7-B0DHqd7u.cjs +292 -0
- package/dist/{ganttDiagram-T4ZO3ILL-LuaYkUvj.js → ganttDiagram-6RSMTGT7-Bb6bqcaS.js} +278 -276
- package/dist/gitGraph-WXDBUCRP-BFFuTWG4.cjs +1 -0
- package/dist/gitGraph-WXDBUCRP-Fz2kRwJ-.js +3 -0
- package/dist/gitGraphDiagram-PVQCEYII-BzbgPrwe.cjs +106 -0
- package/dist/{gitGraphDiagram-UUTBAWPF-DKkENwcV.js → gitGraphDiagram-PVQCEYII-DiJUr7lO.js} +255 -255
- package/dist/graphlib-B1zohIOM.js +1266 -0
- package/dist/graphlib-B5AXIZA4.cjs +1 -0
- package/dist/hooks/useFloating.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useGanttMath.d.ts +1 -1
- package/dist/hooks/useGanttMath.d.ts.map +1 -1
- package/dist/hooks/useVirtualListScroll.d.ts.map +1 -1
- package/dist/info-J43DQDTF-CLRXRK49.js +3 -0
- package/dist/info-J43DQDTF-CmpcAuH-.cjs +1 -0
- package/dist/infoDiagram-5YYISTIA-C8P9DHlE.js +19 -0
- package/dist/infoDiagram-5YYISTIA-fhwEAAjF.cjs +2 -0
- package/dist/{ishikawaDiagram-UXIWVN3A-Cl3Ivm8H.cjs → ishikawaDiagram-YF4QCWOH-j6IZz59g.cjs} +6 -6
- package/dist/{ishikawaDiagram-UXIWVN3A-DqbVPChK.js → ishikawaDiagram-YF4QCWOH-rqNbTKZp.js} +134 -134
- package/dist/{journeyDiagram-VCZTEJTY-XRc0J8gM.cjs → journeyDiagram-JHISSGLW-BhHdd4y3.cjs} +6 -6
- package/dist/{journeyDiagram-VCZTEJTY-DudduR0c.js → journeyDiagram-JHISSGLW-peUJlm3L.js} +180 -180
- package/dist/{kanban-definition-6JOO6SKY-DzEqE64J.js → kanban-definition-UN3LZRKU-DLxDqiQn.js} +151 -151
- package/dist/{kanban-definition-6JOO6SKY-Br87atRc.cjs → kanban-definition-UN3LZRKU-TUg1x5yJ.cjs} +8 -8
- package/dist/{katex-SAH56fvc.cjs → katex-HkVgAsLB.cjs} +1 -1
- package/dist/ketchup2.cjs.js +110 -106
- package/dist/ketchup2.css +1 -1
- package/dist/ketchup2.es.js +68073 -69871
- package/dist/{line-JyRBGWft.js → line-BhAnxCE8.js} +3 -3
- package/dist/line-CpcTW4h-.cjs +1 -0
- package/dist/{linear-CxHa1DsM.cjs → linear-D0eFmsG1.cjs} +1 -1
- package/dist/{linear-BsPvNLJv.js → linear-lSeWuvgy.js} +3 -3
- package/dist/{mermaid-parser.core-CERDf-UG.js → mermaid-parser.core-Dz33ts1l.js} +24 -19
- package/dist/mermaid-parser.core-HQxPJrkY.cjs +3 -0
- package/dist/{mindmap-definition-QFDTVHPH-BCq8zmLt.cjs → mindmap-definition-RKZ34NQL-D9BOsg5W.cjs} +29 -29
- package/dist/{mindmap-definition-QFDTVHPH-NGjPQ5SM.js → mindmap-definition-RKZ34NQL-DHkmUkxh.js} +148 -148
- package/dist/{ordinal-Civr0hZL.cjs → ordinal-BnUYNBtU.cjs} +1 -1
- package/dist/{ordinal-C-VoL0XF.js → ordinal-MD9_ORcM.js} +1 -1
- package/dist/packet-YPE3B663-BwjweAZY.cjs +1 -0
- package/dist/packet-YPE3B663-D1Hr9AQm.js +3 -0
- package/dist/pie-LRSECV5Y-CpDfN1P0.js +3 -0
- package/dist/pie-LRSECV5Y-I1-OkIXi.cjs +1 -0
- package/dist/{pieDiagram-DEJITSTG-DTeyzHmB.js → pieDiagram-4H26LBE5-ByA7ytZx.js} +40 -40
- package/dist/pieDiagram-4H26LBE5-CrLJh4L9.cjs +30 -0
- package/dist/{quadrantDiagram-34T5L4WZ-CCcJIf91.js → quadrantDiagram-W4KKPZXB-CHHpmu1l.js} +547 -520
- package/dist/quadrantDiagram-W4KKPZXB-CalC_db_.cjs +7 -0
- package/dist/radar-GUYGQ44K-BXt3oO8c.cjs +1 -0
- package/dist/radar-GUYGQ44K-ByzrmbOz.js +3 -0
- package/dist/{requirementDiagram-MS252O5E-BdOanuYe.js → requirementDiagram-4Y6WPE33-BVcDFSx8.js} +165 -165
- package/dist/requirementDiagram-4Y6WPE33-SsePLT8d.cjs +84 -0
- package/dist/sankeyDiagram-5OEKKPKP-BgvTZ7jd.cjs +40 -0
- package/dist/{sankeyDiagram-XADWPNL6-3wviN_U4.js → sankeyDiagram-5OEKKPKP-C-ODz9lV.js} +202 -153
- package/dist/{sequenceDiagram-FGHM5R23-DC8SjhFN.js → sequenceDiagram-3UESZ5HK-Cnc0aDO4.js} +786 -779
- package/dist/sequenceDiagram-3UESZ5HK-DEVLteqD.cjs +162 -0
- package/dist/src-BgvDIw01.cjs +1 -0
- package/dist/{src-BQiFKP24.js → src-v9RrE_4h.js} +578 -563
- package/dist/stateDiagram-AJRCARHV-CuHe6Iji.js +217 -0
- package/dist/stateDiagram-AJRCARHV-D_yPvIRw.cjs +1 -0
- package/dist/stateDiagram-v2-BHNVJYJU-CTnE6fOT.cjs +1 -0
- package/dist/stateDiagram-v2-BHNVJYJU-DqstYMSl.js +27 -0
- package/dist/{timeline-definition-GMOUNBTQ-CBnYBWN0.js → timeline-definition-PNZ67QCA-Bj1BItRB.js} +324 -324
- package/dist/{timeline-definition-GMOUNBTQ-DWpngnE4.cjs → timeline-definition-PNZ67QCA-Cynbc96w.cjs} +48 -48
- package/dist/treeView-BLDUP644-CxLhpd93.js +3 -0
- package/dist/treeView-BLDUP644-DMwVx0AR.cjs +1 -0
- package/dist/treemap-LRROVOQU-BqmiLdFI.js +3 -0
- package/dist/treemap-LRROVOQU-XhaFZdvI.cjs +1 -0
- package/dist/types/data-structures.d.ts +9 -1
- package/dist/types/data-structures.d.ts.map +1 -1
- package/dist/utils/data-structures.d.ts +2 -0
- package/dist/utils/data-structures.d.ts.map +1 -1
- package/dist/utils/style.d.ts +13 -2
- package/dist/utils/style.d.ts.map +1 -1
- package/dist/v4-BpDBEhLK.js +30 -0
- package/dist/v4-CA8ev9YY.cjs +1 -0
- package/dist/{vennDiagram-DHZGUBPP-M-kkEkXj.js → vennDiagram-CIIHVFJN-CdmcxixA.js} +192 -192
- package/dist/vennDiagram-CIIHVFJN-Dm4D6omA.cjs +34 -0
- package/dist/wardley-L42UT6IY-C7UjBmVh.js +3 -0
- package/dist/wardley-L42UT6IY-DFAYOpjD.cjs +1 -0
- package/dist/{wardleyDiagram-NUSXRM2D-thoOuA_D.cjs → wardleyDiagram-YWT4CUSO-C-DdutxP.cjs} +61 -3
- package/dist/{wardleyDiagram-NUSXRM2D-CUX1SYhw.js → wardleyDiagram-YWT4CUSO-D1o116Wi.js} +272 -206
- package/dist/{xychartDiagram-5P7HB3ND-1cXRZ1bi.js → xychartDiagram-2RQKCTM6-Byw7djcg.js} +213 -213
- package/dist/{xychartDiagram-5P7HB3ND-BF2WmJ4-.cjs → xychartDiagram-2RQKCTM6-D0D4PIQS.cjs} +6 -6
- package/package.json +1 -1
- package/dist/architecture-YZFGNWBL-BRqToLcm.js +0 -3
- package/dist/architecture-YZFGNWBL-BTOWQWD9.cjs +0 -1
- package/dist/architectureDiagram-Q4EWVU46-JSjagcXX.cjs +0 -36
- package/dist/blockDiagram-DXYQGD6D-DlcDXSwH.cjs +0 -132
- package/dist/channel-BY9Lkyz7.cjs +0 -1
- package/dist/channel-BqNr2cYO.js +0 -5
- package/dist/chunk-2KRD3SAO-Ca3zDQyj.js +0 -23
- package/dist/chunk-2KRD3SAO-oZrIWZvV.cjs +0 -1
- package/dist/chunk-426QAEUC-Df31vuwu.cjs +0 -1
- package/dist/chunk-426QAEUC-JjFVHKYG.js +0 -9
- package/dist/chunk-4TB4RGXK-DdKJIFS5.cjs +0 -206
- package/dist/chunk-5FUZZQ4R-D_vnCbAb.cjs +0 -62
- package/dist/chunk-5PVQY5BW-CfQDYQZt.cjs +0 -2
- package/dist/chunk-67CJDMHE-2Qg7i1xJ.cjs +0 -1
- package/dist/chunk-67CJDMHE-YMBkJcAO.js +0 -23
- package/dist/chunk-AA7GKIK3-B_ZB6dou.js +0 -30
- package/dist/chunk-AA7GKIK3-dqnTmnvO.cjs +0 -1
- package/dist/chunk-CIAEETIT-ClHUj0Su.cjs +0 -1
- package/dist/chunk-CIAEETIT-XlxsAz-4.js +0 -23
- package/dist/chunk-D-IZpNpi.cjs +0 -1
- package/dist/chunk-EDXVE4YY-BZsJORf8.cjs +0 -1
- package/dist/chunk-EDXVE4YY-Bzf4FU3i.js +0 -25
- package/dist/chunk-ENJZ2VHE-CwgVASaU.cjs +0 -10
- package/dist/chunk-FOC6F5B3-DcZs851j.cjs +0 -1
- package/dist/chunk-FOC6F5B3-E9n6-juB.js +0 -23
- package/dist/chunk-ICPOFSXX-CoaJw-IT.cjs +0 -122
- package/dist/chunk-K5T4RW27-BzDQkjC7.cjs +0 -94
- package/dist/chunk-K5T4RW27-DY7TOEqa.js +0 -16070
- package/dist/chunk-KGLVRYIC-5OJpfQCj.js +0 -23
- package/dist/chunk-KGLVRYIC-DnbIkai8.cjs +0 -1
- package/dist/chunk-ORNJ4GCN-CcrEtiCn.cjs +0 -1
- package/dist/chunk-ORNJ4GCN-CwkOSFbS.js +0 -31
- package/dist/chunk-WQLz0Won.js +0 -20
- package/dist/classDiagram-6PBFFD2Q-B6betnLH.cjs +0 -1
- package/dist/classDiagram-6PBFFD2Q-XGxl_AeB.js +0 -29
- package/dist/classDiagram-v2-HSJHXN6E-CwayYG4G.js +0 -29
- package/dist/classDiagram-v2-HSJHXN6E-Dda8WDvn.cjs +0 -1
- package/dist/clone-Dn__H8fX.js +0 -8
- package/dist/clone-lShkT11Q.cjs +0 -1
- package/dist/cose-bilkent-S5V4N54A-Bhdp-wcb.cjs +0 -1
- package/dist/dagre-BjnWDdkw.cjs +0 -1
- package/dist/dagre-DVLnxd7n.js +0 -1606
- package/dist/dagre-KV5264BT-BjqayRYC.js +0 -293
- package/dist/dagre-KV5264BT-BvInGAUC.cjs +0 -4
- package/dist/diagram-5BDNPKRD-Bk7depC0.js +0 -101
- package/dist/diagram-5BDNPKRD-D6EXksHo.cjs +0 -10
- package/dist/diagram-G4DWMVQ6-CJASbR70.cjs +0 -24
- package/dist/diagram-MMDJMWI5-DEt7jQx9.cjs +0 -43
- package/dist/diagram-TYMM5635-5auoAFCi.cjs +0 -24
- package/dist/dist-BgvMZbfo.cjs +0 -1
- package/dist/erDiagram-SMLLAGMA-DVUT6TBy.cjs +0 -85
- package/dist/flatten-BE1bWL-7.js +0 -40
- package/dist/flatten-DxvYSoR8.cjs +0 -1
- package/dist/functional-components/gantt/bar/gantt-bar.d.ts +0 -17
- package/dist/functional-components/gantt/bar/gantt-bar.d.ts.map +0 -1
- package/dist/functional-components/gantt/gantt-assets.d.ts +0 -55
- package/dist/functional-components/gantt/gantt-assets.d.ts.map +0 -1
- package/dist/functional-components/gantt/gantt.d.ts.map +0 -1
- package/dist/functional-components/gantt/grid/gantt-grid.d.ts.map +0 -1
- package/dist/functional-components/gantt/header/gantt-header.d.ts.map +0 -1
- package/dist/functional-components/gantt/today-indicator/gantt-today-indicator.d.ts.map +0 -1
- package/dist/functional-components/gantt/types/gantt-types.d.ts +0 -47
- package/dist/functional-components/gantt/types/gantt-types.d.ts.map +0 -1
- package/dist/functional-components/task-list/task-list-types.d.ts +0 -22
- package/dist/functional-components/task-list/task-list-types.d.ts.map +0 -1
- package/dist/functional-components/task-list/task-list-utils.d.ts.map +0 -1
- package/dist/functional-components/task-list/task-list.d.ts.map +0 -1
- package/dist/ganttDiagram-T4ZO3ILL-DUi8jF9H.cjs +0 -292
- package/dist/gitGraph-7Q5UKJZL-DZea3ltD.cjs +0 -1
- package/dist/gitGraph-7Q5UKJZL-sjlqDwJ_.js +0 -3
- package/dist/gitGraphDiagram-UUTBAWPF-D-tMWUQ1.cjs +0 -106
- package/dist/graphlib-Cpifseqb.js +0 -373
- package/dist/graphlib-HdfvGLpV.cjs +0 -1
- package/dist/hooks/usePlannerSync.d.ts +0 -11
- package/dist/hooks/usePlannerSync.d.ts.map +0 -1
- package/dist/identity-KQSjemTb.cjs +0 -1
- package/dist/identity-g0dsMjx7.js +0 -393
- package/dist/info-OMHHGYJF-Bk0VWVNW.js +0 -3
- package/dist/info-OMHHGYJF-C8QtwF0k.cjs +0 -1
- package/dist/infoDiagram-42DDH7IO-CH5xHj8H.cjs +0 -2
- package/dist/infoDiagram-42DDH7IO-CLkQPFe0.js +0 -19
- package/dist/isEmpty-CA3kJuev.cjs +0 -1
- package/dist/isEmpty-RwX-oIQS.js +0 -35
- package/dist/line-BbHmiwbs.cjs +0 -1
- package/dist/mermaid-parser.core-DHpvGOZR.cjs +0 -3
- package/dist/packet-4T2RLAQJ-X0BMsNFj.js +0 -3
- package/dist/packet-4T2RLAQJ-lvmQnXPI.cjs +0 -1
- package/dist/pie-ZZUOXDRM-CJ_fU5k1.js +0 -3
- package/dist/pie-ZZUOXDRM-Dp4APKqR.cjs +0 -1
- package/dist/pieDiagram-DEJITSTG-CK4xy0PS.cjs +0 -30
- package/dist/quadrantDiagram-34T5L4WZ-D-_iiK79.cjs +0 -7
- package/dist/radar-PYXPWWZC-BHWJy_E1.cjs +0 -1
- package/dist/radar-PYXPWWZC-DgZIW9Ah.js +0 -3
- package/dist/reduce-B7WW9rkU.cjs +0 -1
- package/dist/reduce-DNnkcf3M.js +0 -532
- package/dist/requirementDiagram-MS252O5E-EfY029Xj.cjs +0 -84
- package/dist/sankeyDiagram-XADWPNL6-3jlM2UcU.cjs +0 -10
- package/dist/sequenceDiagram-FGHM5R23-lK1G3QLN.cjs +0 -157
- package/dist/src-DFxq-N5I.cjs +0 -1
- package/dist/stateDiagram-FHFEXIEX-DnkzFphf.js +0 -217
- package/dist/stateDiagram-FHFEXIEX-DsQigFuR.cjs +0 -1
- package/dist/stateDiagram-v2-QKLJ7IA2-2v8JiIJr.js +0 -27
- package/dist/stateDiagram-v2-QKLJ7IA2-UKKfWPoT.cjs +0 -1
- package/dist/treeView-SZITEDCU-CT5vX0q9.cjs +0 -1
- package/dist/treeView-SZITEDCU-Df3xzFtO.js +0 -3
- package/dist/treemap-W4RFUUIX-Bk_jVZ7D.cjs +0 -1
- package/dist/treemap-W4RFUUIX-ClUtdSdn.js +0 -3
- package/dist/utils/wbs-utils.d.ts +0 -143
- package/dist/utils/wbs-utils.d.ts.map +0 -1
- package/dist/v4-6yr83DbP.cjs +0 -1
- package/dist/v4-BR71w5_q.js +0 -33
- package/dist/vennDiagram-DHZGUBPP-D-kj-sVU.cjs +0 -34
- package/dist/wardley-RL74JXVD-BtHQbnUy.js +0 -3
- package/dist/wardley-RL74JXVD-y8RO5Iqv.cjs +0 -1
- /package/dist/{array-D8NZ46Ht.js → array-CBdkHBGa.js} +0 -0
- /package/dist/{array-Dxz0O8Q3.cjs → array-Cx1JwiGD.cjs} +0 -0
- /package/dist/{cytoscape.esm-CrBwLFXE.cjs → cytoscape.esm-BzblyxzZ.cjs} +0 -0
- /package/dist/{cytoscape.esm-CPjF_mSK.js → cytoscape.esm-VShrX2U1.js} +0 -0
- /package/dist/{defaultLocale-DtzyZW63.cjs → defaultLocale-Bj_Ndo9V.cjs} +0 -0
- /package/dist/{defaultLocale-Dcyuaxxg.js → defaultLocale-dGy1YRID.js} +0 -0
- /package/dist/functional-components/{gantt → timeline-engine/components/gantt}/header/gantt-header.d.ts +0 -0
- /package/dist/functional-components/{gantt → timeline-engine/components/gantt}/today-indicator/gantt-today-indicator.d.ts +0 -0
- /package/dist/functional-components/{task-list → timeline-engine/components/task-list}/task-list.d.ts +0 -0
- /package/dist/{init-BO60vQHJ.js → init-B7h4SEX5.js} +0 -0
- /package/dist/{init-B2MubQrj.cjs → init-CEL65JUo.cjs} +0 -0
- /package/dist/{katex-Du5WiYIy.js → katex-DWDh1q_h.js} +0 -0
- /package/dist/{path-CvfwEr8y.js → path-CAXMhBzK.js} +0 -0
- /package/dist/{path-Civic7PQ.cjs → path-CRahBUHI.cjs} +0 -0
- /package/dist/{rough.esm-BLKo1fIQ.cjs → rough.esm-BEA_SCZB.cjs} +0 -0
- /package/dist/{rough.esm-1mqTSjCt.js → rough.esm-TWNWL4Us.js} +0 -0
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { g as c,
|
|
3
|
-
import {
|
|
4
|
-
import { n as m, t as h } from "./chunk-
|
|
5
|
-
import { a as g, i as _, r as v, t as y } from "./chunk-
|
|
6
|
-
import { n as b, r as x } from "./chunk-
|
|
7
|
-
import { t as S } from "./rough.esm-
|
|
8
|
-
//#region node_modules/mermaid/dist/chunks/mermaid.core/chunk-
|
|
9
|
-
var C = /* @__PURE__ */
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
let m = !!
|
|
15
|
-
useHtmlLabels:
|
|
16
|
-
width:
|
|
1
|
+
import { g as e, h as t, p as n } from "./src-v9RrE_4h.js";
|
|
2
|
+
import { A as r, B as i, M as a, T as o, b as s, g as c, x as l, z as u } from "./chunk-CSCIHK7Q-9WKhcDqw.js";
|
|
3
|
+
import { a as d, r as f, u as p } from "./chunk-5ZQYHXKU-C4uam08j.js";
|
|
4
|
+
import { n as m, t as h } from "./chunk-L5ZTLDWV-D3UwMopa.js";
|
|
5
|
+
import { a as g, i as _, r as v, t as y } from "./chunk-NZK2D7GU-BVOINLmx.js";
|
|
6
|
+
import { n as b, r as x } from "./chunk-O5CBEL6O-VsMF4aZB.js";
|
|
7
|
+
import { t as S } from "./rough.esm-TWNWL4Us.js";
|
|
8
|
+
//#region node_modules/mermaid/dist/chunks/mermaid.core/chunk-3OPIFGDE.mjs
|
|
9
|
+
var C = /* @__PURE__ */ t(async (e, t, r) => {
|
|
10
|
+
let i, a = t.useHtmlLabels || c(l()?.htmlLabels);
|
|
11
|
+
i = r || "node default";
|
|
12
|
+
let o = e.insert("g").attr("class", i).attr("id", t.domId || t.id), s = o.insert("g").attr("class", "label").attr("style", p(t.labelStyle)), f;
|
|
13
|
+
f = t.label === void 0 ? "" : typeof t.label == "string" ? t.label : t.label[0];
|
|
14
|
+
let m = !!t.icon || !!t.img, g = t.labelType === "markdown", _ = await b(s, u(d(f), l()), {
|
|
15
|
+
useHtmlLabels: a,
|
|
16
|
+
width: t.width || l().flowchart?.wrappingWidth,
|
|
17
17
|
classes: g ? "markdown-node-label" : "",
|
|
18
|
-
style:
|
|
18
|
+
style: t.labelStyle,
|
|
19
19
|
addSvgBackground: m,
|
|
20
20
|
markdown: g
|
|
21
|
-
},
|
|
22
|
-
if (
|
|
23
|
-
let e = _.children[0], t =
|
|
24
|
-
await h(e,
|
|
21
|
+
}, l()), v = _.getBBox(), y = (t?.padding ?? 0) / 2;
|
|
22
|
+
if (a) {
|
|
23
|
+
let e = _.children[0], t = n(_);
|
|
24
|
+
await h(e, f), v = e.getBoundingClientRect(), t.attr("width", v.width), t.attr("height", v.height);
|
|
25
25
|
}
|
|
26
|
-
return
|
|
27
|
-
shapeSvg:
|
|
26
|
+
return a ? s.attr("transform", "translate(" + -v.width / 2 + ", " + -v.height / 2 + ")") : s.attr("transform", "translate(0, " + -v.height / 2 + ")"), t.centerLabel && s.attr("transform", "translate(" + -v.width / 2 + ", " + -v.height / 2 + ")"), s.insert("rect", ":first-child"), {
|
|
27
|
+
shapeSvg: o,
|
|
28
28
|
bbox: v,
|
|
29
29
|
halfPadding: y,
|
|
30
|
-
label:
|
|
30
|
+
label: s
|
|
31
31
|
};
|
|
32
|
-
}, "labelHelper"), w = /* @__PURE__ */
|
|
33
|
-
let
|
|
34
|
-
useHtmlLabels:
|
|
35
|
-
width:
|
|
36
|
-
style:
|
|
37
|
-
addSvgBackground: !!
|
|
38
|
-
}),
|
|
39
|
-
if (o(
|
|
40
|
-
let e =
|
|
41
|
-
|
|
32
|
+
}, "labelHelper"), w = /* @__PURE__ */ t(async (e, t, r) => {
|
|
33
|
+
let i = r.useHtmlLabels ?? o(l()), a = e.insert("g").attr("class", "label").attr("style", r.labelStyle || ""), s = await b(a, u(d(t), l()), {
|
|
34
|
+
useHtmlLabels: i,
|
|
35
|
+
width: r.width || l()?.flowchart?.wrappingWidth,
|
|
36
|
+
style: r.labelStyle,
|
|
37
|
+
addSvgBackground: !!r.icon || !!r.img
|
|
38
|
+
}), c = s.getBBox(), f = r.padding / 2;
|
|
39
|
+
if (o(l())) {
|
|
40
|
+
let e = s.children[0], t = n(s);
|
|
41
|
+
c = e.getBoundingClientRect(), t.attr("width", c.width), t.attr("height", c.height);
|
|
42
42
|
}
|
|
43
|
-
return
|
|
44
|
-
shapeSvg:
|
|
45
|
-
bbox:
|
|
43
|
+
return i ? a.attr("transform", "translate(" + -c.width / 2 + ", " + -c.height / 2 + ")") : a.attr("transform", "translate(0, " + -c.height / 2 + ")"), r.centerLabel && a.attr("transform", "translate(" + -c.width / 2 + ", " + -c.height / 2 + ")"), a.insert("rect", ":first-child"), {
|
|
44
|
+
shapeSvg: e,
|
|
45
|
+
bbox: c,
|
|
46
46
|
halfPadding: f,
|
|
47
|
-
label:
|
|
47
|
+
label: a
|
|
48
48
|
};
|
|
49
|
-
}, "insertLabel"), T = /* @__PURE__ */
|
|
49
|
+
}, "insertLabel"), T = /* @__PURE__ */ t((e, t) => {
|
|
50
50
|
let n = t.node().getBBox();
|
|
51
51
|
e.width = n.width, e.height = n.height;
|
|
52
|
-
}, "updateNodeBounds"), E = /* @__PURE__ */
|
|
52
|
+
}, "updateNodeBounds"), E = /* @__PURE__ */ t((e, t) => (e.look === "handDrawn" ? "rough-node" : "node") + " " + e.cssClasses + " " + (t || ""), "getNodeClasses");
|
|
53
53
|
function D(e) {
|
|
54
54
|
let t = e.map((e, t) => `${t === 0 ? "M" : "L"}${e.x},${e.y}`);
|
|
55
55
|
return t.push("Z"), t.join(" ");
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
t(D, "createPathFromPoints");
|
|
58
58
|
function O(e, t, n, r, i, a) {
|
|
59
59
|
let o = [], s = n - e, c = r - t, l = s / a, u = 2 * Math.PI / l, d = t + c / 2;
|
|
60
60
|
for (let t = 0; t <= 50; t++) {
|
|
@@ -66,7 +66,7 @@ function O(e, t, n, r, i, a) {
|
|
|
66
66
|
}
|
|
67
67
|
return o;
|
|
68
68
|
}
|
|
69
|
-
|
|
69
|
+
t(O, "generateFullSineWavePoints");
|
|
70
70
|
function k(e, t, n, r, i, a) {
|
|
71
71
|
let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
|
|
72
72
|
for (let i = 0; i < r; i++) {
|
|
@@ -78,53 +78,53 @@ function k(e, t, n, r, i, a) {
|
|
|
78
78
|
}
|
|
79
79
|
return o;
|
|
80
80
|
}
|
|
81
|
-
|
|
81
|
+
t(k, "generateCirclePoints");
|
|
82
82
|
function A(e) {
|
|
83
|
-
let
|
|
84
|
-
|
|
85
|
-
let
|
|
86
|
-
if (
|
|
83
|
+
let n = Array.from(e.childNodes).filter((e) => e.tagName === "path"), r = document.createElementNS("http://www.w3.org/2000/svg", "path"), i = n.map((e) => e.getAttribute("d")).filter((e) => e !== null).join(" ");
|
|
84
|
+
r.setAttribute("d", i);
|
|
85
|
+
let a = n.find((e) => e.getAttribute("fill") !== "none"), o = n.find((e) => e.getAttribute("stroke") !== "none"), s = /* @__PURE__ */ t((e, t) => e?.getAttribute(t) ?? void 0, "getAttr");
|
|
86
|
+
if (a) {
|
|
87
87
|
let e = {
|
|
88
|
-
fill:
|
|
89
|
-
"fill-opacity":
|
|
88
|
+
fill: s(a, "fill"),
|
|
89
|
+
"fill-opacity": s(a, "fill-opacity") ?? "1"
|
|
90
90
|
};
|
|
91
91
|
Object.entries(e).forEach(([e, t]) => {
|
|
92
|
-
t &&
|
|
92
|
+
t && r.setAttribute(e, t);
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
-
if (
|
|
95
|
+
if (o) {
|
|
96
96
|
let e = {
|
|
97
|
-
stroke: o
|
|
98
|
-
"stroke-width": o
|
|
99
|
-
"stroke-opacity": o
|
|
97
|
+
stroke: s(o, "stroke"),
|
|
98
|
+
"stroke-width": s(o, "stroke-width") ?? "1",
|
|
99
|
+
"stroke-opacity": s(o, "stroke-opacity") ?? "1"
|
|
100
100
|
};
|
|
101
101
|
Object.entries(e).forEach(([e, t]) => {
|
|
102
|
-
t &&
|
|
102
|
+
t && r.setAttribute(e, t);
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
|
-
let
|
|
106
|
-
return
|
|
105
|
+
let c = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
106
|
+
return c.appendChild(r), c;
|
|
107
107
|
}
|
|
108
|
-
|
|
109
|
-
var j = /* @__PURE__ */
|
|
108
|
+
t(A, "mergePaths");
|
|
109
|
+
var j = /* @__PURE__ */ t((e, t) => {
|
|
110
110
|
var n = e.x, r = e.y, i = t.x - n, a = t.y - r, o = e.width / 2, s = e.height / 2, c, l;
|
|
111
111
|
return Math.abs(a) * o > Math.abs(i) * s ? (a < 0 && (s = -s), c = a === 0 ? 0 : s * i / a, l = s) : (i < 0 && (o = -o), c = o, l = i === 0 ? 0 : o * a / i), {
|
|
112
112
|
x: n + c,
|
|
113
113
|
y: r + l
|
|
114
114
|
};
|
|
115
|
-
}, "intersectRect"), M = /* @__PURE__ */
|
|
116
|
-
let
|
|
117
|
-
typeof
|
|
118
|
-
let
|
|
119
|
-
return await b(e,
|
|
120
|
-
style:
|
|
121
|
-
isTitle:
|
|
122
|
-
useHtmlLabels:
|
|
115
|
+
}, "intersectRect"), M = /* @__PURE__ */ t(async (e, t, n, r = !1, i = !1) => {
|
|
116
|
+
let a = t || "";
|
|
117
|
+
typeof a == "object" && (a = a[0]);
|
|
118
|
+
let s = l(), c = o(s);
|
|
119
|
+
return await b(e, a, {
|
|
120
|
+
style: n,
|
|
121
|
+
isTitle: r,
|
|
122
|
+
useHtmlLabels: c,
|
|
123
123
|
markdown: !1,
|
|
124
|
-
isNode:
|
|
124
|
+
isNode: i,
|
|
125
125
|
width: Infinity
|
|
126
|
-
},
|
|
127
|
-
}, "createLabel"), N = /* @__PURE__ */
|
|
126
|
+
}, s);
|
|
127
|
+
}, "createLabel"), N = /* @__PURE__ */ t((e, t, n, r, i) => [
|
|
128
128
|
"M",
|
|
129
129
|
e + i,
|
|
130
130
|
t,
|
|
@@ -169,43 +169,43 @@ var j = /* @__PURE__ */ l((e, t) => {
|
|
|
169
169
|
e + i,
|
|
170
170
|
t,
|
|
171
171
|
"Z"
|
|
172
|
-
].join(" "), "createRoundedRectPathD"), P = /* @__PURE__ */
|
|
173
|
-
|
|
174
|
-
let
|
|
175
|
-
C =
|
|
176
|
-
style:
|
|
172
|
+
].join(" "), "createRoundedRectPathD"), P = /* @__PURE__ */ t(async (t, r) => {
|
|
173
|
+
e.info("Creating subgraph rect for ", r.id, r);
|
|
174
|
+
let i = l(), { themeVariables: a, handDrawnSeed: s } = i, { clusterBkg: c, clusterBorder: u } = a, { labelStyles: d, nodeStyles: f, borderStyles: p, backgroundStyles: h } = _(r), v = t.insert("g").attr("class", "cluster " + r.cssClasses).attr("id", r.domId).attr("data-look", r.look), y = o(i), x = v.insert("g").attr("class", "cluster-label "), C;
|
|
175
|
+
C = r.labelType === "markdown" ? await b(x, r.label, {
|
|
176
|
+
style: r.labelStyle,
|
|
177
177
|
useHtmlLabels: y,
|
|
178
178
|
isNode: !0,
|
|
179
|
-
width:
|
|
180
|
-
}) : await M(x,
|
|
179
|
+
width: r.width
|
|
180
|
+
}) : await M(x, r.label, r.labelStyle || "", !1, !0);
|
|
181
181
|
let w = C.getBBox();
|
|
182
|
-
if (o(
|
|
183
|
-
let e = C.children[0], t =
|
|
182
|
+
if (o(i)) {
|
|
183
|
+
let e = C.children[0], t = n(C);
|
|
184
184
|
w = e.getBoundingClientRect(), t.attr("width", w.width), t.attr("height", w.height);
|
|
185
185
|
}
|
|
186
|
-
let T =
|
|
187
|
-
|
|
188
|
-
let E =
|
|
189
|
-
|
|
186
|
+
let T = r.width <= w.width + r.padding ? w.width + r.padding : r.width;
|
|
187
|
+
r.width <= w.width + r.padding ? r.diff = (T - r.width) / 2 - r.padding : r.diff = -r.padding;
|
|
188
|
+
let E = r.height, D = r.x - T / 2, O = r.y - E / 2;
|
|
189
|
+
e.trace("Data ", r, JSON.stringify(r));
|
|
190
190
|
let k;
|
|
191
|
-
if (
|
|
192
|
-
let
|
|
191
|
+
if (r.look === "handDrawn") {
|
|
192
|
+
let t = S.svg(v), n = g(r, {
|
|
193
193
|
roughness: .7,
|
|
194
|
-
fill:
|
|
195
|
-
stroke:
|
|
194
|
+
fill: c,
|
|
195
|
+
stroke: u,
|
|
196
196
|
fillWeight: 3,
|
|
197
|
-
seed:
|
|
198
|
-
}),
|
|
199
|
-
k = v.insert(() => (
|
|
200
|
-
} else k = v.insert("rect", ":first-child"), k.attr("style", f).attr("rx",
|
|
201
|
-
let { subGraphTitleTopMargin: A } = m(
|
|
202
|
-
if (x.attr("transform", `translate(${
|
|
197
|
+
seed: s
|
|
198
|
+
}), i = t.path(N(D, O, T, E, 0), n);
|
|
199
|
+
k = v.insert(() => (e.debug("Rough node insert CXC", i), i), ":first-child"), k.select("path:nth-child(2)").attr("style", p.join(";")), k.select("path").attr("style", h.join(";").replace("fill", "stroke"));
|
|
200
|
+
} else k = v.insert("rect", ":first-child"), k.attr("style", f).attr("rx", r.rx).attr("ry", r.ry).attr("x", D).attr("y", O).attr("width", T).attr("height", E);
|
|
201
|
+
let { subGraphTitleTopMargin: A } = m(i);
|
|
202
|
+
if (x.attr("transform", `translate(${r.x - w.width / 2}, ${r.y - r.height / 2 + A})`), d) {
|
|
203
203
|
let e = x.select("span");
|
|
204
204
|
e && e.attr("style", d);
|
|
205
205
|
}
|
|
206
206
|
let P = k.node().getBBox();
|
|
207
|
-
return
|
|
208
|
-
return j(
|
|
207
|
+
return r.offsetX = 0, r.width = P.width, r.height = P.height, r.offsetY = w.height - r.padding / 2, r.intersect = function(e) {
|
|
208
|
+
return j(r, e);
|
|
209
209
|
}, {
|
|
210
210
|
cluster: v,
|
|
211
211
|
labelBBox: w
|
|
@@ -213,10 +213,10 @@ var j = /* @__PURE__ */ l((e, t) => {
|
|
|
213
213
|
}, "rect"), F = {
|
|
214
214
|
rect: P,
|
|
215
215
|
squareRect: P,
|
|
216
|
-
roundedWithTitle: /* @__PURE__ */
|
|
217
|
-
let r =
|
|
216
|
+
roundedWithTitle: /* @__PURE__ */ t(async (e, t) => {
|
|
217
|
+
let r = l(), { themeVariables: i, handDrawnSeed: a } = r, { altBackground: s, compositeBackground: c, compositeTitleBackground: u, nodeBorder: d } = i, f = e.insert("g").attr("class", t.cssClasses).attr("id", t.domId).attr("data-id", t.id).attr("data-look", t.look), p = f.insert("g", ":first-child"), m = f.insert("g").attr("class", "cluster-label"), h = f.append("rect"), g = await M(m, t.label, t.labelStyle, void 0, !0), _ = g.getBBox();
|
|
218
218
|
if (o(r)) {
|
|
219
|
-
let e = g.children[0], t =
|
|
219
|
+
let e = g.children[0], t = n(g);
|
|
220
220
|
_ = e.getBoundingClientRect(), t.attr("width", _.width), t.attr("height", _.height);
|
|
221
221
|
}
|
|
222
222
|
let v = 0 * t.padding, y = v / 2, b = (t.width <= _.width + t.padding ? _.width + t.padding : t.width) + v;
|
|
@@ -227,7 +227,7 @@ var j = /* @__PURE__ */ l((e, t) => {
|
|
|
227
227
|
if (t.look === "handDrawn") {
|
|
228
228
|
let e = t.cssClasses.includes("statediagram-cluster-alt"), n = S.svg(f), r = t.rx || t.ry ? n.path(N(w, T, b, x, 10), {
|
|
229
229
|
roughness: .7,
|
|
230
|
-
fill:
|
|
230
|
+
fill: u,
|
|
231
231
|
fillStyle: "solid",
|
|
232
232
|
stroke: d,
|
|
233
233
|
seed: a
|
|
@@ -248,7 +248,7 @@ var j = /* @__PURE__ */ l((e, t) => {
|
|
|
248
248
|
labelBBox: _
|
|
249
249
|
};
|
|
250
250
|
}, "roundedWithTitle"),
|
|
251
|
-
noteGroup: /* @__PURE__ */
|
|
251
|
+
noteGroup: /* @__PURE__ */ t((e, t) => {
|
|
252
252
|
let n = e.insert("g").attr("class", "note-cluster").attr("id", t.domId), r = n.insert("rect", ":first-child"), i = 0 * t.padding, a = i / 2;
|
|
253
253
|
r.attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - t.width / 2 - a).attr("y", t.y - t.height / 2 - a).attr("width", t.width + i).attr("height", t.height + i).attr("fill", "none");
|
|
254
254
|
let o = r.node().getBBox();
|
|
@@ -262,83 +262,83 @@ var j = /* @__PURE__ */ l((e, t) => {
|
|
|
262
262
|
}
|
|
263
263
|
};
|
|
264
264
|
}, "noteGroup"),
|
|
265
|
-
divider: /* @__PURE__ */
|
|
266
|
-
let { themeVariables:
|
|
265
|
+
divider: /* @__PURE__ */ t((e, t) => {
|
|
266
|
+
let { themeVariables: n, handDrawnSeed: r } = l(), { nodeBorder: i } = n, a = e.insert("g").attr("class", t.cssClasses).attr("id", t.domId).attr("data-look", t.look), o = a.insert("g", ":first-child"), s = 0 * t.padding, c = t.width + s;
|
|
267
267
|
t.diff = -t.padding;
|
|
268
|
-
let u = t.height +
|
|
269
|
-
t.width =
|
|
268
|
+
let u = t.height + s, d = t.x - c / 2, f = t.y - u / 2;
|
|
269
|
+
t.width = c;
|
|
270
270
|
let p;
|
|
271
271
|
if (t.look === "handDrawn") {
|
|
272
|
-
let e = S.svg(
|
|
272
|
+
let e = S.svg(a).rectangle(d, f, c, u, {
|
|
273
273
|
fill: "lightgrey",
|
|
274
274
|
roughness: .5,
|
|
275
275
|
strokeLineDash: [5],
|
|
276
|
-
stroke:
|
|
277
|
-
seed:
|
|
276
|
+
stroke: i,
|
|
277
|
+
seed: r
|
|
278
278
|
});
|
|
279
|
-
p =
|
|
279
|
+
p = a.insert(() => e, ":first-child");
|
|
280
280
|
} else {
|
|
281
|
-
p =
|
|
281
|
+
p = o.insert("rect", ":first-child");
|
|
282
282
|
let e = "outer";
|
|
283
|
-
e = (t.look, "divider"), p.attr("class", e).attr("x", d).attr("y", f).attr("width",
|
|
283
|
+
e = (t.look, "divider"), p.attr("class", e).attr("x", d).attr("y", f).attr("width", c).attr("height", u).attr("data-look", t.look);
|
|
284
284
|
}
|
|
285
285
|
return t.height = p.node().getBBox().height, t.offsetX = 0, t.offsetY = 0, t.intersect = function(e) {
|
|
286
286
|
return j(t, e);
|
|
287
287
|
}, {
|
|
288
|
-
cluster:
|
|
288
|
+
cluster: a,
|
|
289
289
|
labelBBox: {}
|
|
290
290
|
};
|
|
291
291
|
}, "divider"),
|
|
292
|
-
kanbanSection: /* @__PURE__ */
|
|
293
|
-
|
|
294
|
-
let
|
|
295
|
-
style:
|
|
292
|
+
kanbanSection: /* @__PURE__ */ t(async (t, r) => {
|
|
293
|
+
e.info("Creating subgraph rect for ", r.id, r);
|
|
294
|
+
let i = l(), { themeVariables: a, handDrawnSeed: s } = i, { clusterBkg: c, clusterBorder: u } = a, { labelStyles: d, nodeStyles: f, borderStyles: p, backgroundStyles: h } = _(r), v = t.insert("g").attr("class", "cluster " + r.cssClasses).attr("id", r.domId).attr("data-look", r.look), y = o(i), x = v.insert("g").attr("class", "cluster-label "), C = await b(x, r.label, {
|
|
295
|
+
style: r.labelStyle,
|
|
296
296
|
useHtmlLabels: y,
|
|
297
297
|
isNode: !0,
|
|
298
|
-
width:
|
|
298
|
+
width: r.width
|
|
299
299
|
}), w = C.getBBox();
|
|
300
|
-
if (o(
|
|
301
|
-
let e = C.children[0], t =
|
|
300
|
+
if (o(i)) {
|
|
301
|
+
let e = C.children[0], t = n(C);
|
|
302
302
|
w = e.getBoundingClientRect(), t.attr("width", w.width), t.attr("height", w.height);
|
|
303
303
|
}
|
|
304
|
-
let T =
|
|
305
|
-
|
|
306
|
-
let E =
|
|
307
|
-
|
|
304
|
+
let T = r.width <= w.width + r.padding ? w.width + r.padding : r.width;
|
|
305
|
+
r.width <= w.width + r.padding ? r.diff = (T - r.width) / 2 - r.padding : r.diff = -r.padding;
|
|
306
|
+
let E = r.height, D = r.x - T / 2, O = r.y - E / 2;
|
|
307
|
+
e.trace("Data ", r, JSON.stringify(r));
|
|
308
308
|
let k;
|
|
309
|
-
if (
|
|
310
|
-
let
|
|
309
|
+
if (r.look === "handDrawn") {
|
|
310
|
+
let t = S.svg(v), n = g(r, {
|
|
311
311
|
roughness: .7,
|
|
312
|
-
fill:
|
|
313
|
-
stroke:
|
|
312
|
+
fill: c,
|
|
313
|
+
stroke: u,
|
|
314
314
|
fillWeight: 4,
|
|
315
|
-
seed:
|
|
316
|
-
}),
|
|
317
|
-
k = v.insert(() => (
|
|
318
|
-
} else k = v.insert("rect", ":first-child"), k.attr("style", f).attr("rx",
|
|
319
|
-
let { subGraphTitleTopMargin: A } = m(
|
|
320
|
-
if (x.attr("transform", `translate(${
|
|
315
|
+
seed: s
|
|
316
|
+
}), i = t.path(N(D, O, T, E, r.rx), n);
|
|
317
|
+
k = v.insert(() => (e.debug("Rough node insert CXC", i), i), ":first-child"), k.select("path:nth-child(2)").attr("style", p.join(";")), k.select("path").attr("style", h.join(";").replace("fill", "stroke"));
|
|
318
|
+
} else k = v.insert("rect", ":first-child"), k.attr("style", f).attr("rx", r.rx).attr("ry", r.ry).attr("x", D).attr("y", O).attr("width", T).attr("height", E);
|
|
319
|
+
let { subGraphTitleTopMargin: A } = m(i);
|
|
320
|
+
if (x.attr("transform", `translate(${r.x - w.width / 2}, ${r.y - r.height / 2 + A})`), d) {
|
|
321
321
|
let e = x.select("span");
|
|
322
322
|
e && e.attr("style", d);
|
|
323
323
|
}
|
|
324
324
|
let M = k.node().getBBox();
|
|
325
|
-
return
|
|
326
|
-
return j(
|
|
325
|
+
return r.offsetX = 0, r.width = M.width, r.height = M.height, r.offsetY = w.height - r.padding / 2, r.intersect = function(e) {
|
|
326
|
+
return j(r, e);
|
|
327
327
|
}, {
|
|
328
328
|
cluster: v,
|
|
329
329
|
labelBBox: w
|
|
330
330
|
};
|
|
331
331
|
}, "kanbanSection")
|
|
332
|
-
}, I = /* @__PURE__ */ new Map(), ee = /* @__PURE__ */
|
|
332
|
+
}, I = /* @__PURE__ */ new Map(), ee = /* @__PURE__ */ t(async (e, t) => {
|
|
333
333
|
let n = await F[t.shape || "rect"](e, t);
|
|
334
334
|
return I.set(t.id, n), n;
|
|
335
|
-
}, "insertCluster"), te = /* @__PURE__ */
|
|
335
|
+
}, "insertCluster"), te = /* @__PURE__ */ t(() => {
|
|
336
336
|
I = /* @__PURE__ */ new Map();
|
|
337
337
|
}, "clear");
|
|
338
338
|
function L(e, t) {
|
|
339
339
|
return e.intersect(t);
|
|
340
340
|
}
|
|
341
|
-
|
|
341
|
+
t(L, "intersectNode");
|
|
342
342
|
var R = L;
|
|
343
343
|
function ne(e, t, n, r) {
|
|
344
344
|
var i = e.x, a = e.y, o = i - r.x, s = a - r.y, c = Math.sqrt(t * t * s * s + n * n * o * o), l = Math.abs(t * n * o / c);
|
|
@@ -349,12 +349,12 @@ function ne(e, t, n, r) {
|
|
|
349
349
|
y: a + u
|
|
350
350
|
};
|
|
351
351
|
}
|
|
352
|
-
|
|
352
|
+
t(ne, "intersectEllipse");
|
|
353
353
|
var z = ne;
|
|
354
354
|
function B(e, t, n) {
|
|
355
355
|
return z(e, t, t, n);
|
|
356
356
|
}
|
|
357
|
-
|
|
357
|
+
t(B, "intersectCircle");
|
|
358
358
|
var V = B;
|
|
359
359
|
function H(e, t, n, r) {
|
|
360
360
|
{
|
|
@@ -371,11 +371,11 @@ function H(e, t, n, r) {
|
|
|
371
371
|
};
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
|
-
|
|
374
|
+
t(H, "intersectLine");
|
|
375
375
|
function re(e, t) {
|
|
376
376
|
return e * t > 0;
|
|
377
377
|
}
|
|
378
|
-
|
|
378
|
+
t(re, "sameSign");
|
|
379
379
|
var ie = H;
|
|
380
380
|
function U(e, t, n) {
|
|
381
381
|
let r = e.x, i = e.y, a = [], o = Infinity, s = Infinity;
|
|
@@ -398,7 +398,7 @@ function U(e, t, n) {
|
|
|
398
398
|
return a < c ? -1 : a === c ? 0 : 1;
|
|
399
399
|
}), a[0]) : e;
|
|
400
400
|
}
|
|
401
|
-
|
|
401
|
+
t(U, "intersectPolygon");
|
|
402
402
|
var W = {
|
|
403
403
|
node: R,
|
|
404
404
|
circle: V,
|
|
@@ -406,23 +406,23 @@ var W = {
|
|
|
406
406
|
polygon: U,
|
|
407
407
|
rect: j
|
|
408
408
|
};
|
|
409
|
-
function G(
|
|
410
|
-
let { labelStyles:
|
|
411
|
-
|
|
412
|
-
let
|
|
413
|
-
|
|
414
|
-
let
|
|
409
|
+
function G(t, n) {
|
|
410
|
+
let { labelStyles: r } = _(n);
|
|
411
|
+
n.labelStyle = r;
|
|
412
|
+
let i = E(n), a = i;
|
|
413
|
+
i || (a = "anchor");
|
|
414
|
+
let o = t.insert("g").attr("class", a).attr("id", n.domId || n.id), { cssStyles: s } = n, c = S.svg(o), l = g(n, {
|
|
415
415
|
fill: "black",
|
|
416
416
|
stroke: "none",
|
|
417
417
|
fillStyle: "solid"
|
|
418
418
|
});
|
|
419
|
-
|
|
420
|
-
let u =
|
|
421
|
-
return d.attr("class", "anchor").attr("style",
|
|
422
|
-
return
|
|
423
|
-
},
|
|
419
|
+
n.look !== "handDrawn" && (l.roughness = 0);
|
|
420
|
+
let u = c.circle(0, 0, 2, l), d = o.insert(() => u, ":first-child");
|
|
421
|
+
return d.attr("class", "anchor").attr("style", p(s)), T(n, d), n.intersect = function(t) {
|
|
422
|
+
return e.info("Circle intersect", n, 1, t), W.circle(n, 1, t);
|
|
423
|
+
}, o;
|
|
424
424
|
}
|
|
425
|
-
|
|
425
|
+
t(G, "anchor");
|
|
426
426
|
function K(e, t, n, r, i, a, o) {
|
|
427
427
|
let s = (e + n) / 2, c = (t + r) / 2, l = Math.atan2(r - t, n - e), u = (n - e) / 2, d = (r - t) / 2, f = u / i, p = d / a, m = Math.sqrt(f ** 2 + p ** 2);
|
|
428
428
|
if (m > 1) throw Error("The given radii are too small to create an arc between the points.");
|
|
@@ -438,19 +438,19 @@ function K(e, t, n, r, i, a, o) {
|
|
|
438
438
|
}
|
|
439
439
|
return b;
|
|
440
440
|
}
|
|
441
|
-
|
|
441
|
+
t(K, "generateArcPoints");
|
|
442
442
|
function ae(e, t, n) {
|
|
443
443
|
let [r, i] = [t, n].sort((e, t) => t - e);
|
|
444
444
|
return i * (1 - Math.sqrt(1 - (e / r / 2) ** 2));
|
|
445
445
|
}
|
|
446
|
-
|
|
447
|
-
async function oe(e,
|
|
448
|
-
let { labelStyles:
|
|
449
|
-
|
|
450
|
-
let
|
|
446
|
+
t(ae, "calculateArcSagitta");
|
|
447
|
+
async function oe(e, n) {
|
|
448
|
+
let { labelStyles: r, nodeStyles: i } = _(n);
|
|
449
|
+
n.labelStyle = r;
|
|
450
|
+
let a = n.padding ?? 0, o = n.look === "neo" ? 16 : a, s = n.look === "neo" ? 12 : a, c = /* @__PURE__ */ t((e) => e + s, "calcTotalHeight"), l = /* @__PURE__ */ t((e) => {
|
|
451
451
|
let t = e / 2;
|
|
452
452
|
return [t / (2.5 + e / 50), t];
|
|
453
|
-
}, "calcEllipseRadius"), { shapeSvg: u, bbox: d } = await C(e,
|
|
453
|
+
}, "calcEllipseRadius"), { shapeSvg: u, bbox: d } = await C(e, n, E(n)), f = c(n?.height ? n?.height : d.height), [p, m] = l(f), h = ae(f, p, m), v = (n?.width ? n?.width : d.width) + o * 2 + h - h, y = f, { cssStyles: b } = n, x = [
|
|
454
454
|
{
|
|
455
455
|
x: v / 2,
|
|
456
456
|
y: -y / 2
|
|
@@ -465,20 +465,20 @@ async function oe(e, t) {
|
|
|
465
465
|
y: y / 2
|
|
466
466
|
},
|
|
467
467
|
...K(v / 2, y / 2, v / 2, -y / 2, p, m, !0)
|
|
468
|
-
], w = S.svg(u), O = g(
|
|
469
|
-
|
|
468
|
+
], w = S.svg(u), O = g(n, {});
|
|
469
|
+
n.look !== "handDrawn" && (O.roughness = 0, O.fillStyle = "solid");
|
|
470
470
|
let k = D(x), A = w.path(k, O), j = u.insert(() => A, ":first-child");
|
|
471
|
-
return j.attr("class", "basic label-container outer-path"), b &&
|
|
472
|
-
return W.polygon(
|
|
471
|
+
return j.attr("class", "basic label-container outer-path"), b && n.look !== "handDrawn" && j.selectAll("path").attr("style", b), i && n.look !== "handDrawn" && j.selectAll("path").attr("style", i), j.attr("transform", `translate(${p / 2}, 0)`), T(n, j), n.intersect = function(e) {
|
|
472
|
+
return W.polygon(n, x, e);
|
|
473
473
|
}, u;
|
|
474
474
|
}
|
|
475
|
-
|
|
475
|
+
t(oe, "bowTieRect");
|
|
476
476
|
function q(e, t, n, r) {
|
|
477
477
|
return e.insert("polygon", ":first-child").attr("points", r.map(function(e) {
|
|
478
478
|
return e.x + "," + e.y;
|
|
479
479
|
}).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
|
|
480
480
|
}
|
|
481
|
-
|
|
481
|
+
t(q, "insertPolygonShape");
|
|
482
482
|
var se = 12;
|
|
483
483
|
async function ce(e, t) {
|
|
484
484
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
@@ -517,7 +517,7 @@ async function ce(e, t) {
|
|
|
517
517
|
return W.polygon(t, p, e);
|
|
518
518
|
}, s;
|
|
519
519
|
}
|
|
520
|
-
|
|
520
|
+
t(ce, "card");
|
|
521
521
|
function le(e, t) {
|
|
522
522
|
let { nodeStyles: n } = _(t);
|
|
523
523
|
t.label = "";
|
|
@@ -545,23 +545,23 @@ function le(e, t) {
|
|
|
545
545
|
return W.polygon(t, o, e);
|
|
546
546
|
}, r;
|
|
547
547
|
}
|
|
548
|
-
|
|
549
|
-
async function ue(
|
|
550
|
-
let { labelStyles:
|
|
551
|
-
|
|
552
|
-
let { shapeSvg:
|
|
553
|
-
if (
|
|
554
|
-
let e = S.svg(
|
|
555
|
-
d =
|
|
556
|
-
} else d =
|
|
557
|
-
return T(
|
|
548
|
+
t(le, "choice");
|
|
549
|
+
async function ue(t, n, r) {
|
|
550
|
+
let { labelStyles: i, nodeStyles: a } = _(n);
|
|
551
|
+
n.labelStyle = i;
|
|
552
|
+
let { shapeSvg: o, bbox: s, halfPadding: c } = await C(t, n, E(n)), l = r?.padding ?? c, u = n.look === "neo" ? s.width / 2 + 32 : s.width / 2 + l, d, { cssStyles: f } = n;
|
|
553
|
+
if (n.look === "handDrawn") {
|
|
554
|
+
let e = S.svg(o), t = g(n, {}), r = e.circle(0, 0, u * 2, t);
|
|
555
|
+
d = o.insert(() => r, ":first-child"), d.attr("class", "basic label-container").attr("style", p(f));
|
|
556
|
+
} else d = o.insert("circle", ":first-child").attr("class", "basic label-container").attr("style", a).attr("r", u).attr("cx", 0).attr("cy", 0);
|
|
557
|
+
return T(n, d), n.calcIntersect = function(e, t) {
|
|
558
558
|
let n = e.width / 2;
|
|
559
559
|
return W.circle(e, n, t);
|
|
560
|
-
},
|
|
561
|
-
return
|
|
562
|
-
},
|
|
560
|
+
}, n.intersect = function(t) {
|
|
561
|
+
return e.info("Circle intersect", n, u, t), W.circle(n, u, t);
|
|
562
|
+
}, o;
|
|
563
563
|
}
|
|
564
|
-
|
|
564
|
+
t(ue, "circle");
|
|
565
565
|
function de(e) {
|
|
566
566
|
let t = Math.cos(Math.PI / 4), n = Math.sin(Math.PI / 4), r = e * 2, i = {
|
|
567
567
|
x: r / 2 * t,
|
|
@@ -579,21 +579,21 @@ function de(e) {
|
|
|
579
579
|
return `M ${a.x},${a.y} L ${s.x},${s.y}
|
|
580
580
|
M ${i.x},${i.y} L ${o.x},${o.y}`;
|
|
581
581
|
}
|
|
582
|
-
|
|
583
|
-
function fe(
|
|
584
|
-
let { labelStyles:
|
|
585
|
-
|
|
586
|
-
let
|
|
587
|
-
|
|
588
|
-
let u =
|
|
589
|
-
return p.insert(() => f), p.attr("class", "outer-path"),
|
|
590
|
-
return
|
|
591
|
-
radius:
|
|
592
|
-
point:
|
|
593
|
-
}), W.circle(
|
|
594
|
-
},
|
|
582
|
+
t(de, "createLine");
|
|
583
|
+
function fe(t, n) {
|
|
584
|
+
let { labelStyles: r, nodeStyles: i } = _(n);
|
|
585
|
+
n.labelStyle = r, n.label = "";
|
|
586
|
+
let a = t.insert("g").attr("class", E(n)).attr("id", n.domId ?? n.id), o = Math.max(30, n?.width ?? 0), { cssStyles: s } = n, c = S.svg(a), l = g(n, {});
|
|
587
|
+
n.look !== "handDrawn" && (l.roughness = 0, l.fillStyle = "solid");
|
|
588
|
+
let u = c.circle(0, 0, o * 2, l), d = de(o), f = c.path(d, l), p = a.insert(() => u, ":first-child");
|
|
589
|
+
return p.insert(() => f), p.attr("class", "outer-path"), s && n.look !== "handDrawn" && p.selectAll("path").attr("style", s), i && n.look !== "handDrawn" && p.selectAll("path").attr("style", i), T(n, p), n.intersect = function(t) {
|
|
590
|
+
return e.info("crossedCircle intersect", n, {
|
|
591
|
+
radius: o,
|
|
592
|
+
point: t
|
|
593
|
+
}), W.circle(n, o, t);
|
|
594
|
+
}, a;
|
|
595
595
|
}
|
|
596
|
-
|
|
596
|
+
t(fe, "crossedCircle");
|
|
597
597
|
function J(e, t, n, r = 100, i = 0, a = 180) {
|
|
598
598
|
let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
|
|
599
599
|
for (let i = 0; i < r; i++) {
|
|
@@ -605,7 +605,7 @@ function J(e, t, n, r = 100, i = 0, a = 180) {
|
|
|
605
605
|
}
|
|
606
606
|
return o;
|
|
607
607
|
}
|
|
608
|
-
|
|
608
|
+
t(J, "generateCirclePoints");
|
|
609
609
|
async function pe(e, t) {
|
|
610
610
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
611
611
|
t.labelStyle = n;
|
|
@@ -658,7 +658,7 @@ async function pe(e, t) {
|
|
|
658
658
|
return W.polygon(t, m, e);
|
|
659
659
|
}, i;
|
|
660
660
|
}
|
|
661
|
-
|
|
661
|
+
t(pe, "curlyBraceLeft");
|
|
662
662
|
function Y(e, t, n, r = 100, i = 0, a = 180) {
|
|
663
663
|
let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
|
|
664
664
|
for (let i = 0; i < r; i++) {
|
|
@@ -670,7 +670,7 @@ function Y(e, t, n, r = 100, i = 0, a = 180) {
|
|
|
670
670
|
}
|
|
671
671
|
return o;
|
|
672
672
|
}
|
|
673
|
-
|
|
673
|
+
t(Y, "generateCirclePoints");
|
|
674
674
|
async function me(e, t) {
|
|
675
675
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
676
676
|
t.labelStyle = n;
|
|
@@ -723,7 +723,7 @@ async function me(e, t) {
|
|
|
723
723
|
return W.polygon(t, m, e);
|
|
724
724
|
}, i;
|
|
725
725
|
}
|
|
726
|
-
|
|
726
|
+
t(me, "curlyBraceRight");
|
|
727
727
|
function X(e, t, n, r = 100, i = 0, a = 180) {
|
|
728
728
|
let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
|
|
729
729
|
for (let i = 0; i < r; i++) {
|
|
@@ -735,7 +735,7 @@ function X(e, t, n, r = 100, i = 0, a = 180) {
|
|
|
735
735
|
}
|
|
736
736
|
return o;
|
|
737
737
|
}
|
|
738
|
-
|
|
738
|
+
t(X, "generateCirclePoints");
|
|
739
739
|
async function he(e, t) {
|
|
740
740
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
741
741
|
t.labelStyle = n;
|
|
@@ -813,7 +813,7 @@ async function he(e, t) {
|
|
|
813
813
|
return W.polygon(t, h, e);
|
|
814
814
|
}, i;
|
|
815
815
|
}
|
|
816
|
-
|
|
816
|
+
t(he, "curlyBraces");
|
|
817
817
|
async function ge(e, t) {
|
|
818
818
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
819
819
|
t.labelStyle = n;
|
|
@@ -846,22 +846,22 @@ async function ge(e, t) {
|
|
|
846
846
|
return W.polygon(t, x, e);
|
|
847
847
|
}, s;
|
|
848
848
|
}
|
|
849
|
-
|
|
850
|
-
var _e = /* @__PURE__ */
|
|
849
|
+
t(ge, "curvedTrapezoid");
|
|
850
|
+
var _e = /* @__PURE__ */ t((e, t, n, r, i, a) => [
|
|
851
851
|
`M${e},${t + a}`,
|
|
852
852
|
`a${i},${a} 0,0,0 ${n},0`,
|
|
853
853
|
`a${i},${a} 0,0,0 ${-n},0`,
|
|
854
854
|
`l0,${r}`,
|
|
855
855
|
`a${i},${a} 0,0,0 ${n},0`,
|
|
856
856
|
`l0,${-r}`
|
|
857
|
-
].join(" "), "createCylinderPathD"), ve = /* @__PURE__ */
|
|
857
|
+
].join(" "), "createCylinderPathD"), ve = /* @__PURE__ */ t((e, t, n, r, i, a) => [
|
|
858
858
|
`M${e},${t + a}`,
|
|
859
859
|
`M${e + n},${t + a}`,
|
|
860
860
|
`a${i},${a} 0,0,0 ${-n},0`,
|
|
861
861
|
`l0,${r}`,
|
|
862
862
|
`a${i},${a} 0,0,0 ${n},0`,
|
|
863
863
|
`l0,${-r}`
|
|
864
|
-
].join(" "), "createOuterCylinderPathD"), ye = /* @__PURE__ */
|
|
864
|
+
].join(" "), "createOuterCylinderPathD"), ye = /* @__PURE__ */ t((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD"), be = 8, xe = 8;
|
|
865
865
|
async function Se(e, t) {
|
|
866
866
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
867
867
|
t.labelStyle = n;
|
|
@@ -872,25 +872,60 @@ async function Se(e, t) {
|
|
|
872
872
|
let n = e / 2 / (2.5 + e / 50);
|
|
873
873
|
t.height = (t.height ?? 0) - a - n * 3, t.height < be && (t.height = be);
|
|
874
874
|
}
|
|
875
|
-
let { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t.width ? t.width : c.width) + o, d = u / 2,
|
|
875
|
+
let { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t.width ? t.width : c.width) + o, d = u / 2, f = d / (2.5 + u / 50), m = (t.height ? t.height : c.height) + a + f, h, { cssStyles: v } = t;
|
|
876
876
|
if (t.look === "handDrawn") {
|
|
877
|
-
let e = S.svg(s), n = ve(0, 0, u, m, d,
|
|
877
|
+
let e = S.svg(s), n = ve(0, 0, u, m, d, f), r = ye(0, f, u, m, d, f), i = g(t, {}), a = e.path(n, i), o = e.path(r, g(t, { fill: "none" }));
|
|
878
878
|
h = s.insert(() => o, ":first-child"), h = s.insert(() => a, ":first-child"), h.attr("class", "basic label-container"), v && h.attr("style", v);
|
|
879
879
|
} else {
|
|
880
|
-
let e = _e(0, 0, u, m, d,
|
|
881
|
-
h = s.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style",
|
|
880
|
+
let e = _e(0, 0, u, m, d, f);
|
|
881
|
+
h = s.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style", p(v)).attr("style", r);
|
|
882
882
|
}
|
|
883
|
-
return h.attr("label-offset-y",
|
|
883
|
+
return h.attr("label-offset-y", f), h.attr("transform", `translate(${-u / 2}, ${-(m / 2 + f)})`), T(t, h), l.attr("transform", `translate(${-(c.width / 2) - (c.x - (c.left ?? 0))}, ${-(c.height / 2) + (t.padding ?? 0) / 1.5 - (c.y - (c.top ?? 0))})`), t.intersect = function(e) {
|
|
884
884
|
let n = W.rect(t, e), r = n.x - (t.x ?? 0);
|
|
885
|
-
if (d != 0 && (Math.abs(r) < (t.width ?? 0) / 2 || Math.abs(r) == (t.width ?? 0) / 2 && Math.abs(n.y - (t.y ?? 0)) > (t.height ?? 0) / 2 -
|
|
886
|
-
let i =
|
|
887
|
-
i > 0 && (i = Math.sqrt(i)), i =
|
|
885
|
+
if (d != 0 && (Math.abs(r) < (t.width ?? 0) / 2 || Math.abs(r) == (t.width ?? 0) / 2 && Math.abs(n.y - (t.y ?? 0)) > (t.height ?? 0) / 2 - f)) {
|
|
886
|
+
let i = f * f * (1 - r * r / (d * d));
|
|
887
|
+
i > 0 && (i = Math.sqrt(i)), i = f - i, e.y - (t.y ?? 0) > 0 && (i = -i), n.y += i;
|
|
888
888
|
}
|
|
889
889
|
return n;
|
|
890
890
|
}, s;
|
|
891
891
|
}
|
|
892
|
-
|
|
893
|
-
async function Ce(e, t) {
|
|
892
|
+
t(Se, "cylinder");
|
|
893
|
+
async function Ce(e, t, n) {
|
|
894
|
+
let { labelStyles: r, nodeStyles: i } = _(t);
|
|
895
|
+
t.labelStyle = r;
|
|
896
|
+
let { shapeSvg: a, bbox: o } = await C(e, t, E(t)), s = Math.max(o.width + n.labelPaddingX * 2, t?.width || 0), c = Math.max(o.height + n.labelPaddingY * 2, t?.height || 0), l = -s / 2, u = -c / 2, d, { rx: f, ry: m } = t, { cssStyles: h } = t;
|
|
897
|
+
if (n?.rx && n.ry && (f = n.rx, m = n.ry), t.look === "handDrawn") {
|
|
898
|
+
let e = S.svg(a), n = g(t, {}), r = f || m ? e.path(N(l, u, s, c, f || 0), n) : e.rectangle(l, u, s, c, n);
|
|
899
|
+
d = a.insert(() => r, ":first-child"), d.attr("class", "basic label-container").attr("style", p(h));
|
|
900
|
+
} else d = a.insert("rect", ":first-child"), d.attr("class", "basic label-container").attr("style", i).attr("rx", p(f)).attr("ry", p(m)).attr("x", l).attr("y", u).attr("width", s).attr("height", c);
|
|
901
|
+
return T(t, d), t.calcIntersect = function(e, t) {
|
|
902
|
+
return W.rect(e, t);
|
|
903
|
+
}, t.intersect = function(e) {
|
|
904
|
+
return W.rect(t, e);
|
|
905
|
+
}, a;
|
|
906
|
+
}
|
|
907
|
+
t(Ce, "drawRect");
|
|
908
|
+
async function we(e, t) {
|
|
909
|
+
let { cssClasses: n, labelPaddingX: r, labelPaddingY: i, padding: a, width: o, height: s } = t, c = await Ce(e, t, {
|
|
910
|
+
rx: 0,
|
|
911
|
+
ry: 0,
|
|
912
|
+
classes: n ?? "",
|
|
913
|
+
labelPaddingX: r ?? (a ?? 0) * 2,
|
|
914
|
+
labelPaddingY: i ?? a ?? 0
|
|
915
|
+
});
|
|
916
|
+
if (t.look === "handDrawn") {
|
|
917
|
+
let e = S.svg(c), n = g(t, {}), r = c.select(".basic.label-container > path:nth-child(2)"), i = r.node();
|
|
918
|
+
if (!i) return c;
|
|
919
|
+
let a = null;
|
|
920
|
+
if (i instanceof SVGGraphicsElement) a = i.getBBox();
|
|
921
|
+
else return c;
|
|
922
|
+
return c.insert(() => e.line(a.x, a.y, a.x + a.width, a.y, n), ".basic.label-container g.label"), c.insert(() => e.line(a.x, a.y + a.height, a.x + a.width, a.y + a.height, n), ".basic.label-container g.label"), r.remove(), c;
|
|
923
|
+
}
|
|
924
|
+
let l = c.select(".basic.label-container"), u = (Number(l.attr("width")) || o) ?? 0, d = (Number(l.attr("height")) || s) ?? 0;
|
|
925
|
+
return u > 0 && d > 0 && l.attr("stroke-dasharray", `${u} ${d}`), c;
|
|
926
|
+
}
|
|
927
|
+
t(we, "datastore");
|
|
928
|
+
async function Te(e, t) {
|
|
894
929
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
895
930
|
t.labelStyle = n;
|
|
896
931
|
let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 16 : t.padding ?? 0, { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = s.width + i, u = s.height + a, d = u * .2, f = -l / 2, p = -u / 2 - d / 2, { cssStyles: m } = t, h = S.svg(o), v = g(t, {});
|
|
@@ -929,51 +964,51 @@ async function Ce(e, t) {
|
|
|
929
964
|
return W.rect(t, e);
|
|
930
965
|
}, o;
|
|
931
966
|
}
|
|
932
|
-
|
|
933
|
-
async function
|
|
934
|
-
let { labelStyles:
|
|
935
|
-
|
|
936
|
-
let
|
|
937
|
-
if (
|
|
938
|
-
let e = S.svg(
|
|
967
|
+
t(Te, "dividedRectangle");
|
|
968
|
+
async function Ee(t, n) {
|
|
969
|
+
let { labelStyles: r, nodeStyles: i } = _(n), a = n.look === "neo" ? 12 : 5;
|
|
970
|
+
n.labelStyle = r;
|
|
971
|
+
let o = n.padding ?? 0, s = n.look === "neo" ? 16 : o, { shapeSvg: c, bbox: l } = await C(t, n, E(n)), u = (n?.width ? n?.width / 2 : l.width / 2) + (s ?? 0), d = u - a, f, { cssStyles: m } = n;
|
|
972
|
+
if (n.look === "handDrawn") {
|
|
973
|
+
let e = S.svg(c), t = g(n, {
|
|
939
974
|
roughness: .2,
|
|
940
975
|
strokeWidth: 2.5
|
|
941
|
-
}), r = g(
|
|
976
|
+
}), r = g(n, {
|
|
942
977
|
roughness: .2,
|
|
943
978
|
strokeWidth: 1.5
|
|
944
|
-
}), i = e.circle(0, 0, u * 2,
|
|
945
|
-
|
|
979
|
+
}), i = e.circle(0, 0, u * 2, t), a = e.circle(0, 0, d * 2, r);
|
|
980
|
+
f = c.insert("g", ":first-child"), f.attr("class", p(n.cssClasses)).attr("style", p(m)), f.node()?.appendChild(i), f.node()?.appendChild(a);
|
|
946
981
|
} else {
|
|
947
|
-
|
|
948
|
-
let e =
|
|
949
|
-
|
|
982
|
+
f = c.insert("g", ":first-child");
|
|
983
|
+
let e = f.insert("circle", ":first-child"), t = f.insert("circle");
|
|
984
|
+
f.attr("class", "basic label-container").attr("style", i), e.attr("class", "outer-circle").attr("style", i).attr("r", u).attr("cx", 0).attr("cy", 0), t.attr("class", "inner-circle").attr("style", i).attr("r", d).attr("cx", 0).attr("cy", 0);
|
|
950
985
|
}
|
|
951
|
-
return T(
|
|
952
|
-
return
|
|
953
|
-
},
|
|
986
|
+
return T(n, f), n.intersect = function(t) {
|
|
987
|
+
return e.info("DoubleCircle intersect", n, u, t), W.circle(n, u, t);
|
|
988
|
+
}, c;
|
|
954
989
|
}
|
|
955
|
-
|
|
956
|
-
function
|
|
957
|
-
let { labelStyles:
|
|
958
|
-
|
|
959
|
-
let
|
|
960
|
-
|
|
961
|
-
let d =
|
|
962
|
-
return f.selectAll("path").attr("style", `fill: ${l} !important;`),
|
|
963
|
-
return
|
|
990
|
+
t(Ee, "doublecircle");
|
|
991
|
+
function De(t, n, { config: { themeVariables: r } }) {
|
|
992
|
+
let { labelStyles: i, nodeStyles: a } = _(n);
|
|
993
|
+
n.label = "", n.labelStyle = i;
|
|
994
|
+
let o = t.insert("g").attr("class", E(n)).attr("id", n.domId ?? n.id), { cssStyles: s } = n, c = S.svg(o), { nodeBorder: l } = r, u = g(n, { fillStyle: "solid" });
|
|
995
|
+
n.look !== "handDrawn" && (u.roughness = 0);
|
|
996
|
+
let d = c.circle(0, 0, 14, u), f = o.insert(() => d, ":first-child");
|
|
997
|
+
return f.selectAll("path").attr("style", `fill: ${l} !important;`), s && s.length > 0 && n.look !== "handDrawn" && f.selectAll("path").attr("style", s), a && n.look !== "handDrawn" && f.selectAll("path").attr("style", a), T(n, f), n.intersect = function(t) {
|
|
998
|
+
return e.info("filledCircle intersect", n, {
|
|
964
999
|
radius: 7,
|
|
965
|
-
point:
|
|
966
|
-
}), W.circle(
|
|
967
|
-
},
|
|
1000
|
+
point: t
|
|
1001
|
+
}), W.circle(n, 7, t);
|
|
1002
|
+
}, o;
|
|
968
1003
|
}
|
|
969
|
-
|
|
970
|
-
var
|
|
971
|
-
async function
|
|
972
|
-
let { labelStyles:
|
|
973
|
-
|
|
974
|
-
let
|
|
975
|
-
(
|
|
976
|
-
let { shapeSvg:
|
|
1004
|
+
t(De, "filledCircle");
|
|
1005
|
+
var Oe = 10, ke = 10;
|
|
1006
|
+
async function Ae(t, n) {
|
|
1007
|
+
let { labelStyles: r, nodeStyles: i } = _(n);
|
|
1008
|
+
n.labelStyle = r;
|
|
1009
|
+
let a = n.padding ?? 0, o = n.look === "neo" ? a * 2 : a;
|
|
1010
|
+
(n.width || n.height) && (n.height = n?.height ?? 0, n.height < Oe && (n.height = Oe), n.width = (n?.width ?? 0) - o - o / 2, n.width < ke && (n.width = ke));
|
|
1011
|
+
let { shapeSvg: s, bbox: c, label: l } = await C(t, n, E(n)), u = (n?.width ? n?.width : c.width) + (o ?? 0), d = n?.height ? n?.height : u + c.height, f = d, p = [
|
|
977
1012
|
{
|
|
978
1013
|
x: 0,
|
|
979
1014
|
y: -d
|
|
@@ -986,15 +1021,15 @@ async function Oe(e, t) {
|
|
|
986
1021
|
x: f / 2,
|
|
987
1022
|
y: 0
|
|
988
1023
|
}
|
|
989
|
-
], { cssStyles: m } =
|
|
990
|
-
|
|
991
|
-
let y = D(p), b = h.path(y, v), x =
|
|
992
|
-
return m &&
|
|
993
|
-
return
|
|
994
|
-
},
|
|
1024
|
+
], { cssStyles: m } = n, h = S.svg(s), v = g(n, {});
|
|
1025
|
+
n.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
|
|
1026
|
+
let y = D(p), b = h.path(y, v), x = s.insert(() => b, ":first-child").attr("transform", `translate(${-d / 2}, ${d / 2})`).attr("class", "outer-path");
|
|
1027
|
+
return m && n.look !== "handDrawn" && x.selectChildren("path").attr("style", m), i && n.look !== "handDrawn" && x.selectChildren("path").attr("style", i), n.width = u, n.height = d, T(n, x), l.attr("transform", `translate(${-c.width / 2 - (c.x - (c.left ?? 0))}, ${-d / 2 + (n.padding ?? 0) / 2 + (c.y - (c.top ?? 0))})`), n.intersect = function(t) {
|
|
1028
|
+
return e.info("Triangle intersect", n, p, t), W.polygon(n, p, t);
|
|
1029
|
+
}, s;
|
|
995
1030
|
}
|
|
996
|
-
|
|
997
|
-
function
|
|
1031
|
+
t(Ae, "flippedTriangle");
|
|
1032
|
+
function je(e, t, { dir: n, config: { state: r, themeVariables: i } }) {
|
|
998
1033
|
let { nodeStyles: a } = _(t);
|
|
999
1034
|
t.label = "";
|
|
1000
1035
|
let o = e.insert("g").attr("class", E(t)).attr("id", t.domId ?? t.id), { cssStyles: s } = t, c = Math.max(70, t?.width ?? 0), l = Math.max(10, t?.height ?? 0);
|
|
@@ -1011,14 +1046,14 @@ function ke(e, t, { dir: n, config: { state: r, themeVariables: i } }) {
|
|
|
1011
1046
|
return W.rect(t, e);
|
|
1012
1047
|
}, o;
|
|
1013
1048
|
}
|
|
1014
|
-
|
|
1015
|
-
async function
|
|
1016
|
-
let { labelStyles:
|
|
1017
|
-
|
|
1018
|
-
let
|
|
1019
|
-
(
|
|
1020
|
-
let { shapeSvg:
|
|
1021
|
-
|
|
1049
|
+
t(je, "forkJoin");
|
|
1050
|
+
async function Me(t, n) {
|
|
1051
|
+
let { labelStyles: r, nodeStyles: i } = _(n);
|
|
1052
|
+
n.labelStyle = r;
|
|
1053
|
+
let a = n.look === "neo" ? 16 : n.padding ?? 0, o = n.look === "neo" ? 12 : n.padding ?? 0;
|
|
1054
|
+
(n.width || n.height) && (n.height = (n?.height ?? 0) - o * 2, n.height < 10 && (n.height = 10), n.width = (n?.width ?? 0) - a * 2, n.width < 15 && (n.width = 15));
|
|
1055
|
+
let { shapeSvg: s, bbox: c } = await C(t, n, E(n)), l = (n?.width ? n?.width : Math.max(15, c.width)) + a * 2, u = (n?.height ? n?.height : Math.max(10, c.height)) + o * 2, d = u / 2, { cssStyles: f } = n, p = S.svg(s), m = g(n, {});
|
|
1056
|
+
n.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
|
|
1022
1057
|
let h = [
|
|
1023
1058
|
{
|
|
1024
1059
|
x: -l / 2,
|
|
@@ -1037,16 +1072,16 @@ async function Ae(e, t) {
|
|
|
1037
1072
|
x: -l / 2,
|
|
1038
1073
|
y: u / 2
|
|
1039
1074
|
}
|
|
1040
|
-
], v = D(h), y = p.path(v, m), b =
|
|
1041
|
-
return b.attr("class", "basic label-container outer-path"), f &&
|
|
1042
|
-
return
|
|
1075
|
+
], v = D(h), y = p.path(v, m), b = s.insert(() => y, ":first-child");
|
|
1076
|
+
return b.attr("class", "basic label-container outer-path"), f && n.look !== "handDrawn" && b.selectChildren("path").attr("style", f), i && n.look !== "handDrawn" && b.selectChildren("path").attr("style", i), T(n, b), n.intersect = function(t) {
|
|
1077
|
+
return e.info("Pill intersect", n, {
|
|
1043
1078
|
radius: d,
|
|
1044
|
-
point:
|
|
1045
|
-
}), W.polygon(
|
|
1046
|
-
},
|
|
1079
|
+
point: t
|
|
1080
|
+
}), W.polygon(n, h, t);
|
|
1081
|
+
}, s;
|
|
1047
1082
|
}
|
|
1048
|
-
|
|
1049
|
-
var
|
|
1083
|
+
t(Me, "halfRoundedRectangle");
|
|
1084
|
+
var Ne = /* @__PURE__ */ t((e, t, n, r, i) => [
|
|
1050
1085
|
`M${e + i},${t}`,
|
|
1051
1086
|
`L${e + n - i},${t}`,
|
|
1052
1087
|
`L${e + n},${t - r / 2}`,
|
|
@@ -1055,7 +1090,7 @@ var je = /* @__PURE__ */ l((e, t, n, r, i) => [
|
|
|
1055
1090
|
`L${e},${t - r / 2}`,
|
|
1056
1091
|
"Z"
|
|
1057
1092
|
].join(" "), "createHexagonPathD");
|
|
1058
|
-
async function
|
|
1093
|
+
async function Pe(e, t) {
|
|
1059
1094
|
let { labelStyles: n, nodeStyles: r } = _(t), i = t.look === "neo" ? 3.5 : 4;
|
|
1060
1095
|
t.labelStyle = n;
|
|
1061
1096
|
let a = t.padding ?? 0, o = t.look === "neo" ? 70 : a, s = t.look === "neo" ? 32 : a;
|
|
@@ -1090,151 +1125,151 @@ async function Me(e, t) {
|
|
|
1090
1125
|
}
|
|
1091
1126
|
], m, { cssStyles: h } = t;
|
|
1092
1127
|
if (t.look === "handDrawn") {
|
|
1093
|
-
let e = S.svg(c), n = g(t, {}), r =
|
|
1128
|
+
let e = S.svg(c), n = g(t, {}), r = Ne(0, 0, f, u, d), i = e.path(r, n);
|
|
1094
1129
|
m = c.insert(() => i, ":first-child").attr("transform", `translate(${-f / 2}, ${u / 2})`), h && m.attr("style", h);
|
|
1095
1130
|
} else m = q(c, f, u, p);
|
|
1096
1131
|
return r && m.attr("style", r), t.width = f, t.height = u, T(t, m), t.intersect = function(e) {
|
|
1097
1132
|
return W.polygon(t, p, e);
|
|
1098
1133
|
}, c;
|
|
1099
1134
|
}
|
|
1100
|
-
|
|
1101
|
-
async function
|
|
1102
|
-
let { labelStyles:
|
|
1103
|
-
|
|
1104
|
-
let { shapeSvg:
|
|
1105
|
-
|
|
1135
|
+
t(Pe, "hexagon");
|
|
1136
|
+
async function Fe(t, n) {
|
|
1137
|
+
let { labelStyles: r, nodeStyles: i } = _(n);
|
|
1138
|
+
n.label = "", n.labelStyle = r;
|
|
1139
|
+
let { shapeSvg: a } = await C(t, n, E(n)), o = Math.max(30, n?.width ?? 0), s = Math.max(30, n?.height ?? 0), { cssStyles: c } = n, l = S.svg(a), u = g(n, {});
|
|
1140
|
+
n.look !== "handDrawn" && (u.roughness = 0, u.fillStyle = "solid");
|
|
1106
1141
|
let d = [
|
|
1107
1142
|
{
|
|
1108
1143
|
x: 0,
|
|
1109
1144
|
y: 0
|
|
1110
1145
|
},
|
|
1111
1146
|
{
|
|
1112
|
-
x:
|
|
1147
|
+
x: o,
|
|
1113
1148
|
y: 0
|
|
1114
1149
|
},
|
|
1115
1150
|
{
|
|
1116
1151
|
x: 0,
|
|
1117
|
-
y:
|
|
1152
|
+
y: s
|
|
1118
1153
|
},
|
|
1119
1154
|
{
|
|
1120
|
-
x:
|
|
1121
|
-
y:
|
|
1155
|
+
x: o,
|
|
1156
|
+
y: s
|
|
1122
1157
|
}
|
|
1123
|
-
], f = D(d), p = l.path(f, u), m =
|
|
1124
|
-
return m.attr("class", "basic label-container outer-path"),
|
|
1125
|
-
return
|
|
1126
|
-
},
|
|
1158
|
+
], f = D(d), p = l.path(f, u), m = a.insert(() => p, ":first-child");
|
|
1159
|
+
return m.attr("class", "basic label-container outer-path"), c && n.look !== "handDrawn" && m.selectChildren("path").attr("style", c), i && n.look !== "handDrawn" && m.selectChildren("path").attr("style", i), m.attr("transform", `translate(${-o / 2}, ${-s / 2})`), T(n, m), n.intersect = function(t) {
|
|
1160
|
+
return e.info("Pill intersect", n, { points: d }), W.polygon(n, d, t);
|
|
1161
|
+
}, a;
|
|
1127
1162
|
}
|
|
1128
|
-
|
|
1129
|
-
async function
|
|
1130
|
-
let { labelStyles:
|
|
1131
|
-
|
|
1132
|
-
let
|
|
1133
|
-
|
|
1134
|
-
let { shapeSvg: u, bbox: d, label: f } = await C(
|
|
1163
|
+
t(Fe, "hourglass");
|
|
1164
|
+
async function Ie(t, n, { config: { themeVariables: r, flowchart: i } }) {
|
|
1165
|
+
let { labelStyles: a } = _(n);
|
|
1166
|
+
n.labelStyle = a;
|
|
1167
|
+
let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
|
|
1168
|
+
n.width = Math.max(c, l ?? 0);
|
|
1169
|
+
let { shapeSvg: u, bbox: d, label: f } = await C(t, n, "icon-shape default"), p = n.pos === "t", m = c, h = c, { nodeBorder: v } = r, { stylesMap: b } = y(n), w = -h / 2, E = -m / 2, D = n.label ? 8 : 0, O = S.svg(u), k = g(n, {
|
|
1135
1170
|
stroke: "none",
|
|
1136
1171
|
fill: "none"
|
|
1137
1172
|
});
|
|
1138
|
-
|
|
1173
|
+
n.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid");
|
|
1139
1174
|
let A = O.rectangle(w, E, h, m, k), j = Math.max(h, d.width), M = m + d.height + D, N = O.rectangle(-j / 2, -M / 2, j, M, {
|
|
1140
1175
|
...k,
|
|
1141
1176
|
fill: "transparent",
|
|
1142
1177
|
stroke: "none"
|
|
1143
1178
|
}), P = u.insert(() => A, ":first-child"), F = u.insert(() => N);
|
|
1144
|
-
if (
|
|
1179
|
+
if (n.icon) {
|
|
1145
1180
|
let e = u.append("g");
|
|
1146
|
-
e.html(`<g>${await x(
|
|
1147
|
-
height:
|
|
1148
|
-
width:
|
|
1181
|
+
e.html(`<g>${await x(n.icon, {
|
|
1182
|
+
height: c,
|
|
1183
|
+
width: c,
|
|
1149
1184
|
fallbackPrefix: ""
|
|
1150
1185
|
})}</g>`);
|
|
1151
|
-
let
|
|
1186
|
+
let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
|
|
1152
1187
|
e.attr("transform", `translate(${-r / 2 - a},${p ? d.height / 2 + D / 2 - i / 2 - o : -d.height / 2 - D / 2 - i / 2 - o})`), e.attr("style", `color: ${b.get("stroke") ?? v};`);
|
|
1153
1188
|
}
|
|
1154
|
-
return f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${p ? -M / 2 : M / 2 - d.height})`), P.attr("transform", `translate(0,${p ? d.height / 2 + D / 2 : -d.height / 2 - D / 2})`), T(
|
|
1155
|
-
if (
|
|
1156
|
-
let
|
|
1157
|
-
return
|
|
1189
|
+
return f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${p ? -M / 2 : M / 2 - d.height})`), P.attr("transform", `translate(0,${p ? d.height / 2 + D / 2 : -d.height / 2 - D / 2})`), T(n, F), n.intersect = function(t) {
|
|
1190
|
+
if (e.info("iconSquare intersect", n, t), !n.label) return W.rect(n, t);
|
|
1191
|
+
let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
|
|
1192
|
+
return o = p ? [
|
|
1158
1193
|
{
|
|
1159
|
-
x:
|
|
1160
|
-
y:
|
|
1194
|
+
x: r - d.width / 2,
|
|
1195
|
+
y: i - a / 2
|
|
1161
1196
|
},
|
|
1162
1197
|
{
|
|
1163
|
-
x:
|
|
1164
|
-
y:
|
|
1198
|
+
x: r + d.width / 2,
|
|
1199
|
+
y: i - a / 2
|
|
1165
1200
|
},
|
|
1166
1201
|
{
|
|
1167
|
-
x:
|
|
1168
|
-
y:
|
|
1202
|
+
x: r + d.width / 2,
|
|
1203
|
+
y: i - a / 2 + d.height + D
|
|
1169
1204
|
},
|
|
1170
1205
|
{
|
|
1171
|
-
x:
|
|
1172
|
-
y:
|
|
1206
|
+
x: r + h / 2,
|
|
1207
|
+
y: i - a / 2 + d.height + D
|
|
1173
1208
|
},
|
|
1174
1209
|
{
|
|
1175
|
-
x:
|
|
1176
|
-
y:
|
|
1210
|
+
x: r + h / 2,
|
|
1211
|
+
y: i + a / 2
|
|
1177
1212
|
},
|
|
1178
1213
|
{
|
|
1179
|
-
x:
|
|
1180
|
-
y:
|
|
1214
|
+
x: r - h / 2,
|
|
1215
|
+
y: i + a / 2
|
|
1181
1216
|
},
|
|
1182
1217
|
{
|
|
1183
|
-
x:
|
|
1184
|
-
y:
|
|
1218
|
+
x: r - h / 2,
|
|
1219
|
+
y: i - a / 2 + d.height + D
|
|
1185
1220
|
},
|
|
1186
1221
|
{
|
|
1187
|
-
x:
|
|
1188
|
-
y:
|
|
1222
|
+
x: r - d.width / 2,
|
|
1223
|
+
y: i - a / 2 + d.height + D
|
|
1189
1224
|
}
|
|
1190
1225
|
] : [
|
|
1191
1226
|
{
|
|
1192
|
-
x:
|
|
1193
|
-
y:
|
|
1227
|
+
x: r - h / 2,
|
|
1228
|
+
y: i - a / 2
|
|
1194
1229
|
},
|
|
1195
1230
|
{
|
|
1196
|
-
x:
|
|
1197
|
-
y:
|
|
1231
|
+
x: r + h / 2,
|
|
1232
|
+
y: i - a / 2
|
|
1198
1233
|
},
|
|
1199
1234
|
{
|
|
1200
|
-
x:
|
|
1201
|
-
y:
|
|
1235
|
+
x: r + h / 2,
|
|
1236
|
+
y: i - a / 2 + m
|
|
1202
1237
|
},
|
|
1203
1238
|
{
|
|
1204
|
-
x:
|
|
1205
|
-
y:
|
|
1239
|
+
x: r + d.width / 2,
|
|
1240
|
+
y: i - a / 2 + m
|
|
1206
1241
|
},
|
|
1207
1242
|
{
|
|
1208
|
-
x:
|
|
1209
|
-
y:
|
|
1243
|
+
x: r + d.width / 2 / 2,
|
|
1244
|
+
y: i + a / 2
|
|
1210
1245
|
},
|
|
1211
1246
|
{
|
|
1212
|
-
x:
|
|
1213
|
-
y:
|
|
1247
|
+
x: r - d.width / 2,
|
|
1248
|
+
y: i + a / 2
|
|
1214
1249
|
},
|
|
1215
1250
|
{
|
|
1216
|
-
x:
|
|
1217
|
-
y:
|
|
1251
|
+
x: r - d.width / 2,
|
|
1252
|
+
y: i - a / 2 + m
|
|
1218
1253
|
},
|
|
1219
1254
|
{
|
|
1220
|
-
x:
|
|
1221
|
-
y:
|
|
1255
|
+
x: r - h / 2,
|
|
1256
|
+
y: i - a / 2 + m
|
|
1222
1257
|
}
|
|
1223
|
-
], W.polygon(
|
|
1258
|
+
], W.polygon(n, o, t);
|
|
1224
1259
|
}, u;
|
|
1225
1260
|
}
|
|
1226
|
-
|
|
1227
|
-
async function
|
|
1228
|
-
let { labelStyles:
|
|
1229
|
-
|
|
1230
|
-
let
|
|
1231
|
-
|
|
1232
|
-
let { shapeSvg: u, bbox: d, label: f } = await C(
|
|
1233
|
-
|
|
1261
|
+
t(Ie, "icon");
|
|
1262
|
+
async function Le(t, n, { config: { themeVariables: r, flowchart: i } }) {
|
|
1263
|
+
let { labelStyles: a } = _(n);
|
|
1264
|
+
n.labelStyle = a;
|
|
1265
|
+
let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
|
|
1266
|
+
n.width = Math.max(c, l ?? 0);
|
|
1267
|
+
let { shapeSvg: u, bbox: d, label: f } = await C(t, n, "icon-shape default"), p = n.label ? 8 : 0, m = n.pos === "t", { nodeBorder: h, mainBkg: v } = r, { stylesMap: b } = y(n), w = S.svg(u), E = g(n, {});
|
|
1268
|
+
n.look !== "handDrawn" && (E.roughness = 0, E.fillStyle = "solid"), E.stroke = b.get("fill") ?? v;
|
|
1234
1269
|
let D = u.append("g");
|
|
1235
|
-
|
|
1236
|
-
height:
|
|
1237
|
-
width:
|
|
1270
|
+
n.icon && D.html(`<g>${await x(n.icon, {
|
|
1271
|
+
height: c,
|
|
1272
|
+
width: c,
|
|
1238
1273
|
fallbackPrefix: ""
|
|
1239
1274
|
})}</g>`);
|
|
1240
1275
|
let O = D.node().getBBox(), k = O.width, A = O.height, j = O.x, M = O.y, N = Math.max(k, A) * Math.SQRT2 + 40, P = w.circle(0, 0, N, E), F = Math.max(N, d.width), I = N + d.height + p, ee = w.rectangle(-F / 2, -I / 2, F, I, {
|
|
@@ -1242,297 +1277,297 @@ async function Fe(e, t, { config: { themeVariables: n, flowchart: r } }) {
|
|
|
1242
1277
|
fill: "transparent",
|
|
1243
1278
|
stroke: "none"
|
|
1244
1279
|
}), te = u.insert(() => P, ":first-child"), L = u.insert(() => ee);
|
|
1245
|
-
return D.attr("transform", `translate(${-k / 2 - j},${m ? d.height / 2 + p / 2 - A / 2 - M : -d.height / 2 - p / 2 - A / 2 - M})`), D.attr("style", `color: ${b.get("stroke") ?? h};`), f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -I / 2 : I / 2 - d.height})`), te.attr("transform", `translate(0,${m ? d.height / 2 + p / 2 : -d.height / 2 - p / 2})`), T(
|
|
1246
|
-
return
|
|
1280
|
+
return D.attr("transform", `translate(${-k / 2 - j},${m ? d.height / 2 + p / 2 - A / 2 - M : -d.height / 2 - p / 2 - A / 2 - M})`), D.attr("style", `color: ${b.get("stroke") ?? h};`), f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -I / 2 : I / 2 - d.height})`), te.attr("transform", `translate(0,${m ? d.height / 2 + p / 2 : -d.height / 2 - p / 2})`), T(n, L), n.intersect = function(t) {
|
|
1281
|
+
return e.info("iconSquare intersect", n, t), W.rect(n, t);
|
|
1247
1282
|
}, u;
|
|
1248
1283
|
}
|
|
1249
|
-
|
|
1250
|
-
async function
|
|
1251
|
-
let { labelStyles:
|
|
1252
|
-
|
|
1253
|
-
let
|
|
1254
|
-
|
|
1255
|
-
let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await C(
|
|
1256
|
-
|
|
1284
|
+
t(Le, "iconCircle");
|
|
1285
|
+
async function Re(t, n, { config: { themeVariables: r, flowchart: i } }) {
|
|
1286
|
+
let { labelStyles: a } = _(n);
|
|
1287
|
+
n.labelStyle = a;
|
|
1288
|
+
let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
|
|
1289
|
+
n.width = Math.max(c, l ?? 0);
|
|
1290
|
+
let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await C(t, n, "icon-shape default"), m = n.pos === "t", h = c + f * 2, v = c + f * 2, { nodeBorder: b, mainBkg: w } = r, { stylesMap: E } = y(n), D = -v / 2, O = -h / 2, k = n.label ? 8 : 0, A = S.svg(u), j = g(n, {});
|
|
1291
|
+
n.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid"), j.stroke = E.get("fill") ?? w;
|
|
1257
1292
|
let M = A.path(N(D, O, v, h, 5), j), P = Math.max(v, d.width), F = h + d.height + k, I = A.rectangle(-P / 2, -F / 2, P, F, {
|
|
1258
1293
|
...j,
|
|
1259
1294
|
fill: "transparent",
|
|
1260
1295
|
stroke: "none"
|
|
1261
1296
|
}), ee = u.insert(() => M, ":first-child").attr("class", "icon-shape2"), te = u.insert(() => I);
|
|
1262
|
-
if (
|
|
1297
|
+
if (n.icon) {
|
|
1263
1298
|
let e = u.append("g");
|
|
1264
|
-
e.html(`<g>${await x(
|
|
1265
|
-
height:
|
|
1266
|
-
width:
|
|
1299
|
+
e.html(`<g>${await x(n.icon, {
|
|
1300
|
+
height: c,
|
|
1301
|
+
width: c,
|
|
1267
1302
|
fallbackPrefix: ""
|
|
1268
1303
|
})}</g>`);
|
|
1269
|
-
let
|
|
1304
|
+
let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
|
|
1270
1305
|
e.attr("transform", `translate(${-r / 2 - a},${m ? d.height / 2 + k / 2 - i / 2 - o : -d.height / 2 - k / 2 - i / 2 - o})`), e.attr("style", `color: ${E.get("stroke") ?? b};`);
|
|
1271
1306
|
}
|
|
1272
|
-
return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -F / 2 : F / 2 - d.height})`), ee.attr("transform", `translate(0,${m ? d.height / 2 + k / 2 : -d.height / 2 - k / 2})`), T(
|
|
1273
|
-
if (
|
|
1274
|
-
let
|
|
1275
|
-
return
|
|
1307
|
+
return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -F / 2 : F / 2 - d.height})`), ee.attr("transform", `translate(0,${m ? d.height / 2 + k / 2 : -d.height / 2 - k / 2})`), T(n, te), n.intersect = function(t) {
|
|
1308
|
+
if (e.info("iconSquare intersect", n, t), !n.label) return W.rect(n, t);
|
|
1309
|
+
let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
|
|
1310
|
+
return o = m ? [
|
|
1276
1311
|
{
|
|
1277
|
-
x:
|
|
1278
|
-
y:
|
|
1312
|
+
x: r - d.width / 2,
|
|
1313
|
+
y: i - a / 2
|
|
1279
1314
|
},
|
|
1280
1315
|
{
|
|
1281
|
-
x:
|
|
1282
|
-
y:
|
|
1316
|
+
x: r + d.width / 2,
|
|
1317
|
+
y: i - a / 2
|
|
1283
1318
|
},
|
|
1284
1319
|
{
|
|
1285
|
-
x:
|
|
1286
|
-
y:
|
|
1320
|
+
x: r + d.width / 2,
|
|
1321
|
+
y: i - a / 2 + d.height + k
|
|
1287
1322
|
},
|
|
1288
1323
|
{
|
|
1289
|
-
x:
|
|
1290
|
-
y:
|
|
1324
|
+
x: r + v / 2,
|
|
1325
|
+
y: i - a / 2 + d.height + k
|
|
1291
1326
|
},
|
|
1292
1327
|
{
|
|
1293
|
-
x:
|
|
1294
|
-
y:
|
|
1328
|
+
x: r + v / 2,
|
|
1329
|
+
y: i + a / 2
|
|
1295
1330
|
},
|
|
1296
1331
|
{
|
|
1297
|
-
x:
|
|
1298
|
-
y:
|
|
1332
|
+
x: r - v / 2,
|
|
1333
|
+
y: i + a / 2
|
|
1299
1334
|
},
|
|
1300
1335
|
{
|
|
1301
|
-
x:
|
|
1302
|
-
y:
|
|
1336
|
+
x: r - v / 2,
|
|
1337
|
+
y: i - a / 2 + d.height + k
|
|
1303
1338
|
},
|
|
1304
1339
|
{
|
|
1305
|
-
x:
|
|
1306
|
-
y:
|
|
1340
|
+
x: r - d.width / 2,
|
|
1341
|
+
y: i - a / 2 + d.height + k
|
|
1307
1342
|
}
|
|
1308
1343
|
] : [
|
|
1309
1344
|
{
|
|
1310
|
-
x:
|
|
1311
|
-
y:
|
|
1345
|
+
x: r - v / 2,
|
|
1346
|
+
y: i - a / 2
|
|
1312
1347
|
},
|
|
1313
1348
|
{
|
|
1314
|
-
x:
|
|
1315
|
-
y:
|
|
1349
|
+
x: r + v / 2,
|
|
1350
|
+
y: i - a / 2
|
|
1316
1351
|
},
|
|
1317
1352
|
{
|
|
1318
|
-
x:
|
|
1319
|
-
y:
|
|
1353
|
+
x: r + v / 2,
|
|
1354
|
+
y: i - a / 2 + h
|
|
1320
1355
|
},
|
|
1321
1356
|
{
|
|
1322
|
-
x:
|
|
1323
|
-
y:
|
|
1357
|
+
x: r + d.width / 2,
|
|
1358
|
+
y: i - a / 2 + h
|
|
1324
1359
|
},
|
|
1325
1360
|
{
|
|
1326
|
-
x:
|
|
1327
|
-
y:
|
|
1361
|
+
x: r + d.width / 2 / 2,
|
|
1362
|
+
y: i + a / 2
|
|
1328
1363
|
},
|
|
1329
1364
|
{
|
|
1330
|
-
x:
|
|
1331
|
-
y:
|
|
1365
|
+
x: r - d.width / 2,
|
|
1366
|
+
y: i + a / 2
|
|
1332
1367
|
},
|
|
1333
1368
|
{
|
|
1334
|
-
x:
|
|
1335
|
-
y:
|
|
1369
|
+
x: r - d.width / 2,
|
|
1370
|
+
y: i - a / 2 + h
|
|
1336
1371
|
},
|
|
1337
1372
|
{
|
|
1338
|
-
x:
|
|
1339
|
-
y:
|
|
1373
|
+
x: r - v / 2,
|
|
1374
|
+
y: i - a / 2 + h
|
|
1340
1375
|
}
|
|
1341
|
-
], W.polygon(
|
|
1376
|
+
], W.polygon(n, o, t);
|
|
1342
1377
|
}, u;
|
|
1343
1378
|
}
|
|
1344
|
-
|
|
1345
|
-
async function
|
|
1346
|
-
let { labelStyles:
|
|
1347
|
-
|
|
1348
|
-
let
|
|
1349
|
-
|
|
1350
|
-
let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await C(
|
|
1351
|
-
|
|
1379
|
+
t(Re, "iconRounded");
|
|
1380
|
+
async function ze(t, n, { config: { themeVariables: r, flowchart: i } }) {
|
|
1381
|
+
let { labelStyles: a } = _(n);
|
|
1382
|
+
n.labelStyle = a;
|
|
1383
|
+
let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
|
|
1384
|
+
n.width = Math.max(c, l ?? 0);
|
|
1385
|
+
let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await C(t, n, "icon-shape default"), m = n.pos === "t", h = c + f * 2, v = c + f * 2, { nodeBorder: b, mainBkg: w } = r, { stylesMap: E } = y(n), D = -v / 2, O = -h / 2, k = n.label ? 8 : 0, A = S.svg(u), j = g(n, {});
|
|
1386
|
+
n.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid"), j.stroke = E.get("fill") ?? w;
|
|
1352
1387
|
let M = A.path(N(D, O, v, h, .1), j), P = Math.max(v, d.width), F = h + d.height + k, I = A.rectangle(-P / 2, -F / 2, P, F, {
|
|
1353
1388
|
...j,
|
|
1354
1389
|
fill: "transparent",
|
|
1355
1390
|
stroke: "none"
|
|
1356
1391
|
}), ee = u.insert(() => M, ":first-child"), te = u.insert(() => I);
|
|
1357
|
-
if (
|
|
1392
|
+
if (n.icon) {
|
|
1358
1393
|
let e = u.append("g");
|
|
1359
|
-
e.html(`<g>${await x(
|
|
1360
|
-
height:
|
|
1361
|
-
width:
|
|
1394
|
+
e.html(`<g>${await x(n.icon, {
|
|
1395
|
+
height: c,
|
|
1396
|
+
width: c,
|
|
1362
1397
|
fallbackPrefix: ""
|
|
1363
1398
|
})}</g>`);
|
|
1364
|
-
let
|
|
1399
|
+
let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
|
|
1365
1400
|
e.attr("transform", `translate(${-r / 2 - a},${m ? d.height / 2 + k / 2 - i / 2 - o : -d.height / 2 - k / 2 - i / 2 - o})`), e.attr("style", `color: ${E.get("stroke") ?? b};`);
|
|
1366
1401
|
}
|
|
1367
|
-
return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -F / 2 : F / 2 - d.height})`), ee.attr("transform", `translate(0,${m ? d.height / 2 + k / 2 : -d.height / 2 - k / 2})`), T(
|
|
1368
|
-
if (
|
|
1369
|
-
let
|
|
1370
|
-
return
|
|
1402
|
+
return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -F / 2 : F / 2 - d.height})`), ee.attr("transform", `translate(0,${m ? d.height / 2 + k / 2 : -d.height / 2 - k / 2})`), T(n, te), n.intersect = function(t) {
|
|
1403
|
+
if (e.info("iconSquare intersect", n, t), !n.label) return W.rect(n, t);
|
|
1404
|
+
let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
|
|
1405
|
+
return o = m ? [
|
|
1371
1406
|
{
|
|
1372
|
-
x:
|
|
1373
|
-
y:
|
|
1407
|
+
x: r - d.width / 2,
|
|
1408
|
+
y: i - a / 2
|
|
1374
1409
|
},
|
|
1375
1410
|
{
|
|
1376
|
-
x:
|
|
1377
|
-
y:
|
|
1411
|
+
x: r + d.width / 2,
|
|
1412
|
+
y: i - a / 2
|
|
1378
1413
|
},
|
|
1379
1414
|
{
|
|
1380
|
-
x:
|
|
1381
|
-
y:
|
|
1415
|
+
x: r + d.width / 2,
|
|
1416
|
+
y: i - a / 2 + d.height + k
|
|
1382
1417
|
},
|
|
1383
1418
|
{
|
|
1384
|
-
x:
|
|
1385
|
-
y:
|
|
1419
|
+
x: r + v / 2,
|
|
1420
|
+
y: i - a / 2 + d.height + k
|
|
1386
1421
|
},
|
|
1387
1422
|
{
|
|
1388
|
-
x:
|
|
1389
|
-
y:
|
|
1423
|
+
x: r + v / 2,
|
|
1424
|
+
y: i + a / 2
|
|
1390
1425
|
},
|
|
1391
1426
|
{
|
|
1392
|
-
x:
|
|
1393
|
-
y:
|
|
1427
|
+
x: r - v / 2,
|
|
1428
|
+
y: i + a / 2
|
|
1394
1429
|
},
|
|
1395
1430
|
{
|
|
1396
|
-
x:
|
|
1397
|
-
y:
|
|
1431
|
+
x: r - v / 2,
|
|
1432
|
+
y: i - a / 2 + d.height + k
|
|
1398
1433
|
},
|
|
1399
1434
|
{
|
|
1400
|
-
x:
|
|
1401
|
-
y:
|
|
1435
|
+
x: r - d.width / 2,
|
|
1436
|
+
y: i - a / 2 + d.height + k
|
|
1402
1437
|
}
|
|
1403
1438
|
] : [
|
|
1404
1439
|
{
|
|
1405
|
-
x:
|
|
1406
|
-
y:
|
|
1440
|
+
x: r - v / 2,
|
|
1441
|
+
y: i - a / 2
|
|
1407
1442
|
},
|
|
1408
1443
|
{
|
|
1409
|
-
x:
|
|
1410
|
-
y:
|
|
1444
|
+
x: r + v / 2,
|
|
1445
|
+
y: i - a / 2
|
|
1411
1446
|
},
|
|
1412
1447
|
{
|
|
1413
|
-
x:
|
|
1414
|
-
y:
|
|
1448
|
+
x: r + v / 2,
|
|
1449
|
+
y: i - a / 2 + h
|
|
1415
1450
|
},
|
|
1416
1451
|
{
|
|
1417
|
-
x:
|
|
1418
|
-
y:
|
|
1452
|
+
x: r + d.width / 2,
|
|
1453
|
+
y: i - a / 2 + h
|
|
1419
1454
|
},
|
|
1420
1455
|
{
|
|
1421
|
-
x:
|
|
1422
|
-
y:
|
|
1456
|
+
x: r + d.width / 2 / 2,
|
|
1457
|
+
y: i + a / 2
|
|
1423
1458
|
},
|
|
1424
1459
|
{
|
|
1425
|
-
x:
|
|
1426
|
-
y:
|
|
1460
|
+
x: r - d.width / 2,
|
|
1461
|
+
y: i + a / 2
|
|
1427
1462
|
},
|
|
1428
1463
|
{
|
|
1429
|
-
x:
|
|
1430
|
-
y:
|
|
1464
|
+
x: r - d.width / 2,
|
|
1465
|
+
y: i - a / 2 + h
|
|
1431
1466
|
},
|
|
1432
1467
|
{
|
|
1433
|
-
x:
|
|
1434
|
-
y:
|
|
1468
|
+
x: r - v / 2,
|
|
1469
|
+
y: i - a / 2 + h
|
|
1435
1470
|
}
|
|
1436
|
-
], W.polygon(
|
|
1471
|
+
], W.polygon(n, o, t);
|
|
1437
1472
|
}, u;
|
|
1438
1473
|
}
|
|
1439
|
-
|
|
1440
|
-
async function
|
|
1441
|
-
let
|
|
1442
|
-
|
|
1443
|
-
let
|
|
1444
|
-
|
|
1445
|
-
let { labelStyles:
|
|
1446
|
-
|
|
1447
|
-
let
|
|
1448
|
-
|
|
1449
|
-
let l = Math.max(
|
|
1450
|
-
|
|
1451
|
-
let { shapeSvg: f, bbox: p, label: m } = await C(
|
|
1452
|
-
|
|
1474
|
+
t(ze, "iconSquare");
|
|
1475
|
+
async function Be(t, n, { config: { flowchart: r } }) {
|
|
1476
|
+
let i = new Image();
|
|
1477
|
+
i.src = n?.img ?? "", await i.decode();
|
|
1478
|
+
let a = Number(i.naturalWidth.toString().replace("px", "")), o = Number(i.naturalHeight.toString().replace("px", ""));
|
|
1479
|
+
n.imageAspectRatio = a / o;
|
|
1480
|
+
let { labelStyles: s } = _(n);
|
|
1481
|
+
n.labelStyle = s;
|
|
1482
|
+
let c = r?.wrappingWidth;
|
|
1483
|
+
n.defaultWidth = r?.wrappingWidth;
|
|
1484
|
+
let l = Math.max(n.label ? c ?? 0 : 0, n?.assetWidth ?? a), u = n.constraint === "on" && n?.assetHeight ? n.assetHeight * n.imageAspectRatio : l, d = n.constraint === "on" ? u / n.imageAspectRatio : n?.assetHeight ?? o;
|
|
1485
|
+
n.width = Math.max(u, c ?? 0);
|
|
1486
|
+
let { shapeSvg: f, bbox: p, label: m } = await C(t, n, "image-shape default"), h = n.pos === "t", v = -u / 2, y = -d / 2, b = n.label ? 8 : 0, x = S.svg(f), w = g(n, {});
|
|
1487
|
+
n.look !== "handDrawn" && (w.roughness = 0, w.fillStyle = "solid");
|
|
1453
1488
|
let E = x.rectangle(v, y, u, d, w), D = Math.max(u, p.width), O = d + p.height + b, k = x.rectangle(-D / 2, -O / 2, D, O, {
|
|
1454
1489
|
...w,
|
|
1455
1490
|
fill: "none",
|
|
1456
1491
|
stroke: "none"
|
|
1457
1492
|
}), A = f.insert(() => E, ":first-child"), j = f.insert(() => k);
|
|
1458
|
-
if (
|
|
1493
|
+
if (n.img) {
|
|
1459
1494
|
let e = f.append("image");
|
|
1460
|
-
e.attr("href",
|
|
1495
|
+
e.attr("href", n.img), e.attr("width", u), e.attr("height", d), e.attr("preserveAspectRatio", "none"), e.attr("transform", `translate(${-u / 2},${h ? O / 2 - d : -O / 2})`);
|
|
1461
1496
|
}
|
|
1462
|
-
return m.attr("transform", `translate(${-p.width / 2 - (p.x - (p.left ?? 0))},${h ? -d / 2 - p.height / 2 - b / 2 : d / 2 - p.height / 2 + b / 2})`), A.attr("transform", `translate(0,${h ? p.height / 2 + b / 2 : -p.height / 2 - b / 2})`), T(
|
|
1463
|
-
if (
|
|
1464
|
-
let
|
|
1465
|
-
return
|
|
1497
|
+
return m.attr("transform", `translate(${-p.width / 2 - (p.x - (p.left ?? 0))},${h ? -d / 2 - p.height / 2 - b / 2 : d / 2 - p.height / 2 + b / 2})`), A.attr("transform", `translate(0,${h ? p.height / 2 + b / 2 : -p.height / 2 - b / 2})`), T(n, j), n.intersect = function(t) {
|
|
1498
|
+
if (e.info("iconSquare intersect", n, t), !n.label) return W.rect(n, t);
|
|
1499
|
+
let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
|
|
1500
|
+
return o = h ? [
|
|
1466
1501
|
{
|
|
1467
|
-
x:
|
|
1468
|
-
y:
|
|
1502
|
+
x: r - p.width / 2,
|
|
1503
|
+
y: i - a / 2
|
|
1469
1504
|
},
|
|
1470
1505
|
{
|
|
1471
|
-
x:
|
|
1472
|
-
y:
|
|
1506
|
+
x: r + p.width / 2,
|
|
1507
|
+
y: i - a / 2
|
|
1473
1508
|
},
|
|
1474
1509
|
{
|
|
1475
|
-
x:
|
|
1476
|
-
y:
|
|
1510
|
+
x: r + p.width / 2,
|
|
1511
|
+
y: i - a / 2 + p.height + b
|
|
1477
1512
|
},
|
|
1478
1513
|
{
|
|
1479
|
-
x:
|
|
1480
|
-
y:
|
|
1514
|
+
x: r + u / 2,
|
|
1515
|
+
y: i - a / 2 + p.height + b
|
|
1481
1516
|
},
|
|
1482
1517
|
{
|
|
1483
|
-
x:
|
|
1484
|
-
y:
|
|
1518
|
+
x: r + u / 2,
|
|
1519
|
+
y: i + a / 2
|
|
1485
1520
|
},
|
|
1486
1521
|
{
|
|
1487
|
-
x:
|
|
1488
|
-
y:
|
|
1522
|
+
x: r - u / 2,
|
|
1523
|
+
y: i + a / 2
|
|
1489
1524
|
},
|
|
1490
1525
|
{
|
|
1491
|
-
x:
|
|
1492
|
-
y:
|
|
1526
|
+
x: r - u / 2,
|
|
1527
|
+
y: i - a / 2 + p.height + b
|
|
1493
1528
|
},
|
|
1494
1529
|
{
|
|
1495
|
-
x:
|
|
1496
|
-
y:
|
|
1530
|
+
x: r - p.width / 2,
|
|
1531
|
+
y: i - a / 2 + p.height + b
|
|
1497
1532
|
}
|
|
1498
1533
|
] : [
|
|
1499
1534
|
{
|
|
1500
|
-
x:
|
|
1501
|
-
y:
|
|
1535
|
+
x: r - u / 2,
|
|
1536
|
+
y: i - a / 2
|
|
1502
1537
|
},
|
|
1503
1538
|
{
|
|
1504
|
-
x:
|
|
1505
|
-
y:
|
|
1539
|
+
x: r + u / 2,
|
|
1540
|
+
y: i - a / 2
|
|
1506
1541
|
},
|
|
1507
1542
|
{
|
|
1508
|
-
x:
|
|
1509
|
-
y:
|
|
1543
|
+
x: r + u / 2,
|
|
1544
|
+
y: i - a / 2 + d
|
|
1510
1545
|
},
|
|
1511
1546
|
{
|
|
1512
|
-
x:
|
|
1513
|
-
y:
|
|
1547
|
+
x: r + p.width / 2,
|
|
1548
|
+
y: i - a / 2 + d
|
|
1514
1549
|
},
|
|
1515
1550
|
{
|
|
1516
|
-
x:
|
|
1517
|
-
y:
|
|
1551
|
+
x: r + p.width / 2 / 2,
|
|
1552
|
+
y: i + a / 2
|
|
1518
1553
|
},
|
|
1519
1554
|
{
|
|
1520
|
-
x:
|
|
1521
|
-
y:
|
|
1555
|
+
x: r - p.width / 2,
|
|
1556
|
+
y: i + a / 2
|
|
1522
1557
|
},
|
|
1523
1558
|
{
|
|
1524
|
-
x:
|
|
1525
|
-
y:
|
|
1559
|
+
x: r - p.width / 2,
|
|
1560
|
+
y: i - a / 2 + d
|
|
1526
1561
|
},
|
|
1527
1562
|
{
|
|
1528
|
-
x:
|
|
1529
|
-
y:
|
|
1563
|
+
x: r - u / 2,
|
|
1564
|
+
y: i - a / 2 + d
|
|
1530
1565
|
}
|
|
1531
|
-
], W.polygon(
|
|
1566
|
+
], W.polygon(n, o, t);
|
|
1532
1567
|
}, f;
|
|
1533
1568
|
}
|
|
1534
|
-
|
|
1535
|
-
async function
|
|
1569
|
+
t(Be, "imageSquare");
|
|
1570
|
+
async function Ve(e, t) {
|
|
1536
1571
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
1537
1572
|
t.labelStyle = n;
|
|
1538
1573
|
let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = Math.max(c.width + (o ?? 0) * 2, t?.width ?? 0), u = Math.max(c.height + (a ?? 0) * 2, t?.height ?? 0), d = [
|
|
@@ -1561,30 +1596,15 @@ async function ze(e, t) {
|
|
|
1561
1596
|
return W.polygon(t, d, e);
|
|
1562
1597
|
}, s;
|
|
1563
1598
|
}
|
|
1564
|
-
|
|
1565
|
-
async function
|
|
1566
|
-
let { labelStyles: r, nodeStyles: i } = _(t);
|
|
1567
|
-
t.labelStyle = r;
|
|
1568
|
-
let { shapeSvg: a, bbox: o } = await C(e, t, E(t)), s = Math.max(o.width + n.labelPaddingX * 2, t?.width || 0), c = Math.max(o.height + n.labelPaddingY * 2, t?.height || 0), l = -s / 2, u = -c / 2, d, { rx: p, ry: m } = t, { cssStyles: h } = t;
|
|
1569
|
-
if (n?.rx && n.ry && (p = n.rx, m = n.ry), t.look === "handDrawn") {
|
|
1570
|
-
let e = S.svg(a), n = g(t, {}), r = p || m ? e.path(N(l, u, s, c, p || 0), n) : e.rectangle(l, u, s, c, n);
|
|
1571
|
-
d = a.insert(() => r, ":first-child"), d.attr("class", "basic label-container").attr("style", f(h));
|
|
1572
|
-
} else d = a.insert("rect", ":first-child"), d.attr("class", "basic label-container").attr("style", i).attr("rx", f(p)).attr("ry", f(m)).attr("x", l).attr("y", u).attr("width", s).attr("height", c);
|
|
1573
|
-
return T(t, d), t.calcIntersect = function(e, t) {
|
|
1574
|
-
return W.rect(e, t);
|
|
1575
|
-
}, t.intersect = function(e) {
|
|
1576
|
-
return W.rect(t, e);
|
|
1577
|
-
}, a;
|
|
1578
|
-
}
|
|
1579
|
-
l(Be, "drawRect");
|
|
1580
|
-
async function Ve(e, t) {
|
|
1599
|
+
t(Ve, "inv_trapezoid");
|
|
1600
|
+
async function He(e, t) {
|
|
1581
1601
|
let { shapeSvg: n, bbox: r, label: i } = await C(e, t, "label"), a = n.insert("rect", ":first-child");
|
|
1582
1602
|
return a.attr("width", .1).attr("height", .1), n.attr("class", "label edgeLabel"), i.attr("transform", `translate(${-(r.width / 2) - (r.x - (r.left ?? 0))}, ${-(r.height / 2) - (r.y - (r.top ?? 0))})`), T(t, a), t.intersect = function(e) {
|
|
1583
1603
|
return W.rect(t, e);
|
|
1584
1604
|
}, n;
|
|
1585
1605
|
}
|
|
1586
|
-
|
|
1587
|
-
async function
|
|
1606
|
+
t(He, "labelRect");
|
|
1607
|
+
async function Ue(e, t) {
|
|
1588
1608
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
1589
1609
|
t.labelStyle = n;
|
|
1590
1610
|
let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.height ?? c.height) + a, u = (t?.width ?? c.width) + o, d = [
|
|
@@ -1613,8 +1633,8 @@ async function He(e, t) {
|
|
|
1613
1633
|
return W.polygon(t, d, e);
|
|
1614
1634
|
}, s;
|
|
1615
1635
|
}
|
|
1616
|
-
|
|
1617
|
-
async function
|
|
1636
|
+
t(Ue, "lean_left");
|
|
1637
|
+
async function We(e, t) {
|
|
1618
1638
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
1619
1639
|
t.labelStyle = n;
|
|
1620
1640
|
let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.height ?? c.height) + a, u = (t?.width ?? c.width) + o, d = [
|
|
@@ -1643,44 +1663,44 @@ async function Ue(e, t) {
|
|
|
1643
1663
|
return W.polygon(t, d, e);
|
|
1644
1664
|
}, s;
|
|
1645
1665
|
}
|
|
1646
|
-
|
|
1647
|
-
function
|
|
1648
|
-
let { labelStyles:
|
|
1649
|
-
|
|
1650
|
-
let
|
|
1666
|
+
t(We, "lean_right");
|
|
1667
|
+
function Ge(t, n) {
|
|
1668
|
+
let { labelStyles: r, nodeStyles: i } = _(n);
|
|
1669
|
+
n.label = "", n.labelStyle = r;
|
|
1670
|
+
let a = t.insert("g").attr("class", E(n)).attr("id", n.domId ?? n.id), { cssStyles: o } = n, s = Math.max(35, n?.width ?? 0), c = Math.max(35, n?.height ?? 0), l = [
|
|
1651
1671
|
{
|
|
1652
|
-
x:
|
|
1672
|
+
x: s,
|
|
1653
1673
|
y: 0
|
|
1654
1674
|
},
|
|
1655
1675
|
{
|
|
1656
1676
|
x: 0,
|
|
1657
|
-
y:
|
|
1677
|
+
y: c + 7 / 2
|
|
1658
1678
|
},
|
|
1659
1679
|
{
|
|
1660
|
-
x:
|
|
1661
|
-
y:
|
|
1680
|
+
x: s - 14,
|
|
1681
|
+
y: c + 7 / 2
|
|
1662
1682
|
},
|
|
1663
1683
|
{
|
|
1664
1684
|
x: 0,
|
|
1665
|
-
y: 2 *
|
|
1685
|
+
y: 2 * c
|
|
1666
1686
|
},
|
|
1667
1687
|
{
|
|
1668
|
-
x:
|
|
1669
|
-
y:
|
|
1688
|
+
x: s,
|
|
1689
|
+
y: c - 7 / 2
|
|
1670
1690
|
},
|
|
1671
1691
|
{
|
|
1672
1692
|
x: 14,
|
|
1673
|
-
y:
|
|
1693
|
+
y: c - 7 / 2
|
|
1674
1694
|
}
|
|
1675
|
-
], u = S.svg(
|
|
1676
|
-
|
|
1677
|
-
let f = D(l), p = u.path(f, d), m =
|
|
1678
|
-
return m.attr("class", "outer-path"),
|
|
1679
|
-
return
|
|
1680
|
-
},
|
|
1695
|
+
], u = S.svg(a), d = g(n, {});
|
|
1696
|
+
n.look !== "handDrawn" && (d.roughness = 0, d.fillStyle = "solid");
|
|
1697
|
+
let f = D(l), p = u.path(f, d), m = a.insert(() => p, ":first-child");
|
|
1698
|
+
return m.attr("class", "outer-path"), o && n.look !== "handDrawn" && m.selectAll("path").attr("style", o), i && n.look !== "handDrawn" && m.selectAll("path").attr("style", i), m.attr("transform", `translate(-${s / 2},${-c})`), T(n, m), n.intersect = function(t) {
|
|
1699
|
+
return e.info("lightningBolt intersect", n, t), W.polygon(n, l, t);
|
|
1700
|
+
}, a;
|
|
1681
1701
|
}
|
|
1682
|
-
|
|
1683
|
-
var
|
|
1702
|
+
t(Ge, "lightningBolt");
|
|
1703
|
+
var Ke = /* @__PURE__ */ t((e, t, n, r, i, a, o) => [
|
|
1684
1704
|
`M${e},${t + a}`,
|
|
1685
1705
|
`a${i},${a} 0,0,0 ${n},0`,
|
|
1686
1706
|
`a${i},${a} 0,0,0 ${-n},0`,
|
|
@@ -1689,7 +1709,7 @@ var Ge = /* @__PURE__ */ l((e, t, n, r, i, a, o) => [
|
|
|
1689
1709
|
`l0,${-r}`,
|
|
1690
1710
|
`M${e},${t + a + o}`,
|
|
1691
1711
|
`a${i},${a} 0,0,0 ${n},0`
|
|
1692
|
-
].join(" "), "createCylinderPathD"),
|
|
1712
|
+
].join(" "), "createCylinderPathD"), qe = /* @__PURE__ */ t((e, t, n, r, i, a, o) => [
|
|
1693
1713
|
`M${e},${t + a}`,
|
|
1694
1714
|
`M${e + n},${t + a}`,
|
|
1695
1715
|
`a${i},${a} 0,0,0 ${-n},0`,
|
|
@@ -1698,36 +1718,36 @@ var Ge = /* @__PURE__ */ l((e, t, n, r, i, a, o) => [
|
|
|
1698
1718
|
`l0,${-r}`,
|
|
1699
1719
|
`M${e},${t + a + o}`,
|
|
1700
1720
|
`a${i},${a} 0,0,0 ${n},0`
|
|
1701
|
-
].join(" "), "createOuterCylinderPathD"),
|
|
1702
|
-
async function
|
|
1721
|
+
].join(" "), "createOuterCylinderPathD"), Je = /* @__PURE__ */ t((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD"), Ye = 10, Xe = 10;
|
|
1722
|
+
async function Ze(e, t) {
|
|
1703
1723
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
1704
1724
|
t.labelStyle = n;
|
|
1705
1725
|
let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 24 : i;
|
|
1706
1726
|
if (t.width || t.height) {
|
|
1707
1727
|
let e = t.width ?? 0;
|
|
1708
|
-
t.width = (t.width ?? 0) - a, t.width <
|
|
1728
|
+
t.width = (t.width ?? 0) - a, t.width < Xe && (t.width = Xe);
|
|
1709
1729
|
let n = e / 2 / (2.5 + e / 50);
|
|
1710
|
-
t.height = (t.height ?? 0) - o - n * 3, t.height <
|
|
1730
|
+
t.height = (t.height ?? 0) - o - n * 3, t.height < Ye && (t.height = Ye);
|
|
1711
1731
|
}
|
|
1712
|
-
let { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t?.width ? t?.width : c.width) + a * 2, d = u / 2,
|
|
1732
|
+
let { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t?.width ? t?.width : c.width) + a * 2, d = u / 2, f = d / (2.5 + u / 50), m = (t?.height ? t?.height : c.height) + f + o * 2, h = m * .1, v, { cssStyles: y } = t;
|
|
1713
1733
|
if (t.look === "handDrawn") {
|
|
1714
|
-
let e = S.svg(s), n =
|
|
1734
|
+
let e = S.svg(s), n = qe(0, 0, u, m, d, f, h), r = Je(0, f, u, m, d, f), i = g(t, {}), a = e.path(n, i), o = e.path(r, i);
|
|
1715
1735
|
s.insert(() => o, ":first-child").attr("class", "line"), v = s.insert(() => a, ":first-child"), v.attr("class", "basic label-container"), y && v.attr("style", y);
|
|
1716
1736
|
} else {
|
|
1717
|
-
let e =
|
|
1718
|
-
v = s.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style",
|
|
1737
|
+
let e = Ke(0, 0, u, m, d, f, h);
|
|
1738
|
+
v = s.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style", p(y)).attr("style", r);
|
|
1719
1739
|
}
|
|
1720
|
-
return v.attr("label-offset-y",
|
|
1740
|
+
return v.attr("label-offset-y", f), v.attr("transform", `translate(${-u / 2}, ${-(m / 2 + f)})`), T(t, v), l.attr("transform", `translate(${-(c.width / 2) - (c.x - (c.left ?? 0))}, ${-(c.height / 2) + f - (c.y - (c.top ?? 0))})`), t.intersect = function(e) {
|
|
1721
1741
|
let n = W.rect(t, e), r = n.x - (t.x ?? 0);
|
|
1722
|
-
if (d != 0 && (Math.abs(r) < (t.width ?? 0) / 2 || Math.abs(r) == (t.width ?? 0) / 2 && Math.abs(n.y - (t.y ?? 0)) > (t.height ?? 0) / 2 -
|
|
1723
|
-
let i =
|
|
1724
|
-
i > 0 && (i = Math.sqrt(i)), i =
|
|
1742
|
+
if (d != 0 && (Math.abs(r) < (t.width ?? 0) / 2 || Math.abs(r) == (t.width ?? 0) / 2 && Math.abs(n.y - (t.y ?? 0)) > (t.height ?? 0) / 2 - f)) {
|
|
1743
|
+
let i = f * f * (1 - r * r / (d * d));
|
|
1744
|
+
i > 0 && (i = Math.sqrt(i)), i = f - i, e.y - (t.y ?? 0) > 0 && (i = -i), n.y += i;
|
|
1725
1745
|
}
|
|
1726
1746
|
return n;
|
|
1727
1747
|
}, s;
|
|
1728
1748
|
}
|
|
1729
|
-
|
|
1730
|
-
async function
|
|
1749
|
+
t(Ze, "linedCylinder");
|
|
1750
|
+
async function Qe(e, t) {
|
|
1731
1751
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
1732
1752
|
t.labelStyle = n;
|
|
1733
1753
|
let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
|
|
@@ -1769,8 +1789,8 @@ async function Ze(e, t) {
|
|
|
1769
1789
|
return W.polygon(t, y, e);
|
|
1770
1790
|
}, s;
|
|
1771
1791
|
}
|
|
1772
|
-
|
|
1773
|
-
async function
|
|
1792
|
+
t(Qe, "linedWaveEdgedRect");
|
|
1793
|
+
async function $e(e, t) {
|
|
1774
1794
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
1775
1795
|
t.labelStyle = n;
|
|
1776
1796
|
let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, s = t.look === "neo" ? 10 : 5;
|
|
@@ -1858,8 +1878,8 @@ async function Qe(e, t) {
|
|
|
1858
1878
|
return W.polygon(t, w, e);
|
|
1859
1879
|
}, c;
|
|
1860
1880
|
}
|
|
1861
|
-
|
|
1862
|
-
async function
|
|
1881
|
+
t($e, "multiRect");
|
|
1882
|
+
async function et(e, t) {
|
|
1863
1883
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
1864
1884
|
t.labelStyle = n;
|
|
1865
1885
|
let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = t.padding ?? 0, c = t.look === "neo" ? 16 : s, l = t.look === "neo" ? 12 : s, u = !0;
|
|
@@ -1942,8 +1962,8 @@ async function $e(e, t) {
|
|
|
1942
1962
|
return W.polygon(t, w, e);
|
|
1943
1963
|
}, i;
|
|
1944
1964
|
}
|
|
1945
|
-
|
|
1946
|
-
async function
|
|
1965
|
+
t(et, "multiWaveEdgedRectangle");
|
|
1966
|
+
async function tt(e, t, { config: { themeVariables: n } }) {
|
|
1947
1967
|
let { labelStyles: r, nodeStyles: i } = _(t);
|
|
1948
1968
|
t.labelStyle = r, t.useHtmlLabels || o(s()) || (t.centerLabel = !0);
|
|
1949
1969
|
let { shapeSvg: a, bbox: c, label: l } = await C(e, t, E(t)), u = Math.max(c.width + (t.padding ?? 0) * 2, t?.width ?? 0), d = Math.max(c.height + (t.padding ?? 0) * 2, t?.height ?? 0), f = -u / 2, p = -d / 2, { cssStyles: m } = t, h = S.svg(a), v = g(t, {
|
|
@@ -1956,15 +1976,15 @@ async function et(e, t, { config: { themeVariables: n } }) {
|
|
|
1956
1976
|
return W.rect(t, e);
|
|
1957
1977
|
}, a;
|
|
1958
1978
|
}
|
|
1959
|
-
|
|
1960
|
-
var
|
|
1979
|
+
t(tt, "note");
|
|
1980
|
+
var nt = /* @__PURE__ */ t((e, t, n) => [
|
|
1961
1981
|
`M${e + n / 2},${t}`,
|
|
1962
1982
|
`L${e + n},${t - n / 2}`,
|
|
1963
1983
|
`L${e + n / 2},${t - n}`,
|
|
1964
1984
|
`L${e},${t - n / 2}`,
|
|
1965
1985
|
"Z"
|
|
1966
1986
|
].join(" "), "createDecisionBoxPathD");
|
|
1967
|
-
async function
|
|
1987
|
+
async function rt(e, t) {
|
|
1968
1988
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
1969
1989
|
t.labelStyle = n;
|
|
1970
1990
|
let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = a.width + (t.padding ?? 0) + (a.height + (t.padding ?? 0)), s = .5, c = [
|
|
@@ -1986,7 +2006,7 @@ async function nt(e, t) {
|
|
|
1986
2006
|
}
|
|
1987
2007
|
], l, { cssStyles: u } = t;
|
|
1988
2008
|
if (t.look === "handDrawn") {
|
|
1989
|
-
let e = S.svg(i), n = g(t, {}), r =
|
|
2009
|
+
let e = S.svg(i), n = g(t, {}), r = nt(0, 0, o), a = e.path(r, n);
|
|
1990
2010
|
l = i.insert(() => a, ":first-child").attr("transform", `translate(${-o / 2 + s}, ${o / 2})`), u && l.attr("style", u);
|
|
1991
2011
|
} else l = q(i, o, o, c), l.attr("transform", `translate(${-o / 2 + s}, ${o / 2})`);
|
|
1992
2012
|
return r && l.attr("style", r), T(t, l), t.calcIntersect = function(e, t) {
|
|
@@ -2016,8 +2036,8 @@ async function nt(e, t) {
|
|
|
2016
2036
|
return this.calcIntersect(t, e);
|
|
2017
2037
|
}, i;
|
|
2018
2038
|
}
|
|
2019
|
-
|
|
2020
|
-
async function
|
|
2039
|
+
t(rt, "question");
|
|
2040
|
+
async function it(e, t) {
|
|
2021
2041
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2022
2042
|
t.labelStyle = n;
|
|
2023
2043
|
let i = t.padding ?? 0, a = t.look === "neo" ? 21 : i ?? 0, o = t.look === "neo" ? 12 : i ?? 0, { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t?.width ?? c.width) + (t.look === "neo" ? a * 2 : a), d = (t?.height ?? c.height) + (t.look === "neo" ? o * 2 : o), f = -u / 2, p = -d / 2, m = p / 2, h = [
|
|
@@ -2048,38 +2068,38 @@ async function rt(e, t) {
|
|
|
2048
2068
|
return W.polygon(t, h, e);
|
|
2049
2069
|
}, s;
|
|
2050
2070
|
}
|
|
2051
|
-
|
|
2052
|
-
async function
|
|
2053
|
-
let { labelStyles:
|
|
2054
|
-
|
|
2055
|
-
let
|
|
2056
|
-
|
|
2057
|
-
let
|
|
2071
|
+
t(it, "rect_left_inv_arrow");
|
|
2072
|
+
async function at(t, r) {
|
|
2073
|
+
let { labelStyles: i, nodeStyles: a } = _(r);
|
|
2074
|
+
r.labelStyle = i;
|
|
2075
|
+
let s;
|
|
2076
|
+
s = r.cssClasses ? "node " + r.cssClasses : "node default";
|
|
2077
|
+
let c = t.insert("g").attr("class", s).attr("id", r.domId || r.id), u = c.insert("g"), d = c.insert("g").attr("class", "label").attr("style", a), f = r.description, p = r.label, m = await M(d, p, r.labelStyle, !0, !0), h = {
|
|
2058
2078
|
width: 0,
|
|
2059
2079
|
height: 0
|
|
2060
2080
|
};
|
|
2061
|
-
if (o(
|
|
2062
|
-
let e = m.children[0], t =
|
|
2081
|
+
if (o(l())) {
|
|
2082
|
+
let e = m.children[0], t = n(m);
|
|
2063
2083
|
h = e.getBoundingClientRect(), t.attr("width", h.width), t.attr("height", h.height);
|
|
2064
2084
|
}
|
|
2065
|
-
|
|
2066
|
-
let v = f || [], y = m.getBBox(), b = await M(d, Array.isArray(v) ? v.join("<br/>") : v,
|
|
2085
|
+
e.info("Text 2", f);
|
|
2086
|
+
let v = f || [], y = m.getBBox(), b = await M(d, Array.isArray(v) ? v.join("<br/>") : v, r.labelStyle, !0, !0), x = b.children[0], C = n(b);
|
|
2067
2087
|
h = x.getBoundingClientRect(), C.attr("width", h.width), C.attr("height", h.height);
|
|
2068
|
-
let w = (
|
|
2069
|
-
|
|
2070
|
-
let E = h.width + (
|
|
2071
|
-
if (
|
|
2072
|
-
let
|
|
2073
|
-
j =
|
|
2074
|
-
} else A =
|
|
2075
|
-
return T(
|
|
2076
|
-
return W.rect(
|
|
2077
|
-
},
|
|
2088
|
+
let w = (r.padding || 0) / 2;
|
|
2089
|
+
n(b).attr("transform", "translate( " + (h.width > y.width ? 0 : (y.width - h.width) / 2) + ", " + (y.height + w + 5) + ")"), n(m).attr("transform", "translate( " + (h.width < y.width ? 0 : -(y.width - h.width) / 2) + ", 0)"), h = d.node().getBBox(), d.attr("transform", "translate(" + -h.width / 2 + ", " + (-h.height / 2 - w + 3) + ")");
|
|
2090
|
+
let E = h.width + (r.padding || 0), D = h.height + (r.padding || 0), O = -h.width / 2 - w, k = -h.height / 2 - w, A, j;
|
|
2091
|
+
if (r.look === "handDrawn") {
|
|
2092
|
+
let t = S.svg(c), n = g(r, {}), i = t.path(N(O, k, E, D, r.rx || 0), n), a = t.line(-h.width / 2 - w, -h.height / 2 - w + y.height + w, h.width / 2 + w, -h.height / 2 - w + y.height + w, n);
|
|
2093
|
+
j = c.insert(() => (e.debug("Rough node insert CXC", i), a), ":first-child"), A = c.insert(() => (e.debug("Rough node insert CXC", i), i), ":first-child");
|
|
2094
|
+
} else A = u.insert("rect", ":first-child"), j = u.insert("line"), A.attr("class", "outer title-state").attr("style", a).attr("x", -h.width / 2 - w).attr("y", -h.height / 2 - w).attr("width", h.width + (r.padding || 0)).attr("height", h.height + (r.padding || 0)), j.attr("class", "divider").attr("x1", -h.width / 2 - w).attr("x2", h.width / 2 + w).attr("y1", -h.height / 2 - w + y.height + w).attr("y2", -h.height / 2 - w + y.height + w);
|
|
2095
|
+
return T(r, A), r.intersect = function(e) {
|
|
2096
|
+
return W.rect(r, e);
|
|
2097
|
+
}, c;
|
|
2078
2098
|
}
|
|
2079
|
-
|
|
2080
|
-
async function
|
|
2099
|
+
t(at, "rectWithTitle");
|
|
2100
|
+
async function ot(e, t, { config: { themeVariables: n } }) {
|
|
2081
2101
|
let r = n?.radius ?? 5;
|
|
2082
|
-
return
|
|
2102
|
+
return Ce(e, t, {
|
|
2083
2103
|
rx: r,
|
|
2084
2104
|
ry: r,
|
|
2085
2105
|
classes: "",
|
|
@@ -2087,12 +2107,12 @@ async function at(e, t, { config: { themeVariables: n } }) {
|
|
|
2087
2107
|
labelPaddingY: (t?.padding ?? 0) * 1
|
|
2088
2108
|
});
|
|
2089
2109
|
}
|
|
2090
|
-
|
|
2110
|
+
t(ot, "roundedRect");
|
|
2091
2111
|
var Z = 8;
|
|
2092
|
-
async function
|
|
2112
|
+
async function st(e, t) {
|
|
2093
2113
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2094
2114
|
t.labelStyle = n;
|
|
2095
|
-
let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 12 : t.padding ?? 0, { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = (t?.width ?? s.width) + i * 2 + (t.look === "neo" ? Z : Z * 2), u = (t?.height ?? s.height) + a * 2, d = l - Z,
|
|
2115
|
+
let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 12 : t.padding ?? 0, { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = (t?.width ?? s.width) + i * 2 + (t.look === "neo" ? Z : Z * 2), u = (t?.height ?? s.height) + a * 2, d = l - Z, f = u, m = Z - l / 2, h = -u / 2, { cssStyles: v } = t, y = S.svg(o), b = g(t, {});
|
|
2096
2116
|
t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
|
|
2097
2117
|
let x = [
|
|
2098
2118
|
{
|
|
@@ -2105,11 +2125,11 @@ async function ot(e, t) {
|
|
|
2105
2125
|
},
|
|
2106
2126
|
{
|
|
2107
2127
|
x: m + d,
|
|
2108
|
-
y: h +
|
|
2128
|
+
y: h + f
|
|
2109
2129
|
},
|
|
2110
2130
|
{
|
|
2111
2131
|
x: m - Z,
|
|
2112
|
-
y: h +
|
|
2132
|
+
y: h + f
|
|
2113
2133
|
},
|
|
2114
2134
|
{
|
|
2115
2135
|
x: m - Z,
|
|
@@ -2121,15 +2141,15 @@ async function ot(e, t) {
|
|
|
2121
2141
|
},
|
|
2122
2142
|
{
|
|
2123
2143
|
x: m,
|
|
2124
|
-
y: h +
|
|
2144
|
+
y: h + f
|
|
2125
2145
|
}
|
|
2126
2146
|
], w = y.polygon(x.map((e) => [e.x, e.y]), b), D = o.insert(() => w, ":first-child");
|
|
2127
|
-
return D.attr("class", "basic label-container outer-path").attr("style",
|
|
2147
|
+
return D.attr("class", "basic label-container outer-path").attr("style", p(v)), r && t.look !== "handDrawn" && D.selectAll("path").attr("style", r), v && t.look !== "handDrawn" && D.selectAll("path").attr("style", r), c.attr("transform", `translate(${Z / 2 - s.width / 2 - (s.x - (s.left ?? 0))}, ${-(s.height / 2) - (s.y - (s.top ?? 0))})`), T(t, D), t.intersect = function(e) {
|
|
2128
2148
|
return W.rect(t, e);
|
|
2129
2149
|
}, o;
|
|
2130
2150
|
}
|
|
2131
|
-
|
|
2132
|
-
async function
|
|
2151
|
+
t(st, "shadedProcess");
|
|
2152
|
+
async function ct(e, t) {
|
|
2133
2153
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2134
2154
|
t.labelStyle = n;
|
|
2135
2155
|
let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
|
|
@@ -2158,10 +2178,10 @@ async function st(e, t) {
|
|
|
2158
2178
|
return W.polygon(t, x, e);
|
|
2159
2179
|
}, s;
|
|
2160
2180
|
}
|
|
2161
|
-
|
|
2162
|
-
async function
|
|
2181
|
+
t(ct, "slopedRect");
|
|
2182
|
+
async function lt(e, t) {
|
|
2163
2183
|
let n = t.padding ?? 0, r = t.look === "neo" ? 16 : n * 2, i = t.look === "neo" ? 12 : n;
|
|
2164
|
-
return
|
|
2184
|
+
return Ce(e, t, {
|
|
2165
2185
|
rx: 0,
|
|
2166
2186
|
ry: 0,
|
|
2167
2187
|
classes: "",
|
|
@@ -2169,8 +2189,8 @@ async function ct(e, t) {
|
|
|
2169
2189
|
labelPaddingY: i
|
|
2170
2190
|
});
|
|
2171
2191
|
}
|
|
2172
|
-
|
|
2173
|
-
async function
|
|
2192
|
+
t(lt, "squareRect");
|
|
2193
|
+
async function ut(e, t) {
|
|
2174
2194
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2175
2195
|
t.labelStyle = n;
|
|
2176
2196
|
let i = t.padding ?? 0, a = t.look === "neo" ? 20 : i, o = t.look === "neo" ? 12 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = c.height + (t.look === "neo" ? o * 2 : o), u = c.width + l / 4 + (t.look === "neo" ? a * 2 : a), d = l / 2, { cssStyles: f } = t, p = S.svg(s), m = g(t, {});
|
|
@@ -2195,16 +2215,16 @@ async function lt(e, t) {
|
|
|
2195
2215
|
return W.polygon(t, h, e);
|
|
2196
2216
|
}, s;
|
|
2197
2217
|
}
|
|
2198
|
-
|
|
2199
|
-
async function
|
|
2200
|
-
return
|
|
2218
|
+
t(ut, "stadium");
|
|
2219
|
+
async function dt(e, t) {
|
|
2220
|
+
return Ce(e, t, {
|
|
2201
2221
|
rx: t.look === "neo" ? 3 : 5,
|
|
2202
2222
|
ry: t.look === "neo" ? 3 : 5,
|
|
2203
2223
|
classes: "flowchart-node"
|
|
2204
2224
|
});
|
|
2205
2225
|
}
|
|
2206
|
-
|
|
2207
|
-
function
|
|
2226
|
+
t(dt, "state");
|
|
2227
|
+
function ft(e, t, { config: { themeVariables: n } }) {
|
|
2208
2228
|
let { labelStyles: r, nodeStyles: i } = _(t);
|
|
2209
2229
|
t.labelStyle = r;
|
|
2210
2230
|
let { cssStyles: a } = t, { lineColor: o, stateBorder: s, nodeBorder: c, nodeShadow: l } = n;
|
|
@@ -2230,8 +2250,8 @@ function dt(e, t, { config: { themeVariables: n } }) {
|
|
|
2230
2250
|
return W.circle(t, (t.width ?? 0) / 2, e);
|
|
2231
2251
|
}, u;
|
|
2232
2252
|
}
|
|
2233
|
-
|
|
2234
|
-
function
|
|
2253
|
+
t(ft, "stateEnd");
|
|
2254
|
+
function pt(e, t, { config: { themeVariables: n } }) {
|
|
2235
2255
|
let { lineColor: r, nodeShadow: i } = n;
|
|
2236
2256
|
(t.width || t.height) && ((t.width ?? 0) < 14 && (t.width = 14), (t.height ?? 0) < 14 && (t.height = 14)), t.width ||= 14, t.height ||= 14;
|
|
2237
2257
|
let a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), o;
|
|
@@ -2247,12 +2267,12 @@ function ft(e, t, { config: { themeVariables: n } }) {
|
|
|
2247
2267
|
return W.circle(t, (t.width ?? 7) / 2, e);
|
|
2248
2268
|
}, a;
|
|
2249
2269
|
}
|
|
2250
|
-
|
|
2251
|
-
var
|
|
2252
|
-
async function
|
|
2270
|
+
t(pt, "stateStart");
|
|
2271
|
+
var mt = 8;
|
|
2272
|
+
async function ht(e, t) {
|
|
2253
2273
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2254
2274
|
t.labelStyle = n;
|
|
2255
|
-
let i = t?.padding ?? 8, a = t.look === "neo" ? 28 : i, o = t.look === "neo" ? 12 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.width ?? c.width) + 2 *
|
|
2275
|
+
let i = t?.padding ?? 8, a = t.look === "neo" ? 28 : i, o = t.look === "neo" ? 12 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.width ?? c.width) + 2 * mt + a, u = (t?.height ?? c.height) + o, d = l - 2 * mt, f = u, m = -l / 2, h = -u / 2, v = [
|
|
2256
2276
|
{
|
|
2257
2277
|
x: 0,
|
|
2258
2278
|
y: 0
|
|
@@ -2263,11 +2283,11 @@ async function mt(e, t) {
|
|
|
2263
2283
|
},
|
|
2264
2284
|
{
|
|
2265
2285
|
x: d,
|
|
2266
|
-
y: -
|
|
2286
|
+
y: -f
|
|
2267
2287
|
},
|
|
2268
2288
|
{
|
|
2269
2289
|
x: 0,
|
|
2270
|
-
y: -
|
|
2290
|
+
y: -f
|
|
2271
2291
|
},
|
|
2272
2292
|
{
|
|
2273
2293
|
x: 0,
|
|
@@ -2283,11 +2303,11 @@ async function mt(e, t) {
|
|
|
2283
2303
|
},
|
|
2284
2304
|
{
|
|
2285
2305
|
x: d + 8,
|
|
2286
|
-
y: -
|
|
2306
|
+
y: -f
|
|
2287
2307
|
},
|
|
2288
2308
|
{
|
|
2289
2309
|
x: -8,
|
|
2290
|
-
y: -
|
|
2310
|
+
y: -f
|
|
2291
2311
|
},
|
|
2292
2312
|
{
|
|
2293
2313
|
x: -8,
|
|
@@ -2295,26 +2315,26 @@ async function mt(e, t) {
|
|
|
2295
2315
|
}
|
|
2296
2316
|
];
|
|
2297
2317
|
if (t.look === "handDrawn") {
|
|
2298
|
-
let e = S.svg(s), n = g(t, {}), r = e.rectangle(m, h, d + 16,
|
|
2318
|
+
let e = S.svg(s), n = g(t, {}), r = e.rectangle(m, h, d + 16, f, n), i = e.line(m + mt, h, m + mt, h + f, n), a = e.line(m + mt + d, h, m + mt + d, h + f, n);
|
|
2299
2319
|
s.insert(() => i, ":first-child"), s.insert(() => a, ":first-child");
|
|
2300
2320
|
let o = s.insert(() => r, ":first-child"), { cssStyles: c } = t;
|
|
2301
|
-
o.attr("class", "basic label-container").attr("style",
|
|
2321
|
+
o.attr("class", "basic label-container").attr("style", p(c)), T(t, o);
|
|
2302
2322
|
} else {
|
|
2303
|
-
let e = q(s, d,
|
|
2323
|
+
let e = q(s, d, f, v);
|
|
2304
2324
|
r && e.attr("style", r), T(t, e);
|
|
2305
2325
|
}
|
|
2306
2326
|
return t.intersect = function(e) {
|
|
2307
2327
|
return W.polygon(t, v, e);
|
|
2308
2328
|
}, s;
|
|
2309
2329
|
}
|
|
2310
|
-
|
|
2311
|
-
var
|
|
2312
|
-
async function
|
|
2330
|
+
t(ht, "subroutine");
|
|
2331
|
+
var gt = .2;
|
|
2332
|
+
async function _t(e, t) {
|
|
2313
2333
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2314
2334
|
t.labelStyle = n;
|
|
2315
2335
|
let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
|
|
2316
|
-
(t.width || t.height) && (t.height = Math.max((t?.height ?? 0) - o * 2, 10), t.width = Math.max((t?.width ?? 0) - a * 2 -
|
|
2317
|
-
let { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.height ? t?.height : c.height) + o * 2, u =
|
|
2336
|
+
(t.width || t.height) && (t.height = Math.max((t?.height ?? 0) - o * 2, 10), t.width = Math.max((t?.width ?? 0) - a * 2 - gt * (t.height + o * 2), 10));
|
|
2337
|
+
let { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.height ? t?.height : c.height) + o * 2, u = gt * l, d = gt * l, f = (t?.width ? t?.width : c.width) + a * 2 + u - u, p = l, m = -f / 2, h = -p / 2, { cssStyles: v } = t, y = S.svg(s), b = g(t, {}), x = [
|
|
2318
2338
|
{
|
|
2319
2339
|
x: m - u / 2,
|
|
2320
2340
|
y: h
|
|
@@ -2354,8 +2374,8 @@ async function gt(e, t) {
|
|
|
2354
2374
|
return W.polygon(t, x, e);
|
|
2355
2375
|
}, s;
|
|
2356
2376
|
}
|
|
2357
|
-
|
|
2358
|
-
async function
|
|
2377
|
+
t(_t, "taggedRect");
|
|
2378
|
+
async function vt(e, t) {
|
|
2359
2379
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2360
2380
|
t.labelStyle = n;
|
|
2361
2381
|
let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = Math.max(a.width + (t.padding ?? 0) * 2, t?.width ?? 0), c = Math.max(a.height + (t.padding ?? 0) * 2, t?.height ?? 0), l = c / 8, u = .2 * s, d = .2 * c, f = c + l, { cssStyles: p } = t, m = S.svg(i), h = g(t, {});
|
|
@@ -2396,8 +2416,8 @@ async function _t(e, t) {
|
|
|
2396
2416
|
return W.polygon(t, v, e);
|
|
2397
2417
|
}, i;
|
|
2398
2418
|
}
|
|
2399
|
-
|
|
2400
|
-
async function
|
|
2419
|
+
t(vt, "taggedWaveEdgedRectangle");
|
|
2420
|
+
async function yt(e, t) {
|
|
2401
2421
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2402
2422
|
t.labelStyle = n;
|
|
2403
2423
|
let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = Math.max(a.width + (t.padding ?? 0), t?.width || 0), s = Math.max(a.height + (t.padding ?? 0), t?.height || 0), c = -o / 2, l = -s / 2, u = i.insert("rect", ":first-child");
|
|
@@ -2405,40 +2425,40 @@ async function vt(e, t) {
|
|
|
2405
2425
|
return W.rect(t, e);
|
|
2406
2426
|
}, i;
|
|
2407
2427
|
}
|
|
2408
|
-
|
|
2409
|
-
var
|
|
2428
|
+
t(yt, "text");
|
|
2429
|
+
var bt = /* @__PURE__ */ t((e, t, n, r, i, a) => `M${e},${t}
|
|
2410
2430
|
a${i},${a} 0,0,1 0,${-r}
|
|
2411
2431
|
l${n},0
|
|
2412
2432
|
a${i},${a} 0,0,1 0,${r}
|
|
2413
2433
|
M${n},${-r}
|
|
2414
2434
|
a${i},${a} 0,0,0 0,${r}
|
|
2415
|
-
l${-n},0`, "createCylinderPathD"),
|
|
2435
|
+
l${-n},0`, "createCylinderPathD"), xt = /* @__PURE__ */ t((e, t, n, r, i, a) => [
|
|
2416
2436
|
`M${e},${t}`,
|
|
2417
2437
|
`M${e + n},${t}`,
|
|
2418
2438
|
`a${i},${a} 0,0,0 0,${-r}`,
|
|
2419
2439
|
`l${-n},0`,
|
|
2420
2440
|
`a${i},${a} 0,0,0 0,${r}`,
|
|
2421
2441
|
`l${n},0`
|
|
2422
|
-
].join(" "), "createOuterCylinderPathD"),
|
|
2423
|
-
async function
|
|
2442
|
+
].join(" "), "createOuterCylinderPathD"), St = /* @__PURE__ */ t((e, t, n, r, i, a) => [`M${e + n / 2},${-r / 2}`, `a${i},${a} 0,0,0 0,${r}`].join(" "), "createInnerCylinderPathD"), Ct = 5, wt = 10;
|
|
2443
|
+
async function Tt(e, t) {
|
|
2424
2444
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2425
2445
|
t.labelStyle = n;
|
|
2426
2446
|
let i = t.padding ?? 0, a = t.look === "neo" ? 12 : i / 2;
|
|
2427
2447
|
if (t.width || t.height) {
|
|
2428
2448
|
let e = t.height ?? 0;
|
|
2429
|
-
t.height = (t.height ?? 0) - a, t.height <
|
|
2449
|
+
t.height = (t.height ?? 0) - a, t.height < Ct && (t.height = Ct);
|
|
2430
2450
|
let n = e / 2 / (2.5 + e / 50);
|
|
2431
|
-
t.width = (t.width ?? 0) - a - n * 3, t.width <
|
|
2451
|
+
t.width = (t.width ?? 0) - a - n * 3, t.width < wt && (t.width = wt);
|
|
2432
2452
|
}
|
|
2433
|
-
let { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = (t.height ? t.height : s.height) + a, u = l / 2, d = u / (2.5 + l / 50),
|
|
2453
|
+
let { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = (t.height ? t.height : s.height) + a, u = l / 2, d = u / (2.5 + l / 50), f = (t.width ? t.width : s.width) + d + a, { cssStyles: m } = t, h;
|
|
2434
2454
|
if (t.look === "handDrawn") {
|
|
2435
|
-
let e = S.svg(o), n =
|
|
2455
|
+
let e = S.svg(o), n = xt(0, 0, f, l, d, u), r = St(0, 0, f, l, d, u), i = e.path(n, g(t, {})), a = e.path(r, g(t, { fill: "none" }));
|
|
2436
2456
|
h = o.insert(() => a, ":first-child"), h = o.insert(() => i, ":first-child"), h.attr("class", "basic label-container"), m && h.attr("style", m);
|
|
2437
2457
|
} else {
|
|
2438
|
-
let e =
|
|
2439
|
-
h = o.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style",
|
|
2458
|
+
let e = bt(0, 0, f, l, d, u);
|
|
2459
|
+
h = o.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", p(m)).attr("style", r), h.attr("class", "basic label-container outer-path"), m && h.selectAll("path").attr("style", m), r && h.selectAll("path").attr("style", r);
|
|
2440
2460
|
}
|
|
2441
|
-
return h.attr("label-offset-x", d), h.attr("transform", `translate(${-
|
|
2461
|
+
return h.attr("label-offset-x", d), h.attr("transform", `translate(${-f / 2}, ${l / 2} )`), c.attr("transform", `translate(${-(s.width / 2) - d - (s.x - (s.left ?? 0))}, ${-(s.height / 2) - (s.y - (s.top ?? 0))})`), T(t, h), t.intersect = function(e) {
|
|
2442
2462
|
let n = W.rect(t, e), r = n.y - (t.y ?? 0);
|
|
2443
2463
|
if (u != 0 && (Math.abs(r) < (t.height ?? 0) / 2 || Math.abs(r) == (t.height ?? 0) / 2 && Math.abs(n.x - (t.x ?? 0)) > (t.width ?? 0) / 2 - d)) {
|
|
2444
2464
|
let i = d * d * (1 - r * r / (u * u));
|
|
@@ -2447,8 +2467,8 @@ async function wt(e, t) {
|
|
|
2447
2467
|
return n;
|
|
2448
2468
|
}, o;
|
|
2449
2469
|
}
|
|
2450
|
-
|
|
2451
|
-
async function
|
|
2470
|
+
t(Tt, "tiltedCylinder");
|
|
2471
|
+
async function Et(e, t) {
|
|
2452
2472
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2453
2473
|
t.labelStyle = n;
|
|
2454
2474
|
let i = t.padding ?? 0, a = (t.look, i), o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.height ?? c.height) + a, u = (t?.width ?? c.width) + o, d = [
|
|
@@ -2477,8 +2497,8 @@ async function Tt(e, t) {
|
|
|
2477
2497
|
return W.polygon(t, d, e);
|
|
2478
2498
|
}, s;
|
|
2479
2499
|
}
|
|
2480
|
-
|
|
2481
|
-
async function
|
|
2500
|
+
t(Et, "trapezoid");
|
|
2501
|
+
async function Dt(e, t) {
|
|
2482
2502
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2483
2503
|
t.labelStyle = n;
|
|
2484
2504
|
let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
|
|
@@ -2515,14 +2535,14 @@ async function Et(e, t) {
|
|
|
2515
2535
|
return W.polygon(t, m, e);
|
|
2516
2536
|
}, s;
|
|
2517
2537
|
}
|
|
2518
|
-
|
|
2519
|
-
var
|
|
2520
|
-
async function
|
|
2521
|
-
let { labelStyles:
|
|
2522
|
-
|
|
2523
|
-
let
|
|
2524
|
-
(
|
|
2525
|
-
let { shapeSvg:
|
|
2538
|
+
t(Dt, "trapezoidalPentagon");
|
|
2539
|
+
var Ot = 10, kt = 10;
|
|
2540
|
+
async function At(t, n) {
|
|
2541
|
+
let { labelStyles: r, nodeStyles: i } = _(n);
|
|
2542
|
+
n.labelStyle = r;
|
|
2543
|
+
let a = n.padding ?? 0, o = n.look === "neo" ? a * 2 : a;
|
|
2544
|
+
(n.width || n.height) && (n.width = ((n?.width ?? 0) - o) / 2, n.width < kt && (n.width = kt), n.height = n?.height ?? 0, n.height < Ot && (n.height = Ot));
|
|
2545
|
+
let { shapeSvg: s, bbox: u, label: d } = await C(t, n, E(n)), f = c(l().flowchart?.htmlLabels), p = (n?.width ? n?.width : u.width) + o, m = n?.height ? n?.height : p + u.height, h = m, v = [
|
|
2526
2546
|
{
|
|
2527
2547
|
x: 0,
|
|
2528
2548
|
y: 0
|
|
@@ -2535,15 +2555,15 @@ async function kt(e, t) {
|
|
|
2535
2555
|
x: h / 2,
|
|
2536
2556
|
y: -m
|
|
2537
2557
|
}
|
|
2538
|
-
], { cssStyles: y } =
|
|
2539
|
-
|
|
2540
|
-
let w = D(v), O = b.path(w, x), k =
|
|
2541
|
-
return y &&
|
|
2542
|
-
return
|
|
2543
|
-
},
|
|
2558
|
+
], { cssStyles: y } = n, b = S.svg(s), x = g(n, {});
|
|
2559
|
+
n.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
|
|
2560
|
+
let w = D(v), O = b.path(w, x), k = s.insert(() => O, ":first-child").attr("transform", `translate(${-m / 2}, ${m / 2})`).attr("class", "outer-path");
|
|
2561
|
+
return y && n.look !== "handDrawn" && k.selectChildren("path").attr("style", y), i && n.look !== "handDrawn" && k.selectChildren("path").attr("style", i), n.width = p, n.height = m, T(n, k), d.attr("transform", `translate(${-u.width / 2 - (u.x - (u.left ?? 0))}, ${m / 2 - (u.height + (n.padding ?? 0) / (f ? 2 : 1) - (u.y - (u.top ?? 0)))})`), n.intersect = function(t) {
|
|
2562
|
+
return e.info("Triangle intersect", n, v, t), W.polygon(n, v, t);
|
|
2563
|
+
}, s;
|
|
2544
2564
|
}
|
|
2545
|
-
|
|
2546
|
-
async function
|
|
2565
|
+
t(At, "triangle");
|
|
2566
|
+
async function jt(e, t) {
|
|
2547
2567
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2548
2568
|
t.labelStyle = n;
|
|
2549
2569
|
let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, s = !0;
|
|
@@ -2569,8 +2589,8 @@ async function At(e, t) {
|
|
|
2569
2589
|
return W.polygon(t, w, e);
|
|
2570
2590
|
}, c;
|
|
2571
2591
|
}
|
|
2572
|
-
|
|
2573
|
-
async function
|
|
2592
|
+
t(jt, "waveEdgedRectangle");
|
|
2593
|
+
async function Mt(e, t) {
|
|
2574
2594
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2575
2595
|
t.labelStyle = n;
|
|
2576
2596
|
let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 20 : i;
|
|
@@ -2597,9 +2617,9 @@ async function jt(e, t) {
|
|
|
2597
2617
|
return W.polygon(t, v, e);
|
|
2598
2618
|
}, s;
|
|
2599
2619
|
}
|
|
2600
|
-
|
|
2620
|
+
t(Mt, "waveRectangle");
|
|
2601
2621
|
var Q = 10;
|
|
2602
|
-
async function
|
|
2622
|
+
async function Nt(e, t) {
|
|
2603
2623
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
2604
2624
|
t.labelStyle = n;
|
|
2605
2625
|
let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 12 : t.padding ?? 0;
|
|
@@ -2630,20 +2650,20 @@ async function Mt(e, t) {
|
|
|
2630
2650
|
return W.polygon(t, b, e);
|
|
2631
2651
|
}, o;
|
|
2632
2652
|
}
|
|
2633
|
-
|
|
2634
|
-
var
|
|
2653
|
+
t(Nt, "windowPane");
|
|
2654
|
+
var Pt = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), Ft = /* @__PURE__ */ new Set([
|
|
2635
2655
|
"redux",
|
|
2636
2656
|
"redux-dark",
|
|
2637
2657
|
"redux-color",
|
|
2638
2658
|
"redux-dark-color"
|
|
2639
2659
|
]);
|
|
2640
|
-
async function
|
|
2641
|
-
let
|
|
2642
|
-
|
|
2643
|
-
let { theme: i, themeVariables: a } = s(), { rowEven: o, rowOdd:
|
|
2660
|
+
async function It(e, t) {
|
|
2661
|
+
let r = t;
|
|
2662
|
+
r.alias && (t.label = r.alias);
|
|
2663
|
+
let { theme: i, themeVariables: a } = s(), { rowEven: o, rowOdd: l, nodeBorder: u, borderColorArray: d } = a;
|
|
2644
2664
|
if (t.look === "handDrawn") {
|
|
2645
2665
|
let { themeVariables: n } = s(), { background: r } = n;
|
|
2646
|
-
await
|
|
2666
|
+
await It(e, {
|
|
2647
2667
|
...t,
|
|
2648
2668
|
id: t.id + "-background",
|
|
2649
2669
|
domId: (t.domId || t.id) + "-background",
|
|
@@ -2651,43 +2671,43 @@ async function Ft(e, t) {
|
|
|
2651
2671
|
cssStyles: ["stroke: none", `fill: ${r}`]
|
|
2652
2672
|
});
|
|
2653
2673
|
}
|
|
2654
|
-
let
|
|
2655
|
-
t.useHtmlLabels =
|
|
2656
|
-
let m =
|
|
2657
|
-
if (
|
|
2658
|
-
let
|
|
2674
|
+
let p = s();
|
|
2675
|
+
t.useHtmlLabels = p.htmlLabels;
|
|
2676
|
+
let m = p.er?.diagramPadding ?? 10, h = p.er?.entityPadding ?? 6, { cssStyles: v } = t, { labelStyles: y, nodeStyles: b } = _(t);
|
|
2677
|
+
if (r.attributes.length === 0 && t.label) {
|
|
2678
|
+
let n = {
|
|
2659
2679
|
rx: 0,
|
|
2660
2680
|
ry: 0,
|
|
2661
2681
|
labelPaddingX: m,
|
|
2662
2682
|
labelPaddingY: m * 1.5,
|
|
2663
2683
|
classes: ""
|
|
2664
2684
|
};
|
|
2665
|
-
|
|
2666
|
-
let
|
|
2667
|
-
if (i != null &&
|
|
2668
|
-
let e =
|
|
2669
|
-
|
|
2685
|
+
f(t.label, p) + n.labelPaddingX * 2 < p.er.minEntityWidth && (t.width = p.er.minEntityWidth);
|
|
2686
|
+
let a = await Ce(e, t, n);
|
|
2687
|
+
if (i != null && Pt.has(i)) {
|
|
2688
|
+
let e = r.colorIndex ?? 0;
|
|
2689
|
+
a.attr("data-color-id", `color-${e % d.length}`);
|
|
2670
2690
|
}
|
|
2671
|
-
if (!
|
|
2672
|
-
let e =
|
|
2691
|
+
if (!c(p.htmlLabels)) {
|
|
2692
|
+
let e = a.select("text"), t = e.node()?.getBBox();
|
|
2673
2693
|
e.attr("transform", `translate(${-t.width / 2}, 0)`);
|
|
2674
2694
|
}
|
|
2675
|
-
return
|
|
2695
|
+
return a;
|
|
2676
2696
|
}
|
|
2677
|
-
|
|
2697
|
+
p.htmlLabels || (m *= 1.25, h *= 1.25);
|
|
2678
2698
|
let x = E(t);
|
|
2679
2699
|
x ||= "node default";
|
|
2680
|
-
let C = e.insert("g").attr("class", x).attr("id", t.domId || t.id), w = await
|
|
2700
|
+
let C = e.insert("g").attr("class", x).attr("id", t.domId || t.id), w = await Lt(C, t.label ?? "", p, 0, 0, ["name"], y);
|
|
2681
2701
|
w.height += h;
|
|
2682
2702
|
let D = 0, O = [], k = [], A = 0, j = 0, M = 0, N = 0, P = !0, F = !0;
|
|
2683
|
-
for (let e of
|
|
2684
|
-
let t = await
|
|
2703
|
+
for (let e of r.attributes) {
|
|
2704
|
+
let t = await Lt(C, e.type, p, 0, D, ["attribute-type"], y);
|
|
2685
2705
|
A = Math.max(A, t.width + m);
|
|
2686
|
-
let n = await
|
|
2706
|
+
let n = await Lt(C, e.name, p, 0, D, ["attribute-name"], y);
|
|
2687
2707
|
j = Math.max(j, n.width + m);
|
|
2688
|
-
let r = await
|
|
2708
|
+
let r = await Lt(C, e.keys.join(), p, 0, D, ["attribute-keys"], y);
|
|
2689
2709
|
M = Math.max(M, r.width + m);
|
|
2690
|
-
let i = await
|
|
2710
|
+
let i = await Lt(C, e.comment, p, 0, D, ["attribute-comment"], y);
|
|
2691
2711
|
N = Math.max(N, i.width + m);
|
|
2692
2712
|
let a = Math.max(t.height, n.height, r.height, i.height) + h;
|
|
2693
2713
|
k.push({
|
|
@@ -2707,15 +2727,15 @@ async function Ft(e, t) {
|
|
|
2707
2727
|
let ne = 0;
|
|
2708
2728
|
k.length > 0 && (ne = k.reduce((e, t) => e + (t?.rowHeight ?? 0), 0));
|
|
2709
2729
|
let z = Math.max(ee.width + m * 2, t?.width || 0, te), B = Math.max((ne ?? 0) + w.height, t?.height || 0), V = -z / 2, H = -B / 2;
|
|
2710
|
-
if (C.selectAll("g:not(:first-child)").each((e, t,
|
|
2711
|
-
let
|
|
2712
|
-
if (
|
|
2713
|
-
let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(
|
|
2714
|
-
e && (
|
|
2730
|
+
if (C.selectAll("g:not(:first-child)").each((e, t, r) => {
|
|
2731
|
+
let i = n(r[t]), a = i.attr("transform"), o = 0, s = 0;
|
|
2732
|
+
if (a) {
|
|
2733
|
+
let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);
|
|
2734
|
+
e && (o = parseFloat(e[1]), s = parseFloat(e[2]), i.attr("class").includes("attribute-name") ? o += A : i.attr("class").includes("attribute-keys") ? o += A + j : i.attr("class").includes("attribute-comment") && (o += A + j + M));
|
|
2715
2735
|
}
|
|
2716
|
-
|
|
2717
|
-
}), C.select(".name").attr("transform", "translate(" + -w.width / 2 + ", " + (H + h / 2) + ")"), i != null &&
|
|
2718
|
-
let e =
|
|
2736
|
+
i.attr("transform", `translate(${V + m / 2 + o}, ${s + H + w.height + h / 2})`);
|
|
2737
|
+
}), C.select(".name").attr("transform", "translate(" + -w.width / 2 + ", " + (H + h / 2) + ")"), i != null && Pt.has(i)) {
|
|
2738
|
+
let e = r.colorIndex ?? 0;
|
|
2719
2739
|
C.attr("data-color-id", `color-${e % d.length}`);
|
|
2720
2740
|
}
|
|
2721
2741
|
let re = L.rectangle(V, H, z, B, R), ie = C.insert(() => re, ":first-child").attr("class", "outer-path").attr("style", v.join(""));
|
|
@@ -2723,25 +2743,25 @@ async function Ft(e, t) {
|
|
|
2723
2743
|
for (let [e, t] of k.entries()) {
|
|
2724
2744
|
let n = (e + 1) % 2 == 0 && t.yOffset !== 0, r = L.rectangle(V, w.height + H + t?.yOffset, z, t?.rowHeight, {
|
|
2725
2745
|
...R,
|
|
2726
|
-
fill: n ? o :
|
|
2727
|
-
stroke:
|
|
2746
|
+
fill: n ? o : l,
|
|
2747
|
+
stroke: u
|
|
2728
2748
|
});
|
|
2729
2749
|
C.insert(() => r, "g.label").attr("style", v.join("")).attr("class", `row-rect-${n ? "even" : "odd"}`);
|
|
2730
2750
|
}
|
|
2731
|
-
let U = 1e-4, G =
|
|
2732
|
-
if (C.insert(() => K).attr("class", "divider"), G =
|
|
2751
|
+
let U = 1e-4, G = Rt(V, w.height + H, z + V, w.height + H, U), K = L.polygon(G.map((e) => [e.x, e.y]), R);
|
|
2752
|
+
if (C.insert(() => K).attr("class", "divider"), G = Rt(A + V, w.height + H, A + V, B + H, U), K = L.polygon(G.map((e) => [e.x, e.y]), R), C.insert(() => K).attr("class", "divider"), P) {
|
|
2733
2753
|
let e = A + j + V;
|
|
2734
|
-
G =
|
|
2754
|
+
G = Rt(e, w.height + H, e, B + H, U), K = L.polygon(G.map((e) => [e.x, e.y]), R), C.insert(() => K).attr("class", "divider");
|
|
2735
2755
|
}
|
|
2736
2756
|
if (F) {
|
|
2737
2757
|
let e = A + j + M + V;
|
|
2738
|
-
G =
|
|
2758
|
+
G = Rt(e, w.height + H, e, B + H, U), K = L.polygon(G.map((e) => [e.x, e.y]), R), C.insert(() => K).attr("class", "divider");
|
|
2739
2759
|
}
|
|
2740
2760
|
for (let e of O) {
|
|
2741
2761
|
let t = w.height + H + e;
|
|
2742
|
-
G =
|
|
2762
|
+
G = Rt(V, t, z + V, t, U), K = L.polygon(G.map((e) => [e.x, e.y]), R), C.insert(() => K).attr("class", "divider");
|
|
2743
2763
|
}
|
|
2744
|
-
if (T(t, ie), b && t.look !== "handDrawn") if (i != null &&
|
|
2764
|
+
if (T(t, ie), b && t.look !== "handDrawn") if (i != null && Ft.has(i)) C.selectAll("path").attr("style", b);
|
|
2745
2765
|
else {
|
|
2746
2766
|
let e = b.split(";")?.filter((e) => e.includes("stroke"))?.map((e) => `${e}`).join("; ");
|
|
2747
2767
|
C.selectAll("path").attr("style", e ?? ""), C.selectAll(".row-rect-even path").attr("style", b);
|
|
@@ -2750,30 +2770,30 @@ async function Ft(e, t) {
|
|
|
2750
2770
|
return W.rect(t, e);
|
|
2751
2771
|
}, C;
|
|
2752
2772
|
}
|
|
2753
|
-
|
|
2754
|
-
async function
|
|
2755
|
-
let
|
|
2756
|
-
t !==
|
|
2757
|
-
let d =
|
|
2758
|
-
width:
|
|
2759
|
-
style:
|
|
2760
|
-
useHtmlLabels:
|
|
2761
|
-
},
|
|
2773
|
+
t(It, "erBox");
|
|
2774
|
+
async function Lt(e, t, r, i = 0, o = 0, s = [], l = "") {
|
|
2775
|
+
let u = e.insert("g").attr("class", `label ${s.join(" ")}`).attr("transform", `translate(${i}, ${o})`).attr("style", l);
|
|
2776
|
+
t !== a(t) && (t = a(t), t = t.replaceAll("<", "<").replaceAll(">", ">"));
|
|
2777
|
+
let d = u.node().appendChild(await b(u, t, {
|
|
2778
|
+
width: f(t, r) + 100,
|
|
2779
|
+
style: l,
|
|
2780
|
+
useHtmlLabels: r.htmlLabels
|
|
2781
|
+
}, r));
|
|
2762
2782
|
if (t.includes("<") || t.includes(">")) {
|
|
2763
2783
|
let e = d.children[0];
|
|
2764
2784
|
for (e.textContent = e.textContent.replaceAll("<", "<").replaceAll(">", ">"); e.childNodes[0];) e = e.childNodes[0], e.textContent = e.textContent.replaceAll("<", "<").replaceAll(">", ">");
|
|
2765
2785
|
}
|
|
2766
|
-
let
|
|
2767
|
-
if (r
|
|
2786
|
+
let p = d.getBBox();
|
|
2787
|
+
if (c(r.htmlLabels)) {
|
|
2768
2788
|
let e = d.children[0];
|
|
2769
2789
|
e.style.textAlign = "start";
|
|
2770
|
-
let t =
|
|
2771
|
-
|
|
2790
|
+
let t = n(d);
|
|
2791
|
+
p = e.getBoundingClientRect(), t.attr("width", p.width), t.attr("height", p.height);
|
|
2772
2792
|
}
|
|
2773
|
-
return
|
|
2793
|
+
return p;
|
|
2774
2794
|
}
|
|
2775
|
-
|
|
2776
|
-
function
|
|
2795
|
+
t(Lt, "addText");
|
|
2796
|
+
function Rt(e, t, n, r, i) {
|
|
2777
2797
|
return e === n ? [
|
|
2778
2798
|
{
|
|
2779
2799
|
x: e - i / 2,
|
|
@@ -2810,25 +2830,25 @@ function Lt(e, t, n, r, i) {
|
|
|
2810
2830
|
}
|
|
2811
2831
|
];
|
|
2812
2832
|
}
|
|
2813
|
-
|
|
2814
|
-
async function
|
|
2833
|
+
t(Rt, "lineToPolygon");
|
|
2834
|
+
async function zt(e, t, n, r, i = n.class.padding ?? 12) {
|
|
2815
2835
|
let a = r ? 0 : 3, o = e.insert("g").attr("class", E(t)).attr("id", t.domId || t.id), s = null, c = null, l = null, u = null, d = 0, f = 0, p = 0;
|
|
2816
2836
|
if (s = o.insert("g").attr("class", "annotation-group text"), t.annotations.length > 0) {
|
|
2817
2837
|
let e = t.annotations[0];
|
|
2818
|
-
await
|
|
2838
|
+
await Bt(s, { text: `\xAB${e}\xBB` }, 0), d = s.node().getBBox().height;
|
|
2819
2839
|
}
|
|
2820
|
-
c = o.insert("g").attr("class", "label-group text"), await
|
|
2840
|
+
c = o.insert("g").attr("class", "label-group text"), await Bt(c, t, 0, ["font-weight: bolder"]);
|
|
2821
2841
|
let m = c.node().getBBox();
|
|
2822
2842
|
f = m.height, l = o.insert("g").attr("class", "members-group text");
|
|
2823
2843
|
let h = 0;
|
|
2824
2844
|
for (let e of t.members) {
|
|
2825
|
-
let t = await
|
|
2845
|
+
let t = await Bt(l, e, h, [e.parseClassifier()]);
|
|
2826
2846
|
h += t + a;
|
|
2827
2847
|
}
|
|
2828
2848
|
p = l.node().getBBox().height, p <= 0 && (p = i / 2), u = o.insert("g").attr("class", "methods-group text");
|
|
2829
2849
|
let g = 0;
|
|
2830
2850
|
for (let e of t.methods) {
|
|
2831
|
-
let t = await
|
|
2851
|
+
let t = await Bt(u, e, g, [e.parseClassifier()]);
|
|
2832
2852
|
g += t + a;
|
|
2833
2853
|
}
|
|
2834
2854
|
let _ = o.node().getBBox();
|
|
@@ -2841,84 +2861,84 @@ async function Rt(e, t, n, r, i = n.class.padding ?? 12) {
|
|
|
2841
2861
|
bbox: _
|
|
2842
2862
|
};
|
|
2843
2863
|
}
|
|
2844
|
-
|
|
2845
|
-
async function
|
|
2846
|
-
let
|
|
2847
|
-
h = "text" in
|
|
2848
|
-
let g = await b(
|
|
2849
|
-
width:
|
|
2864
|
+
t(zt, "textHelper");
|
|
2865
|
+
async function Bt(e, a, o, l = []) {
|
|
2866
|
+
let u = e.insert("g").attr("class", "label").attr("style", l.join("; ")), p = s(), m = "useHtmlLabels" in a ? a.useHtmlLabels : c(p.htmlLabels) ?? !0, h = "";
|
|
2867
|
+
h = "text" in a ? a.text : a.label, !m && h.startsWith("\\") && (h = h.substring(1)), r(h) && (m = !0);
|
|
2868
|
+
let g = await b(u, i(d(h)), {
|
|
2869
|
+
width: f(h, p) + 50,
|
|
2850
2870
|
classes: "markdown-node-label",
|
|
2851
2871
|
useHtmlLabels: m
|
|
2852
|
-
},
|
|
2872
|
+
}, p), _, v = 1;
|
|
2853
2873
|
if (m) {
|
|
2854
|
-
let e = g.children[0],
|
|
2874
|
+
let e = g.children[0], r = n(g);
|
|
2855
2875
|
v = e.innerHTML.split("<br>").length, e.innerHTML.includes("</math>") && (v += e.innerHTML.split("<mrow>").length - 1);
|
|
2856
|
-
let
|
|
2857
|
-
if (
|
|
2876
|
+
let i = e.getElementsByTagName("img");
|
|
2877
|
+
if (i) {
|
|
2858
2878
|
let e = h.replace(/<img[^>]*>/g, "").trim() === "";
|
|
2859
|
-
await Promise.all([...
|
|
2860
|
-
function
|
|
2861
|
-
if (
|
|
2862
|
-
let e =
|
|
2863
|
-
|
|
2864
|
-
} else
|
|
2865
|
-
n
|
|
2879
|
+
await Promise.all([...i].map((n) => new Promise((r) => {
|
|
2880
|
+
function i() {
|
|
2881
|
+
if (n.style.display = "flex", n.style.flexDirection = "column", e) {
|
|
2882
|
+
let e = p.fontSize?.toString() ?? window.getComputedStyle(document.body).fontSize, t = parseInt(e, 10) * 5 + "px";
|
|
2883
|
+
n.style.minWidth = t, n.style.maxWidth = t;
|
|
2884
|
+
} else n.style.width = "100%";
|
|
2885
|
+
r(n);
|
|
2866
2886
|
}
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
}),
|
|
2887
|
+
t(i, "setupImage"), setTimeout(() => {
|
|
2888
|
+
n.complete && i();
|
|
2889
|
+
}), n.addEventListener("error", i), n.addEventListener("load", i);
|
|
2870
2890
|
})));
|
|
2871
2891
|
}
|
|
2872
|
-
_ = e.getBoundingClientRect(),
|
|
2892
|
+
_ = e.getBoundingClientRect(), r.attr("width", _.width), r.attr("height", _.height);
|
|
2873
2893
|
} else {
|
|
2874
|
-
|
|
2894
|
+
l.includes("font-weight: bolder") && n(g).selectAll("tspan").attr("font-weight", ""), v = g.children.length;
|
|
2875
2895
|
let e = g.children[0];
|
|
2876
2896
|
(g.textContent === "" || g.textContent.includes(">")) && (e.textContent = h[0] + h.substring(1).replaceAll(">", ">").replaceAll("<", "<").trim(), h[1] === " " && (e.textContent = e.textContent[0] + " " + e.textContent.substring(1))), e.textContent === "undefined" && (e.textContent = ""), _ = g.getBBox();
|
|
2877
2897
|
}
|
|
2878
|
-
return
|
|
2898
|
+
return u.attr("transform", "translate(0," + (-_.height / (2 * v) + o) + ")"), _.height;
|
|
2879
2899
|
}
|
|
2880
|
-
|
|
2881
|
-
async function
|
|
2882
|
-
let
|
|
2900
|
+
t(Bt, "addText");
|
|
2901
|
+
async function Vt(e, t) {
|
|
2902
|
+
let r = l(), { themeVariables: i } = r, { useGradient: a } = i, o = r.class.padding ?? 12, s = o, u = t.useHtmlLabels ?? c(r.htmlLabels) ?? !0, d = t;
|
|
2883
2903
|
d.annotations = d.annotations ?? [], d.members = d.members ?? [], d.methods = d.methods ?? [];
|
|
2884
|
-
let { shapeSvg: f, bbox: p } = await
|
|
2904
|
+
let { shapeSvg: f, bbox: p } = await zt(e, t, r, u, s), { labelStyles: m, nodeStyles: h } = _(t);
|
|
2885
2905
|
t.labelStyle = m, t.cssStyles = d.styles || "";
|
|
2886
2906
|
let v = d.styles?.join(";") || h || "";
|
|
2887
2907
|
t.cssStyles ||= v.replaceAll("!important", "").split(";");
|
|
2888
|
-
let y = d.members.length === 0 && d.methods.length === 0 && !
|
|
2908
|
+
let y = d.members.length === 0 && d.methods.length === 0 && !r.class?.hideEmptyMembersBox, b = S.svg(f), x = g(t, {});
|
|
2889
2909
|
t.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
|
|
2890
2910
|
let C = Math.max(t.width ?? 0, p.width), w = Math.max(t.height ?? 0, p.height), E = (t.height ?? 0) > p.height;
|
|
2891
|
-
d.members.length === 0 && d.methods.length === 0 ? w +=
|
|
2892
|
-
let D = -C / 2, O = -w / 2, k = y ?
|
|
2893
|
-
E && (k =
|
|
2894
|
-
let A = b.rectangle(D -
|
|
2911
|
+
d.members.length === 0 && d.methods.length === 0 ? w += s : d.members.length > 0 && d.methods.length === 0 && (w += s * 2);
|
|
2912
|
+
let D = -C / 2, O = -w / 2, k = y ? o * 2 : d.members.length === 0 && d.methods.length === 0 ? -o : 0;
|
|
2913
|
+
E && (k = o * 2);
|
|
2914
|
+
let A = b.rectangle(D - o, O - o - (y ? o : d.members.length === 0 && d.methods.length === 0 ? -o / 2 : 0), C + 2 * o, w + 2 * o + k, x), j = f.insert(() => A, ":first-child");
|
|
2895
2915
|
j.attr("class", "basic label-container outer-path");
|
|
2896
|
-
let M = j.node().getBBox(), N = f.select(".annotation-group").node().getBBox().height - (y ?
|
|
2897
|
-
if (f.selectAll(".text").each((e, t,
|
|
2898
|
-
let
|
|
2899
|
-
if (
|
|
2900
|
-
let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(
|
|
2901
|
-
e && (
|
|
2916
|
+
let M = j.node().getBBox(), N = f.select(".annotation-group").node().getBBox().height - (y ? o / 2 : 0) || 0, P = f.select(".label-group").node().getBBox().height - (y ? o / 2 : 0) || 0, F = f.select(".members-group").node().getBBox().height - (y ? o / 2 : 0) || 0, I = (N + P + O + o - (O - o - (y ? o : d.members.length === 0 && d.methods.length === 0 ? -o / 2 : 0))) / 2;
|
|
2917
|
+
if (f.selectAll(".text").each((e, t, i) => {
|
|
2918
|
+
let a = n(i[t]), c = a.attr("transform"), l = 0;
|
|
2919
|
+
if (c) {
|
|
2920
|
+
let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(c);
|
|
2921
|
+
e && (l = parseFloat(e[2]));
|
|
2902
2922
|
}
|
|
2903
|
-
let p =
|
|
2904
|
-
if (
|
|
2905
|
-
let e = Math.max(F,
|
|
2906
|
-
p = E ? Math.max(I, N + P + e + O +
|
|
2923
|
+
let p = l + O + o - (y ? o : d.members.length === 0 && d.methods.length === 0 ? -o / 2 : 0);
|
|
2924
|
+
if (a.attr("class").includes("methods-group")) {
|
|
2925
|
+
let e = Math.max(F, s / 2);
|
|
2926
|
+
p = E ? Math.max(I, N + P + e + O + s * 2 + o) + s * 2 : N + P + e + O + s * 4 + o;
|
|
2907
2927
|
}
|
|
2908
|
-
d.members.length === 0 && d.methods.length === 0 &&
|
|
2928
|
+
d.members.length === 0 && d.methods.length === 0 && r.class?.hideEmptyMembersBox && (p = d.annotations.length > 0 ? l - s : l), u || (p -= 4);
|
|
2909
2929
|
let m = D;
|
|
2910
|
-
(
|
|
2930
|
+
(a.attr("class").includes("label-group") || a.attr("class").includes("annotation-group")) && (m = -a.node()?.getBBox().width / 2 || 0, f.selectAll("text").each(function(e, t, n) {
|
|
2911
2931
|
window.getComputedStyle(n[t]).textAnchor === "middle" && (m = 0);
|
|
2912
|
-
})),
|
|
2932
|
+
})), a.attr("transform", `translate(${m}, ${p})`);
|
|
2913
2933
|
}), d.members.length > 0 || d.methods.length > 0 || y) {
|
|
2914
|
-
let e = N + P + O +
|
|
2915
|
-
f.insert(() => n).attr("class", `divider${t.look === "neo" && !
|
|
2934
|
+
let e = N + P + O + o, n = b.line(M.x, e, M.x + M.width, e + .001, x);
|
|
2935
|
+
f.insert(() => n).attr("class", `divider${t.look === "neo" && !a ? " neo-line" : ""}`).attr("style", v);
|
|
2916
2936
|
}
|
|
2917
2937
|
if (y || d.members.length > 0 || d.methods.length > 0) {
|
|
2918
|
-
let e = N + P + F + O +
|
|
2919
|
-
f.insert(() => n).attr("class", `divider${t.look === "neo" && !
|
|
2938
|
+
let e = N + P + F + O + s * 2 + o, n = b.line(M.x, E ? Math.max(I, e) : e, M.x + M.width, (E ? Math.max(I, e) : e) + .001, x);
|
|
2939
|
+
f.insert(() => n).attr("class", `divider${t.look === "neo" && !a ? " neo-line" : ""}`).attr("style", v);
|
|
2920
2940
|
}
|
|
2921
|
-
if (d.look !== "handDrawn" && f.selectAll("path").attr("style", v), j.select(":nth-child(2)").attr("style", v), f.selectAll(".divider").select("path").attr("style", v), t.labelStyle ? f.selectAll("span").attr("style", t.labelStyle) : f.selectAll("span").attr("style", v), !
|
|
2941
|
+
if (d.look !== "handDrawn" && f.selectAll("path").attr("style", v), j.select(":nth-child(2)").attr("style", v), f.selectAll(".divider").select("path").attr("style", v), t.labelStyle ? f.selectAll("span").attr("style", t.labelStyle) : f.selectAll("span").attr("style", v), !u) {
|
|
2922
2942
|
let e = RegExp(/color\s*:\s*([^;]*)/), t = e.exec(v);
|
|
2923
2943
|
if (t) {
|
|
2924
2944
|
let e = t[0].replace("color", "fill");
|
|
@@ -2935,11 +2955,11 @@ async function Bt(e, t) {
|
|
|
2935
2955
|
return W.rect(t, e);
|
|
2936
2956
|
}, f;
|
|
2937
2957
|
}
|
|
2938
|
-
|
|
2939
|
-
async function
|
|
2958
|
+
t(Vt, "classBox");
|
|
2959
|
+
async function Ht(e, t) {
|
|
2940
2960
|
let { labelStyles: r, nodeStyles: i } = _(t);
|
|
2941
2961
|
t.labelStyle = r;
|
|
2942
|
-
let a = t, o = t, s = "verifyMethod" in t, c = E(t), { themeVariables:
|
|
2962
|
+
let a = t, o = t, s = "verifyMethod" in t, c = E(t), { themeVariables: u } = l(), { borderColorArray: d, requirementEdgeLabelBackground: f } = u, p = e.insert("g").attr("class", c).attr("id", t.domId ?? t.id), m;
|
|
2943
2963
|
m = s ? await $(p, `<<${a.type}>>`, 0, t.labelStyle) : await $(p, "<<Element>>", 0, t.labelStyle);
|
|
2944
2964
|
let h = m, v = await $(p, a.name, h, t.labelStyle + "; font-weight: bold;");
|
|
2945
2965
|
if (h += v + 20, s) {
|
|
@@ -2960,14 +2980,14 @@ async function Vt(e, t) {
|
|
|
2960
2980
|
let e = t.colorIndex ?? 0;
|
|
2961
2981
|
p.attr("data-color-id", `color-${e % d.length}`);
|
|
2962
2982
|
}
|
|
2963
|
-
if (p.selectAll(".label").each((e, t,
|
|
2964
|
-
let
|
|
2965
|
-
if (
|
|
2966
|
-
let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(
|
|
2967
|
-
e && (
|
|
2983
|
+
if (p.selectAll(".label").each((e, t, r) => {
|
|
2984
|
+
let i = n(r[t]), a = i.attr("transform"), o = 0, s = 0;
|
|
2985
|
+
if (a) {
|
|
2986
|
+
let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);
|
|
2987
|
+
e && (o = parseFloat(e[1]), s = parseFloat(e[2]));
|
|
2968
2988
|
}
|
|
2969
|
-
let
|
|
2970
|
-
(t === 0 || t === 1) && (
|
|
2989
|
+
let c = s - b / 2, l = x + 20 / 2;
|
|
2990
|
+
(t === 0 || t === 1) && (l = o), i.attr("transform", `translate(${l}, ${c + 20})`);
|
|
2971
2991
|
}), h > m + v + 20) {
|
|
2972
2992
|
let e = C + m + v + 20, n;
|
|
2973
2993
|
if (t.look === "neo") {
|
|
@@ -2985,27 +3005,27 @@ async function Vt(e, t) {
|
|
|
2985
3005
|
return W.rect(t, e);
|
|
2986
3006
|
}, i && t.look !== "handDrawn" && (f || d?.length) && p.selectAll("path").attr("style", i), p;
|
|
2987
3007
|
}
|
|
2988
|
-
|
|
2989
|
-
async function $(e,
|
|
2990
|
-
if (
|
|
2991
|
-
let o = e.insert("g").attr("class", "label").attr("style", a), s =
|
|
2992
|
-
width:
|
|
3008
|
+
t(Ht, "requirementBox");
|
|
3009
|
+
async function $(e, t, r, a = "") {
|
|
3010
|
+
if (t === "") return 0;
|
|
3011
|
+
let o = e.insert("g").attr("class", "label").attr("style", a), s = l(), c = s.htmlLabels ?? !0, u = await b(o, i(d(t)), {
|
|
3012
|
+
width: f(t, s) + 50,
|
|
2993
3013
|
classes: "markdown-node-label",
|
|
2994
3014
|
useHtmlLabels: c,
|
|
2995
3015
|
style: a
|
|
2996
|
-
}, s),
|
|
3016
|
+
}, s), p;
|
|
2997
3017
|
if (c) {
|
|
2998
|
-
let e =
|
|
2999
|
-
|
|
3018
|
+
let e = u.children[0], t = n(u);
|
|
3019
|
+
p = e.getBoundingClientRect(), t.attr("width", p.width), t.attr("height", p.height);
|
|
3000
3020
|
} else {
|
|
3001
|
-
let e =
|
|
3021
|
+
let e = u.children[0];
|
|
3002
3022
|
for (let t of e.children) a && t.setAttribute("style", a);
|
|
3003
|
-
|
|
3023
|
+
p = u.getBBox(), p.height += 6;
|
|
3004
3024
|
}
|
|
3005
|
-
return o.attr("transform", `translate(${-
|
|
3025
|
+
return o.attr("transform", `translate(${-p.width / 2},${-p.height / 2 + r})`), p.height;
|
|
3006
3026
|
}
|
|
3007
|
-
|
|
3008
|
-
var
|
|
3027
|
+
t($, "addText");
|
|
3028
|
+
var Ut = /* @__PURE__ */ t((e) => {
|
|
3009
3029
|
switch (e) {
|
|
3010
3030
|
case "Very High": return "red";
|
|
3011
3031
|
case "High": return "orange";
|
|
@@ -3014,7 +3034,7 @@ var Ht = /* @__PURE__ */ l((e) => {
|
|
|
3014
3034
|
case "Very Low": return "lightblue";
|
|
3015
3035
|
}
|
|
3016
3036
|
}, "colorFromPriority");
|
|
3017
|
-
async function
|
|
3037
|
+
async function Wt(e, t, { config: n }) {
|
|
3018
3038
|
let { labelStyles: r, nodeStyles: i } = _(t);
|
|
3019
3039
|
t.labelStyle = r || "";
|
|
3020
3040
|
let a = t.width;
|
|
@@ -3043,19 +3063,19 @@ async function Ut(e, t, { config: n }) {
|
|
|
3043
3063
|
let e = "priority" in t && t.priority;
|
|
3044
3064
|
if (e) {
|
|
3045
3065
|
let t = o.append("line"), n = D + 2, r = O + Math.floor((A ?? 0) / 2), i = O + x - Math.floor((A ?? 0) / 2);
|
|
3046
|
-
t.attr("x1", n).attr("y1", r).attr("x2", n).attr("y2", i).attr("stroke-width", "4").attr("stroke",
|
|
3066
|
+
t.attr("x1", n).attr("y1", r).attr("x2", n).attr("y2", i).attr("stroke-width", "4").attr("stroke", Ut(e));
|
|
3047
3067
|
}
|
|
3048
3068
|
}
|
|
3049
3069
|
return T(t, k), t.height = x, t.intersect = function(e) {
|
|
3050
3070
|
return W.rect(t, e);
|
|
3051
3071
|
}, o;
|
|
3052
3072
|
}
|
|
3053
|
-
|
|
3054
|
-
async function
|
|
3055
|
-
let { labelStyles:
|
|
3056
|
-
|
|
3057
|
-
let { shapeSvg:
|
|
3058
|
-
|
|
3073
|
+
t(Wt, "kanbanItem");
|
|
3074
|
+
async function Gt(t, n) {
|
|
3075
|
+
let { labelStyles: r, nodeStyles: i } = _(n);
|
|
3076
|
+
n.labelStyle = r;
|
|
3077
|
+
let { shapeSvg: a, bbox: o, halfPadding: s, label: c } = await C(t, n, E(n)), l = o.width + 10 * s, u = o.height + 8 * s, d = .15 * l, { cssStyles: f } = n, m = o.width + 20, h = o.height + 20, v = Math.max(l, m), y = Math.max(u, h);
|
|
3078
|
+
c.attr("transform", `translate(${-o.width / 2}, ${-o.height / 2})`);
|
|
3059
3079
|
let b, x = `M0 0
|
|
3060
3080
|
a${d},${d} 1 0,0 ${v * .25},${-1 * y * .1}
|
|
3061
3081
|
a${d},${d} 1 0,0 ${v * .25},0
|
|
@@ -3075,47 +3095,47 @@ async function Wt(e, t) {
|
|
|
3075
3095
|
a${d * .8},${d * .8} 1 0,0 0,${-1 * y * .34}
|
|
3076
3096
|
a${d},${d} 1 0,0 ${v * .1},${-1 * y * .33}
|
|
3077
3097
|
H0 V0 Z`;
|
|
3078
|
-
if (
|
|
3079
|
-
let e = S.svg(
|
|
3080
|
-
b =
|
|
3081
|
-
} else b =
|
|
3082
|
-
return b.attr("transform", `translate(${-v / 2}, ${-y / 2})`), T(
|
|
3098
|
+
if (n.look === "handDrawn") {
|
|
3099
|
+
let e = S.svg(a), t = g(n, {}), r = e.path(x, t);
|
|
3100
|
+
b = a.insert(() => r, ":first-child"), b.attr("class", "basic label-container").attr("style", p(f));
|
|
3101
|
+
} else b = a.insert("path", ":first-child").attr("class", "basic label-container").attr("style", i).attr("d", x);
|
|
3102
|
+
return b.attr("transform", `translate(${-v / 2}, ${-y / 2})`), T(n, b), n.calcIntersect = function(e, t) {
|
|
3083
3103
|
return W.rect(e, t);
|
|
3084
|
-
},
|
|
3085
|
-
return
|
|
3086
|
-
},
|
|
3104
|
+
}, n.intersect = function(t) {
|
|
3105
|
+
return e.info("Bang intersect", n, t), W.rect(n, t);
|
|
3106
|
+
}, a;
|
|
3087
3107
|
}
|
|
3088
|
-
|
|
3089
|
-
async function
|
|
3090
|
-
let { labelStyles:
|
|
3091
|
-
|
|
3092
|
-
let { shapeSvg:
|
|
3108
|
+
t(Gt, "bang");
|
|
3109
|
+
async function Kt(t, n) {
|
|
3110
|
+
let { labelStyles: r, nodeStyles: i } = _(n);
|
|
3111
|
+
n.labelStyle = r;
|
|
3112
|
+
let { shapeSvg: a, bbox: o, halfPadding: s, label: c } = await C(t, n, E(n)), l = o.width + 2 * s, u = o.height + 2 * s, d = .15 * l, f = .25 * l, m = .35 * l, h = .2 * l, { cssStyles: v } = n, y, b = `M0 0
|
|
3093
3113
|
a${d},${d} 0 0,1 ${l * .25},${-1 * l * .1}
|
|
3094
3114
|
a${m},${m} 1 0,1 ${l * .4},${-1 * l * .1}
|
|
3095
|
-
a${
|
|
3115
|
+
a${f},${f} 1 0,1 ${l * .35},${l * .2}
|
|
3096
3116
|
|
|
3097
3117
|
a${d},${d} 1 0,1 ${l * .15},${u * .35}
|
|
3098
3118
|
a${h},${h} 1 0,1 ${-1 * l * .15},${u * .65}
|
|
3099
3119
|
|
|
3100
|
-
a${
|
|
3120
|
+
a${f},${d} 1 0,1 ${-1 * l * .25},${l * .15}
|
|
3101
3121
|
a${m},${m} 1 0,1 ${-1 * l * .5},0
|
|
3102
3122
|
a${d},${d} 1 0,1 ${-1 * l * .25},${-1 * l * .15}
|
|
3103
3123
|
|
|
3104
3124
|
a${d},${d} 1 0,1 ${-1 * l * .1},${-1 * u * .35}
|
|
3105
3125
|
a${h},${h} 1 0,1 ${l * .1},${-1 * u * .65}
|
|
3106
3126
|
H0 V0 Z`;
|
|
3107
|
-
if (
|
|
3108
|
-
let e = S.svg(
|
|
3109
|
-
y =
|
|
3110
|
-
} else y =
|
|
3111
|
-
return
|
|
3127
|
+
if (n.look === "handDrawn") {
|
|
3128
|
+
let e = S.svg(a), t = g(n, {}), r = e.path(b, t);
|
|
3129
|
+
y = a.insert(() => r, ":first-child"), y.attr("class", "basic label-container").attr("style", p(v));
|
|
3130
|
+
} else y = a.insert("path", ":first-child").attr("class", "basic label-container").attr("style", i).attr("d", b);
|
|
3131
|
+
return c.attr("transform", `translate(${-o.width / 2}, ${-o.height / 2})`), y.attr("transform", `translate(${-l / 2}, ${-u / 2})`), T(n, y), n.calcIntersect = function(e, t) {
|
|
3112
3132
|
return W.rect(e, t);
|
|
3113
|
-
},
|
|
3114
|
-
return
|
|
3115
|
-
},
|
|
3133
|
+
}, n.intersect = function(t) {
|
|
3134
|
+
return e.info("Cloud intersect", n, t), W.rect(n, t);
|
|
3135
|
+
}, a;
|
|
3116
3136
|
}
|
|
3117
|
-
|
|
3118
|
-
async function
|
|
3137
|
+
t(Kt, "cloud");
|
|
3138
|
+
async function qt(e, t) {
|
|
3119
3139
|
let { labelStyles: n, nodeStyles: r } = _(t);
|
|
3120
3140
|
t.labelStyle = n;
|
|
3121
3141
|
let { shapeSvg: i, bbox: a, halfPadding: o, label: s } = await C(e, t, E(t)), c = a.width + 8 * o, l = a.height + 2 * o, u = t.look === "neo" ? `
|
|
@@ -3147,12 +3167,12 @@ async function Kt(e, t) {
|
|
|
3147
3167
|
return W.rect(t, e);
|
|
3148
3168
|
}, i;
|
|
3149
3169
|
}
|
|
3150
|
-
|
|
3151
|
-
async function
|
|
3170
|
+
t(qt, "defaultMindmapNode");
|
|
3171
|
+
async function Jt(e, t) {
|
|
3152
3172
|
return ue(e, t, { padding: t.padding ?? 0 });
|
|
3153
3173
|
}
|
|
3154
|
-
|
|
3155
|
-
var
|
|
3174
|
+
t(Jt, "mindmapCircle");
|
|
3175
|
+
var Yt = [
|
|
3156
3176
|
{
|
|
3157
3177
|
semanticName: "Process",
|
|
3158
3178
|
name: "Rectangle",
|
|
@@ -3164,7 +3184,7 @@ var Jt = [
|
|
|
3164
3184
|
"rectangle"
|
|
3165
3185
|
],
|
|
3166
3186
|
internalAliases: ["squareRect"],
|
|
3167
|
-
handler:
|
|
3187
|
+
handler: lt
|
|
3168
3188
|
},
|
|
3169
3189
|
{
|
|
3170
3190
|
semanticName: "Event",
|
|
@@ -3173,7 +3193,7 @@ var Jt = [
|
|
|
3173
3193
|
description: "Represents an event",
|
|
3174
3194
|
aliases: ["event"],
|
|
3175
3195
|
internalAliases: ["roundedRect"],
|
|
3176
|
-
handler:
|
|
3196
|
+
handler: ot
|
|
3177
3197
|
},
|
|
3178
3198
|
{
|
|
3179
3199
|
semanticName: "Terminal Point",
|
|
@@ -3181,7 +3201,7 @@ var Jt = [
|
|
|
3181
3201
|
shortName: "stadium",
|
|
3182
3202
|
description: "Terminal point",
|
|
3183
3203
|
aliases: ["terminal", "pill"],
|
|
3184
|
-
handler:
|
|
3204
|
+
handler: ut
|
|
3185
3205
|
},
|
|
3186
3206
|
{
|
|
3187
3207
|
semanticName: "Subprocess",
|
|
@@ -3194,7 +3214,7 @@ var Jt = [
|
|
|
3194
3214
|
"framed-rectangle",
|
|
3195
3215
|
"subroutine"
|
|
3196
3216
|
],
|
|
3197
|
-
handler:
|
|
3217
|
+
handler: ht
|
|
3198
3218
|
},
|
|
3199
3219
|
{
|
|
3200
3220
|
semanticName: "Database",
|
|
@@ -3208,6 +3228,14 @@ var Jt = [
|
|
|
3208
3228
|
],
|
|
3209
3229
|
handler: Se
|
|
3210
3230
|
},
|
|
3231
|
+
{
|
|
3232
|
+
semanticName: "Data Store",
|
|
3233
|
+
name: "Data Store",
|
|
3234
|
+
shortName: "datastore",
|
|
3235
|
+
description: "Data flow diagram data store",
|
|
3236
|
+
aliases: ["data-store"],
|
|
3237
|
+
handler: we
|
|
3238
|
+
},
|
|
3211
3239
|
{
|
|
3212
3240
|
semanticName: "Start",
|
|
3213
3241
|
name: "Circle",
|
|
@@ -3222,7 +3250,7 @@ var Jt = [
|
|
|
3222
3250
|
shortName: "bang",
|
|
3223
3251
|
description: "Bang",
|
|
3224
3252
|
aliases: ["bang"],
|
|
3225
|
-
handler:
|
|
3253
|
+
handler: Gt
|
|
3226
3254
|
},
|
|
3227
3255
|
{
|
|
3228
3256
|
semanticName: "Cloud",
|
|
@@ -3230,7 +3258,7 @@ var Jt = [
|
|
|
3230
3258
|
shortName: "cloud",
|
|
3231
3259
|
description: "cloud",
|
|
3232
3260
|
aliases: ["cloud"],
|
|
3233
|
-
handler:
|
|
3261
|
+
handler: Kt
|
|
3234
3262
|
},
|
|
3235
3263
|
{
|
|
3236
3264
|
semanticName: "Decision",
|
|
@@ -3242,7 +3270,7 @@ var Jt = [
|
|
|
3242
3270
|
"diamond",
|
|
3243
3271
|
"question"
|
|
3244
3272
|
],
|
|
3245
|
-
handler:
|
|
3273
|
+
handler: rt
|
|
3246
3274
|
},
|
|
3247
3275
|
{
|
|
3248
3276
|
semanticName: "Prepare Conditional",
|
|
@@ -3250,7 +3278,7 @@ var Jt = [
|
|
|
3250
3278
|
shortName: "hex",
|
|
3251
3279
|
description: "Preparation or condition step",
|
|
3252
3280
|
aliases: ["hexagon", "prepare"],
|
|
3253
|
-
handler:
|
|
3281
|
+
handler: Pe
|
|
3254
3282
|
},
|
|
3255
3283
|
{
|
|
3256
3284
|
semanticName: "Data Input/Output",
|
|
@@ -3259,7 +3287,7 @@ var Jt = [
|
|
|
3259
3287
|
description: "Represents input or output",
|
|
3260
3288
|
aliases: ["lean-right", "in-out"],
|
|
3261
3289
|
internalAliases: ["lean_right"],
|
|
3262
|
-
handler:
|
|
3290
|
+
handler: We
|
|
3263
3291
|
},
|
|
3264
3292
|
{
|
|
3265
3293
|
semanticName: "Data Input/Output",
|
|
@@ -3268,7 +3296,7 @@ var Jt = [
|
|
|
3268
3296
|
description: "Represents output or input",
|
|
3269
3297
|
aliases: ["lean-left", "out-in"],
|
|
3270
3298
|
internalAliases: ["lean_left"],
|
|
3271
|
-
handler:
|
|
3299
|
+
handler: Ue
|
|
3272
3300
|
},
|
|
3273
3301
|
{
|
|
3274
3302
|
semanticName: "Priority Action",
|
|
@@ -3280,7 +3308,7 @@ var Jt = [
|
|
|
3280
3308
|
"trapezoid-bottom",
|
|
3281
3309
|
"trapezoid"
|
|
3282
3310
|
],
|
|
3283
|
-
handler:
|
|
3311
|
+
handler: Et
|
|
3284
3312
|
},
|
|
3285
3313
|
{
|
|
3286
3314
|
semanticName: "Manual Operation",
|
|
@@ -3293,7 +3321,7 @@ var Jt = [
|
|
|
3293
3321
|
"inv-trapezoid"
|
|
3294
3322
|
],
|
|
3295
3323
|
internalAliases: ["inv_trapezoid"],
|
|
3296
|
-
handler:
|
|
3324
|
+
handler: Ve
|
|
3297
3325
|
},
|
|
3298
3326
|
{
|
|
3299
3327
|
semanticName: "Stop",
|
|
@@ -3302,14 +3330,14 @@ var Jt = [
|
|
|
3302
3330
|
description: "Represents a stop point",
|
|
3303
3331
|
aliases: ["double-circle"],
|
|
3304
3332
|
internalAliases: ["doublecircle"],
|
|
3305
|
-
handler:
|
|
3333
|
+
handler: Ee
|
|
3306
3334
|
},
|
|
3307
3335
|
{
|
|
3308
3336
|
semanticName: "Text Block",
|
|
3309
3337
|
name: "Text Block",
|
|
3310
3338
|
shortName: "text",
|
|
3311
3339
|
description: "Text block",
|
|
3312
|
-
handler:
|
|
3340
|
+
handler: yt
|
|
3313
3341
|
},
|
|
3314
3342
|
{
|
|
3315
3343
|
semanticName: "Card",
|
|
@@ -3330,7 +3358,7 @@ var Jt = [
|
|
|
3330
3358
|
"lin-proc",
|
|
3331
3359
|
"shaded-process"
|
|
3332
3360
|
],
|
|
3333
|
-
handler:
|
|
3361
|
+
handler: st
|
|
3334
3362
|
},
|
|
3335
3363
|
{
|
|
3336
3364
|
semanticName: "Start",
|
|
@@ -3339,7 +3367,7 @@ var Jt = [
|
|
|
3339
3367
|
description: "Small starting point",
|
|
3340
3368
|
aliases: ["start", "small-circle"],
|
|
3341
3369
|
internalAliases: ["stateStart"],
|
|
3342
|
-
handler:
|
|
3370
|
+
handler: pt
|
|
3343
3371
|
},
|
|
3344
3372
|
{
|
|
3345
3373
|
semanticName: "Stop",
|
|
@@ -3348,7 +3376,7 @@ var Jt = [
|
|
|
3348
3376
|
description: "Stop point",
|
|
3349
3377
|
aliases: ["stop", "framed-circle"],
|
|
3350
3378
|
internalAliases: ["stateEnd"],
|
|
3351
|
-
handler:
|
|
3379
|
+
handler: ft
|
|
3352
3380
|
},
|
|
3353
3381
|
{
|
|
3354
3382
|
semanticName: "Fork/Join",
|
|
@@ -3357,7 +3385,7 @@ var Jt = [
|
|
|
3357
3385
|
description: "Fork or join in process flow",
|
|
3358
3386
|
aliases: ["join"],
|
|
3359
3387
|
internalAliases: ["forkJoin"],
|
|
3360
|
-
handler:
|
|
3388
|
+
handler: je
|
|
3361
3389
|
},
|
|
3362
3390
|
{
|
|
3363
3391
|
semanticName: "Collate",
|
|
@@ -3365,7 +3393,7 @@ var Jt = [
|
|
|
3365
3393
|
shortName: "hourglass",
|
|
3366
3394
|
description: "Represents a collate operation",
|
|
3367
3395
|
aliases: ["hourglass", "collate"],
|
|
3368
|
-
handler:
|
|
3396
|
+
handler: Fe
|
|
3369
3397
|
},
|
|
3370
3398
|
{
|
|
3371
3399
|
semanticName: "Comment",
|
|
@@ -3395,7 +3423,7 @@ var Jt = [
|
|
|
3395
3423
|
shortName: "bolt",
|
|
3396
3424
|
description: "Communication link",
|
|
3397
3425
|
aliases: ["com-link", "lightning-bolt"],
|
|
3398
|
-
handler:
|
|
3426
|
+
handler: Ge
|
|
3399
3427
|
},
|
|
3400
3428
|
{
|
|
3401
3429
|
semanticName: "Document",
|
|
@@ -3403,7 +3431,7 @@ var Jt = [
|
|
|
3403
3431
|
shortName: "doc",
|
|
3404
3432
|
description: "Represents a document",
|
|
3405
3433
|
aliases: ["doc", "document"],
|
|
3406
|
-
handler:
|
|
3434
|
+
handler: jt
|
|
3407
3435
|
},
|
|
3408
3436
|
{
|
|
3409
3437
|
semanticName: "Delay",
|
|
@@ -3411,7 +3439,7 @@ var Jt = [
|
|
|
3411
3439
|
shortName: "delay",
|
|
3412
3440
|
description: "Represents a delay",
|
|
3413
3441
|
aliases: ["half-rounded-rectangle"],
|
|
3414
|
-
handler:
|
|
3442
|
+
handler: Me
|
|
3415
3443
|
},
|
|
3416
3444
|
{
|
|
3417
3445
|
semanticName: "Direct Access Storage",
|
|
@@ -3419,7 +3447,7 @@ var Jt = [
|
|
|
3419
3447
|
shortName: "h-cyl",
|
|
3420
3448
|
description: "Direct access storage",
|
|
3421
3449
|
aliases: ["das", "horizontal-cylinder"],
|
|
3422
|
-
handler:
|
|
3450
|
+
handler: Tt
|
|
3423
3451
|
},
|
|
3424
3452
|
{
|
|
3425
3453
|
semanticName: "Disk Storage",
|
|
@@ -3427,7 +3455,7 @@ var Jt = [
|
|
|
3427
3455
|
shortName: "lin-cyl",
|
|
3428
3456
|
description: "Disk storage",
|
|
3429
3457
|
aliases: ["disk", "lined-cylinder"],
|
|
3430
|
-
handler:
|
|
3458
|
+
handler: Ze
|
|
3431
3459
|
},
|
|
3432
3460
|
{
|
|
3433
3461
|
semanticName: "Display",
|
|
@@ -3447,7 +3475,7 @@ var Jt = [
|
|
|
3447
3475
|
"divided-rectangle",
|
|
3448
3476
|
"divided-process"
|
|
3449
3477
|
],
|
|
3450
|
-
handler:
|
|
3478
|
+
handler: Te
|
|
3451
3479
|
},
|
|
3452
3480
|
{
|
|
3453
3481
|
semanticName: "Extract",
|
|
@@ -3455,7 +3483,7 @@ var Jt = [
|
|
|
3455
3483
|
shortName: "tri",
|
|
3456
3484
|
description: "Extraction process",
|
|
3457
3485
|
aliases: ["extract", "triangle"],
|
|
3458
|
-
handler:
|
|
3486
|
+
handler: At
|
|
3459
3487
|
},
|
|
3460
3488
|
{
|
|
3461
3489
|
semanticName: "Internal Storage",
|
|
@@ -3463,7 +3491,7 @@ var Jt = [
|
|
|
3463
3491
|
shortName: "win-pane",
|
|
3464
3492
|
description: "Internal storage",
|
|
3465
3493
|
aliases: ["internal-storage", "window-pane"],
|
|
3466
|
-
handler:
|
|
3494
|
+
handler: Nt
|
|
3467
3495
|
},
|
|
3468
3496
|
{
|
|
3469
3497
|
semanticName: "Junction",
|
|
@@ -3471,7 +3499,7 @@ var Jt = [
|
|
|
3471
3499
|
shortName: "f-circ",
|
|
3472
3500
|
description: "Junction point",
|
|
3473
3501
|
aliases: ["junction", "filled-circle"],
|
|
3474
|
-
handler:
|
|
3502
|
+
handler: De
|
|
3475
3503
|
},
|
|
3476
3504
|
{
|
|
3477
3505
|
semanticName: "Loop Limit",
|
|
@@ -3479,7 +3507,7 @@ var Jt = [
|
|
|
3479
3507
|
shortName: "notch-pent",
|
|
3480
3508
|
description: "Loop limit step",
|
|
3481
3509
|
aliases: ["loop-limit", "notched-pentagon"],
|
|
3482
|
-
handler:
|
|
3510
|
+
handler: Dt
|
|
3483
3511
|
},
|
|
3484
3512
|
{
|
|
3485
3513
|
semanticName: "Manual File",
|
|
@@ -3487,7 +3515,7 @@ var Jt = [
|
|
|
3487
3515
|
shortName: "flip-tri",
|
|
3488
3516
|
description: "Manual file operation",
|
|
3489
3517
|
aliases: ["manual-file", "flipped-triangle"],
|
|
3490
|
-
handler:
|
|
3518
|
+
handler: Ae
|
|
3491
3519
|
},
|
|
3492
3520
|
{
|
|
3493
3521
|
semanticName: "Manual Input",
|
|
@@ -3495,7 +3523,7 @@ var Jt = [
|
|
|
3495
3523
|
shortName: "sl-rect",
|
|
3496
3524
|
description: "Manual input step",
|
|
3497
3525
|
aliases: ["manual-input", "sloped-rectangle"],
|
|
3498
|
-
handler:
|
|
3526
|
+
handler: ct
|
|
3499
3527
|
},
|
|
3500
3528
|
{
|
|
3501
3529
|
semanticName: "Multi-Document",
|
|
@@ -3507,7 +3535,7 @@ var Jt = [
|
|
|
3507
3535
|
"st-doc",
|
|
3508
3536
|
"stacked-document"
|
|
3509
3537
|
],
|
|
3510
|
-
handler:
|
|
3538
|
+
handler: et
|
|
3511
3539
|
},
|
|
3512
3540
|
{
|
|
3513
3541
|
semanticName: "Multi-Process",
|
|
@@ -3519,7 +3547,7 @@ var Jt = [
|
|
|
3519
3547
|
"processes",
|
|
3520
3548
|
"stacked-rectangle"
|
|
3521
3549
|
],
|
|
3522
|
-
handler:
|
|
3550
|
+
handler: $e
|
|
3523
3551
|
},
|
|
3524
3552
|
{
|
|
3525
3553
|
semanticName: "Stored Data",
|
|
@@ -3543,7 +3571,7 @@ var Jt = [
|
|
|
3543
3571
|
shortName: "tag-doc",
|
|
3544
3572
|
description: "Tagged document",
|
|
3545
3573
|
aliases: ["tag-doc", "tagged-document"],
|
|
3546
|
-
handler:
|
|
3574
|
+
handler: vt
|
|
3547
3575
|
},
|
|
3548
3576
|
{
|
|
3549
3577
|
semanticName: "Tagged Process",
|
|
@@ -3555,7 +3583,7 @@ var Jt = [
|
|
|
3555
3583
|
"tag-proc",
|
|
3556
3584
|
"tagged-process"
|
|
3557
3585
|
],
|
|
3558
|
-
handler:
|
|
3586
|
+
handler: _t
|
|
3559
3587
|
},
|
|
3560
3588
|
{
|
|
3561
3589
|
semanticName: "Paper Tape",
|
|
@@ -3563,7 +3591,7 @@ var Jt = [
|
|
|
3563
3591
|
shortName: "flag",
|
|
3564
3592
|
description: "Paper tape",
|
|
3565
3593
|
aliases: ["paper-tape"],
|
|
3566
|
-
handler:
|
|
3594
|
+
handler: Mt
|
|
3567
3595
|
},
|
|
3568
3596
|
{
|
|
3569
3597
|
semanticName: "Odd",
|
|
@@ -3571,7 +3599,7 @@ var Jt = [
|
|
|
3571
3599
|
shortName: "odd",
|
|
3572
3600
|
description: "Odd shape",
|
|
3573
3601
|
internalAliases: ["rect_left_inv_arrow"],
|
|
3574
|
-
handler:
|
|
3602
|
+
handler: it
|
|
3575
3603
|
},
|
|
3576
3604
|
{
|
|
3577
3605
|
semanticName: "Lined Document",
|
|
@@ -3579,60 +3607,60 @@ var Jt = [
|
|
|
3579
3607
|
shortName: "lin-doc",
|
|
3580
3608
|
description: "Lined document",
|
|
3581
3609
|
aliases: ["lined-document"],
|
|
3582
|
-
handler:
|
|
3610
|
+
handler: Qe
|
|
3583
3611
|
}
|
|
3584
|
-
],
|
|
3612
|
+
], Xt = (/* @__PURE__ */ t(() => {
|
|
3585
3613
|
let e = [...Object.entries({
|
|
3586
|
-
state:
|
|
3614
|
+
state: dt,
|
|
3587
3615
|
choice: le,
|
|
3588
|
-
note:
|
|
3589
|
-
rectWithTitle:
|
|
3590
|
-
labelRect:
|
|
3591
|
-
iconSquare:
|
|
3592
|
-
iconCircle:
|
|
3593
|
-
icon:
|
|
3594
|
-
iconRounded:
|
|
3595
|
-
imageSquare:
|
|
3616
|
+
note: tt,
|
|
3617
|
+
rectWithTitle: at,
|
|
3618
|
+
labelRect: He,
|
|
3619
|
+
iconSquare: ze,
|
|
3620
|
+
iconCircle: Le,
|
|
3621
|
+
icon: Ie,
|
|
3622
|
+
iconRounded: Re,
|
|
3623
|
+
imageSquare: Be,
|
|
3596
3624
|
anchor: G,
|
|
3597
|
-
kanbanItem:
|
|
3598
|
-
mindmapCircle:
|
|
3599
|
-
defaultMindmapNode:
|
|
3600
|
-
classBox:
|
|
3601
|
-
erBox:
|
|
3602
|
-
requirementBox:
|
|
3603
|
-
}), ...
|
|
3625
|
+
kanbanItem: Wt,
|
|
3626
|
+
mindmapCircle: Jt,
|
|
3627
|
+
defaultMindmapNode: qt,
|
|
3628
|
+
classBox: Vt,
|
|
3629
|
+
erBox: It,
|
|
3630
|
+
requirementBox: Ht
|
|
3631
|
+
}), ...Yt.flatMap((e) => [
|
|
3604
3632
|
e.shortName,
|
|
3605
3633
|
..."aliases" in e ? e.aliases : [],
|
|
3606
3634
|
..."internalAliases" in e ? e.internalAliases : []
|
|
3607
3635
|
].map((t) => [t, e.handler]))];
|
|
3608
3636
|
return Object.fromEntries(e);
|
|
3609
3637
|
}, "generateShapeMap"))();
|
|
3610
|
-
function
|
|
3611
|
-
return e in
|
|
3638
|
+
function Zt(e) {
|
|
3639
|
+
return e in Xt;
|
|
3612
3640
|
}
|
|
3613
|
-
|
|
3614
|
-
var
|
|
3615
|
-
async function
|
|
3641
|
+
t(Zt, "isValidShape");
|
|
3642
|
+
var Qt = /* @__PURE__ */ new Map();
|
|
3643
|
+
async function $t(e, t, n) {
|
|
3616
3644
|
let r, i;
|
|
3617
3645
|
t.shape === "rect" && (t.rx && t.ry ? t.shape = "roundedRect" : t.shape = "squareRect");
|
|
3618
|
-
let a = t.shape ?
|
|
3646
|
+
let a = t.shape ? Xt[t.shape] : void 0;
|
|
3619
3647
|
if (!a) throw Error(`No such shape: ${t.shape}. Please check your syntax.`);
|
|
3620
3648
|
if (t.link) {
|
|
3621
3649
|
let o;
|
|
3622
3650
|
n.config.securityLevel === "sandbox" ? o = "_top" : t.linkTarget && (o = t.linkTarget || "_blank"), r = e.insert("svg:a").attr("xlink:href", t.link).attr("target", o ?? null), i = await a(r, t, n);
|
|
3623
3651
|
} else i = await a(e, t, n), r = i;
|
|
3624
|
-
return r.attr("data-look",
|
|
3625
|
-
}
|
|
3626
|
-
|
|
3627
|
-
var
|
|
3628
|
-
|
|
3629
|
-
}, "setNodeElem"),
|
|
3630
|
-
|
|
3631
|
-
}, "clear"),
|
|
3632
|
-
let
|
|
3633
|
-
|
|
3634
|
-
let
|
|
3635
|
-
return
|
|
3652
|
+
return r.attr("data-look", p(t.look)), t.tooltip && i.attr("title", t.tooltip), Qt.set(t.id, r), t.haveCallback && r.attr("class", r.attr("class") + " clickable"), r;
|
|
3653
|
+
}
|
|
3654
|
+
t($t, "insertNode");
|
|
3655
|
+
var en = /* @__PURE__ */ t((e, t) => {
|
|
3656
|
+
Qt.set(t.id, e);
|
|
3657
|
+
}, "setNodeElem"), tn = /* @__PURE__ */ t(() => {
|
|
3658
|
+
Qt.clear();
|
|
3659
|
+
}, "clear"), nn = /* @__PURE__ */ t((t) => {
|
|
3660
|
+
let n = Qt.get(t.id);
|
|
3661
|
+
e.trace("Transforming node", t.diff, t, "translate(" + (t.x - t.width / 2 - 5) + ", " + t.width / 2 + ")");
|
|
3662
|
+
let r = t.diff || 0;
|
|
3663
|
+
return t.clusterNode ? n.attr("transform", "translate(" + (t.x + r - t.width / 2) + ", " + (t.y - t.height / 2 - 8) + ")") : n.attr("transform", "translate(" + t.x + ", " + t.y + ")"), r;
|
|
3636
3664
|
}, "positionNode");
|
|
3637
3665
|
//#endregion
|
|
3638
|
-
export {
|
|
3666
|
+
export { $t as a, nn as c, ee as i, en as l, tn as n, Zt as o, M as r, C as s, te as t, T as u };
|