@sme.up/ketchup2 2.7.0 → 2.8.1
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/abnfDiagram-VCTEODGH-DwAVRNNu.js +89 -0
- package/dist/{arc-CVbkjF8U.js → arc-DXfwi1YX.js} +8 -6
- package/dist/architecture-7GRP2DOG-BsytjMto.js +3 -0
- package/dist/{architectureDiagram-3BPJPVTR-B6VZAtZU.js → architectureDiagram-5GKGNRK7-N1aPr2hw.js} +636 -540
- package/dist/assets/svg/functions.svg +1 -0
- package/dist/basic-components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/basic-components/button-list/button-list-types.d.ts +2 -1
- 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-types.d.ts +5 -0
- package/dist/basic-components/cell/cell-types.d.ts.map +1 -1
- package/dist/basic-components/cell/cell.d.ts.map +1 -1
- package/dist/basic-components/checkbox/checkbox-types.d.ts +5 -0
- package/dist/basic-components/checkbox/checkbox-types.d.ts.map +1 -1
- package/dist/basic-components/chips/chips-types.d.ts +15 -1
- package/dist/basic-components/chips/chips-types.d.ts.map +1 -1
- package/dist/basic-components/chips/chips.d.ts.map +1 -1
- package/dist/basic-components/chips-input/chips-input-types.d.ts +5 -0
- package/dist/basic-components/chips-input/chips-input-types.d.ts.map +1 -1
- package/dist/basic-components/chips-input/chips-input.d.ts.map +1 -1
- package/dist/basic-components/file-upload/file-upload-hook.d.ts.map +1 -1
- package/dist/basic-components/list/list.d.ts.map +1 -1
- package/dist/basic-components/multiple-autocomplete/multiple-autocomplete-types.d.ts +5 -0
- package/dist/basic-components/multiple-autocomplete/multiple-autocomplete-types.d.ts.map +1 -1
- package/dist/basic-components/multiple-autocomplete/multiple-autocomplete.d.ts.map +1 -1
- package/dist/basic-components/multiple-select/multiple-select-types.d.ts +5 -0
- package/dist/basic-components/multiple-select/multiple-select-types.d.ts.map +1 -1
- package/dist/basic-components/multiple-select/multiple-select.d.ts.map +1 -1
- package/dist/basic-components/select/select.d.ts.map +1 -1
- package/dist/blockDiagram-I7D4REHJ-Cu18ws5-.js +1922 -0
- package/dist/{c4Diagram-AAUBKEIU-CdT8VCbo.js → c4Diagram-7LVT6UL2-B-uBy_NE.js} +899 -850
- package/dist/{channel-C-LAmObA.js → channel-CuEby436.js} +1 -1
- package/dist/chunk-2E4U76K2-ComA5SPA.js +348 -0
- package/dist/{chunk-QZHKN3VN-lYfzaOt9.js → chunk-2Q5K7J3B-kzxEEeTu.js} +2 -2
- package/dist/{chunk-3OPIFGDE-Bs2mXISw.js → chunk-4HAMMTFA-CZgIgrp_.js} +1667 -1145
- package/dist/{chunk-FMBD7UC4-BURT0llY.js → chunk-5VM5RSS4-Cr17nBXp.js} +2 -2
- package/dist/{chunk-5ZQYHXKU-B_nOC8-n.js → chunk-75Z2AOVW-Drsj7a97.js} +106 -136
- package/dist/chunk-CLGD4ZFX-CLGio9rD.js +14 -0
- package/dist/{chunk-CSCIHK7Q-BEk3YcEH.js → chunk-DU6HZSFF-waeanndy.js} +1005 -768
- package/dist/{chunk-ND2GUHAM-Ca12h-m9.js → chunk-F27PBJKO-jIrOJO87.js} +18 -17
- package/dist/{chunk-NNHCCRGN-BB1q5NkR.js → chunk-FOHPRMQF-LRqOLsSw.js} +5518 -4708
- package/dist/{chunk-O5CBEL6O-DbWeP4Au.js → chunk-GMAD6QVW-D80II4AD.js} +486 -520
- package/dist/chunk-GVQU2GXP-DP3t_9Rl.js +37 -0
- package/dist/{chunk-AQP2D5EJ-vJ_pitKp.js → chunk-IMKFNOWR-8ItzAAcf.js} +336 -318
- package/dist/{chunk-4BX2VUAB-zglw1T4d.js → chunk-JWPE2WC7-Ccb0QaC8.js} +2 -2
- package/dist/chunk-L3NEJ4N5-qPot4t6M.js +245 -0
- package/dist/chunk-LNGE3PJU-CtYcu9x8.js +1521 -0
- package/dist/{chunk-KSCS5N6A-BemQomLE.js → chunk-OSK3NFVY-CQhPF3Mc.js} +310 -198
- package/dist/chunk-P2QGCYS3-BUeNZ170.js +67 -0
- package/dist/chunk-POPQ4Y6H-CU9oz17Z.js +26 -0
- package/dist/chunk-PWAF6VOD-D37VoZ8H.js +275 -0
- package/dist/{flowDiagram-I6XJVG4X-DnsxKD0w.js → chunk-SHT3W25Y-Cri27Jke.js} +581 -543
- package/dist/chunk-SVP7TREG-CyJlOPau.js +490 -0
- package/dist/{chunk-727SXJPM-CDeV7mmg.js → chunk-TICWLB2K-Cw2iT_VD.js} +191 -185
- package/dist/{chunk-LZXEDZCA-J9irjuVP.js → chunk-TLUHSLCS-BdsLNXjt.js} +35 -25
- package/dist/chunk-XXDRQBXY-C1ZEFXGu.js +9 -0
- package/dist/chunk-Y2CYZVJY-i11wjrBe.js +12 -0
- package/dist/classDiagram-ZZMXUADV-L32jCfMj.js +30 -0
- package/dist/classDiagram-v2-VYDZK3BY-BsnrDCgX.js +30 -0
- package/dist/components/activity-timeline/activity-timeline-types.d.ts +46 -0
- package/dist/components/activity-timeline/activity-timeline-types.d.ts.map +1 -0
- package/dist/components/activity-timeline/activity-timeline.d.ts +4 -0
- package/dist/components/activity-timeline/activity-timeline.d.ts.map +1 -0
- package/dist/components/app-bar/app-bar.d.ts.map +1 -1
- package/dist/components/breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/dist/components/chat/chat.d.ts.map +1 -1
- package/dist/components/data-table/assets/data-table-row-actions-collapsed.d.ts +12 -0
- package/dist/components/data-table/assets/data-table-row-actions-collapsed.d.ts.map +1 -0
- package/dist/components/data-table/assets/data-table-row-actions.d.ts +11 -0
- package/dist/components/data-table/assets/data-table-row-actions.d.ts.map +1 -0
- package/dist/components/data-table/data-table-types.d.ts +52 -1
- package/dist/components/data-table/data-table-types.d.ts.map +1 -1
- package/dist/components/data-table/data-table.d.ts.map +1 -1
- package/dist/components/data-table/header/Header.d.ts.map +1 -1
- package/dist/components/data-table/header/header-types.d.ts +7 -1
- package/dist/components/data-table/header/header-types.d.ts.map +1 -1
- package/dist/components/echarts/echarts-graph.d.ts.map +1 -1
- package/dist/components/scaffold/context/scaffold-provider.d.ts.map +1 -1
- package/dist/components/tab-bar/tab-bar-assets.d.ts +1 -0
- package/dist/components/tab-bar/tab-bar-assets.d.ts.map +1 -1
- package/dist/components/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/workflow-designer/workflow-designer-metadata-panel.d.ts +14 -0
- package/dist/components/workflow-designer/workflow-designer-metadata-panel.d.ts.map +1 -0
- package/dist/components/workflow-designer/workflow-designer-types.d.ts +40 -7
- package/dist/components/workflow-designer/workflow-designer-types.d.ts.map +1 -1
- package/dist/components/workflow-designer/workflow-designer-utils.d.ts +80 -1
- package/dist/components/workflow-designer/workflow-designer-utils.d.ts.map +1 -1
- package/dist/components/workflow-designer/workflow-designer-utils.test.d.ts +2 -0
- package/dist/components/workflow-designer/workflow-designer-utils.test.d.ts.map +1 -0
- package/dist/components/workflow-designer/workflow-designer.d.ts +4 -3
- package/dist/components/workflow-designer/workflow-designer.d.ts.map +1 -1
- package/dist/{cose-bilkent-S5V4N54A-BhA3VnPW.js → cose-bilkent-JH36ORCC-Qs_Z6zBZ.js} +87 -83
- package/dist/cynefin-OW5HDTMX-BJXlKro0.js +3 -0
- package/dist/cynefinDiagram-5FMLGOSQ-3Ha1hdlV.js +355 -0
- package/dist/{cytoscape.esm-BU21wl3m.js → cytoscape.esm-C5TvPYYm.js} +2749 -2701
- package/dist/{dagre-3-RnF0EK.js → dagre-D5csT9sx.js} +144 -146
- package/dist/dagre-GXQ25YYZ-Bg7xf6xn.js +425 -0
- package/dist/{defaultLocale-DnzPsei5.js → defaultLocale-N-0uLSyg.js} +1 -4
- package/dist/diagram-S7CK7UJ4-BuDHTdHA.js +301 -0
- package/dist/{diagram-2AECGRRQ-23vM90dy.js → diagram-UQ7AKVKN-uvzJGj43.js} +82 -81
- package/dist/{diagram-KO2AKTUF-BEnEQF6b.js → diagram-VSXAHHWV-CrQQCs-B.js} +66 -65
- package/dist/{diagram-OG6HWLK6-Cfbv6mIH.js → diagram-VX7I27RA-BNmG1sig.js} +92 -89
- package/dist/{diagram-LMA3HP47-OWxAHrmz.js → diagram-Z3DM3KII-B6BrLhP0.js} +21 -20
- package/dist/{dist-Btd8EZyy.js → dist-CsrMlyO_.js} +2 -3
- package/dist/ebnfDiagram-PWID7BFC-DMx8xAFO.js +100 -0
- package/dist/erDiagram-RLTQ6QDP-bkJ9nzVK.js +1966 -0
- package/dist/eventmodeling-NTZA5JFV-Cj-VH7yh.js +3 -0
- package/dist/flowDiagram-HODETNUW-BIvD7-ts.js +17 -0
- package/dist/functional-components/multiple-field/multiple-field-types.d.ts +2 -0
- package/dist/functional-components/multiple-field/multiple-field-types.d.ts.map +1 -1
- package/dist/functional-components/multiple-field/multiple-field.d.ts.map +1 -1
- package/dist/functional-components/row/row-types.d.ts +5 -0
- package/dist/functional-components/row/row-types.d.ts.map +1 -1
- package/dist/functional-components/row/row.d.ts.map +1 -1
- package/dist/functional-components/timeline-engine/components/gantt/gantt-assets.d.ts +3 -1
- package/dist/functional-components/timeline-engine/components/gantt/gantt-assets.d.ts.map +1 -1
- package/dist/functional-components/timeline-engine/timeline-engine-utils.d.ts.map +1 -1
- package/dist/functional-components/tree-picker/tree-picker-types.d.ts +42 -0
- package/dist/functional-components/tree-picker/tree-picker-types.d.ts.map +1 -0
- package/dist/functional-components/tree-picker/tree-picker.d.ts +3 -0
- package/dist/functional-components/tree-picker/tree-picker.d.ts.map +1 -0
- package/dist/{ganttDiagram-6RSMTGT7-CwbJqdwB.js → ganttDiagram-EL5Y4UJY-CL-ywzz_.js} +703 -710
- package/dist/gitGraph-4MIJSDKK-C9JGDovl.js +3 -0
- package/dist/{gitGraphDiagram-PVQCEYII-mL2WiT98.js → gitGraphDiagram-WWUBYQGX-aXhNDG6P.js} +156 -151
- package/dist/{graphlib-VMWSbyYi.js → graphlib-XW-Jr8pF.js} +5 -5
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/info-A6RAGUB7-CmZJKEaW.js +3 -0
- package/dist/infoDiagram-27XIBGKW-Je4heBlk.js +20 -0
- package/dist/{init-MwSGRDIl.js → init-CsQUQz36.js} +1 -3
- package/dist/{ishikawaDiagram-YF4QCWOH-DGOgWzve.js → ishikawaDiagram-5VMMS53U-DK7HlH95.js} +142 -141
- package/dist/{journeyDiagram-JHISSGLW-CHVTMdrq.js → journeyDiagram-3NMN7TZE-CpuYEKcB.js} +192 -191
- package/dist/{kanban-definition-UN3LZRKU-upKA3b5x.js → kanban-definition-UXKFOSKX-aK8uKmyY.js} +149 -146
- package/dist/{katex-D-2KeLwt.js → katex-CT2p8LXT.js} +1627 -1650
- package/dist/ketchup2.css +1 -1
- package/dist/ketchup2.es.js +34744 -32755
- package/dist/{line-DIhSUgmA.js → line-DTqYMLoX.js} +2 -2
- package/dist/{linear-DUAteVwl.js → linear-CXc5xaa6.js} +8 -9
- package/dist/locale/en/translation.json.d.ts +16 -0
- package/dist/locale/it/translation.json.d.ts +16 -0
- package/dist/mermaid-parser.core-BwVmI_Rq.js +638 -0
- package/dist/{mindmap-definition-RKZ34NQL-C3YkCJDi.js → mindmap-definition-YA3MSWOX-ZMYcmi9J.js} +170 -170
- package/dist/{ordinal-D_ZgubzR.js → ordinal-BubEveRk.js} +1 -1
- package/dist/packet-AYTQ26CC-B3tgRshR.js +3 -0
- package/dist/{path-DGNPZRdx.js → path-CnWkkRiY.js} +10 -11
- package/dist/pegDiagram-XKGWAZYB-DsfILwZN.js +94 -0
- package/dist/pie-WAS4IAKB-BRiI8kbI.js +3 -0
- package/dist/pieDiagram-E7YTZNPT-DcSLcLdd.js +203 -0
- package/dist/{quadrantDiagram-W4KKPZXB-C2oA-eGZ.js → quadrantDiagram-AXDQQJYC-DSx3teop.js} +300 -300
- package/dist/radar-RG4KPBEZ-ASOMQXFw.js +3 -0
- package/dist/railroad-74A4TZTK-oS840SLr.js +3 -0
- package/dist/railroad-abnf-HS5TGJTU-nnQAkZY2.js +3 -0
- package/dist/railroad-ebnf-LZEXJU2U-DBQIOba3.js +3 -0
- package/dist/railroad-peg-WCYAUIDC-fBPN2TVb.js +3 -0
- package/dist/railroadDiagram-O6MQD6OU-jOZRtNDi.js +76 -0
- package/dist/{requirementDiagram-4Y6WPE33-BEGryahw.js → requirementDiagram-BXWQKSXE-D14hkkez.js} +176 -173
- package/dist/{rough.esm-rcMoXTJj.js → rough.esm-DXYGHN3m.js} +60 -51
- package/dist/{sankeyDiagram-5OEKKPKP-VPzKV4zM.js → sankeyDiagram-P5KCCOFB-C0jmknYo.js} +123 -120
- package/dist/{sequenceDiagram-3UESZ5HK-Bc30_Cm2.js → sequenceDiagram-WJ2MYXX4-C00egnMz.js} +714 -722
- package/dist/sizeCapture-INFHLROL-CHXIsPO_.js +46 -0
- package/dist/{src-DjDATEq3.js → src-DQoflmwT.js} +499 -509
- package/dist/stateDiagram-D77RDMKH-YfzmviNY.js +220 -0
- package/dist/stateDiagram-v2-MP3YSRHH-B6Hzx8T0.js +30 -0
- package/dist/swimlanes-42K2YHIH-CJcMmxXf.js +4979 -0
- package/dist/swimlanesDiagram-VR7AAH4N-DirvhGBA.js +31 -0
- package/dist/{timeline-definition-PNZ67QCA-1z911Ume.js → timeline-definition-24CTP7MA-D2xfYuSV.js} +220 -219
- package/dist/treeView-Q6P3EWNA-BmvB2b-_.js +3 -0
- package/dist/treemap-WGGIJYW6-Cjjk75wA.js +3 -0
- package/dist/types/translation.d.ts +17 -1
- package/dist/types/translation.d.ts.map +1 -1
- package/dist/utils/data-structures.d.ts +2 -1
- package/dist/utils/data-structures.d.ts.map +1 -1
- package/dist/{v4-BK7K-jy_.js → v4-DIjJgmR0.js} +1 -1
- package/dist/{vennDiagram-CIIHVFJN-BiLcQ0SR.js → vennDiagram-4TSXK5OY-C4XLgus_.js} +332 -310
- package/dist/wardley-WFR3VGLG-BamDiE0x.js +3 -0
- package/dist/{wardleyDiagram-YWT4CUSO-Bq-BejOl.js → wardleyDiagram-VM6X3IG4-DFoKuS9s.js} +156 -155
- package/dist/{xychartDiagram-2RQKCTM6-B13zquXC.js → xychartDiagram-S5SC5T6Z-BzKKgVBe.js} +740 -574
- package/package.json +41 -38
- package/dist/arc-w3BipdfE.cjs +0 -1
- package/dist/architecture-7EHR7CIX-Bzeobe9Y.cjs +0 -1
- package/dist/architecture-7EHR7CIX-C8NPmR2w.js +0 -3
- package/dist/architectureDiagram-3BPJPVTR-DlnXl9d5.cjs +0 -36
- package/dist/array-DZSRzHA_.cjs +0 -1
- package/dist/blockDiagram-GPEHLZMM-BohmRoCC.js +0 -3157
- package/dist/blockDiagram-GPEHLZMM-rfyR2Ffl.cjs +0 -132
- package/dist/c4Diagram-AAUBKEIU-Du1vqJYZ.cjs +0 -10
- package/dist/channel-DJpMBAs-.cjs +0 -1
- package/dist/chunk-2J33WTMH-BMqA-riF.js +0 -25
- package/dist/chunk-2J33WTMH-BQs9SXq8.cjs +0 -1
- package/dist/chunk-3OPIFGDE-Bk_ByTBh.cjs +0 -62
- package/dist/chunk-4BX2VUAB-C8VW0QW0.cjs +0 -1
- package/dist/chunk-55IACEB6-CNxnI3nm.cjs +0 -1
- package/dist/chunk-55IACEB6-CmKDx-YO.js +0 -8
- package/dist/chunk-5ZQYHXKU-DMrStm4M.cjs +0 -2
- package/dist/chunk-727SXJPM-Dj8nsm0O.cjs +0 -206
- package/dist/chunk-AQP2D5EJ-CYuEYK6i.cjs +0 -231
- package/dist/chunk-BSJP7CBP-CSCICPww.cjs +0 -1
- package/dist/chunk-BSJP7CBP-YsQACkyC.js +0 -82
- package/dist/chunk-CSCIHK7Q-BAdl6GW-.cjs +0 -124
- package/dist/chunk-FMBD7UC4-BIKI8zae.cjs +0 -15
- package/dist/chunk-KSCS5N6A-DsN7gJEf.cjs +0 -10
- package/dist/chunk-L5ZTLDWV-BQCNoMVG.js +0 -32
- package/dist/chunk-L5ZTLDWV-BbLRyKcx.cjs +0 -1
- package/dist/chunk-LZXEDZCA-rjLYyX5U.cjs +0 -1
- package/dist/chunk-ND2GUHAM-1o9Sjy2_.cjs +0 -1
- package/dist/chunk-NNHCCRGN-qV8bfiMQ.cjs +0 -159
- package/dist/chunk-NZK2D7GU-CPxdSJTy.js +0 -67
- package/dist/chunk-NZK2D7GU-CRneGIrP.cjs +0 -1
- package/dist/chunk-O5CBEL6O-Cd4Z5Dy9.cjs +0 -70
- package/dist/chunk-QZHKN3VN-ZJ4hLUIw.cjs +0 -1
- package/dist/chunk-WU5MYG2G-DuCEb9G-.js +0 -9
- package/dist/chunk-WU5MYG2G-ExiaHFbF.cjs +0 -1
- package/dist/chunk-XPW4576I-BybfDrup.cjs +0 -32
- package/dist/chunk-XPW4576I-D3DQ47oC.js +0 -1146
- package/dist/classDiagram-4FO5ZUOK-CRX1QumH.js +0 -29
- package/dist/classDiagram-4FO5ZUOK-yTAlLFG2.cjs +0 -1
- package/dist/classDiagram-v2-Q7XG4LA2-oM01mYfB.js +0 -29
- package/dist/classDiagram-v2-Q7XG4LA2-yTAlLFG2.cjs +0 -1
- package/dist/cose-bilkent-S5V4N54A-D7fhWOP4.cjs +0 -1
- package/dist/cytoscape.esm-CElDUMAx.cjs +0 -321
- package/dist/dagre-B2BBwKNb.cjs +0 -1
- package/dist/dagre-BM42HDAG-DfpR5Mml.js +0 -297
- package/dist/dagre-BM42HDAG-kORxgFz_.cjs +0 -4
- package/dist/defaultLocale-u9yUoUmE.cjs +0 -1
- package/dist/diagram-2AECGRRQ-B0IEGKjr.cjs +0 -43
- package/dist/diagram-5GNKFQAL-BEY9x4us.js +0 -101
- package/dist/diagram-5GNKFQAL-vb6e35PR.cjs +0 -10
- package/dist/diagram-KO2AKTUF-9V_zu-2x.cjs +0 -3
- package/dist/diagram-LMA3HP47-BN_geiB9.cjs +0 -24
- package/dist/diagram-OG6HWLK6-6OnEK9-6.cjs +0 -24
- package/dist/dist-D8RD2QWc.cjs +0 -1
- package/dist/erDiagram-TEJ5UH35-6OEXIM6m.js +0 -1700
- package/dist/erDiagram-TEJ5UH35-CzsOt0l4.cjs +0 -85
- package/dist/eventmodeling-FCH6USID-Cued7Lz2.cjs +0 -1
- package/dist/eventmodeling-FCH6USID-mCB8hc7X.js +0 -3
- package/dist/flowDiagram-I6XJVG4X-DR1CMtZZ.cjs +0 -162
- package/dist/ganttDiagram-6RSMTGT7-C5t5_mjf.cjs +0 -292
- package/dist/gitGraph-WXDBUCRP-B23gOjfP.js +0 -3
- package/dist/gitGraph-WXDBUCRP-Bi-Y5dA7.cjs +0 -1
- package/dist/gitGraphDiagram-PVQCEYII-CLdgm7yJ.cjs +0 -106
- package/dist/graphlib-CkkG5MuS.cjs +0 -1
- package/dist/info-J43DQDTF-DC3N8SoX.js +0 -3
- package/dist/info-J43DQDTF-jRjlWVKj.cjs +0 -1
- package/dist/infoDiagram-5YYISTIA-BIM8xaiE.js +0 -19
- package/dist/infoDiagram-5YYISTIA-CbnHgs-I.cjs +0 -2
- package/dist/init-07zIhv_j.cjs +0 -1
- package/dist/ishikawaDiagram-YF4QCWOH-DAWMXD1l.cjs +0 -70
- package/dist/journeyDiagram-JHISSGLW-DfnmJPLn.cjs +0 -139
- package/dist/kanban-definition-UN3LZRKU-CbeoJJE7.cjs +0 -89
- package/dist/katex-CkiTumqg.cjs +0 -257
- package/dist/ketchup2.cjs.js +0 -485
- package/dist/line-CzwncDY3.cjs +0 -1
- package/dist/linear-1lpO_WlJ.cjs +0 -1
- package/dist/mermaid-parser.core-ADyJ_PY4.cjs +0 -3
- package/dist/mermaid-parser.core-D6xVjl2t.js +0 -373
- package/dist/mindmap-definition-RKZ34NQL-C8cZ7xN-.cjs +0 -96
- package/dist/ordinal-CUPR-p0T.cjs +0 -1
- package/dist/packet-YPE3B663-CGZxZ1Z0.cjs +0 -1
- package/dist/packet-YPE3B663-D2JW2EUF.js +0 -3
- package/dist/path-Kklx0M1v.cjs +0 -1
- package/dist/pie-LRSECV5Y-BHyd33ZA.js +0 -3
- package/dist/pie-LRSECV5Y-Ca_qbHEv.cjs +0 -1
- package/dist/pieDiagram-4H26LBE5-BvhguaHn.js +0 -165
- package/dist/pieDiagram-4H26LBE5-DpDrJBQK.cjs +0 -30
- package/dist/quadrantDiagram-W4KKPZXB-hWSN7YfD.cjs +0 -7
- package/dist/radar-GUYGQ44K-BpJWFTCm.js +0 -3
- package/dist/radar-GUYGQ44K-CYqWSxO_.cjs +0 -1
- package/dist/requirementDiagram-4Y6WPE33-GmjmsbiY.cjs +0 -84
- package/dist/rough.esm-r0QOSzHM.cjs +0 -1
- package/dist/sankeyDiagram-5OEKKPKP-DbGAx-Bm.cjs +0 -40
- package/dist/sequenceDiagram-3UESZ5HK-D85rpewi.cjs +0 -162
- package/dist/src-DEmZ9bFr.cjs +0 -1
- package/dist/stateDiagram-AJRCARHV-Bg4Y3HPa.cjs +0 -1
- package/dist/stateDiagram-AJRCARHV-wqjltbKb.js +0 -217
- package/dist/stateDiagram-v2-BHNVJYJU-Cgrf5tQC.js +0 -27
- package/dist/stateDiagram-v2-BHNVJYJU-D_Tzn4WM.cjs +0 -1
- package/dist/timeline-definition-PNZ67QCA-Dpu3hfhP.cjs +0 -120
- package/dist/treeView-BLDUP644-C9tQMbiq.js +0 -3
- package/dist/treeView-BLDUP644-DKh9BcaT.cjs +0 -1
- package/dist/treemap-LRROVOQU-2aferAph.cjs +0 -1
- package/dist/treemap-LRROVOQU-CBv3oGC3.js +0 -3
- package/dist/v4-Dyp-SQ1c.cjs +0 -1
- package/dist/vennDiagram-CIIHVFJN-BLBDqWTG.cjs +0 -34
- package/dist/wardley-L42UT6IY-CIM0_V5T.js +0 -3
- package/dist/wardley-L42UT6IY-DjjjOB8T.cjs +0 -1
- package/dist/wardleyDiagram-YWT4CUSO-dzyAWKiV.cjs +0 -78
- package/dist/xychartDiagram-2RQKCTM6-DA3O42Dk.cjs +0 -7
package/dist/{architectureDiagram-3BPJPVTR-B6VZAtZU.js → architectureDiagram-5GKGNRK7-N1aPr2hw.js}
RENAMED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { H as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { _ as e, m as t, p as n, y as r } from "./src-DQoflmwT.js";
|
|
2
|
+
import { H as i, J as a, K as o, U as s, a as c, b as l, f as u, v as d, w as f, x as p, y as m, z as h } from "./chunk-DU6HZSFF-waeanndy.js";
|
|
3
|
+
import { n as g } from "./chunk-Y2CYZVJY-i11wjrBe.js";
|
|
4
|
+
import { c as _, i as v } from "./chunk-75Z2AOVW-Drsj7a97.js";
|
|
5
|
+
import { t as y } from "./chunk-CLGD4ZFX-CLGio9rD.js";
|
|
6
|
+
import { i as b, r as x, t as S } from "./chunk-PWAF6VOD-D37VoZ8H.js";
|
|
7
|
+
import { n as C } from "./chunk-GMAD6QVW-D80II4AD.js";
|
|
8
|
+
import { n as w } from "./mermaid-parser.core-BwVmI_Rq.js";
|
|
9
|
+
import { t as T } from "./chunk-JWPE2WC7-Ccb0QaC8.js";
|
|
10
|
+
import { t as E } from "./cytoscape.esm-C5TvPYYm.js";
|
|
9
11
|
//#region node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.js
|
|
10
|
-
var D = /* @__PURE__ */
|
|
12
|
+
var D = /* @__PURE__ */ e(((e, t) => {
|
|
11
13
|
(function(n, r) {
|
|
12
14
|
typeof e == "object" && typeof t == "object" ? t.exports = r() : typeof define == "function" && define.amd ? define([], r) : typeof e == "object" ? e.layoutBase = r() : n.layoutBase = r();
|
|
13
15
|
})(e, function() {
|
|
@@ -101,7 +103,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
101
103
|
(function(e, t, n) {
|
|
102
104
|
var r = n(2), i = n(10), a = n(13), o = n(0), s = n(16), c = n(5);
|
|
103
105
|
function l(e, t, n, o) {
|
|
104
|
-
n == null && o == null && (o = t), r.call(this, o), e.graphManager != null && (e = e.graphManager), this.estimatedSize = i.MIN_VALUE, this.inclusionTreeDepth = i.MAX_VALUE, this.vGraphObject = o, this.edges = [], this.graphManager = e, n != null && t != null ?
|
|
106
|
+
n == null && o == null && (o = t), r.call(this, o), e.graphManager != null && (e = e.graphManager), this.estimatedSize = i.MIN_VALUE, this.inclusionTreeDepth = i.MAX_VALUE, this.vGraphObject = o, this.edges = [], this.graphManager = e, this.rect = n != null && t != null ? new a(t.x, t.y, n.width, n.height) : new a();
|
|
105
107
|
}
|
|
106
108
|
for (var u in l.prototype = Object.create(r.prototype), r) l[u] = r[u];
|
|
107
109
|
l.prototype.getEdges = function() {
|
|
@@ -151,7 +153,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
151
153
|
}, l.prototype.getEdgesBetween = function(e) {
|
|
152
154
|
var t = [], n = this;
|
|
153
155
|
return n.edges.forEach(function(r) {
|
|
154
|
-
if (
|
|
156
|
+
if (r.source != n && r.target != n) throw "Incorrect edge source and/or target";
|
|
155
157
|
(r.target == e || r.source == e) && t.push(r);
|
|
156
158
|
}), t;
|
|
157
159
|
}, l.prototype.getNeighborsList = function() {
|
|
@@ -271,17 +273,16 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
271
273
|
if (this.graphManager == null) throw "Graph has no graph mgr!";
|
|
272
274
|
if (this.getNodes().indexOf(r) > -1) throw "Node already in graph!";
|
|
273
275
|
return r.owner = this, this.getNodes().push(r), r;
|
|
274
|
-
} else {
|
|
275
|
-
var i = e;
|
|
276
|
-
if (!(this.getNodes().indexOf(t) > -1 && this.getNodes().indexOf(n) > -1)) throw "Source or target not in graph!";
|
|
277
|
-
if (!(t.owner == n.owner && t.owner == this)) throw "Both owners must be this graph!";
|
|
278
|
-
return t.owner == n.owner ? (i.source = t, i.target = n, i.isInterGraph = !1, this.getEdges().push(i), t.edges.push(i), n != t && n.edges.push(i), i) : null;
|
|
279
276
|
}
|
|
277
|
+
var i = e;
|
|
278
|
+
if (!(this.getNodes().indexOf(t) > -1 && this.getNodes().indexOf(n) > -1)) throw "Source or target not in graph!";
|
|
279
|
+
if (t.owner != n.owner || t.owner != this) throw "Both owners must be this graph!";
|
|
280
|
+
return t.owner == n.owner ? (i.source = t, i.target = n, i.isInterGraph = !1, this.getEdges().push(i), t.edges.push(i), n != t && n.edges.push(i), i) : null;
|
|
280
281
|
}, f.prototype.remove = function(e) {
|
|
281
282
|
var t = e;
|
|
282
283
|
if (e instanceof s) {
|
|
283
284
|
if (t == null) throw "Node is null!";
|
|
284
|
-
if (
|
|
285
|
+
if (t.owner == null || t.owner != this) throw "Owner graph is invalid!";
|
|
285
286
|
if (this.graphManager == null) throw "Owner graph manager is invalid!";
|
|
286
287
|
for (var n = t.edges.slice(), r, i = n.length, a = 0; a < i; a++) r = n[a], r.isInterGraph ? this.graphManager.remove(r) : r.source.owner.remove(r);
|
|
287
288
|
var o = this.nodes.indexOf(t);
|
|
@@ -290,8 +291,8 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
290
291
|
} else if (e instanceof c) {
|
|
291
292
|
var r = e;
|
|
292
293
|
if (r == null) throw "Edge is null!";
|
|
293
|
-
if (
|
|
294
|
-
if (
|
|
294
|
+
if (r.source == null || r.target == null) throw "Source and/or target is null!";
|
|
295
|
+
if (r.source.owner == null || r.target.owner == null || r.source.owner != this || r.target.owner != this) throw "Source and/or target owner is invalid!";
|
|
295
296
|
var l = r.source.edges.indexOf(r), u = r.target.edges.indexOf(r);
|
|
296
297
|
if (!(l > -1 && u > -1)) throw "Source and/or target doesn't know this edge!";
|
|
297
298
|
r.source.edges.splice(l, 1), r.target != r.source && r.target.edges.splice(u, 1);
|
|
@@ -328,7 +329,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
328
329
|
var i = t[r];
|
|
329
330
|
e += i.calcEstimatedSize();
|
|
330
331
|
}
|
|
331
|
-
return e == 0 ?
|
|
332
|
+
return this.estimatedSize = e == 0 ? a.EMPTY_COMPOUND_NODE_SIZE : e / Math.sqrt(this.nodes.length), this.estimatedSize;
|
|
332
333
|
}, f.prototype.updateConnected = function() {
|
|
333
334
|
var e = this;
|
|
334
335
|
if (this.nodes.length == 0) {
|
|
@@ -368,17 +369,16 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
368
369
|
if (this.graphs.push(e), e.parent != null) throw "Already has a parent!";
|
|
369
370
|
if (t.child != null) throw "Already has a child!";
|
|
370
371
|
return e.parent = t, t.child = e, e;
|
|
371
|
-
} else {
|
|
372
|
-
i = n, r = t, n = e;
|
|
373
|
-
var a = r.getOwner(), o = i.getOwner();
|
|
374
|
-
if (!(a != null && a.getGraphManager() == this)) throw "Source not in this graph mgr!";
|
|
375
|
-
if (!(o != null && o.getGraphManager() == this)) throw "Target not in this graph mgr!";
|
|
376
|
-
if (a == o) return n.isInterGraph = !1, a.add(n, r, i);
|
|
377
|
-
if (n.isInterGraph = !0, n.source = r, n.target = i, this.edges.indexOf(n) > -1) throw "Edge already in inter-graph edge list!";
|
|
378
|
-
if (this.edges.push(n), !(n.source != null && n.target != null)) throw "Edge source and/or target is null!";
|
|
379
|
-
if (!(n.source.edges.indexOf(n) == -1 && n.target.edges.indexOf(n) == -1)) throw "Edge already in source and/or target incidency list!";
|
|
380
|
-
return n.source.edges.push(n), n.target.edges.push(n), n;
|
|
381
372
|
}
|
|
373
|
+
i = n, r = t, n = e;
|
|
374
|
+
var a = r.getOwner(), o = i.getOwner();
|
|
375
|
+
if (a == null || a.getGraphManager() != this) throw "Source not in this graph mgr!";
|
|
376
|
+
if (o == null || o.getGraphManager() != this) throw "Target not in this graph mgr!";
|
|
377
|
+
if (a == o) return n.isInterGraph = !1, a.add(n, r, i);
|
|
378
|
+
if (n.isInterGraph = !0, n.source = r, n.target = i, this.edges.indexOf(n) > -1) throw "Edge already in inter-graph edge list!";
|
|
379
|
+
if (this.edges.push(n), n.source == null || n.target == null) throw "Edge source and/or target is null!";
|
|
380
|
+
if (n.source.edges.indexOf(n) != -1 || n.target.edges.indexOf(n) != -1) throw "Edge already in source and/or target incidency list!";
|
|
381
|
+
return n.source.edges.push(n), n.target.edges.push(n), n;
|
|
382
382
|
}, a.prototype.remove = function(e) {
|
|
383
383
|
if (e instanceof r) {
|
|
384
384
|
var t = e;
|
|
@@ -398,10 +398,10 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
398
398
|
} else if (e instanceof i) {
|
|
399
399
|
if (a = e, a == null) throw "Edge is null!";
|
|
400
400
|
if (!a.isInterGraph) throw "Not an inter-graph edge!";
|
|
401
|
-
if (
|
|
402
|
-
if (
|
|
401
|
+
if (a.source == null || a.target == null) throw "Source and/or target is null!";
|
|
402
|
+
if (a.source.edges.indexOf(a) == -1 || a.target.edges.indexOf(a) == -1) throw "Source and/or target doesn't know this edge!";
|
|
403
403
|
var u = a.source.edges.indexOf(a);
|
|
404
|
-
if (a.source.edges.splice(u, 1), u = a.target.edges.indexOf(a), a.target.edges.splice(u, 1),
|
|
404
|
+
if (a.source.edges.splice(u, 1), u = a.target.edges.indexOf(a), a.target.edges.splice(u, 1), a.source.owner == null || a.source.owner.getGraphManager() == null) throw "Edge owner graph or owner graph manager is null!";
|
|
405
405
|
if (a.source.owner.getGraphManager().edges.indexOf(a) == -1) throw "Not in owner graph manager's edge list!";
|
|
406
406
|
var u = a.source.owner.getGraphManager().edges.indexOf(a);
|
|
407
407
|
a.source.owner.getGraphManager().edges.splice(u, 1);
|
|
@@ -443,7 +443,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
443
443
|
}, a.prototype.getLayout = function() {
|
|
444
444
|
return this.layout;
|
|
445
445
|
}, a.prototype.isOneAncestorOfOther = function(e, t) {
|
|
446
|
-
if (
|
|
446
|
+
if (e == null || t == null) throw "assert failed";
|
|
447
447
|
if (e == t) return !0;
|
|
448
448
|
var n = e.getOwner(), r;
|
|
449
449
|
do {
|
|
@@ -514,7 +514,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
514
514
|
var o = a * n[0], s = n[1] / a;
|
|
515
515
|
n[0] < s ? s = n[0] : o = n[1], n[0] = -1 * i[0] * (s / 2 + r), n[1] = -1 * i[1] * (o / 2 + r);
|
|
516
516
|
}, i.decideDirectionsForOverlappingNodes = function(e, t, n) {
|
|
517
|
-
e.getCenterX() < t.getCenterX() ?
|
|
517
|
+
n[0] = e.getCenterX() < t.getCenterX() ? -1 : 1, n[1] = e.getCenterY() < t.getCenterY() ? -1 : 1;
|
|
518
518
|
}, i.getIntersection2 = function(e, t, n) {
|
|
519
519
|
var r = e.getCenterX(), i = e.getCenterY(), a = t.getCenterX(), o = t.getCenterY();
|
|
520
520
|
if (e.intersects(t)) return n[0] = r, n[1] = i, n[2] = a, n[3] = o, !0;
|
|
@@ -538,9 +538,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
538
538
|
case 3:
|
|
539
539
|
j = d, A = r + m / D, n[0] = A, n[1] = j;
|
|
540
540
|
break;
|
|
541
|
-
case 4:
|
|
542
|
-
A = u, j = i + -p * D, n[0] = A, n[1] = j;
|
|
543
|
-
break;
|
|
541
|
+
case 4: A = u, j = i + -p * D, n[0] = A, n[1] = j;
|
|
544
542
|
}
|
|
545
543
|
if (!w) switch (k) {
|
|
546
544
|
case 1:
|
|
@@ -552,9 +550,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
552
550
|
case 3:
|
|
553
551
|
N = y, M = a + S / D, n[2] = M, n[3] = N;
|
|
554
552
|
break;
|
|
555
|
-
case 4:
|
|
556
|
-
M = v, N = o + -x * D, n[2] = M, n[3] = N;
|
|
557
|
-
break;
|
|
553
|
+
case 4: M = v, N = o + -x * D, n[2] = M, n[3] = N;
|
|
558
554
|
}
|
|
559
555
|
}
|
|
560
556
|
return !1;
|
|
@@ -577,7 +573,8 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
577
573
|
if (c * c - 4 * s * l >= 0) {
|
|
578
574
|
var u = (-c + Math.sqrt(c * c - 4 * s * l)) / (2 * s), d = (-c - Math.sqrt(c * c - 4 * s * l)) / (2 * s);
|
|
579
575
|
return u >= 0 && u <= 1 ? [u] : d >= 0 && d <= 1 ? [d] : null;
|
|
580
|
-
}
|
|
576
|
+
}
|
|
577
|
+
return null;
|
|
581
578
|
}, i.HALF_PI = .5 * Math.PI, i.ONE_AND_HALF_PI = 1.5 * Math.PI, i.TWO_PI = 2 * Math.PI, i.THREE_PI = 3 * Math.PI, e.exports = i;
|
|
582
579
|
}),
|
|
583
580
|
(function(e, t, n) {
|
|
@@ -813,7 +810,8 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
813
810
|
if (Array.isArray(e)) {
|
|
814
811
|
for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
|
|
815
812
|
return n;
|
|
816
|
-
}
|
|
813
|
+
}
|
|
814
|
+
return Array.from(e);
|
|
817
815
|
}
|
|
818
816
|
var i = n(0), a = n(7), o = n(3), s = n(1), c = n(6), l = n(5), u = n(17), d = n(29);
|
|
819
817
|
function f(e) {
|
|
@@ -840,8 +838,8 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
840
838
|
return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
|
|
841
839
|
}, f.prototype.runLayout = function() {
|
|
842
840
|
this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
|
|
843
|
-
var e = this.checkLayoutSuccess()
|
|
844
|
-
return i.ANIMATE
|
|
841
|
+
var e = !this.checkLayoutSuccess() && this.layout();
|
|
842
|
+
return i.ANIMATE !== "during" && (e && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, e);
|
|
845
843
|
}, f.prototype.doPostLayout = function() {
|
|
846
844
|
this.incremental || this.transform(), this.update();
|
|
847
845
|
}, f.prototype.update2 = function() {
|
|
@@ -887,10 +885,12 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
887
885
|
s.splice(0, 1), o.add(u);
|
|
888
886
|
for (var d = u.getEdges(), a = 0; a < d.length; a++) {
|
|
889
887
|
var f = d[a].getOtherEnd(u);
|
|
890
|
-
if (c.get(u) != f)
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
888
|
+
if (c.get(u) != f) {
|
|
889
|
+
if (!o.has(f)) s.push(f), c.set(f, u);
|
|
890
|
+
else {
|
|
891
|
+
t = !1;
|
|
892
|
+
break;
|
|
893
|
+
}
|
|
894
894
|
}
|
|
895
895
|
}
|
|
896
896
|
}
|
|
@@ -939,10 +939,9 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
939
939
|
i += (o - t) / 50 * (e - 50);
|
|
940
940
|
}
|
|
941
941
|
return i;
|
|
942
|
-
} else {
|
|
943
|
-
var s, c;
|
|
944
|
-
return e <= 50 ? (s = 9 * t / 500, c = t / 10) : (s = 9 * t / 50, c = -8 * t), s * e + c;
|
|
945
942
|
}
|
|
943
|
+
var s, c;
|
|
944
|
+
return e <= 50 ? (s = 9 * t / 500, c = t / 10) : (s = 9 * t / 50, c = -8 * t), s * e + c;
|
|
946
945
|
}, f.findCenterOfTree = function(e) {
|
|
947
946
|
var t = [];
|
|
948
947
|
t = t.concat(e);
|
|
@@ -1036,7 +1035,8 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
1036
1035
|
if (Array.isArray(e)) {
|
|
1037
1036
|
for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
|
|
1038
1037
|
return n;
|
|
1039
|
-
}
|
|
1038
|
+
}
|
|
1039
|
+
return Array.from(e);
|
|
1040
1040
|
}
|
|
1041
1041
|
var i = n(15), a = n(4), o = n(0), s = n(8), c = n(9);
|
|
1042
1042
|
function l() {
|
|
@@ -1049,11 +1049,11 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
1049
1049
|
for (var e, t, n, r, i, s, c, l = this.getGraphManager().getAllEdges(), u = 0; u < l.length; u++) e = l[u], t = e.idealLength, e.isInterGraph && (r = e.getSource(), i = e.getTarget(), s = e.getSourceInLca().getEstimatedSize(), c = e.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (e.idealLength += s + c - 2 * o.SIMPLE_NODE_SIZE), n = e.getLca().getInclusionTreeDepth(), e.idealLength += t * a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (r.getInclusionTreeDepth() + i.getInclusionTreeDepth() - 2 * n));
|
|
1050
1050
|
}, l.prototype.initSpringEmbedder = function() {
|
|
1051
1051
|
var e = this.getAllNodes().length;
|
|
1052
|
-
this.incremental ? (e > a.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * a.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (e - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - a.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (e > a.ADAPTATION_LOWER_NODE_LIMIT ?
|
|
1052
|
+
this.incremental ? (e > a.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * a.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (e - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - a.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (this.coolingFactor = e > a.ADAPTATION_LOWER_NODE_LIMIT ? Math.max(a.COOLING_ADAPTATION_FACTOR, 1 - (e - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * (1 - a.COOLING_ADAPTATION_FACTOR)) : 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.displacementThresholdPerNode = 3 * a.DEFAULT_EDGE_LENGTH / 100, this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
|
|
1053
1053
|
}, l.prototype.calcSpringForces = function() {
|
|
1054
1054
|
for (var e = this.getAllEdges(), t, n = 0; n < e.length; n++) t = e[n], this.calcSpringForce(t, t.idealLength);
|
|
1055
1055
|
}, l.prototype.calcRepulsionForces = function() {
|
|
1056
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, t = arguments.length > 1 && arguments[1] !== void 0
|
|
1056
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, t = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], n, r, i, o, s = this.getAllNodes(), c;
|
|
1057
1057
|
if (this.useFRGridVariant) for (this.totalIterations % a.GRID_CALCULATION_CHECK_PERIOD == 1 && e && this.updateGrid(), c = /* @__PURE__ */ new Set(), n = 0; n < s.length; n++) i = s[n], this.calculateRepulsionForceOfANode(i, c, e, t), c.add(i);
|
|
1058
1058
|
else for (n = 0; n < s.length; n++) for (i = s[n], r = n + 1; r < s.length; r++) o = s[r], i.getOwner() == o.getOwner() && this.calcRepulsionForce(i, o);
|
|
1059
1059
|
}, l.prototype.calcGravitationalForces = function() {
|
|
@@ -1105,7 +1105,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
1105
1105
|
var o = /* @__PURE__ */ new Set();
|
|
1106
1106
|
e.surrounding = [];
|
|
1107
1107
|
for (var s, c = this.grid, l = e.startX - 1; l < e.finishX + 2; l++) for (var u = e.startY - 1; u < e.finishY + 2; u++) if (!(l < 0 || u < 0 || l >= c.length || u >= c[0].length)) {
|
|
1108
|
-
for (var d = 0; d < c[l][u].length; d++) if (s = c[l][u][d],
|
|
1108
|
+
for (var d = 0; d < c[l][u].length; d++) if (s = c[l][u][d], e.getOwner() == s.getOwner() && e != s && !t.has(s) && !o.has(s)) {
|
|
1109
1109
|
var f = Math.abs(e.getCenterX() - s.getCenterX()) - (e.getWidth() / 2 + s.getWidth() / 2), p = Math.abs(e.getCenterY() - s.getCenterY()) - (e.getHeight() / 2 + s.getHeight() / 2);
|
|
1110
1110
|
f <= this.repulsionRange && p <= this.repulsionRange && o.add(s);
|
|
1111
1111
|
}
|
|
@@ -1441,8 +1441,8 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
1441
1441
|
var K = n[E - 2];
|
|
1442
1442
|
n[E - 2] = 0;
|
|
1443
1443
|
for (var q = E - 2; q >= U; q--) {
|
|
1444
|
-
var
|
|
1445
|
-
if (this.s[q] =
|
|
1444
|
+
var ae = r.hypot(this.s[q], K), J = this.s[q] / ae, Y = K / ae;
|
|
1445
|
+
if (this.s[q] = ae, q !== U && (K = -Y * n[q - 1], n[q - 1] = J * n[q - 1]), o) for (var X = 0; X < this.n; X++) ae = J * this.V[X][q] + Y * this.V[X][E - 1], this.V[X][E - 1] = -Y * this.V[X][q] + J * this.V[X][E - 1], this.V[X][q] = ae;
|
|
1446
1446
|
}
|
|
1447
1447
|
break;
|
|
1448
1448
|
case 2:
|
|
@@ -1474,7 +1474,6 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
1474
1474
|
U++;
|
|
1475
1475
|
}
|
|
1476
1476
|
H = 0, E--;
|
|
1477
|
-
break;
|
|
1478
1477
|
}
|
|
1479
1478
|
}
|
|
1480
1479
|
return {
|
|
@@ -1638,7 +1637,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
1638
1637
|
})
|
|
1639
1638
|
]);
|
|
1640
1639
|
});
|
|
1641
|
-
})), O = /* @__PURE__ */
|
|
1640
|
+
})), O = /* @__PURE__ */ e(((e, t) => {
|
|
1642
1641
|
(function(n, r) {
|
|
1643
1642
|
typeof e == "object" && typeof t == "object" ? t.exports = r(D()) : typeof define == "function" && define.amd ? define(["layout-base"], r) : typeof e == "object" ? e.coseBase = r(D()) : n.coseBase = r(n.layoutBase);
|
|
1644
1643
|
})(e, function(e) {
|
|
@@ -1694,7 +1693,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
1694
1693
|
}, x.prototype.newEdge = function(e) {
|
|
1695
1694
|
return new s(null, null, e);
|
|
1696
1695
|
}, x.prototype.initParameters = function() {
|
|
1697
|
-
r.prototype.initParameters.call(this, arguments), this.isSubLayout || (c.DEFAULT_EDGE_LENGTH < 10 ?
|
|
1696
|
+
r.prototype.initParameters.call(this, arguments), this.isSubLayout || (this.idealEdgeLength = c.DEFAULT_EDGE_LENGTH < 10 ? 10 : c.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.gravityConstant = u.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = u.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = u.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1);
|
|
1698
1697
|
}, x.prototype.initSpringEmbedder = function() {
|
|
1699
1698
|
r.prototype.initSpringEmbedder.call(this), this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / u.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = .04, this.coolingAdjuster = 1;
|
|
1700
1699
|
}, x.prototype.layout = function() {
|
|
@@ -1719,26 +1718,32 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
1719
1718
|
}
|
|
1720
1719
|
return Object.keys(this.constraints).length > 0 && (l.handleConstraints(this), this.initConstraintVariables()), this.initSpringEmbedder(), c.APPLY_LAYOUT && this.runSpringEmbedder(), !0;
|
|
1721
1720
|
}, x.prototype.tick = function() {
|
|
1722
|
-
if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished)
|
|
1723
|
-
|
|
1724
|
-
if (this.totalIterations % u.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
|
|
1725
|
-
if (this.isConverged()) if (this.prunedNodesAll.length > 0) this.isTreeGrowing = !0;
|
|
1721
|
+
if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) {
|
|
1722
|
+
if (this.prunedNodesAll.length > 0) this.isTreeGrowing = !0;
|
|
1726
1723
|
else return !0;
|
|
1724
|
+
}
|
|
1725
|
+
if (this.totalIterations % u.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
|
|
1726
|
+
if (this.isConverged()) {
|
|
1727
|
+
if (this.prunedNodesAll.length > 0) this.isTreeGrowing = !0;
|
|
1728
|
+
else return !0;
|
|
1729
|
+
}
|
|
1727
1730
|
this.coolingCycle++, this.layoutQuality == 0 ? this.coolingAdjuster = this.coolingCycle : this.layoutQuality == 1 && (this.coolingAdjuster = this.coolingCycle / 3), this.coolingFactor = Math.max(this.initialCoolingFactor - this.coolingCycle ** +(Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature), this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor));
|
|
1728
1731
|
}
|
|
1729
1732
|
if (this.isTreeGrowing) {
|
|
1730
|
-
if (this.growTreeIterations % 10 == 0)
|
|
1731
|
-
this.
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1733
|
+
if (this.growTreeIterations % 10 == 0) {
|
|
1734
|
+
if (this.prunedNodesAll.length > 0) {
|
|
1735
|
+
this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
|
|
1736
|
+
var e = new Set(this.getAllNodes()), t = this.nodesWithGravity.filter(function(t) {
|
|
1737
|
+
return e.has(t);
|
|
1738
|
+
});
|
|
1739
|
+
this.graphManager.setAllNodesToApplyGravitation(t), this.graphManager.updateBounds(), this.updateGrid(), this.coolingFactor = c.PURE_INCREMENTAL ? u.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 : u.DEFAULT_COOLING_FACTOR_INCREMENTAL;
|
|
1740
|
+
} else this.isTreeGrowing = !1, this.isGrowthFinished = !0;
|
|
1741
|
+
}
|
|
1737
1742
|
this.growTreeIterations++;
|
|
1738
1743
|
}
|
|
1739
1744
|
if (this.isGrowthFinished) {
|
|
1740
1745
|
if (this.isConverged()) return !0;
|
|
1741
|
-
this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), c.PURE_INCREMENTAL ?
|
|
1746
|
+
this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), this.coolingFactor = c.PURE_INCREMENTAL ? u.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 * ((100 - this.afterGrowthIterations) / 100) : u.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
|
|
1742
1747
|
}
|
|
1743
1748
|
var n = !this.isTreeGrowing && !this.isGrowthFinished, r = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
|
|
1744
1749
|
return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(n, r), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
|
|
@@ -1882,66 +1887,68 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
1882
1887
|
for (var l = s / o[n].length, i = 0; i < o[n].length; i++) this.idToNodeMap.get(o[n][i]).displacementY = l;
|
|
1883
1888
|
}
|
|
1884
1889
|
}
|
|
1885
|
-
if (this.constraints.relativePlacementConstraint)
|
|
1886
|
-
if (
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
e.
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1890
|
+
if (this.constraints.relativePlacementConstraint) {
|
|
1891
|
+
if (c.RELAX_MOVEMENT_ON_CONSTRAINTS) this.totalIterations % 10 == 0 && (this.shuffle(this.nodesInRelativeHorizontal), this.shuffle(this.nodesInRelativeVertical)), this.nodesInRelativeHorizontal.forEach(function(t) {
|
|
1892
|
+
if (!e.fixedNodesOnHorizontal.has(t)) {
|
|
1893
|
+
var n = 0;
|
|
1894
|
+
n = e.dummyToNodeForVerticalAlignment.has(t) ? e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(t)[0]).displacementX : e.idToNodeMap.get(t).displacementX, e.nodeToRelativeConstraintMapHorizontal.get(t).forEach(function(r) {
|
|
1895
|
+
if (r.right) {
|
|
1896
|
+
var i = e.nodeToTempPositionMapHorizontal.get(r.right) - e.nodeToTempPositionMapHorizontal.get(t) - n;
|
|
1897
|
+
i < r.gap && (n -= r.gap - i);
|
|
1898
|
+
} else {
|
|
1899
|
+
var i = e.nodeToTempPositionMapHorizontal.get(t) - e.nodeToTempPositionMapHorizontal.get(r.left) + n;
|
|
1900
|
+
i < r.gap && (n += r.gap - i);
|
|
1901
|
+
}
|
|
1902
|
+
}), e.nodeToTempPositionMapHorizontal.set(t, e.nodeToTempPositionMapHorizontal.get(t) + n), e.dummyToNodeForVerticalAlignment.has(t) ? e.dummyToNodeForVerticalAlignment.get(t).forEach(function(t) {
|
|
1903
|
+
e.idToNodeMap.get(t).displacementX = n;
|
|
1904
|
+
}) : e.idToNodeMap.get(t).displacementX = n;
|
|
1905
|
+
}
|
|
1906
|
+
}), this.nodesInRelativeVertical.forEach(function(t) {
|
|
1907
|
+
if (!e.fixedNodesOnHorizontal.has(t)) {
|
|
1908
|
+
var n = 0;
|
|
1909
|
+
n = e.dummyToNodeForHorizontalAlignment.has(t) ? e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(t)[0]).displacementY : e.idToNodeMap.get(t).displacementY, e.nodeToRelativeConstraintMapVertical.get(t).forEach(function(r) {
|
|
1910
|
+
if (r.bottom) {
|
|
1911
|
+
var i = e.nodeToTempPositionMapVertical.get(r.bottom) - e.nodeToTempPositionMapVertical.get(t) - n;
|
|
1912
|
+
i < r.gap && (n -= r.gap - i);
|
|
1913
|
+
} else {
|
|
1914
|
+
var i = e.nodeToTempPositionMapVertical.get(t) - e.nodeToTempPositionMapVertical.get(r.top) + n;
|
|
1915
|
+
i < r.gap && (n += r.gap - i);
|
|
1916
|
+
}
|
|
1917
|
+
}), e.nodeToTempPositionMapVertical.set(t, e.nodeToTempPositionMapVertical.get(t) + n), e.dummyToNodeForHorizontalAlignment.has(t) ? e.dummyToNodeForHorizontalAlignment.get(t).forEach(function(t) {
|
|
1918
|
+
e.idToNodeMap.get(t).displacementY = n;
|
|
1919
|
+
}) : e.idToNodeMap.get(t).displacementY = n;
|
|
1920
|
+
}
|
|
1921
|
+
});
|
|
1922
|
+
else {
|
|
1923
|
+
for (var n = 0; n < this.componentsOnHorizontal.length; n++) {
|
|
1924
|
+
var u = this.componentsOnHorizontal[n];
|
|
1925
|
+
if (this.fixedComponentsOnHorizontal[n]) for (var i = 0; i < u.length; i++) this.dummyToNodeForVerticalAlignment.has(u[i]) ? this.dummyToNodeForVerticalAlignment.get(u[i]).forEach(function(t) {
|
|
1926
|
+
e.idToNodeMap.get(t).displacementX = 0;
|
|
1927
|
+
}) : this.idToNodeMap.get(u[i]).displacementX = 0;
|
|
1928
|
+
else {
|
|
1929
|
+
for (var d = 0, f = 0, i = 0; i < u.length; i++) if (this.dummyToNodeForVerticalAlignment.has(u[i])) {
|
|
1930
|
+
var p = this.dummyToNodeForVerticalAlignment.get(u[i]);
|
|
1931
|
+
d += p.length * this.idToNodeMap.get(p[0]).displacementX, f += p.length;
|
|
1932
|
+
} else d += this.idToNodeMap.get(u[i]).displacementX, f++;
|
|
1933
|
+
for (var m = d / f, i = 0; i < u.length; i++) this.dummyToNodeForVerticalAlignment.has(u[i]) ? this.dummyToNodeForVerticalAlignment.get(u[i]).forEach(function(t) {
|
|
1934
|
+
e.idToNodeMap.get(t).displacementX = m;
|
|
1935
|
+
}) : this.idToNodeMap.get(u[i]).displacementX = m;
|
|
1910
1936
|
}
|
|
1911
|
-
}), e.nodeToTempPositionMapVertical.set(t, e.nodeToTempPositionMapVertical.get(t) + n), e.dummyToNodeForHorizontalAlignment.has(t) ? e.dummyToNodeForHorizontalAlignment.get(t).forEach(function(t) {
|
|
1912
|
-
e.idToNodeMap.get(t).displacementY = n;
|
|
1913
|
-
}) : e.idToNodeMap.get(t).displacementY = n;
|
|
1914
|
-
}
|
|
1915
|
-
});
|
|
1916
|
-
else {
|
|
1917
|
-
for (var n = 0; n < this.componentsOnHorizontal.length; n++) {
|
|
1918
|
-
var u = this.componentsOnHorizontal[n];
|
|
1919
|
-
if (this.fixedComponentsOnHorizontal[n]) for (var i = 0; i < u.length; i++) this.dummyToNodeForVerticalAlignment.has(u[i]) ? this.dummyToNodeForVerticalAlignment.get(u[i]).forEach(function(t) {
|
|
1920
|
-
e.idToNodeMap.get(t).displacementX = 0;
|
|
1921
|
-
}) : this.idToNodeMap.get(u[i]).displacementX = 0;
|
|
1922
|
-
else {
|
|
1923
|
-
for (var d = 0, f = 0, i = 0; i < u.length; i++) if (this.dummyToNodeForVerticalAlignment.has(u[i])) {
|
|
1924
|
-
var p = this.dummyToNodeForVerticalAlignment.get(u[i]);
|
|
1925
|
-
d += p.length * this.idToNodeMap.get(p[0]).displacementX, f += p.length;
|
|
1926
|
-
} else d += this.idToNodeMap.get(u[i]).displacementX, f++;
|
|
1927
|
-
for (var m = d / f, i = 0; i < u.length; i++) this.dummyToNodeForVerticalAlignment.has(u[i]) ? this.dummyToNodeForVerticalAlignment.get(u[i]).forEach(function(t) {
|
|
1928
|
-
e.idToNodeMap.get(t).displacementX = m;
|
|
1929
|
-
}) : this.idToNodeMap.get(u[i]).displacementX = m;
|
|
1930
1937
|
}
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
d +=
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
}
|
|
1938
|
+
for (var n = 0; n < this.componentsOnVertical.length; n++) {
|
|
1939
|
+
var u = this.componentsOnVertical[n];
|
|
1940
|
+
if (this.fixedComponentsOnVertical[n]) for (var i = 0; i < u.length; i++) this.dummyToNodeForHorizontalAlignment.has(u[i]) ? this.dummyToNodeForHorizontalAlignment.get(u[i]).forEach(function(t) {
|
|
1941
|
+
e.idToNodeMap.get(t).displacementY = 0;
|
|
1942
|
+
}) : this.idToNodeMap.get(u[i]).displacementY = 0;
|
|
1943
|
+
else {
|
|
1944
|
+
for (var d = 0, f = 0, i = 0; i < u.length; i++) if (this.dummyToNodeForHorizontalAlignment.has(u[i])) {
|
|
1945
|
+
var p = this.dummyToNodeForHorizontalAlignment.get(u[i]);
|
|
1946
|
+
d += p.length * this.idToNodeMap.get(p[0]).displacementY, f += p.length;
|
|
1947
|
+
} else d += this.idToNodeMap.get(u[i]).displacementY, f++;
|
|
1948
|
+
for (var m = d / f, i = 0; i < u.length; i++) this.dummyToNodeForHorizontalAlignment.has(u[i]) ? this.dummyToNodeForHorizontalAlignment.get(u[i]).forEach(function(t) {
|
|
1949
|
+
e.idToNodeMap.get(t).displacementY = m;
|
|
1950
|
+
}) : this.idToNodeMap.get(u[i]).displacementY = m;
|
|
1951
|
+
}
|
|
1945
1952
|
}
|
|
1946
1953
|
}
|
|
1947
1954
|
}
|
|
@@ -2317,7 +2324,8 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
2317
2324
|
if (Array.isArray(e)) {
|
|
2318
2325
|
for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
|
|
2319
2326
|
return n;
|
|
2320
|
-
}
|
|
2327
|
+
}
|
|
2328
|
+
return Array.from(e);
|
|
2321
2329
|
}
|
|
2322
2330
|
var i = n(806), a = n(551).LinkedList, o = n(551).Matrix, s = n(551).SVD;
|
|
2323
2331
|
function c() {}
|
|
@@ -2329,7 +2337,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
2329
2337
|
m.getChild() ?? (c.set(m.id, f++), l.push(m.getCenterX()), u.push(m.getCenterY()), n.set(m.id, m));
|
|
2330
2338
|
}
|
|
2331
2339
|
t.relativePlacementConstraint && t.relativePlacementConstraint.forEach(function(e) {
|
|
2332
|
-
!e.gap && e.gap != 0 && (e.
|
|
2340
|
+
!e.gap && e.gap != 0 && (e.gap = e.left ? i.DEFAULT_EDGE_LENGTH + n.get(e.left).getWidth() / 2 + n.get(e.right).getWidth() / 2 : i.DEFAULT_EDGE_LENGTH + n.get(e.top).getHeight() / 2 + n.get(e.bottom).getHeight() / 2);
|
|
2333
2341
|
});
|
|
2334
2342
|
var h = function(e, t) {
|
|
2335
2343
|
return {
|
|
@@ -2373,7 +2381,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
2373
2381
|
});
|
|
2374
2382
|
var f = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), m = new a();
|
|
2375
2383
|
d.forEach(function(e, r) {
|
|
2376
|
-
e == 0 ? (m.push(r), n || (t == "horizontal" ? f.set(r, c.has(r) ? l[c.get(r)] : i.get(r)) : f.set(r, c.has(r) ? u[c.get(r)] : i.get(r)))) : f.set(r, -Infinity), n && p.set(r, new Set([r]));
|
|
2384
|
+
e == 0 ? (m.push(r), n || (t == "horizontal" ? f.set(r, c.has(r) ? l[c.get(r)] : i.get(r)) : f.set(r, c.has(r) ? u[c.get(r)] : i.get(r)))) : f.set(r, -Infinity), n && p.set(r, /* @__PURE__ */ new Set([r]));
|
|
2377
2385
|
}), n && o.forEach(function(e) {
|
|
2378
2386
|
var r = [];
|
|
2379
2387
|
if (e.forEach(function(e) {
|
|
@@ -2388,7 +2396,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
2388
2396
|
} else {
|
|
2389
2397
|
var o = 0;
|
|
2390
2398
|
e.forEach(function(e) {
|
|
2391
|
-
t == "horizontal" ?
|
|
2399
|
+
o += t == "horizontal" ? c.has(e) ? l[c.get(e)] : i.get(e) : c.has(e) ? u[c.get(e)] : i.get(e);
|
|
2392
2400
|
}), o /= e.length, e.forEach(function(e) {
|
|
2393
2401
|
f.set(e, o);
|
|
2394
2402
|
});
|
|
@@ -2397,15 +2405,17 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
2397
2405
|
for (var h = function() {
|
|
2398
2406
|
var r = m.shift();
|
|
2399
2407
|
e.get(r).forEach(function(e) {
|
|
2400
|
-
if (f.get(e.id) < f.get(r) + e.gap)
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2408
|
+
if (f.get(e.id) < f.get(r) + e.gap) {
|
|
2409
|
+
if (n && n.has(e.id)) {
|
|
2410
|
+
var a = void 0;
|
|
2411
|
+
if (a = t == "horizontal" ? c.has(e.id) ? l[c.get(e.id)] : i.get(e.id) : c.has(e.id) ? u[c.get(e.id)] : i.get(e.id), f.set(e.id, a), a < f.get(r) + e.gap) {
|
|
2412
|
+
var o = f.get(r) + e.gap - a;
|
|
2413
|
+
p.get(r).forEach(function(e) {
|
|
2414
|
+
f.set(e, f.get(e) - o);
|
|
2415
|
+
});
|
|
2416
|
+
}
|
|
2417
|
+
} else f.set(e.id, f.get(r) + e.gap);
|
|
2418
|
+
}
|
|
2409
2419
|
d.set(e.id, d.get(e.id) - 1), d.get(e.id) == 0 && m.push(e.id), n && p.set(e.id, s(p.get(r), p.get(e.id)));
|
|
2410
2420
|
});
|
|
2411
2421
|
}; m.length != 0;) h();
|
|
@@ -2647,7 +2657,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
2647
2657
|
E.has(e) || (l[c.get(e)] = i);
|
|
2648
2658
|
});
|
|
2649
2659
|
}, K = 0; K < G.length; K++) ie(K);
|
|
2650
|
-
if (t.alignmentConstraint.horizontal) for (var q = t.alignmentConstraint.horizontal,
|
|
2660
|
+
if (t.alignmentConstraint.horizontal) for (var q = t.alignmentConstraint.horizontal, ae = function(e) {
|
|
2651
2661
|
var t = /* @__PURE__ */ new Set();
|
|
2652
2662
|
q[e].forEach(function(e) {
|
|
2653
2663
|
t.add(e);
|
|
@@ -2658,7 +2668,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
2658
2668
|
i = n.size > 0 ? u[c.get(n.values().next().value)] : g(t).y, t.forEach(function(e) {
|
|
2659
2669
|
E.has(e) || (u[c.get(e)] = i);
|
|
2660
2670
|
});
|
|
2661
|
-
},
|
|
2671
|
+
}, J = 0; J < q.length; J++) ae(J);
|
|
2662
2672
|
}
|
|
2663
2673
|
t.relativePlacementConstraint && (function() {
|
|
2664
2674
|
var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
|
|
@@ -2737,25 +2747,25 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
2737
2747
|
i.get(e) ? i.get(e).forEach(function(t) {
|
|
2738
2748
|
u[c.get(t)] = ee.get(e);
|
|
2739
2749
|
}) : u[c.get(e)] = ee.get(e);
|
|
2740
|
-
}, K = !0, q = !1,
|
|
2750
|
+
}, K = !0, q = !1, ae = void 0;
|
|
2741
2751
|
try {
|
|
2742
|
-
for (var
|
|
2743
|
-
var G =
|
|
2752
|
+
for (var J = ee.keys()[Symbol.iterator](), Y; !(K = (Y = J.next()).done); K = !0) {
|
|
2753
|
+
var G = Y.value;
|
|
2744
2754
|
ie(G);
|
|
2745
2755
|
}
|
|
2746
2756
|
} catch (e) {
|
|
2747
|
-
q = !0,
|
|
2757
|
+
q = !0, ae = e;
|
|
2748
2758
|
} finally {
|
|
2749
2759
|
try {
|
|
2750
|
-
!K &&
|
|
2760
|
+
!K && J.return && J.return();
|
|
2751
2761
|
} finally {
|
|
2752
|
-
if (q) throw
|
|
2762
|
+
if (q) throw ae;
|
|
2753
2763
|
}
|
|
2754
2764
|
}
|
|
2755
2765
|
})();
|
|
2756
2766
|
}
|
|
2757
|
-
for (var
|
|
2758
|
-
var X = d[
|
|
2767
|
+
for (var Y = 0; Y < d.length; Y++) {
|
|
2768
|
+
var X = d[Y];
|
|
2759
2769
|
X.getChild() ?? X.setCenter(l[c.get(X.id)], u[c.get(X.id)]);
|
|
2760
2770
|
}
|
|
2761
2771
|
}, e.exports = c;
|
|
@@ -2773,7 +2783,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
2773
2783
|
return r(45);
|
|
2774
2784
|
})();
|
|
2775
2785
|
});
|
|
2776
|
-
})), k = /* @__PURE__ */ r((/* @__PURE__ */
|
|
2786
|
+
})), k = /* @__PURE__ */ r((/* @__PURE__ */ e(((e, t) => {
|
|
2777
2787
|
(function(n, r) {
|
|
2778
2788
|
typeof e == "object" && typeof t == "object" ? t.exports = r(O()) : typeof define == "function" && define.amd ? define(["cose-base"], r) : typeof e == "object" ? e.cytoscapeFcose = r(O()) : n.cytoscapeFcose = r(n.coseBase);
|
|
2779
2789
|
})(e, function(e) {
|
|
@@ -2931,13 +2941,15 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
2931
2941
|
var d = n[u], f = null;
|
|
2932
2942
|
d.intersection(b).length == 0 && (f = d.children());
|
|
2933
2943
|
var p = void 0, v = d.layoutDimensions({ nodeDimensionsIncludeLabels: c.nodeDimensionsIncludeLabels });
|
|
2934
|
-
if (d.outerWidth() != null && d.outerHeight() != null)
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2944
|
+
if (d.outerWidth() != null && d.outerHeight() != null) {
|
|
2945
|
+
if (c.randomize) {
|
|
2946
|
+
if (!d.isParent()) p = t.add(new a(i.graphManager, new o(h[m.get(d.id())] - v.w / 2, g[m.get(d.id())] - v.h / 2), new s(parseFloat(v.w), parseFloat(v.h))));
|
|
2947
|
+
else {
|
|
2948
|
+
var x = r.calcBoundingBox(d, h, g, m);
|
|
2949
|
+
p = d.intersection(b).length == 0 ? t.add(new a(i.graphManager, new o(x.topLeftX, x.topLeftY), new s(x.width, x.height))) : t.add(new a(i.graphManager, new o(x.topLeftX, x.topLeftY), new s(parseFloat(v.w), parseFloat(v.h))));
|
|
2950
|
+
}
|
|
2951
|
+
} else p = t.add(new a(i.graphManager, new o(d.position("x") - v.w / 2, d.position("y") - v.h / 2), new s(parseFloat(v.w), parseFloat(v.h))));
|
|
2952
|
+
} else p = t.add(new a(this.graphManager));
|
|
2941
2953
|
if (p.id = d.data("id"), p.nodeRepulsion = y(c.nodeRepulsion, d), p.paddingLeft = parseInt(d.css("padding")), p.paddingTop = parseInt(d.css("padding")), p.paddingRight = parseInt(d.css("padding")), p.paddingBottom = parseInt(d.css("padding")), c.nodeDimensionsIncludeLabels && (p.labelWidth = d.boundingBox({
|
|
2942
2954
|
includeLabels: !0,
|
|
2943
2955
|
includeNodes: !1,
|
|
@@ -2959,11 +2971,11 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
2959
2971
|
f.id = s.id(), f.idealLength = y(e.idealEdgeLength, s), f.edgeElasticity = y(e.edgeElasticity, s), i += f.idealLength, a++;
|
|
2960
2972
|
}
|
|
2961
2973
|
}
|
|
2962
|
-
e.idealEdgeLength != null && (
|
|
2974
|
+
e.idealEdgeLength != null && (u.DEFAULT_EDGE_LENGTH = l.DEFAULT_EDGE_LENGTH = a > 0 ? i / a : v(e.idealEdgeLength) ? 50 : e.idealEdgeLength, u.MIN_REPULSION_DIST = l.MIN_REPULSION_DIST = l.DEFAULT_EDGE_LENGTH / 10, u.DEFAULT_RADIAL_SEPARATION = l.DEFAULT_EDGE_LENGTH);
|
|
2963
2975
|
}, C = function(e, t) {
|
|
2964
2976
|
t.fixedNodeConstraint && (e.constraints.fixedNodeConstraint = t.fixedNodeConstraint), t.alignmentConstraint && (e.constraints.alignmentConstraint = t.alignmentConstraint), t.relativePlacementConstraint && (e.constraints.relativePlacementConstraint = t.relativePlacementConstraint);
|
|
2965
2977
|
};
|
|
2966
|
-
e.nestingFactor != null && (u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = e.nestingFactor), e.gravity != null && (u.DEFAULT_GRAVITY_STRENGTH = l.DEFAULT_GRAVITY_STRENGTH = e.gravity), e.numIter != null && (u.MAX_ITERATIONS = l.MAX_ITERATIONS = e.numIter), e.gravityRange != null && (u.DEFAULT_GRAVITY_RANGE_FACTOR = l.DEFAULT_GRAVITY_RANGE_FACTOR = e.gravityRange), e.gravityCompound != null && (u.DEFAULT_COMPOUND_GRAVITY_STRENGTH = l.DEFAULT_COMPOUND_GRAVITY_STRENGTH = e.gravityCompound), e.gravityRangeCompound != null && (u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = e.gravityRangeCompound), e.initialEnergyOnIncremental != null && (u.DEFAULT_COOLING_FACTOR_INCREMENTAL = l.DEFAULT_COOLING_FACTOR_INCREMENTAL = e.initialEnergyOnIncremental), e.tilingCompareBy != null && (u.TILING_COMPARE_BY = e.tilingCompareBy), e.quality == "proof" ?
|
|
2978
|
+
e.nestingFactor != null && (u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = e.nestingFactor), e.gravity != null && (u.DEFAULT_GRAVITY_STRENGTH = l.DEFAULT_GRAVITY_STRENGTH = e.gravity), e.numIter != null && (u.MAX_ITERATIONS = l.MAX_ITERATIONS = e.numIter), e.gravityRange != null && (u.DEFAULT_GRAVITY_RANGE_FACTOR = l.DEFAULT_GRAVITY_RANGE_FACTOR = e.gravityRange), e.gravityCompound != null && (u.DEFAULT_COMPOUND_GRAVITY_STRENGTH = l.DEFAULT_COMPOUND_GRAVITY_STRENGTH = e.gravityCompound), e.gravityRangeCompound != null && (u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = e.gravityRangeCompound), e.initialEnergyOnIncremental != null && (u.DEFAULT_COOLING_FACTOR_INCREMENTAL = l.DEFAULT_COOLING_FACTOR_INCREMENTAL = e.initialEnergyOnIncremental), e.tilingCompareBy != null && (u.TILING_COMPARE_BY = e.tilingCompareBy), c.QUALITY = e.quality == "proof" ? 2 : 0, u.NODE_DIMENSIONS_INCLUDE_LABELS = l.NODE_DIMENSIONS_INCLUDE_LABELS = c.NODE_DIMENSIONS_INCLUDE_LABELS = e.nodeDimensionsIncludeLabels, u.DEFAULT_INCREMENTAL = l.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = !e.randomize, u.ANIMATE = l.ANIMATE = c.ANIMATE = e.animate, u.TILE = e.tile, u.TILING_PADDING_VERTICAL = typeof e.tilingPaddingVertical == "function" ? e.tilingPaddingVertical.call() : e.tilingPaddingVertical, u.TILING_PADDING_HORIZONTAL = typeof e.tilingPaddingHorizontal == "function" ? e.tilingPaddingHorizontal.call() : e.tilingPaddingHorizontal, u.DEFAULT_INCREMENTAL = l.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = !0, u.PURE_INCREMENTAL = !e.randomize, c.DEFAULT_UNIFORM_LEAF_NODE_SIZES = e.uniformNodeDimensions, e.step == "transformed" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !0, u.ENFORCE_CONSTRAINTS = !1, u.APPLY_LAYOUT = !1), e.step == "enforced" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, u.ENFORCE_CONSTRAINTS = !0, u.APPLY_LAYOUT = !1), e.step == "cose" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, u.ENFORCE_CONSTRAINTS = !1, u.APPLY_LAYOUT = !0), e.step == "all" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !!e.randomize, u.ENFORCE_CONSTRAINTS = !0, u.APPLY_LAYOUT = !0), u.TREE_REDUCTION_ON_INCREMENTAL = !(e.fixedNodeConstraint || e.alignmentConstraint || e.relativePlacementConstraint);
|
|
2967
2979
|
var w = new i(), T = w.newGraphManager();
|
|
2968
2980
|
return x(T.addRoot(), r.getTopMostNodes(f), w, e), S(w, T, p), C(w, e), w.runLayout(), _;
|
|
2969
2981
|
} };
|
|
@@ -3035,132 +3047,137 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
3035
3047
|
var e = this, t = this.options, n = t.cy, r = t.eles, i = [], a = [], l = void 0, u = [];
|
|
3036
3048
|
t.fixedNodeConstraint && (!Array.isArray(t.fixedNodeConstraint) || t.fixedNodeConstraint.length == 0) && (t.fixedNodeConstraint = void 0), t.alignmentConstraint && (t.alignmentConstraint.vertical && (!Array.isArray(t.alignmentConstraint.vertical) || t.alignmentConstraint.vertical.length == 0) && (t.alignmentConstraint.vertical = void 0), t.alignmentConstraint.horizontal && (!Array.isArray(t.alignmentConstraint.horizontal) || t.alignmentConstraint.horizontal.length == 0) && (t.alignmentConstraint.horizontal = void 0)), t.relativePlacementConstraint && (!Array.isArray(t.relativePlacementConstraint) || t.relativePlacementConstraint.length == 0) && (t.relativePlacementConstraint = void 0), (t.fixedNodeConstraint || t.alignmentConstraint || t.relativePlacementConstraint) && (t.tile = !1, t.packComponents = !1);
|
|
3037
3049
|
var d = void 0, f = !1;
|
|
3038
|
-
if (n.layoutUtilities && t.packComponents && (d = n.layoutUtilities("get"), d ||= n.layoutUtilities(), f = !0), r.nodes().length > 0)
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
t.
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3050
|
+
if (n.layoutUtilities && t.packComponents && (d = n.layoutUtilities("get"), d ||= n.layoutUtilities(), f = !0), r.nodes().length > 0) {
|
|
3051
|
+
if (f) {
|
|
3052
|
+
var p = o.getTopMostNodes(t.eles.nodes());
|
|
3053
|
+
if (l = o.connectComponents(n, t.eles, p), l.forEach(function(e) {
|
|
3054
|
+
var t = e.boundingBox();
|
|
3055
|
+
u.push({
|
|
3056
|
+
x: t.x1 + t.w / 2,
|
|
3057
|
+
y: t.y1 + t.h / 2
|
|
3058
|
+
});
|
|
3059
|
+
}), t.randomize && l.forEach(function(e) {
|
|
3060
|
+
t.eles = e, i.push(s(t));
|
|
3061
|
+
}), t.quality == "default" || t.quality == "proof") {
|
|
3062
|
+
var m = n.collection();
|
|
3063
|
+
if (t.tile) {
|
|
3064
|
+
var h = /* @__PURE__ */ new Map(), g = [], _ = [], v = 0, y = {
|
|
3065
|
+
nodeIndexes: h,
|
|
3066
|
+
xCoords: g,
|
|
3067
|
+
yCoords: _
|
|
3068
|
+
}, b = [];
|
|
3069
|
+
if (l.forEach(function(e, t) {
|
|
3070
|
+
e.edges().length == 0 && (e.nodes().forEach(function(t, n) {
|
|
3071
|
+
m.merge(e.nodes()[n]), t.isParent() || (y.nodeIndexes.set(e.nodes()[n].id(), v++), y.xCoords.push(e.nodes()[0].position().x), y.yCoords.push(e.nodes()[0].position().y));
|
|
3072
|
+
}), b.push(t));
|
|
3073
|
+
}), m.length > 1) {
|
|
3074
|
+
var x = m.boundingBox();
|
|
3075
|
+
u.push({
|
|
3076
|
+
x: x.x1 + x.w / 2,
|
|
3077
|
+
y: x.y1 + x.h / 2
|
|
3078
|
+
}), l.push(m), i.push(y);
|
|
3079
|
+
for (var S = b.length - 1; S >= 0; S--) l.splice(b[S], 1), i.splice(b[S], 1), u.splice(b[S], 1);
|
|
3080
|
+
}
|
|
3067
3081
|
}
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
})
|
|
3072
|
-
|
|
3073
|
-
o.relocateComponent(u[n], i[n], t);
|
|
3074
|
-
});
|
|
3075
|
-
var C = /* @__PURE__ */ new Set();
|
|
3076
|
-
if (l.length > 1) {
|
|
3077
|
-
var w = [], T = r.filter(function(e) {
|
|
3078
|
-
return e.css("display") == "none";
|
|
3082
|
+
l.forEach(function(e, n) {
|
|
3083
|
+
t.eles = e, a.push(c(t, i[n])), o.relocateComponent(u[n], a[n], t);
|
|
3084
|
+
});
|
|
3085
|
+
} else l.forEach(function(e, n) {
|
|
3086
|
+
o.relocateComponent(u[n], i[n], t);
|
|
3079
3087
|
});
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
var m = o.calcBoundingBox(c, i[n].xCoords, i[n].yCoords, r);
|
|
3114
|
-
f.push(m.topLeftX + m.width / 2), f.push(m.topLeftY + m.height / 2);
|
|
3115
|
-
} else f.push(i[n].xCoords[u]), f.push(i[n].yCoords[u]);
|
|
3116
|
-
if (l.isParent()) {
|
|
3117
|
-
var h = o.calcBoundingBox(l, i[n].xCoords, i[n].yCoords, r);
|
|
3118
|
-
p.push(h.topLeftX + h.width / 2), p.push(h.topLeftY + h.height / 2);
|
|
3119
|
-
} else p.push(i[n].xCoords[d]), p.push(i[n].yCoords[d]);
|
|
3120
|
-
s.edges.push({
|
|
3121
|
-
startX: f[0],
|
|
3122
|
-
startY: f[1],
|
|
3123
|
-
endX: p[0],
|
|
3124
|
-
endY: p[1]
|
|
3088
|
+
var C = /* @__PURE__ */ new Set();
|
|
3089
|
+
if (l.length > 1) {
|
|
3090
|
+
var w = [], T = r.filter(function(e) {
|
|
3091
|
+
return e.css("display") == "none";
|
|
3092
|
+
});
|
|
3093
|
+
l.forEach(function(e, n) {
|
|
3094
|
+
var r = void 0;
|
|
3095
|
+
if (t.quality == "draft" && (r = i[n].nodeIndexes), e.nodes().not(T).length > 0) {
|
|
3096
|
+
var s = {};
|
|
3097
|
+
s.edges = [], s.nodes = [];
|
|
3098
|
+
var c = void 0;
|
|
3099
|
+
e.nodes().not(T).forEach(function(e) {
|
|
3100
|
+
if (t.quality == "draft") {
|
|
3101
|
+
if (!e.isParent()) c = r.get(e.id()), s.nodes.push({
|
|
3102
|
+
x: i[n].xCoords[c] - e.boundingbox().w / 2,
|
|
3103
|
+
y: i[n].yCoords[c] - e.boundingbox().h / 2,
|
|
3104
|
+
width: e.boundingbox().w,
|
|
3105
|
+
height: e.boundingbox().h
|
|
3106
|
+
});
|
|
3107
|
+
else {
|
|
3108
|
+
var l = o.calcBoundingBox(e, i[n].xCoords, i[n].yCoords, r);
|
|
3109
|
+
s.nodes.push({
|
|
3110
|
+
x: l.topLeftX,
|
|
3111
|
+
y: l.topLeftY,
|
|
3112
|
+
width: l.width,
|
|
3113
|
+
height: l.height
|
|
3114
|
+
});
|
|
3115
|
+
}
|
|
3116
|
+
} else a[n][e.id()] && s.nodes.push({
|
|
3117
|
+
x: a[n][e.id()].getLeft(),
|
|
3118
|
+
y: a[n][e.id()].getTop(),
|
|
3119
|
+
width: a[n][e.id()].getWidth(),
|
|
3120
|
+
height: a[n][e.id()].getHeight()
|
|
3125
3121
|
});
|
|
3126
|
-
}
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3122
|
+
}), e.edges().forEach(function(e) {
|
|
3123
|
+
var c = e.source(), l = e.target();
|
|
3124
|
+
if (c.css("display") != "none" && l.css("display") != "none") {
|
|
3125
|
+
if (t.quality == "draft") {
|
|
3126
|
+
var u = r.get(c.id()), d = r.get(l.id()), f = [], p = [];
|
|
3127
|
+
if (c.isParent()) {
|
|
3128
|
+
var m = o.calcBoundingBox(c, i[n].xCoords, i[n].yCoords, r);
|
|
3129
|
+
f.push(m.topLeftX + m.width / 2), f.push(m.topLeftY + m.height / 2);
|
|
3130
|
+
} else f.push(i[n].xCoords[u]), f.push(i[n].yCoords[u]);
|
|
3131
|
+
if (l.isParent()) {
|
|
3132
|
+
var h = o.calcBoundingBox(l, i[n].xCoords, i[n].yCoords, r);
|
|
3133
|
+
p.push(h.topLeftX + h.width / 2), p.push(h.topLeftY + h.height / 2);
|
|
3134
|
+
} else p.push(i[n].xCoords[d]), p.push(i[n].yCoords[d]);
|
|
3135
|
+
s.edges.push({
|
|
3136
|
+
startX: f[0],
|
|
3137
|
+
startY: f[1],
|
|
3138
|
+
endX: p[0],
|
|
3139
|
+
endY: p[1]
|
|
3140
|
+
});
|
|
3141
|
+
} else a[n][c.id()] && a[n][l.id()] && s.edges.push({
|
|
3142
|
+
startX: a[n][c.id()].getCenterX(),
|
|
3143
|
+
startY: a[n][c.id()].getCenterY(),
|
|
3144
|
+
endX: a[n][l.id()].getCenterX(),
|
|
3145
|
+
endY: a[n][l.id()].getCenterY()
|
|
3146
|
+
});
|
|
3147
|
+
}
|
|
3148
|
+
}), s.nodes.length > 0 && (w.push(s), C.add(n));
|
|
3149
|
+
}
|
|
3141
3150
|
});
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
}), D++;
|
|
3151
|
+
var E = d.packComponents(w, t.randomize).shifts;
|
|
3152
|
+
if (t.quality == "draft") i.forEach(function(e, t) {
|
|
3153
|
+
var n = e.xCoords.map(function(e) {
|
|
3154
|
+
return e + E[t].dx;
|
|
3155
|
+
}), r = e.yCoords.map(function(e) {
|
|
3156
|
+
return e + E[t].dy;
|
|
3157
|
+
});
|
|
3158
|
+
e.xCoords = n, e.yCoords = r;
|
|
3151
3159
|
});
|
|
3160
|
+
else {
|
|
3161
|
+
var D = 0;
|
|
3162
|
+
C.forEach(function(e) {
|
|
3163
|
+
Object.keys(a[e]).forEach(function(t) {
|
|
3164
|
+
var n = a[e][t];
|
|
3165
|
+
n.setCenter(n.getCenterX() + E[D].dx, n.getCenterY() + E[D].dy);
|
|
3166
|
+
}), D++;
|
|
3167
|
+
});
|
|
3168
|
+
}
|
|
3152
3169
|
}
|
|
3170
|
+
} else {
|
|
3171
|
+
var O = t.eles.boundingBox();
|
|
3172
|
+
if (u.push({
|
|
3173
|
+
x: O.x1 + O.w / 2,
|
|
3174
|
+
y: O.y1 + O.h / 2
|
|
3175
|
+
}), t.randomize) {
|
|
3176
|
+
var k = s(t);
|
|
3177
|
+
i.push(k);
|
|
3178
|
+
}
|
|
3179
|
+
t.quality == "default" || t.quality == "proof" ? (a.push(c(t, i[0])), o.relocateComponent(u[0], a[0], t)) : o.relocateComponent(u[0], i[0], t);
|
|
3153
3180
|
}
|
|
3154
|
-
} else {
|
|
3155
|
-
var O = t.eles.boundingBox();
|
|
3156
|
-
if (u.push({
|
|
3157
|
-
x: O.x1 + O.w / 2,
|
|
3158
|
-
y: O.y1 + O.h / 2
|
|
3159
|
-
}), t.randomize) {
|
|
3160
|
-
var k = s(t);
|
|
3161
|
-
i.push(k);
|
|
3162
|
-
}
|
|
3163
|
-
t.quality == "default" || t.quality == "proof" ? (a.push(c(t, i[0])), o.relocateComponent(u[0], a[0], t)) : o.relocateComponent(u[0], i[0], t);
|
|
3164
3181
|
}
|
|
3165
3182
|
var A = function(e, n) {
|
|
3166
3183
|
if (t.quality == "default" || t.quality == "proof") {
|
|
@@ -3178,22 +3195,21 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
3178
3195
|
x: r.x,
|
|
3179
3196
|
y: r.y
|
|
3180
3197
|
};
|
|
3181
|
-
} else {
|
|
3182
|
-
var c = void 0;
|
|
3183
|
-
return i.forEach(function(t) {
|
|
3184
|
-
var n = t.nodeIndexes.get(e.id());
|
|
3185
|
-
n != null && (c = {
|
|
3186
|
-
x: t.xCoords[n],
|
|
3187
|
-
y: t.yCoords[n]
|
|
3188
|
-
});
|
|
3189
|
-
}), c ??= {
|
|
3190
|
-
x: e.position("x"),
|
|
3191
|
-
y: e.position("y")
|
|
3192
|
-
}, {
|
|
3193
|
-
x: c.x,
|
|
3194
|
-
y: c.y
|
|
3195
|
-
};
|
|
3196
3198
|
}
|
|
3199
|
+
var c = void 0;
|
|
3200
|
+
return i.forEach(function(t) {
|
|
3201
|
+
var n = t.nodeIndexes.get(e.id());
|
|
3202
|
+
n != null && (c = {
|
|
3203
|
+
x: t.xCoords[n],
|
|
3204
|
+
y: t.yCoords[n]
|
|
3205
|
+
});
|
|
3206
|
+
}), c ??= {
|
|
3207
|
+
x: e.position("x"),
|
|
3208
|
+
y: e.position("y")
|
|
3209
|
+
}, {
|
|
3210
|
+
x: c.x,
|
|
3211
|
+
y: c.y
|
|
3212
|
+
};
|
|
3197
3213
|
};
|
|
3198
3214
|
if (t.quality == "default" || t.quality == "proof" || t.randomize) {
|
|
3199
3215
|
var j = o.calcParentsWithoutChildren(n, r), M = r.filter(function(e) {
|
|
@@ -3339,18 +3355,17 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
3339
3355
|
xCoords: f,
|
|
3340
3356
|
yCoords: p
|
|
3341
3357
|
}), U;
|
|
3342
|
-
} else {
|
|
3343
|
-
var ie = l.keys(), K = t.getElementById(ie.next().value), q = K.position(), J = K.outerWidth();
|
|
3344
|
-
if (f.push(q.x), p.push(q.y), y == 2) {
|
|
3345
|
-
var Y = t.getElementById(ie.next().value).outerWidth();
|
|
3346
|
-
f.push(q.x + J / 2 + Y / 2 + e.idealEdgeLength), p.push(q.y);
|
|
3347
|
-
}
|
|
3348
|
-
return U = {
|
|
3349
|
-
nodeIndexes: l,
|
|
3350
|
-
xCoords: f,
|
|
3351
|
-
yCoords: p
|
|
3352
|
-
}, U;
|
|
3353
3358
|
}
|
|
3359
|
+
var ie = l.keys(), K = t.getElementById(ie.next().value), q = K.position(), ae = K.outerWidth();
|
|
3360
|
+
if (f.push(q.x), p.push(q.y), y == 2) {
|
|
3361
|
+
var J = t.getElementById(ie.next().value).outerWidth();
|
|
3362
|
+
f.push(q.x + ae / 2 + J / 2 + e.idealEdgeLength), p.push(q.y);
|
|
3363
|
+
}
|
|
3364
|
+
return U = {
|
|
3365
|
+
nodeIndexes: l,
|
|
3366
|
+
xCoords: f,
|
|
3367
|
+
yCoords: p
|
|
3368
|
+
}, U;
|
|
3354
3369
|
} };
|
|
3355
3370
|
}),
|
|
3356
3371
|
579: ((e, t, n) => {
|
|
@@ -3378,54 +3393,57 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
3378
3393
|
T: "top",
|
|
3379
3394
|
B: "bottom"
|
|
3380
3395
|
}, j = {
|
|
3381
|
-
L: /* @__PURE__ */
|
|
3382
|
-
R: /* @__PURE__ */
|
|
3383
|
-
T: /* @__PURE__ */
|
|
3384
|
-
B: /* @__PURE__ */
|
|
3396
|
+
L: /* @__PURE__ */ g((e) => `${e},${e / 2} 0,${e} 0,0`, "L"),
|
|
3397
|
+
R: /* @__PURE__ */ g((e) => `0,${e / 2} ${e},0 ${e},${e}`, "R"),
|
|
3398
|
+
T: /* @__PURE__ */ g((e) => `0,0 ${e},0 ${e / 2},${e}`, "T"),
|
|
3399
|
+
B: /* @__PURE__ */ g((e) => `${e / 2},0 ${e},${e} 0,${e}`, "B")
|
|
3385
3400
|
}, M = {
|
|
3386
|
-
L: /* @__PURE__ */
|
|
3387
|
-
R: /* @__PURE__ */
|
|
3388
|
-
T: /* @__PURE__ */
|
|
3389
|
-
B: /* @__PURE__ */
|
|
3390
|
-
}, N = /* @__PURE__ */
|
|
3401
|
+
L: /* @__PURE__ */ g((e, t) => e - t + 2, "L"),
|
|
3402
|
+
R: /* @__PURE__ */ g((e, t) => e - 2, "R"),
|
|
3403
|
+
T: /* @__PURE__ */ g((e, t) => e - t + 2, "T"),
|
|
3404
|
+
B: /* @__PURE__ */ g((e, t) => e - 2, "B")
|
|
3405
|
+
}, N = /* @__PURE__ */ g(function(e) {
|
|
3391
3406
|
return F(e) ? e === "L" ? "R" : "L" : e === "T" ? "B" : "T";
|
|
3392
|
-
}, "getOppositeArchitectureDirection"), P = /* @__PURE__ */
|
|
3407
|
+
}, "getOppositeArchitectureDirection"), P = /* @__PURE__ */ g(function(e) {
|
|
3393
3408
|
let t = e;
|
|
3394
3409
|
return t === "L" || t === "R" || t === "T" || t === "B";
|
|
3395
|
-
}, "isArchitectureDirection"), F = /* @__PURE__ */
|
|
3410
|
+
}, "isArchitectureDirection"), F = /* @__PURE__ */ g(function(e) {
|
|
3396
3411
|
let t = e;
|
|
3397
3412
|
return t === "L" || t === "R";
|
|
3398
|
-
}, "isArchitectureDirectionX"), I = /* @__PURE__ */
|
|
3413
|
+
}, "isArchitectureDirectionX"), I = /* @__PURE__ */ g(function(e) {
|
|
3399
3414
|
let t = e;
|
|
3400
3415
|
return t === "T" || t === "B";
|
|
3401
|
-
}, "isArchitectureDirectionY"), L = /* @__PURE__ */
|
|
3416
|
+
}, "isArchitectureDirectionY"), L = /* @__PURE__ */ g(function(e, t) {
|
|
3402
3417
|
let n = F(e) && I(t), r = I(e) && F(t);
|
|
3403
3418
|
return n || r;
|
|
3404
|
-
}, "isArchitectureDirectionXY"), R = /* @__PURE__ */
|
|
3419
|
+
}, "isArchitectureDirectionXY"), R = /* @__PURE__ */ g(function(e) {
|
|
3405
3420
|
let t = e[0], n = e[1], r = F(t) && I(n), i = I(t) && F(n);
|
|
3406
3421
|
return r || i;
|
|
3407
|
-
}, "isArchitecturePairXY"), z = /* @__PURE__ */
|
|
3422
|
+
}, "isArchitecturePairXY"), z = /* @__PURE__ */ g(function(e) {
|
|
3408
3423
|
return e !== "LL" && e !== "RR" && e !== "TT" && e !== "BB";
|
|
3409
|
-
}, "isValidArchitectureDirectionPair"), B = /* @__PURE__ */
|
|
3424
|
+
}, "isValidArchitectureDirectionPair"), B = /* @__PURE__ */ g(function(e, t) {
|
|
3410
3425
|
let n = `${e}${t}`;
|
|
3411
3426
|
return z(n) ? n : void 0;
|
|
3412
|
-
}, "getArchitectureDirectionPair"), V = /* @__PURE__ */
|
|
3427
|
+
}, "getArchitectureDirectionPair"), V = /* @__PURE__ */ g(function([e, t], n) {
|
|
3413
3428
|
let r = n[0], i = n[1];
|
|
3414
3429
|
return F(r) ? I(i) ? [e + (r === "L" ? -1 : 1), t + (i === "T" ? 1 : -1)] : [e + (r === "L" ? -1 : 1), t] : F(i) ? [e + (i === "L" ? 1 : -1), t + (r === "T" ? 1 : -1)] : [e, t + (r === "T" ? 1 : -1)];
|
|
3415
|
-
}, "shiftPositionByArchitectureDirectionPair"), ee = /* @__PURE__ */
|
|
3430
|
+
}, "shiftPositionByArchitectureDirectionPair"), ee = /* @__PURE__ */ g(function(e) {
|
|
3416
3431
|
return e === "LT" || e === "TL" ? [1, 1] : e === "BL" || e === "LB" ? [1, -1] : e === "BR" || e === "RB" ? [-1, -1] : [-1, 1];
|
|
3417
|
-
}, "getArchitectureDirectionXYFactors"), te = /* @__PURE__ */
|
|
3432
|
+
}, "getArchitectureDirectionXYFactors"), te = /* @__PURE__ */ g(function(e, t) {
|
|
3418
3433
|
return L(e, t) ? "bend" : F(e) ? "horizontal" : "vertical";
|
|
3419
|
-
}, "getArchitectureDirectionAlignment"), H = /* @__PURE__ */
|
|
3434
|
+
}, "getArchitectureDirectionAlignment"), H = /* @__PURE__ */ g(function(e) {
|
|
3420
3435
|
return e.type === "service";
|
|
3421
|
-
}, "isArchitectureService"), ne = /* @__PURE__ */
|
|
3436
|
+
}, "isArchitectureService"), ne = /* @__PURE__ */ g(function(e) {
|
|
3422
3437
|
return e.type === "junction";
|
|
3423
|
-
}, "isArchitectureJunction"), re = /* @__PURE__ */
|
|
3438
|
+
}, "isArchitectureJunction"), re = /* @__PURE__ */ g((e, t) => {
|
|
3439
|
+
let [n, r] = [e, t].sort();
|
|
3440
|
+
return `${JSON.stringify(n)}-${JSON.stringify(r)}`;
|
|
3441
|
+
}, "architectureGroupAlignmentKey"), U = /* @__PURE__ */ g((e) => e.data(), "edgeData"), W = /* @__PURE__ */ g((e) => e.data(), "nodeData"), G = u.architecture, ie = class {
|
|
3424
3442
|
constructor() {
|
|
3425
|
-
this.nodes =
|
|
3443
|
+
this.nodes = /* @__PURE__ */ new Map(), this.groups = /* @__PURE__ */ new Map(), this.edges = [], this.layoutHints = [], this.registeredIds = /* @__PURE__ */ new Map(), this.elements = /* @__PURE__ */ new Map(), this.diagramId = "", this.setAccTitle = s, this.getAccTitle = m, this.setDiagramTitle = o, this.getDiagramTitle = f, this.getAccDescription = d, this.setAccDescription = i, this.clear();
|
|
3426
3444
|
}
|
|
3427
3445
|
static {
|
|
3428
|
-
|
|
3446
|
+
g(this, "ArchitectureDB");
|
|
3429
3447
|
}
|
|
3430
3448
|
setDiagramId(e) {
|
|
3431
3449
|
this.diagramId = e;
|
|
@@ -3434,16 +3452,16 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
3434
3452
|
return this.diagramId;
|
|
3435
3453
|
}
|
|
3436
3454
|
clear() {
|
|
3437
|
-
this.nodes =
|
|
3455
|
+
this.nodes = /* @__PURE__ */ new Map(), this.groups = /* @__PURE__ */ new Map(), this.edges = [], this.layoutHints = [], this.registeredIds = /* @__PURE__ */ new Map(), this.dataStructures = void 0, this.elements = /* @__PURE__ */ new Map(), this.diagramId = "", c();
|
|
3438
3456
|
}
|
|
3439
3457
|
addService({ id: e, icon: t, in: n, title: r, iconText: i }) {
|
|
3440
|
-
if (this.registeredIds
|
|
3458
|
+
if (this.registeredIds.has(e)) throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);
|
|
3441
3459
|
if (n !== void 0) {
|
|
3442
3460
|
if (e === n) throw Error(`The service [${e}] cannot be placed within itself`);
|
|
3443
|
-
if (this.registeredIds
|
|
3444
|
-
if (this.registeredIds
|
|
3461
|
+
if (!this.registeredIds.has(n)) throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);
|
|
3462
|
+
if (this.registeredIds.get(n) === "node") throw Error(`The service [${e}]'s parent is not a group`);
|
|
3445
3463
|
}
|
|
3446
|
-
this.registeredIds
|
|
3464
|
+
this.registeredIds.set(e, "node"), this.nodes.set(e, {
|
|
3447
3465
|
id: e,
|
|
3448
3466
|
type: "service",
|
|
3449
3467
|
icon: t,
|
|
@@ -3451,57 +3469,57 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
3451
3469
|
title: r,
|
|
3452
3470
|
edges: [],
|
|
3453
3471
|
in: n
|
|
3454
|
-
};
|
|
3472
|
+
});
|
|
3455
3473
|
}
|
|
3456
3474
|
getServices() {
|
|
3457
|
-
return
|
|
3475
|
+
return [...this.nodes.values()].filter(H);
|
|
3458
3476
|
}
|
|
3459
3477
|
addJunction({ id: e, in: t }) {
|
|
3460
|
-
if (this.registeredIds
|
|
3478
|
+
if (this.registeredIds.has(e)) throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);
|
|
3461
3479
|
if (t !== void 0) {
|
|
3462
3480
|
if (e === t) throw Error(`The junction [${e}] cannot be placed within itself`);
|
|
3463
|
-
if (this.registeredIds
|
|
3464
|
-
if (this.registeredIds
|
|
3481
|
+
if (!this.registeredIds.has(t)) throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);
|
|
3482
|
+
if (this.registeredIds.get(t) === "node") throw Error(`The junction [${e}]'s parent is not a group`);
|
|
3465
3483
|
}
|
|
3466
|
-
this.registeredIds
|
|
3484
|
+
this.registeredIds.set(e, "node"), this.nodes.set(e, {
|
|
3467
3485
|
id: e,
|
|
3468
3486
|
type: "junction",
|
|
3469
3487
|
edges: [],
|
|
3470
3488
|
in: t
|
|
3471
|
-
};
|
|
3489
|
+
});
|
|
3472
3490
|
}
|
|
3473
3491
|
getJunctions() {
|
|
3474
|
-
return
|
|
3492
|
+
return [...this.nodes.values()].filter(ne);
|
|
3475
3493
|
}
|
|
3476
3494
|
getNodes() {
|
|
3477
|
-
return
|
|
3495
|
+
return [...this.nodes.values()];
|
|
3478
3496
|
}
|
|
3479
3497
|
getNode(e) {
|
|
3480
|
-
return this.nodes
|
|
3498
|
+
return this.nodes.get(e) ?? null;
|
|
3481
3499
|
}
|
|
3482
3500
|
addGroup({ id: e, icon: t, in: n, title: r }) {
|
|
3483
|
-
if (this.registeredIds
|
|
3501
|
+
if (this.registeredIds.has(e)) throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);
|
|
3484
3502
|
if (n !== void 0) {
|
|
3485
3503
|
if (e === n) throw Error(`The group [${e}] cannot be placed within itself`);
|
|
3486
|
-
if (this.registeredIds
|
|
3487
|
-
if (this.registeredIds
|
|
3504
|
+
if (!this.registeredIds.has(n)) throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);
|
|
3505
|
+
if (this.registeredIds.get(n) === "node") throw Error(`The group [${e}]'s parent is not a group`);
|
|
3488
3506
|
}
|
|
3489
|
-
this.registeredIds
|
|
3507
|
+
this.registeredIds.set(e, "group"), this.groups.set(e, {
|
|
3490
3508
|
id: e,
|
|
3491
3509
|
icon: t,
|
|
3492
3510
|
title: r,
|
|
3493
3511
|
in: n
|
|
3494
|
-
};
|
|
3512
|
+
});
|
|
3495
3513
|
}
|
|
3496
3514
|
getGroups() {
|
|
3497
|
-
return
|
|
3515
|
+
return [...this.groups.values()];
|
|
3498
3516
|
}
|
|
3499
3517
|
addEdge({ lhsId: e, rhsId: t, lhsDir: n, rhsDir: r, lhsInto: i, rhsInto: a, lhsGroup: o, rhsGroup: s, title: c }) {
|
|
3500
3518
|
if (!P(n)) throw Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);
|
|
3501
3519
|
if (!P(r)) throw Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);
|
|
3502
|
-
if (this.nodes
|
|
3503
|
-
if (this.nodes
|
|
3504
|
-
let l = this.nodes
|
|
3520
|
+
if (!this.nodes.has(e) && !this.groups.has(e)) throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);
|
|
3521
|
+
if (!this.nodes.has(t) && !this.groups.has(t)) throw Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);
|
|
3522
|
+
let l = this.nodes.get(e).in, u = this.nodes.get(t).in;
|
|
3505
3523
|
if (o && l && u && l == u) throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);
|
|
3506
3524
|
if (s && l && u && l == u) throw Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);
|
|
3507
3525
|
let d = {
|
|
@@ -3515,86 +3533,112 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
3515
3533
|
rhsGroup: s,
|
|
3516
3534
|
title: c
|
|
3517
3535
|
};
|
|
3518
|
-
this.edges.push(d)
|
|
3536
|
+
this.edges.push(d);
|
|
3537
|
+
let f = this.nodes.get(e), p = this.nodes.get(t);
|
|
3538
|
+
f && p && (f.edges.push(this.edges[this.edges.length - 1]), p.edges.push(this.edges[this.edges.length - 1]));
|
|
3519
3539
|
}
|
|
3520
3540
|
getEdges() {
|
|
3521
3541
|
return this.edges;
|
|
3522
3542
|
}
|
|
3543
|
+
addLayoutHint(e) {
|
|
3544
|
+
if (e.members.length < 2) throw Error(`An align directive requires at least two members; got ${e.members.length}`);
|
|
3545
|
+
let t = /* @__PURE__ */ new Set();
|
|
3546
|
+
e.members.forEach((n) => {
|
|
3547
|
+
if (this.registeredIds.get(n) !== "node") throw Error(`align ${e.direction} references [${n}], which is not a service or junction`);
|
|
3548
|
+
if (t.has(n)) throw Error(`align ${e.direction} lists [${n}] more than once`);
|
|
3549
|
+
t.add(n);
|
|
3550
|
+
}), this.layoutHints.push(e);
|
|
3551
|
+
}
|
|
3552
|
+
getLayoutHints() {
|
|
3553
|
+
return this.layoutHints;
|
|
3554
|
+
}
|
|
3523
3555
|
getDataStructures() {
|
|
3524
3556
|
if (this.dataStructures === void 0) {
|
|
3525
|
-
let e =
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3557
|
+
let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
|
|
3558
|
+
for (let [n, r] of this.nodes.entries()) {
|
|
3559
|
+
let i = /* @__PURE__ */ new Map();
|
|
3560
|
+
for (let t of r.edges) {
|
|
3561
|
+
let r = this.getNode(t.lhsId)?.in, a = this.getNode(t.rhsId)?.in;
|
|
3562
|
+
if (r && a && r !== a) {
|
|
3563
|
+
let n = te(t.lhsDir, t.rhsDir);
|
|
3564
|
+
n !== "bend" && e.set(re(r, a), n);
|
|
3565
|
+
}
|
|
3566
|
+
if (t.lhsId === n) {
|
|
3567
|
+
let e = B(t.lhsDir, t.rhsDir);
|
|
3568
|
+
e && i.set(e, t.rhsId);
|
|
3569
|
+
} else {
|
|
3570
|
+
let e = B(t.rhsDir, t.lhsDir);
|
|
3571
|
+
e && i.set(e, t.lhsId);
|
|
3572
|
+
}
|
|
3537
3573
|
}
|
|
3538
|
-
|
|
3539
|
-
}
|
|
3540
|
-
|
|
3541
|
-
[
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
for (; r.length > 0;) {
|
|
3545
|
-
let e = r.shift();
|
|
3574
|
+
t.set(n, i);
|
|
3575
|
+
}
|
|
3576
|
+
let n = /* @__PURE__ */ new Set(), r = new Set(t.keys()), i = /* @__PURE__ */ g((e) => {
|
|
3577
|
+
let i = /* @__PURE__ */ new Map([[e, [0, 0]]]), a = [e];
|
|
3578
|
+
for (; a.length > 0;) {
|
|
3579
|
+
let e = a.shift();
|
|
3546
3580
|
if (e) {
|
|
3547
|
-
|
|
3548
|
-
let o =
|
|
3549
|
-
|
|
3550
|
-
|
|
3581
|
+
n.add(e), r.delete(e);
|
|
3582
|
+
let o = t.get(e);
|
|
3583
|
+
if (!o) throw Error(`BFS error: adjacency list for id ${e} not found. Please report this as a bug.`);
|
|
3584
|
+
let s = i.get(e);
|
|
3585
|
+
if (!s) throw Error(`BFS error: position for id ${e} not found in spatial map. Please report this as a bug.`);
|
|
3586
|
+
let [c, l] = s;
|
|
3587
|
+
o.forEach((e, t) => {
|
|
3588
|
+
n.has(e) || (i.set(e, V([c, l], t)), a.push(e));
|
|
3551
3589
|
});
|
|
3552
3590
|
}
|
|
3553
3591
|
}
|
|
3554
|
-
return
|
|
3555
|
-
}, "BFS"),
|
|
3556
|
-
for (;
|
|
3592
|
+
return i;
|
|
3593
|
+
}, "BFS"), a = [];
|
|
3594
|
+
for (; r.size > 0;) {
|
|
3595
|
+
let e = r.values().next().value;
|
|
3596
|
+
a.push(i(e));
|
|
3597
|
+
}
|
|
3557
3598
|
this.dataStructures = {
|
|
3558
|
-
adjList:
|
|
3559
|
-
spatialMaps:
|
|
3599
|
+
adjList: t,
|
|
3600
|
+
spatialMaps: a,
|
|
3560
3601
|
groupAlignments: e
|
|
3561
3602
|
};
|
|
3562
3603
|
}
|
|
3563
3604
|
return this.dataStructures;
|
|
3564
3605
|
}
|
|
3565
3606
|
setElementForId(e, t) {
|
|
3566
|
-
this.elements
|
|
3607
|
+
this.elements.set(e, t);
|
|
3567
3608
|
}
|
|
3568
3609
|
getElementById(e) {
|
|
3569
|
-
return this.elements
|
|
3610
|
+
return this.elements.get(e);
|
|
3570
3611
|
}
|
|
3571
3612
|
getConfig() {
|
|
3572
3613
|
return v({
|
|
3573
|
-
...
|
|
3574
|
-
...
|
|
3614
|
+
...G,
|
|
3615
|
+
...l().architecture
|
|
3575
3616
|
});
|
|
3576
3617
|
}
|
|
3577
3618
|
getConfigField(e) {
|
|
3578
3619
|
return this.getConfig()[e];
|
|
3579
3620
|
}
|
|
3580
|
-
},
|
|
3621
|
+
}, K = /* @__PURE__ */ g((e, t) => {
|
|
3581
3622
|
T(e, t), e.groups.map((e) => t.addGroup(e)), e.services.map((e) => t.addService({
|
|
3582
3623
|
...e,
|
|
3583
3624
|
type: "service"
|
|
3584
3625
|
})), e.junctions.map((e) => t.addJunction({
|
|
3585
3626
|
...e,
|
|
3586
3627
|
type: "junction"
|
|
3587
|
-
})), e.edges.map((e) => t.addEdge(e))
|
|
3588
|
-
|
|
3628
|
+
})), e.edges.map((e) => t.addEdge(e)), e.alignments?.map((e) => t.addLayoutHint({
|
|
3629
|
+
direction: e.direction,
|
|
3630
|
+
members: [...e.members]
|
|
3631
|
+
}));
|
|
3632
|
+
}, "populateDb"), q = {
|
|
3589
3633
|
parser: { yy: void 0 },
|
|
3590
|
-
parse: /* @__PURE__ */
|
|
3591
|
-
let n = await w("architecture",
|
|
3592
|
-
|
|
3593
|
-
let r =
|
|
3594
|
-
if (!(r instanceof
|
|
3595
|
-
|
|
3634
|
+
parse: /* @__PURE__ */ g(async (e) => {
|
|
3635
|
+
let n = await w("architecture", e);
|
|
3636
|
+
t.debug(n);
|
|
3637
|
+
let r = q.parser?.yy;
|
|
3638
|
+
if (!(r instanceof ie)) throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
|
|
3639
|
+
K(n, r);
|
|
3596
3640
|
}, "parse")
|
|
3597
|
-
},
|
|
3641
|
+
}, ae = /* @__PURE__ */ g((e) => `
|
|
3598
3642
|
.edge {
|
|
3599
3643
|
stroke-width: ${e.archEdgeWidth};
|
|
3600
3644
|
stroke: ${e.archEdgeColor};
|
|
@@ -3625,51 +3669,67 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
3625
3669
|
display: -webkit-box;
|
|
3626
3670
|
-webkit-box-orient: vertical;
|
|
3627
3671
|
}
|
|
3628
|
-
`, "getStyles")
|
|
3672
|
+
`, "getStyles");
|
|
3673
|
+
function J(e, t) {
|
|
3674
|
+
if (e === 0) return t();
|
|
3675
|
+
let n = Math.random, r = e >>> 0;
|
|
3676
|
+
Math.random = function() {
|
|
3677
|
+
r = r + 1831565813 >>> 0;
|
|
3678
|
+
let e = r;
|
|
3679
|
+
return e = Math.imul(e ^ e >>> 15, e | 1), e ^= e + Math.imul(e ^ e >>> 7, e | 61), ((e ^ e >>> 14) >>> 0) / 4294967296;
|
|
3680
|
+
};
|
|
3681
|
+
try {
|
|
3682
|
+
return t();
|
|
3683
|
+
} finally {
|
|
3684
|
+
Math.random = n;
|
|
3685
|
+
}
|
|
3686
|
+
}
|
|
3687
|
+
g(J, "withSeededRandom");
|
|
3688
|
+
var Y = /* @__PURE__ */ g((e) => `<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${e}</g>`, "wrapIcon"), X = {
|
|
3629
3689
|
prefix: "mermaid-architecture",
|
|
3630
3690
|
height: 80,
|
|
3631
3691
|
width: 80,
|
|
3632
3692
|
icons: {
|
|
3633
|
-
database: { body:
|
|
3634
|
-
server: { body:
|
|
3635
|
-
disk: { body:
|
|
3636
|
-
internet: { body:
|
|
3637
|
-
cloud: { body:
|
|
3693
|
+
database: { body: Y("<path id=\"b\" data-name=\"4\" d=\"m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path id=\"c\" data-name=\"3\" d=\"m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path id=\"d\" data-name=\"2\" d=\"m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse id=\"e\" data-name=\"1\" cx=\"40\" cy=\"22.14\" rx=\"20\" ry=\"7.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"20\" y1=\"57.86\" x2=\"20\" y2=\"22.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"60\" y1=\"57.86\" x2=\"60\" y2=\"22.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/>") },
|
|
3694
|
+
server: { body: Y("<rect x=\"17.5\" y=\"17.5\" width=\"45\" height=\"45\" rx=\"2\" ry=\"2\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"17.5\" y1=\"32.5\" x2=\"62.5\" y2=\"32.5\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"17.5\" y1=\"47.5\" x2=\"62.5\" y2=\"47.5\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><g><path d=\"m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: #fff; stroke-width: 0px;\"/><path d=\"m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><path d=\"m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: #fff; stroke-width: 0px;\"/><path d=\"m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><path d=\"m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: #fff; stroke-width: 0px;\"/><path d=\"m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><circle cx=\"32.5\" cy=\"25\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"27.5\" cy=\"25\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"22.5\" cy=\"25\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><circle cx=\"32.5\" cy=\"40\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"27.5\" cy=\"40\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"22.5\" cy=\"40\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><circle cx=\"32.5\" cy=\"55\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"27.5\" cy=\"55\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"22.5\" cy=\"55\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/></g>") },
|
|
3695
|
+
disk: { body: Y("<rect x=\"20\" y=\"15\" width=\"40\" height=\"50\" rx=\"1\" ry=\"1\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"24\" cy=\"19.17\" rx=\".8\" ry=\".83\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"56\" cy=\"19.17\" rx=\".8\" ry=\".83\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"24\" cy=\"60.83\" rx=\".8\" ry=\".83\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"56\" cy=\"60.83\" rx=\".8\" ry=\".83\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"40\" cy=\"33.75\" rx=\"14\" ry=\"14.58\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"40\" cy=\"33.75\" rx=\"4\" ry=\"4.17\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path d=\"m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z\" style=\"fill: #fff; stroke-width: 0px;\"/>") },
|
|
3696
|
+
internet: { body: Y("<circle cx=\"40\" cy=\"40\" r=\"22.5\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"40\" y1=\"17.5\" x2=\"40\" y2=\"62.5\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"17.5\" y1=\"40\" x2=\"62.5\" y2=\"40\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path d=\"m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path d=\"m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"19.75\" y1=\"30.1\" x2=\"60.25\" y2=\"30.1\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"19.75\" y1=\"49.9\" x2=\"60.25\" y2=\"49.9\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/>") },
|
|
3697
|
+
cloud: { body: Y("<path d=\"m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/>") },
|
|
3638
3698
|
unknown: b,
|
|
3639
|
-
blank: { body:
|
|
3699
|
+
blank: { body: Y("") }
|
|
3640
3700
|
}
|
|
3641
|
-
},
|
|
3701
|
+
}, oe = /* @__PURE__ */ g(async function(e, t, n, r) {
|
|
3642
3702
|
let i = n.getConfigField("padding"), a = n.getConfigField("iconSize"), o = a / 2, s = a / 6, c = s / 2;
|
|
3643
3703
|
await Promise.all(t.edges().map(async (t) => {
|
|
3644
|
-
let { source: a, sourceDir: l, sourceArrow: u, sourceGroup: d, target: f, targetDir:
|
|
3645
|
-
if (d && (F(l) ? y += l === "L" ? -E : E : b += l === "T" ? -E : E + 18), g && (F(
|
|
3704
|
+
let { source: a, sourceDir: l, sourceArrow: u, sourceGroup: d, target: f, targetDir: m, targetArrow: h, targetGroup: g, label: v } = U(t), { x: y, y: b } = t[0].sourceEndpoint(), { x, y: S } = t[0].midpoint(), { x: w, y: T } = t[0].targetEndpoint(), E = i + 4;
|
|
3705
|
+
if (d && (F(l) ? y += l === "L" ? -E : E : b += l === "T" ? -E : E + 18), g && (F(m) ? w += m === "L" ? -E : E : T += m === "T" ? -E : E + 18), !d && n.getNode(a)?.type === "junction" && (F(l) ? y += l === "L" ? o : -o : b += l === "T" ? o : -o), !g && n.getNode(f)?.type === "junction" && (F(m) ? w += m === "L" ? o : -o : T += m === "T" ? o : -o), t[0]._private.rscratch) {
|
|
3646
3706
|
let t = e.insert("g");
|
|
3647
|
-
if (t.insert("path").attr("d", `M ${y},${b} L ${x},${
|
|
3707
|
+
if (t.insert("path").attr("d", `M ${y},${b} L ${x},${S} L${w},${T} `).attr("class", "edge").attr("id", `${r}-${_(a, f, { prefix: "L" })}`), u) {
|
|
3648
3708
|
let e = F(l) ? M[l](y, s) : y - c, n = I(l) ? M[l](b, s) : b - c;
|
|
3649
3709
|
t.insert("polygon").attr("points", j[l](s)).attr("transform", `translate(${e},${n})`).attr("class", "arrow");
|
|
3650
3710
|
}
|
|
3651
3711
|
if (h) {
|
|
3652
|
-
let e = F(
|
|
3653
|
-
t.insert("polygon").attr("points", j[
|
|
3712
|
+
let e = F(m) ? M[m](w, s) : w - c, n = I(m) ? M[m](T, s) : T - c;
|
|
3713
|
+
t.insert("polygon").attr("points", j[m](s)).attr("transform", `translate(${e},${n})`).attr("class", "arrow");
|
|
3654
3714
|
}
|
|
3655
3715
|
if (v) {
|
|
3656
|
-
let e = L(l,
|
|
3716
|
+
let e = L(l, m) ? "XY" : F(l) ? "X" : "Y", n = 0;
|
|
3657
3717
|
n = e === "X" ? Math.abs(y - w) : e === "Y" ? Math.abs(b - T) / 1.5 : Math.abs(y - w) / 2;
|
|
3658
3718
|
let r = t.append("g");
|
|
3659
|
-
if (await
|
|
3719
|
+
if (await C(r, v, {
|
|
3660
3720
|
useHtmlLabels: !1,
|
|
3661
3721
|
width: n,
|
|
3662
3722
|
classes: "architecture-service-label"
|
|
3663
|
-
},
|
|
3664
|
-
else if (e === "Y") r.attr("transform", "translate(" + x + ", " +
|
|
3723
|
+
}, p()), r.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), e === "X") r.attr("transform", "translate(" + x + ", " + S + ")");
|
|
3724
|
+
else if (e === "Y") r.attr("transform", "translate(" + x + ", " + S + ") rotate(-90)");
|
|
3665
3725
|
else if (e === "XY") {
|
|
3666
|
-
let e = B(l,
|
|
3726
|
+
let e = B(l, m);
|
|
3667
3727
|
if (e && R(e)) {
|
|
3668
3728
|
let t = r.node().getBoundingClientRect(), [n, i] = ee(e);
|
|
3669
3729
|
r.attr("dominant-baseline", "auto").attr("transform", `rotate(${-1 * n * i * 45})`);
|
|
3670
3730
|
let a = r.node().getBoundingClientRect();
|
|
3671
3731
|
r.attr("transform", `
|
|
3672
|
-
translate(${x}, ${
|
|
3732
|
+
translate(${x}, ${S - t.height / 2})
|
|
3673
3733
|
translate(${n * a.width / 2}, ${i * a.height / 2})
|
|
3674
3734
|
rotate(${-1 * n * i * 45}, 0, ${t.height / 2})
|
|
3675
3735
|
`);
|
|
@@ -3678,58 +3738,58 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
3678
3738
|
}
|
|
3679
3739
|
}
|
|
3680
3740
|
}));
|
|
3681
|
-
}, "drawEdges"),
|
|
3741
|
+
}, "drawEdges"), Z = /* @__PURE__ */ g(async function(e, t, n, r) {
|
|
3682
3742
|
let i = n.getConfigField("padding") * .75, a = n.getConfigField("fontSize"), o = n.getConfigField("iconSize") / 2;
|
|
3683
3743
|
await Promise.all(t.nodes().map(async (t) => {
|
|
3684
|
-
let s =
|
|
3744
|
+
let s = W(t);
|
|
3685
3745
|
if (s.type === "group") {
|
|
3686
3746
|
let { h: c, w: l, x1: u, y1: d } = t.boundingBox(), f = e.append("rect");
|
|
3687
3747
|
f.attr("id", `${r}-group-${s.id}`).attr("x", u + o).attr("y", d + o).attr("width", l).attr("height", c).attr("class", "node-bkg");
|
|
3688
|
-
let
|
|
3748
|
+
let m = e.append("g"), h = u, g = d;
|
|
3689
3749
|
if (s.icon) {
|
|
3690
|
-
let e =
|
|
3691
|
-
e.html(`<g>${await
|
|
3750
|
+
let e = m.append("g");
|
|
3751
|
+
e.html(`<g>${await S(s.icon, {
|
|
3692
3752
|
height: i,
|
|
3693
3753
|
width: i,
|
|
3694
|
-
fallbackPrefix:
|
|
3754
|
+
fallbackPrefix: X.prefix
|
|
3695
3755
|
})}</g>`), e.attr("transform", "translate(" + (h + o + 1) + ", " + (g + o + 1) + ")"), h += i, g += a / 2 - 1 - 2;
|
|
3696
3756
|
}
|
|
3697
3757
|
if (s.label) {
|
|
3698
|
-
let e =
|
|
3699
|
-
await
|
|
3758
|
+
let e = m.append("g");
|
|
3759
|
+
await C(e, s.label, {
|
|
3700
3760
|
useHtmlLabels: !1,
|
|
3701
3761
|
width: l,
|
|
3702
3762
|
classes: "architecture-service-label"
|
|
3703
|
-
},
|
|
3763
|
+
}, p()), e.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "start").attr("text-anchor", "start"), e.attr("transform", "translate(" + (h + o + 4) + ", " + (g + o + 2) + ")");
|
|
3704
3764
|
}
|
|
3705
3765
|
n.setElementForId(s.id, f);
|
|
3706
3766
|
}
|
|
3707
3767
|
}));
|
|
3708
|
-
}, "drawGroups"),
|
|
3709
|
-
let i =
|
|
3768
|
+
}, "drawGroups"), se = /* @__PURE__ */ g(async function(e, t, n, r) {
|
|
3769
|
+
let i = p();
|
|
3710
3770
|
for (let a of n) {
|
|
3711
3771
|
let n = t.append("g"), o = e.getConfigField("iconSize");
|
|
3712
3772
|
if (a.title) {
|
|
3713
3773
|
let e = n.append("g");
|
|
3714
|
-
await
|
|
3774
|
+
await C(e, a.title, {
|
|
3715
3775
|
useHtmlLabels: !1,
|
|
3716
3776
|
width: o * 1.5,
|
|
3717
3777
|
classes: "architecture-service-label"
|
|
3718
3778
|
}, i), e.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), e.attr("transform", "translate(" + o / 2 + ", " + o + ")");
|
|
3719
3779
|
}
|
|
3720
3780
|
let s = n.append("g");
|
|
3721
|
-
if (a.icon) s.html(`<g>${await
|
|
3781
|
+
if (a.icon) s.html(`<g>${await S(a.icon, {
|
|
3722
3782
|
height: o,
|
|
3723
3783
|
width: o,
|
|
3724
|
-
fallbackPrefix:
|
|
3784
|
+
fallbackPrefix: X.prefix
|
|
3725
3785
|
})}</g>`);
|
|
3726
3786
|
else if (a.iconText) {
|
|
3727
|
-
s.html(`<g>${await
|
|
3787
|
+
s.html(`<g>${await S("blank", {
|
|
3728
3788
|
height: o,
|
|
3729
3789
|
width: o,
|
|
3730
|
-
fallbackPrefix:
|
|
3790
|
+
fallbackPrefix: X.prefix
|
|
3731
3791
|
})}</g>`);
|
|
3732
|
-
let e = s.append("g").append("foreignObject").attr("width", o).attr("height", o).append("div").attr("class", "node-icon-text").attr("style", `height: ${o}px;`).append("div").html(
|
|
3792
|
+
let e = s.append("g").append("foreignObject").attr("width", o).attr("height", o).append("div").attr("class", "node-icon-text").attr("style", `height: ${o}px;`).append("div").html(h(a.iconText, i)), t = parseInt(window.getComputedStyle(e.node(), null).getPropertyValue("font-size").replace(/\D/g, "")) ?? 16;
|
|
3733
3793
|
e.attr("style", `-webkit-line-clamp: ${Math.floor((o - 2) / t)};`);
|
|
3734
3794
|
} else s.append("path").attr("class", "node-bkg").attr("id", `${r}-node-${a.id}`).attr("d", `M0,${o} V5 Q0,0 5,0 H${o - 5} Q${o},0 ${o},5 V${o} Z`);
|
|
3735
3795
|
n.attr("id", `${r}-service-${a.id}`).attr("class", "architecture-service");
|
|
@@ -3737,7 +3797,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
3737
3797
|
a.width = c, a.height = l, e.setElementForId(a.id, n);
|
|
3738
3798
|
}
|
|
3739
3799
|
return 0;
|
|
3740
|
-
}, "drawServices"),
|
|
3800
|
+
}, "drawServices"), ce = /* @__PURE__ */ g(function(e, t, n, r) {
|
|
3741
3801
|
n.forEach((n) => {
|
|
3742
3802
|
let i = t.append("g"), a = e.getConfigField("iconSize");
|
|
3743
3803
|
i.append("g").append("rect").attr("id", `${r}-node-${n.id}`).attr("fill-opacity", "0").attr("width", a).attr("height", a), i.attr("class", "architecture-junction");
|
|
@@ -3746,10 +3806,10 @@ var D = /* @__PURE__ */ i(((e, t) => {
|
|
|
3746
3806
|
});
|
|
3747
3807
|
}, "drawJunctions");
|
|
3748
3808
|
x([{
|
|
3749
|
-
name:
|
|
3750
|
-
icons:
|
|
3809
|
+
name: X.prefix,
|
|
3810
|
+
icons: X
|
|
3751
3811
|
}]), E.use(k.default);
|
|
3752
|
-
function
|
|
3812
|
+
function le(e, t, n) {
|
|
3753
3813
|
e.forEach((e) => {
|
|
3754
3814
|
t.add({
|
|
3755
3815
|
group: "nodes",
|
|
@@ -3766,8 +3826,8 @@ function se(e, t, n) {
|
|
|
3766
3826
|
});
|
|
3767
3827
|
});
|
|
3768
3828
|
}
|
|
3769
|
-
|
|
3770
|
-
function
|
|
3829
|
+
g(le, "addServices");
|
|
3830
|
+
function ue(e, t, n) {
|
|
3771
3831
|
e.forEach((e) => {
|
|
3772
3832
|
t.add({
|
|
3773
3833
|
group: "nodes",
|
|
@@ -3782,15 +3842,15 @@ function ce(e, t, n) {
|
|
|
3782
3842
|
});
|
|
3783
3843
|
});
|
|
3784
3844
|
}
|
|
3785
|
-
|
|
3786
|
-
function
|
|
3845
|
+
g(ue, "addJunctions");
|
|
3846
|
+
function de(e, t) {
|
|
3787
3847
|
t.nodes().map((t) => {
|
|
3788
|
-
let n =
|
|
3848
|
+
let n = W(t);
|
|
3789
3849
|
n.type !== "group" && (n.x = t.position().x, n.y = t.position().y, e.getElementById(n.id).attr("transform", "translate(" + (n.x || 0) + "," + (n.y || 0) + ")"));
|
|
3790
3850
|
});
|
|
3791
3851
|
}
|
|
3792
|
-
|
|
3793
|
-
function
|
|
3852
|
+
g(de, "positionNodes");
|
|
3853
|
+
function fe(e, t) {
|
|
3794
3854
|
e.forEach((e) => {
|
|
3795
3855
|
t.add({
|
|
3796
3856
|
group: "nodes",
|
|
@@ -3805,8 +3865,8 @@ function ue(e, t) {
|
|
|
3805
3865
|
});
|
|
3806
3866
|
});
|
|
3807
3867
|
}
|
|
3808
|
-
|
|
3809
|
-
function
|
|
3868
|
+
g(fe, "addGroups");
|
|
3869
|
+
function pe(e, t) {
|
|
3810
3870
|
e.forEach((e) => {
|
|
3811
3871
|
let { lhsId: n, rhsId: r, lhsInto: i, lhsGroup: a, rhsInto: o, lhsDir: s, rhsDir: c, rhsGroup: l, title: u } = e, d = L(e.lhsDir, e.rhsDir) ? "segments" : "straight", f = {
|
|
3812
3872
|
id: `${n}-${r}`,
|
|
@@ -3829,80 +3889,114 @@ function de(e, t) {
|
|
|
3829
3889
|
});
|
|
3830
3890
|
});
|
|
3831
3891
|
}
|
|
3832
|
-
|
|
3833
|
-
function
|
|
3834
|
-
let i = /* @__PURE__ */
|
|
3835
|
-
let
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3892
|
+
g(pe, "addEdges");
|
|
3893
|
+
function me(e, t, n, r = []) {
|
|
3894
|
+
let i = /* @__PURE__ */ g((e, t) => {
|
|
3895
|
+
let r = /* @__PURE__ */ new Map();
|
|
3896
|
+
for (let [i, a] of e.entries()) {
|
|
3897
|
+
let e = `${i}`, o = 0, s = [...a.entries()];
|
|
3898
|
+
if (s.length === 1) {
|
|
3899
|
+
r.set(e, s[0][1]);
|
|
3900
|
+
continue;
|
|
3901
|
+
}
|
|
3902
|
+
for (let i = 0; i < s.length - 1; i++) for (let a = i + 1; a < s.length; a++) {
|
|
3903
|
+
let [c, l] = s[i], [u, d] = s[a];
|
|
3904
|
+
if (n.get(re(c, u)) === t) r.set(e, [
|
|
3905
|
+
...r.get(e) ?? [],
|
|
3906
|
+
...l,
|
|
3907
|
+
...d
|
|
3908
|
+
]);
|
|
3909
|
+
else if (c === "default" || u === "default") r.set(e, [
|
|
3910
|
+
...r.get(e) ?? [],
|
|
3911
|
+
...l,
|
|
3912
|
+
...d
|
|
3913
|
+
]);
|
|
3914
|
+
else {
|
|
3915
|
+
let t = `${e}-${o++}`;
|
|
3916
|
+
r.set(t, l);
|
|
3917
|
+
let n = `${e}-${o++}`;
|
|
3918
|
+
r.set(n, d);
|
|
3919
|
+
}
|
|
3854
3920
|
}
|
|
3855
3921
|
}
|
|
3856
|
-
return
|
|
3857
|
-
},
|
|
3858
|
-
let n =
|
|
3859
|
-
return
|
|
3860
|
-
let o = e.getNode(
|
|
3861
|
-
n
|
|
3922
|
+
return r;
|
|
3923
|
+
}, "flattenAlignments"), [a, o] = t.map((t) => {
|
|
3924
|
+
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
3925
|
+
return t.forEach(([t, i], a) => {
|
|
3926
|
+
let o = e.getNode(a)?.in ?? "default", s = n.get(i) ?? /* @__PURE__ */ new Map();
|
|
3927
|
+
n.has(i) || n.set(i, s);
|
|
3928
|
+
let c = r.get(t) ?? /* @__PURE__ */ new Map();
|
|
3929
|
+
r.has(t) || r.set(t, c);
|
|
3930
|
+
for (let e of [s, c]) {
|
|
3931
|
+
let t = e.get(o) ?? [];
|
|
3932
|
+
e.has(o) || e.set(o, t), t.push(a);
|
|
3933
|
+
}
|
|
3862
3934
|
}), {
|
|
3863
|
-
horiz:
|
|
3864
|
-
vert:
|
|
3935
|
+
horiz: [...i(n, "horizontal").values()].filter((e) => e.length > 1),
|
|
3936
|
+
vert: [...i(r, "vertical").values()].filter((e) => e.length > 1)
|
|
3865
3937
|
};
|
|
3866
|
-
}).reduce(([e, t], { horiz: n, vert: r }) => [[...e, ...n], [...t, ...r]], [[], []]);
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3938
|
+
}).reduce(([e, t], { horiz: n, vert: r }) => [[...e, ...n], [...t, ...r]], [[], []]), s = /* @__PURE__ */ new Set();
|
|
3939
|
+
r.forEach((e) => e.members.forEach((e) => s.add(e)));
|
|
3940
|
+
let c = /* @__PURE__ */ g((e) => e.filter((e) => !e.some((e) => s.has(e))), "dropOverlapping"), l = c(a), u = c(o);
|
|
3941
|
+
return r.forEach((e) => {
|
|
3942
|
+
e.members.length < 2 || (e.direction === "row" ? l.push([...e.members]) : u.push([...e.members]));
|
|
3943
|
+
}), {
|
|
3944
|
+
horizontal: l,
|
|
3945
|
+
vertical: u
|
|
3870
3946
|
};
|
|
3871
3947
|
}
|
|
3872
|
-
|
|
3873
|
-
function
|
|
3874
|
-
let r = [], i =
|
|
3948
|
+
g(me, "getAlignments");
|
|
3949
|
+
function he(e, t, n = []) {
|
|
3950
|
+
let r = [], i = t.getConfigField("iconSize"), a = t.getConfigField("idealEdgeLengthMultiplier"), o = a * i, s = /* @__PURE__ */ new Set();
|
|
3951
|
+
n.forEach((e) => {
|
|
3952
|
+
for (let t = 0; t < e.members.length - 1; t++) {
|
|
3953
|
+
let n = e.members[t], i = e.members[t + 1];
|
|
3954
|
+
s.add(`${n}|${i}`), s.add(`${i}|${n}`), e.direction === "row" ? r.push({
|
|
3955
|
+
left: n,
|
|
3956
|
+
right: i,
|
|
3957
|
+
gap: o
|
|
3958
|
+
}) : r.push({
|
|
3959
|
+
top: n,
|
|
3960
|
+
bottom: i,
|
|
3961
|
+
gap: o
|
|
3962
|
+
});
|
|
3963
|
+
}
|
|
3964
|
+
});
|
|
3965
|
+
let c = /* @__PURE__ */ g((e) => `${e[0]},${e[1]}`, "posToStr"), l = /* @__PURE__ */ g((e) => e.split(",").map((e) => parseInt(e)), "strToPos");
|
|
3875
3966
|
return e.forEach((e) => {
|
|
3876
|
-
let t =
|
|
3967
|
+
let t = new Map([...e.entries()].map(([e, t]) => [c(t), e])), n = [c([0, 0])], o = {}, u = {
|
|
3877
3968
|
L: [-1, 0],
|
|
3878
3969
|
R: [1, 0],
|
|
3879
3970
|
T: [0, 1],
|
|
3880
3971
|
B: [0, -1]
|
|
3881
3972
|
};
|
|
3882
|
-
for (;
|
|
3883
|
-
let e =
|
|
3973
|
+
for (; n.length > 0;) {
|
|
3974
|
+
let e = n.shift();
|
|
3884
3975
|
if (e) {
|
|
3885
|
-
|
|
3886
|
-
let
|
|
3887
|
-
if (
|
|
3888
|
-
let
|
|
3889
|
-
Object.entries(
|
|
3890
|
-
let
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3976
|
+
o[e] = 1;
|
|
3977
|
+
let d = t.get(e);
|
|
3978
|
+
if (d) {
|
|
3979
|
+
let f = l(e);
|
|
3980
|
+
Object.entries(u).forEach(([e, l]) => {
|
|
3981
|
+
let u = c([f[0] + l[0], f[1] + l[1]]), p = t.get(u);
|
|
3982
|
+
if (p && !o[u]) {
|
|
3983
|
+
if (n.push(u), s.has(`${d}|${p}`)) return;
|
|
3984
|
+
r.push({
|
|
3985
|
+
[A[e]]: p,
|
|
3986
|
+
[A[N(e)]]: d,
|
|
3987
|
+
gap: a * i
|
|
3988
|
+
});
|
|
3989
|
+
}
|
|
3896
3990
|
});
|
|
3897
3991
|
}
|
|
3898
3992
|
}
|
|
3899
3993
|
}
|
|
3900
3994
|
}), r;
|
|
3901
3995
|
}
|
|
3902
|
-
|
|
3903
|
-
function
|
|
3904
|
-
return new Promise((
|
|
3905
|
-
let
|
|
3996
|
+
g(he, "getRelativeConstraints");
|
|
3997
|
+
function ge(e, r, i, a, o, { spatialMaps: s, groupAlignments: c }) {
|
|
3998
|
+
return new Promise((l) => {
|
|
3999
|
+
let u = n("body").append("div").attr("id", "cy").attr("style", "display:none"), d = E({
|
|
3906
4000
|
container: document.getElementById("cy"),
|
|
3907
4001
|
style: [
|
|
3908
4002
|
{
|
|
@@ -3937,7 +4031,7 @@ function me(r, i, a, o, s, { spatialMaps: c, groupAlignments: l }) {
|
|
|
3937
4031
|
style: {
|
|
3938
4032
|
"text-valign": "bottom",
|
|
3939
4033
|
"text-halign": "center",
|
|
3940
|
-
"font-size": `${
|
|
4034
|
+
"font-size": `${o.getConfigField("fontSize")}px`
|
|
3941
4035
|
}
|
|
3942
4036
|
},
|
|
3943
4037
|
{
|
|
@@ -3957,7 +4051,7 @@ function me(r, i, a, o, s, { spatialMaps: c, groupAlignments: l }) {
|
|
|
3957
4051
|
},
|
|
3958
4052
|
{
|
|
3959
4053
|
selector: ".node-group",
|
|
3960
|
-
style: { padding: `${
|
|
4054
|
+
style: { padding: `${o.getConfigField("padding")}px` }
|
|
3961
4055
|
}
|
|
3962
4056
|
],
|
|
3963
4057
|
layout: {
|
|
@@ -3970,28 +4064,28 @@ function me(r, i, a, o, s, { spatialMaps: c, groupAlignments: l }) {
|
|
|
3970
4064
|
}
|
|
3971
4065
|
}
|
|
3972
4066
|
});
|
|
3973
|
-
|
|
3974
|
-
let p =
|
|
4067
|
+
u.remove(), fe(i, d), le(e, d, o), ue(r, d, o), pe(a, d);
|
|
4068
|
+
let f = o.getLayoutHints(), p = me(o, s, c, f), m = he(s, o, f), h = o.getConfigField("iconSize"), _ = o.getConfigField("idealEdgeLengthMultiplier") * h, v = .5 * h, y = o.getConfigField("edgeElasticity"), b = o.getConfigField("seed"), x = d.layout({
|
|
3975
4069
|
name: "fcose",
|
|
3976
4070
|
quality: "proof",
|
|
3977
|
-
randomize:
|
|
3978
|
-
nodeSeparation:
|
|
3979
|
-
numIter:
|
|
4071
|
+
randomize: o.getConfigField("randomize"),
|
|
4072
|
+
nodeSeparation: o.getConfigField("nodeSeparation"),
|
|
4073
|
+
numIter: o.getConfigField("numIter"),
|
|
3980
4074
|
styleEnabled: !1,
|
|
3981
4075
|
animate: !1,
|
|
3982
4076
|
nodeDimensionsIncludeLabels: !1,
|
|
3983
4077
|
idealEdgeLength(e) {
|
|
3984
|
-
let [t, n] = e.connectedNodes(), { parent: r } =
|
|
3985
|
-
return r === i ?
|
|
4078
|
+
let [t, n] = e.connectedNodes(), { parent: r } = W(t), { parent: i } = W(n);
|
|
4079
|
+
return r === i ? _ : v;
|
|
3986
4080
|
},
|
|
3987
4081
|
edgeElasticity(e) {
|
|
3988
|
-
let [t, n] = e.connectedNodes(), { parent: r } =
|
|
3989
|
-
return r === i ?
|
|
4082
|
+
let [t, n] = e.connectedNodes(), { parent: r } = W(t), { parent: i } = W(n);
|
|
4083
|
+
return r === i ? y : .001;
|
|
3990
4084
|
},
|
|
3991
4085
|
alignmentConstraint: p,
|
|
3992
4086
|
relativePlacementConstraint: m
|
|
3993
4087
|
});
|
|
3994
|
-
|
|
4088
|
+
x.one("layoutstop", () => {
|
|
3995
4089
|
function e(e, t, n, r) {
|
|
3996
4090
|
let i, a, { x: o, y: s } = e, { x: c, y: l } = t;
|
|
3997
4091
|
a = (r - s + (o - n) * (s - l) / (o - c)) / Math.sqrt(1 + ((s - l) / (o - c)) ** 2), i = Math.sqrt((r - s) ** 2 + (n - o) ** 2 - a ** 2);
|
|
@@ -4002,57 +4096,59 @@ function me(r, i, a, o, s, { spatialMaps: c, groupAlignments: l }) {
|
|
|
4002
4096
|
case d >= 0:
|
|
4003
4097
|
d = 1;
|
|
4004
4098
|
break;
|
|
4005
|
-
case d < 0:
|
|
4006
|
-
d = -1;
|
|
4007
|
-
break;
|
|
4099
|
+
case d < 0: d = -1;
|
|
4008
4100
|
}
|
|
4009
4101
|
let f = (c - o) * (n - o) + (l - s) * (r - s);
|
|
4010
4102
|
switch (!0) {
|
|
4011
4103
|
case f >= 0:
|
|
4012
4104
|
f = 1;
|
|
4013
4105
|
break;
|
|
4014
|
-
case f < 0:
|
|
4015
|
-
f = -1;
|
|
4016
|
-
break;
|
|
4106
|
+
case f < 0: f = -1;
|
|
4017
4107
|
}
|
|
4018
4108
|
return a = Math.abs(a) * d, i *= f, {
|
|
4019
4109
|
distances: a,
|
|
4020
4110
|
weights: i
|
|
4021
4111
|
};
|
|
4022
4112
|
}
|
|
4023
|
-
|
|
4024
|
-
for (let t of Object.values(
|
|
4113
|
+
g(e, "getSegmentWeights"), d.startBatch();
|
|
4114
|
+
for (let t of Object.values(d.edges())) if (t.data?.()) {
|
|
4025
4115
|
let { x: n, y: r } = t.source().position(), { x: i, y: a } = t.target().position();
|
|
4026
4116
|
if (n !== i && r !== a) {
|
|
4027
|
-
let n = t.sourceEndpoint(), r = t.targetEndpoint(), { sourceDir: i } =
|
|
4117
|
+
let n = t.sourceEndpoint(), r = t.targetEndpoint(), { sourceDir: i } = U(t), [a, o] = I(i) ? [n.x, r.y] : [r.x, n.y], { weights: s, distances: c } = e(n, r, a, o);
|
|
4028
4118
|
t.style("segment-distances", c), t.style("segment-weights", s);
|
|
4029
4119
|
}
|
|
4030
4120
|
}
|
|
4031
|
-
|
|
4032
|
-
})
|
|
4033
|
-
|
|
4121
|
+
d.endBatch(), J(b, () => x.run());
|
|
4122
|
+
});
|
|
4123
|
+
try {
|
|
4124
|
+
J(b, () => x.run());
|
|
4125
|
+
} catch (e) {
|
|
4126
|
+
throw e instanceof RangeError && e.message.includes("Invalid array length") ? Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis.") : e;
|
|
4127
|
+
}
|
|
4128
|
+
d.ready((e) => {
|
|
4129
|
+
t.info("Ready", e), l(d);
|
|
4034
4130
|
});
|
|
4035
4131
|
});
|
|
4036
4132
|
}
|
|
4037
|
-
|
|
4038
|
-
var
|
|
4039
|
-
parser:
|
|
4133
|
+
g(ge, "layoutArchitecture");
|
|
4134
|
+
var _e = {
|
|
4135
|
+
parser: q,
|
|
4040
4136
|
get db() {
|
|
4041
|
-
return new
|
|
4137
|
+
return new ie();
|
|
4042
4138
|
},
|
|
4043
|
-
renderer: { draw: /* @__PURE__ */
|
|
4139
|
+
renderer: { draw: /* @__PURE__ */ g(async (e, t, n, r) => {
|
|
4044
4140
|
let i = r.db;
|
|
4045
4141
|
i.setDiagramId(t);
|
|
4046
|
-
let
|
|
4142
|
+
let o = i.getServices(), s = i.getJunctions(), c = i.getGroups(), l = i.getEdges(), u = i.getDataStructures(), d = y(t), f = d.append("g");
|
|
4047
4143
|
f.attr("class", "architecture-edges");
|
|
4048
4144
|
let p = d.append("g");
|
|
4049
4145
|
p.attr("class", "architecture-services");
|
|
4050
4146
|
let m = d.append("g");
|
|
4051
|
-
m.attr("class", "architecture-groups"), await
|
|
4052
|
-
let h = await
|
|
4053
|
-
await
|
|
4147
|
+
m.attr("class", "architecture-groups"), await se(i, p, o, t), ce(i, p, s, t);
|
|
4148
|
+
let h = await ge(o, s, c, l, i, u);
|
|
4149
|
+
await oe(f, h, i, t), await Z(m, h, i, t), de(i, h), a(void 0, d, i.getConfigField("padding"), i.getConfigField("useMaxWidth"));
|
|
4054
4150
|
}, "draw") },
|
|
4055
|
-
styles:
|
|
4151
|
+
styles: ae
|
|
4056
4152
|
};
|
|
4057
4153
|
//#endregion
|
|
4058
|
-
export {
|
|
4154
|
+
export { _e as diagram };
|