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