@yaoshu-ai/ai-chat 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +448 -0
- package/dist/1.png +0 -0
- package/dist/2.png +0 -0
- package/dist/RenderContent-Dlqka7tn.js +33786 -0
- package/dist/__vite-optional-peer-dep_stream-monaco_markstream-vue_false-HdL4xm5U.js +5 -0
- package/dist/__vite-optional-peer-dep_vue-i18n_markstream-vue_false-B9Pwe5kz.js +5 -0
- package/dist/_arrayEach-CWzCztxB.js +44 -0
- package/dist/abap-Y8Dl9g_6.js +6 -0
- package/dist/actionscript-3-DQVEcJUW.js +6 -0
- package/dist/ada-vP6ak0IW.js +6 -0
- package/dist/ai-chat.css +1 -0
- package/dist/andromeeda-BbmzSJq1.js +4 -0
- package/dist/angular-html-DPB4Rf0C.js +32 -0
- package/dist/angular-ts-CTOR2ofC.js +21 -0
- package/dist/apache-BUjz-sD2.js +6 -0
- package/dist/apex-OyTfjCYK.js +6 -0
- package/dist/apl-CjNiDgad.js +16 -0
- package/dist/applescript-BPx7YFFu.js +6 -0
- package/dist/ara-Z2fSOxSw.js +6 -0
- package/dist/arc-B1p3jPmf.js +83 -0
- package/dist/architecture-U656AL7Q-BbBZWZnv.js +5 -0
- package/dist/architectureDiagram-VXUJARFQ-o3qI6Hfe.js +4662 -0
- package/dist/asciidoc-C1T9ziH6.js +6 -0
- package/dist/asm-BTWLY5ym.js +6 -0
- package/dist/assets/_basePickBy-Cpv34cvw.js +151 -0
- package/dist/assets/_baseUniq-DcdXmdC4.js +614 -0
- package/dist/assets/arc-B0v8Xerj.js +83 -0
- package/dist/assets/architectureDiagram-VXUJARFQ-CuYvJnXX.js +4662 -0
- package/dist/assets/blockDiagram-VD42YOAC-BxZitMjG.js +2262 -0
- package/dist/assets/c4Diagram-YG6GDRKO-ZsN99P-D.js +1580 -0
- package/dist/assets/channel-d_ygJPeO.js +5 -0
- package/dist/assets/chunk-4BX2VUAB-96IoYLlF.js +8 -0
- package/dist/assets/chunk-55IACEB6-gENcR4HP.js +8 -0
- package/dist/assets/chunk-B4BG7PRW-BOypo6sC.js +1375 -0
- package/dist/assets/chunk-DI55MBZ5-DHEKLVmM.js +1370 -0
- package/dist/assets/chunk-FMBD7UC4-CZ-mW5Zk.js +19 -0
- package/dist/assets/chunk-QN33PNHL-BeoL9V94.js +19 -0
- package/dist/assets/chunk-QZHKN3VN-DedBAq5I.js +15 -0
- package/dist/assets/chunk-TZMSLE5B-Bg9wRIeU.js +64 -0
- package/dist/assets/classDiagram-2ON5EDUG-OqXlgyvI.js +19 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-OqXlgyvI.js +19 -0
- package/dist/assets/clone-D3-moMc7.js +8 -0
- package/dist/assets/cose-bilkent-S5V4N54A-CrU20ri2.js +2607 -0
- package/dist/assets/cytoscape.esm-DfdJODL8.js +18735 -0
- package/dist/assets/dagre-6UL2VRFP-BMNAUhAh.js +444 -0
- package/dist/assets/defaultLocale-57BWB7pV.js +171 -0
- package/dist/assets/diagram-PSM6KHXK-DDXdcx9h.js +535 -0
- package/dist/assets/diagram-QEK2KX5R-DaOkv31-.js +220 -0
- package/dist/assets/diagram-S2PKOQOG-Kk0nHneV.js +145 -0
- package/dist/assets/erDiagram-Q2GNP2WA-DVKOxqjl.js +841 -0
- package/dist/assets/flowDiagram-NV44I4VS-BoWYkdqy.js +1620 -0
- package/dist/assets/ganttDiagram-LVOFAZNH-Dvgzms7S.js +2500 -0
- package/dist/assets/gitGraphDiagram-NY62KEGX-Bna3uwG8.js +702 -0
- package/dist/assets/graph-BLzmbjIy.js +247 -0
- package/dist/assets/infoDiagram-ER5ION4S-Did3mqZL.js +27 -0
- package/dist/assets/init-DjUOC4st.js +16 -0
- package/dist/assets/journeyDiagram-XKPGCS4Q-C3BPCBal.js +834 -0
- package/dist/assets/kanban-definition-3W4ZIXB7-Cf5SUn-1.js +719 -0
- package/dist/assets/katex-SsTUIUTC.js +11688 -0
- package/dist/assets/layout-B00gooay.js +1335 -0
- package/dist/assets/linear-DVxTWzAi.js +259 -0
- package/dist/assets/mindmap-definition-VGOIOE7T-Q-_IrD51.js +785 -0
- package/dist/assets/ordinal-DfAQgscy.js +61 -0
- package/dist/assets/pieDiagram-ADFJNKIX-LygDPC1s.js +165 -0
- package/dist/assets/quadrantDiagram-AYHSOK5B-77SStCdg.js +1024 -0
- package/dist/assets/requirementDiagram-UZGBJVZJ-CMlgwZi9.js +850 -0
- package/dist/assets/sankeyDiagram-TZEHDZUN-DnlAgtvb.js +811 -0
- package/dist/assets/sequenceDiagram-WL72ISMW-Cf4BDgIS.js +2511 -0
- package/dist/assets/stateDiagram-FKZM4ZOC-CBGqngi4.js +267 -0
- package/dist/assets/stateDiagram-v2-4FDKWEC3-BZTJjZnO.js +18 -0
- package/dist/assets/timeline-definition-IT6M3QCI-DVwyHSfZ.js +795 -0
- package/dist/assets/treemap-KMMF4GRG-Bx903ckh.js +12994 -0
- package/dist/assets/xychartDiagram-PRI3JC2R-pvSCMiXN.js +1341 -0
- package/dist/astro-CFFExE8Q.js +18 -0
- package/dist/aurora-x-BwoVEUWZ.js +4 -0
- package/dist/awk-Fb0P9dkn.js +6 -0
- package/dist/ayu-dark-DJoqd4M9.js +4 -0
- package/dist/ayu-light-BzXEJRJ-.js +4 -0
- package/dist/ayu-mirage-BJ2oZGzi.js +4 -0
- package/dist/ballerina-oZK-YekG.js +6 -0
- package/dist/bat-0FvbqU9S.js +6 -0
- package/dist/beancount-DqJEb89h.js +6 -0
- package/dist/berry-DODBq_Ff.js +6 -0
- package/dist/bibtex-EULQRLY5.js +6 -0
- package/dist/bicep-BorU73w0.js +6 -0
- package/dist/bird2-CraR6qSn.js +6 -0
- package/dist/blade-D0HyNvCw.js +20 -0
- package/dist/blockDiagram-VD42YOAC-DahK-Cj4.js +2364 -0
- package/dist/bsl-NkNNwerW.js +8 -0
- package/dist/c-eeMepfLm.js +6 -0
- package/dist/c3-BY5XW5ym.js +6 -0
- package/dist/c4Diagram-YG6GDRKO-DEyHjCYx.js +1580 -0
- package/dist/cadence-02UX7mW8.js +6 -0
- package/dist/cairo-DM6WF2e3.js +8 -0
- package/dist/catppuccin-frappe-D3cH2rXe.js +4 -0
- package/dist/catppuccin-latte-C0LRGUW4.js +4 -0
- package/dist/catppuccin-macchiato-c5wQ11TT.js +4 -0
- package/dist/catppuccin-mocha-WMD6Qvya.js +4 -0
- package/dist/channel-3keaKHdb.js +5 -0
- package/dist/chunk-4BX2VUAB-DAiVtoK8.js +8 -0
- package/dist/chunk-55IACEB6-CaBF4LGk.js +8 -0
- package/dist/chunk-B4BG7PRW-BRwDg4Nv.js +1375 -0
- package/dist/chunk-DI55MBZ5-DSCddmFg.js +1370 -0
- package/dist/chunk-FMBD7UC4-DeD5V5dF.js +19 -0
- package/dist/chunk-QN33PNHL-DtsdNsBa.js +19 -0
- package/dist/chunk-QZHKN3VN-BjOYbdQP.js +15 -0
- package/dist/chunk-TZMSLE5B-BwhJBSuO.js +64 -0
- package/dist/clarity-PKm5CwqM.js +6 -0
- package/dist/classDiagram-2ON5EDUG-C0IaF0ZL.js +16 -0
- package/dist/classDiagram-v2-WZHVMYZB-C0IaF0ZL.js +16 -0
- package/dist/clojure-CXJfHrL3.js +6 -0
- package/dist/cmake-BJz8BOTU.js +6 -0
- package/dist/cobol-DBolczTz.js +10 -0
- package/dist/codeowners-Bt9yU6NX.js +6 -0
- package/dist/codeql-DHkodjjI.js +6 -0
- package/dist/coffee-DGBR_nr_.js +8 -0
- package/dist/common-lisp-EVqT9Zhp.js +6 -0
- package/dist/coq-B0L9upzn.js +6 -0
- package/dist/cose-bilkent-S5V4N54A-CRxUs4km.js +2609 -0
- package/dist/cpp-Cj177cuW.js +18 -0
- package/dist/crystal-CRJyc4G-.js +18 -0
- package/dist/csharp-CCgA4A09.js +6 -0
- package/dist/css-CECN5uSL.js +6 -0
- package/dist/csv-CmYOceLb.js +6 -0
- package/dist/cue-ZzumE7IT.js +6 -0
- package/dist/cypher-jpdmjtA6.js +6 -0
- package/dist/cytoscape.esm-DfdJODL8.js +18735 -0
- package/dist/d-CBagWSwH.js +6 -0
- package/dist/d2_markstream-vue_false-BfRvcluz.js +5 -0
- package/dist/dagre-6UL2VRFP-dTDl1Tgv.js +442 -0
- package/dist/dark-plus-pUHDTVV0.js +4 -0
- package/dist/dart-6ObCrKr9.js +6 -0
- package/dist/dax-CcDT-8dH.js +6 -0
- package/dist/defaultLocale-D7EN2tov.js +171 -0
- package/dist/desktop-B93p9R9O.js +6 -0
- package/dist/diagram-PSM6KHXK-Dh-BBqVQ.js +531 -0
- package/dist/diagram-QEK2KX5R-CPqYwhdb.js +217 -0
- package/dist/diagram-S2PKOQOG-CapIa3n7.js +142 -0
- package/dist/diff-BxzP2J8R.js +6 -0
- package/dist/docker-CsHqm9tx.js +6 -0
- package/dist/dotenv-BMjVjUL1.js +6 -0
- package/dist/dracula-BtZx2Kac.js +4 -0
- package/dist/dracula-soft-BKa-aqBv.js +4 -0
- package/dist/dream-maker-PAx17jaB.js +6 -0
- package/dist/echarts-gl.min.js +1 -0
- package/dist/echarts.min.js +46 -0
- package/dist/edge-BYQkOzbF.js +12 -0
- package/dist/elixir-Dh036GMp.js +8 -0
- package/dist/elm-BtNbw_Cd.js +8 -0
- package/dist/emacs-lisp-Cfxdx5D-.js +6 -0
- package/dist/erDiagram-Q2GNP2WA-B8d80SOq.js +841 -0
- package/dist/erb-ScVOXVpH.js +10 -0
- package/dist/erlang-DNcDT8Hi.js +8 -0
- package/dist/everforest-dark-DMCBqXCK.js +4 -0
- package/dist/everforest-light-BbXl82Em.js +4 -0
- package/dist/favicon.svg +1 -0
- package/dist/fennel-N4WcXuKx.js +6 -0
- package/dist/fish-BTDEUgqH.js +6 -0
- package/dist/flowDiagram-NV44I4VS-Wtd6x8Dz.js +1620 -0
- package/dist/fluent-BMXUxfv1.js +6 -0
- package/dist/fortran-fixed-form-B67KFkXH.js +8 -0
- package/dist/fortran-free-form-CwqYvCLJ.js +6 -0
- package/dist/fsharp-CYOiIVNx.js +8 -0
- package/dist/ganttDiagram-LVOFAZNH-PIGXq8YG.js +2506 -0
- package/dist/gdresource-CvCIUjhi.js +10 -0
- package/dist/gdscript-DSAxJ_aS.js +6 -0
- package/dist/gdshader-Bk8fF6yr.js +6 -0
- package/dist/genie-DzUvd7U9.js +6 -0
- package/dist/geo.json +1 -0
- package/dist/gherkin-DHRaV0YP.js +6 -0
- package/dist/git-commit-Bd32YZ0K.js +8 -0
- package/dist/git-rebase-ZWUFO_T4.js +8 -0
- package/dist/gitGraph-F6HP7TQM-CIGXYS91.js +5 -0
- package/dist/gitGraphDiagram-NY62KEGX-BDnzMpYT.js +699 -0
- package/dist/github-dark-DenFmJkN.js +4 -0
- package/dist/github-dark-default-BJPUVz4H.js +4 -0
- package/dist/github-dark-dimmed-DUshB20C.js +4 -0
- package/dist/github-dark-high-contrast-D3aGCnF8.js +4 -0
- package/dist/github-light-JYsPkUQd.js +4 -0
- package/dist/github-light-default-D99KPAby.js +4 -0
- package/dist/github-light-high-contrast-BbmZE-Mp.js +4 -0
- package/dist/gleam-Bv284lvN.js +6 -0
- package/dist/glimmer-js-DkxNrfPT.js +14 -0
- package/dist/glimmer-ts-D6YZEmK_.js +14 -0
- package/dist/glsl-CkUcVZNK.js +8 -0
- package/dist/gn-XtJxiLa4.js +6 -0
- package/dist/gnuplot-yPG9-sE_.js +6 -0
- package/dist/go-CvFNMTvu.js +6 -0
- package/dist/graph-BJDrjORS.js +244 -0
- package/dist/graphql-CBu2ehBn.js +14 -0
- package/dist/groovy-CJQTphOW.js +6 -0
- package/dist/gruvbox-dark-hard-C5HOtKIh.js +4 -0
- package/dist/gruvbox-dark-medium-FVgwJHuz.js +4 -0
- package/dist/gruvbox-dark-soft-B46F314v.js +4 -0
- package/dist/gruvbox-light-hard-CJD38wDZ.js +4 -0
- package/dist/gruvbox-light-medium-BlIhMYTA.js +4 -0
- package/dist/gruvbox-light-soft-DoPHyLVZ.js +4 -0
- package/dist/hack-ItRNKiEb.js +10 -0
- package/dist/haml-NZLVzu_R.js +10 -0
- package/dist/handlebars-mxStpSE7.js +14 -0
- package/dist/haskell-WeIwNIP6.js +6 -0
- package/dist/haxe-TztHsm5T.js +6 -0
- package/dist/hcl-D438OF-I.js +6 -0
- package/dist/hjson-DYBUbqOl.js +6 -0
- package/dist/hlsl-Bk8TCZNL.js +6 -0
- package/dist/horizon-CJQ10nlf.js +4 -0
- package/dist/horizon-bright-2WzHy-Vo.js +4 -0
- package/dist/houston-BDYrDoDW.js +4 -0
- package/dist/html-B50bmoVb.js +10 -0
- package/dist/html-derivative-C6bxFbFW.js +8 -0
- package/dist/http-DLvAkeD-.js +14 -0
- package/dist/hurl-CgkFN90t.js +12 -0
- package/dist/hxml-GbqSQCLa.js +8 -0
- package/dist/hy-Brt5EZ7-.js +6 -0
- package/dist/imba-CimUv-Uh.js +6 -0
- package/dist/index-C8Q6O4II.js +513 -0
- package/dist/index-DAiOgSvo.js +10210 -0
- package/dist/index-qjiatRMM.js +74370 -0
- package/dist/index.es.js +12 -0
- package/dist/index2-Pjnp80bi.js +70 -0
- package/dist/index3-Bhg7Q86T.js +70 -0
- package/dist/index4-5xarPQV7.js +544 -0
- package/dist/index5-DYxqqGmv.js +592 -0
- package/dist/index6-DXyezjvJ.js +196 -0
- package/dist/index7-IFig1gg1.js +217 -0
- package/dist/info-NVLQJR56-CFDwNFH-.js +5 -0
- package/dist/infoDiagram-ER5ION4S-ClOwLtgG.js +24 -0
- package/dist/infographic_markstream-vue_false-BfsmcXxk.js +5 -0
- package/dist/ini-BZIuRIvJ.js +6 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/java-DY6VlHhP.js +6 -0
- package/dist/javascript-C25yR2R2.js +6 -0
- package/dist/jinja-CFW5uAwY.js +11 -0
- package/dist/jison-DdreslRX.js +8 -0
- package/dist/journeyDiagram-XKPGCS4Q-_UZpi048.js +834 -0
- package/dist/json-DxJze_jm.js +6 -0
- package/dist/json5-BT4Fjg39.js +6 -0
- package/dist/jsonc-CHjZD8gR.js +6 -0
- package/dist/jsonl-BGuvDmy9.js +6 -0
- package/dist/jsonnet-Bx2cfsXg.js +6 -0
- package/dist/jssm-BcADi6EI.js +6 -0
- package/dist/jsx-BtKADgXT.js +6 -0
- package/dist/julia-CZiKXNNP.js +16 -0
- package/dist/just-CEK2SJ_k.js +18 -0
- package/dist/kanagawa-dragon-CiKur4Hl.js +4 -0
- package/dist/kanagawa-lotus-BKu-smKu.js +4 -0
- package/dist/kanagawa-wave-CQwozSzG.js +4 -0
- package/dist/kanban-definition-3W4ZIXB7-Cutzg6yp.js +719 -0
- package/dist/katex-SsTUIUTC.js +11688 -0
- package/dist/kdl-BNOv9TC3.js +6 -0
- package/dist/kotlin-ByBMgTeR.js +6 -0
- package/dist/kusto-DH_XitHS.js +6 -0
- package/dist/languageIconExtended-OLNeqZ3A.js +119 -0
- package/dist/laserwave-6a00oqik.js +4 -0
- package/dist/latex-B8Egmqc5.js +8 -0
- package/dist/layout-PTzgkkQP.js +1223 -0
- package/dist/lean-BnVxaZxY.js +6 -0
- package/dist/less-B1GLI2Di.js +6 -0
- package/dist/light-plus-CZuVqSLX.js +4 -0
- package/dist/linear-Bye2JJhy.js +259 -0
- package/dist/liquid-CHzkx3jT.js +14 -0
- package/dist/llvm-Bk2XctFf.js +6 -0
- package/dist/log-Al8wyEFV.js +6 -0
- package/dist/logo-DBa4JDzV.js +6 -0
- package/dist/lua-Bp3IRv7I.js +8 -0
- package/dist/luau-UQyhudEE.js +6 -0
- package/dist/make-CsMclxtr.js +6 -0
- package/dist/markdown-CrScaQ96.js +6 -0
- package/dist/marko-CJBA24Ri.js +14 -0
- package/dist/material-theme-D6KBX41T.js +4 -0
- package/dist/material-theme-darker-CkRroheE.js +4 -0
- package/dist/material-theme-lighter-BUBw43Yz.js +4 -0
- package/dist/material-theme-ocean-ClGX14Ja.js +4 -0
- package/dist/material-theme-palenight-C1RVm8K1.js +4 -0
- package/dist/matlab-BOAaUVP0.js +6 -0
- package/dist/mdc-C9YSUwVC.js +12 -0
- package/dist/mdx-BOhZZUJ8.js +6 -0
- package/dist/mermaid-C3rz4dYh.js +6 -0
- package/dist/mermaid-parser.core-C86xHHvY.js +13249 -0
- package/dist/mermaid.core-BIhT9VUC.js +14709 -0
- package/dist/mhchem-XHl7cef5.js +2306 -0
- package/dist/min-dark-C7ak0t6c.js +4 -0
- package/dist/min-light-CKFxVcPp.js +4 -0
- package/dist/mindmap-definition-VGOIOE7T-l17eTXZb.js +784 -0
- package/dist/mipsasm-CTx18fBl.js +6 -0
- package/dist/mojo-EIZIZRTQ.js +6 -0
- package/dist/monokai-C1KBYcO0.js +4 -0
- package/dist/moonbit-B1TV0fG3.js +6 -0
- package/dist/move-Db4ltDq1.js +6 -0
- package/dist/narrat-DmhDCBs-.js +6 -0
- package/dist/nextflow-47kAzSl1.js +8 -0
- package/dist/nextflow-groovy-Drz_2V0j.js +6 -0
- package/dist/nginx-D7O4WoB1.js +8 -0
- package/dist/night-owl-Bm2rzalh.js +4 -0
- package/dist/night-owl-light-CBI5u5kw.js +4 -0
- package/dist/nim-QAjRdh9w.js +20 -0
- package/dist/nix-fTRXMGic.js +9 -0
- package/dist/nord-CC5OiUXg.js +4 -0
- package/dist/nushell-BGCPRlV5.js +6 -0
- package/dist/objective-c-Itk8tzmv.js +6 -0
- package/dist/objective-cpp-DGt5UKRO.js +6 -0
- package/dist/ocaml-eSVK32Eg.js +6 -0
- package/dist/odin-BItnF517.js +6 -0
- package/dist/one-dark-pro-DTA3VF0_.js +4 -0
- package/dist/one-light-LkMrt1Cf.js +4 -0
- package/dist/openscad-Sp5uZ6f2.js +6 -0
- package/dist/ordinal-DfAQgscy.js +61 -0
- package/dist/packet-BFZMPI3H-c2t_1f8D.js +5 -0
- package/dist/pascal-xy8pJNns.js +6 -0
- package/dist/perl-DkVrgJBg.js +16 -0
- package/dist/php-BIzsF_5x.js +18 -0
- package/dist/pie-7BOR55EZ-CVvzPUU7.js +5 -0
- package/dist/pieDiagram-ADFJNKIX-C01Py6L8.js +161 -0
- package/dist/pkl-C-zSNmaA.js +6 -0
- package/dist/plastic-CSTz3KZp.js +4 -0
- package/dist/plsql-pVbGZfOv.js +6 -0
- package/dist/po-BNfHvqmm.js +6 -0
- package/dist/poimandres-C-VADXHD.js +4 -0
- package/dist/polar-CAZahv3u.js +6 -0
- package/dist/postcss-05aHdL-n.js +6 -0
- package/dist/powerquery-DI9HkTvs.js +6 -0
- package/dist/powershell-Clc4ydu-.js +6 -0
- package/dist/prisma-FZjmVtSl.js +6 -0
- package/dist/prolog-C5-yg4TO.js +6 -0
- package/dist/proto-C7QgialS.js +6 -0
- package/dist/pug-XOw9Q1Ho.js +12 -0
- package/dist/puppet-CUJHmnxV.js +6 -0
- package/dist/purescript-rUfGld-4.js +6 -0
- package/dist/python-BFNSHbwJ.js +6 -0
- package/dist/qml-rTNXsquU.js +8 -0
- package/dist/qmldir-BInDYbpo.js +6 -0
- package/dist/qss-AeJTysr_.js +6 -0
- package/dist/quadrantDiagram-AYHSOK5B-sypB1aPG.js +1022 -0
- package/dist/r-CSmzDPi7.js +6 -0
- package/dist/racket-B83wSAja.js +6 -0
- package/dist/radar-NHE76QYJ-GJjAzk_L.js +5 -0
- package/dist/raku-nEQ4ZJJ7.js +6 -0
- package/dist/razor-Ci8D0dQK.js +10 -0
- package/dist/red-7y8PH7HH.js +4 -0
- package/dist/reg-m_s_Kiip.js +6 -0
- package/dist/regexp-BazyLpPg.js +6 -0
- package/dist/rel-BcRfyd6Q.js +6 -0
- package/dist/requirementDiagram-UZGBJVZJ-Cs95WEDy.js +850 -0
- package/dist/riscv-Ce8MAQLP.js +6 -0
- package/dist/ron-DCEEQypA.js +6 -0
- package/dist/rose-pine-BKc3yVeu.js +4 -0
- package/dist/rose-pine-dawn-BulJcPZT.js +4 -0
- package/dist/rose-pine-moon-j6jiXKV8.js +4 -0
- package/dist/rosmsg-Cz0w1km8.js +6 -0
- package/dist/rst-DM32Wy3O.js +22 -0
- package/dist/ruby-BeqCs27h.js +30 -0
- package/dist/rust-CLzF9zIN.js +6 -0
- package/dist/safeRaf-I3a3-dyJ.js +10 -0
- package/dist/sankeyDiagram-TZEHDZUN-BN3bNFt9.js +810 -0
- package/dist/sas-fpEvgATw.js +8 -0
- package/dist/sass-DxHp5rTx.js +6 -0
- package/dist/scala-D4grkFkl.js +6 -0
- package/dist/scheme-BCRWuEm4.js +6 -0
- package/dist/scss-B1FaCqwR.js +8 -0
- package/dist/sdbl-B7T8abf4.js +6 -0
- package/dist/sequenceDiagram-WL72ISMW-CZ6inTco.js +2511 -0
- package/dist/shaderlab-Cr62-Wb4.js +8 -0
- package/dist/shellscript-InADTalH.js +6 -0
- package/dist/shellsession-DiDJNQdy.js +8 -0
- package/dist/slack-dark-i7wN4OET.js +4 -0
- package/dist/slack-ochin-ndHf0LoP.js +4 -0
- package/dist/smalltalk-BlI1_OkM.js +6 -0
- package/dist/snazzy-light-BlSJXAu4.js +4 -0
- package/dist/solarized-dark-UTmkh7lw.js +4 -0
- package/dist/solarized-light-BheCkDPT.js +4 -0
- package/dist/solidity-DUWnFhS6.js +6 -0
- package/dist/soy-C1-6njHa.js +8 -0
- package/dist/sparql-B0KWFEri.js +8 -0
- package/dist/splunk-CRXR8A9s.js +6 -0
- package/dist/sql-Cn_v3PB0.js +6 -0
- package/dist/ssh-config-DP-hNVbF.js +6 -0
- package/dist/stata-B8c5fTjX.js +8 -0
- package/dist/stateDiagram-FKZM4ZOC-BjHpkttt.js +264 -0
- package/dist/stateDiagram-v2-4FDKWEC3-SoFWin9i.js +16 -0
- package/dist/stylus-CyKEU1Ej.js +6 -0
- package/dist/surrealql-CQi7GQN7.js +8 -0
- package/dist/svelte-rYri41WT.js +14 -0
- package/dist/swift-DJpUqPLg.js +6 -0
- package/dist/synthwave-84-NU3C_KFZ.js +4 -0
- package/dist/system-verilog-BCm7smPJ.js +6 -0
- package/dist/systemd-C-4qm6XH.js +6 -0
- package/dist/talonscript-CFF3LF_O.js +6 -0
- package/dist/tasl-Cg_WBUAe.js +6 -0
- package/dist/tcl-DN7buRTF.js +6 -0
- package/dist/templ-Crs9Ui8q.js +12 -0
- package/dist/terraform-DGvcn9zM.js +6 -0
- package/dist/tex-AHxmLTL0.js +8 -0
- package/dist/timeline-definition-IT6M3QCI-axILemxx.js +795 -0
- package/dist/tokyo-night-DP4TmcQl.js +4 -0
- package/dist/toml-DY62mUL_.js +6 -0
- package/dist/treemap-KMMF4GRG-DLUO0usq.js +5 -0
- package/dist/ts-tags-BUclWxCG.js +41 -0
- package/dist/tsv-BtvSkaG0.js +6 -0
- package/dist/tsx-B8rCNbgL.js +6 -0
- package/dist/turtle-_H59FV7D.js +6 -0
- package/dist/twig-DwV2Fi4L.js +18 -0
- package/dist/typescript-RycA9KXf.js +6 -0
- package/dist/typespec-DWqp-kUU.js +6 -0
- package/dist/typst-D_1QKWns.js +6 -0
- package/dist/v-BPCNiyYe.js +6 -0
- package/dist/vala-uxaPR7d1.js +6 -0
- package/dist/vb-D8_c5-KN.js +6 -0
- package/dist/verilog-B-bybjPF.js +6 -0
- package/dist/vesper-BckBta1U.js +4 -0
- package/dist/vhdl-CUlNa8ac.js +6 -0
- package/dist/viml-DsfA-sWm.js +6 -0
- package/dist/vitesse-black-BoGvW84i.js +4 -0
- package/dist/vitesse-dark-Cym-eLtO.js +4 -0
- package/dist/vitesse-light-CcmG315c.js +4 -0
- package/dist/vue-DXEmyXn9.js +31 -0
- package/dist/vue-html-j9xNEdu3.js +8 -0
- package/dist/vue-vine-D41-N99t.js +18 -0
- package/dist/vyper-CPQuu50u.js +6 -0
- package/dist/wasm-BBXxrAl7.js +6 -0
- package/dist/wasm-DQxwEHae.js +7 -0
- package/dist/wenyan-pbVjoM9_.js +6 -0
- package/dist/wgsl-DY4iK1q1.js +6 -0
- package/dist/wikitext-Z-MoUasO.js +6 -0
- package/dist/wit-CQMQOlTg.js +6 -0
- package/dist/wolfram-Dz4KXISs.js +6 -0
- package/dist/xml-C2J0sS9M.js +8 -0
- package/dist/xsl-BmSZphgC.js +8 -0
- package/dist/xychartDiagram-PRI3JC2R-C7nmWmlk.js +1340 -0
- package/dist/yaml-DaO7k5B1.js +6 -0
- package/dist/zenscript-CxBjpf9c.js +6 -0
- package/dist/zig-Vm0PO9wB.js +6 -0
- package/package.json +134 -0
|
@@ -0,0 +1,2364 @@
|
|
|
1
|
+
import { g as ke } from "./chunk-FMBD7UC4-DeD5V5dF.js";
|
|
2
|
+
import { aF as Gt, aG as Ot, aH as Ee, aI as _e, aJ as $t, aK as _t, aL as Zt, aM as ht, aN as Te, aO as De, aP as Ne, aQ as Be, aR as Ce, aS as Ie, ax as Ae, aT as Oe, _ as g, E as at, d as O, e as Re, l as S, y as ze, A as Me, c as R, aU as je, R as Fe, S as Pe, O as We, aV as V, aB as qt, aq as Ye, u as tt, k as Ue, aW as He, aX as wt, i as mt, aY as Ke } from "./mermaid.core-BIhT9VUC.js";
|
|
3
|
+
import { k as Xe, g as Ve, a as Ge, b as $e } from "./_arrayEach-CWzCztxB.js";
|
|
4
|
+
import { G as Ze } from "./graph-BJDrjORS.js";
|
|
5
|
+
import { c as qe } from "./channel-3keaKHdb.js";
|
|
6
|
+
function Je(e, t) {
|
|
7
|
+
return e && Gt(t, Xe(t), e);
|
|
8
|
+
}
|
|
9
|
+
function Qe(e, t) {
|
|
10
|
+
return Gt(e, Ve(e), t);
|
|
11
|
+
}
|
|
12
|
+
var tr = Object.prototype, er = tr.hasOwnProperty;
|
|
13
|
+
function rr(e) {
|
|
14
|
+
var t = e.length, a = new e.constructor(t);
|
|
15
|
+
return t && typeof e[0] == "string" && er.call(e, "index") && (a.index = e.index, a.input = e.input), a;
|
|
16
|
+
}
|
|
17
|
+
function ar(e, t) {
|
|
18
|
+
var a = e.buffer;
|
|
19
|
+
return new e.constructor(a, e.byteOffset, e.byteLength);
|
|
20
|
+
}
|
|
21
|
+
var sr = /\w*$/;
|
|
22
|
+
function ir(e) {
|
|
23
|
+
var t = new e.constructor(e.source, sr.exec(e));
|
|
24
|
+
return t.lastIndex = e.lastIndex, t;
|
|
25
|
+
}
|
|
26
|
+
var Rt = Ot ? Ot.prototype : void 0, zt = Rt ? Rt.valueOf : void 0;
|
|
27
|
+
function nr(e) {
|
|
28
|
+
return zt ? Object(zt.call(e)) : {};
|
|
29
|
+
}
|
|
30
|
+
var lr = "[object Boolean]", cr = "[object Date]", or = "[object Map]", hr = "[object Number]", gr = "[object RegExp]", dr = "[object Set]", ur = "[object String]", pr = "[object Symbol]", fr = "[object ArrayBuffer]", yr = "[object DataView]", xr = "[object Float32Array]", br = "[object Float64Array]", wr = "[object Int8Array]", mr = "[object Int16Array]", Sr = "[object Int32Array]", Lr = "[object Uint8Array]", vr = "[object Uint8ClampedArray]", kr = "[object Uint16Array]", Er = "[object Uint32Array]";
|
|
31
|
+
function _r(e, t, a) {
|
|
32
|
+
var i = e.constructor;
|
|
33
|
+
switch (t) {
|
|
34
|
+
case fr:
|
|
35
|
+
return _e(e);
|
|
36
|
+
case lr:
|
|
37
|
+
case cr:
|
|
38
|
+
return new i(+e);
|
|
39
|
+
case yr:
|
|
40
|
+
return ar(e);
|
|
41
|
+
case xr:
|
|
42
|
+
case br:
|
|
43
|
+
case wr:
|
|
44
|
+
case mr:
|
|
45
|
+
case Sr:
|
|
46
|
+
case Lr:
|
|
47
|
+
case vr:
|
|
48
|
+
case kr:
|
|
49
|
+
case Er:
|
|
50
|
+
return Ee(e, a);
|
|
51
|
+
case or:
|
|
52
|
+
return new i();
|
|
53
|
+
case hr:
|
|
54
|
+
case ur:
|
|
55
|
+
return new i(e);
|
|
56
|
+
case gr:
|
|
57
|
+
return ir(e);
|
|
58
|
+
case dr:
|
|
59
|
+
return new i();
|
|
60
|
+
case pr:
|
|
61
|
+
return nr(e);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
var Tr = "[object Map]";
|
|
65
|
+
function Dr(e) {
|
|
66
|
+
return $t(e) && _t(e) == Tr;
|
|
67
|
+
}
|
|
68
|
+
var Mt = ht && ht.isMap, Nr = Mt ? Zt(Mt) : Dr, Br = "[object Set]";
|
|
69
|
+
function Cr(e) {
|
|
70
|
+
return $t(e) && _t(e) == Br;
|
|
71
|
+
}
|
|
72
|
+
var jt = ht && ht.isSet, Ir = jt ? Zt(jt) : Cr, Ar = 1, Jt = "[object Arguments]", Or = "[object Array]", Rr = "[object Boolean]", zr = "[object Date]", Mr = "[object Error]", Qt = "[object Function]", jr = "[object GeneratorFunction]", Fr = "[object Map]", Pr = "[object Number]", te = "[object Object]", Wr = "[object RegExp]", Yr = "[object Set]", Ur = "[object String]", Hr = "[object Symbol]", Kr = "[object WeakMap]", Xr = "[object ArrayBuffer]", Vr = "[object DataView]", Gr = "[object Float32Array]", $r = "[object Float64Array]", Zr = "[object Int8Array]", qr = "[object Int16Array]", Jr = "[object Int32Array]", Qr = "[object Uint8Array]", ta = "[object Uint8ClampedArray]", ea = "[object Uint16Array]", ra = "[object Uint32Array]", T = {};
|
|
73
|
+
T[Jt] = T[Or] = T[Xr] = T[Vr] = T[Rr] = T[zr] = T[Gr] = T[$r] = T[Zr] = T[qr] = T[Jr] = T[Fr] = T[Pr] = T[te] = T[Wr] = T[Yr] = T[Ur] = T[Hr] = T[Qr] = T[ta] = T[ea] = T[ra] = !0;
|
|
74
|
+
T[Mr] = T[Qt] = T[Kr] = !1;
|
|
75
|
+
function ct(e, t, a, i, l, s) {
|
|
76
|
+
var r, n = t & Ar;
|
|
77
|
+
if (r !== void 0)
|
|
78
|
+
return r;
|
|
79
|
+
if (!Te(e))
|
|
80
|
+
return e;
|
|
81
|
+
var c = Ae(e);
|
|
82
|
+
if (c)
|
|
83
|
+
return r = rr(e), De(e, r);
|
|
84
|
+
var d = _t(e), o = d == Qt || d == jr;
|
|
85
|
+
if (Ne(e))
|
|
86
|
+
return Be(e, n);
|
|
87
|
+
if (d == te || d == Jt || o && !l)
|
|
88
|
+
return r = o ? {} : Ce(e), Qe(e, Je(r, e));
|
|
89
|
+
if (!T[d])
|
|
90
|
+
return l ? e : {};
|
|
91
|
+
r = _r(e, d, n), s || (s = new Ie());
|
|
92
|
+
var y = s.get(e);
|
|
93
|
+
if (y)
|
|
94
|
+
return y;
|
|
95
|
+
s.set(e, r), Ir(e) ? e.forEach(function(L) {
|
|
96
|
+
r.add(ct(L, t, a, L, e, s));
|
|
97
|
+
}) : Nr(e) && e.forEach(function(L, v) {
|
|
98
|
+
r.set(v, ct(L, t, a, v, e, s));
|
|
99
|
+
});
|
|
100
|
+
var w = Ge, x = c ? void 0 : w(e);
|
|
101
|
+
return $e(x || e, function(L, v) {
|
|
102
|
+
x && (v = L, L = e[v]), Oe(r, v, ct(L, t, a, v, e, s));
|
|
103
|
+
}), r;
|
|
104
|
+
}
|
|
105
|
+
var aa = 4;
|
|
106
|
+
function sa(e) {
|
|
107
|
+
return ct(e, aa);
|
|
108
|
+
}
|
|
109
|
+
var St = (function() {
|
|
110
|
+
var e = /* @__PURE__ */ g(function(D, b, u, f) {
|
|
111
|
+
for (u = u || {}, f = D.length; f--; u[D[f]] = b) ;
|
|
112
|
+
return u;
|
|
113
|
+
}, "o"), t = [1, 15], a = [1, 7], i = [1, 13], l = [1, 14], s = [1, 19], r = [1, 16], n = [1, 17], c = [1, 18], d = [8, 30], o = [8, 10, 21, 28, 29, 30, 31, 39, 43, 46], y = [1, 23], w = [1, 24], x = [8, 10, 15, 16, 21, 28, 29, 30, 31, 39, 43, 46], L = [8, 10, 15, 16, 21, 27, 28, 29, 30, 31, 39, 43, 46], v = [1, 49], k = {
|
|
114
|
+
trace: /* @__PURE__ */ g(function() {
|
|
115
|
+
}, "trace"),
|
|
116
|
+
yy: {},
|
|
117
|
+
symbols_: { error: 2, spaceLines: 3, SPACELINE: 4, NL: 5, separator: 6, SPACE: 7, EOF: 8, start: 9, BLOCK_DIAGRAM_KEY: 10, document: 11, stop: 12, statement: 13, link: 14, LINK: 15, START_LINK: 16, LINK_LABEL: 17, STR: 18, nodeStatement: 19, columnsStatement: 20, SPACE_BLOCK: 21, blockStatement: 22, classDefStatement: 23, cssClassStatement: 24, styleStatement: 25, node: 26, SIZE: 27, COLUMNS: 28, "id-block": 29, end: 30, NODE_ID: 31, nodeShapeNLabel: 32, dirList: 33, DIR: 34, NODE_DSTART: 35, NODE_DEND: 36, BLOCK_ARROW_START: 37, BLOCK_ARROW_END: 38, classDef: 39, CLASSDEF_ID: 40, CLASSDEF_STYLEOPTS: 41, DEFAULT: 42, class: 43, CLASSENTITY_IDS: 44, STYLECLASS: 45, style: 46, STYLE_ENTITY_IDS: 47, STYLE_DEFINITION_DATA: 48, $accept: 0, $end: 1 },
|
|
118
|
+
terminals_: { 2: "error", 4: "SPACELINE", 5: "NL", 7: "SPACE", 8: "EOF", 10: "BLOCK_DIAGRAM_KEY", 15: "LINK", 16: "START_LINK", 17: "LINK_LABEL", 18: "STR", 21: "SPACE_BLOCK", 27: "SIZE", 28: "COLUMNS", 29: "id-block", 30: "end", 31: "NODE_ID", 34: "DIR", 35: "NODE_DSTART", 36: "NODE_DEND", 37: "BLOCK_ARROW_START", 38: "BLOCK_ARROW_END", 39: "classDef", 40: "CLASSDEF_ID", 41: "CLASSDEF_STYLEOPTS", 42: "DEFAULT", 43: "class", 44: "CLASSENTITY_IDS", 45: "STYLECLASS", 46: "style", 47: "STYLE_ENTITY_IDS", 48: "STYLE_DEFINITION_DATA" },
|
|
119
|
+
productions_: [0, [3, 1], [3, 2], [3, 2], [6, 1], [6, 1], [6, 1], [9, 3], [12, 1], [12, 1], [12, 2], [12, 2], [11, 1], [11, 2], [14, 1], [14, 4], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [19, 3], [19, 2], [19, 1], [20, 1], [22, 4], [22, 3], [26, 1], [26, 2], [33, 1], [33, 2], [32, 3], [32, 4], [23, 3], [23, 3], [24, 3], [25, 3]],
|
|
120
|
+
performAction: /* @__PURE__ */ g(function(b, u, f, m, E, h, P) {
|
|
121
|
+
var p = h.length - 1;
|
|
122
|
+
switch (E) {
|
|
123
|
+
case 4:
|
|
124
|
+
m.getLogger().debug("Rule: separator (NL) ");
|
|
125
|
+
break;
|
|
126
|
+
case 5:
|
|
127
|
+
m.getLogger().debug("Rule: separator (Space) ");
|
|
128
|
+
break;
|
|
129
|
+
case 6:
|
|
130
|
+
m.getLogger().debug("Rule: separator (EOF) ");
|
|
131
|
+
break;
|
|
132
|
+
case 7:
|
|
133
|
+
m.getLogger().debug("Rule: hierarchy: ", h[p - 1]), m.setHierarchy(h[p - 1]);
|
|
134
|
+
break;
|
|
135
|
+
case 8:
|
|
136
|
+
m.getLogger().debug("Stop NL ");
|
|
137
|
+
break;
|
|
138
|
+
case 9:
|
|
139
|
+
m.getLogger().debug("Stop EOF ");
|
|
140
|
+
break;
|
|
141
|
+
case 10:
|
|
142
|
+
m.getLogger().debug("Stop NL2 ");
|
|
143
|
+
break;
|
|
144
|
+
case 11:
|
|
145
|
+
m.getLogger().debug("Stop EOF2 ");
|
|
146
|
+
break;
|
|
147
|
+
case 12:
|
|
148
|
+
m.getLogger().debug("Rule: statement: ", h[p]), typeof h[p].length == "number" ? this.$ = h[p] : this.$ = [h[p]];
|
|
149
|
+
break;
|
|
150
|
+
case 13:
|
|
151
|
+
m.getLogger().debug("Rule: statement #2: ", h[p - 1]), this.$ = [h[p - 1]].concat(h[p]);
|
|
152
|
+
break;
|
|
153
|
+
case 14:
|
|
154
|
+
m.getLogger().debug("Rule: link: ", h[p], b), this.$ = { edgeTypeStr: h[p], label: "" };
|
|
155
|
+
break;
|
|
156
|
+
case 15:
|
|
157
|
+
m.getLogger().debug("Rule: LABEL link: ", h[p - 3], h[p - 1], h[p]), this.$ = { edgeTypeStr: h[p], label: h[p - 1] };
|
|
158
|
+
break;
|
|
159
|
+
case 18:
|
|
160
|
+
const A = parseInt(h[p]), Z = m.generateId();
|
|
161
|
+
this.$ = { id: Z, type: "space", label: "", width: A, children: [] };
|
|
162
|
+
break;
|
|
163
|
+
case 23:
|
|
164
|
+
m.getLogger().debug("Rule: (nodeStatement link node) ", h[p - 2], h[p - 1], h[p], " typestr: ", h[p - 1].edgeTypeStr);
|
|
165
|
+
const G = m.edgeStrToEdgeData(h[p - 1].edgeTypeStr);
|
|
166
|
+
this.$ = [
|
|
167
|
+
{ id: h[p - 2].id, label: h[p - 2].label, type: h[p - 2].type, directions: h[p - 2].directions },
|
|
168
|
+
{ id: h[p - 2].id + "-" + h[p].id, start: h[p - 2].id, end: h[p].id, label: h[p - 1].label, type: "edge", directions: h[p].directions, arrowTypeEnd: G, arrowTypeStart: "arrow_open" },
|
|
169
|
+
{ id: h[p].id, label: h[p].label, type: m.typeStr2Type(h[p].typeStr), directions: h[p].directions }
|
|
170
|
+
];
|
|
171
|
+
break;
|
|
172
|
+
case 24:
|
|
173
|
+
m.getLogger().debug("Rule: nodeStatement (abc88 node size) ", h[p - 1], h[p]), this.$ = { id: h[p - 1].id, label: h[p - 1].label, type: m.typeStr2Type(h[p - 1].typeStr), directions: h[p - 1].directions, widthInColumns: parseInt(h[p], 10) };
|
|
174
|
+
break;
|
|
175
|
+
case 25:
|
|
176
|
+
m.getLogger().debug("Rule: nodeStatement (node) ", h[p]), this.$ = { id: h[p].id, label: h[p].label, type: m.typeStr2Type(h[p].typeStr), directions: h[p].directions, widthInColumns: 1 };
|
|
177
|
+
break;
|
|
178
|
+
case 26:
|
|
179
|
+
m.getLogger().debug("APA123", this ? this : "na"), m.getLogger().debug("COLUMNS: ", h[p]), this.$ = { type: "column-setting", columns: h[p] === "auto" ? -1 : parseInt(h[p]) };
|
|
180
|
+
break;
|
|
181
|
+
case 27:
|
|
182
|
+
m.getLogger().debug("Rule: id-block statement : ", h[p - 2], h[p - 1]), m.generateId(), this.$ = { ...h[p - 2], type: "composite", children: h[p - 1] };
|
|
183
|
+
break;
|
|
184
|
+
case 28:
|
|
185
|
+
m.getLogger().debug("Rule: blockStatement : ", h[p - 2], h[p - 1], h[p]);
|
|
186
|
+
const st = m.generateId();
|
|
187
|
+
this.$ = { id: st, type: "composite", label: "", children: h[p - 1] };
|
|
188
|
+
break;
|
|
189
|
+
case 29:
|
|
190
|
+
m.getLogger().debug("Rule: node (NODE_ID separator): ", h[p]), this.$ = { id: h[p] };
|
|
191
|
+
break;
|
|
192
|
+
case 30:
|
|
193
|
+
m.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", h[p - 1], h[p]), this.$ = { id: h[p - 1], label: h[p].label, typeStr: h[p].typeStr, directions: h[p].directions };
|
|
194
|
+
break;
|
|
195
|
+
case 31:
|
|
196
|
+
m.getLogger().debug("Rule: dirList: ", h[p]), this.$ = [h[p]];
|
|
197
|
+
break;
|
|
198
|
+
case 32:
|
|
199
|
+
m.getLogger().debug("Rule: dirList: ", h[p - 1], h[p]), this.$ = [h[p - 1]].concat(h[p]);
|
|
200
|
+
break;
|
|
201
|
+
case 33:
|
|
202
|
+
m.getLogger().debug("Rule: nodeShapeNLabel: ", h[p - 2], h[p - 1], h[p]), this.$ = { typeStr: h[p - 2] + h[p], label: h[p - 1] };
|
|
203
|
+
break;
|
|
204
|
+
case 34:
|
|
205
|
+
m.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", h[p - 3], h[p - 2], " #3:", h[p - 1], h[p]), this.$ = { typeStr: h[p - 3] + h[p], label: h[p - 2], directions: h[p - 1] };
|
|
206
|
+
break;
|
|
207
|
+
case 35:
|
|
208
|
+
case 36:
|
|
209
|
+
this.$ = { type: "classDef", id: h[p - 1].trim(), css: h[p].trim() };
|
|
210
|
+
break;
|
|
211
|
+
case 37:
|
|
212
|
+
this.$ = { type: "applyClass", id: h[p - 1].trim(), styleClass: h[p].trim() };
|
|
213
|
+
break;
|
|
214
|
+
case 38:
|
|
215
|
+
this.$ = { type: "applyStyles", id: h[p - 1].trim(), stylesStr: h[p].trim() };
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
}, "anonymous"),
|
|
219
|
+
table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 10: t, 11: 3, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: c }, { 8: [1, 20] }, e(d, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 10: t, 21: a, 28: i, 29: l, 31: s, 39: r, 43: n, 46: c }), e(o, [2, 16], { 14: 22, 15: y, 16: w }), e(o, [2, 17]), e(o, [2, 18]), e(o, [2, 19]), e(o, [2, 20]), e(o, [2, 21]), e(o, [2, 22]), e(x, [2, 25], { 27: [1, 25] }), e(o, [2, 26]), { 19: 26, 26: 12, 31: s }, { 10: t, 11: 27, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: c }, { 40: [1, 28], 42: [1, 29] }, { 44: [1, 30] }, { 47: [1, 31] }, e(L, [2, 29], { 32: 32, 35: [1, 33], 37: [1, 34] }), { 1: [2, 7] }, e(d, [2, 13]), { 26: 35, 31: s }, { 31: [2, 14] }, { 17: [1, 36] }, e(x, [2, 24]), { 10: t, 11: 37, 13: 4, 14: 22, 15: y, 16: w, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: c }, { 30: [1, 38] }, { 41: [1, 39] }, { 41: [1, 40] }, { 45: [1, 41] }, { 48: [1, 42] }, e(L, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(x, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(o, [2, 28]), e(o, [2, 35]), e(o, [2, 36]), e(o, [2, 37]), e(o, [2, 38]), { 36: [1, 47] }, { 33: 48, 34: v }, { 15: [1, 50] }, e(o, [2, 27]), e(L, [2, 33]), { 38: [1, 51] }, { 33: 52, 34: v, 38: [2, 31] }, { 31: [2, 15] }, e(L, [2, 34]), { 38: [2, 32] }],
|
|
220
|
+
defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
|
|
221
|
+
parseError: /* @__PURE__ */ g(function(b, u) {
|
|
222
|
+
if (u.recoverable)
|
|
223
|
+
this.trace(b);
|
|
224
|
+
else {
|
|
225
|
+
var f = new Error(b);
|
|
226
|
+
throw f.hash = u, f;
|
|
227
|
+
}
|
|
228
|
+
}, "parseError"),
|
|
229
|
+
parse: /* @__PURE__ */ g(function(b) {
|
|
230
|
+
var u = this, f = [0], m = [], E = [null], h = [], P = this.table, p = "", A = 0, Z = 0, G = 2, st = 1, Se = h.slice.call(arguments, 1), z = Object.create(this.lexer), q = { yy: {} };
|
|
231
|
+
for (var ft in this.yy)
|
|
232
|
+
Object.prototype.hasOwnProperty.call(this.yy, ft) && (q.yy[ft] = this.yy[ft]);
|
|
233
|
+
z.setInput(b, q.yy), q.yy.lexer = z, q.yy.parser = this, typeof z.yylloc > "u" && (z.yylloc = {});
|
|
234
|
+
var yt = z.yylloc;
|
|
235
|
+
h.push(yt);
|
|
236
|
+
var Le = z.options && z.options.ranges;
|
|
237
|
+
typeof q.yy.parseError == "function" ? this.parseError = q.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
238
|
+
function ve(W) {
|
|
239
|
+
f.length = f.length - 2 * W, E.length = E.length - W, h.length = h.length - W;
|
|
240
|
+
}
|
|
241
|
+
g(ve, "popStack");
|
|
242
|
+
function It() {
|
|
243
|
+
var W;
|
|
244
|
+
return W = m.pop() || z.lex() || st, typeof W != "number" && (W instanceof Array && (m = W, W = m.pop()), W = u.symbols_[W] || W), W;
|
|
245
|
+
}
|
|
246
|
+
g(It, "lex");
|
|
247
|
+
for (var F, J, U, xt, Q = {}, it, $, At, nt; ; ) {
|
|
248
|
+
if (J = f[f.length - 1], this.defaultActions[J] ? U = this.defaultActions[J] : ((F === null || typeof F > "u") && (F = It()), U = P[J] && P[J][F]), typeof U > "u" || !U.length || !U[0]) {
|
|
249
|
+
var bt = "";
|
|
250
|
+
nt = [];
|
|
251
|
+
for (it in P[J])
|
|
252
|
+
this.terminals_[it] && it > G && nt.push("'" + this.terminals_[it] + "'");
|
|
253
|
+
z.showPosition ? bt = "Parse error on line " + (A + 1) + `:
|
|
254
|
+
` + z.showPosition() + `
|
|
255
|
+
Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : bt = "Parse error on line " + (A + 1) + ": Unexpected " + (F == st ? "end of input" : "'" + (this.terminals_[F] || F) + "'"), this.parseError(bt, {
|
|
256
|
+
text: z.match,
|
|
257
|
+
token: this.terminals_[F] || F,
|
|
258
|
+
line: z.yylineno,
|
|
259
|
+
loc: yt,
|
|
260
|
+
expected: nt
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
if (U[0] instanceof Array && U.length > 1)
|
|
264
|
+
throw new Error("Parse Error: multiple actions possible at state: " + J + ", token: " + F);
|
|
265
|
+
switch (U[0]) {
|
|
266
|
+
case 1:
|
|
267
|
+
f.push(F), E.push(z.yytext), h.push(z.yylloc), f.push(U[1]), F = null, Z = z.yyleng, p = z.yytext, A = z.yylineno, yt = z.yylloc;
|
|
268
|
+
break;
|
|
269
|
+
case 2:
|
|
270
|
+
if ($ = this.productions_[U[1]][1], Q.$ = E[E.length - $], Q._$ = {
|
|
271
|
+
first_line: h[h.length - ($ || 1)].first_line,
|
|
272
|
+
last_line: h[h.length - 1].last_line,
|
|
273
|
+
first_column: h[h.length - ($ || 1)].first_column,
|
|
274
|
+
last_column: h[h.length - 1].last_column
|
|
275
|
+
}, Le && (Q._$.range = [
|
|
276
|
+
h[h.length - ($ || 1)].range[0],
|
|
277
|
+
h[h.length - 1].range[1]
|
|
278
|
+
]), xt = this.performAction.apply(Q, [
|
|
279
|
+
p,
|
|
280
|
+
Z,
|
|
281
|
+
A,
|
|
282
|
+
q.yy,
|
|
283
|
+
U[1],
|
|
284
|
+
E,
|
|
285
|
+
h
|
|
286
|
+
].concat(Se)), typeof xt < "u")
|
|
287
|
+
return xt;
|
|
288
|
+
$ && (f = f.slice(0, -1 * $ * 2), E = E.slice(0, -1 * $), h = h.slice(0, -1 * $)), f.push(this.productions_[U[1]][0]), E.push(Q.$), h.push(Q._$), At = P[f[f.length - 2]][f[f.length - 1]], f.push(At);
|
|
289
|
+
break;
|
|
290
|
+
case 3:
|
|
291
|
+
return !0;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
return !0;
|
|
295
|
+
}, "parse")
|
|
296
|
+
}, C = /* @__PURE__ */ (function() {
|
|
297
|
+
var D = {
|
|
298
|
+
EOF: 1,
|
|
299
|
+
parseError: /* @__PURE__ */ g(function(u, f) {
|
|
300
|
+
if (this.yy.parser)
|
|
301
|
+
this.yy.parser.parseError(u, f);
|
|
302
|
+
else
|
|
303
|
+
throw new Error(u);
|
|
304
|
+
}, "parseError"),
|
|
305
|
+
// resets the lexer, sets new input
|
|
306
|
+
setInput: /* @__PURE__ */ g(function(b, u) {
|
|
307
|
+
return this.yy = u || this.yy || {}, this._input = b, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
308
|
+
first_line: 1,
|
|
309
|
+
first_column: 0,
|
|
310
|
+
last_line: 1,
|
|
311
|
+
last_column: 0
|
|
312
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
313
|
+
}, "setInput"),
|
|
314
|
+
// consumes and returns one char from the input
|
|
315
|
+
input: /* @__PURE__ */ g(function() {
|
|
316
|
+
var b = this._input[0];
|
|
317
|
+
this.yytext += b, this.yyleng++, this.offset++, this.match += b, this.matched += b;
|
|
318
|
+
var u = b.match(/(?:\r\n?|\n).*/g);
|
|
319
|
+
return u ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), b;
|
|
320
|
+
}, "input"),
|
|
321
|
+
// unshifts one char (or a string) into the input
|
|
322
|
+
unput: /* @__PURE__ */ g(function(b) {
|
|
323
|
+
var u = b.length, f = b.split(/(?:\r\n?|\n)/g);
|
|
324
|
+
this._input = b + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - u), this.offset -= u;
|
|
325
|
+
var m = this.match.split(/(?:\r\n?|\n)/g);
|
|
326
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), f.length - 1 && (this.yylineno -= f.length - 1);
|
|
327
|
+
var E = this.yylloc.range;
|
|
328
|
+
return this.yylloc = {
|
|
329
|
+
first_line: this.yylloc.first_line,
|
|
330
|
+
last_line: this.yylineno + 1,
|
|
331
|
+
first_column: this.yylloc.first_column,
|
|
332
|
+
last_column: f ? (f.length === m.length ? this.yylloc.first_column : 0) + m[m.length - f.length].length - f[0].length : this.yylloc.first_column - u
|
|
333
|
+
}, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - u]), this.yyleng = this.yytext.length, this;
|
|
334
|
+
}, "unput"),
|
|
335
|
+
// When called from action, caches matched text and appends it on next action
|
|
336
|
+
more: /* @__PURE__ */ g(function() {
|
|
337
|
+
return this._more = !0, this;
|
|
338
|
+
}, "more"),
|
|
339
|
+
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
|
340
|
+
reject: /* @__PURE__ */ g(function() {
|
|
341
|
+
if (this.options.backtrack_lexer)
|
|
342
|
+
this._backtrack = !0;
|
|
343
|
+
else
|
|
344
|
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
345
|
+
` + this.showPosition(), {
|
|
346
|
+
text: "",
|
|
347
|
+
token: null,
|
|
348
|
+
line: this.yylineno
|
|
349
|
+
});
|
|
350
|
+
return this;
|
|
351
|
+
}, "reject"),
|
|
352
|
+
// retain first n characters of the match
|
|
353
|
+
less: /* @__PURE__ */ g(function(b) {
|
|
354
|
+
this.unput(this.match.slice(b));
|
|
355
|
+
}, "less"),
|
|
356
|
+
// displays already matched input, i.e. for error messages
|
|
357
|
+
pastInput: /* @__PURE__ */ g(function() {
|
|
358
|
+
var b = this.matched.substr(0, this.matched.length - this.match.length);
|
|
359
|
+
return (b.length > 20 ? "..." : "") + b.substr(-20).replace(/\n/g, "");
|
|
360
|
+
}, "pastInput"),
|
|
361
|
+
// displays upcoming input, i.e. for error messages
|
|
362
|
+
upcomingInput: /* @__PURE__ */ g(function() {
|
|
363
|
+
var b = this.match;
|
|
364
|
+
return b.length < 20 && (b += this._input.substr(0, 20 - b.length)), (b.substr(0, 20) + (b.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
365
|
+
}, "upcomingInput"),
|
|
366
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
367
|
+
showPosition: /* @__PURE__ */ g(function() {
|
|
368
|
+
var b = this.pastInput(), u = new Array(b.length + 1).join("-");
|
|
369
|
+
return b + this.upcomingInput() + `
|
|
370
|
+
` + u + "^";
|
|
371
|
+
}, "showPosition"),
|
|
372
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
373
|
+
test_match: /* @__PURE__ */ g(function(b, u) {
|
|
374
|
+
var f, m, E;
|
|
375
|
+
if (this.options.backtrack_lexer && (E = {
|
|
376
|
+
yylineno: this.yylineno,
|
|
377
|
+
yylloc: {
|
|
378
|
+
first_line: this.yylloc.first_line,
|
|
379
|
+
last_line: this.last_line,
|
|
380
|
+
first_column: this.yylloc.first_column,
|
|
381
|
+
last_column: this.yylloc.last_column
|
|
382
|
+
},
|
|
383
|
+
yytext: this.yytext,
|
|
384
|
+
match: this.match,
|
|
385
|
+
matches: this.matches,
|
|
386
|
+
matched: this.matched,
|
|
387
|
+
yyleng: this.yyleng,
|
|
388
|
+
offset: this.offset,
|
|
389
|
+
_more: this._more,
|
|
390
|
+
_input: this._input,
|
|
391
|
+
yy: this.yy,
|
|
392
|
+
conditionStack: this.conditionStack.slice(0),
|
|
393
|
+
done: this.done
|
|
394
|
+
}, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))), m = b[0].match(/(?:\r\n?|\n).*/g), m && (this.yylineno += m.length), this.yylloc = {
|
|
395
|
+
first_line: this.yylloc.last_line,
|
|
396
|
+
last_line: this.yylineno + 1,
|
|
397
|
+
first_column: this.yylloc.last_column,
|
|
398
|
+
last_column: m ? m[m.length - 1].length - m[m.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + b[0].length
|
|
399
|
+
}, this.yytext += b[0], this.match += b[0], this.matches = b, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(b[0].length), this.matched += b[0], f = this.performAction.call(this, this.yy, this, u, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), f)
|
|
400
|
+
return f;
|
|
401
|
+
if (this._backtrack) {
|
|
402
|
+
for (var h in E)
|
|
403
|
+
this[h] = E[h];
|
|
404
|
+
return !1;
|
|
405
|
+
}
|
|
406
|
+
return !1;
|
|
407
|
+
}, "test_match"),
|
|
408
|
+
// return next match in input
|
|
409
|
+
next: /* @__PURE__ */ g(function() {
|
|
410
|
+
if (this.done)
|
|
411
|
+
return this.EOF;
|
|
412
|
+
this._input || (this.done = !0);
|
|
413
|
+
var b, u, f, m;
|
|
414
|
+
this._more || (this.yytext = "", this.match = "");
|
|
415
|
+
for (var E = this._currentRules(), h = 0; h < E.length; h++)
|
|
416
|
+
if (f = this._input.match(this.rules[E[h]]), f && (!u || f[0].length > u[0].length)) {
|
|
417
|
+
if (u = f, m = h, this.options.backtrack_lexer) {
|
|
418
|
+
if (b = this.test_match(f, E[h]), b !== !1)
|
|
419
|
+
return b;
|
|
420
|
+
if (this._backtrack) {
|
|
421
|
+
u = !1;
|
|
422
|
+
continue;
|
|
423
|
+
} else
|
|
424
|
+
return !1;
|
|
425
|
+
} else if (!this.options.flex)
|
|
426
|
+
break;
|
|
427
|
+
}
|
|
428
|
+
return u ? (b = this.test_match(u, E[m]), b !== !1 ? b : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
429
|
+
` + this.showPosition(), {
|
|
430
|
+
text: "",
|
|
431
|
+
token: null,
|
|
432
|
+
line: this.yylineno
|
|
433
|
+
});
|
|
434
|
+
}, "next"),
|
|
435
|
+
// return next match that has a token
|
|
436
|
+
lex: /* @__PURE__ */ g(function() {
|
|
437
|
+
var u = this.next();
|
|
438
|
+
return u || this.lex();
|
|
439
|
+
}, "lex"),
|
|
440
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
441
|
+
begin: /* @__PURE__ */ g(function(u) {
|
|
442
|
+
this.conditionStack.push(u);
|
|
443
|
+
}, "begin"),
|
|
444
|
+
// pop the previously active lexer condition state off the condition stack
|
|
445
|
+
popState: /* @__PURE__ */ g(function() {
|
|
446
|
+
var u = this.conditionStack.length - 1;
|
|
447
|
+
return u > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
448
|
+
}, "popState"),
|
|
449
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
450
|
+
_currentRules: /* @__PURE__ */ g(function() {
|
|
451
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
452
|
+
}, "_currentRules"),
|
|
453
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
454
|
+
topState: /* @__PURE__ */ g(function(u) {
|
|
455
|
+
return u = this.conditionStack.length - 1 - Math.abs(u || 0), u >= 0 ? this.conditionStack[u] : "INITIAL";
|
|
456
|
+
}, "topState"),
|
|
457
|
+
// alias for begin(condition)
|
|
458
|
+
pushState: /* @__PURE__ */ g(function(u) {
|
|
459
|
+
this.begin(u);
|
|
460
|
+
}, "pushState"),
|
|
461
|
+
// return the number of states currently on the stack
|
|
462
|
+
stateStackSize: /* @__PURE__ */ g(function() {
|
|
463
|
+
return this.conditionStack.length;
|
|
464
|
+
}, "stateStackSize"),
|
|
465
|
+
options: {},
|
|
466
|
+
performAction: /* @__PURE__ */ g(function(u, f, m, E) {
|
|
467
|
+
switch (m) {
|
|
468
|
+
case 0:
|
|
469
|
+
return u.getLogger().debug("Found block-beta"), 10;
|
|
470
|
+
case 1:
|
|
471
|
+
return u.getLogger().debug("Found id-block"), 29;
|
|
472
|
+
case 2:
|
|
473
|
+
return u.getLogger().debug("Found block"), 10;
|
|
474
|
+
case 3:
|
|
475
|
+
u.getLogger().debug(".", f.yytext);
|
|
476
|
+
break;
|
|
477
|
+
case 4:
|
|
478
|
+
u.getLogger().debug("_", f.yytext);
|
|
479
|
+
break;
|
|
480
|
+
case 5:
|
|
481
|
+
return 5;
|
|
482
|
+
case 6:
|
|
483
|
+
return f.yytext = -1, 28;
|
|
484
|
+
case 7:
|
|
485
|
+
return f.yytext = f.yytext.replace(/columns\s+/, ""), u.getLogger().debug("COLUMNS (LEX)", f.yytext), 28;
|
|
486
|
+
case 8:
|
|
487
|
+
this.pushState("md_string");
|
|
488
|
+
break;
|
|
489
|
+
case 9:
|
|
490
|
+
return "MD_STR";
|
|
491
|
+
case 10:
|
|
492
|
+
this.popState();
|
|
493
|
+
break;
|
|
494
|
+
case 11:
|
|
495
|
+
this.pushState("string");
|
|
496
|
+
break;
|
|
497
|
+
case 12:
|
|
498
|
+
u.getLogger().debug("LEX: POPPING STR:", f.yytext), this.popState();
|
|
499
|
+
break;
|
|
500
|
+
case 13:
|
|
501
|
+
return u.getLogger().debug("LEX: STR end:", f.yytext), "STR";
|
|
502
|
+
case 14:
|
|
503
|
+
return f.yytext = f.yytext.replace(/space\:/, ""), u.getLogger().debug("SPACE NUM (LEX)", f.yytext), 21;
|
|
504
|
+
case 15:
|
|
505
|
+
return f.yytext = "1", u.getLogger().debug("COLUMNS (LEX)", f.yytext), 21;
|
|
506
|
+
case 16:
|
|
507
|
+
return 42;
|
|
508
|
+
case 17:
|
|
509
|
+
return "LINKSTYLE";
|
|
510
|
+
case 18:
|
|
511
|
+
return "INTERPOLATE";
|
|
512
|
+
case 19:
|
|
513
|
+
return this.pushState("CLASSDEF"), 39;
|
|
514
|
+
case 20:
|
|
515
|
+
return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
|
|
516
|
+
case 21:
|
|
517
|
+
return this.popState(), this.pushState("CLASSDEFID"), 40;
|
|
518
|
+
case 22:
|
|
519
|
+
return this.popState(), 41;
|
|
520
|
+
case 23:
|
|
521
|
+
return this.pushState("CLASS"), 43;
|
|
522
|
+
case 24:
|
|
523
|
+
return this.popState(), this.pushState("CLASS_STYLE"), 44;
|
|
524
|
+
case 25:
|
|
525
|
+
return this.popState(), 45;
|
|
526
|
+
case 26:
|
|
527
|
+
return this.pushState("STYLE_STMNT"), 46;
|
|
528
|
+
case 27:
|
|
529
|
+
return this.popState(), this.pushState("STYLE_DEFINITION"), 47;
|
|
530
|
+
case 28:
|
|
531
|
+
return this.popState(), 48;
|
|
532
|
+
case 29:
|
|
533
|
+
return this.pushState("acc_title"), "acc_title";
|
|
534
|
+
case 30:
|
|
535
|
+
return this.popState(), "acc_title_value";
|
|
536
|
+
case 31:
|
|
537
|
+
return this.pushState("acc_descr"), "acc_descr";
|
|
538
|
+
case 32:
|
|
539
|
+
return this.popState(), "acc_descr_value";
|
|
540
|
+
case 33:
|
|
541
|
+
this.pushState("acc_descr_multiline");
|
|
542
|
+
break;
|
|
543
|
+
case 34:
|
|
544
|
+
this.popState();
|
|
545
|
+
break;
|
|
546
|
+
case 35:
|
|
547
|
+
return "acc_descr_multiline_value";
|
|
548
|
+
case 36:
|
|
549
|
+
return 30;
|
|
550
|
+
case 37:
|
|
551
|
+
return this.popState(), u.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
552
|
+
case 38:
|
|
553
|
+
return this.popState(), u.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
554
|
+
case 39:
|
|
555
|
+
return this.popState(), u.getLogger().debug("Lex: ))"), "NODE_DEND";
|
|
556
|
+
case 40:
|
|
557
|
+
return this.popState(), u.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
558
|
+
case 41:
|
|
559
|
+
return this.popState(), u.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
560
|
+
case 42:
|
|
561
|
+
return this.popState(), u.getLogger().debug("Lex: (-"), "NODE_DEND";
|
|
562
|
+
case 43:
|
|
563
|
+
return this.popState(), u.getLogger().debug("Lex: -)"), "NODE_DEND";
|
|
564
|
+
case 44:
|
|
565
|
+
return this.popState(), u.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
566
|
+
case 45:
|
|
567
|
+
return this.popState(), u.getLogger().debug("Lex: ]]"), "NODE_DEND";
|
|
568
|
+
case 46:
|
|
569
|
+
return this.popState(), u.getLogger().debug("Lex: ("), "NODE_DEND";
|
|
570
|
+
case 47:
|
|
571
|
+
return this.popState(), u.getLogger().debug("Lex: ])"), "NODE_DEND";
|
|
572
|
+
case 48:
|
|
573
|
+
return this.popState(), u.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
574
|
+
case 49:
|
|
575
|
+
return this.popState(), u.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
576
|
+
case 50:
|
|
577
|
+
return this.popState(), u.getLogger().debug("Lex: )]"), "NODE_DEND";
|
|
578
|
+
case 51:
|
|
579
|
+
return this.popState(), u.getLogger().debug("Lex: )"), "NODE_DEND";
|
|
580
|
+
case 52:
|
|
581
|
+
return this.popState(), u.getLogger().debug("Lex: ]>"), "NODE_DEND";
|
|
582
|
+
case 53:
|
|
583
|
+
return this.popState(), u.getLogger().debug("Lex: ]"), "NODE_DEND";
|
|
584
|
+
case 54:
|
|
585
|
+
return u.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
|
|
586
|
+
case 55:
|
|
587
|
+
return u.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
|
|
588
|
+
case 56:
|
|
589
|
+
return u.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
|
|
590
|
+
case 57:
|
|
591
|
+
return u.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
592
|
+
case 58:
|
|
593
|
+
return u.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
|
|
594
|
+
case 59:
|
|
595
|
+
return u.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
596
|
+
case 60:
|
|
597
|
+
return u.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
598
|
+
case 61:
|
|
599
|
+
return u.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
600
|
+
case 62:
|
|
601
|
+
return u.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
|
|
602
|
+
case 63:
|
|
603
|
+
return u.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
|
|
604
|
+
case 64:
|
|
605
|
+
return u.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
606
|
+
case 65:
|
|
607
|
+
return this.pushState("NODE"), 35;
|
|
608
|
+
case 66:
|
|
609
|
+
return this.pushState("NODE"), 35;
|
|
610
|
+
case 67:
|
|
611
|
+
return this.pushState("NODE"), 35;
|
|
612
|
+
case 68:
|
|
613
|
+
return this.pushState("NODE"), 35;
|
|
614
|
+
case 69:
|
|
615
|
+
return this.pushState("NODE"), 35;
|
|
616
|
+
case 70:
|
|
617
|
+
return this.pushState("NODE"), 35;
|
|
618
|
+
case 71:
|
|
619
|
+
return this.pushState("NODE"), 35;
|
|
620
|
+
case 72:
|
|
621
|
+
return u.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
|
|
622
|
+
case 73:
|
|
623
|
+
return this.pushState("BLOCK_ARROW"), u.getLogger().debug("LEX ARR START"), 37;
|
|
624
|
+
case 74:
|
|
625
|
+
return u.getLogger().debug("Lex: NODE_ID", f.yytext), 31;
|
|
626
|
+
case 75:
|
|
627
|
+
return u.getLogger().debug("Lex: EOF", f.yytext), 8;
|
|
628
|
+
case 76:
|
|
629
|
+
this.pushState("md_string");
|
|
630
|
+
break;
|
|
631
|
+
case 77:
|
|
632
|
+
this.pushState("md_string");
|
|
633
|
+
break;
|
|
634
|
+
case 78:
|
|
635
|
+
return "NODE_DESCR";
|
|
636
|
+
case 79:
|
|
637
|
+
this.popState();
|
|
638
|
+
break;
|
|
639
|
+
case 80:
|
|
640
|
+
u.getLogger().debug("Lex: Starting string"), this.pushState("string");
|
|
641
|
+
break;
|
|
642
|
+
case 81:
|
|
643
|
+
u.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
|
|
644
|
+
break;
|
|
645
|
+
case 82:
|
|
646
|
+
return u.getLogger().debug("LEX: NODE_DESCR:", f.yytext), "NODE_DESCR";
|
|
647
|
+
case 83:
|
|
648
|
+
u.getLogger().debug("LEX POPPING"), this.popState();
|
|
649
|
+
break;
|
|
650
|
+
case 84:
|
|
651
|
+
u.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
|
|
652
|
+
break;
|
|
653
|
+
case 85:
|
|
654
|
+
return f.yytext = f.yytext.replace(/^,\s*/, ""), u.getLogger().debug("Lex (right): dir:", f.yytext), "DIR";
|
|
655
|
+
case 86:
|
|
656
|
+
return f.yytext = f.yytext.replace(/^,\s*/, ""), u.getLogger().debug("Lex (left):", f.yytext), "DIR";
|
|
657
|
+
case 87:
|
|
658
|
+
return f.yytext = f.yytext.replace(/^,\s*/, ""), u.getLogger().debug("Lex (x):", f.yytext), "DIR";
|
|
659
|
+
case 88:
|
|
660
|
+
return f.yytext = f.yytext.replace(/^,\s*/, ""), u.getLogger().debug("Lex (y):", f.yytext), "DIR";
|
|
661
|
+
case 89:
|
|
662
|
+
return f.yytext = f.yytext.replace(/^,\s*/, ""), u.getLogger().debug("Lex (up):", f.yytext), "DIR";
|
|
663
|
+
case 90:
|
|
664
|
+
return f.yytext = f.yytext.replace(/^,\s*/, ""), u.getLogger().debug("Lex (down):", f.yytext), "DIR";
|
|
665
|
+
case 91:
|
|
666
|
+
return f.yytext = "]>", u.getLogger().debug("Lex (ARROW_DIR end):", f.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
|
|
667
|
+
case 92:
|
|
668
|
+
return u.getLogger().debug("Lex: LINK", "#" + f.yytext + "#"), 15;
|
|
669
|
+
case 93:
|
|
670
|
+
return u.getLogger().debug("Lex: LINK", f.yytext), 15;
|
|
671
|
+
case 94:
|
|
672
|
+
return u.getLogger().debug("Lex: LINK", f.yytext), 15;
|
|
673
|
+
case 95:
|
|
674
|
+
return u.getLogger().debug("Lex: LINK", f.yytext), 15;
|
|
675
|
+
case 96:
|
|
676
|
+
return u.getLogger().debug("Lex: START_LINK", f.yytext), this.pushState("LLABEL"), 16;
|
|
677
|
+
case 97:
|
|
678
|
+
return u.getLogger().debug("Lex: START_LINK", f.yytext), this.pushState("LLABEL"), 16;
|
|
679
|
+
case 98:
|
|
680
|
+
return u.getLogger().debug("Lex: START_LINK", f.yytext), this.pushState("LLABEL"), 16;
|
|
681
|
+
case 99:
|
|
682
|
+
this.pushState("md_string");
|
|
683
|
+
break;
|
|
684
|
+
case 100:
|
|
685
|
+
return u.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
|
|
686
|
+
case 101:
|
|
687
|
+
return this.popState(), u.getLogger().debug("Lex: LINK", "#" + f.yytext + "#"), 15;
|
|
688
|
+
case 102:
|
|
689
|
+
return this.popState(), u.getLogger().debug("Lex: LINK", f.yytext), 15;
|
|
690
|
+
case 103:
|
|
691
|
+
return this.popState(), u.getLogger().debug("Lex: LINK", f.yytext), 15;
|
|
692
|
+
case 104:
|
|
693
|
+
return u.getLogger().debug("Lex: COLON", f.yytext), f.yytext = f.yytext.slice(1), 27;
|
|
694
|
+
}
|
|
695
|
+
}, "anonymous"),
|
|
696
|
+
rules: [/^(?:block-beta\b)/, /^(?:block:)/, /^(?:block\b)/, /^(?:[\s]+)/, /^(?:[\n]+)/, /^(?:((\u000D\u000A)|(\u000A)))/, /^(?:columns\s+auto\b)/, /^(?:columns\s+[\d]+)/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:space[:]\d+)/, /^(?:space\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\s+)/, /^(?:DEFAULT\s+)/, /^(?:\w+\s+)/, /^(?:[^\n]*)/, /^(?:class\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:style\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:end\b\s*)/, /^(?:\(\(\()/, /^(?:\)\)\))/, /^(?:[\)]\))/, /^(?:\}\})/, /^(?:\})/, /^(?:\(-)/, /^(?:-\))/, /^(?:\(\()/, /^(?:\]\])/, /^(?:\()/, /^(?:\]\))/, /^(?:\\\])/, /^(?:\/\])/, /^(?:\)\])/, /^(?:[\)])/, /^(?:\]>)/, /^(?:[\]])/, /^(?:-\))/, /^(?:\(-)/, /^(?:\)\))/, /^(?:\))/, /^(?:\(\(\()/, /^(?:\(\()/, /^(?:\{\{)/, /^(?:\{)/, /^(?:>)/, /^(?:\(\[)/, /^(?:\()/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\[\\)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:\[)/, /^(?:<\[)/, /^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/, /^(?:$)/, /^(?:["][`])/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:\]>\s*\()/, /^(?:,?\s*right\s*)/, /^(?:,?\s*left\s*)/, /^(?:,?\s*x\s*)/, /^(?:,?\s*y\s*)/, /^(?:,?\s*up\s*)/, /^(?:,?\s*down\s*)/, /^(?:\)\s*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*~~[\~]+\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:["][`])/, /^(?:["])/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?::\d+)/],
|
|
697
|
+
conditions: { STYLE_DEFINITION: { rules: [28], inclusive: !1 }, STYLE_STMNT: { rules: [27], inclusive: !1 }, CLASSDEFID: { rules: [22], inclusive: !1 }, CLASSDEF: { rules: [20, 21], inclusive: !1 }, CLASS_STYLE: { rules: [25], inclusive: !1 }, CLASS: { rules: [24], inclusive: !1 }, LLABEL: { rules: [99, 100, 101, 102, 103], inclusive: !1 }, ARROW_DIR: { rules: [85, 86, 87, 88, 89, 90, 91], inclusive: !1 }, BLOCK_ARROW: { rules: [76, 81, 84], inclusive: !1 }, NODE: { rules: [37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 77, 80], inclusive: !1 }, md_string: { rules: [9, 10, 78, 79], inclusive: !1 }, space: { rules: [], inclusive: !1 }, string: { rules: [12, 13, 82, 83], inclusive: !1 }, acc_descr_multiline: { rules: [34, 35], inclusive: !1 }, acc_descr: { rules: [32], inclusive: !1 }, acc_title: { rules: [30], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 14, 15, 16, 17, 18, 19, 23, 26, 29, 31, 33, 36, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 92, 93, 94, 95, 96, 97, 98, 104], inclusive: !0 } }
|
|
698
|
+
};
|
|
699
|
+
return D;
|
|
700
|
+
})();
|
|
701
|
+
k.lexer = C;
|
|
702
|
+
function _() {
|
|
703
|
+
this.yy = {};
|
|
704
|
+
}
|
|
705
|
+
return g(_, "Parser"), _.prototype = k, k.Parser = _, new _();
|
|
706
|
+
})();
|
|
707
|
+
St.parser = St;
|
|
708
|
+
var ia = St, K = /* @__PURE__ */ new Map(), Tt = [], Lt = /* @__PURE__ */ new Map(), Ft = "color", Pt = "fill", na = "bgFill", ee = ",", la = R(), gt = /* @__PURE__ */ new Map(), ca = /* @__PURE__ */ g((e) => Ue.sanitizeText(e, la), "sanitizeText"), oa = /* @__PURE__ */ g(function(e, t = "") {
|
|
709
|
+
let a = gt.get(e);
|
|
710
|
+
a || (a = { id: e, styles: [], textStyles: [] }, gt.set(e, a)), t?.split(ee).forEach((i) => {
|
|
711
|
+
const l = i.replace(/([^;]*);/, "$1").trim();
|
|
712
|
+
if (RegExp(Ft).exec(i)) {
|
|
713
|
+
const r = l.replace(Pt, na).replace(Ft, Pt);
|
|
714
|
+
a.textStyles.push(r);
|
|
715
|
+
}
|
|
716
|
+
a.styles.push(l);
|
|
717
|
+
});
|
|
718
|
+
}, "addStyleClass"), ha = /* @__PURE__ */ g(function(e, t = "") {
|
|
719
|
+
const a = K.get(e);
|
|
720
|
+
t != null && (a.styles = t.split(ee));
|
|
721
|
+
}, "addStyle2Node"), ga = /* @__PURE__ */ g(function(e, t) {
|
|
722
|
+
e.split(",").forEach(function(a) {
|
|
723
|
+
let i = K.get(a);
|
|
724
|
+
if (i === void 0) {
|
|
725
|
+
const l = a.trim();
|
|
726
|
+
i = { id: l, type: "na", children: [] }, K.set(l, i);
|
|
727
|
+
}
|
|
728
|
+
i.classes || (i.classes = []), i.classes.push(t);
|
|
729
|
+
});
|
|
730
|
+
}, "setCssClass"), re = /* @__PURE__ */ g((e, t) => {
|
|
731
|
+
const a = e.flat(), i = [], s = a.find((r) => r?.type === "column-setting")?.columns ?? -1;
|
|
732
|
+
for (const r of a) {
|
|
733
|
+
if (typeof s == "number" && s > 0 && r.type !== "column-setting" && typeof r.widthInColumns == "number" && r.widthInColumns > s && S.warn(
|
|
734
|
+
`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${s}`
|
|
735
|
+
), r.label && (r.label = ca(r.label)), r.type === "classDef") {
|
|
736
|
+
oa(r.id, r.css);
|
|
737
|
+
continue;
|
|
738
|
+
}
|
|
739
|
+
if (r.type === "applyClass") {
|
|
740
|
+
ga(r.id, r?.styleClass ?? "");
|
|
741
|
+
continue;
|
|
742
|
+
}
|
|
743
|
+
if (r.type === "applyStyles") {
|
|
744
|
+
r?.stylesStr && ha(r.id, r?.stylesStr);
|
|
745
|
+
continue;
|
|
746
|
+
}
|
|
747
|
+
if (r.type === "column-setting")
|
|
748
|
+
t.columns = r.columns ?? -1;
|
|
749
|
+
else if (r.type === "edge") {
|
|
750
|
+
const n = (Lt.get(r.id) ?? 0) + 1;
|
|
751
|
+
Lt.set(r.id, n), r.id = n + "-" + r.id, Tt.push(r);
|
|
752
|
+
} else {
|
|
753
|
+
r.label || (r.type === "composite" ? r.label = "" : r.label = r.id);
|
|
754
|
+
const n = K.get(r.id);
|
|
755
|
+
if (n === void 0 ? K.set(r.id, r) : (r.type !== "na" && (n.type = r.type), r.label !== r.id && (n.label = r.label)), r.children && re(r.children, r), r.type === "space") {
|
|
756
|
+
const c = r.width ?? 1;
|
|
757
|
+
for (let d = 0; d < c; d++) {
|
|
758
|
+
const o = sa(r);
|
|
759
|
+
o.id = o.id + "-" + d, K.set(o.id, o), i.push(o);
|
|
760
|
+
}
|
|
761
|
+
} else n === void 0 && i.push(r);
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
t.children = i;
|
|
765
|
+
}, "populateBlockDatabase"), Dt = [], rt = { id: "root", type: "composite", children: [], columns: -1 }, da = /* @__PURE__ */ g(() => {
|
|
766
|
+
S.debug("Clear called"), ze(), rt = { id: "root", type: "composite", children: [], columns: -1 }, K = /* @__PURE__ */ new Map([["root", rt]]), Dt = [], gt = /* @__PURE__ */ new Map(), Tt = [], Lt = /* @__PURE__ */ new Map();
|
|
767
|
+
}, "clear");
|
|
768
|
+
function ae(e) {
|
|
769
|
+
switch (S.debug("typeStr2Type", e), e) {
|
|
770
|
+
case "[]":
|
|
771
|
+
return "square";
|
|
772
|
+
case "()":
|
|
773
|
+
return S.debug("we have a round"), "round";
|
|
774
|
+
case "(())":
|
|
775
|
+
return "circle";
|
|
776
|
+
case ">]":
|
|
777
|
+
return "rect_left_inv_arrow";
|
|
778
|
+
case "{}":
|
|
779
|
+
return "diamond";
|
|
780
|
+
case "{{}}":
|
|
781
|
+
return "hexagon";
|
|
782
|
+
case "([])":
|
|
783
|
+
return "stadium";
|
|
784
|
+
case "[[]]":
|
|
785
|
+
return "subroutine";
|
|
786
|
+
case "[()]":
|
|
787
|
+
return "cylinder";
|
|
788
|
+
case "((()))":
|
|
789
|
+
return "doublecircle";
|
|
790
|
+
case "[//]":
|
|
791
|
+
return "lean_right";
|
|
792
|
+
case "[\\\\]":
|
|
793
|
+
return "lean_left";
|
|
794
|
+
case "[/\\]":
|
|
795
|
+
return "trapezoid";
|
|
796
|
+
case "[\\/]":
|
|
797
|
+
return "inv_trapezoid";
|
|
798
|
+
case "<[]>":
|
|
799
|
+
return "block_arrow";
|
|
800
|
+
default:
|
|
801
|
+
return "na";
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
g(ae, "typeStr2Type");
|
|
805
|
+
function se(e) {
|
|
806
|
+
switch (S.debug("typeStr2Type", e), e) {
|
|
807
|
+
case "==":
|
|
808
|
+
return "thick";
|
|
809
|
+
default:
|
|
810
|
+
return "normal";
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
g(se, "edgeTypeStr2Type");
|
|
814
|
+
function ie(e) {
|
|
815
|
+
switch (e.replace(/^[\s-]+|[\s-]+$/g, "")) {
|
|
816
|
+
case "x":
|
|
817
|
+
return "arrow_cross";
|
|
818
|
+
case "o":
|
|
819
|
+
return "arrow_circle";
|
|
820
|
+
case ">":
|
|
821
|
+
return "arrow_point";
|
|
822
|
+
default:
|
|
823
|
+
return "";
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
g(ie, "edgeStrToEdgeData");
|
|
827
|
+
var Wt = 0, ua = /* @__PURE__ */ g(() => (Wt++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + Wt), "generateId"), pa = /* @__PURE__ */ g((e) => {
|
|
828
|
+
rt.children = e, re(e, rt), Dt = rt.children;
|
|
829
|
+
}, "setHierarchy"), fa = /* @__PURE__ */ g((e) => {
|
|
830
|
+
const t = K.get(e);
|
|
831
|
+
return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
|
|
832
|
+
}, "getColumns"), ya = /* @__PURE__ */ g(() => [...K.values()], "getBlocksFlat"), xa = /* @__PURE__ */ g(() => Dt || [], "getBlocks"), ba = /* @__PURE__ */ g(() => Tt, "getEdges"), wa = /* @__PURE__ */ g((e) => K.get(e), "getBlock"), ma = /* @__PURE__ */ g((e) => {
|
|
833
|
+
K.set(e.id, e);
|
|
834
|
+
}, "setBlock"), Sa = /* @__PURE__ */ g(() => S, "getLogger"), La = /* @__PURE__ */ g(function() {
|
|
835
|
+
return gt;
|
|
836
|
+
}, "getClasses"), va = {
|
|
837
|
+
getConfig: /* @__PURE__ */ g(() => at().block, "getConfig"),
|
|
838
|
+
typeStr2Type: ae,
|
|
839
|
+
edgeTypeStr2Type: se,
|
|
840
|
+
edgeStrToEdgeData: ie,
|
|
841
|
+
getLogger: Sa,
|
|
842
|
+
getBlocksFlat: ya,
|
|
843
|
+
getBlocks: xa,
|
|
844
|
+
getEdges: ba,
|
|
845
|
+
setHierarchy: pa,
|
|
846
|
+
getBlock: wa,
|
|
847
|
+
setBlock: ma,
|
|
848
|
+
getColumns: fa,
|
|
849
|
+
getClasses: La,
|
|
850
|
+
clear: da,
|
|
851
|
+
generateId: ua
|
|
852
|
+
}, ka = va, lt = /* @__PURE__ */ g((e, t) => {
|
|
853
|
+
const a = qe, i = a(e, "r"), l = a(e, "g"), s = a(e, "b");
|
|
854
|
+
return Me(i, l, s, t);
|
|
855
|
+
}, "fade"), Ea = /* @__PURE__ */ g((e) => `.label {
|
|
856
|
+
font-family: ${e.fontFamily};
|
|
857
|
+
color: ${e.nodeTextColor || e.textColor};
|
|
858
|
+
}
|
|
859
|
+
.cluster-label text {
|
|
860
|
+
fill: ${e.titleColor};
|
|
861
|
+
}
|
|
862
|
+
.cluster-label span,p {
|
|
863
|
+
color: ${e.titleColor};
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
|
|
867
|
+
|
|
868
|
+
.label text,span,p {
|
|
869
|
+
fill: ${e.nodeTextColor || e.textColor};
|
|
870
|
+
color: ${e.nodeTextColor || e.textColor};
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
.node rect,
|
|
874
|
+
.node circle,
|
|
875
|
+
.node ellipse,
|
|
876
|
+
.node polygon,
|
|
877
|
+
.node path {
|
|
878
|
+
fill: ${e.mainBkg};
|
|
879
|
+
stroke: ${e.nodeBorder};
|
|
880
|
+
stroke-width: 1px;
|
|
881
|
+
}
|
|
882
|
+
.flowchart-label text {
|
|
883
|
+
text-anchor: middle;
|
|
884
|
+
}
|
|
885
|
+
// .flowchart-label .text-outer-tspan {
|
|
886
|
+
// text-anchor: middle;
|
|
887
|
+
// }
|
|
888
|
+
// .flowchart-label .text-inner-tspan {
|
|
889
|
+
// text-anchor: start;
|
|
890
|
+
// }
|
|
891
|
+
|
|
892
|
+
.node .label {
|
|
893
|
+
text-align: center;
|
|
894
|
+
}
|
|
895
|
+
.node.clickable {
|
|
896
|
+
cursor: pointer;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
.arrowheadPath {
|
|
900
|
+
fill: ${e.arrowheadColor};
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
.edgePath .path {
|
|
904
|
+
stroke: ${e.lineColor};
|
|
905
|
+
stroke-width: 2.0px;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
.flowchart-link {
|
|
909
|
+
stroke: ${e.lineColor};
|
|
910
|
+
fill: none;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
.edgeLabel {
|
|
914
|
+
background-color: ${e.edgeLabelBackground};
|
|
915
|
+
rect {
|
|
916
|
+
opacity: 0.5;
|
|
917
|
+
background-color: ${e.edgeLabelBackground};
|
|
918
|
+
fill: ${e.edgeLabelBackground};
|
|
919
|
+
}
|
|
920
|
+
text-align: center;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/* For html labels only */
|
|
924
|
+
.labelBkg {
|
|
925
|
+
background-color: ${lt(e.edgeLabelBackground, 0.5)};
|
|
926
|
+
// background-color:
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
.node .cluster {
|
|
930
|
+
// fill: ${lt(e.mainBkg, 0.5)};
|
|
931
|
+
fill: ${lt(e.clusterBkg, 0.5)};
|
|
932
|
+
stroke: ${lt(e.clusterBorder, 0.2)};
|
|
933
|
+
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
934
|
+
stroke-width: 1px;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
.cluster text {
|
|
938
|
+
fill: ${e.titleColor};
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
.cluster span,p {
|
|
942
|
+
color: ${e.titleColor};
|
|
943
|
+
}
|
|
944
|
+
/* .cluster div {
|
|
945
|
+
color: ${e.titleColor};
|
|
946
|
+
} */
|
|
947
|
+
|
|
948
|
+
div.mermaidTooltip {
|
|
949
|
+
position: absolute;
|
|
950
|
+
text-align: center;
|
|
951
|
+
max-width: 200px;
|
|
952
|
+
padding: 2px;
|
|
953
|
+
font-family: ${e.fontFamily};
|
|
954
|
+
font-size: 12px;
|
|
955
|
+
background: ${e.tertiaryColor};
|
|
956
|
+
border: 1px solid ${e.border2};
|
|
957
|
+
border-radius: 2px;
|
|
958
|
+
pointer-events: none;
|
|
959
|
+
z-index: 100;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
.flowchartTitleText {
|
|
963
|
+
text-anchor: middle;
|
|
964
|
+
font-size: 18px;
|
|
965
|
+
fill: ${e.textColor};
|
|
966
|
+
}
|
|
967
|
+
${ke()}
|
|
968
|
+
`, "getStyles"), _a = Ea, Ta = /* @__PURE__ */ g((e, t, a, i) => {
|
|
969
|
+
t.forEach((l) => {
|
|
970
|
+
Ma[l](e, a, i);
|
|
971
|
+
});
|
|
972
|
+
}, "insertMarkers"), Da = /* @__PURE__ */ g((e, t, a) => {
|
|
973
|
+
S.trace("Making markers for ", a), e.append("defs").append("marker").attr("id", a + "_" + t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
|
|
974
|
+
}, "extension"), Na = /* @__PURE__ */ g((e, t, a) => {
|
|
975
|
+
e.append("defs").append("marker").attr("id", a + "_" + t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
976
|
+
}, "composition"), Ba = /* @__PURE__ */ g((e, t, a) => {
|
|
977
|
+
e.append("defs").append("marker").attr("id", a + "_" + t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
978
|
+
}, "aggregation"), Ca = /* @__PURE__ */ g((e, t, a) => {
|
|
979
|
+
e.append("defs").append("marker").attr("id", a + "_" + t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
|
|
980
|
+
}, "dependency"), Ia = /* @__PURE__ */ g((e, t, a) => {
|
|
981
|
+
e.append("defs").append("marker").attr("id", a + "_" + t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", a + "_" + t + "-lollipopEnd").attr("class", "marker lollipop " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
|
|
982
|
+
}, "lollipop"), Aa = /* @__PURE__ */ g((e, t, a) => {
|
|
983
|
+
e.append("marker").attr("id", a + "_" + t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", a + "_" + t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
984
|
+
}, "point"), Oa = /* @__PURE__ */ g((e, t, a) => {
|
|
985
|
+
e.append("marker").attr("id", a + "_" + t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", a + "_" + t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
986
|
+
}, "circle"), Ra = /* @__PURE__ */ g((e, t, a) => {
|
|
987
|
+
e.append("marker").attr("id", a + "_" + t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", a + "_" + t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
|
|
988
|
+
}, "cross"), za = /* @__PURE__ */ g((e, t, a) => {
|
|
989
|
+
e.append("defs").append("marker").attr("id", a + "_" + t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
|
|
990
|
+
}, "barb"), Ma = {
|
|
991
|
+
extension: Da,
|
|
992
|
+
composition: Na,
|
|
993
|
+
aggregation: Ba,
|
|
994
|
+
dependency: Ca,
|
|
995
|
+
lollipop: Ia,
|
|
996
|
+
point: Aa,
|
|
997
|
+
circle: Oa,
|
|
998
|
+
cross: Ra,
|
|
999
|
+
barb: za
|
|
1000
|
+
}, ja = Ta, I = R()?.block?.padding ?? 8;
|
|
1001
|
+
function ne(e, t) {
|
|
1002
|
+
if (e === 0 || !Number.isInteger(e))
|
|
1003
|
+
throw new Error("Columns must be an integer !== 0.");
|
|
1004
|
+
if (t < 0 || !Number.isInteger(t))
|
|
1005
|
+
throw new Error("Position must be a non-negative integer." + t);
|
|
1006
|
+
if (e < 0)
|
|
1007
|
+
return { px: t, py: 0 };
|
|
1008
|
+
if (e === 1)
|
|
1009
|
+
return { px: 0, py: t };
|
|
1010
|
+
const a = t % e, i = Math.floor(t / e);
|
|
1011
|
+
return { px: a, py: i };
|
|
1012
|
+
}
|
|
1013
|
+
g(ne, "calculateBlockPosition");
|
|
1014
|
+
var Fa = /* @__PURE__ */ g((e) => {
|
|
1015
|
+
let t = 0, a = 0;
|
|
1016
|
+
for (const i of e.children) {
|
|
1017
|
+
const { width: l, height: s, x: r, y: n } = i.size ?? { width: 0, height: 0, x: 0, y: 0 };
|
|
1018
|
+
S.debug(
|
|
1019
|
+
"getMaxChildSize abc95 child:",
|
|
1020
|
+
i.id,
|
|
1021
|
+
"width:",
|
|
1022
|
+
l,
|
|
1023
|
+
"height:",
|
|
1024
|
+
s,
|
|
1025
|
+
"x:",
|
|
1026
|
+
r,
|
|
1027
|
+
"y:",
|
|
1028
|
+
n,
|
|
1029
|
+
i.type
|
|
1030
|
+
), i.type !== "space" && (l > t && (t = l / (e.widthInColumns ?? 1)), s > a && (a = s));
|
|
1031
|
+
}
|
|
1032
|
+
return { width: t, height: a };
|
|
1033
|
+
}, "getMaxChildSize");
|
|
1034
|
+
function dt(e, t, a = 0, i = 0) {
|
|
1035
|
+
S.debug(
|
|
1036
|
+
"setBlockSizes abc95 (start)",
|
|
1037
|
+
e.id,
|
|
1038
|
+
e?.size?.x,
|
|
1039
|
+
"block width =",
|
|
1040
|
+
e?.size,
|
|
1041
|
+
"siblingWidth",
|
|
1042
|
+
a
|
|
1043
|
+
), e?.size?.width || (e.size = {
|
|
1044
|
+
width: a,
|
|
1045
|
+
height: i,
|
|
1046
|
+
x: 0,
|
|
1047
|
+
y: 0
|
|
1048
|
+
});
|
|
1049
|
+
let l = 0, s = 0;
|
|
1050
|
+
if (e.children?.length > 0) {
|
|
1051
|
+
for (const x of e.children)
|
|
1052
|
+
dt(x, t);
|
|
1053
|
+
const r = Fa(e);
|
|
1054
|
+
l = r.width, s = r.height, S.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", l, s);
|
|
1055
|
+
for (const x of e.children)
|
|
1056
|
+
x.size && (S.debug(
|
|
1057
|
+
`abc95 Setting size of children of ${e.id} id=${x.id} ${l} ${s} ${JSON.stringify(x.size)}`
|
|
1058
|
+
), x.size.width = l * (x.widthInColumns ?? 1) + I * ((x.widthInColumns ?? 1) - 1), x.size.height = s, x.size.x = 0, x.size.y = 0, S.debug(
|
|
1059
|
+
`abc95 updating size of ${e.id} children child:${x.id} maxWidth:${l} maxHeight:${s}`
|
|
1060
|
+
));
|
|
1061
|
+
for (const x of e.children)
|
|
1062
|
+
dt(x, t, l, s);
|
|
1063
|
+
const n = e.columns ?? -1;
|
|
1064
|
+
let c = 0;
|
|
1065
|
+
for (const x of e.children)
|
|
1066
|
+
c += x.widthInColumns ?? 1;
|
|
1067
|
+
let d = e.children.length;
|
|
1068
|
+
n > 0 && n < c && (d = n);
|
|
1069
|
+
const o = Math.ceil(c / d);
|
|
1070
|
+
let y = d * (l + I) + I, w = o * (s + I) + I;
|
|
1071
|
+
if (y < a) {
|
|
1072
|
+
S.debug(
|
|
1073
|
+
`Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${i} width ${y}`
|
|
1074
|
+
), y = a, w = i;
|
|
1075
|
+
const x = (a - d * I - I) / d, L = (i - o * I - I) / o;
|
|
1076
|
+
S.debug("Size indata abc88", e.id, "childWidth", x, "maxWidth", l), S.debug("Size indata abc88", e.id, "childHeight", L, "maxHeight", s), S.debug("Size indata abc88 xSize", d, "padding", I);
|
|
1077
|
+
for (const v of e.children)
|
|
1078
|
+
v.size && (v.size.width = x, v.size.height = L, v.size.x = 0, v.size.y = 0);
|
|
1079
|
+
}
|
|
1080
|
+
if (S.debug(
|
|
1081
|
+
`abc95 (finale calc) ${e.id} xSize ${d} ySize ${o} columns ${n}${e.children.length} width=${Math.max(y, e.size?.width || 0)}`
|
|
1082
|
+
), y < (e?.size?.width || 0)) {
|
|
1083
|
+
y = e?.size?.width || 0;
|
|
1084
|
+
const x = n > 0 ? Math.min(e.children.length, n) : e.children.length;
|
|
1085
|
+
if (x > 0) {
|
|
1086
|
+
const L = (y - x * I - I) / x;
|
|
1087
|
+
S.debug("abc95 (growing to fit) width", e.id, y, e.size?.width, L);
|
|
1088
|
+
for (const v of e.children)
|
|
1089
|
+
v.size && (v.size.width = L);
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
e.size = {
|
|
1093
|
+
width: y,
|
|
1094
|
+
height: w,
|
|
1095
|
+
x: 0,
|
|
1096
|
+
y: 0
|
|
1097
|
+
};
|
|
1098
|
+
}
|
|
1099
|
+
S.debug(
|
|
1100
|
+
"setBlockSizes abc94 (done)",
|
|
1101
|
+
e.id,
|
|
1102
|
+
e?.size?.x,
|
|
1103
|
+
e?.size?.width,
|
|
1104
|
+
e?.size?.y,
|
|
1105
|
+
e?.size?.height
|
|
1106
|
+
);
|
|
1107
|
+
}
|
|
1108
|
+
g(dt, "setBlockSizes");
|
|
1109
|
+
function Nt(e, t) {
|
|
1110
|
+
S.debug(
|
|
1111
|
+
`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`
|
|
1112
|
+
);
|
|
1113
|
+
const a = e.columns ?? -1;
|
|
1114
|
+
if (S.debug("layoutBlocks columns abc95", e.id, "=>", a, e), e.children && // find max width of children
|
|
1115
|
+
e.children.length > 0) {
|
|
1116
|
+
const i = e?.children[0]?.size?.width ?? 0, l = e.children.length * i + (e.children.length - 1) * I;
|
|
1117
|
+
S.debug("widthOfChildren 88", l, "posX");
|
|
1118
|
+
let s = 0;
|
|
1119
|
+
S.debug("abc91 block?.size?.x", e.id, e?.size?.x);
|
|
1120
|
+
let r = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -I, n = 0;
|
|
1121
|
+
for (const c of e.children) {
|
|
1122
|
+
const d = e;
|
|
1123
|
+
if (!c.size)
|
|
1124
|
+
continue;
|
|
1125
|
+
const { width: o, height: y } = c.size, { px: w, py: x } = ne(a, s);
|
|
1126
|
+
if (x != n && (n = x, r = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -I, S.debug("New row in layout for block", e.id, " and child ", c.id, n)), S.debug(
|
|
1127
|
+
`abc89 layout blocks (child) id: ${c.id} Pos: ${s} (px, py) ${w},${x} (${d?.size?.x},${d?.size?.y}) parent: ${d.id} width: ${o}${I}`
|
|
1128
|
+
), d.size) {
|
|
1129
|
+
const v = o / 2;
|
|
1130
|
+
c.size.x = r + I + v, S.debug(
|
|
1131
|
+
`abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${r} new startingPosX${c.size.x} ${v} padding=${I} width=${o} halfWidth=${v} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${o * (c?.widthInColumns ?? 1) / 2}`
|
|
1132
|
+
), r = c.size.x + v, c.size.y = d.size.y - d.size.height / 2 + x * (y + I) + y / 2 + I, S.debug(
|
|
1133
|
+
`abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${r}${I}${v}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${o * (c?.widthInColumns ?? 1) / 2}`
|
|
1134
|
+
);
|
|
1135
|
+
}
|
|
1136
|
+
c.children && Nt(c);
|
|
1137
|
+
let L = c?.widthInColumns ?? 1;
|
|
1138
|
+
a > 0 && (L = Math.min(L, a - s % a)), s += L, S.debug("abc88 columnsPos", c, s);
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
S.debug(
|
|
1142
|
+
`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`
|
|
1143
|
+
);
|
|
1144
|
+
}
|
|
1145
|
+
g(Nt, "layoutBlocks");
|
|
1146
|
+
function Bt(e, { minX: t, minY: a, maxX: i, maxY: l } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
|
|
1147
|
+
if (e.size && e.id !== "root") {
|
|
1148
|
+
const { x: s, y: r, width: n, height: c } = e.size;
|
|
1149
|
+
s - n / 2 < t && (t = s - n / 2), r - c / 2 < a && (a = r - c / 2), s + n / 2 > i && (i = s + n / 2), r + c / 2 > l && (l = r + c / 2);
|
|
1150
|
+
}
|
|
1151
|
+
if (e.children)
|
|
1152
|
+
for (const s of e.children)
|
|
1153
|
+
({ minX: t, minY: a, maxX: i, maxY: l } = Bt(s, { minX: t, minY: a, maxX: i, maxY: l }));
|
|
1154
|
+
return { minX: t, minY: a, maxX: i, maxY: l };
|
|
1155
|
+
}
|
|
1156
|
+
g(Bt, "findBounds");
|
|
1157
|
+
function le(e) {
|
|
1158
|
+
const t = e.getBlock("root");
|
|
1159
|
+
if (!t)
|
|
1160
|
+
return;
|
|
1161
|
+
dt(t, e, 0, 0), Nt(t), S.debug("getBlocks", JSON.stringify(t, null, 2));
|
|
1162
|
+
const { minX: a, minY: i, maxX: l, maxY: s } = Bt(t), r = s - i, n = l - a;
|
|
1163
|
+
return { x: a, y: i, width: n, height: r };
|
|
1164
|
+
}
|
|
1165
|
+
g(le, "layout");
|
|
1166
|
+
function vt(e, t) {
|
|
1167
|
+
t && e.attr("style", t);
|
|
1168
|
+
}
|
|
1169
|
+
g(vt, "applyStyle");
|
|
1170
|
+
function ce(e, t) {
|
|
1171
|
+
const a = O(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), i = a.append("xhtml:div"), l = e.label, s = e.isNode ? "nodeLabel" : "edgeLabel", r = i.append("span");
|
|
1172
|
+
return r.html(mt(l, t)), vt(r, e.labelStyle), r.attr("class", s), vt(i, e.labelStyle), i.style("display", "inline-block"), i.style("white-space", "nowrap"), i.attr("xmlns", "http://www.w3.org/1999/xhtml"), a.node();
|
|
1173
|
+
}
|
|
1174
|
+
g(ce, "addHtmlLabel");
|
|
1175
|
+
var Pa = /* @__PURE__ */ g(async (e, t, a, i) => {
|
|
1176
|
+
let l = e || "";
|
|
1177
|
+
typeof l == "object" && (l = l[0]);
|
|
1178
|
+
const s = R();
|
|
1179
|
+
if (V(s.flowchart.htmlLabels)) {
|
|
1180
|
+
l = l.replace(/\\n|\n/g, "<br />"), S.debug("vertexText" + l);
|
|
1181
|
+
const r = await He(wt(l)), n = {
|
|
1182
|
+
isNode: i,
|
|
1183
|
+
label: r,
|
|
1184
|
+
labelStyle: t.replace("fill:", "color:")
|
|
1185
|
+
};
|
|
1186
|
+
return ce(n, s);
|
|
1187
|
+
} else {
|
|
1188
|
+
const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1189
|
+
r.setAttribute("style", t.replace("color:", "fill:"));
|
|
1190
|
+
let n = [];
|
|
1191
|
+
typeof l == "string" ? n = l.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(l) ? n = l : n = [];
|
|
1192
|
+
for (const c of n) {
|
|
1193
|
+
const d = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
1194
|
+
d.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), d.setAttribute("dy", "1em"), d.setAttribute("x", "0"), a ? d.setAttribute("class", "title-row") : d.setAttribute("class", "row"), d.textContent = c.trim(), r.appendChild(d);
|
|
1195
|
+
}
|
|
1196
|
+
return r;
|
|
1197
|
+
}
|
|
1198
|
+
}, "createLabel"), H = Pa, Wa = /* @__PURE__ */ g((e, t, a, i, l) => {
|
|
1199
|
+
t.arrowTypeStart && Yt(e, "start", t.arrowTypeStart, a, i, l), t.arrowTypeEnd && Yt(e, "end", t.arrowTypeEnd, a, i, l);
|
|
1200
|
+
}, "addEdgeMarkers"), Ya = {
|
|
1201
|
+
arrow_cross: "cross",
|
|
1202
|
+
arrow_point: "point",
|
|
1203
|
+
arrow_barb: "barb",
|
|
1204
|
+
arrow_circle: "circle",
|
|
1205
|
+
aggregation: "aggregation",
|
|
1206
|
+
extension: "extension",
|
|
1207
|
+
composition: "composition",
|
|
1208
|
+
dependency: "dependency",
|
|
1209
|
+
lollipop: "lollipop"
|
|
1210
|
+
}, Yt = /* @__PURE__ */ g((e, t, a, i, l, s) => {
|
|
1211
|
+
const r = Ya[a];
|
|
1212
|
+
if (!r) {
|
|
1213
|
+
S.warn(`Unknown arrow type: ${a}`);
|
|
1214
|
+
return;
|
|
1215
|
+
}
|
|
1216
|
+
const n = t === "start" ? "Start" : "End";
|
|
1217
|
+
e.attr(`marker-${t}`, `url(${i}#${l}_${s}-${r}${n})`);
|
|
1218
|
+
}, "addEdgeMarker"), kt = {}, j = {}, Ua = /* @__PURE__ */ g(async (e, t) => {
|
|
1219
|
+
const a = R(), i = V(a.flowchart.htmlLabels), l = t.labelType === "markdown" ? qt(
|
|
1220
|
+
e,
|
|
1221
|
+
t.label,
|
|
1222
|
+
{
|
|
1223
|
+
style: t.labelStyle,
|
|
1224
|
+
useHtmlLabels: i,
|
|
1225
|
+
addSvgBackground: !0
|
|
1226
|
+
},
|
|
1227
|
+
a
|
|
1228
|
+
) : await H(t.label, t.labelStyle), s = e.insert("g").attr("class", "edgeLabel"), r = s.insert("g").attr("class", "label");
|
|
1229
|
+
r.node().appendChild(l);
|
|
1230
|
+
let n = l.getBBox();
|
|
1231
|
+
if (i) {
|
|
1232
|
+
const d = l.children[0], o = O(l);
|
|
1233
|
+
n = d.getBoundingClientRect(), o.attr("width", n.width), o.attr("height", n.height);
|
|
1234
|
+
}
|
|
1235
|
+
r.attr("transform", "translate(" + -n.width / 2 + ", " + -n.height / 2 + ")"), kt[t.id] = s, t.width = n.width, t.height = n.height;
|
|
1236
|
+
let c;
|
|
1237
|
+
if (t.startLabelLeft) {
|
|
1238
|
+
const d = await H(t.startLabelLeft, t.labelStyle), o = e.insert("g").attr("class", "edgeTerminals"), y = o.insert("g").attr("class", "inner");
|
|
1239
|
+
c = y.node().appendChild(d);
|
|
1240
|
+
const w = d.getBBox();
|
|
1241
|
+
y.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), j[t.id] || (j[t.id] = {}), j[t.id].startLeft = o, et(c, t.startLabelLeft);
|
|
1242
|
+
}
|
|
1243
|
+
if (t.startLabelRight) {
|
|
1244
|
+
const d = await H(t.startLabelRight, t.labelStyle), o = e.insert("g").attr("class", "edgeTerminals"), y = o.insert("g").attr("class", "inner");
|
|
1245
|
+
c = o.node().appendChild(d), y.node().appendChild(d);
|
|
1246
|
+
const w = d.getBBox();
|
|
1247
|
+
y.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), j[t.id] || (j[t.id] = {}), j[t.id].startRight = o, et(c, t.startLabelRight);
|
|
1248
|
+
}
|
|
1249
|
+
if (t.endLabelLeft) {
|
|
1250
|
+
const d = await H(t.endLabelLeft, t.labelStyle), o = e.insert("g").attr("class", "edgeTerminals"), y = o.insert("g").attr("class", "inner");
|
|
1251
|
+
c = y.node().appendChild(d);
|
|
1252
|
+
const w = d.getBBox();
|
|
1253
|
+
y.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), o.node().appendChild(d), j[t.id] || (j[t.id] = {}), j[t.id].endLeft = o, et(c, t.endLabelLeft);
|
|
1254
|
+
}
|
|
1255
|
+
if (t.endLabelRight) {
|
|
1256
|
+
const d = await H(t.endLabelRight, t.labelStyle), o = e.insert("g").attr("class", "edgeTerminals"), y = o.insert("g").attr("class", "inner");
|
|
1257
|
+
c = y.node().appendChild(d);
|
|
1258
|
+
const w = d.getBBox();
|
|
1259
|
+
y.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), o.node().appendChild(d), j[t.id] || (j[t.id] = {}), j[t.id].endRight = o, et(c, t.endLabelRight);
|
|
1260
|
+
}
|
|
1261
|
+
return l;
|
|
1262
|
+
}, "insertEdgeLabel");
|
|
1263
|
+
function et(e, t) {
|
|
1264
|
+
R().flowchart.htmlLabels && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
|
|
1265
|
+
}
|
|
1266
|
+
g(et, "setTerminalWidth");
|
|
1267
|
+
var Ha = /* @__PURE__ */ g((e, t) => {
|
|
1268
|
+
S.debug("Moving label abc88 ", e.id, e.label, kt[e.id], t);
|
|
1269
|
+
let a = t.updatedPath ? t.updatedPath : t.originalPath;
|
|
1270
|
+
const i = R(), { subGraphTitleTotalMargin: l } = Ye(i);
|
|
1271
|
+
if (e.label) {
|
|
1272
|
+
const s = kt[e.id];
|
|
1273
|
+
let r = e.x, n = e.y;
|
|
1274
|
+
if (a) {
|
|
1275
|
+
const c = tt.calcLabelPosition(a);
|
|
1276
|
+
S.debug(
|
|
1277
|
+
"Moving label " + e.label + " from (",
|
|
1278
|
+
r,
|
|
1279
|
+
",",
|
|
1280
|
+
n,
|
|
1281
|
+
") to (",
|
|
1282
|
+
c.x,
|
|
1283
|
+
",",
|
|
1284
|
+
c.y,
|
|
1285
|
+
") abc88"
|
|
1286
|
+
), t.updatedPath && (r = c.x, n = c.y);
|
|
1287
|
+
}
|
|
1288
|
+
s.attr("transform", `translate(${r}, ${n + l / 2})`);
|
|
1289
|
+
}
|
|
1290
|
+
if (e.startLabelLeft) {
|
|
1291
|
+
const s = j[e.id].startLeft;
|
|
1292
|
+
let r = e.x, n = e.y;
|
|
1293
|
+
if (a) {
|
|
1294
|
+
const c = tt.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", a);
|
|
1295
|
+
r = c.x, n = c.y;
|
|
1296
|
+
}
|
|
1297
|
+
s.attr("transform", `translate(${r}, ${n})`);
|
|
1298
|
+
}
|
|
1299
|
+
if (e.startLabelRight) {
|
|
1300
|
+
const s = j[e.id].startRight;
|
|
1301
|
+
let r = e.x, n = e.y;
|
|
1302
|
+
if (a) {
|
|
1303
|
+
const c = tt.calcTerminalLabelPosition(
|
|
1304
|
+
e.arrowTypeStart ? 10 : 0,
|
|
1305
|
+
"start_right",
|
|
1306
|
+
a
|
|
1307
|
+
);
|
|
1308
|
+
r = c.x, n = c.y;
|
|
1309
|
+
}
|
|
1310
|
+
s.attr("transform", `translate(${r}, ${n})`);
|
|
1311
|
+
}
|
|
1312
|
+
if (e.endLabelLeft) {
|
|
1313
|
+
const s = j[e.id].endLeft;
|
|
1314
|
+
let r = e.x, n = e.y;
|
|
1315
|
+
if (a) {
|
|
1316
|
+
const c = tt.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", a);
|
|
1317
|
+
r = c.x, n = c.y;
|
|
1318
|
+
}
|
|
1319
|
+
s.attr("transform", `translate(${r}, ${n})`);
|
|
1320
|
+
}
|
|
1321
|
+
if (e.endLabelRight) {
|
|
1322
|
+
const s = j[e.id].endRight;
|
|
1323
|
+
let r = e.x, n = e.y;
|
|
1324
|
+
if (a) {
|
|
1325
|
+
const c = tt.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", a);
|
|
1326
|
+
r = c.x, n = c.y;
|
|
1327
|
+
}
|
|
1328
|
+
s.attr("transform", `translate(${r}, ${n})`);
|
|
1329
|
+
}
|
|
1330
|
+
}, "positionEdgeLabel"), Ka = /* @__PURE__ */ g((e, t) => {
|
|
1331
|
+
const a = e.x, i = e.y, l = Math.abs(t.x - a), s = Math.abs(t.y - i), r = e.width / 2, n = e.height / 2;
|
|
1332
|
+
return l >= r || s >= n;
|
|
1333
|
+
}, "outsideNode"), Xa = /* @__PURE__ */ g((e, t, a) => {
|
|
1334
|
+
S.debug(`intersection calc abc89:
|
|
1335
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
1336
|
+
insidePoint : ${JSON.stringify(a)}
|
|
1337
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
|
|
1338
|
+
const i = e.x, l = e.y, s = Math.abs(i - a.x), r = e.width / 2;
|
|
1339
|
+
let n = a.x < t.x ? r - s : r + s;
|
|
1340
|
+
const c = e.height / 2, d = Math.abs(t.y - a.y), o = Math.abs(t.x - a.x);
|
|
1341
|
+
if (Math.abs(l - t.y) * r > Math.abs(i - t.x) * c) {
|
|
1342
|
+
let y = a.y < t.y ? t.y - c - l : l - c - t.y;
|
|
1343
|
+
n = o * y / d;
|
|
1344
|
+
const w = {
|
|
1345
|
+
x: a.x < t.x ? a.x + n : a.x - o + n,
|
|
1346
|
+
y: a.y < t.y ? a.y + d - y : a.y - d + y
|
|
1347
|
+
};
|
|
1348
|
+
return n === 0 && (w.x = t.x, w.y = t.y), o === 0 && (w.x = t.x), d === 0 && (w.y = t.y), S.debug(`abc89 topp/bott calc, Q ${d}, q ${y}, R ${o}, r ${n}`, w), w;
|
|
1349
|
+
} else {
|
|
1350
|
+
a.x < t.x ? n = t.x - r - i : n = i - r - t.x;
|
|
1351
|
+
let y = d * n / o, w = a.x < t.x ? a.x + o - n : a.x - o + n, x = a.y < t.y ? a.y + y : a.y - y;
|
|
1352
|
+
return S.debug(`sides calc abc89, Q ${d}, q ${y}, R ${o}, r ${n}`, { _x: w, _y: x }), n === 0 && (w = t.x, x = t.y), o === 0 && (w = t.x), d === 0 && (x = t.y), { x: w, y: x };
|
|
1353
|
+
}
|
|
1354
|
+
}, "intersection"), Ut = /* @__PURE__ */ g((e, t) => {
|
|
1355
|
+
S.debug("abc88 cutPathAtIntersect", e, t);
|
|
1356
|
+
let a = [], i = e[0], l = !1;
|
|
1357
|
+
return e.forEach((s) => {
|
|
1358
|
+
if (!Ka(t, s) && !l) {
|
|
1359
|
+
const r = Xa(t, i, s);
|
|
1360
|
+
let n = !1;
|
|
1361
|
+
a.forEach((c) => {
|
|
1362
|
+
n = n || c.x === r.x && c.y === r.y;
|
|
1363
|
+
}), a.some((c) => c.x === r.x && c.y === r.y) || a.push(r), l = !0;
|
|
1364
|
+
} else
|
|
1365
|
+
i = s, l || a.push(s);
|
|
1366
|
+
}), a;
|
|
1367
|
+
}, "cutPathAtIntersect"), Va = /* @__PURE__ */ g(function(e, t, a, i, l, s, r) {
|
|
1368
|
+
let n = a.points;
|
|
1369
|
+
S.debug("abc88 InsertEdge: edge=", a, "e=", t);
|
|
1370
|
+
let c = !1;
|
|
1371
|
+
const d = s.node(t.v);
|
|
1372
|
+
var o = s.node(t.w);
|
|
1373
|
+
o?.intersect && d?.intersect && (n = n.slice(1, a.points.length - 1), n.unshift(d.intersect(n[0])), n.push(o.intersect(n[n.length - 1]))), a.toCluster && (S.debug("to cluster abc88", i[a.toCluster]), n = Ut(a.points, i[a.toCluster].node), c = !0), a.fromCluster && (S.debug("from cluster abc88", i[a.fromCluster]), n = Ut(n.reverse(), i[a.fromCluster].node).reverse(), c = !0);
|
|
1374
|
+
const y = n.filter((b) => !Number.isNaN(b.y));
|
|
1375
|
+
let w = Pe;
|
|
1376
|
+
a.curve && (l === "graph" || l === "flowchart") && (w = a.curve);
|
|
1377
|
+
const { x, y: L } = je(a), v = Fe().x(x).y(L).curve(w);
|
|
1378
|
+
let k;
|
|
1379
|
+
switch (a.thickness) {
|
|
1380
|
+
case "normal":
|
|
1381
|
+
k = "edge-thickness-normal";
|
|
1382
|
+
break;
|
|
1383
|
+
case "thick":
|
|
1384
|
+
k = "edge-thickness-thick";
|
|
1385
|
+
break;
|
|
1386
|
+
case "invisible":
|
|
1387
|
+
k = "edge-thickness-thick";
|
|
1388
|
+
break;
|
|
1389
|
+
default:
|
|
1390
|
+
k = "";
|
|
1391
|
+
}
|
|
1392
|
+
switch (a.pattern) {
|
|
1393
|
+
case "solid":
|
|
1394
|
+
k += " edge-pattern-solid";
|
|
1395
|
+
break;
|
|
1396
|
+
case "dotted":
|
|
1397
|
+
k += " edge-pattern-dotted";
|
|
1398
|
+
break;
|
|
1399
|
+
case "dashed":
|
|
1400
|
+
k += " edge-pattern-dashed";
|
|
1401
|
+
break;
|
|
1402
|
+
}
|
|
1403
|
+
const C = e.append("path").attr("d", v(y)).attr("id", a.id).attr("class", " " + k + (a.classes ? " " + a.classes : "")).attr("style", a.style);
|
|
1404
|
+
let _ = "";
|
|
1405
|
+
(R().flowchart.arrowMarkerAbsolute || R().state.arrowMarkerAbsolute) && (_ = We(!0)), Wa(C, a, _, r, l);
|
|
1406
|
+
let D = {};
|
|
1407
|
+
return c && (D.updatedPath = n), D.originalPath = a.points, D;
|
|
1408
|
+
}, "insertEdge"), Ga = /* @__PURE__ */ g((e) => {
|
|
1409
|
+
const t = /* @__PURE__ */ new Set();
|
|
1410
|
+
for (const a of e)
|
|
1411
|
+
switch (a) {
|
|
1412
|
+
case "x":
|
|
1413
|
+
t.add("right"), t.add("left");
|
|
1414
|
+
break;
|
|
1415
|
+
case "y":
|
|
1416
|
+
t.add("up"), t.add("down");
|
|
1417
|
+
break;
|
|
1418
|
+
default:
|
|
1419
|
+
t.add(a);
|
|
1420
|
+
break;
|
|
1421
|
+
}
|
|
1422
|
+
return t;
|
|
1423
|
+
}, "expandAndDeduplicateDirections"), $a = /* @__PURE__ */ g((e, t, a) => {
|
|
1424
|
+
const i = Ga(e), l = 2, s = t.height + 2 * a.padding, r = s / l, n = t.width + 2 * r + a.padding, c = a.padding / 2;
|
|
1425
|
+
return i.has("right") && i.has("left") && i.has("up") && i.has("down") ? [
|
|
1426
|
+
// Bottom
|
|
1427
|
+
{ x: 0, y: 0 },
|
|
1428
|
+
{ x: r, y: 0 },
|
|
1429
|
+
{ x: n / 2, y: 2 * c },
|
|
1430
|
+
{ x: n - r, y: 0 },
|
|
1431
|
+
{ x: n, y: 0 },
|
|
1432
|
+
// Right
|
|
1433
|
+
{ x: n, y: -s / 3 },
|
|
1434
|
+
{ x: n + 2 * c, y: -s / 2 },
|
|
1435
|
+
{ x: n, y: -2 * s / 3 },
|
|
1436
|
+
{ x: n, y: -s },
|
|
1437
|
+
// Top
|
|
1438
|
+
{ x: n - r, y: -s },
|
|
1439
|
+
{ x: n / 2, y: -s - 2 * c },
|
|
1440
|
+
{ x: r, y: -s },
|
|
1441
|
+
// Left
|
|
1442
|
+
{ x: 0, y: -s },
|
|
1443
|
+
{ x: 0, y: -2 * s / 3 },
|
|
1444
|
+
{ x: -2 * c, y: -s / 2 },
|
|
1445
|
+
{ x: 0, y: -s / 3 }
|
|
1446
|
+
] : i.has("right") && i.has("left") && i.has("up") ? [
|
|
1447
|
+
{ x: r, y: 0 },
|
|
1448
|
+
{ x: n - r, y: 0 },
|
|
1449
|
+
{ x: n, y: -s / 2 },
|
|
1450
|
+
{ x: n - r, y: -s },
|
|
1451
|
+
{ x: r, y: -s },
|
|
1452
|
+
{ x: 0, y: -s / 2 }
|
|
1453
|
+
] : i.has("right") && i.has("left") && i.has("down") ? [
|
|
1454
|
+
{ x: 0, y: 0 },
|
|
1455
|
+
{ x: r, y: -s },
|
|
1456
|
+
{ x: n - r, y: -s },
|
|
1457
|
+
{ x: n, y: 0 }
|
|
1458
|
+
] : i.has("right") && i.has("up") && i.has("down") ? [
|
|
1459
|
+
{ x: 0, y: 0 },
|
|
1460
|
+
{ x: n, y: -r },
|
|
1461
|
+
{ x: n, y: -s + r },
|
|
1462
|
+
{ x: 0, y: -s }
|
|
1463
|
+
] : i.has("left") && i.has("up") && i.has("down") ? [
|
|
1464
|
+
{ x: n, y: 0 },
|
|
1465
|
+
{ x: 0, y: -r },
|
|
1466
|
+
{ x: 0, y: -s + r },
|
|
1467
|
+
{ x: n, y: -s }
|
|
1468
|
+
] : i.has("right") && i.has("left") ? [
|
|
1469
|
+
{ x: r, y: 0 },
|
|
1470
|
+
{ x: r, y: -c },
|
|
1471
|
+
{ x: n - r, y: -c },
|
|
1472
|
+
{ x: n - r, y: 0 },
|
|
1473
|
+
{ x: n, y: -s / 2 },
|
|
1474
|
+
{ x: n - r, y: -s },
|
|
1475
|
+
{ x: n - r, y: -s + c },
|
|
1476
|
+
{ x: r, y: -s + c },
|
|
1477
|
+
{ x: r, y: -s },
|
|
1478
|
+
{ x: 0, y: -s / 2 }
|
|
1479
|
+
] : i.has("up") && i.has("down") ? [
|
|
1480
|
+
// Bottom center
|
|
1481
|
+
{ x: n / 2, y: 0 },
|
|
1482
|
+
// Left pont of bottom arrow
|
|
1483
|
+
{ x: 0, y: -c },
|
|
1484
|
+
{ x: r, y: -c },
|
|
1485
|
+
// Left top over vertical section
|
|
1486
|
+
{ x: r, y: -s + c },
|
|
1487
|
+
{ x: 0, y: -s + c },
|
|
1488
|
+
// Top of arrow
|
|
1489
|
+
{ x: n / 2, y: -s },
|
|
1490
|
+
{ x: n, y: -s + c },
|
|
1491
|
+
// Top of right vertical bar
|
|
1492
|
+
{ x: n - r, y: -s + c },
|
|
1493
|
+
{ x: n - r, y: -c },
|
|
1494
|
+
{ x: n, y: -c }
|
|
1495
|
+
] : i.has("right") && i.has("up") ? [
|
|
1496
|
+
{ x: 0, y: 0 },
|
|
1497
|
+
{ x: n, y: -r },
|
|
1498
|
+
{ x: 0, y: -s }
|
|
1499
|
+
] : i.has("right") && i.has("down") ? [
|
|
1500
|
+
{ x: 0, y: 0 },
|
|
1501
|
+
{ x: n, y: 0 },
|
|
1502
|
+
{ x: 0, y: -s }
|
|
1503
|
+
] : i.has("left") && i.has("up") ? [
|
|
1504
|
+
{ x: n, y: 0 },
|
|
1505
|
+
{ x: 0, y: -r },
|
|
1506
|
+
{ x: n, y: -s }
|
|
1507
|
+
] : i.has("left") && i.has("down") ? [
|
|
1508
|
+
{ x: n, y: 0 },
|
|
1509
|
+
{ x: 0, y: 0 },
|
|
1510
|
+
{ x: n, y: -s }
|
|
1511
|
+
] : i.has("right") ? [
|
|
1512
|
+
{ x: r, y: -c },
|
|
1513
|
+
{ x: r, y: -c },
|
|
1514
|
+
{ x: n - r, y: -c },
|
|
1515
|
+
{ x: n - r, y: 0 },
|
|
1516
|
+
{ x: n, y: -s / 2 },
|
|
1517
|
+
{ x: n - r, y: -s },
|
|
1518
|
+
{ x: n - r, y: -s + c },
|
|
1519
|
+
// top left corner of arrow
|
|
1520
|
+
{ x: r, y: -s + c },
|
|
1521
|
+
{ x: r, y: -s + c }
|
|
1522
|
+
] : i.has("left") ? [
|
|
1523
|
+
{ x: r, y: 0 },
|
|
1524
|
+
{ x: r, y: -c },
|
|
1525
|
+
// Two points, the right corners
|
|
1526
|
+
{ x: n - r, y: -c },
|
|
1527
|
+
{ x: n - r, y: -s + c },
|
|
1528
|
+
{ x: r, y: -s + c },
|
|
1529
|
+
{ x: r, y: -s },
|
|
1530
|
+
{ x: 0, y: -s / 2 }
|
|
1531
|
+
] : i.has("up") ? [
|
|
1532
|
+
// Bottom center
|
|
1533
|
+
{ x: r, y: -c },
|
|
1534
|
+
// Left top over vertical section
|
|
1535
|
+
{ x: r, y: -s + c },
|
|
1536
|
+
{ x: 0, y: -s + c },
|
|
1537
|
+
// Top of arrow
|
|
1538
|
+
{ x: n / 2, y: -s },
|
|
1539
|
+
{ x: n, y: -s + c },
|
|
1540
|
+
// Top of right vertical bar
|
|
1541
|
+
{ x: n - r, y: -s + c },
|
|
1542
|
+
{ x: n - r, y: -c }
|
|
1543
|
+
] : i.has("down") ? [
|
|
1544
|
+
// Bottom center
|
|
1545
|
+
{ x: n / 2, y: 0 },
|
|
1546
|
+
// Left pont of bottom arrow
|
|
1547
|
+
{ x: 0, y: -c },
|
|
1548
|
+
{ x: r, y: -c },
|
|
1549
|
+
// Left top over vertical section
|
|
1550
|
+
{ x: r, y: -s + c },
|
|
1551
|
+
{ x: n - r, y: -s + c },
|
|
1552
|
+
{ x: n - r, y: -c },
|
|
1553
|
+
{ x: n, y: -c }
|
|
1554
|
+
] : [{ x: 0, y: 0 }];
|
|
1555
|
+
}, "getArrowPoints");
|
|
1556
|
+
function oe(e, t) {
|
|
1557
|
+
return e.intersect(t);
|
|
1558
|
+
}
|
|
1559
|
+
g(oe, "intersectNode");
|
|
1560
|
+
var Za = oe;
|
|
1561
|
+
function he(e, t, a, i) {
|
|
1562
|
+
var l = e.x, s = e.y, r = l - i.x, n = s - i.y, c = Math.sqrt(t * t * n * n + a * a * r * r), d = Math.abs(t * a * r / c);
|
|
1563
|
+
i.x < l && (d = -d);
|
|
1564
|
+
var o = Math.abs(t * a * n / c);
|
|
1565
|
+
return i.y < s && (o = -o), { x: l + d, y: s + o };
|
|
1566
|
+
}
|
|
1567
|
+
g(he, "intersectEllipse");
|
|
1568
|
+
var ge = he;
|
|
1569
|
+
function de(e, t, a) {
|
|
1570
|
+
return ge(e, t, t, a);
|
|
1571
|
+
}
|
|
1572
|
+
g(de, "intersectCircle");
|
|
1573
|
+
var qa = de;
|
|
1574
|
+
function ue(e, t, a, i) {
|
|
1575
|
+
var l, s, r, n, c, d, o, y, w, x, L, v, k, C, _;
|
|
1576
|
+
if (l = t.y - e.y, r = e.x - t.x, c = t.x * e.y - e.x * t.y, w = l * a.x + r * a.y + c, x = l * i.x + r * i.y + c, !(w !== 0 && x !== 0 && Et(w, x)) && (s = i.y - a.y, n = a.x - i.x, d = i.x * a.y - a.x * i.y, o = s * e.x + n * e.y + d, y = s * t.x + n * t.y + d, !(o !== 0 && y !== 0 && Et(o, y)) && (L = l * n - s * r, L !== 0)))
|
|
1577
|
+
return v = Math.abs(L / 2), k = r * d - n * c, C = k < 0 ? (k - v) / L : (k + v) / L, k = s * c - l * d, _ = k < 0 ? (k - v) / L : (k + v) / L, { x: C, y: _ };
|
|
1578
|
+
}
|
|
1579
|
+
g(ue, "intersectLine");
|
|
1580
|
+
function Et(e, t) {
|
|
1581
|
+
return e * t > 0;
|
|
1582
|
+
}
|
|
1583
|
+
g(Et, "sameSign");
|
|
1584
|
+
var Ja = ue, Qa = pe;
|
|
1585
|
+
function pe(e, t, a) {
|
|
1586
|
+
var i = e.x, l = e.y, s = [], r = Number.POSITIVE_INFINITY, n = Number.POSITIVE_INFINITY;
|
|
1587
|
+
typeof t.forEach == "function" ? t.forEach(function(L) {
|
|
1588
|
+
r = Math.min(r, L.x), n = Math.min(n, L.y);
|
|
1589
|
+
}) : (r = Math.min(r, t.x), n = Math.min(n, t.y));
|
|
1590
|
+
for (var c = i - e.width / 2 - r, d = l - e.height / 2 - n, o = 0; o < t.length; o++) {
|
|
1591
|
+
var y = t[o], w = t[o < t.length - 1 ? o + 1 : 0], x = Ja(
|
|
1592
|
+
e,
|
|
1593
|
+
a,
|
|
1594
|
+
{ x: c + y.x, y: d + y.y },
|
|
1595
|
+
{ x: c + w.x, y: d + w.y }
|
|
1596
|
+
);
|
|
1597
|
+
x && s.push(x);
|
|
1598
|
+
}
|
|
1599
|
+
return s.length ? (s.length > 1 && s.sort(function(L, v) {
|
|
1600
|
+
var k = L.x - a.x, C = L.y - a.y, _ = Math.sqrt(k * k + C * C), D = v.x - a.x, b = v.y - a.y, u = Math.sqrt(D * D + b * b);
|
|
1601
|
+
return _ < u ? -1 : _ === u ? 0 : 1;
|
|
1602
|
+
}), s[0]) : e;
|
|
1603
|
+
}
|
|
1604
|
+
g(pe, "intersectPolygon");
|
|
1605
|
+
var ts = /* @__PURE__ */ g((e, t) => {
|
|
1606
|
+
var a = e.x, i = e.y, l = t.x - a, s = t.y - i, r = e.width / 2, n = e.height / 2, c, d;
|
|
1607
|
+
return Math.abs(s) * r > Math.abs(l) * n ? (s < 0 && (n = -n), c = s === 0 ? 0 : n * l / s, d = n) : (l < 0 && (r = -r), c = r, d = l === 0 ? 0 : r * s / l), { x: a + c, y: i + d };
|
|
1608
|
+
}, "intersectRect"), es = ts, N = {
|
|
1609
|
+
node: Za,
|
|
1610
|
+
circle: qa,
|
|
1611
|
+
ellipse: ge,
|
|
1612
|
+
polygon: Qa,
|
|
1613
|
+
rect: es
|
|
1614
|
+
}, M = /* @__PURE__ */ g(async (e, t, a, i) => {
|
|
1615
|
+
const l = R();
|
|
1616
|
+
let s;
|
|
1617
|
+
const r = t.useHtmlLabels || V(l.flowchart.htmlLabels);
|
|
1618
|
+
a ? s = a : s = "node default";
|
|
1619
|
+
const n = e.insert("g").attr("class", s).attr("id", t.domId || t.id), c = n.insert("g").attr("class", "label").attr("style", t.labelStyle);
|
|
1620
|
+
let d;
|
|
1621
|
+
t.labelText === void 0 ? d = "" : d = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
|
|
1622
|
+
const o = c.node();
|
|
1623
|
+
let y;
|
|
1624
|
+
t.labelType === "markdown" ? y = qt(
|
|
1625
|
+
c,
|
|
1626
|
+
mt(wt(d), l),
|
|
1627
|
+
{
|
|
1628
|
+
useHtmlLabels: r,
|
|
1629
|
+
width: t.width || l.flowchart.wrappingWidth,
|
|
1630
|
+
classes: "markdown-node-label"
|
|
1631
|
+
},
|
|
1632
|
+
l
|
|
1633
|
+
) : y = o.appendChild(
|
|
1634
|
+
await H(
|
|
1635
|
+
mt(wt(d), l),
|
|
1636
|
+
t.labelStyle,
|
|
1637
|
+
!1,
|
|
1638
|
+
i
|
|
1639
|
+
)
|
|
1640
|
+
);
|
|
1641
|
+
let w = y.getBBox();
|
|
1642
|
+
const x = t.padding / 2;
|
|
1643
|
+
if (V(l.flowchart.htmlLabels)) {
|
|
1644
|
+
const L = y.children[0], v = O(y), k = L.getElementsByTagName("img");
|
|
1645
|
+
if (k) {
|
|
1646
|
+
const C = d.replace(/<img[^>]*>/g, "").trim() === "";
|
|
1647
|
+
await Promise.all(
|
|
1648
|
+
[...k].map(
|
|
1649
|
+
(_) => new Promise((D) => {
|
|
1650
|
+
function b() {
|
|
1651
|
+
if (_.style.display = "flex", _.style.flexDirection = "column", C) {
|
|
1652
|
+
const u = l.fontSize ? l.fontSize : window.getComputedStyle(document.body).fontSize, m = parseInt(u, 10) * 5 + "px";
|
|
1653
|
+
_.style.minWidth = m, _.style.maxWidth = m;
|
|
1654
|
+
} else
|
|
1655
|
+
_.style.width = "100%";
|
|
1656
|
+
D(_);
|
|
1657
|
+
}
|
|
1658
|
+
g(b, "setupImage"), setTimeout(() => {
|
|
1659
|
+
_.complete && b();
|
|
1660
|
+
}), _.addEventListener("error", b), _.addEventListener("load", b);
|
|
1661
|
+
})
|
|
1662
|
+
)
|
|
1663
|
+
);
|
|
1664
|
+
}
|
|
1665
|
+
w = L.getBoundingClientRect(), v.attr("width", w.width), v.attr("height", w.height);
|
|
1666
|
+
}
|
|
1667
|
+
return r ? c.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")") : c.attr("transform", "translate(0, " + -w.height / 2 + ")"), t.centerLabel && c.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), c.insert("rect", ":first-child"), { shapeSvg: n, bbox: w, halfPadding: x, label: c };
|
|
1668
|
+
}, "labelHelper"), B = /* @__PURE__ */ g((e, t) => {
|
|
1669
|
+
const a = t.node().getBBox();
|
|
1670
|
+
e.width = a.width, e.height = a.height;
|
|
1671
|
+
}, "updateNodeBounds");
|
|
1672
|
+
function X(e, t, a, i) {
|
|
1673
|
+
return e.insert("polygon", ":first-child").attr(
|
|
1674
|
+
"points",
|
|
1675
|
+
i.map(function(l) {
|
|
1676
|
+
return l.x + "," + l.y;
|
|
1677
|
+
}).join(" ")
|
|
1678
|
+
).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + a / 2 + ")");
|
|
1679
|
+
}
|
|
1680
|
+
g(X, "insertPolygonShape");
|
|
1681
|
+
var rs = /* @__PURE__ */ g(async (e, t) => {
|
|
1682
|
+
t.useHtmlLabels || R().flowchart.htmlLabels || (t.centerLabel = !0);
|
|
1683
|
+
const { shapeSvg: i, bbox: l, halfPadding: s } = await M(
|
|
1684
|
+
e,
|
|
1685
|
+
t,
|
|
1686
|
+
"node " + t.classes,
|
|
1687
|
+
!0
|
|
1688
|
+
);
|
|
1689
|
+
S.info("Classes = ", t.classes);
|
|
1690
|
+
const r = i.insert("rect", ":first-child");
|
|
1691
|
+
return r.attr("rx", t.rx).attr("ry", t.ry).attr("x", -l.width / 2 - s).attr("y", -l.height / 2 - s).attr("width", l.width + t.padding).attr("height", l.height + t.padding), B(t, r), t.intersect = function(n) {
|
|
1692
|
+
return N.rect(t, n);
|
|
1693
|
+
}, i;
|
|
1694
|
+
}, "note"), as = rs, Ht = /* @__PURE__ */ g((e) => e ? " " + e : "", "formatClass"), Y = /* @__PURE__ */ g((e, t) => `${t || "node default"}${Ht(e.classes)} ${Ht(
|
|
1695
|
+
e.class
|
|
1696
|
+
)}`, "getClassesFromNode"), Kt = /* @__PURE__ */ g(async (e, t) => {
|
|
1697
|
+
const { shapeSvg: a, bbox: i } = await M(
|
|
1698
|
+
e,
|
|
1699
|
+
t,
|
|
1700
|
+
Y(t, void 0),
|
|
1701
|
+
!0
|
|
1702
|
+
), l = i.width + t.padding, s = i.height + t.padding, r = l + s, n = [
|
|
1703
|
+
{ x: r / 2, y: 0 },
|
|
1704
|
+
{ x: r, y: -r / 2 },
|
|
1705
|
+
{ x: r / 2, y: -r },
|
|
1706
|
+
{ x: 0, y: -r / 2 }
|
|
1707
|
+
];
|
|
1708
|
+
S.info("Question main (Circle)");
|
|
1709
|
+
const c = X(a, r, r, n);
|
|
1710
|
+
return c.attr("style", t.style), B(t, c), t.intersect = function(d) {
|
|
1711
|
+
return S.warn("Intersect called"), N.polygon(t, n, d);
|
|
1712
|
+
}, a;
|
|
1713
|
+
}, "question"), ss = /* @__PURE__ */ g((e, t) => {
|
|
1714
|
+
const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = 28, l = [
|
|
1715
|
+
{ x: 0, y: i / 2 },
|
|
1716
|
+
{ x: i / 2, y: 0 },
|
|
1717
|
+
{ x: 0, y: -i / 2 },
|
|
1718
|
+
{ x: -i / 2, y: 0 }
|
|
1719
|
+
];
|
|
1720
|
+
return a.insert("polygon", ":first-child").attr(
|
|
1721
|
+
"points",
|
|
1722
|
+
l.map(function(r) {
|
|
1723
|
+
return r.x + "," + r.y;
|
|
1724
|
+
}).join(" ")
|
|
1725
|
+
).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(r) {
|
|
1726
|
+
return N.circle(t, 14, r);
|
|
1727
|
+
}, a;
|
|
1728
|
+
}, "choice"), is = /* @__PURE__ */ g(async (e, t) => {
|
|
1729
|
+
const { shapeSvg: a, bbox: i } = await M(
|
|
1730
|
+
e,
|
|
1731
|
+
t,
|
|
1732
|
+
Y(t, void 0),
|
|
1733
|
+
!0
|
|
1734
|
+
), l = 4, s = i.height + t.padding, r = s / l, n = i.width + 2 * r + t.padding, c = [
|
|
1735
|
+
{ x: r, y: 0 },
|
|
1736
|
+
{ x: n - r, y: 0 },
|
|
1737
|
+
{ x: n, y: -s / 2 },
|
|
1738
|
+
{ x: n - r, y: -s },
|
|
1739
|
+
{ x: r, y: -s },
|
|
1740
|
+
{ x: 0, y: -s / 2 }
|
|
1741
|
+
], d = X(a, n, s, c);
|
|
1742
|
+
return d.attr("style", t.style), B(t, d), t.intersect = function(o) {
|
|
1743
|
+
return N.polygon(t, c, o);
|
|
1744
|
+
}, a;
|
|
1745
|
+
}, "hexagon"), ns = /* @__PURE__ */ g(async (e, t) => {
|
|
1746
|
+
const { shapeSvg: a, bbox: i } = await M(e, t, void 0, !0), l = 2, s = i.height + 2 * t.padding, r = s / l, n = i.width + 2 * r + t.padding, c = $a(t.directions, i, t), d = X(a, n, s, c);
|
|
1747
|
+
return d.attr("style", t.style), B(t, d), t.intersect = function(o) {
|
|
1748
|
+
return N.polygon(t, c, o);
|
|
1749
|
+
}, a;
|
|
1750
|
+
}, "block_arrow"), ls = /* @__PURE__ */ g(async (e, t) => {
|
|
1751
|
+
const { shapeSvg: a, bbox: i } = await M(
|
|
1752
|
+
e,
|
|
1753
|
+
t,
|
|
1754
|
+
Y(t, void 0),
|
|
1755
|
+
!0
|
|
1756
|
+
), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1757
|
+
{ x: -s / 2, y: 0 },
|
|
1758
|
+
{ x: l, y: 0 },
|
|
1759
|
+
{ x: l, y: -s },
|
|
1760
|
+
{ x: -s / 2, y: -s },
|
|
1761
|
+
{ x: 0, y: -s / 2 }
|
|
1762
|
+
];
|
|
1763
|
+
return X(a, l, s, r).attr("style", t.style), t.width = l + s, t.height = s, t.intersect = function(c) {
|
|
1764
|
+
return N.polygon(t, r, c);
|
|
1765
|
+
}, a;
|
|
1766
|
+
}, "rect_left_inv_arrow"), cs = /* @__PURE__ */ g(async (e, t) => {
|
|
1767
|
+
const { shapeSvg: a, bbox: i } = await M(e, t, Y(t), !0), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1768
|
+
{ x: -2 * s / 6, y: 0 },
|
|
1769
|
+
{ x: l - s / 6, y: 0 },
|
|
1770
|
+
{ x: l + 2 * s / 6, y: -s },
|
|
1771
|
+
{ x: s / 6, y: -s }
|
|
1772
|
+
], n = X(a, l, s, r);
|
|
1773
|
+
return n.attr("style", t.style), B(t, n), t.intersect = function(c) {
|
|
1774
|
+
return N.polygon(t, r, c);
|
|
1775
|
+
}, a;
|
|
1776
|
+
}, "lean_right"), os = /* @__PURE__ */ g(async (e, t) => {
|
|
1777
|
+
const { shapeSvg: a, bbox: i } = await M(
|
|
1778
|
+
e,
|
|
1779
|
+
t,
|
|
1780
|
+
Y(t, void 0),
|
|
1781
|
+
!0
|
|
1782
|
+
), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1783
|
+
{ x: 2 * s / 6, y: 0 },
|
|
1784
|
+
{ x: l + s / 6, y: 0 },
|
|
1785
|
+
{ x: l - 2 * s / 6, y: -s },
|
|
1786
|
+
{ x: -s / 6, y: -s }
|
|
1787
|
+
], n = X(a, l, s, r);
|
|
1788
|
+
return n.attr("style", t.style), B(t, n), t.intersect = function(c) {
|
|
1789
|
+
return N.polygon(t, r, c);
|
|
1790
|
+
}, a;
|
|
1791
|
+
}, "lean_left"), hs = /* @__PURE__ */ g(async (e, t) => {
|
|
1792
|
+
const { shapeSvg: a, bbox: i } = await M(
|
|
1793
|
+
e,
|
|
1794
|
+
t,
|
|
1795
|
+
Y(t, void 0),
|
|
1796
|
+
!0
|
|
1797
|
+
), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1798
|
+
{ x: -2 * s / 6, y: 0 },
|
|
1799
|
+
{ x: l + 2 * s / 6, y: 0 },
|
|
1800
|
+
{ x: l - s / 6, y: -s },
|
|
1801
|
+
{ x: s / 6, y: -s }
|
|
1802
|
+
], n = X(a, l, s, r);
|
|
1803
|
+
return n.attr("style", t.style), B(t, n), t.intersect = function(c) {
|
|
1804
|
+
return N.polygon(t, r, c);
|
|
1805
|
+
}, a;
|
|
1806
|
+
}, "trapezoid"), gs = /* @__PURE__ */ g(async (e, t) => {
|
|
1807
|
+
const { shapeSvg: a, bbox: i } = await M(
|
|
1808
|
+
e,
|
|
1809
|
+
t,
|
|
1810
|
+
Y(t, void 0),
|
|
1811
|
+
!0
|
|
1812
|
+
), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1813
|
+
{ x: s / 6, y: 0 },
|
|
1814
|
+
{ x: l - s / 6, y: 0 },
|
|
1815
|
+
{ x: l + 2 * s / 6, y: -s },
|
|
1816
|
+
{ x: -2 * s / 6, y: -s }
|
|
1817
|
+
], n = X(a, l, s, r);
|
|
1818
|
+
return n.attr("style", t.style), B(t, n), t.intersect = function(c) {
|
|
1819
|
+
return N.polygon(t, r, c);
|
|
1820
|
+
}, a;
|
|
1821
|
+
}, "inv_trapezoid"), ds = /* @__PURE__ */ g(async (e, t) => {
|
|
1822
|
+
const { shapeSvg: a, bbox: i } = await M(
|
|
1823
|
+
e,
|
|
1824
|
+
t,
|
|
1825
|
+
Y(t, void 0),
|
|
1826
|
+
!0
|
|
1827
|
+
), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1828
|
+
{ x: 0, y: 0 },
|
|
1829
|
+
{ x: l + s / 2, y: 0 },
|
|
1830
|
+
{ x: l, y: -s / 2 },
|
|
1831
|
+
{ x: l + s / 2, y: -s },
|
|
1832
|
+
{ x: 0, y: -s }
|
|
1833
|
+
], n = X(a, l, s, r);
|
|
1834
|
+
return n.attr("style", t.style), B(t, n), t.intersect = function(c) {
|
|
1835
|
+
return N.polygon(t, r, c);
|
|
1836
|
+
}, a;
|
|
1837
|
+
}, "rect_right_inv_arrow"), us = /* @__PURE__ */ g(async (e, t) => {
|
|
1838
|
+
const { shapeSvg: a, bbox: i } = await M(
|
|
1839
|
+
e,
|
|
1840
|
+
t,
|
|
1841
|
+
Y(t, void 0),
|
|
1842
|
+
!0
|
|
1843
|
+
), l = i.width + t.padding, s = l / 2, r = s / (2.5 + l / 50), n = i.height + r + t.padding, c = "M 0," + r + " a " + s + "," + r + " 0,0,0 " + l + " 0 a " + s + "," + r + " 0,0,0 " + -l + " 0 l 0," + n + " a " + s + "," + r + " 0,0,0 " + l + " 0 l 0," + -n, d = a.attr("label-offset-y", r).insert("path", ":first-child").attr("style", t.style).attr("d", c).attr("transform", "translate(" + -l / 2 + "," + -(n / 2 + r) + ")");
|
|
1844
|
+
return B(t, d), t.intersect = function(o) {
|
|
1845
|
+
const y = N.rect(t, o), w = y.x - t.x;
|
|
1846
|
+
if (s != 0 && (Math.abs(w) < t.width / 2 || Math.abs(w) == t.width / 2 && Math.abs(y.y - t.y) > t.height / 2 - r)) {
|
|
1847
|
+
let x = r * r * (1 - w * w / (s * s));
|
|
1848
|
+
x != 0 && (x = Math.sqrt(x)), x = r - x, o.y - t.y > 0 && (x = -x), y.y += x;
|
|
1849
|
+
}
|
|
1850
|
+
return y;
|
|
1851
|
+
}, a;
|
|
1852
|
+
}, "cylinder"), ps = /* @__PURE__ */ g(async (e, t) => {
|
|
1853
|
+
const { shapeSvg: a, bbox: i, halfPadding: l } = await M(
|
|
1854
|
+
e,
|
|
1855
|
+
t,
|
|
1856
|
+
"node " + t.classes + " " + t.class,
|
|
1857
|
+
!0
|
|
1858
|
+
), s = a.insert("rect", ":first-child"), r = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, c = t.positioned ? -r / 2 : -i.width / 2 - l, d = t.positioned ? -n / 2 : -i.height / 2 - l;
|
|
1859
|
+
if (s.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", d).attr("width", r).attr("height", n), t.props) {
|
|
1860
|
+
const o = new Set(Object.keys(t.props));
|
|
1861
|
+
t.props.borders && (ut(s, t.props.borders, r, n), o.delete("borders")), o.forEach((y) => {
|
|
1862
|
+
S.warn(`Unknown node property ${y}`);
|
|
1863
|
+
});
|
|
1864
|
+
}
|
|
1865
|
+
return B(t, s), t.intersect = function(o) {
|
|
1866
|
+
return N.rect(t, o);
|
|
1867
|
+
}, a;
|
|
1868
|
+
}, "rect"), fs = /* @__PURE__ */ g(async (e, t) => {
|
|
1869
|
+
const { shapeSvg: a, bbox: i, halfPadding: l } = await M(
|
|
1870
|
+
e,
|
|
1871
|
+
t,
|
|
1872
|
+
"node " + t.classes,
|
|
1873
|
+
!0
|
|
1874
|
+
), s = a.insert("rect", ":first-child"), r = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, c = t.positioned ? -r / 2 : -i.width / 2 - l, d = t.positioned ? -n / 2 : -i.height / 2 - l;
|
|
1875
|
+
if (s.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", d).attr("width", r).attr("height", n), t.props) {
|
|
1876
|
+
const o = new Set(Object.keys(t.props));
|
|
1877
|
+
t.props.borders && (ut(s, t.props.borders, r, n), o.delete("borders")), o.forEach((y) => {
|
|
1878
|
+
S.warn(`Unknown node property ${y}`);
|
|
1879
|
+
});
|
|
1880
|
+
}
|
|
1881
|
+
return B(t, s), t.intersect = function(o) {
|
|
1882
|
+
return N.rect(t, o);
|
|
1883
|
+
}, a;
|
|
1884
|
+
}, "composite"), ys = /* @__PURE__ */ g(async (e, t) => {
|
|
1885
|
+
const { shapeSvg: a } = await M(e, t, "label", !0);
|
|
1886
|
+
S.trace("Classes = ", t.class);
|
|
1887
|
+
const i = a.insert("rect", ":first-child"), l = 0, s = 0;
|
|
1888
|
+
if (i.attr("width", l).attr("height", s), a.attr("class", "label edgeLabel"), t.props) {
|
|
1889
|
+
const r = new Set(Object.keys(t.props));
|
|
1890
|
+
t.props.borders && (ut(i, t.props.borders, l, s), r.delete("borders")), r.forEach((n) => {
|
|
1891
|
+
S.warn(`Unknown node property ${n}`);
|
|
1892
|
+
});
|
|
1893
|
+
}
|
|
1894
|
+
return B(t, i), t.intersect = function(r) {
|
|
1895
|
+
return N.rect(t, r);
|
|
1896
|
+
}, a;
|
|
1897
|
+
}, "labelRect");
|
|
1898
|
+
function ut(e, t, a, i) {
|
|
1899
|
+
const l = [], s = /* @__PURE__ */ g((n) => {
|
|
1900
|
+
l.push(n, 0);
|
|
1901
|
+
}, "addBorder"), r = /* @__PURE__ */ g((n) => {
|
|
1902
|
+
l.push(0, n);
|
|
1903
|
+
}, "skipBorder");
|
|
1904
|
+
t.includes("t") ? (S.debug("add top border"), s(a)) : r(a), t.includes("r") ? (S.debug("add right border"), s(i)) : r(i), t.includes("b") ? (S.debug("add bottom border"), s(a)) : r(a), t.includes("l") ? (S.debug("add left border"), s(i)) : r(i), e.attr("stroke-dasharray", l.join(" "));
|
|
1905
|
+
}
|
|
1906
|
+
g(ut, "applyNodePropertyBorders");
|
|
1907
|
+
var xs = /* @__PURE__ */ g(async (e, t) => {
|
|
1908
|
+
let a;
|
|
1909
|
+
t.classes ? a = "node " + t.classes : a = "node default";
|
|
1910
|
+
const i = e.insert("g").attr("class", a).attr("id", t.domId || t.id), l = i.insert("rect", ":first-child"), s = i.insert("line"), r = i.insert("g").attr("class", "label"), n = t.labelText.flat ? t.labelText.flat() : t.labelText;
|
|
1911
|
+
let c = "";
|
|
1912
|
+
typeof n == "object" ? c = n[0] : c = n, S.info("Label text abc79", c, n, typeof n == "object");
|
|
1913
|
+
const d = r.node().appendChild(await H(c, t.labelStyle, !0, !0));
|
|
1914
|
+
let o = { width: 0, height: 0 };
|
|
1915
|
+
if (V(R().flowchart.htmlLabels)) {
|
|
1916
|
+
const v = d.children[0], k = O(d);
|
|
1917
|
+
o = v.getBoundingClientRect(), k.attr("width", o.width), k.attr("height", o.height);
|
|
1918
|
+
}
|
|
1919
|
+
S.info("Text 2", n);
|
|
1920
|
+
const y = n.slice(1, n.length);
|
|
1921
|
+
let w = d.getBBox();
|
|
1922
|
+
const x = r.node().appendChild(
|
|
1923
|
+
await H(
|
|
1924
|
+
y.join ? y.join("<br/>") : y,
|
|
1925
|
+
t.labelStyle,
|
|
1926
|
+
!0,
|
|
1927
|
+
!0
|
|
1928
|
+
)
|
|
1929
|
+
);
|
|
1930
|
+
if (V(R().flowchart.htmlLabels)) {
|
|
1931
|
+
const v = x.children[0], k = O(x);
|
|
1932
|
+
o = v.getBoundingClientRect(), k.attr("width", o.width), k.attr("height", o.height);
|
|
1933
|
+
}
|
|
1934
|
+
const L = t.padding / 2;
|
|
1935
|
+
return O(x).attr(
|
|
1936
|
+
"transform",
|
|
1937
|
+
"translate( " + // (titleBox.width - bbox.width) / 2 +
|
|
1938
|
+
(o.width > w.width ? 0 : (w.width - o.width) / 2) + ", " + (w.height + L + 5) + ")"
|
|
1939
|
+
), O(d).attr(
|
|
1940
|
+
"transform",
|
|
1941
|
+
"translate( " + // (titleBox.width - bbox.width) / 2 +
|
|
1942
|
+
(o.width < w.width ? 0 : -(w.width - o.width) / 2) + ", 0)"
|
|
1943
|
+
), o = r.node().getBBox(), r.attr(
|
|
1944
|
+
"transform",
|
|
1945
|
+
"translate(" + -o.width / 2 + ", " + (-o.height / 2 - L + 3) + ")"
|
|
1946
|
+
), l.attr("class", "outer title-state").attr("x", -o.width / 2 - L).attr("y", -o.height / 2 - L).attr("width", o.width + t.padding).attr("height", o.height + t.padding), s.attr("class", "divider").attr("x1", -o.width / 2 - L).attr("x2", o.width / 2 + L).attr("y1", -o.height / 2 - L + w.height + L).attr("y2", -o.height / 2 - L + w.height + L), B(t, l), t.intersect = function(v) {
|
|
1947
|
+
return N.rect(t, v);
|
|
1948
|
+
}, i;
|
|
1949
|
+
}, "rectWithTitle"), bs = /* @__PURE__ */ g(async (e, t) => {
|
|
1950
|
+
const { shapeSvg: a, bbox: i } = await M(
|
|
1951
|
+
e,
|
|
1952
|
+
t,
|
|
1953
|
+
Y(t, void 0),
|
|
1954
|
+
!0
|
|
1955
|
+
), l = i.height + t.padding, s = i.width + l / 4 + t.padding, r = a.insert("rect", ":first-child").attr("style", t.style).attr("rx", l / 2).attr("ry", l / 2).attr("x", -s / 2).attr("y", -l / 2).attr("width", s).attr("height", l);
|
|
1956
|
+
return B(t, r), t.intersect = function(n) {
|
|
1957
|
+
return N.rect(t, n);
|
|
1958
|
+
}, a;
|
|
1959
|
+
}, "stadium"), ws = /* @__PURE__ */ g(async (e, t) => {
|
|
1960
|
+
const { shapeSvg: a, bbox: i, halfPadding: l } = await M(
|
|
1961
|
+
e,
|
|
1962
|
+
t,
|
|
1963
|
+
Y(t, void 0),
|
|
1964
|
+
!0
|
|
1965
|
+
), s = a.insert("circle", ":first-child");
|
|
1966
|
+
return s.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), S.info("Circle main"), B(t, s), t.intersect = function(r) {
|
|
1967
|
+
return S.info("Circle intersect", t, i.width / 2 + l, r), N.circle(t, i.width / 2 + l, r);
|
|
1968
|
+
}, a;
|
|
1969
|
+
}, "circle"), ms = /* @__PURE__ */ g(async (e, t) => {
|
|
1970
|
+
const { shapeSvg: a, bbox: i, halfPadding: l } = await M(
|
|
1971
|
+
e,
|
|
1972
|
+
t,
|
|
1973
|
+
Y(t, void 0),
|
|
1974
|
+
!0
|
|
1975
|
+
), s = 5, r = a.insert("g", ":first-child"), n = r.insert("circle"), c = r.insert("circle");
|
|
1976
|
+
return r.attr("class", t.class), n.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l + s).attr("width", i.width + t.padding + s * 2).attr("height", i.height + t.padding + s * 2), c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), S.info("DoubleCircle main"), B(t, n), t.intersect = function(d) {
|
|
1977
|
+
return S.info("DoubleCircle intersect", t, i.width / 2 + l + s, d), N.circle(t, i.width / 2 + l + s, d);
|
|
1978
|
+
}, a;
|
|
1979
|
+
}, "doublecircle"), Ss = /* @__PURE__ */ g(async (e, t) => {
|
|
1980
|
+
const { shapeSvg: a, bbox: i } = await M(
|
|
1981
|
+
e,
|
|
1982
|
+
t,
|
|
1983
|
+
Y(t, void 0),
|
|
1984
|
+
!0
|
|
1985
|
+
), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1986
|
+
{ x: 0, y: 0 },
|
|
1987
|
+
{ x: l, y: 0 },
|
|
1988
|
+
{ x: l, y: -s },
|
|
1989
|
+
{ x: 0, y: -s },
|
|
1990
|
+
{ x: 0, y: 0 },
|
|
1991
|
+
{ x: -8, y: 0 },
|
|
1992
|
+
{ x: l + 8, y: 0 },
|
|
1993
|
+
{ x: l + 8, y: -s },
|
|
1994
|
+
{ x: -8, y: -s },
|
|
1995
|
+
{ x: -8, y: 0 }
|
|
1996
|
+
], n = X(a, l, s, r);
|
|
1997
|
+
return n.attr("style", t.style), B(t, n), t.intersect = function(c) {
|
|
1998
|
+
return N.polygon(t, r, c);
|
|
1999
|
+
}, a;
|
|
2000
|
+
}, "subroutine"), Ls = /* @__PURE__ */ g((e, t) => {
|
|
2001
|
+
const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = a.insert("circle", ":first-child");
|
|
2002
|
+
return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), B(t, i), t.intersect = function(l) {
|
|
2003
|
+
return N.circle(t, 7, l);
|
|
2004
|
+
}, a;
|
|
2005
|
+
}, "start"), Xt = /* @__PURE__ */ g((e, t, a) => {
|
|
2006
|
+
const i = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
|
|
2007
|
+
let l = 70, s = 10;
|
|
2008
|
+
a === "LR" && (l = 10, s = 70);
|
|
2009
|
+
const r = i.append("rect").attr("x", -1 * l / 2).attr("y", -1 * s / 2).attr("width", l).attr("height", s).attr("class", "fork-join");
|
|
2010
|
+
return B(t, r), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(n) {
|
|
2011
|
+
return N.rect(t, n);
|
|
2012
|
+
}, i;
|
|
2013
|
+
}, "forkJoin"), vs = /* @__PURE__ */ g((e, t) => {
|
|
2014
|
+
const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = a.insert("circle", ":first-child"), l = a.insert("circle", ":first-child");
|
|
2015
|
+
return l.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), i.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), B(t, l), t.intersect = function(s) {
|
|
2016
|
+
return N.circle(t, 7, s);
|
|
2017
|
+
}, a;
|
|
2018
|
+
}, "end"), ks = /* @__PURE__ */ g(async (e, t) => {
|
|
2019
|
+
const a = t.padding / 2, i = 4, l = 8;
|
|
2020
|
+
let s;
|
|
2021
|
+
t.classes ? s = "node " + t.classes : s = "node default";
|
|
2022
|
+
const r = e.insert("g").attr("class", s).attr("id", t.domId || t.id), n = r.insert("rect", ":first-child"), c = r.insert("line"), d = r.insert("line");
|
|
2023
|
+
let o = 0, y = i;
|
|
2024
|
+
const w = r.insert("g").attr("class", "label");
|
|
2025
|
+
let x = 0;
|
|
2026
|
+
const L = t.classData.annotations?.[0], v = t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", k = w.node().appendChild(await H(v, t.labelStyle, !0, !0));
|
|
2027
|
+
let C = k.getBBox();
|
|
2028
|
+
if (V(R().flowchart.htmlLabels)) {
|
|
2029
|
+
const E = k.children[0], h = O(k);
|
|
2030
|
+
C = E.getBoundingClientRect(), h.attr("width", C.width), h.attr("height", C.height);
|
|
2031
|
+
}
|
|
2032
|
+
t.classData.annotations[0] && (y += C.height + i, o += C.width);
|
|
2033
|
+
let _ = t.classData.label;
|
|
2034
|
+
t.classData.type !== void 0 && t.classData.type !== "" && (R().flowchart.htmlLabels ? _ += "<" + t.classData.type + ">" : _ += "<" + t.classData.type + ">");
|
|
2035
|
+
const D = w.node().appendChild(await H(_, t.labelStyle, !0, !0));
|
|
2036
|
+
O(D).attr("class", "classTitle");
|
|
2037
|
+
let b = D.getBBox();
|
|
2038
|
+
if (V(R().flowchart.htmlLabels)) {
|
|
2039
|
+
const E = D.children[0], h = O(D);
|
|
2040
|
+
b = E.getBoundingClientRect(), h.attr("width", b.width), h.attr("height", b.height);
|
|
2041
|
+
}
|
|
2042
|
+
y += b.height + i, b.width > o && (o = b.width);
|
|
2043
|
+
const u = [];
|
|
2044
|
+
t.classData.members.forEach(async (E) => {
|
|
2045
|
+
const h = E.getDisplayDetails();
|
|
2046
|
+
let P = h.displayText;
|
|
2047
|
+
R().flowchart.htmlLabels && (P = P.replace(/</g, "<").replace(/>/g, ">"));
|
|
2048
|
+
const p = w.node().appendChild(
|
|
2049
|
+
await H(
|
|
2050
|
+
P,
|
|
2051
|
+
h.cssStyle ? h.cssStyle : t.labelStyle,
|
|
2052
|
+
!0,
|
|
2053
|
+
!0
|
|
2054
|
+
)
|
|
2055
|
+
);
|
|
2056
|
+
let A = p.getBBox();
|
|
2057
|
+
if (V(R().flowchart.htmlLabels)) {
|
|
2058
|
+
const Z = p.children[0], G = O(p);
|
|
2059
|
+
A = Z.getBoundingClientRect(), G.attr("width", A.width), G.attr("height", A.height);
|
|
2060
|
+
}
|
|
2061
|
+
A.width > o && (o = A.width), y += A.height + i, u.push(p);
|
|
2062
|
+
}), y += l;
|
|
2063
|
+
const f = [];
|
|
2064
|
+
if (t.classData.methods.forEach(async (E) => {
|
|
2065
|
+
const h = E.getDisplayDetails();
|
|
2066
|
+
let P = h.displayText;
|
|
2067
|
+
R().flowchart.htmlLabels && (P = P.replace(/</g, "<").replace(/>/g, ">"));
|
|
2068
|
+
const p = w.node().appendChild(
|
|
2069
|
+
await H(
|
|
2070
|
+
P,
|
|
2071
|
+
h.cssStyle ? h.cssStyle : t.labelStyle,
|
|
2072
|
+
!0,
|
|
2073
|
+
!0
|
|
2074
|
+
)
|
|
2075
|
+
);
|
|
2076
|
+
let A = p.getBBox();
|
|
2077
|
+
if (V(R().flowchart.htmlLabels)) {
|
|
2078
|
+
const Z = p.children[0], G = O(p);
|
|
2079
|
+
A = Z.getBoundingClientRect(), G.attr("width", A.width), G.attr("height", A.height);
|
|
2080
|
+
}
|
|
2081
|
+
A.width > o && (o = A.width), y += A.height + i, f.push(p);
|
|
2082
|
+
}), y += l, L) {
|
|
2083
|
+
let E = (o - C.width) / 2;
|
|
2084
|
+
O(k).attr(
|
|
2085
|
+
"transform",
|
|
2086
|
+
"translate( " + (-1 * o / 2 + E) + ", " + -1 * y / 2 + ")"
|
|
2087
|
+
), x = C.height + i;
|
|
2088
|
+
}
|
|
2089
|
+
let m = (o - b.width) / 2;
|
|
2090
|
+
return O(D).attr(
|
|
2091
|
+
"transform",
|
|
2092
|
+
"translate( " + (-1 * o / 2 + m) + ", " + (-1 * y / 2 + x) + ")"
|
|
2093
|
+
), x += b.height + i, c.attr("class", "divider").attr("x1", -o / 2 - a).attr("x2", o / 2 + a).attr("y1", -y / 2 - a + l + x).attr("y2", -y / 2 - a + l + x), x += l, u.forEach((E) => {
|
|
2094
|
+
O(E).attr(
|
|
2095
|
+
"transform",
|
|
2096
|
+
"translate( " + -o / 2 + ", " + (-1 * y / 2 + x + l / 2) + ")"
|
|
2097
|
+
);
|
|
2098
|
+
const h = E?.getBBox();
|
|
2099
|
+
x += (h?.height ?? 0) + i;
|
|
2100
|
+
}), x += l, d.attr("class", "divider").attr("x1", -o / 2 - a).attr("x2", o / 2 + a).attr("y1", -y / 2 - a + l + x).attr("y2", -y / 2 - a + l + x), x += l, f.forEach((E) => {
|
|
2101
|
+
O(E).attr(
|
|
2102
|
+
"transform",
|
|
2103
|
+
"translate( " + -o / 2 + ", " + (-1 * y / 2 + x) + ")"
|
|
2104
|
+
);
|
|
2105
|
+
const h = E?.getBBox();
|
|
2106
|
+
x += (h?.height ?? 0) + i;
|
|
2107
|
+
}), n.attr("style", t.style).attr("class", "outer title-state").attr("x", -o / 2 - a).attr("y", -(y / 2) - a).attr("width", o + t.padding).attr("height", y + t.padding), B(t, n), t.intersect = function(E) {
|
|
2108
|
+
return N.rect(t, E);
|
|
2109
|
+
}, r;
|
|
2110
|
+
}, "class_box"), Vt = {
|
|
2111
|
+
rhombus: Kt,
|
|
2112
|
+
composite: fs,
|
|
2113
|
+
question: Kt,
|
|
2114
|
+
rect: ps,
|
|
2115
|
+
labelRect: ys,
|
|
2116
|
+
rectWithTitle: xs,
|
|
2117
|
+
choice: ss,
|
|
2118
|
+
circle: ws,
|
|
2119
|
+
doublecircle: ms,
|
|
2120
|
+
stadium: bs,
|
|
2121
|
+
hexagon: is,
|
|
2122
|
+
block_arrow: ns,
|
|
2123
|
+
rect_left_inv_arrow: ls,
|
|
2124
|
+
lean_right: cs,
|
|
2125
|
+
lean_left: os,
|
|
2126
|
+
trapezoid: hs,
|
|
2127
|
+
inv_trapezoid: gs,
|
|
2128
|
+
rect_right_inv_arrow: ds,
|
|
2129
|
+
cylinder: us,
|
|
2130
|
+
start: Ls,
|
|
2131
|
+
end: vs,
|
|
2132
|
+
note: as,
|
|
2133
|
+
subroutine: Ss,
|
|
2134
|
+
fork: Xt,
|
|
2135
|
+
join: Xt,
|
|
2136
|
+
class_box: ks
|
|
2137
|
+
}, ot = {}, fe = /* @__PURE__ */ g(async (e, t, a) => {
|
|
2138
|
+
let i, l;
|
|
2139
|
+
if (t.link) {
|
|
2140
|
+
let s;
|
|
2141
|
+
R().securityLevel === "sandbox" ? s = "_top" : t.linkTarget && (s = t.linkTarget || "_blank"), i = e.insert("svg:a").attr("xlink:href", t.link).attr("target", s), l = await Vt[t.shape](i, t, a);
|
|
2142
|
+
} else
|
|
2143
|
+
l = await Vt[t.shape](e, t, a), i = l;
|
|
2144
|
+
return t.tooltip && l.attr("title", t.tooltip), t.class && l.attr("class", "node default " + t.class), ot[t.id] = i, t.haveCallback && ot[t.id].attr("class", ot[t.id].attr("class") + " clickable"), i;
|
|
2145
|
+
}, "insertNode"), Es = /* @__PURE__ */ g((e) => {
|
|
2146
|
+
const t = ot[e.id];
|
|
2147
|
+
S.trace(
|
|
2148
|
+
"Transforming node",
|
|
2149
|
+
e.diff,
|
|
2150
|
+
e,
|
|
2151
|
+
"translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")"
|
|
2152
|
+
);
|
|
2153
|
+
const a = 8, i = e.diff || 0;
|
|
2154
|
+
return e.clusterNode ? t.attr(
|
|
2155
|
+
"transform",
|
|
2156
|
+
"translate(" + (e.x + i - e.width / 2) + ", " + (e.y - e.height / 2 - a) + ")"
|
|
2157
|
+
) : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), i;
|
|
2158
|
+
}, "positionNode");
|
|
2159
|
+
function Ct(e, t, a = !1) {
|
|
2160
|
+
const i = e;
|
|
2161
|
+
let l = "default";
|
|
2162
|
+
(i?.classes?.length || 0) > 0 && (l = (i?.classes ?? []).join(" ")), l = l + " flowchart-label";
|
|
2163
|
+
let s = 0, r = "", n;
|
|
2164
|
+
switch (i.type) {
|
|
2165
|
+
case "round":
|
|
2166
|
+
s = 5, r = "rect";
|
|
2167
|
+
break;
|
|
2168
|
+
case "composite":
|
|
2169
|
+
s = 0, r = "composite", n = 0;
|
|
2170
|
+
break;
|
|
2171
|
+
case "square":
|
|
2172
|
+
r = "rect";
|
|
2173
|
+
break;
|
|
2174
|
+
case "diamond":
|
|
2175
|
+
r = "question";
|
|
2176
|
+
break;
|
|
2177
|
+
case "hexagon":
|
|
2178
|
+
r = "hexagon";
|
|
2179
|
+
break;
|
|
2180
|
+
case "block_arrow":
|
|
2181
|
+
r = "block_arrow";
|
|
2182
|
+
break;
|
|
2183
|
+
case "odd":
|
|
2184
|
+
r = "rect_left_inv_arrow";
|
|
2185
|
+
break;
|
|
2186
|
+
case "lean_right":
|
|
2187
|
+
r = "lean_right";
|
|
2188
|
+
break;
|
|
2189
|
+
case "lean_left":
|
|
2190
|
+
r = "lean_left";
|
|
2191
|
+
break;
|
|
2192
|
+
case "trapezoid":
|
|
2193
|
+
r = "trapezoid";
|
|
2194
|
+
break;
|
|
2195
|
+
case "inv_trapezoid":
|
|
2196
|
+
r = "inv_trapezoid";
|
|
2197
|
+
break;
|
|
2198
|
+
case "rect_left_inv_arrow":
|
|
2199
|
+
r = "rect_left_inv_arrow";
|
|
2200
|
+
break;
|
|
2201
|
+
case "circle":
|
|
2202
|
+
r = "circle";
|
|
2203
|
+
break;
|
|
2204
|
+
case "ellipse":
|
|
2205
|
+
r = "ellipse";
|
|
2206
|
+
break;
|
|
2207
|
+
case "stadium":
|
|
2208
|
+
r = "stadium";
|
|
2209
|
+
break;
|
|
2210
|
+
case "subroutine":
|
|
2211
|
+
r = "subroutine";
|
|
2212
|
+
break;
|
|
2213
|
+
case "cylinder":
|
|
2214
|
+
r = "cylinder";
|
|
2215
|
+
break;
|
|
2216
|
+
case "group":
|
|
2217
|
+
r = "rect";
|
|
2218
|
+
break;
|
|
2219
|
+
case "doublecircle":
|
|
2220
|
+
r = "doublecircle";
|
|
2221
|
+
break;
|
|
2222
|
+
default:
|
|
2223
|
+
r = "rect";
|
|
2224
|
+
}
|
|
2225
|
+
const c = Ke(i?.styles ?? []), d = i.label, o = i.size ?? { width: 0, height: 0, x: 0, y: 0 };
|
|
2226
|
+
return {
|
|
2227
|
+
labelStyle: c.labelStyle,
|
|
2228
|
+
shape: r,
|
|
2229
|
+
labelText: d,
|
|
2230
|
+
rx: s,
|
|
2231
|
+
ry: s,
|
|
2232
|
+
class: l,
|
|
2233
|
+
style: c.style,
|
|
2234
|
+
id: i.id,
|
|
2235
|
+
directions: i.directions,
|
|
2236
|
+
width: o.width,
|
|
2237
|
+
height: o.height,
|
|
2238
|
+
x: o.x,
|
|
2239
|
+
y: o.y,
|
|
2240
|
+
positioned: a,
|
|
2241
|
+
intersect: void 0,
|
|
2242
|
+
type: i.type,
|
|
2243
|
+
padding: n ?? at()?.block?.padding ?? 0
|
|
2244
|
+
};
|
|
2245
|
+
}
|
|
2246
|
+
g(Ct, "getNodeFromBlock");
|
|
2247
|
+
async function ye(e, t, a) {
|
|
2248
|
+
const i = Ct(t, a, !1);
|
|
2249
|
+
if (i.type === "group")
|
|
2250
|
+
return;
|
|
2251
|
+
const l = at(), s = await fe(e, i, { config: l }), r = s.node().getBBox(), n = a.getBlock(i.id);
|
|
2252
|
+
n.size = { width: r.width, height: r.height, x: 0, y: 0, node: s }, a.setBlock(n), s.remove();
|
|
2253
|
+
}
|
|
2254
|
+
g(ye, "calculateBlockSize");
|
|
2255
|
+
async function xe(e, t, a) {
|
|
2256
|
+
const i = Ct(t, a, !0);
|
|
2257
|
+
if (a.getBlock(i.id).type !== "space") {
|
|
2258
|
+
const s = at();
|
|
2259
|
+
await fe(e, i, { config: s }), t.intersect = i?.intersect, Es(i);
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
g(xe, "insertBlockPositioned");
|
|
2263
|
+
async function pt(e, t, a, i) {
|
|
2264
|
+
for (const l of t)
|
|
2265
|
+
await i(e, l, a), l.children && await pt(e, l.children, a, i);
|
|
2266
|
+
}
|
|
2267
|
+
g(pt, "performOperations");
|
|
2268
|
+
async function be(e, t, a) {
|
|
2269
|
+
await pt(e, t, a, ye);
|
|
2270
|
+
}
|
|
2271
|
+
g(be, "calculateBlockSizes");
|
|
2272
|
+
async function we(e, t, a) {
|
|
2273
|
+
await pt(e, t, a, xe);
|
|
2274
|
+
}
|
|
2275
|
+
g(we, "insertBlocks");
|
|
2276
|
+
async function me(e, t, a, i, l) {
|
|
2277
|
+
const s = new Ze({
|
|
2278
|
+
multigraph: !0,
|
|
2279
|
+
compound: !0
|
|
2280
|
+
});
|
|
2281
|
+
s.setGraph({
|
|
2282
|
+
rankdir: "TB",
|
|
2283
|
+
nodesep: 10,
|
|
2284
|
+
ranksep: 10,
|
|
2285
|
+
marginx: 8,
|
|
2286
|
+
marginy: 8
|
|
2287
|
+
});
|
|
2288
|
+
for (const r of a)
|
|
2289
|
+
r.size && s.setNode(r.id, {
|
|
2290
|
+
width: r.size.width,
|
|
2291
|
+
height: r.size.height,
|
|
2292
|
+
intersect: r.intersect
|
|
2293
|
+
});
|
|
2294
|
+
for (const r of t)
|
|
2295
|
+
if (r.start && r.end) {
|
|
2296
|
+
const n = i.getBlock(r.start), c = i.getBlock(r.end);
|
|
2297
|
+
if (n?.size && c?.size) {
|
|
2298
|
+
const d = n.size, o = c.size, y = [
|
|
2299
|
+
{ x: d.x, y: d.y },
|
|
2300
|
+
{ x: d.x + (o.x - d.x) / 2, y: d.y + (o.y - d.y) / 2 },
|
|
2301
|
+
{ x: o.x, y: o.y }
|
|
2302
|
+
];
|
|
2303
|
+
Va(
|
|
2304
|
+
e,
|
|
2305
|
+
{ v: r.start, w: r.end, name: r.id },
|
|
2306
|
+
{
|
|
2307
|
+
...r,
|
|
2308
|
+
arrowTypeEnd: r.arrowTypeEnd,
|
|
2309
|
+
arrowTypeStart: r.arrowTypeStart,
|
|
2310
|
+
points: y,
|
|
2311
|
+
classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
|
|
2312
|
+
},
|
|
2313
|
+
void 0,
|
|
2314
|
+
"block",
|
|
2315
|
+
s,
|
|
2316
|
+
l
|
|
2317
|
+
), r.label && (await Ua(e, {
|
|
2318
|
+
...r,
|
|
2319
|
+
label: r.label,
|
|
2320
|
+
labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
|
|
2321
|
+
arrowTypeEnd: r.arrowTypeEnd,
|
|
2322
|
+
arrowTypeStart: r.arrowTypeStart,
|
|
2323
|
+
points: y,
|
|
2324
|
+
classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
|
|
2325
|
+
}), Ha(
|
|
2326
|
+
{ ...r, x: y[1].x, y: y[1].y },
|
|
2327
|
+
{
|
|
2328
|
+
originalPath: y
|
|
2329
|
+
}
|
|
2330
|
+
));
|
|
2331
|
+
}
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
2334
|
+
g(me, "insertEdges");
|
|
2335
|
+
var _s = /* @__PURE__ */ g(function(e, t) {
|
|
2336
|
+
return t.db.getClasses();
|
|
2337
|
+
}, "getClasses"), Ts = /* @__PURE__ */ g(async function(e, t, a, i) {
|
|
2338
|
+
const { securityLevel: l, block: s } = at(), r = i.db;
|
|
2339
|
+
let n;
|
|
2340
|
+
l === "sandbox" && (n = O("#i" + t));
|
|
2341
|
+
const c = l === "sandbox" ? O(n.nodes()[0].contentDocument.body) : O("body"), d = l === "sandbox" ? c.select(`[id="${t}"]`) : O(`[id="${t}"]`);
|
|
2342
|
+
ja(d, ["point", "circle", "cross"], i.type, t);
|
|
2343
|
+
const y = r.getBlocks(), w = r.getBlocksFlat(), x = r.getEdges(), L = d.insert("g").attr("class", "block");
|
|
2344
|
+
await be(L, y, r);
|
|
2345
|
+
const v = le(r);
|
|
2346
|
+
if (await we(L, y, r), await me(L, x, w, r, t), v) {
|
|
2347
|
+
const k = v, C = Math.max(1, Math.round(0.125 * (k.width / k.height))), _ = k.height + C + 10, D = k.width + 10, { useMaxWidth: b } = s;
|
|
2348
|
+
Re(d, _, D, !!b), S.debug("Here Bounds", v, k), d.attr(
|
|
2349
|
+
"viewBox",
|
|
2350
|
+
`${k.x - 5} ${k.y - 5} ${k.width + 10} ${k.height + 10}`
|
|
2351
|
+
);
|
|
2352
|
+
}
|
|
2353
|
+
}, "draw"), Ds = {
|
|
2354
|
+
draw: Ts,
|
|
2355
|
+
getClasses: _s
|
|
2356
|
+
}, Os = {
|
|
2357
|
+
parser: ia,
|
|
2358
|
+
db: ka,
|
|
2359
|
+
renderer: Ds,
|
|
2360
|
+
styles: _a
|
|
2361
|
+
};
|
|
2362
|
+
export {
|
|
2363
|
+
Os as diagram
|
|
2364
|
+
};
|