@kabmo-labs/kabmo 0.58.1 → 0.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +513 -495
- package/dist/client/static/js/{Body-ysmhxbvk.js → Body-jqq4654r.js} +3 -3
- package/dist/client/static/js/{CsvGrid-w90pxyn2.js → CsvGrid-avw0taqb.js} +2 -2
- package/dist/client/static/js/{DocxView-evxn6kaq.js → DocxView-d221vr6g.js} +3 -3
- package/dist/client/static/js/{DrawioView-tmdevwf4.js → DrawioView-gjsy7p01.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-bpsn2z9p.js → HtmlPreview-949393v1.js} +1 -1
- package/dist/client/static/js/ImageView-pan9pqtm.js +1 -0
- package/dist/client/static/js/LayoutWrapper-p0qmghgt.js +2 -0
- package/dist/client/static/js/MergeDiffView-swt467g7.js +1 -0
- package/dist/client/static/js/Modal-4spmcn44.js +60 -0
- package/dist/client/static/js/{PdfView-txxn6qff.js → PdfView-dzj2s6rj.js} +1 -1
- package/dist/client/static/js/SessionsView-b6szjdg5.js +1 -0
- package/dist/client/static/js/{SheetView-52b33e6f.js → SheetView-jpc178g5.js} +11 -11
- package/dist/client/static/js/{SvgPreview-hrk4pfm1.js → SvgPreview-94fap32p.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-at77sybc.js → abnfDiagram-O67JEVCF-a6eyfzrj.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-bwn1drdz.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-raw33jgg.js → architectureDiagram-NJMV4G6O-pgmyfncy.js} +3 -3
- package/dist/client/static/js/{astro-qha7sceh.js → astro-ryr2ajmg.js} +1 -1
- package/dist/client/static/js/bash-zknkkwkw.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-b6e90fbk.js → blockDiagram-BEXU5L5S-rf51jyb2.js} +4 -4
- package/dist/client/static/js/c-0w02jkxb.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-msg9y1c6.js → c4Diagram-YGBWAQC7-0faj48jp.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-jmrd1h8r.js → classDiagram-v2-NBCMYWYE-bvzsws8x.js} +4 -4
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-na65ebq3.js → cose-bilkent-JH36ORCC-j1amnd3m.js} +1 -1
- package/dist/client/static/js/cpp-p5b4vean.js +1 -0
- package/dist/client/static/js/css-9jzbvdyz.js +1 -0
- package/dist/client/static/js/css-sn00sq6v.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-jbc50ks8.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-9xkkw71m.js → cynefinDiagram-VND7K2PF-f73w6zzz.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-p59f19tv.js → dagre-6A5THRUB-a5vgvjsg.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-2e2rcvn7.js → diagram-22UHCM2B-6y9efamp.js} +9 -9
- package/dist/client/static/js/{diagram-3UASUU5V-r9ds8vgr.js → diagram-3UASUU5V-2mycy7xm.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-jgwxv7v8.js → diagram-ATOU4E4O-10zgjb66.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-20m35eqq.js → diagram-CDSNMT55-bewa52yf.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-vt3kxt2m.js → diagram-MLGK6HIB-mh3b7gd3.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-c47rgxf1.js → diagram-MPIPVDR6-gvdrbdm5.js} +2 -2
- package/dist/client/static/js/{dockerfile-gtcyey0q.js → dockerfile-6bn19kg0.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-aszw3xy3.js → ebnfDiagram-ZINNZB2B-2prre93c.js} +1 -1
- package/dist/client/static/js/{elixir-w92v180e.js → elixir-fyxw6d70.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-gbvr3gry.js → elk-276RUBZZ-9t6t9kc6.js} +2 -2
- package/dist/client/static/js/{erDiagram-OPXOYQCR-1hqca8qe.js → erDiagram-OPXOYQCR-etcggr5n.js} +6 -6
- package/dist/client/static/js/{erlang-v7344938.js → erlang-97ayje6m.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-b37ey01t.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-7c2ncsw7.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-07v22te5.js → ganttDiagram-FUAMR5RP-cdc4mwhs.js} +3 -3
- package/dist/client/static/js/gitGraph-4MIJSDKK-mvqq7tcs.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-y068jtz9.js → gitGraphDiagram-X574FWY7-55d0fa7x.js} +8 -8
- package/dist/client/static/js/graphql-xzykn0ba.js +1 -0
- package/dist/client/static/js/html-2zc3shky.js +1 -0
- package/dist/client/static/js/{index-r8d4bk86.js → index-10vzyga1.js} +2 -2
- package/dist/client/static/js/{index-8d8ce00v.js → index-27gwghmp.js} +2 -2
- package/dist/client/static/js/{index-zhgh7a31.js → index-2f6afhze.js} +2 -2
- package/dist/client/static/js/{index-nptbz7sv.js → index-3akjcs82.js} +1 -1
- package/dist/client/static/js/{index-fhtnvqgf.js → index-3j2he86h.js} +2 -2
- package/dist/client/static/js/index-461ga40v.js +2 -0
- package/dist/client/static/js/{index-9qf2h9jb.js → index-51rbgeh9.js} +12 -12
- package/dist/client/static/js/{index-s4dpkds5.js → index-537m8a3x.js} +2 -2
- package/dist/client/static/js/{index-tdg7hz80.js → index-58z2hatp.js} +2 -2
- package/dist/client/static/js/{index-4tbdws4r.js → index-5e4e18tg.js} +2 -2
- package/dist/client/static/js/{index-gqrt766t.js → index-60cxxnpk.js} +61 -61
- package/dist/client/static/js/{index-th61y26d.js → index-69mnn71v.js} +2 -2
- package/dist/client/static/js/{index-e0kahttb.js → index-6bsez5n6.js} +1 -1
- package/dist/client/static/js/{index-gaa39w5q.js → index-8tzt0dek.js} +2 -2
- package/dist/client/static/js/{index-zs7kw0be.js → index-8z9aqgf3.js} +4 -4
- package/dist/client/static/js/{index-ewryzs4g.js → index-92h38pwg.js} +2 -2
- package/dist/client/static/js/{index-f61c25vn.js → index-9rvjegmy.js} +3 -3
- package/dist/client/static/js/{index-80kx6dm6.js → index-a3bpmw2r.js} +2 -2
- package/dist/client/static/js/{index-xmg1x6zv.js → index-a5ecn5yx.js} +5 -5
- package/dist/client/static/js/{index-azz46nwc.js → index-ax8gaayq.js} +2 -2
- package/dist/client/static/js/{index-wn28m9h7.js → index-c253x7vt.js} +8 -8
- package/dist/client/static/js/{index-y0f3wbc3.js → index-d9sfavx1.js} +2 -2
- package/dist/client/static/js/{index-5hvt233n.js → index-db6s66jr.js} +2 -2
- package/dist/client/static/js/index-eggbcdwx.js +481 -0
- package/dist/client/static/js/{index-e4nge3f4.js → index-f13ern5e.js} +1 -1
- package/dist/client/static/js/index-f6t91mpp.js +2 -0
- package/dist/client/static/js/{index-wxqcnsrq.js → index-fr91ghwb.js} +2 -2
- package/dist/client/static/js/{index-tq3t3qm4.js → index-fsa18ns9.js} +2 -2
- package/dist/client/static/js/{index-fv7nybnf.js → index-fyt8m8ah.js} +2 -2
- package/dist/client/static/js/{index-007sewcn.js → index-gcad7b6g.js} +2 -2
- package/dist/client/static/js/{index-rxt8sf9a.js → index-h1xbx74w.js} +2 -2
- package/dist/client/static/js/{index-medk4f18.js → index-j1ksa4x2.js} +2 -2
- package/dist/client/static/js/{index-sxag9ptg.js → index-jct0jryd.js} +2 -2
- package/dist/client/static/js/{index-qefssj0m.js → index-jpvng27a.js} +1 -1
- package/dist/client/static/js/{index-vw8b29ek.js → index-me0b6wkw.js} +1 -1
- package/dist/client/static/js/{index-6x0kn8pb.js → index-mhrkjbjq.js} +2 -2
- package/dist/client/static/js/{index-fe92hqmb.js → index-mngpcca7.js} +4 -4
- package/dist/client/static/js/index-mttx9327.css +1 -0
- package/dist/client/static/js/{index-5xxbbzqa.js → index-mx5y9vt9.js} +7 -7
- package/dist/client/static/js/{index-3ymw778n.js → index-ndqtff48.js} +2 -2
- package/dist/client/static/js/{index-cmjyet7w.js → index-nf4hq5tg.js} +27 -27
- package/dist/client/static/js/{index-cpp43af3.js → index-njhrm5qa.js} +9 -9
- package/dist/client/static/js/index-nnwcbp2d.js +2 -0
- package/dist/client/static/js/{index-3p732mvs.js → index-np2rfq06.js} +2 -2
- package/dist/client/static/js/{index-2s17netq.js → index-nwbr15b3.js} +2 -2
- package/dist/client/static/js/{index-an7fq7f6.js → index-pa70qj4p.js} +1 -1
- package/dist/client/static/js/index-pe5f2gmn.js +1 -0
- package/dist/client/static/js/{index-1e0rt7c6.js → index-pgy7ree5.js} +5 -5
- package/dist/client/static/js/index-pzwf6hwe.js +4 -0
- package/dist/client/static/js/{index-7sq6cjt1.js → index-q3k8r0ms.js} +11 -11
- package/dist/client/static/js/{index-j830qk07.js → index-rw84kefb.js} +2 -2
- package/dist/client/static/js/{index-94d416ee.js → index-s9ts6qbj.js} +2 -2
- package/dist/client/static/js/{index-vny4ymjf.js → index-sg65xdey.js} +1 -1
- package/dist/client/static/js/{index-hb7a7m9m.js → index-skvfxcd8.js} +1 -1
- package/dist/client/static/js/{index-1e710snk.js → index-sx2yz2wx.js} +1 -1
- package/dist/client/static/js/{index-kzzvrqnv.js → index-trq7bdvk.js} +2 -2
- package/dist/client/static/js/{index-v8xhgfeq.js → index-vs2y8gxr.js} +2 -2
- package/dist/client/static/js/index-wwyjzhgs.js +2 -0
- package/dist/client/static/js/{index-374xq5a4.js → index-xe447cw3.js} +1 -1
- package/dist/client/static/js/index-y09de44h.js +2 -0
- package/dist/client/static/js/{index-jxsha63v.js → index-y4cx8cqf.js} +2 -2
- package/dist/client/static/js/{index-c9aqx3ht.js → index-yg38s8t3.js} +1 -1
- package/dist/client/static/js/{index-dxq1tbwm.js → index-yh7gngsh.js} +2 -2
- package/dist/client/static/js/{index-3m1dksmy.js → index-yrwm437g.js} +2 -2
- package/dist/client/static/js/{index-7ynf3s2w.js → index-z82nd2bd.js} +2 -2
- package/dist/client/static/js/info-A6RAGUB7-zkv4crz7.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-1x83h4k4.js → infoDiagram-VRGFBTTK-9xph6cr5.js} +2 -2
- package/dist/client/static/js/ini-62r3vxaf.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-et6z3c28.js → ishikawaDiagram-OU5B5YK6-3gshs3v8.js} +2 -2
- package/dist/client/static/js/java-kacycary.js +1 -0
- package/dist/client/static/js/javascript-zc1qnyyp.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-sw669e7a.js → journeyDiagram-ZHPQQLJL-fa8x56mf.js} +2 -2
- package/dist/client/static/js/json-yrwpn6bd.js +1 -0
- package/dist/client/static/js/jsx-b40ag8q1.js +1 -0
- package/dist/client/static/js/{julia-z14p8jsx.js → julia-agc5kfvg.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-aqxg95kx.js → kanban-definition-PNTS6WVX-fybp2hh4.js} +6 -6
- package/dist/client/static/js/lua-bk961f37.js +1 -0
- package/dist/client/static/js/markdown-b7rgzgd6.js +1 -0
- package/dist/client/static/js/mermaid.core-jjh5ggp0.js +12 -0
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-530anpc4.js → mindmap-definition-NLK3R4M7-gtfbg619.js} +4 -4
- package/dist/client/static/js/one-dark-pro-vht9rv39.js +1 -0
- package/dist/client/static/js/one-light-arxc5whh.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-dgpge627.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-5zar6hvy.js → pegDiagram-GJSIUBJH-1a51sbqv.js} +1 -1
- package/dist/client/static/js/{perl-1na2x6yd.js → perl-v5vbtzgf.js} +1 -1
- package/dist/client/static/js/{php-x75tt7w3.js → php-83qwy98t.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-b8pgsqrd.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-3bx8syvw.js → pieDiagram-5QR66LMP-zd9svyyn.js} +3 -3
- package/dist/client/static/js/properties-k8gbzggp.js +1 -0
- package/dist/client/static/js/python-343tspad.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-yaarpr2e.js → quadrantDiagram-O4NWA36T-5gtw2m6s.js} +2 -2
- package/dist/client/static/js/r-ycdwmv8g.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-fmfe5y27.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-b5tks4ce.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-0sf4m0ze.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-pjfy3pt7.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-nr8ngt42.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-ag41q4nt.js → railroadDiagram-XR7U4H2S-3ccwpfzz.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-g8sr48h4.js → requirementDiagram-PLB6GJNP-sasndrrp.js} +3 -3
- package/dist/client/static/js/{ruby-3h22qahv.js → ruby-994n5j6e.js} +1 -1
- package/dist/client/static/js/{rust-r27demr5.js → rust-n9z2c9m3.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-t1wbd1hh.js → sankeyDiagram-IPEJSGJF-2ahb4sda.js} +3 -3
- package/dist/client/static/js/{sass-8bq5r2tz.js → sass-p6g7qdv2.js} +1 -1
- package/dist/client/static/js/{scss-c04ezwnn.js → scss-4j4t3r6y.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-407mjqty.js → sequenceDiagram-PO4LG4MO-bfj90kz1.js} +7 -7
- package/dist/client/static/js/{sizeCapture-INFHLROL-w38zb9ky.js → sizeCapture-INFHLROL-5tygxmtc.js} +1 -1
- package/dist/client/static/js/sql-kwpd5w07.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-4cvgymkc.js → stateDiagram-v2-GCMORJYK-533xw76e.js} +3 -3
- package/dist/client/static/js/{svelte-egg3x4tw.js → svelte-bek3h1sz.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-w7ts2rzw.js → swimlanes-2SLR337P-gd3d04pk.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-xxmvdyg4.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-nq46nzy9.js → timeline-definition-EJHVYXUP-fvqvgqvg.js} +3 -3
- package/dist/client/static/js/treeView-Q6P3EWNA-23r9fa68.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-mxxzdrj6.js +1 -0
- package/dist/client/static/js/tsx-gjxfjnbk.js +1 -0
- package/dist/client/static/js/typescript-4dchbnya.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-q144snzb.js → usecaseDiagram-POWQR4AR-tm1f0m4x.js} +15 -15
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-2wemak2p.js → vennDiagram-UO4OBE2U-2vdvv1hd.js} +4 -4
- package/dist/client/static/js/{vue-d7p4wv35.js → vue-y44m889c.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-cbqtax1x.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-bb2qvvgr.js → wardleyDiagram-VNRHLVJA-7avcjznx.js} +4 -4
- package/dist/client/static/js/xml-xs6qz3ya.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-9dr05fdq.js → xychartDiagram-PMCCYNJV-g39y526n.js} +4 -4
- package/dist/client/static/js/yaml-174nk5bn.js +1 -0
- package/package.json +7 -7
- package/src/client/borders.css +15 -3
- package/src/client/components/common/ComposerTextarea.test.tsx +13 -1
- package/src/client/components/common/ComposerTextarea.tsx +8 -2
- package/src/client/components/common/MarkdownRenderer.tsx +11 -2
- package/src/client/components/common/harness-glyph/harness-glyph.test.ts +0 -4
- package/src/client/components/common/harness-glyph/index.tsx +4 -5
- package/src/client/components/common/markdown-inline-file.test.tsx +90 -15
- package/src/client/components/common/session-actions-menu/index.test.tsx +45 -0
- package/src/client/components/common/session-actions-menu/index.tsx +6 -1
- package/src/client/components/layout/desktop-layout/RightColumn.tsx +4 -1
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +28 -35
- package/src/client/components/layout/desktop-layout/index.tsx +5 -3
- package/src/client/components/layout/desktop-layout/resizer/index.tsx +13 -3
- package/src/client/components/layout/desktop-layout/resizer/panel.test.ts +41 -0
- package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +21 -1
- package/src/client/components/layout/session-sidebar/CategoryHeader.worktree.test.tsx +1 -0
- package/src/client/components/layout/session-sidebar/CategoryItem.tsx +8 -2
- package/src/client/components/layout/session-sidebar/ClassicView.tsx +2 -0
- package/src/client/components/layout/session-sidebar/SessionList.tsx +4 -0
- package/src/client/components/layout/session-sidebar/SessionsView.tsx +22 -1
- package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +45 -28
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +9 -3
- package/src/client/components/layout/session-sidebar/modern/index.tsx +2 -0
- package/src/client/components/layout/session-sidebar/modern/workspace-header.test.tsx +27 -11
- package/src/client/components/layout/session-sidebar/search-results.test.tsx +29 -16
- package/src/client/components/layout/session-sidebar/session-list-states.test.tsx +1 -0
- package/src/client/components/layout/session-sidebar/variant-props.ts +2 -0
- package/src/client/components/mobile/LayoutWrapper.tsx +9 -0
- package/src/client/components/mobile/SessionSidebar.tsx +4 -0
- package/src/client/components/mobile/left-drawer-nav.test.tsx +1 -1
- package/src/client/components/mobile/mobile-session-sidebar/Body.tsx +4 -0
- package/src/client/components/mobile/mobile-session-sidebar/ClassicDrawer.tsx +3 -0
- package/src/client/components/mobile/mobile-session-sidebar/Item.test.tsx +85 -0
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +30 -14
- package/src/client/components/mobile/mobile-session-sidebar/List.tsx +4 -0
- package/src/client/components/settings/apply-side-effects.test.ts +31 -0
- package/src/client/components/settings/apply-side-effects.ts +7 -0
- package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.tsx +3 -2
- package/src/client/components/settings/categories/appearance-settings/SidebarStyleSection.test.tsx +95 -0
- package/src/client/components/settings/categories/appearance-settings/SidebarStyleSection.tsx +35 -0
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/MessageItem.gutter.test.ts +26 -0
- package/src/client/components/workspace/chat-timeline/MessageItem.tsx +6 -3
- package/src/client/components/workspace/chat-timeline/ThinkingSection.test.tsx +17 -0
- package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +9 -3
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +39 -2
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +19 -4
- package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +28 -21
- package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.wait.test.tsx +48 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +44 -21
- package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.test.ts +24 -0
- package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.tsx +44 -18
- package/src/client/components/workspace/chat-timeline/chat-input/GoalSurfaces.tsx +2 -1
- package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.test.ts +35 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.tsx +33 -12
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.test.tsx +24 -0
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +14 -3
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +24 -1
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +78 -135
- package/src/client/components/workspace/chat-timeline/chat-input/VoiceButton.tsx +58 -0
- package/src/client/components/workspace/chat-timeline/chat-input/action-base.ts +42 -0
- package/src/client/components/workspace/chat-timeline/chat-input/index.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/chat-input/mode-icons.test.ts +108 -0
- package/src/client/components/workspace/chat-timeline/chat-input/mode-icons.tsx +122 -0
- package/src/client/components/workspace/chat-timeline/chat-input/narrow.test.tsx +78 -20
- package/src/client/components/workspace/chat-timeline/chat-input/styles/index.tsx +11 -5
- package/src/client/components/workspace/chat-timeline/chat-input/styles.test.tsx +19 -0
- package/src/client/components/workspace/chat-timeline/composer-dock-frame.test.tsx +9 -0
- package/src/client/components/workspace/chat-timeline/index.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OptionRow.test.tsx +125 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OptionRow.tsx +84 -27
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Mcp.test.tsx +18 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Mcp.tsx +14 -5
- package/src/client/components/workspace/model-dropdown/HarnessTabs.tsx +31 -10
- package/src/client/components/workspace/model-dropdown/Header.tsx +13 -5
- package/src/client/components/workspace/model-dropdown/Panel.tsx +18 -0
- package/src/client/components/workspace/model-dropdown/ThinkingLevels.tsx +51 -0
- package/src/client/components/workspace/model-dropdown/Trigger.tsx +99 -0
- package/src/client/components/workspace/model-dropdown/bands.ts +51 -0
- package/src/client/components/workspace/model-dropdown/harness-tabs.test.tsx +21 -5
- package/src/client/components/workspace/model-dropdown/index.tsx +20 -47
- package/src/client/components/workspace/model-dropdown/thinking-levels.test.tsx +108 -0
- package/src/client/components/workspace/model-dropdown/trigger.test.ts +54 -8
- package/src/client/hooks/chat/composer/attachments.test.ts +12 -0
- package/src/client/hooks/chat/composer/attachments.ts +16 -4
- package/src/client/hooks/chat/composer/pipeline.test.ts +14 -0
- package/src/client/hooks/chat/composer/pipeline.ts +15 -6
- package/src/client/hooks/chat/omp/session-list.activity.test.ts +20 -0
- package/src/client/hooks/chat/omp/session-merges.ts +18 -6
- package/src/client/hooks/chat/omp/session-sidebar-controller.ts +4 -0
- package/src/client/hooks/chat/timeline/scope.test.ts +17 -0
- package/src/client/hooks/chat/timeline/scope.ts +6 -1
- package/src/client/hooks/chat/timeline/send-refusal.test.ts +19 -0
- package/src/client/hooks/chat/timeline/send-steer.test.ts +17 -0
- package/src/client/hooks/chat/timeline/send.ts +17 -0
- package/src/client/hooks/editor/quick-open.ts +41 -0
- package/src/client/hooks/ui/border-style.test.ts +13 -0
- package/src/client/hooks/ui/markdown-render.ts +11 -6
- package/src/client/hooks/ui/open-inline-file.test.ts +16 -0
- package/src/client/hooks/ui/open-inline-file.ts +4 -2
- package/src/client/hooks/ui/show-more.ts +11 -1
- package/src/client/hooks/ui/ui-feedback.test.ts +11 -0
- package/src/client/hooks/ui/verified-inline-files.test.tsx +143 -0
- package/src/client/hooks/ui/verified-inline-files.ts +165 -0
- package/src/client/hooks/workspace/mobile-workspace-panels.test.tsx +116 -0
- package/src/client/hooks/workspace/mobile-workspace-panels.ts +73 -0
- package/src/client/hooks/workspace/panel-resize.test.ts +127 -0
- package/src/client/hooks/workspace/panel-resize.ts +81 -0
- package/src/client/hooks/workspace/session-list-limit.test.ts +80 -0
- package/src/client/hooks/workspace/session-list-limit.ts +69 -0
- package/src/client/hooks/workspace/session-pin.ts +58 -0
- package/src/client/hooks/workspace/workspace-panels-mode.test.tsx +87 -0
- package/src/client/hooks/workspace/workspace-panels-mode.ts +76 -0
- package/src/client/lib/router/branch-params.test.ts +17 -1
- package/src/client/lib/router/branch-params.ts +18 -0
- package/src/client/lib/ui/pressed.ts +15 -0
- package/src/client/tailwind.css +30 -10
- package/src/server/lib/connect/cloudflared.lifecycle.test.ts +25 -9
- package/src/server/lib/db/schema.test.ts +1 -1
- package/src/server/lib/db/schema.ts +17 -0
- package/src/server/lib/harness/activity.server.test.ts +81 -0
- package/src/server/lib/harness/activity.server.ts +55 -0
- package/src/server/lib/harness/spawn.server.ts +9 -0
- package/src/server/lib/omp/session/delete.server.ts +4 -2
- package/src/server/lib/omp/session/sidebar-activity.server.test.ts +24 -2
- package/src/server/lib/omp/session/sidebar-data.canonical.test.ts +14 -0
- package/src/server/lib/sessions/last-opened.server.test.ts +17 -0
- package/src/server/lib/sessions/last-opened.server.ts +18 -1
- package/src/server/routes/sessions/index.ts +3 -2
- package/src/server/routes/sessions/routes.test.ts +29 -46
- package/src/server/routes/sessions/session.ts +40 -62
- package/src/server/routes/sessions/state.test.ts +89 -0
- package/src/server/routes/sessions/state.ts +86 -0
- package/src/shared/lib/chat/attachment-budget.test.ts +74 -0
- package/src/shared/lib/chat/attachment-budget.ts +111 -0
- package/src/shared/lib/chat/attachments.test.ts +0 -17
- package/src/shared/lib/chat/attachments.ts +0 -53
- package/src/shared/lib/chat/timeline/block-chrome.test.ts +35 -0
- package/src/shared/lib/chat/timeline/block-chrome.ts +21 -0
- package/src/shared/lib/markdown/degenerate-emphasis.test.ts +64 -0
- package/src/shared/lib/markdown/degenerate-emphasis.ts +90 -0
- package/src/shared/lib/markdown/inline-file.test.ts +79 -22
- package/src/shared/lib/markdown/inline-file.ts +57 -25
- package/src/shared/lib/markdown/marked.ts +5 -1
- package/src/shared/lib/settings/defaults.ts +2 -0
- package/src/shared/lib/theme/border-style.ts +1 -1
- package/src/shared/lib/workspace/active-project.test.ts +17 -1
- package/src/shared/lib/workspace/active-project.ts +9 -0
- package/src/shared/lib/workspace/project-settings-delete.test.ts +97 -0
- package/src/shared/lib/workspace/project-settings.test.ts +2 -34
- package/src/shared/lib/workspace/project-settings.ts +6 -0
- package/src/shared/lib/workspace/session-list-limit.test.ts +31 -0
- package/src/shared/lib/workspace/session-list-limit.ts +32 -0
- package/src/shared/lib/workspace/sidebar-sort.test.ts +21 -0
- package/src/shared/lib/workspace/workspace-panel-widths.ts +1 -1
- package/src/shared/lib/workspace/workspace-session.test.ts +34 -0
- package/src/shared/lib/workspace/workspace-session.ts +40 -0
- package/src/shared/types/settings/state.ts +10 -0
- package/dist/client/static/js/ImageView-ssazqckj.js +0 -1
- package/dist/client/static/js/LayoutWrapper-qwpfq4dq.js +0 -2
- package/dist/client/static/js/MergeDiffView-en6aazw8.js +0 -1
- package/dist/client/static/js/Modal-zjnhj9nb.js +0 -60
- package/dist/client/static/js/SessionsView-eryjtmb2.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-v05ap4e3.js +0 -1
- package/dist/client/static/js/bash-n5d0esqg.js +0 -1
- package/dist/client/static/js/c-pk766wx0.js +0 -1
- package/dist/client/static/js/cpp-3pt91jvm.js +0 -1
- package/dist/client/static/js/css-q2k6afe3.js +0 -1
- package/dist/client/static/js/css-sp1cgdbr.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-sqv0ze38.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-t4dzf5s7.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-c16xmjyv.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-0jq8y0qd.js +0 -1
- package/dist/client/static/js/graphql-qx4tt6ze.js +0 -1
- package/dist/client/static/js/html-5e0g8664.js +0 -1
- package/dist/client/static/js/index-4ddgpqm0.css +0 -1
- package/dist/client/static/js/index-5g2j626a.js +0 -1
- package/dist/client/static/js/index-cc7qbfvn.js +0 -477
- package/dist/client/static/js/index-f27wvdky.js +0 -4
- package/dist/client/static/js/index-m5n0zsft.js +0 -2
- package/dist/client/static/js/index-rqt8mem9.js +0 -2
- package/dist/client/static/js/index-s9k82stc.js +0 -2
- package/dist/client/static/js/index-skwem10a.js +0 -2
- package/dist/client/static/js/index-tv9rn2nd.js +0 -2
- package/dist/client/static/js/info-A6RAGUB7-szttx3v5.js +0 -1
- package/dist/client/static/js/ini-bdk46a3d.js +0 -1
- package/dist/client/static/js/java-3g3925cf.js +0 -1
- package/dist/client/static/js/javascript-av46zx4c.js +0 -1
- package/dist/client/static/js/json-hdyzmffz.js +0 -1
- package/dist/client/static/js/jsx-y8r9mrdq.js +0 -1
- package/dist/client/static/js/lua-wf5k6p3r.js +0 -1
- package/dist/client/static/js/markdown-9bf16dx7.js +0 -1
- package/dist/client/static/js/mermaid.core-6cgqsgcf.js +0 -12
- package/dist/client/static/js/one-dark-pro-9hnhtkpr.js +0 -1
- package/dist/client/static/js/one-light-2n5y8592.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-401149bv.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-bgfv8tfz.js +0 -1
- package/dist/client/static/js/properties-xk4dn00p.js +0 -1
- package/dist/client/static/js/python-7sgz05n4.js +0 -1
- package/dist/client/static/js/r-w4qxm0pv.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-pw720590.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-n2a30ngs.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-rn5rx9qt.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-t4yryhtd.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-c4ebgvrr.js +0 -1
- package/dist/client/static/js/sql-sd00wgem.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-v82nym6b.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-bxgt5yhm.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-hh3595m0.js +0 -1
- package/dist/client/static/js/tsx-h5yzg80q.js +0 -1
- package/dist/client/static/js/typescript-qy1sbhea.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-6bza7h1b.js +0 -1
- package/dist/client/static/js/xml-mrk4xakv.js +0 -1
- package/dist/client/static/js/yaml-xaza6dra.js +0 -1
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.test.tsx +0 -110
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +0 -86
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{Ui}from"./index-94d416ee.js";import{t,l,st,E,te,Gg,Nt,dc,pc,w,ne,F,O,G,z,j,q,H,m,va,b,Ar,hr,cl,qg,jn,V}from"./index-gqrt766t.js";import{li,pd,Kp,Vp,gr,Yp}from"./index-j830qk07.js";import{xn}from"./index-2s17netq.js";var _e=xn(cl(),1),Ee=function(){var r=t(function(Lt,C,K,Y){for(K=K||{},Y=Lt.length;Y--;K[Lt[Y]]=C);return K},"o"),e=[1,2],s=[1,3],a=[1,4],n=[2,4],h=[1,9],i=[1,11],o=[1,12],f=[1,14],p=[1,15],_=[1,17],g=[1,18],x=[1,19],k=[1,25],I=[1,26],S=[1,27],T=[1,28],A=[1,29],y=[1,30],P=[1,31],v=[1,32],N=[1,33],M=[1,34],B=[1,35],X=[1,36],J=[1,37],tt=[1,38],nt=[1,39],ct=[1,40],Tt=[1,42],pt=[1,43],ot=[1,44],ft=[1,45],Et=[1,46],Z=[1,47],U=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Vt=[1,74],qt=[1,80],D=[1,81],W=[1,82],bt=[1,83],ut=[1,84],et=[1,85],Ct=[1,86],xe=[1,87],be=[1,88],Ie=[1,89],ye=[1,90],Re=[1,91],Oe=[1,92],Le=[1,93],me=[1,94],Se=[1,95],Ae=[1,96],ke=[1,97],Ne=[1,98],we=[1,99],Pe=[1,100],De=[1,101],ve=[1,102],Ce=[1,103],Me=[1,104],Be=[1,105],Ye=[2,78],Wt=[4,5,17,51,53,54],zt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Ve=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],We=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],ie=[5,52],rt=[70,71,72,73],_t=[1,151],oe={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:t(function(C,K,Y,R,at,c,Kt){var u=c.length-1;switch(at){case 3:return R.apply(c[u]),c[u];break;case 4:case 10:this.$=[];break;case 5:case 11:c[u-1].push(c[u]),this.$=c[u-1];break;case 6:case 7:case 12:case 13:this.$=c[u];break;case 8:case 9:case 14:this.$=[];break;case 16:c[u].type="createParticipant",this.$=c[u];break;case 17:c[u-1].unshift({type:"boxStart",boxData:R.parseBoxData(c[u-2])}),c[u-1].push({type:"boxEnd",boxText:c[u-2]}),this.$=c[u-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[u-2]),sequenceIndexStep:Number(c[u-1]),sequenceVisible:!0,signalType:R.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[u-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:R.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:R.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:R.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:R.LINETYPE.ACTIVE_START,actor:c[u-1].actor};break;case 24:this.$={type:"activeEnd",signalType:R.LINETYPE.ACTIVE_END,actor:c[u-1].actor};break;case 30:R.setDiagramTitle(c[u].substring(6)),this.$=c[u].substring(6);break;case 31:R.setDiagramTitle(c[u].substring(7)),this.$=c[u].substring(7);break;case 32:this.$=c[u].trim(),R.setAccTitle(this.$);break;case 33:case 34:this.$=c[u].trim(),R.setAccDescription(this.$);break;case 35:c[u-1].unshift({type:"loopStart",loopText:R.parseMessage(c[u-2]),signalType:R.LINETYPE.LOOP_START}),c[u-1].push({type:"loopEnd",loopText:c[u-2],signalType:R.LINETYPE.LOOP_END}),this.$=c[u-1];break;case 36:c[u-1].unshift({type:"rectStart",color:R.parseMessage(c[u-2]),signalType:R.LINETYPE.RECT_START}),c[u-1].push({type:"rectEnd",color:R.parseMessage(c[u-2]),signalType:R.LINETYPE.RECT_END}),this.$=c[u-1];break;case 37:c[u-1].unshift({type:"optStart",optText:R.parseMessage(c[u-2]),signalType:R.LINETYPE.OPT_START}),c[u-1].push({type:"optEnd",optText:R.parseMessage(c[u-2]),signalType:R.LINETYPE.OPT_END}),this.$=c[u-1];break;case 38:c[u-1].unshift({type:"altStart",altText:R.parseMessage(c[u-2]),signalType:R.LINETYPE.ALT_START}),c[u-1].push({type:"altEnd",signalType:R.LINETYPE.ALT_END}),this.$=c[u-1];break;case 39:c[u-1].unshift({type:"parStart",parText:R.parseMessage(c[u-2]),signalType:R.LINETYPE.PAR_START}),c[u-1].push({type:"parEnd",signalType:R.LINETYPE.PAR_END}),this.$=c[u-1];break;case 40:c[u-1].unshift({type:"parStart",parText:R.parseMessage(c[u-2]),signalType:R.LINETYPE.PAR_OVER_START}),c[u-1].push({type:"parEnd",signalType:R.LINETYPE.PAR_END}),this.$=c[u-1];break;case 41:c[u-1].unshift({type:"criticalStart",criticalText:R.parseMessage(c[u-2]),signalType:R.LINETYPE.CRITICAL_START}),c[u-1].push({type:"criticalEnd",signalType:R.LINETYPE.CRITICAL_END}),this.$=c[u-1];break;case 42:c[u-1].unshift({type:"breakStart",breakText:R.parseMessage(c[u-2]),signalType:R.LINETYPE.BREAK_START}),c[u-1].push({type:"breakEnd",optText:R.parseMessage(c[u-2]),signalType:R.LINETYPE.BREAK_END}),this.$=c[u-1];break;case 44:this.$=c[u-3].concat([{type:"option",optionText:R.parseMessage(c[u-1]),signalType:R.LINETYPE.CRITICAL_OPTION},c[u]]);break;case 46:this.$=c[u-3].concat([{type:"and",parText:R.parseMessage(c[u-1]),signalType:R.LINETYPE.PAR_AND},c[u]]);break;case 48:this.$=c[u-3].concat([{type:"else",altText:R.parseMessage(c[u-1]),signalType:R.LINETYPE.ALT_ELSE},c[u]]);break;case 49:c[u-3].draw="participant",c[u-3].type="addParticipant",c[u-3].description=R.parseMessage(c[u-1]),this.$=c[u-3];break;case 50:c[u-1].draw="participant",c[u-1].type="addParticipant",this.$=c[u-1];break;case 51:c[u-3].draw="actor",c[u-3].type="addParticipant",c[u-3].description=R.parseMessage(c[u-1]),this.$=c[u-3];break;case 52:case 57:c[u-1].draw="actor",c[u-1].type="addParticipant",this.$=c[u-1];break;case 53:c[u-1].type="destroyParticipant",this.$=c[u-1];break;case 54:c[u-3].draw="participant",c[u-3].type="addParticipant",c[u-3].description=R.parseMessage(c[u-1]),this.$=c[u-3];break;case 55:c[u-1].draw="participant",c[u-1].type="addParticipant",this.$=c[u-1];break;case 56:c[u-3].draw="actor",c[u-3].type="addParticipant",c[u-3].description=R.parseMessage(c[u-1]),this.$=c[u-3];break;case 58:this.$=[c[u-1],{type:"addNote",placement:c[u-2],actor:c[u-1].actor,text:c[u]}];break;case 59:c[u-2]=[].concat(c[u-1],c[u-1]).slice(0,2),c[u-2][0]=c[u-2][0].actor,c[u-2][1]=c[u-2][1].actor,this.$=[c[u-1],{type:"addNote",placement:R.PLACEMENT.OVER,actor:c[u-2].slice(0,2),text:c[u]}];break;case 60:this.$=[c[u-1],{type:"addLinks",actor:c[u-1].actor,text:c[u]}];break;case 61:this.$=[c[u-1],{type:"addALink",actor:c[u-1].actor,text:c[u]}];break;case 62:this.$=[c[u-1],{type:"addProperties",actor:c[u-1].actor,text:c[u]}];break;case 63:this.$=[c[u-1],{type:"addDetails",actor:c[u-1].actor,text:c[u]}];break;case 66:this.$=[c[u-2],c[u]];break;case 67:this.$=c[u];break;case 68:this.$=R.PLACEMENT.LEFTOF;break;case 69:this.$=R.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[u-4],c[u-1],{type:"addMessage",from:c[u-4].actor,to:c[u-1].actor,signalType:c[u-3],msg:c[u],activate:!0},{type:"activeStart",signalType:R.LINETYPE.ACTIVE_START,actor:c[u-1].actor}];break;case 71:this.$=[c[u-4],c[u-1],{type:"addMessage",from:c[u-4].actor,to:c[u-1].actor,signalType:c[u-3],msg:c[u]},{type:"activeEnd",signalType:R.LINETYPE.ACTIVE_END,actor:c[u-4].actor}];break;case 72:this.$=[c[u-4],c[u-1],{type:"addMessage",from:c[u-4].actor,to:c[u-1].actor,signalType:c[u-3],msg:c[u],activate:!0,centralConnection:R.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:R.LINETYPE.CENTRAL_CONNECTION,actor:c[u-1].actor}];break;case 73:this.$=[c[u-4],c[u-1],{type:"addMessage",from:c[u-4].actor,to:c[u-1].actor,signalType:c[u-2],msg:c[u],activate:!1,centralConnection:R.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:R.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[u-4].actor}];break;case 74:this.$=[c[u-5],c[u-1],{type:"addMessage",from:c[u-5].actor,to:c[u-1].actor,signalType:c[u-3],msg:c[u],activate:!0,centralConnection:R.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:R.LINETYPE.CENTRAL_CONNECTION,actor:c[u-1].actor},{type:"centralConnectionReverse",signalType:R.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[u-5].actor}];break;case 75:this.$=[c[u-3],c[u-1],{type:"addMessage",from:c[u-3].actor,to:c[u-1].actor,signalType:c[u-2],msg:c[u]}];break;case 76:this.$={type:"addParticipant",actor:c[u-1],config:c[u]};break;case 77:this.$=c[u-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[u]};break;case 79:this.$=R.LINETYPE.SOLID_OPEN;break;case 80:this.$=R.LINETYPE.DOTTED_OPEN;break;case 81:this.$=R.LINETYPE.SOLID;break;case 82:this.$=R.LINETYPE.SOLID_TOP;break;case 83:this.$=R.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=R.LINETYPE.STICK_TOP;break;case 85:this.$=R.LINETYPE.STICK_BOTTOM;break;case 86:this.$=R.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=R.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=R.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=R.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=R.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=R.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=R.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=R.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=R.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=R.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=R.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=R.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=R.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=R.LINETYPE.DOTTED;break;case 100:this.$=R.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=R.LINETYPE.SOLID_CROSS;break;case 102:this.$=R.LINETYPE.DOTTED_CROSS;break;case 103:this.$=R.LINETYPE.SOLID_POINT;break;case 104:this.$=R.LINETYPE.DOTTED_POINT;break;case 105:this.$=R.parseMessage(c[u].trim().substring(1));break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},r([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:i,8:8,9:10,10:o,13:13,14:f,15:p,18:16,19:_,22:g,23:41,24:x,25:20,26:21,27:22,28:23,29:24,30:k,31:I,32:S,34:T,36:A,37:y,38:P,39:v,40:N,42:M,44:B,45:X,47:J,51:tt,53:nt,54:ct,56:Tt,61:pt,62:ot,63:ft,64:Et,73:Z},r(U,[2,5]),{9:48,13:13,14:f,15:p,18:16,19:_,22:g,23:41,24:x,25:20,26:21,27:22,28:23,29:24,30:k,31:I,32:S,34:T,36:A,37:y,38:P,39:v,40:N,42:M,44:B,45:X,47:J,51:tt,53:nt,54:ct,56:Tt,61:pt,62:ot,63:ft,64:Et,73:Z},r(U,[2,7]),r(U,[2,8]),r(U,[2,9]),r(U,[2,15]),{13:49,51:tt,53:nt,54:ct},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:Z},{23:56,73:Z},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},r(U,[2,30]),r(U,[2,31]),{33:[1,62]},{35:[1,63]},r(U,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:Vt},{23:75,55:76,73:Vt},{23:77,73:Z},{69:78,72:[1,79],78:qt,79:D,80:W,81:bt,82:ut,83:et,84:Ct,85:xe,86:be,87:Ie,88:ye,89:Re,90:Oe,91:Le,92:me,93:Se,94:Ae,95:ke,96:Ne,97:we,98:Pe,99:De,100:ve,101:Ce,102:Me,103:Be},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:Z},{23:111,73:Z},{23:112,73:Z},{23:113,73:Z},r([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],Ye),r(U,[2,6]),r(U,[2,16]),r(Wt,[2,10],{11:114}),r(U,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},r(U,[2,22]),{5:[1,118]},{5:[1,119]},r(U,[2,25]),r(U,[2,26]),r(U,[2,27]),r(U,[2,28]),r(U,[2,29]),r(U,[2,32]),r(U,[2,33]),r(zt,n,{7:120}),r(zt,n,{7:121}),r(zt,n,{7:122}),r(Ve,n,{41:123,7:124}),r(se,n,{43:125,7:126}),r(se,n,{7:126,43:127}),r(We,n,{46:128,7:129}),r(zt,n,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},r(ie,Ye,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:Z},{69:146,78:qt,79:D,80:W,81:bt,82:ut,83:et,84:Ct,85:xe,86:be,87:Ie,88:ye,89:Re,90:Oe,91:Le,92:me,93:Se,94:Ae,95:ke,96:Ne,97:we,98:Pe,99:De,100:ve,101:Ce,102:Me,103:Be},r(rt,[2,79]),r(rt,[2,80]),r(rt,[2,81]),r(rt,[2,82]),r(rt,[2,83]),r(rt,[2,84]),r(rt,[2,85]),r(rt,[2,86]),r(rt,[2,87]),r(rt,[2,88]),r(rt,[2,89]),r(rt,[2,90]),r(rt,[2,91]),r(rt,[2,92]),r(rt,[2,93]),r(rt,[2,94]),r(rt,[2,95]),r(rt,[2,96]),r(rt,[2,97]),r(rt,[2,98]),r(rt,[2,99]),r(rt,[2,100]),r(rt,[2,101]),r(rt,[2,102]),r(rt,[2,103]),r(rt,[2,104]),{23:147,73:Z},{23:149,60:148,73:Z},{73:[2,68]},{73:[2,69]},{58:150,104:_t},{58:152,104:_t},{58:153,104:_t},{58:154,104:_t},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:tt,53:nt,54:ct},{5:[1,160]},r(U,[2,20]),r(U,[2,21]),r(U,[2,23]),r(U,[2,24]),{4:h,5:i,8:8,9:10,10:o,13:13,14:f,15:p,17:[1,161],18:16,19:_,22:g,23:41,24:x,25:20,26:21,27:22,28:23,29:24,30:k,31:I,32:S,34:T,36:A,37:y,38:P,39:v,40:N,42:M,44:B,45:X,47:J,51:tt,53:nt,54:ct,56:Tt,61:pt,62:ot,63:ft,64:Et,73:Z},{4:h,5:i,8:8,9:10,10:o,13:13,14:f,15:p,17:[1,162],18:16,19:_,22:g,23:41,24:x,25:20,26:21,27:22,28:23,29:24,30:k,31:I,32:S,34:T,36:A,37:y,38:P,39:v,40:N,42:M,44:B,45:X,47:J,51:tt,53:nt,54:ct,56:Tt,61:pt,62:ot,63:ft,64:Et,73:Z},{4:h,5:i,8:8,9:10,10:o,13:13,14:f,15:p,17:[1,163],18:16,19:_,22:g,23:41,24:x,25:20,26:21,27:22,28:23,29:24,30:k,31:I,32:S,34:T,36:A,37:y,38:P,39:v,40:N,42:M,44:B,45:X,47:J,51:tt,53:nt,54:ct,56:Tt,61:pt,62:ot,63:ft,64:Et,73:Z},{17:[1,164]},{4:h,5:i,8:8,9:10,10:o,13:13,14:f,15:p,17:[2,47],18:16,19:_,22:g,23:41,24:x,25:20,26:21,27:22,28:23,29:24,30:k,31:I,32:S,34:T,36:A,37:y,38:P,39:v,40:N,42:M,44:B,45:X,47:J,50:[1,165],51:tt,53:nt,54:ct,56:Tt,61:pt,62:ot,63:ft,64:Et,73:Z},{17:[1,166]},{4:h,5:i,8:8,9:10,10:o,13:13,14:f,15:p,17:[2,45],18:16,19:_,22:g,23:41,24:x,25:20,26:21,27:22,28:23,29:24,30:k,31:I,32:S,34:T,36:A,37:y,38:P,39:v,40:N,42:M,44:B,45:X,47:J,49:[1,167],51:tt,53:nt,54:ct,56:Tt,61:pt,62:ot,63:ft,64:Et,73:Z},{17:[1,168]},{17:[1,169]},{4:h,5:i,8:8,9:10,10:o,13:13,14:f,15:p,17:[2,43],18:16,19:_,22:g,23:41,24:x,25:20,26:21,27:22,28:23,29:24,30:k,31:I,32:S,34:T,36:A,37:y,38:P,39:v,40:N,42:M,44:B,45:X,47:J,48:[1,170],51:tt,53:nt,54:ct,56:Tt,61:pt,62:ot,63:ft,64:Et,73:Z},{4:h,5:i,8:8,9:10,10:o,13:13,14:f,15:p,17:[1,171],18:16,19:_,22:g,23:41,24:x,25:20,26:21,27:22,28:23,29:24,30:k,31:I,32:S,34:T,36:A,37:y,38:P,39:v,40:N,42:M,44:B,45:X,47:J,51:tt,53:nt,54:ct,56:Tt,61:pt,62:ot,63:ft,64:Et,73:Z},{16:[1,172]},r(U,[2,50]),{16:[1,173]},r(U,[2,55]),r(ie,[2,76]),{76:[1,174]},{16:[1,175]},r(U,[2,52]),{16:[1,176]},r(U,[2,57]),r(U,[2,53]),{23:177,73:Z},{23:178,73:Z},{23:179,73:Z},{58:180,104:_t},{23:181,72:[1,182],73:Z},{58:183,104:_t},{58:184,104:_t},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},r(U,[2,17]),r(Wt,[2,11]),{13:186,51:tt,53:nt,54:ct},r(Wt,[2,13]),r(Wt,[2,14]),r(U,[2,19]),r(U,[2,35]),r(U,[2,36]),r(U,[2,37]),r(U,[2,38]),{16:[1,187]},r(U,[2,39]),{16:[1,188]},r(U,[2,40]),r(U,[2,41]),{16:[1,189]},r(U,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:_t},{58:196,104:_t},{58:197,104:_t},{5:[2,75]},{58:198,104:_t},{23:199,73:Z},{5:[2,58]},{5:[2,59]},{23:200,73:Z},r(Wt,[2,12]),r(Ve,n,{7:124,41:201}),r(se,n,{7:126,43:202}),r(We,n,{7:129,46:203}),r(U,[2,49]),r(U,[2,54]),r(ie,[2,77]),r(U,[2,51]),r(U,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:_t},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:t(function(C,K){if(K.recoverable)this.trace(C);else{var Y=Error(C);throw Y.hash=K,Y}},"parseError"),parse:t(function(C){var K=this,Y=[0],R=[],at=[null],c=[],Kt=this.table,u="",Gt=0,Ke=0,He=0,lr=2,Fe=1,dr=c.slice.call(arguments,1),ht=Object.create(this.lexer),kt={yy:{}};for(var ce in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,ce))kt.yy[ce]=this.yy[ce];if(ht.setInput(C,kt.yy),kt.yy.lexer=ht,kt.yy.parser=this,typeof ht.yylloc>"u")ht.yylloc={};var le=ht.yylloc;c.push(le);var Tr=ht.options&&ht.options.ranges;if(typeof kt.yy.parseError==="function")this.parseError=kt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function pr(xt){Y.length=Y.length-2*xt,at.length=at.length-xt,c.length=c.length-xt}t(pr,"popStack");function qe(){var xt=R.pop()||ht.lex()||Fe;if(typeof xt!=="number"){if(xt instanceof Array)R=xt,xt=R.pop();xt=K.symbols_[xt]||xt}return xt}t(qe,"lex");var dt,he,wt,gt,Ea,de,Mt={},Xt,yt,ze,Qt;while(!0){if(wt=Y[Y.length-1],this.defaultActions[wt])gt=this.defaultActions[wt];else{if(dt===null||typeof dt>"u")dt=qe();gt=Kt[wt]&&Kt[wt][dt]}if(typeof gt>"u"||!gt.length||!gt[0]){var Te="";Qt=[];for(Xt in Kt[wt])if(this.terminals_[Xt]&&Xt>lr)Qt.push("'"+this.terminals_[Xt]+"'");if(ht.showPosition)Te="Parse error on line "+(Gt+1)+`:
|
|
1
|
+
import{qi}from"./index-s9ts6qbj.js";import{t,l,lt,E,te,Jg,Lt,yc,vc,w,ne,F,O,G,z,j,q,H,m,wa,b,hr,br,fl,eA,jn,V}from"./index-60cxxnpk.js";import{pi,bd,tm,nm,Ar,rm}from"./index-rw84kefb.js";import{xn}from"./index-nwbr15b3.js";var _e=xn(fl(),1),Ee=function(){var r=t(function(mt,C,K,Y){for(K=K||{},Y=mt.length;Y--;K[mt[Y]]=C);return K},"o"),e=[1,2],s=[1,3],a=[1,4],n=[2,4],h=[1,9],i=[1,11],o=[1,12],f=[1,14],p=[1,15],_=[1,17],g=[1,18],x=[1,19],k=[1,25],I=[1,26],S=[1,27],T=[1,28],A=[1,29],y=[1,30],P=[1,31],v=[1,32],N=[1,33],M=[1,34],B=[1,35],X=[1,36],J=[1,37],tt=[1,38],it=[1,39],ot=[1,40],Tt=[1,42],pt=[1,43],nt=[1,44],ft=[1,45],Et=[1,46],Z=[1,47],U=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Vt=[1,74],qt=[1,80],D=[1,81],W=[1,82],bt=[1,83],ut=[1,84],et=[1,85],Ct=[1,86],xe=[1,87],be=[1,88],Ie=[1,89],ye=[1,90],Re=[1,91],Oe=[1,92],Le=[1,93],me=[1,94],Se=[1,95],Ae=[1,96],ke=[1,97],Ne=[1,98],we=[1,99],Pe=[1,100],De=[1,101],ve=[1,102],Ce=[1,103],Me=[1,104],Be=[1,105],Ye=[2,78],Wt=[4,5,17,51,53,54],zt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Ve=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],We=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],ie=[5,52],rt=[70,71,72,73],_t=[1,151],oe={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:t(function(C,K,Y,R,at,c,Kt){var u=c.length-1;switch(at){case 3:return R.apply(c[u]),c[u];break;case 4:case 10:this.$=[];break;case 5:case 11:c[u-1].push(c[u]),this.$=c[u-1];break;case 6:case 7:case 12:case 13:this.$=c[u];break;case 8:case 9:case 14:this.$=[];break;case 16:c[u].type="createParticipant",this.$=c[u];break;case 17:c[u-1].unshift({type:"boxStart",boxData:R.parseBoxData(c[u-2])}),c[u-1].push({type:"boxEnd",boxText:c[u-2]}),this.$=c[u-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[u-2]),sequenceIndexStep:Number(c[u-1]),sequenceVisible:!0,signalType:R.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[u-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:R.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:R.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:R.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:R.LINETYPE.ACTIVE_START,actor:c[u-1].actor};break;case 24:this.$={type:"activeEnd",signalType:R.LINETYPE.ACTIVE_END,actor:c[u-1].actor};break;case 30:R.setDiagramTitle(c[u].substring(6)),this.$=c[u].substring(6);break;case 31:R.setDiagramTitle(c[u].substring(7)),this.$=c[u].substring(7);break;case 32:this.$=c[u].trim(),R.setAccTitle(this.$);break;case 33:case 34:this.$=c[u].trim(),R.setAccDescription(this.$);break;case 35:c[u-1].unshift({type:"loopStart",loopText:R.parseMessage(c[u-2]),signalType:R.LINETYPE.LOOP_START}),c[u-1].push({type:"loopEnd",loopText:c[u-2],signalType:R.LINETYPE.LOOP_END}),this.$=c[u-1];break;case 36:c[u-1].unshift({type:"rectStart",color:R.parseMessage(c[u-2]),signalType:R.LINETYPE.RECT_START}),c[u-1].push({type:"rectEnd",color:R.parseMessage(c[u-2]),signalType:R.LINETYPE.RECT_END}),this.$=c[u-1];break;case 37:c[u-1].unshift({type:"optStart",optText:R.parseMessage(c[u-2]),signalType:R.LINETYPE.OPT_START}),c[u-1].push({type:"optEnd",optText:R.parseMessage(c[u-2]),signalType:R.LINETYPE.OPT_END}),this.$=c[u-1];break;case 38:c[u-1].unshift({type:"altStart",altText:R.parseMessage(c[u-2]),signalType:R.LINETYPE.ALT_START}),c[u-1].push({type:"altEnd",signalType:R.LINETYPE.ALT_END}),this.$=c[u-1];break;case 39:c[u-1].unshift({type:"parStart",parText:R.parseMessage(c[u-2]),signalType:R.LINETYPE.PAR_START}),c[u-1].push({type:"parEnd",signalType:R.LINETYPE.PAR_END}),this.$=c[u-1];break;case 40:c[u-1].unshift({type:"parStart",parText:R.parseMessage(c[u-2]),signalType:R.LINETYPE.PAR_OVER_START}),c[u-1].push({type:"parEnd",signalType:R.LINETYPE.PAR_END}),this.$=c[u-1];break;case 41:c[u-1].unshift({type:"criticalStart",criticalText:R.parseMessage(c[u-2]),signalType:R.LINETYPE.CRITICAL_START}),c[u-1].push({type:"criticalEnd",signalType:R.LINETYPE.CRITICAL_END}),this.$=c[u-1];break;case 42:c[u-1].unshift({type:"breakStart",breakText:R.parseMessage(c[u-2]),signalType:R.LINETYPE.BREAK_START}),c[u-1].push({type:"breakEnd",optText:R.parseMessage(c[u-2]),signalType:R.LINETYPE.BREAK_END}),this.$=c[u-1];break;case 44:this.$=c[u-3].concat([{type:"option",optionText:R.parseMessage(c[u-1]),signalType:R.LINETYPE.CRITICAL_OPTION},c[u]]);break;case 46:this.$=c[u-3].concat([{type:"and",parText:R.parseMessage(c[u-1]),signalType:R.LINETYPE.PAR_AND},c[u]]);break;case 48:this.$=c[u-3].concat([{type:"else",altText:R.parseMessage(c[u-1]),signalType:R.LINETYPE.ALT_ELSE},c[u]]);break;case 49:c[u-3].draw="participant",c[u-3].type="addParticipant",c[u-3].description=R.parseMessage(c[u-1]),this.$=c[u-3];break;case 50:c[u-1].draw="participant",c[u-1].type="addParticipant",this.$=c[u-1];break;case 51:c[u-3].draw="actor",c[u-3].type="addParticipant",c[u-3].description=R.parseMessage(c[u-1]),this.$=c[u-3];break;case 52:case 57:c[u-1].draw="actor",c[u-1].type="addParticipant",this.$=c[u-1];break;case 53:c[u-1].type="destroyParticipant",this.$=c[u-1];break;case 54:c[u-3].draw="participant",c[u-3].type="addParticipant",c[u-3].description=R.parseMessage(c[u-1]),this.$=c[u-3];break;case 55:c[u-1].draw="participant",c[u-1].type="addParticipant",this.$=c[u-1];break;case 56:c[u-3].draw="actor",c[u-3].type="addParticipant",c[u-3].description=R.parseMessage(c[u-1]),this.$=c[u-3];break;case 58:this.$=[c[u-1],{type:"addNote",placement:c[u-2],actor:c[u-1].actor,text:c[u]}];break;case 59:c[u-2]=[].concat(c[u-1],c[u-1]).slice(0,2),c[u-2][0]=c[u-2][0].actor,c[u-2][1]=c[u-2][1].actor,this.$=[c[u-1],{type:"addNote",placement:R.PLACEMENT.OVER,actor:c[u-2].slice(0,2),text:c[u]}];break;case 60:this.$=[c[u-1],{type:"addLinks",actor:c[u-1].actor,text:c[u]}];break;case 61:this.$=[c[u-1],{type:"addALink",actor:c[u-1].actor,text:c[u]}];break;case 62:this.$=[c[u-1],{type:"addProperties",actor:c[u-1].actor,text:c[u]}];break;case 63:this.$=[c[u-1],{type:"addDetails",actor:c[u-1].actor,text:c[u]}];break;case 66:this.$=[c[u-2],c[u]];break;case 67:this.$=c[u];break;case 68:this.$=R.PLACEMENT.LEFTOF;break;case 69:this.$=R.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[u-4],c[u-1],{type:"addMessage",from:c[u-4].actor,to:c[u-1].actor,signalType:c[u-3],msg:c[u],activate:!0},{type:"activeStart",signalType:R.LINETYPE.ACTIVE_START,actor:c[u-1].actor}];break;case 71:this.$=[c[u-4],c[u-1],{type:"addMessage",from:c[u-4].actor,to:c[u-1].actor,signalType:c[u-3],msg:c[u]},{type:"activeEnd",signalType:R.LINETYPE.ACTIVE_END,actor:c[u-4].actor}];break;case 72:this.$=[c[u-4],c[u-1],{type:"addMessage",from:c[u-4].actor,to:c[u-1].actor,signalType:c[u-3],msg:c[u],activate:!0,centralConnection:R.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:R.LINETYPE.CENTRAL_CONNECTION,actor:c[u-1].actor}];break;case 73:this.$=[c[u-4],c[u-1],{type:"addMessage",from:c[u-4].actor,to:c[u-1].actor,signalType:c[u-2],msg:c[u],activate:!1,centralConnection:R.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:R.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[u-4].actor}];break;case 74:this.$=[c[u-5],c[u-1],{type:"addMessage",from:c[u-5].actor,to:c[u-1].actor,signalType:c[u-3],msg:c[u],activate:!0,centralConnection:R.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:R.LINETYPE.CENTRAL_CONNECTION,actor:c[u-1].actor},{type:"centralConnectionReverse",signalType:R.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[u-5].actor}];break;case 75:this.$=[c[u-3],c[u-1],{type:"addMessage",from:c[u-3].actor,to:c[u-1].actor,signalType:c[u-2],msg:c[u]}];break;case 76:this.$={type:"addParticipant",actor:c[u-1],config:c[u]};break;case 77:this.$=c[u-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[u]};break;case 79:this.$=R.LINETYPE.SOLID_OPEN;break;case 80:this.$=R.LINETYPE.DOTTED_OPEN;break;case 81:this.$=R.LINETYPE.SOLID;break;case 82:this.$=R.LINETYPE.SOLID_TOP;break;case 83:this.$=R.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=R.LINETYPE.STICK_TOP;break;case 85:this.$=R.LINETYPE.STICK_BOTTOM;break;case 86:this.$=R.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=R.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=R.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=R.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=R.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=R.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=R.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=R.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=R.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=R.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=R.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=R.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=R.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=R.LINETYPE.DOTTED;break;case 100:this.$=R.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=R.LINETYPE.SOLID_CROSS;break;case 102:this.$=R.LINETYPE.DOTTED_CROSS;break;case 103:this.$=R.LINETYPE.SOLID_POINT;break;case 104:this.$=R.LINETYPE.DOTTED_POINT;break;case 105:this.$=R.parseMessage(c[u].trim().substring(1));break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},r([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:i,8:8,9:10,10:o,13:13,14:f,15:p,18:16,19:_,22:g,23:41,24:x,25:20,26:21,27:22,28:23,29:24,30:k,31:I,32:S,34:T,36:A,37:y,38:P,39:v,40:N,42:M,44:B,45:X,47:J,51:tt,53:it,54:ot,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},r(U,[2,5]),{9:48,13:13,14:f,15:p,18:16,19:_,22:g,23:41,24:x,25:20,26:21,27:22,28:23,29:24,30:k,31:I,32:S,34:T,36:A,37:y,38:P,39:v,40:N,42:M,44:B,45:X,47:J,51:tt,53:it,54:ot,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},r(U,[2,7]),r(U,[2,8]),r(U,[2,9]),r(U,[2,15]),{13:49,51:tt,53:it,54:ot},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:Z},{23:56,73:Z},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},r(U,[2,30]),r(U,[2,31]),{33:[1,62]},{35:[1,63]},r(U,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:Vt},{23:75,55:76,73:Vt},{23:77,73:Z},{69:78,72:[1,79],78:qt,79:D,80:W,81:bt,82:ut,83:et,84:Ct,85:xe,86:be,87:Ie,88:ye,89:Re,90:Oe,91:Le,92:me,93:Se,94:Ae,95:ke,96:Ne,97:we,98:Pe,99:De,100:ve,101:Ce,102:Me,103:Be},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:Z},{23:111,73:Z},{23:112,73:Z},{23:113,73:Z},r([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],Ye),r(U,[2,6]),r(U,[2,16]),r(Wt,[2,10],{11:114}),r(U,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},r(U,[2,22]),{5:[1,118]},{5:[1,119]},r(U,[2,25]),r(U,[2,26]),r(U,[2,27]),r(U,[2,28]),r(U,[2,29]),r(U,[2,32]),r(U,[2,33]),r(zt,n,{7:120}),r(zt,n,{7:121}),r(zt,n,{7:122}),r(Ve,n,{41:123,7:124}),r(se,n,{43:125,7:126}),r(se,n,{7:126,43:127}),r(We,n,{46:128,7:129}),r(zt,n,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},r(ie,Ye,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:Z},{69:146,78:qt,79:D,80:W,81:bt,82:ut,83:et,84:Ct,85:xe,86:be,87:Ie,88:ye,89:Re,90:Oe,91:Le,92:me,93:Se,94:Ae,95:ke,96:Ne,97:we,98:Pe,99:De,100:ve,101:Ce,102:Me,103:Be},r(rt,[2,79]),r(rt,[2,80]),r(rt,[2,81]),r(rt,[2,82]),r(rt,[2,83]),r(rt,[2,84]),r(rt,[2,85]),r(rt,[2,86]),r(rt,[2,87]),r(rt,[2,88]),r(rt,[2,89]),r(rt,[2,90]),r(rt,[2,91]),r(rt,[2,92]),r(rt,[2,93]),r(rt,[2,94]),r(rt,[2,95]),r(rt,[2,96]),r(rt,[2,97]),r(rt,[2,98]),r(rt,[2,99]),r(rt,[2,100]),r(rt,[2,101]),r(rt,[2,102]),r(rt,[2,103]),r(rt,[2,104]),{23:147,73:Z},{23:149,60:148,73:Z},{73:[2,68]},{73:[2,69]},{58:150,104:_t},{58:152,104:_t},{58:153,104:_t},{58:154,104:_t},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:tt,53:it,54:ot},{5:[1,160]},r(U,[2,20]),r(U,[2,21]),r(U,[2,23]),r(U,[2,24]),{4:h,5:i,8:8,9:10,10:o,13:13,14:f,15:p,17:[1,161],18:16,19:_,22:g,23:41,24:x,25:20,26:21,27:22,28:23,29:24,30:k,31:I,32:S,34:T,36:A,37:y,38:P,39:v,40:N,42:M,44:B,45:X,47:J,51:tt,53:it,54:ot,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{4:h,5:i,8:8,9:10,10:o,13:13,14:f,15:p,17:[1,162],18:16,19:_,22:g,23:41,24:x,25:20,26:21,27:22,28:23,29:24,30:k,31:I,32:S,34:T,36:A,37:y,38:P,39:v,40:N,42:M,44:B,45:X,47:J,51:tt,53:it,54:ot,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{4:h,5:i,8:8,9:10,10:o,13:13,14:f,15:p,17:[1,163],18:16,19:_,22:g,23:41,24:x,25:20,26:21,27:22,28:23,29:24,30:k,31:I,32:S,34:T,36:A,37:y,38:P,39:v,40:N,42:M,44:B,45:X,47:J,51:tt,53:it,54:ot,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{17:[1,164]},{4:h,5:i,8:8,9:10,10:o,13:13,14:f,15:p,17:[2,47],18:16,19:_,22:g,23:41,24:x,25:20,26:21,27:22,28:23,29:24,30:k,31:I,32:S,34:T,36:A,37:y,38:P,39:v,40:N,42:M,44:B,45:X,47:J,50:[1,165],51:tt,53:it,54:ot,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{17:[1,166]},{4:h,5:i,8:8,9:10,10:o,13:13,14:f,15:p,17:[2,45],18:16,19:_,22:g,23:41,24:x,25:20,26:21,27:22,28:23,29:24,30:k,31:I,32:S,34:T,36:A,37:y,38:P,39:v,40:N,42:M,44:B,45:X,47:J,49:[1,167],51:tt,53:it,54:ot,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{17:[1,168]},{17:[1,169]},{4:h,5:i,8:8,9:10,10:o,13:13,14:f,15:p,17:[2,43],18:16,19:_,22:g,23:41,24:x,25:20,26:21,27:22,28:23,29:24,30:k,31:I,32:S,34:T,36:A,37:y,38:P,39:v,40:N,42:M,44:B,45:X,47:J,48:[1,170],51:tt,53:it,54:ot,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{4:h,5:i,8:8,9:10,10:o,13:13,14:f,15:p,17:[1,171],18:16,19:_,22:g,23:41,24:x,25:20,26:21,27:22,28:23,29:24,30:k,31:I,32:S,34:T,36:A,37:y,38:P,39:v,40:N,42:M,44:B,45:X,47:J,51:tt,53:it,54:ot,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{16:[1,172]},r(U,[2,50]),{16:[1,173]},r(U,[2,55]),r(ie,[2,76]),{76:[1,174]},{16:[1,175]},r(U,[2,52]),{16:[1,176]},r(U,[2,57]),r(U,[2,53]),{23:177,73:Z},{23:178,73:Z},{23:179,73:Z},{58:180,104:_t},{23:181,72:[1,182],73:Z},{58:183,104:_t},{58:184,104:_t},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},r(U,[2,17]),r(Wt,[2,11]),{13:186,51:tt,53:it,54:ot},r(Wt,[2,13]),r(Wt,[2,14]),r(U,[2,19]),r(U,[2,35]),r(U,[2,36]),r(U,[2,37]),r(U,[2,38]),{16:[1,187]},r(U,[2,39]),{16:[1,188]},r(U,[2,40]),r(U,[2,41]),{16:[1,189]},r(U,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:_t},{58:196,104:_t},{58:197,104:_t},{5:[2,75]},{58:198,104:_t},{23:199,73:Z},{5:[2,58]},{5:[2,59]},{23:200,73:Z},r(Wt,[2,12]),r(Ve,n,{7:124,41:201}),r(se,n,{7:126,43:202}),r(We,n,{7:129,46:203}),r(U,[2,49]),r(U,[2,54]),r(ie,[2,77]),r(U,[2,51]),r(U,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:_t},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:t(function(C,K){if(K.recoverable)this.trace(C);else{var Y=Error(C);throw Y.hash=K,Y}},"parseError"),parse:t(function(C){var K=this,Y=[0],R=[],at=[null],c=[],Kt=this.table,u="",Gt=0,Ke=0,He=0,lr=2,Fe=1,dr=c.slice.call(arguments,1),ht=Object.create(this.lexer),Nt={yy:{}};for(var ce in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,ce))Nt.yy[ce]=this.yy[ce];if(ht.setInput(C,Nt.yy),Nt.yy.lexer=ht,Nt.yy.parser=this,typeof ht.yylloc>"u")ht.yylloc={};var le=ht.yylloc;c.push(le);var Tr=ht.options&&ht.options.ranges;if(typeof Nt.yy.parseError==="function")this.parseError=Nt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function pr(xt){Y.length=Y.length-2*xt,at.length=at.length-xt,c.length=c.length-xt}t(pr,"popStack");function qe(){var xt=R.pop()||ht.lex()||Fe;if(typeof xt!=="number"){if(xt instanceof Array)R=xt,xt=R.pop();xt=K.symbols_[xt]||xt}return xt}t(qe,"lex");var dt,he,wt,gt,Ea,de,Mt={},Xt,yt,ze,Qt;while(!0){if(wt=Y[Y.length-1],this.defaultActions[wt])gt=this.defaultActions[wt];else{if(dt===null||typeof dt>"u")dt=qe();gt=Kt[wt]&&Kt[wt][dt]}if(typeof gt>"u"||!gt.length||!gt[0]){var Te="";Qt=[];for(Xt in Kt[wt])if(this.terminals_[Xt]&&Xt>lr)Qt.push("'"+this.terminals_[Xt]+"'");if(ht.showPosition)Te="Parse error on line "+(Gt+1)+`:
|
|
2
2
|
`+ht.showPosition()+`
|
|
3
|
-
Expecting `+Qt.join(", ")+", got '"+(this.terminals_[dt]||dt)+"'";else Te="Parse error on line "+(Gt+1)+": Unexpected "+(dt==Fe?"end of input":"'"+(this.terminals_[dt]||dt)+"'");this.parseError(Te,{text:ht.match,token:this.terminals_[dt]||dt,line:ht.yylineno,loc:le,expected:Qt})}if(gt[0]instanceof Array&>.length>1)throw Error("Parse Error: multiple actions possible at state: "+wt+", token: "+dt);switch(gt[0]){case 1:if(Y.push(dt),at.push(ht.yytext),c.push(ht.yylloc),Y.push(gt[1]),dt=null,!he){if(Ke=ht.yyleng,u=ht.yytext,Gt=ht.yylineno,le=ht.yylloc,He>0)He--}else dt=he,he=null;break;case 2:if(yt=this.productions_[gt[1]][1],Mt.$=at[at.length-yt],Mt._$={first_line:c[c.length-(yt||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(yt||1)].first_column,last_column:c[c.length-1].last_column},Tr)Mt._$.range=[c[c.length-(yt||1)].range[0],c[c.length-1].range[1]];if(de=this.performAction.apply(Mt,[u,Ke,Gt,
|
|
3
|
+
Expecting `+Qt.join(", ")+", got '"+(this.terminals_[dt]||dt)+"'";else Te="Parse error on line "+(Gt+1)+": Unexpected "+(dt==Fe?"end of input":"'"+(this.terminals_[dt]||dt)+"'");this.parseError(Te,{text:ht.match,token:this.terminals_[dt]||dt,line:ht.yylineno,loc:le,expected:Qt})}if(gt[0]instanceof Array&>.length>1)throw Error("Parse Error: multiple actions possible at state: "+wt+", token: "+dt);switch(gt[0]){case 1:if(Y.push(dt),at.push(ht.yytext),c.push(ht.yylloc),Y.push(gt[1]),dt=null,!he){if(Ke=ht.yyleng,u=ht.yytext,Gt=ht.yylineno,le=ht.yylloc,He>0)He--}else dt=he,he=null;break;case 2:if(yt=this.productions_[gt[1]][1],Mt.$=at[at.length-yt],Mt._$={first_line:c[c.length-(yt||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(yt||1)].first_column,last_column:c[c.length-1].last_column},Tr)Mt._$.range=[c[c.length-(yt||1)].range[0],c[c.length-1].range[1]];if(de=this.performAction.apply(Mt,[u,Ke,Gt,Nt.yy,gt[1],at,c].concat(dr)),typeof de<"u")return de;if(yt)Y=Y.slice(0,-1*yt*2),at=at.slice(0,-1*yt),c=c.slice(0,-1*yt);Y.push(this.productions_[gt[1]][0]),at.push(Mt.$),c.push(Mt._$),ze=Kt[Y[Y.length-2]][Y[Y.length-1]],Y.push(ze);break;case 3:return!0}}return!0},"parse")},cr=function(){var mt={EOF:1,parseError:t(function(K,Y){if(this.yy.parser)this.yy.parser.parseError(K,Y);else throw Error(K)},"parseError"),setInput:t(function(C,K){if(this.yy=K||this.yy||{},this._input=C,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var C=this._input[0];this.yytext+=C,this.yyleng++,this.offset++,this.match+=C,this.matched+=C;var K=C.match(/(?:\r\n?|\n).*/g);if(K)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),C},"input"),unput:t(function(C){var K=C.length,Y=C.split(/(?:\r\n?|\n)/g);this._input=C+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-K),this.offset-=K;var R=this.match.split(/(?:\r\n?|\n)/g);if(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;var at=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Y?(Y.length===R.length?this.yylloc.first_column:0)+R[R.length-Y.length].length-Y[0].length:this.yylloc.first_column-K},this.options.ranges)this.yylloc.range=[at[0],at[0]+this.yyleng-K];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(C){this.unput(this.match.slice(C))},"less"),pastInput:t(function(){var C=this.matched.substr(0,this.matched.length-this.match.length);return(C.length>20?"...":"")+C.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var C=this.match;if(C.length<20)C+=this._input.substr(0,20-C.length);return(C.substr(0,20)+(C.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var C=this.pastInput(),K=Array(C.length+1).join("-");return C+this.upcomingInput()+`
|
|
5
5
|
`+K+"^"},"showPosition"),test_match:t(function(C,K){var Y,R,at;if(this.options.backtrack_lexer){if(at={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)at.yylloc.range=this.yylloc.range.slice(0)}if(R=C[0].match(/(?:\r\n?|\n).*/g),R)this.yylineno+=R.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:R?R[R.length-1].length-R[R.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+C[0].length},this.yytext+=C[0],this.match+=C[0],this.matches=C,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(C[0].length),this.matched+=C[0],Y=this.performAction.call(this,this.yy,this,K,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(Y)return Y;else if(this._backtrack){for(var c in at)this[c]=at[c];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var C,K,Y,R;if(!this._more)this.yytext="",this.match="";var at=this._currentRules();for(var c=0;c<at.length;c++)if(Y=this._input.match(this.rules[at[c]]),Y&&(!K||Y[0].length>K[0].length)){if(K=Y,R=c,this.options.backtrack_lexer)if(C=this.test_match(Y,at[c]),C!==!1)return C;else if(this._backtrack){K=!1;continue}else return!1;else if(!this.options.flex)break}if(K){if(C=this.test_match(K,at[R]),C!==!1)return C;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var K=this.next();if(K)return K;else return this.lex()},"lex"),begin:t(function(K){this.conditionStack.push(K)},"begin"),popState:t(function(){var K=this.conditionStack.length-1;if(K>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(K){if(K=this.conditionStack.length-1-Math.abs(K||0),K>=0)return this.conditionStack[K];else return"INITIAL"},"topState"),pushState:t(function(K){this.begin(K)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(K,Y,R,at){var c=at;switch(R){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;break;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;break;case 10:return this.popState(),this.popState(),77;break;case 11:return Y.yytext=Y.yytext.trim(),73;break;case 12:return Y.yytext=Y.yytext.trim(),this.begin("ALIAS"),73;break;case 13:return Y.yytext=Y.yytext.trim(),this.popState(),73;break;case 14:return this.popState(),10;break;case 15:return Y.yytext=Y.yytext.trim(),this.popState(),10;break;case 16:return this.begin("LINE"),15;break;case 17:return this.begin("ID"),51;break;case 18:return this.begin("ID"),53;break;case 19:return 14;case 20:return this.begin("ID"),54;break;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;break;case 22:return this.popState(),this.popState(),5;break;case 23:return this.begin("LINE"),37;break;case 24:return this.begin("LINE"),38;break;case 25:return this.begin("LINE"),39;break;case 26:return this.begin("LINE"),40;break;case 27:return this.begin("LINE"),50;break;case 28:return this.begin("LINE"),42;break;case 29:return this.begin("LINE"),44;break;case 30:return this.begin("LINE"),49;break;case 31:return this.begin("LINE"),45;break;case 32:return this.begin("LINE"),48;break;case 33:return this.begin("LINE"),47;break;case 34:return this.popState(),16;break;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;break;case 45:return this.begin("ID"),24;break;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;break;case 49:return this.popState(),"acc_title_value";break;case 50:return this.begin("acc_descr"),34;break;case 51:return this.popState(),"acc_descr_value";break;case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return Y.yytext=Y.yytext.trim(),73;break;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}};return
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var K=this.next();if(K)return K;else return this.lex()},"lex"),begin:t(function(K){this.conditionStack.push(K)},"begin"),popState:t(function(){var K=this.conditionStack.length-1;if(K>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(K){if(K=this.conditionStack.length-1-Math.abs(K||0),K>=0)return this.conditionStack[K];else return"INITIAL"},"topState"),pushState:t(function(K){this.begin(K)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(K,Y,R,at){var c=at;switch(R){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;break;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;break;case 10:return this.popState(),this.popState(),77;break;case 11:return Y.yytext=Y.yytext.trim(),73;break;case 12:return Y.yytext=Y.yytext.trim(),this.begin("ALIAS"),73;break;case 13:return Y.yytext=Y.yytext.trim(),this.popState(),73;break;case 14:return this.popState(),10;break;case 15:return Y.yytext=Y.yytext.trim(),this.popState(),10;break;case 16:return this.begin("LINE"),15;break;case 17:return this.begin("ID"),51;break;case 18:return this.begin("ID"),53;break;case 19:return 14;case 20:return this.begin("ID"),54;break;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;break;case 22:return this.popState(),this.popState(),5;break;case 23:return this.begin("LINE"),37;break;case 24:return this.begin("LINE"),38;break;case 25:return this.begin("LINE"),39;break;case 26:return this.begin("LINE"),40;break;case 27:return this.begin("LINE"),50;break;case 28:return this.begin("LINE"),42;break;case 29:return this.begin("LINE"),44;break;case 30:return this.begin("LINE"),49;break;case 31:return this.begin("LINE"),45;break;case 32:return this.begin("LINE"),48;break;case 33:return this.begin("LINE"),47;break;case 34:return this.popState(),16;break;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;break;case 45:return this.begin("ID"),24;break;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;break;case 49:return this.popState(),"acc_title_value";break;case 50:return this.begin("acc_descr"),34;break;case 51:return this.popState(),"acc_descr_value";break;case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return Y.yytext=Y.yytext.trim(),73;break;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}};return mt}();oe.lexer=cr;function Ut(){this.yy={}}return t(Ut,"Parser"),Ut.prototype=oe,oe.Parser=Ut,new Ut}();Ee.parser=Ee;var Er=Ee,ur={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},fr={FILLED:0,OPEN:1},_r={LEFTOF:0,RIGHTOF:1,OVER:2},Jt={ACTOR:"actor",BOUNDARY:"boundary",COLLECTIONS:"collections",CONTROL:"control",DATABASE:"database",ENTITY:"entity",PARTICIPANT:"participant",QUEUE:"queue"},gr=class{constructor(){this.state=new qi(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=O,this.setAccDescription=z,this.setDiagramTitle=q,this.getAccTitle=G,this.getAccDescription=j,this.getDiagramTitle=H,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(m().wrap),this.LINETYPE=ur,this.ARROWTYPE=fr,this.PLACEMENT=_r}static{t(this,"SequenceDB")}addBox(r){this.state.records.boxes.push({name:r.text,wrap:r.wrap??this.autoWrap(),fill:r.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(r,e,s,a,n){let h=this.state.records.currentBox,i;if(n!==void 0){let f;if(!n.includes(`
|
|
7
7
|
`))f=`{
|
|
8
8
|
`+n+`
|
|
9
9
|
}`;else f=n+`
|
|
10
|
-
`;i=
|
|
10
|
+
`;i=br(f,{schema:hr})}if(a=i?.type??a,i?.alias&&(!s||s.text===e))s={text:i.alias,wrap:s?.wrap,type:a};let o=this.state.records.actors.get(r);if(o){if(this.state.records.currentBox&&o.box&&this.state.records.currentBox!==o.box)throw Error(`A same participant should only be defined in one Box: ${o.name} can't be in '${o.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(h=o.box?o.box:this.state.records.currentBox,o.box=h,o&&e===o.name&&s==null)return}if(s?.text==null)s={text:e,type:a};if(a==null||s.text==null)s={text:e,type:a};if(this.state.records.actors.set(r,{box:h,name:e,description:s.text,wrap:s.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:a??"participant"}),this.state.records.prevActor){let f=this.state.records.actors.get(this.state.records.prevActor);if(f)f.nextActor=r}if(this.state.records.currentBox)this.state.records.currentBox.actorKeys.push(r);this.state.records.prevActor=r}activationCount(r){let e,s=0;if(!r)return 0;for(e=0;e<this.state.records.messages.length;e++){if(this.state.records.messages[e].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[e].from===r)s++;if(this.state.records.messages[e].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[e].from===r)s--}return s}addMessage(r,e,s,a){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:r,to:e,message:s.text,wrap:s.wrap??this.autoWrap(),answer:a})}addSignal(r,e,s,a,n=!1,h){if(a===this.LINETYPE.ACTIVE_END){if(this.activationCount(r??"")<1){let o=Error("Trying to inactivate an inactive participant ("+r+")");throw o.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},o}}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:r,to:e,message:s?.text??"",wrap:s?.wrap??this.autoWrap(),type:a,activate:n,centralConnection:h??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some((r)=>r.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(r){return this.state.records.actors.get(r)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(r){this.state.records.wrapEnabled=r}extractWrap(r){if(r===void 0)return{};r=r.trim();let e=/^:?wrap:/.exec(r)!==null?!0:/^:?nowrap:/.exec(r)!==null?!1:void 0;return{cleanedText:(e===void 0?r:r.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){if(this.state.records.wrapEnabled!==void 0)return this.state.records.wrapEnabled;return m().sequence?.wrap??!1}clear(){this.state.reset(),F()}parseMessage(r){let e=r.trim(),{wrap:s,cleanedText:a}=this.extractWrap(e),n={text:a,wrap:s};return l.debug(`parseMessage: ${JSON.stringify(n)}`),n}parseBoxData(r){let e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(r),s=e?.[1]?e[1].trim():"transparent",a=e?.[2]?e[2].trim():void 0;if(window?.CSS){if(!window.CSS.supports("color",s))s="transparent",a=r.trim()}else{let i=new Option().style;if(i.color=s,i.color!==s)s="transparent",a=r.trim()}let{wrap:n,cleanedText:h}=this.extractWrap(a);return{text:h?te(h,m()):void 0,color:s,wrap:n}}addNote(r,e,s){let a={actor:r,placement:e,message:s.text,wrap:s.wrap??this.autoWrap()},n=[].concat(r,r);this.state.records.notes.push(a),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:n[0],to:n[1],message:s.text,wrap:s.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(r,e){let s=this.getActor(r);try{let a=te(e.text,m());a=a.replace(/=/g,"="),a=a.replace(/&/g,"&");let n=JSON.parse(a);this.insertLinks(s,n)}catch(a){l.error("error while parsing actor link text",a)}}addALink(r,e){let s=this.getActor(r);try{let a={},n=te(e.text,m()),h=n.indexOf("@");n=n.replace(/=/g,"="),n=n.replace(/&/g,"&");let i=n.slice(0,h-1).trim(),o=n.slice(h+1).trim();a[i]=o,this.insertLinks(s,a)}catch(a){l.error("error while parsing actor link text",a)}}insertLinks(r,e){if(r.links==null)r.links=e;else for(let s in e)r.links[s]=e[s]}addProperties(r,e){let s=this.getActor(r);try{let a=te(e.text,m()),n=JSON.parse(a);this.insertProperties(s,n)}catch(a){l.error("error while parsing actor properties text",a)}}insertProperties(r,e){if(r.properties==null)r.properties=e;else for(let s in e)r.properties[s]=e[s]}boxEnd(){this.state.records.currentBox=void 0}addDetails(r,e){let s=this.getActor(r),a=document.getElementById(e.text);try{let n=a.innerHTML,h=JSON.parse(n);if(h.properties)this.insertProperties(s,h.properties);if(h.links)this.insertLinks(s,h.links)}catch(n){l.error("error while parsing actor details text",n)}}getActorProperty(r,e){if(r?.properties!==void 0)return r.properties[e];return}apply(r){if(Array.isArray(r))r.forEach((e)=>{this.apply(e)});else switch(r.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:r.sequenceIndex,step:r.sequenceIndexStep,visible:r.sequenceVisible},wrap:!1,type:r.signalType});break;case"addParticipant":this.addActor(r.actor,r.actor,r.description,r.draw,r.config);break;case"createParticipant":if(this.state.records.actors.has(r.actor))throw Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=r.actor,this.addActor(r.actor,r.actor,r.description,r.draw,r.config),this.state.records.createdActors.set(r.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=r.actor,this.state.records.destroyedActors.set(r.actor,this.state.records.messages.length);break;case"activeStart":this.addSignal(r.actor,void 0,void 0,r.signalType);break;case"centralConnection":this.addSignal(r.actor,void 0,void 0,r.signalType);break;case"centralConnectionReverse":this.addSignal(r.actor,void 0,void 0,r.signalType);break;case"activeEnd":this.addSignal(r.actor,void 0,void 0,r.signalType);break;case"addNote":this.addNote(r.actor,r.placement,r.text);break;case"addLinks":this.addLinks(r.actor,r.text);break;case"addALink":this.addALink(r.actor,r.text);break;case"addProperties":this.addProperties(r.actor,r.text);break;case"addDetails":this.addDetails(r.actor,r.text);break;case"addMessage":if(this.state.records.lastCreated)if(r.to!==this.state.records.lastCreated)throw Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");else this.state.records.lastCreated=void 0;else if(this.state.records.lastDestroyed)if(r.to!==this.state.records.lastDestroyed&&r.from!==this.state.records.lastDestroyed)throw Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");else this.state.records.lastDestroyed=void 0;this.addSignal(r.from,r.to,r.msg,r.signalType,r.activate,r.centralConnection);break;case"boxStart":this.addBox(r.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,r.loopText,r.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,r.signalType);break;case"rectStart":this.addSignal(void 0,void 0,r.color,r.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,r.signalType);break;case"optStart":this.addSignal(void 0,void 0,r.optText,r.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,r.signalType);break;case"altStart":this.addSignal(void 0,void 0,r.altText,r.signalType);break;case"else":this.addSignal(void 0,void 0,r.altText,r.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,r.signalType);break;case"setAccTitle":O(r.text);break;case"parStart":this.addSignal(void 0,void 0,r.parText,r.signalType);break;case"and":this.addSignal(void 0,void 0,r.parText,r.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,r.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,r.criticalText,r.signalType);break;case"option":this.addSignal(void 0,void 0,r.optionText,r.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,r.signalType);break;case"breakStart":this.addSignal(void 0,void 0,r.breakText,r.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,r.signalType);break}}getConfig(){return m().sequence}},xr=t((r)=>{let e=r.dropShadow??"none",{look:s}=m();return`.actor {
|
|
11
11
|
stroke: ${r.actorBorder};
|
|
12
12
|
fill: ${r.actorBkg};
|
|
13
13
|
stroke-width: ${r.strokeWidth??1};
|
|
@@ -153,17 +153,17 @@ Expecting `+Qt.join(", ")+", got '"+(this.terminals_[dt]||dt)+"'";else Te="Parse
|
|
|
153
153
|
filter: ${e};
|
|
154
154
|
stroke: ${r.nodeBorder};
|
|
155
155
|
}
|
|
156
|
-
`},"getStyles"),Ir=
|
|
156
|
+
`},"getStyles"),Ir=xr,jt=44,ge=6,Zt=6,yr=t((r,e)=>r.actorTextHeight??V.calculateTextDimensions(r.description??"",{fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}).height,"actorLabelHeight"),Qe=t((r)=>jt+ge+r+Zt,"actorStackHeight"),Rr=t((r,e,s)=>{let a=r+e,n=a-Zt-s/2;return{lifelineStartY:a,glyphBottomY:a-Zt-s-ge,labelCenterY:n}},"headerBands"),Or=t((r,e)=>{let s=r+Zt,a=s+jt;return{glyphTopY:s,glyphBottomY:a,labelCenterY:a+ge+e/2,stackHeight:Qe(e)}},"footerBands"),Pt=36,Lr=-5,Je=60,Ue=Je-Lr,Ft=t((r,e,s,a)=>{if(e.look!=="neo")return null;let n=yr(r,e);return s?Or(a,n):Rr(a,r.height,n)},"neoBands"),St="actor-top",At="actor-bottom",ee="actor-box",Dt="actor-man",Rt=new Set(["redux-color","redux-dark-color"]),ct=t((r,e)=>r?.length?r[e%r.length]:void 0,"paletteColor"),Ht=t(function(r,e){let s=pi(r,e);if(E().look==="neo")s.attr("data-look","neo");return s},"drawRect"),mr=t(function(r,e,s,a,n){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};let{links:h,actorCnt:i,rectData:o}=e;var f="none";if(n)f="block !important";let p=r.append("g");p.attr("id","actor"+i+"_popup"),p.attr("class","actorPopupMenu"),p.attr("display",f);var _="";if(o.class!==void 0)_=" "+o.class;let g=o.width>s?o.width:s,x=p.append("rect");if(x.attr("class","actorPopupMenuPanel"+_),x.attr("x",o.x),x.attr("y",o.height),x.attr("fill",o.fill),x.attr("stroke",o.stroke),x.attr("width",g),x.attr("height",o.height),x.attr("rx",o.rx),x.attr("ry",o.ry),h!=null){var k=20;for(let T in h){var I=p.append("a"),S=_e.sanitizeUrl(h[T]);I.attr("xlink:href",S),I.attr("target","_blank"),Jr(a)(T,I,o.x+10,o.height+k,g,20,{class:"actor"},a),k+=30}}return x.attr("height",k),{height:o.height+k,width:g}},"drawPopup"),re=t(function(r){return"var pu = document.getElementById('"+r+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),$t=t(async function(r,e,s=null){let a=r.append("foreignObject"),n=await vc(e.text,E()),i=a.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(n).node().getBoundingClientRect();if(a.attr("height",Math.round(i.height)).attr("width",Math.round(i.width)),e.class==="noteText"){let o=r.node().firstChild;o.setAttribute("height",i.height+2*e.textMargin);let f=o.getBBox();a.attr("x",Math.round(f.x+f.width/2-i.width/2)).attr("y",Math.round(f.y+f.height/2-i.height/2))}else if(s){let{startx:o,stopx:f,starty:p}=s;if(o>f){let _=o;o=f,f=_}if(a.attr("x",Math.round(o+Math.abs(o-f)/2-i.width/2)),e.class==="loopText")a.attr("y",Math.round(p));else a.attr("y",Math.round(p-i.height))}return[a]},"drawKatex"),Yt=t(function(r,e){let s=0,a=0,n=e.text.split(w.lineBreakRegex),[h,i]=jn(e.fontSize),o=[],f=0,p=t(()=>e.y,"yfunc");if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":p=t(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":p=t(()=>Math.round(e.y+(s+a+e.textMargin)/2),"yfunc");break;case"bottom":case"end":p=t(()=>Math.round(e.y+(s+a+2*e.textMargin)-e.textMargin),"yfunc");break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[_,g]of n.entries()){if(e.textMargin!==void 0&&e.textMargin===0&&h!==void 0)f=_*h;let x=r.append("text");if(x.attr("x",e.x),x.attr("y",p()),e.anchor!==void 0)x.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline);if(e.fontFamily!==void 0)x.style("font-family",e.fontFamily);if(i!==void 0)x.style("font-size",i);if(e.fontWeight!==void 0)x.style("font-weight",e.fontWeight);if(e.fill!==void 0)x.attr("fill",e.fill);if(e.class!==void 0)x.attr("class",e.class);if(e.dy!==void 0)x.attr("dy",e.dy);else if(f!==0)x.attr("dy",f);let k=g||eA;if(e.tspan){let I=x.append("tspan");if(I.attr("x",e.x),e.fill!==void 0)I.attr("fill",e.fill);I.text(k)}else x.text(k);if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)a+=(x._groups||x)[0][0].getBBox().height,s=a;o.push(x)}return o},"drawText"),Ze=t(function(r,e){function s(n,h,i,o,f){return n+","+h+" "+(n+i)+","+h+" "+(n+i)+","+(h+o-f)+" "+(n+i-f*1.2)+","+(h+o)+" "+n+","+(h+o)}t(s,"genPoints");let a=r.append("polygon");return a.attr("points",s(e.x,e.y,e.width,e.height,7)),a.attr("class","labelBox"),e.y=e.y+e.height/2,Yt(r,e),a},"drawLabel"),Q=-1,$e=t((r,e,s,a)=>{if(!r.select)return;s.forEach((n)=>{let h=e.get(n),i=r.select("#actor"+h.actorCnt);if(!a.mirrorActors&&h.stopy)i.attr("y2",h.stopy+h.height/2);else if(a.mirrorActors)i.attr("y2",h.stopy)})},"fixLifeLineHeights"),Sr=t(function(r,e,s,a,n,h){let i=a?e.stopy:e.starty,o=e.x+e.width/2,f=i+e.height,{look:p,theme:_,themeVariables:g}=s,{bkgColorArray:x,borderColorArray:k}=g,I=r.append("g").lower();var S=I;if(!a){if(Q++,Object.keys(e.links||{}).length&&!s.forceMenus)S.attr("onclick",re(`actor${Q}_popup`)).attr("cursor","pointer");if(S.append("line").attr("id","actor"+Q).attr("x1",o).attr("y1",f).attr("x2",o).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),S=I.append("g"),e.actorCnt=Q,e.links!=null)S.attr("id","root-"+Q);if(p==="neo")S.attr("data-look","neo")}let T=Ar();var A="actor";if(e.properties?.class)A=e.properties.class;else T.fill="#eaeaea";if(a)A+=` ${At}`;else A+=` ${St}`;if(T.x=e.x,T.y=i,T.width=e.width,T.height=e.height,T.class=A,T.rx=3,T.ry=3,T.name=e.name,p==="neo")T.rx=6,T.ry=6;let y=Ht(S,T),P=h.get(e.name)??0;if(Rt.has(_))y.style("stroke",ct(k,P)),y.style("fill",ct(x,P));if(p==="neo")y.attr("filter",`url(#${kt(n)})`);if(e.rectData=T,e.properties?.icon){let N=e.properties.icon.trim();if(N.charAt(0)==="@")nm(S,T.x+T.width-20,T.y+10,N.substr(1));else tm(S,T.x+T.width-20,T.y+10,N)}if(!a)S.attr("data-et","participant"),S.attr("data-type","participant"),S.attr("data-id",e.name);Ot(s,Lt(e.description))(e.description,S,T.x,T.y,T.width,T.height,{class:`actor ${ee}`},s);let v=e.height;if(y.node){let N=y.node().getBBox();if(s.look!=="neo")e.height=N.height,v=N.height}return v},"drawActorTypeParticipant"),kr=t(function(r,e,s,a,n,h){let i=a?e.stopy:e.starty,o=e.x+e.width/2,f=i+e.height,{look:p,theme:_,themeVariables:g}=s,{bkgColorArray:x,borderColorArray:k}=g,I=r.append("g").lower();var S=I;if(!a){if(Q++,Object.keys(e.links||{}).length&&!s.forceMenus)S.attr("onclick",re(`actor${Q}_popup`)).attr("cursor","pointer");if(S.append("line").attr("id","actor"+Q).attr("x1",o).attr("y1",f).attr("x2",o).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),S=I.append("g"),e.actorCnt=Q,e.links!=null)S.attr("id","root-"+Q);if(p==="neo")S.attr("data-look","neo")}let T=Ar();var A="actor";if(e.properties?.class)A=e.properties.class;else T.fill="#eaeaea";if(a)A+=` ${At}`;else A+=` ${St}`;T.x=e.x,T.y=i,T.width=e.width,T.height=e.height,T.class=A,T.name=e.name;let y=6;if(s.look==="neo")T.height=e.height-y;let P={...T,x:T.x+(a?-y:-y),y:T.y+(a?+y:+y),class:"actor"},v=Ht(S,T),N=Ht(S,P);if(e.rectData=T,p==="neo")S.attr("filter",`url(#${kt(n)})`);let M=h.get(e.name)??0;if(Rt.has(_))v.style("stroke",ct(k,M)),v.style("fill",ct(x,M)),N.style("stroke",ct(k,M)),N.style("fill",ct(x,M));if(e.properties?.icon){let X=e.properties.icon.trim();if(X.charAt(0)==="@")nm(S,T.x+T.width-20,T.y+10,X.substr(1));else tm(S,T.x+T.width-20,T.y+10,X)}Ot(s,Lt(e.description))(e.description,S,T.x-y,T.y+y,T.width,T.height,{class:`actor ${ee}`},s);let B=e.height;if(v.node){let X=v.node().getBBox();if(s.look!=="neo")e.height=X.height,B=X.height}if(!a)S.attr("data-et","participant"),S.attr("data-type","collections"),S.attr("data-id",e.name);return B},"drawActorTypeCollections"),Nr=t(function(r,e,s,a,n,h){let i=a?e.stopy:e.starty,o=e.x+e.width/2,f=i+e.height,{look:p,theme:_,themeVariables:g}=s,{bkgColorArray:x,borderColorArray:k}=g,I=r.append("g").lower(),S=I;if(!a){if(Q++,Object.keys(e.links||{}).length&&!s.forceMenus)S.attr("onclick",re(`actor${Q}_popup`)).attr("cursor","pointer");if(S.append("line").attr("id","actor"+Q).attr("x1",o).attr("y1",f).attr("x2",o).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),S=I.append("g"),e.actorCnt=Q,e.links!=null)S.attr("id","root-"+Q);if(p==="neo")S.attr("data-look","neo")}let T=Ar(),A="actor";if(e.properties?.class)A=e.properties.class;else T.fill="#eaeaea";if(a)A+=` ${At}`;else A+=` ${St}`;S.attr("class",A),T.x=e.x,T.y=i,T.width=e.width,T.height=e.height,T.name=e.name;let y=T.height/2,P=y/(2.5+T.height/50),v=S.append("g"),N=S.append("g"),M=`M ${T.x},${T.y+y}
|
|
157
157
|
a ${P},${y} 0 0 0 0,${T.height}
|
|
158
158
|
h ${T.width-2*P}
|
|
159
159
|
a ${P},${y} 0 0 0 0,-${T.height}
|
|
160
160
|
Z
|
|
161
161
|
`;if(v.append("path").attr("d",M),N.append("path").attr("d",`M ${T.x},${T.y+y}
|
|
162
|
-
a ${P},${y} 0 0 0 0,${T.height}`),v.attr("transform",`translate(${P}, ${-(T.height/2)})`),N.attr("transform",`translate(${T.width-P}, ${-T.height/2})`),e.rectData=T,p==="neo")v.attr("filter",`url(#${
|
|
162
|
+
a ${P},${y} 0 0 0 0,${T.height}`),v.attr("transform",`translate(${P}, ${-(T.height/2)})`),N.attr("transform",`translate(${T.width-P}, ${-T.height/2})`),e.rectData=T,p==="neo")v.attr("filter",`url(#${kt(n)})`);let B=h.get(e.name)??0;if(Rt.has(_))v.style("stroke",ct(k,B)),v.style("fill",ct(x,B)),N.style("stroke",ct(k,B)),N.style("fill",ct(x,B));if(e.properties?.icon){let tt=e.properties.icon.trim(),it=T.x+T.width-20,ot=T.y+10;if(tt.charAt(0)==="@")nm(S,it,ot,tt.substr(1));else tm(S,it,ot,tt)}Ot(s,Lt(e.description))(e.description,S,T.x,T.y,T.width,T.height,{class:`actor ${ee}`},s);let X=e.height,J=v.select("path:last-child");if(J.node()){let tt=J.node().getBBox();if(s.look!=="neo")e.height=tt.height,X=tt.height}if(!a)S.attr("data-et","participant"),S.attr("data-type","queue"),S.attr("data-id",e.name);return X},"drawActorTypeQueue"),wr=t(function(r,e,s,a,n,h){let i=a?e.stopy:e.starty,o=e.x+e.width/2,f=Ft(e,s,a,i),p=f?f.lifelineStartY:i+75,{look:_,theme:g,themeVariables:x}=s,{bkgColorArray:k,borderColorArray:I,actorBorder:S,actorBkg:T}=x,A=r.append("g").lower();if(!a)Q++,A.append("line").attr("id","actor"+Q).attr("x1",o).attr("y1",p).attr("x2",o).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=Q;let y=r.append("g"),P=Dt;if(a)P+=` ${At}`;else P+=` ${St}`;y.attr("class",P),y.attr("name",e.name);let v=Ar();v.x=e.x,v.y=i,v.fill="#eaeaea",v.width=e.width,v.height=e.height,v.class="actor";let N=e.x+e.width/2,M=f?f.glyphBottomY-22:i+32,B=22;y.append("defs").append("marker").attr("id",n+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),y.append("circle").attr("cx",N).attr("cy",M).attr("r",B).attr("filter",`${_==="neo"?`url(#${kt(n)})`:""}`),y.append("line").attr("marker-end","url(#"+n+"-filled-head-control)").attr("transform",`translate(${N}, ${M-B})`);let X=h.get(e.name)??0;if(Rt.has(g))y.style("stroke",ct(I,X)),y.style("fill",ct(k,X));else y.style("stroke",S),y.style("fill",T);if(!f){let J=y.node().getBBox();e.height=J.height+2*(s?.sequence?.labelBoxHeight??0)}if(Ot(s,Lt(e.description))(e.description,y,v.x,f?f.labelCenterY-v.height/2:v.y+B+(!a?12:5),v.width,v.height,{class:`actor ${Dt}`},s),!a)y.attr("data-et","participant"),y.attr("data-type","control"),y.attr("data-id",e.name);return e.height},"drawActorTypeControl"),Pr=t(function(r,e,s,a,n,h){let i=a?e.stopy:e.starty,o=e.x+e.width/2,f=Ft(e,s,a,i),p=f?f.lifelineStartY:i+75,{look:_,theme:g,themeVariables:x}=s,{bkgColorArray:k,borderColorArray:I}=x,S=r.append("g").lower(),T=r.append("g"),A="actor";if(a)A+=` ${At}`;else A+=` ${St}`;T.attr("class",A),T.attr("name",e.name);let y=Ar();y.x=e.x,y.y=i,y.fill="#eaeaea",y.width=e.width,y.height=e.height,y.class="actor";let P=e.x+e.width/2,v=f?f.glyphBottomY-22:i+(!a?25:10),N=22;if(T.append("circle").attr("cx",P).attr("cy",v).attr("r",N).attr("width",e.width).attr("height",e.height),T.append("line").attr("x1",P-N).attr("x2",P+N).attr("y1",v+N).attr("y2",v+N).attr("stroke-width",2),_==="neo")T.attr("filter",`url(#${kt(n)})`);let M=h.get(e.name)??0;if(Rt.has(g))T.style("stroke",ct(I,M)),T.style("fill",ct(k,M));if(!f){let B=T.node().getBBox();e.height=B.height+(s?.sequence?.labelBoxHeight??0)}if(!a)Q++,S.append("line").attr("id","actor"+Q).attr("x1",o).attr("y1",p).attr("x2",o).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=Q;if(Ot(s,Lt(e.description))(e.description,T,y.x,f?f.labelCenterY-y.height/2:y.y+(!a?30:15),y.width,y.height,{class:`actor ${Dt}`},s),!f)T.attr("transform",`translate(0, ${a?N:N/2-5})`);if(!a)T.attr("data-et","participant"),T.attr("data-type","entity"),T.attr("data-id",e.name);return e.height},"drawActorTypeEntity"),Dr=t(function(r,e,s,a,n,h){let i=a?e.stopy:e.starty,o=e.x+e.width/2,f=Ft(e,s,a,i),p=f?f.lifelineStartY:i+e.height+2*s.boxTextMargin,{theme:_,themeVariables:g,look:x}=s,{bkgColorArray:k,borderColorArray:I,actorBorder:S}=g,T=r.append("g").lower(),A=T;if(!a){if(Q++,Object.keys(e.links||{}).length&&!s.forceMenus)A.attr("onclick",re(`actor${Q}_popup`)).attr("cursor","pointer");if(A.append("line").attr("id","actor"+Q).attr("x1",o).attr("y1",p).attr("x2",o).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),A=T.append("g"),e.actorCnt=Q,e.links!=null)A.attr("id","root-"+Q);if(x==="neo")A.attr("data-look","neo")}let y=Ar(),P="actor";if(e.properties?.class)P=e.properties.class;else y.fill="#eaeaea";if(a)P+=` ${At}`;else P+=` ${St}`;y.x=e.x,y.y=i,y.width=e.width,y.height=e.height,y.class=P,y.name=e.name,y.x=e.x,y.y=i;let v=y.width/3,N=v/2,M=N/(2.5+v/50),B=f?jt:y.width/3,X=f?f.glyphBottomY-B-M:y.y,J=A.append("g");J.attr("class",P);let tt=`
|
|
163
163
|
M ${y.x},${X+M}
|
|
164
164
|
a ${N},${M} 0 0 0 ${v},0
|
|
165
165
|
a ${N},${M} 0 0 0 -${v},0
|
|
166
166
|
l 0,${B-2*M}
|
|
167
167
|
a ${N},${M} 0 0 0 ${v},0
|
|
168
168
|
l 0,-${B-2*M}
|
|
169
|
-
`;if(J.append("path").attr("d",tt),x==="neo")J.attr("filter",`url(#${At(n)})`);let nt=h.get(e.name)??0;if(Rt.has(_))J.style("stroke",lt(I,nt)),J.style("fill",lt(k,nt));else J.style("stroke",S);if(J.attr("transform",`translate(${v}, ${M})`),e.rectData=y,Ot(s,Nt(e.description))(e.description,A,y.x,f?f.labelCenterY-y.height/2:y.y+35,y.width,y.height,{class:`actor ${ee}`},s),!f){let ct=J.select("path:last-child");if(ct.node()){let Tt=ct.node().getBBox();e.height=Tt.height+(s.sequence.labelBoxHeight??0)}}if(!a)A.attr("data-et","participant"),A.attr("data-type","database"),A.attr("data-id",e.name);return e.height},"drawActorTypeDatabase"),vr=t(function(r,e,s,a,n,h){let i=a?e.stopy:e.starty,o=e.x+e.width/2,f=Ft(e,s,a,i),p=f?f.lifelineStartY:i+80,_=22,g=f?f.glyphBottomY-22:i+12,x=r.append("g").lower(),{look:k,theme:I,themeVariables:S}=s,{bkgColorArray:T,borderColorArray:A,actorBorder:y}=S;if(!a)Q++,x.append("line").attr("id","actor"+Q).attr("x1",o).attr("y1",p).attr("x2",o).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=Q;let P=r.append("g"),v=Dt;if(a)v+=` ${St}`;else v+=` ${mt}`;P.attr("class",v),P.attr("name",e.name);let N=gr();if(N.x=e.x,N.y=i,N.fill="#eaeaea",N.width=e.width,N.height=e.height,N.class="actor",P.append("line").attr("id","actor-man-torso"+Q).attr("x1",e.x+e.width/2-55).attr("y1",g).attr("x2",e.x+e.width/2-15).attr("y2",g),P.append("line").attr("id","actor-man-arms"+Q).attr("x1",e.x+e.width/2-55).attr("y1",g-10).attr("x2",e.x+e.width/2-55).attr("y2",g+10),P.append("circle").attr("cx",e.x+e.width/2).attr("cy",g).attr("r",22),k==="neo")P.attr("filter",`url(#${At(n)})`);let M=h.get(e.name)??0;if(Rt.has(I))P.style("stroke",lt(A,M)),P.style("fill",lt(T,M));else P.style("stroke",y);if(!f){let B=P.node().getBBox();e.height=B.height+(s.sequence.labelBoxHeight??0)}if(Ot(s,Nt(e.description))(e.description,P,N.x,f?f.labelCenterY-N.height/2:N.y+15,N.width,N.height,{class:`actor ${Dt}`},s),!f)P.attr("transform","translate(0,21)");if(!a)P.attr("data-et","participant"),P.attr("data-type","boundary"),P.attr("data-id",e.name);return e.height},"drawActorTypeBoundary"),Cr=t(function(r,e,s,a,n){let h=a?e.stopy:e.starty,i=e.x+e.width/2,o=Ft(e,s,a,h),f=o?o.lifelineStartY:h+80,{theme:p,themeVariables:_}=s,{bkgColorArray:g,borderColorArray:x,actorBorder:k}=_,I=r.append("g").lower();if(!a)Q++,I.append("line").attr("id","actor"+Q).attr("x1",i).attr("y1",f).attr("x2",i).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=Q;let S=r.append("g"),T=Dt;if(a)T+=` ${St}`;else T+=` ${mt}`;if(S.attr("class",T),S.attr("name",e.name),!a)S.attr("data-et","participant").attr("data-type","actor").attr("data-id",e.name);let A=o?jt/Ue:1,y=t((B)=>o?o.glyphBottomY-(Je-B)*A:h+B,"gy"),P=t((B)=>i+B*A,"gx");S.append("line").attr("id","actor-man-torso"+Q).attr("x1",i).attr("y1",y(25)).attr("x2",i).attr("y2",y(45)),S.append("line").attr("id","actor-man-arms"+Q).attr("x1",P(-Pt/2)).attr("y1",y(33)).attr("x2",P(Pt/2)).attr("y2",y(33)),S.append("line").attr("x1",P(-Pt/2)).attr("y1",y(60)).attr("x2",i).attr("y2",y(45)),S.append("line").attr("x1",i).attr("y1",y(45)).attr("x2",P(Pt/2-2)).attr("y2",y(60));let v=S.append("circle");if(v.attr("cx",e.x+e.width/2),v.attr("cy",y(10)),v.attr("r",15*A),v.attr("width",e.width),v.attr("height",e.height),!o)e.height=Ue;let N=gr();N.x=e.x,N.y=h,N.fill="#eaeaea",N.width=e.width,N.height=e.height,N.class="actor",N.rx=3,N.ry=3;let M=n.get(e.name)??0;if(Rt.has(p))S.style("stroke",lt(x,M)),S.style("fill",lt(g,M));else S.style("stroke",k);return Ot(s,Nt(e.description))(e.description,S,N.x,o?o.labelCenterY-N.height/2:h+35,N.width,N.height,{class:`actor ${Dt}`},s),e.height},"drawActorTypeActor"),Mr=t(async function(r,e,s,a,n,h,i){let o=i??new Map([...h.db.getActors().values()].map((f,p)=>[f.name,p]));switch(e.type){case"actor":return await Cr(r,e,s,a,o);case"participant":return await Sr(r,e,s,a,n,o);case"boundary":return await vr(r,e,s,a,n,o);case"control":return await wr(r,e,s,a,n,o);case"entity":return await Pr(r,e,s,a,n,o);case"database":return await Dr(r,e,s,a,n,o);case"collections":return await kr(r,e,s,a,n,o);case"queue":return await Nr(r,e,s,a,n,o)}},"drawActor"),Br=t(function(r,e,s){let n=r.append("g");if(je(n,e),e.name)Ot(s)(e.name,n,e.x,e.y+s.boxTextMargin+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},s);n.lower()},"drawBox"),Yr=t(function(r){return r.append("g")},"anchorElement"),Vr=t(function(r,e,s,a,n,h,i){let{theme:o,themeVariables:f}=a,{bkgColorArray:p,borderColorArray:_,mainBkg:g}=f,x=gr(),{anchored:k,actor:I}=e;x.x=e.startx,x.y=e.starty,x.class="activation"+n%3,x.width=e.stopx-e.startx,x.height=s-e.starty;let S=Ht(k,x),A=(i??new Map([...h.db.getActors().values()].map((y,P)=>[y.name,P]))).get(I)??0;if(Rt.has(o))S.style("stroke",lt(_,A)),S.style("fill",lt(p,A)??g)},"drawActivation"),Wr=t(async function(r,e,s,a,n){let{boxMargin:h,boxTextMargin:i,labelBoxHeight:o,labelBoxWidth:f,messageFontFamily:p,messageFontSize:_,messageFontWeight:g}=a,x=r.append("g").attr("data-et","control-structure").attr("data-id","i"+n.id),k=t(function(T,A,y,P){return x.append("line").attr("x1",T).attr("y1",A).attr("x2",y).attr("y2",P).attr("class","loopLine")},"drawLoopLine");if(k(e.startx,e.starty,e.stopx,e.starty),k(e.stopx,e.starty,e.stopx,e.stopy),k(e.startx,e.stopy,e.stopx,e.stopy),k(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0)e.sections.forEach(function(T){k(e.startx,T.y,e.stopx,T.y).style("stroke-dasharray","3, 3")});let I=Yp();I.text=s,I.x=e.startx,I.y=e.starty,I.fontFamily=p,I.fontSize=_,I.fontWeight=g,I.anchor="middle",I.valign="middle",I.tspan=!1,I.width=Math.max(f??0,50),I.height=o+(a.look==="neo"?15:0)||20,I.textMargin=i,I.class="labelText",Ze(x,I),I=tr(),I.text=e.title,I.x=e.startx+f/2+(e.stopx-e.startx)/2,I.y=e.starty+h+i,I.anchor="middle",I.valign="middle",I.textMargin=i,I.class="loopText",I.fontFamily=p,I.fontSize=_,I.fontWeight=g,I.wrap=!0;let S=Nt(I.text)?await $t(x,I,e):Yt(x,I);if(e.sectionTitles!==void 0){for(let[T,A]of Object.entries(e.sectionTitles))if(A.message){if(I.text=A.message,I.x=e.startx+(e.stopx-e.startx)/2,I.y=e.sections[T].y+h+i,I.class="sectionTitle",I.anchor="middle",I.valign="middle",I.tspan=!1,I.fontFamily=p,I.fontSize=_,I.fontWeight=g,I.wrap=e.wrap,Nt(I.text))e.starty=e.sections[T].y,await $t(x,I,e);else Yt(x,I);let y=Math.round(S.map((P)=>(P._groups||P)[0][0].getBBox().height).reduce((P,v)=>P+v));e.sections[T].height+=y-(h+i)}}return e.height=Math.round(e.stopy-e.starty),x},"drawLoop"),je=t(function(r,e){pd(r,e)},"drawBackgroundRect"),Kr=t(function(r,e){r.append("defs").append("symbol").attr("id",e+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),Hr=t(function(r,e){r.append("defs").append("symbol").attr("id",e+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),Fr=t(function(r,e){r.append("defs").append("symbol").attr("id",e+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),qr=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),zr=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-filled-head").attr("refX",15.5).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")},"insertArrowFilledHead"),Ur=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),Gr=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),At=t((r)=>r?`${r}-drop-shadow`:"drop-shadow","dropShadowId"),Xr=t(function(r,e,s){let{theme:a}=e;r.append("defs").append("filter").attr("id",At(s)).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a==="redux"||a==="redux-color"?"#000000":"#FFFFFF"}`)},"insertDropShadow"),tr=t(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),Qr=t(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Ot=function(){function r(h,i,o,f,p,_,g){let x=i.append("text").attr("x",o+p/2).attr("y",f+_/2+5).style("text-anchor","middle").text(h);n(x,g)}t(r,"byText");function e(h,i,o,f,p,_,g,x){let{actorFontSize:k,actorFontFamily:I,actorFontWeight:S}=x,[T,A]=jn(k),y=h.split(w.lineBreakRegex);for(let P=0;P<y.length;P++){let v=P*T-T*(y.length-1)/2,N=i.append("text").attr("x",o+p/2).attr("y",f).style("text-anchor","middle").style("font-size",A).style("font-weight",S).style("font-family",I);N.append("tspan").attr("x",o+p/2).attr("dy",v).text(y[P]),N.attr("y",f+_/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(N,g)}}t(e,"byTspan");function s(h,i,o,f,p,_,g,x){let k=i.append("switch"),S=k.append("foreignObject").attr("x",o).attr("y",f).attr("width",p).attr("height",_).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");S.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(h),e(h,k,o,f,p,_,g,x),n(S,g)}t(s,"byFo");async function a(h,i,o,f,p,_,g,x){let k=await dc(h,E()),I=i.append("switch"),T=I.append("foreignObject").attr("x",o+p/2-k.width/2).attr("y",f+_/2-k.height/2).attr("width",k.width).attr("height",k.height).append("xhtml:div").style("height","100%").style("width","100%");T.append("div").style("text-align","center").style("vertical-align","middle").html(await pc(h,E())),e(h,I,o,f,p,_,g,x),n(T,g)}t(a,"byKatex");function n(h,i){for(let o in i)if(i.hasOwnProperty(o))h.attr(o,i[o])}return t(n,"_setTextAttrs"),function(h,i=!1){if(i)return a;return h.textPlacement==="fo"?s:h.textPlacement==="old"?r:e}}(),Jr=function(){function r(n,h,i,o,f,p,_){let g=h.append("text").attr("x",i).attr("y",o).style("text-anchor","start").text(n);a(g,_)}t(r,"byText");function e(n,h,i,o,f,p,_,g){let{actorFontSize:x,actorFontFamily:k,actorFontWeight:I}=g,S=n.split(w.lineBreakRegex);for(let T=0;T<S.length;T++){let A=T*x-x*(S.length-1)/2,y=h.append("text").attr("x",i).attr("y",o).style("text-anchor","start").style("font-size",x).style("font-weight",I).style("font-family",k);y.append("tspan").attr("x",i).attr("dy",A).text(S[T]),y.attr("y",o+p/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),a(y,_)}}t(e,"byTspan");function s(n,h,i,o,f,p,_,g){let x=h.append("switch"),I=x.append("foreignObject").attr("x",i).attr("y",o).attr("width",f).attr("height",p).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");I.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,x,i,o,f,p,_,g),a(I,_)}t(s,"byFo");function a(n,h){for(let i in h)if(h.hasOwnProperty(i))n.attr(i,h[i])}return t(a,"_setTextAttrs"),function(n){return n.textPlacement==="fo"?s:n.textPlacement==="old"?r:e}}(),Zr=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-solidTopArrowHead").attr("refX",7.9).attr("refY",7.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 8 L 0 8 z")},"insertSolidTopArrowHead"),$r=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-solidBottomArrowHead").attr("refX",7.9).attr("refY",0.75).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 0 L 0 8 z")},"insertSolidBottomArrowHead"),jr=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-stickTopArrowHead").attr("refX",7.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 7 7").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickTopArrowHead"),ta=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-stickBottomArrowHead").attr("refX",7.5).attr("refY",0).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 7 L 7 0").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickBottomArrowHead"),it={drawRect:Ht,drawText:Yt,drawLabel:Ze,drawActor:Mr,drawBox:Br,drawPopup:mr,anchorElement:Yr,drawActivation:Vr,drawLoop:Wr,drawBackgroundRect:je,insertArrowHead:qr,insertArrowFilledHead:zr,insertSequenceNumber:Ur,insertArrowCrossHead:Gr,insertDatabaseIcon:Kr,insertComputerIcon:Hr,insertClockIcon:Fr,getTextObj:tr,getNoteRect:Qr,fixLifeLineHeights:$e,sanitizeUrl:_e.sanitizeUrl,insertDropShadow:Xr,insertSolidTopArrowHead:Zr,insertSolidBottomArrowHead:$r,insertStickTopArrowHead:jr,insertStickBottomArrowHead:ta},d={},L={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:t(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map((r)=>r.height||0))+(this.loops.length===0?0:this.loops.map((r)=>r.height||0).reduce((r,e)=>r+e))+(this.messages.length===0?0:this.messages.map((r)=>r.height||0).reduce((r,e)=>r+e))+(this.notes.length===0?0:this.notes.map((r)=>r.height||0).reduce((r,e)=>r+e))},"getHeight"),clear:t(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:t(function(r){this.boxes.push(r)},"addBox"),addActor:t(function(r){this.actors.push(r)},"addActor"),addLoop:t(function(r){this.loops.push(r)},"addLoop"),addMessage:t(function(r){this.messages.push(r)},"addMessage"),addNote:t(function(r){this.notes.push(r)},"addNote"),lastActor:t(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:t(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:t(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:t(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:t(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,ar(m())},"init"),updateVal:t(function(r,e,s,a){if(r[e]===void 0)r[e]=s;else r[e]=a(s,r[e])},"updateVal"),updateBounds:t(function(r,e,s,a){let n=this,h=0;function i(o){return t(function(p){h++;let _=n.sequenceItems.length-h+1;if(n.updateVal(p,"starty",e-_*d.boxMargin,Math.min),n.updateVal(p,"stopy",a+_*d.boxMargin,Math.max),n.updateVal(L.data,"startx",r-_*d.boxMargin,Math.min),n.updateVal(L.data,"stopx",s+_*d.boxMargin,Math.max),o!=="activation")n.updateVal(p,"startx",r-_*d.boxMargin,Math.min),n.updateVal(p,"stopx",s+_*d.boxMargin,Math.max),n.updateVal(L.data,"starty",e-_*d.boxMargin,Math.min),n.updateVal(L.data,"stopy",a+_*d.boxMargin,Math.max)},"updateItemBounds")}t(i,"updateFn"),this.sequenceItems.forEach(i()),this.activations.forEach(i("activation"))},"updateBounds"),insert:t(function(r,e,s,a){let n=w.getMin(r,s),h=w.getMax(r,s),i=w.getMin(e,a),o=w.getMax(e,a);this.updateVal(L.data,"startx",n,Math.min),this.updateVal(L.data,"starty",i,Math.min),this.updateVal(L.data,"stopx",h,Math.max),this.updateVal(L.data,"stopy",o,Math.max),this.updateBounds(n,i,h,o)},"insert"),newActivation:t(function(r,e,s){let a=s.get(r.from),n=ae(r.from).length||0,h=a.x+a.width/2+(n-1)*d.activationWidth/2;this.activations.push({startx:h,starty:this.verticalPos+2,stopx:h+d.activationWidth,stopy:void 0,actor:r.from,anchored:it.anchorElement(e)})},"newActivation"),endActivation:t(function(r){let e=this.activations.map(function(s){return s.actor}).lastIndexOf(r.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:t(function(r={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:r.message,wrap:r.wrap,width:r.width,height:0,fill:e}},"createLoop"),newLoop:t(function(r={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(r,e))},"newLoop"),endLoop:t(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:t(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:t(function(r){let e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:L.getVerticalPos(),height:0}),e.sectionTitles.push(r),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:t(function(){if(this.isLoopOverlap())this.savedVerticalPos=this.verticalPos},"saveVerticalPos"),resetVerticalPos:t(function(){if(this.isLoopOverlap())this.verticalPos=this.savedVerticalPos},"resetVerticalPos"),bumpVerticalPos:t(function(r){this.verticalPos=this.verticalPos+r,this.data.stopy=w.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:t(function(){return this.verticalPos},"getVerticalPos"),getBounds:t(function(){return{bounds:this.data,models:this.models}},"getBounds")},ea=t(async function(r,e,s){L.bumpVerticalPos(d.boxMargin),e.height=d.boxMargin,e.starty=L.getVerticalPos();let a=gr();a.x=e.startx,a.y=e.starty,a.width=e.width||d.width,a.class="note";let n=r.append("g");n.attr("data-et","note"),n.attr("data-id","i"+s);let h=it.drawRect(n,a),i=Yp();i.x=e.startx,i.y=e.starty,i.width=a.width,i.dy="1em",i.text=e.message,i.class="noteText",i.fontFamily=d.noteFontFamily,i.fontSize=d.noteFontSize,i.fontWeight=d.noteFontWeight,i.anchor=d.noteAlign,i.textMargin=d.noteMargin,i.valign="center";let o=Nt(i.text)?await $t(n,i):Yt(n,i),f=Math.round(o.map((p)=>(p._groups||p)[0][0].getBBox().height).reduce((p,_)=>p+_));h.attr("height",f+2*d.noteMargin),e.height+=f+2*d.noteMargin,L.bumpVerticalPos(f+2*d.noteMargin),e.stopy=e.starty+f+2*d.noteMargin,e.stopx=e.startx+a.width,L.insert(e.startx,e.starty,e.stopx,e.stopy),L.models.addNote(e)},"drawNote"),Ge=t(function(r,e,s,a,n,h,i){let o=a.db.getActors(),f=o.get(e.from),p=o.get(e.to),_=s.sequenceVisible,g=f.x+f.width/2,x=p.x+p.width/2,k=g<=x,I=or(e,a),S=r.append("g"),T=16.5,A=t((M,B)=>{let X=M?T:-T;return B?-X:X},"getCircleOffset"),y=t((M)=>{S.append("circle").attr("cx",M).attr("cy",i).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:P,CENTRAL_CONNECTION_REVERSE:v,CENTRAL_CONNECTION_DUAL:N}=a.db.LINETYPE;if(_)switch(e.centralConnection){case P:if(I)x+=A(k,!0);break;case v:if(!I)g+=A(k,!1);break;case N:if(I)x+=A(k,!0);else g+=A(k,!1);break}switch(e.centralConnection){case P:y(x);break;case v:y(g);break;case N:y(g),y(x);break}},"drawCentralConnection"),vt=t((r)=>({fontFamily:r.messageFontFamily,fontSize:r.messageFontSize,fontWeight:r.messageFontWeight}),"messageFont"),Bt=t((r)=>({fontFamily:r.noteFontFamily,fontSize:r.noteFontSize,fontWeight:r.noteFontWeight}),"noteFont"),ue=t((r)=>({fontFamily:r.actorFontFamily,fontSize:r.actorFontSize,fontWeight:r.actorFontWeight}),"actorFont");async function er(r,e){L.bumpVerticalPos(10);let{startx:s,stopx:a,message:n}=e,h=w.splitBreaks(n).length,i=Nt(n),o=i?await dc(n,m()):V.calculateTextDimensions(n,vt(d));if(!i){let g=o.height/h;e.height+=g,L.bumpVerticalPos(g)}let f,p=o.height-10,_=o.width;if(s===a){if(f=L.getVerticalPos()+p,!d.rightAngles)p+=d.boxMargin,f=L.getVerticalPos()+p;p+=30;let g=w.getMax(_/2,d.width/2);L.insert(s-g,L.getVerticalPos()-10+p,a+g,L.getVerticalPos()+30+p)}else p+=d.boxMargin,f=L.getVerticalPos()+p,L.insert(s,f-10,a,f);return L.bumpVerticalPos(p),e.height+=p,e.stopy=e.starty+e.height,L.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),f}t(er,"boundMessage");var ra=t(async function(r,e,s,a,n,h){let{startx:i,stopx:o,starty:f,message:p,type:_,sequenceIndex:g,sequenceVisible:x}=e,k=V.calculateTextDimensions(p,vt(d)),I=Yp();if(I.x=Math.min(i,o),I.y=f+10,I.width=Math.abs(o-i),I.class="messageText",I.dy="1em",I.text=p,I.fontFamily=d.messageFontFamily,I.fontSize=d.messageFontSize,I.fontWeight=d.messageFontWeight,I.anchor=d.messageAlign,I.valign="center",I.textMargin=d.wrapPadding,I.tspan=!1,Nt(I.text))await $t(r,I,{startx:i,stopx:o,starty:s});else Yt(r,I);let S=k.width,T;if(i===o){let y=x||d.showSequenceNumbers,P=or(n,a),v=ha(n,a),N=i+(y&&(P||v)?10:0);if(d.rightAngles)T=r.append("path").attr("d",`M ${N},${s} H ${i+w.getMax(d.width/2,S/2)} V ${s+25} H ${i}`);else T=r.append("path").attr("d","M "+N+","+s+" C "+(N+60)+","+(s-10)+" "+(i+60)+","+(s+30)+" "+i+","+(s+20));if(pe(n,a))Ge(r,n,e,a,i,o,s)}else if(T=r.append("line"),T.attr("x1",i),T.attr("y1",s),T.attr("x2",o),T.attr("y2",s),pe(n,a))Ge(r,n,e,a,i,o,s);if(_===a.db.LINETYPE.DOTTED||_===a.db.LINETYPE.DOTTED_CROSS||_===a.db.LINETYPE.DOTTED_POINT||_===a.db.LINETYPE.DOTTED_OPEN||_===a.db.LINETYPE.BIDIRECTIONAL_DOTTED||_===a.db.LINETYPE.SOLID_TOP_DOTTED||_===a.db.LINETYPE.SOLID_BOTTOM_DOTTED||_===a.db.LINETYPE.STICK_TOP_DOTTED||_===a.db.LINETYPE.STICK_BOTTOM_DOTTED||_===a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||_===a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||_===a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||_===a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)T.style("stroke-dasharray","3, 3"),T.attr("class","messageLine1");else T.attr("class","messageLine0");T.attr("data-et","message"),T.attr("data-id","i"+e.id),T.attr("data-from",e.from),T.attr("data-to",e.to);let A="";if(d.arrowMarkerAbsolute)A=Gg(!0);if(T.attr("stroke-width",2),T.attr("stroke","none"),T.style("fill","none"),_===a.db.LINETYPE.SOLID_TOP||_===a.db.LINETYPE.SOLID_TOP_DOTTED)T.attr("marker-end","url("+A+"#"+h+"-solidTopArrowHead)");if(_===a.db.LINETYPE.SOLID_BOTTOM||_===a.db.LINETYPE.SOLID_BOTTOM_DOTTED)T.attr("marker-end","url("+A+"#"+h+"-solidBottomArrowHead)");if(_===a.db.LINETYPE.STICK_TOP||_===a.db.LINETYPE.STICK_TOP_DOTTED)T.attr("marker-end","url("+A+"#"+h+"-stickTopArrowHead)");if(_===a.db.LINETYPE.STICK_BOTTOM||_===a.db.LINETYPE.STICK_BOTTOM_DOTTED)T.attr("marker-end","url("+A+"#"+h+"-stickBottomArrowHead)");if(_===a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||_===a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)T.attr("marker-start","url("+A+"#"+h+"-solidBottomArrowHead)");if(_===a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||_===a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)T.attr("marker-start","url("+A+"#"+h+"-solidTopArrowHead)");if(_===a.db.LINETYPE.STICK_ARROW_TOP_REVERSE||_===a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)T.attr("marker-start","url("+A+"#"+h+"-stickBottomArrowHead)");if(_===a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||_===a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)T.attr("marker-start","url("+A+"#"+h+"-stickTopArrowHead)");if(_===a.db.LINETYPE.SOLID||_===a.db.LINETYPE.DOTTED)T.attr("marker-end","url("+A+"#"+h+"-arrowhead)");if(_===a.db.LINETYPE.BIDIRECTIONAL_SOLID||_===a.db.LINETYPE.BIDIRECTIONAL_DOTTED)T.attr("marker-start","url("+A+"#"+h+"-arrowhead)"),T.attr("marker-end","url("+A+"#"+h+"-arrowhead)");if(_===a.db.LINETYPE.SOLID_POINT||_===a.db.LINETYPE.DOTTED_POINT)T.attr("marker-end","url("+A+"#"+h+"-filled-head)");if(_===a.db.LINETYPE.SOLID_CROSS||_===a.db.LINETYPE.DOTTED_CROSS)T.attr("marker-end","url("+A+"#"+h+"-crosshead)");if(x||d.showSequenceNumbers){let y=_===a.db.LINETYPE.BIDIRECTIONAL_SOLID||_===a.db.LINETYPE.BIDIRECTIONAL_DOTTED,P=_===a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||_===a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||_===a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||_===a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||_===a.db.LINETYPE.STICK_ARROW_TOP_REVERSE||_===a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||_===a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||_===a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,v=6,N=pe(n,a),M=i,B=o;if(y){if(i<o)M=i+12;else M=i-6+(N?-5:0),M+=n?.centralConnection===a.db.LINETYPE.CENTRAL_CONNECTION_DUAL||n?.centralConnection===a.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0;T.attr("x1",M)}else if(P){if(o>i)B=o-12;else B=o-6,M+=n?.centralConnection===a.db.LINETYPE.CENTRAL_CONNECTION_DUAL||n?.centralConnection===a.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0;B+=N?15:0,T.attr("x2",B),T.attr("x1",M)}else T.attr("x1",i+6);let X=0,J=i===o,tt=i<=o;if(J)X=e.fromBounds+1;else if(P)X=tt?e.toBounds-1:e.fromBounds+1;else X=tt?e.fromBounds+1:e.toBounds-1;let nt="12px",ct=g.toString().length;if(ct>5)nt="7px";else if(ct>3)nt="9px";r.append("line").attr("x1",X).attr("y1",s).attr("x2",X).attr("y2",s).attr("stroke-width",0).attr("marker-start","url("+A+"#"+h+"-sequencenumber)"),r.append("text").attr("x",X).attr("y",s+4).attr("font-family","sans-serif").attr("font-size",nt).attr("text-anchor","middle").attr("class","sequenceNumber").text(g)}},"drawMessage"),aa=t(function(r,e,s,a,n,h,i){let o=0,f=0,p=void 0,_=0;for(let g of a){let x=e.get(g),k=x.box;if(p&&p!=k){if(!i)L.models.addBox(p);f+=d.boxMargin+p.margin}if(k&&k!=p){if(!i)k.x=o+f,k.y=n;f+=k.margin}if(x.width=w.getMax(x.width||d.width,d.width),x.height=w.getMax(x.height||d.height,d.height),x.margin=x.margin||d.actorMargin,_=w.getMax(_,x.height),s.get(x.name))f+=x.width/2;if(x.x=o+f,x.starty=L.getVerticalPos(),L.insert(x.x,n,x.x+x.width,x.height),o+=x.width+f,x.box)x.box.width=o+k.margin-x.box.x;f=x.margin,p=x.box,L.models.addActor(x)}if(p&&!i)L.models.addBox(p);L.bumpVerticalPos(_)},"addActorRenderingData"),fe=t(async function(r,e,s,a,n,h,i){if(!a)for(let o of s){let f=e.get(o);await it.drawActor(r,f,d,!1,n,h,i)}else{let o=0;L.bumpVerticalPos(d.boxMargin*2);for(let f of s){let p=e.get(f);if(!p.stopy)p.stopy=L.getVerticalPos();let _=await it.drawActor(r,p,d,!0,n,h,i);o=w.getMax(o,_)}L.bumpVerticalPos(o+d.boxMargin)}},"drawActors"),rr=t(function(r,e,s,a){let n=0,h=0;for(let i of s){let o=e.get(i),f=ia(o),p=it.drawPopup(r,o,f,d,d.forceMenus,a);if(p.height>n)n=p.height;if(p.width+o.x>h)h=p.width+o.x}return{maxHeight:n,maxWidth:h}},"drawActorsPopup"),ar=t(function(r){if(st(d,r),r.fontFamily)d.actorFontFamily=d.noteFontFamily=d.messageFontFamily=r.fontFamily;if(r.fontSize)d.actorFontSize=d.noteFontSize=d.messageFontSize=r.fontSize;if(r.fontWeight)d.actorFontWeight=d.noteFontWeight=d.messageFontWeight=r.fontWeight},"setConf"),ae=t(function(r){return L.activations.filter(function(e){return e.actor===r})},"actorActivations"),Xe=t(function(r,e){let s=e.get(r),a=ae(r),n=a.reduce(function(i,o){return w.getMin(i,o.startx)},s.x+s.width/2-1),h=a.reduce(function(i,o){return w.getMax(i,o.stopx)},s.x+s.width/2+1);return[n,h]},"activationBounds");function It(r,e,s,a,n){L.bumpVerticalPos(s);let h=a;if(e.id&&e.message&&r[e.id]){let i=r[e.id].width,o=vt(d);e.message=V.wrapLabel(`[${e.message}]`,i-2*d.wrapPadding,o),e.width=i,e.wrap=!0;let f=V.calculateTextDimensions(e.message,o),p=w.getMax(f.height,d.labelBoxHeight);h=a+p,l.debug(`${p} - ${e.message}`)}n(e),L.bumpVerticalPos(h)}t(It,"adjustLoopHeightForWrap");function sr(r,e,s,a,n,h,i){function o(_,g){if(_.x<n.get(r.from).x)L.insert(e.stopx-g,e.starty,e.startx,e.stopy+_.height/2+d.noteMargin),e.stopx=e.stopx+g;else L.insert(e.startx,e.starty,e.stopx+g,e.stopy+_.height/2+d.noteMargin),e.stopx=e.stopx-g}t(o,"receiverAdjustment");function f(_,g){if(_.x<n.get(r.to).x)L.insert(e.startx-g,e.starty,e.stopx,e.stopy+_.height/2+d.noteMargin),e.startx=e.startx+g;else L.insert(e.stopx,e.starty,e.startx+g,e.stopy+_.height/2+d.noteMargin),e.startx=e.startx-g}t(f,"senderAdjustment");let p=[Jt.ACTOR,Jt.CONTROL,Jt.ENTITY,Jt.DATABASE];if(h.get(r.to)==a){let _=n.get(r.to),g=p.includes(_.type)?Pt/2+3:_.width/2+3;o(_,g),_.starty=s-_.height/2,L.bumpVerticalPos(_.height/2)}else if(i.get(r.from)==a){let _=n.get(r.from);if(d.mirrorActors){let g=p.includes(_.type)?Pt/2:_.width/2;f(_,g)}_.stopy=s-_.height/2,L.bumpVerticalPos(_.height/2)}else if(i.get(r.to)==a){let _=n.get(r.to);if(d.mirrorActors){let g=p.includes(_.type)?Pt/2+3:_.width/2+3;o(_,g)}_.stopy=s-_.height/2,L.bumpVerticalPos(_.height/2)}}t(sr,"adjustCreatedDestroyedData");var sa=t(async function(r,e,s,a){let{securityLevel:n,sequence:h,look:i,themeVariables:o}=m();d=h;let f;if(n==="sandbox")f=b("#i"+e);let p=n==="sandbox"?b(f.nodes()[0].contentDocument.body):b("body"),_=n==="sandbox"?f.nodes()[0].contentDocument:document;L.init(),l.debug(a.db);let g=n==="sandbox"?p.select(`[id="${e}"]`):b(`[id="${e}"]`),x=a.db.getActors(),k=a.db.getCreatedActors(),I=a.db.getDestroyedActors(),S=a.db.getBoxes(),T=a.db.getActorKeys(),A=a.db.getMessages(),y=a.db.getDiagramTitle(),P=a.db.hasAtLeastOneBox(),v=a.db.hasAtLeastOneBoxWithTitle(),N=await ir(x,A,a);if(d.height=await nr(x,N,S),it.insertComputerIcon(g,e),it.insertDatabaseIcon(g,e),it.insertClockIcon(g,e),P){if(L.bumpVerticalPos(d.boxMargin),v)L.bumpVerticalPos(S[0].textMaxHeight)}if(d.hideUnusedParticipants===!0){let D=new Set;A.forEach((W)=>{D.add(W.from),D.add(W.to)}),T=T.filter((W)=>D.has(W))}let M=new Map(T.map((D,W)=>[x.get(D)?.name??D,W]));aa(g,x,k,T,0,A,!1);let B=await Ta(A,x,N,a);if(it.insertArrowHead(g,e),it.insertArrowCrossHead(g,e),it.insertArrowFilledHead(g,e),it.insertSequenceNumber(g,e),it.insertSolidTopArrowHead(g,e),it.insertSolidBottomArrowHead(g,e),it.insertStickTopArrowHead(g,e),it.insertStickBottomArrowHead(g,e),i==="neo")it.insertDropShadow(g,d,e);function X(D,W){let bt=L.endActivation(D);if(bt.starty+18>W)bt.starty=W-6,W+=12;it.drawActivation(g,bt,W,d,ae(D.from).length,a,M),L.insert(bt.startx,W-10,bt.stopx,W)}t(X,"activeEnd");let J=1,tt=1,nt=[],ct=[],Tt=0;for(let D of A){let W,bt,ut;switch(D.type){case a.db.LINETYPE.NOTE:L.resetVerticalPos(),bt=D.noteModel,await ea(g,bt,D.id);break;case a.db.LINETYPE.ACTIVE_START:L.newActivation(D,g,x);break;case a.db.LINETYPE.CENTRAL_CONNECTION:L.newActivation(D,g,x);break;case a.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:L.newActivation(D,g,x);break;case a.db.LINETYPE.ACTIVE_END:X(D,L.getVerticalPos());break;case a.db.LINETYPE.LOOP_START:It(B,D,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>L.newLoop(et));break;case a.db.LINETYPE.LOOP_END:W=L.endLoop(),await it.drawLoop(g,W,"loop",d,D),L.bumpVerticalPos(W.stopy-L.getVerticalPos()),L.models.addLoop(W);break;case a.db.LINETYPE.RECT_START:It(B,D,d.boxMargin,d.boxMargin,(et)=>{let Ct=et.message;if(!Ct)Ct=o?.rectBkgColor||o?.actorBkg||"rgba(128, 128, 128, 0.5)";L.newLoop(void 0,Ct)});break;case a.db.LINETYPE.RECT_END:W=L.endLoop(),ct.push(W),L.models.addLoop(W),L.bumpVerticalPos(W.stopy-L.getVerticalPos());break;case a.db.LINETYPE.OPT_START:It(B,D,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>L.newLoop(et));break;case a.db.LINETYPE.OPT_END:W=L.endLoop(),await it.drawLoop(g,W,"opt",d,D),L.bumpVerticalPos(W.stopy-L.getVerticalPos()),L.models.addLoop(W);break;case a.db.LINETYPE.ALT_START:It(B,D,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>L.newLoop(et));break;case a.db.LINETYPE.ALT_ELSE:It(B,D,d.boxMargin+d.boxTextMargin,d.boxMargin,(et)=>L.addSectionToLoop(et));break;case a.db.LINETYPE.ALT_END:W=L.endLoop(),await it.drawLoop(g,W,"alt",d,D),L.bumpVerticalPos(W.stopy-L.getVerticalPos()),L.models.addLoop(W);break;case a.db.LINETYPE.PAR_START:case a.db.LINETYPE.PAR_OVER_START:It(B,D,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>L.newLoop(et)),L.saveVerticalPos();break;case a.db.LINETYPE.PAR_AND:It(B,D,d.boxMargin+d.boxTextMargin,d.boxMargin,(et)=>L.addSectionToLoop(et));break;case a.db.LINETYPE.PAR_END:W=L.endLoop(),await it.drawLoop(g,W,"par",d,D),L.bumpVerticalPos(W.stopy-L.getVerticalPos()),L.models.addLoop(W);break;case a.db.LINETYPE.AUTONUMBER:if(J=D.message.start||J,tt=D.message.step||tt,D.message.visible)a.db.enableSequenceNumbers();else a.db.disableSequenceNumbers();break;case a.db.LINETYPE.CRITICAL_START:It(B,D,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>L.newLoop(et));break;case a.db.LINETYPE.CRITICAL_OPTION:It(B,D,d.boxMargin+d.boxTextMargin,d.boxMargin,(et)=>L.addSectionToLoop(et));break;case a.db.LINETYPE.CRITICAL_END:W=L.endLoop(),await it.drawLoop(g,W,"critical",d,D),L.bumpVerticalPos(W.stopy-L.getVerticalPos()),L.models.addLoop(W);break;case a.db.LINETYPE.BREAK_START:It(B,D,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>L.newLoop(et));break;case a.db.LINETYPE.BREAK_END:W=L.endLoop(),await it.drawLoop(g,W,"break",d,D),L.bumpVerticalPos(W.stopy-L.getVerticalPos()),L.models.addLoop(W);break;default:try{ut=D.msgModel,ut.starty=L.getVerticalPos(),ut.sequenceIndex=J,ut.sequenceVisible=a.db.showSequenceNumbers(),ut.id=D.id,ut.from=D.from,ut.to=D.to;let et=await er(g,ut);sr(D,ut,et,Tt,x,k,I),nt.push({messageModel:ut,lineStartY:et,msg:D}),L.models.addMessage(ut)}catch(et){l.error("error while drawing message",et)}}if([a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,a.db.LINETYPE.SOLID_TOP,a.db.LINETYPE.SOLID_BOTTOM,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.SOLID_TOP_DOTTED,a.db.LINETYPE.SOLID_BOTTOM_DOTTED,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.DOTTED,a.db.LINETYPE.SOLID_CROSS,a.db.LINETYPE.DOTTED_CROSS,a.db.LINETYPE.SOLID_POINT,a.db.LINETYPE.DOTTED_POINT,a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(D.type))J=Math.round((J+tt)*100)/100;Tt++}l.debug("createdActors",k),l.debug("destroyedActors",I),await fe(g,x,T,!1,e,a,M);for(let D of nt)await ra(g,D.messageModel,D.lineStartY,a,D.msg,e);if(d.mirrorActors)await fe(g,x,T,!0,e,a,M);ct.forEach((D)=>it.drawBackgroundRect(g,D)),$e(g,x,T,d);for(let D of L.models.boxes){D.height=L.getVerticalPos()-D.y,L.insert(D.x,D.y,D.x+D.width,D.height);let W=d.boxMargin*2;D.startx=D.x-W,D.starty=D.y-W*0.25,D.stopx=D.startx+D.width+2*W,D.stopy=D.starty+D.height+W*0.75,D.stroke="rgb(0,0,0, 0.5)",it.drawBox(g,D,d)}if(P)L.bumpVerticalPos(d.boxMargin);let pt=rr(g,x,T,_),{bounds:ot}=L.getBounds();if(ot.startx===void 0)ot.startx=0;if(ot.starty===void 0)ot.starty=0;if(ot.stopx===void 0)ot.stopx=0;if(ot.stopy===void 0)ot.stopy=0;let ft=ot.stopy-ot.starty;if(ft<pt.maxHeight)ft=pt.maxHeight;let Et=ft+2*d.diagramMarginY;if(d.mirrorActors)Et=Et-d.boxMargin+d.bottomMarginAdj;let Z=ot.stopx-ot.startx;if(Z<pt.maxWidth)Z=pt.maxWidth;let U=Z+2*d.diagramMarginX;if(y)g.append("text").text(y).attr("x",(ot.stopx-ot.startx)/2-2*d.diagramMarginX).attr("y",-25);ne(g,Et,U,d.useMaxWidth);let Vt=y?40:0,qt=x.size&&i==="neo"?30:0;g.attr("viewBox",ot.startx-d.diagramMarginX+" -"+(d.diagramMarginY+Vt)+" "+U+" "+(Et+Vt+qt)),l.debug("models:",L.models)},"draw");async function ir(r,e,s){let a={};for(let n of e)if(r.get(n.to)&&r.get(n.from)){let h=r.get(n.to);if(n.placement===s.db.PLACEMENT.LEFTOF&&!h.prevActor)continue;if(n.placement===s.db.PLACEMENT.RIGHTOF&&!h.nextActor)continue;let i=n.placement!==void 0,o=!i,f=i?Bt(d):vt(d),p=n.wrap?V.wrapLabel(n.message,d.width-2*d.wrapPadding,f):n.message,g=(Nt(p)?await dc(n.message,m()):V.calculateTextDimensions(p,f)).width+2*d.wrapPadding;if(o&&n.from===h.nextActor)a[n.to]=w.getMax(a[n.to]||0,g);else if(o&&n.from===h.prevActor)a[n.from]=w.getMax(a[n.from]||0,g);else if(o&&n.from===n.to)a[n.from]=w.getMax(a[n.from]||0,g/2),a[n.to]=w.getMax(a[n.to]||0,g/2);else if(n.placement===s.db.PLACEMENT.RIGHTOF)a[n.from]=w.getMax(a[n.from]||0,g);else if(n.placement===s.db.PLACEMENT.LEFTOF)a[h.prevActor]=w.getMax(a[h.prevActor]||0,g);else if(n.placement===s.db.PLACEMENT.OVER){if(h.prevActor)a[h.prevActor]=w.getMax(a[h.prevActor]||0,g/2);if(h.nextActor)a[n.from]=w.getMax(a[n.from]||0,g/2)}}return l.debug("maxMessageWidthPerActor:",a),a}t(ir,"getMaxMessageWidthPerActor");var ia=t(function(r){let e=0,s=ue(d);for(let a in r.links){let h=V.calculateTextDimensions(a,s).width+2*d.wrapPadding+2*d.boxMargin;if(e<h)e=h}return e},"getRequiredPopupWidth");async function nr(r,e,s){let a=0;for(let h of r.keys()){let i=r.get(h);if(i.wrap)i.description=V.wrapLabel(i.description,d.width-2*d.wrapPadding,ue(d));let o=Nt(i.description)?await dc(i.description,m()):V.calculateTextDimensions(i.description,ue(d));if(i.width=i.wrap?d.width:w.getMax(d.width,o.width+2*d.wrapPadding),m().look==="neo")i.actorTextHeight=o.height,i.height=w.getMax(Qe(o.height),d.height);else i.height=i.wrap?w.getMax(o.height,d.height):d.height;a=w.getMax(a,i.height)}for(let h in e){let i=r.get(h);if(!i)continue;let o=r.get(i.nextActor);if(!o){let g=e[h]+d.actorMargin-i.width/2;i.margin=w.getMax(g,d.actorMargin);continue}let p=e[h]+d.actorMargin-i.width/2-o.width/2;i.margin=w.getMax(p,d.actorMargin)}let n=0;return s.forEach((h)=>{let i=vt(d),o=h.actorKeys.reduce((g,x)=>g+=r.get(x).width+(r.get(x).margin||0),0),f=d.boxMargin*8;if(o+=f,o-=2*d.boxTextMargin,h.wrap)h.name=V.wrapLabel(h.name,o-2*d.wrapPadding,i);let p=V.calculateTextDimensions(h.name,i);n=w.getMax(p.height,n);let _=w.getMax(o,p.width+2*d.wrapPadding);if(h.margin=d.boxTextMargin,o<_){let g=(_-o)/2;h.margin+=g}}),s.forEach((h)=>h.textMaxHeight=n),w.getMax(a,d.height)}t(nr,"calculateActorMargins");var na=t(async function(r,e,s){let a=e.get(r.from),n=e.get(r.to),h=a.x,i=n.x,o=r.wrap&&r.message,f=Nt(r.message)?await dc(r.message,m()):V.calculateTextDimensions(o?V.wrapLabel(r.message,d.width,Bt(d)):r.message,Bt(d)),p={width:o?d.width:w.getMax(d.width,f.width+2*d.noteMargin),height:0,startx:a.x,stopx:0,starty:0,stopy:0,message:r.message};if(r.placement===s.db.PLACEMENT.RIGHTOF)p.width=o?w.getMax(d.width,f.width):w.getMax(a.width/2+n.width/2,f.width+2*d.noteMargin),p.startx=h+(a.width+d.actorMargin)/2;else if(r.placement===s.db.PLACEMENT.LEFTOF)p.width=o?w.getMax(d.width,f.width+2*d.noteMargin):w.getMax(a.width/2+n.width/2,f.width+2*d.noteMargin),p.startx=h-p.width+(a.width-d.actorMargin)/2;else if(r.to===r.from)f=V.calculateTextDimensions(o?V.wrapLabel(r.message,w.getMax(d.width,a.width),Bt(d)):r.message,Bt(d)),p.width=o?w.getMax(d.width,a.width):w.getMax(a.width,d.width,f.width+2*d.noteMargin),p.startx=h+(a.width-p.width)/2;else p.width=Math.abs(h+a.width/2-(i+n.width/2))+d.actorMargin,p.startx=h<i?h+a.width/2-d.actorMargin/2:i+n.width/2-d.actorMargin/2;if(o)p.message=V.wrapLabel(r.message,p.width-2*d.wrapPadding,Bt(d));return l.debug(`NM:[${p.startx},${p.stopx},${p.starty},${p.stopy}:${p.width},${p.height}=${r.message}]`),p},"buildNoteModel"),oa=4,ca=6,pe=t(function(r,e){let{CENTRAL_CONNECTION:s,CENTRAL_CONNECTION_REVERSE:a,CENTRAL_CONNECTION_DUAL:n}=e.db.LINETYPE;return[s,a,n].includes(r.centralConnection)},"hasCentralConnection"),la=t(function(r,e,s){let{CENTRAL_CONNECTION_REVERSE:a,CENTRAL_CONNECTION_DUAL:n,BIDIRECTIONAL_SOLID:h,BIDIRECTIONAL_DOTTED:i}=e.db.LINETYPE,o=0;if(r.centralConnection===a||r.centralConnection===n)o+=oa;if((r.centralConnection===a||r.centralConnection===n)&&(r.type===h||r.type===i))o+=s?0:-ca;return o},"calculateCentralConnectionOffset"),or=t(function(r,e){let{SOLID_ARROW_TOP_REVERSE:s,SOLID_ARROW_TOP_REVERSE_DOTTED:a,SOLID_ARROW_BOTTOM_REVERSE:n,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:h,STICK_ARROW_TOP_REVERSE:i,STICK_ARROW_TOP_REVERSE_DOTTED:o,STICK_ARROW_BOTTOM_REVERSE:f,STICK_ARROW_BOTTOM_REVERSE_DOTTED:p}=e.db.LINETYPE;return[s,a,n,h,i,o,f,p].includes(r.type)},"isReverseArrowType"),ha=t(function(r,e){let{BIDIRECTIONAL_SOLID:s,BIDIRECTIONAL_DOTTED:a}=e.db.LINETYPE;return[s,a].includes(r.type)},"isBidirectionalArrowType"),da=t(function(r,e,s){let{look:a}=m();if(![s.db.LINETYPE.SOLID_OPEN,s.db.LINETYPE.DOTTED_OPEN,s.db.LINETYPE.SOLID,s.db.LINETYPE.SOLID_TOP,s.db.LINETYPE.SOLID_BOTTOM,s.db.LINETYPE.STICK_TOP,s.db.LINETYPE.STICK_BOTTOM,s.db.LINETYPE.SOLID_TOP_DOTTED,s.db.LINETYPE.SOLID_BOTTOM_DOTTED,s.db.LINETYPE.STICK_TOP_DOTTED,s.db.LINETYPE.STICK_BOTTOM_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,s.db.LINETYPE.STICK_ARROW_TOP_REVERSE,s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.DOTTED,s.db.LINETYPE.SOLID_CROSS,s.db.LINETYPE.DOTTED_CROSS,s.db.LINETYPE.SOLID_POINT,s.db.LINETYPE.DOTTED_POINT,s.db.LINETYPE.BIDIRECTIONAL_SOLID,s.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(r.type))return{};let[n,h]=Xe(r.from,e),[i,o]=Xe(r.to,e),f=n<=i,p=f?h:n,_=f?i:o;if(a==="neo"){if(r.type!==s.db.LINETYPE.SOLID_OPEN)_+=f?-3:3;if(r.type===s.db.LINETYPE.BIDIRECTIONAL_SOLID||r.type===s.db.LINETYPE.BIDIRECTIONAL_DOTTED)p+=f?3:-3}p+=la(r,s,f);let g=Math.abs(i-o)>2,x=t((T)=>f?-T:T,"adjustValue");if(r.from===r.to)_=p;else{if(r.activate&&!g)_+=x(d.activationWidth/2-1);if(![s.db.LINETYPE.SOLID_OPEN,s.db.LINETYPE.DOTTED_OPEN,s.db.LINETYPE.STICK_TOP,s.db.LINETYPE.STICK_BOTTOM,s.db.LINETYPE.STICK_TOP_DOTTED,s.db.LINETYPE.STICK_BOTTOM_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.STICK_ARROW_TOP_REVERSE,s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,s.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(r.type))_+=x(3);if([s.db.LINETYPE.BIDIRECTIONAL_SOLID,s.db.LINETYPE.BIDIRECTIONAL_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(r.type))p-=x(3)}let k=[n,h,i,o],I=Math.abs(p-_);if(r.wrap&&r.message)r.message=V.wrapLabel(r.message,w.getMax(I+2*d.wrapPadding,d.width),vt(d));let S=V.calculateTextDimensions(r.message,vt(d));return{width:w.getMax(r.wrap?0:S.width+2*d.wrapPadding,I+2*d.wrapPadding,d.width),height:0,startx:p,stopx:_,starty:0,stopy:0,message:r.message,type:r.type,wrap:r.wrap,fromBounds:Math.min.apply(null,k),toBounds:Math.max.apply(null,k)}},"buildMessageModel"),Ta=t(async function(r,e,s,a){let n={},h=[],i,o,f;for(let p of r){switch(p.type){case a.db.LINETYPE.LOOP_START:case a.db.LINETYPE.ALT_START:case a.db.LINETYPE.OPT_START:case a.db.LINETYPE.PAR_START:case a.db.LINETYPE.PAR_OVER_START:case a.db.LINETYPE.CRITICAL_START:case a.db.LINETYPE.BREAK_START:h.push({id:p.id,msg:p.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case a.db.LINETYPE.ALT_ELSE:case a.db.LINETYPE.PAR_AND:case a.db.LINETYPE.CRITICAL_OPTION:if(p.message)i=h.pop(),n[i.id]=i,n[p.id]=i,h.push(i);break;case a.db.LINETYPE.LOOP_END:case a.db.LINETYPE.ALT_END:case a.db.LINETYPE.OPT_END:case a.db.LINETYPE.PAR_END:case a.db.LINETYPE.CRITICAL_END:case a.db.LINETYPE.BREAK_END:i=h.pop(),n[i.id]=i;break;case a.db.LINETYPE.ACTIVE_START:{let g=e.get(p.from?p.from:p.to.actor),x=ae(p.from?p.from:p.to.actor).length,k=g.x+g.width/2+(x-1)*d.activationWidth/2,I={startx:k,stopx:k+d.activationWidth,actor:p.from,enabled:!0};L.activations.push(I)}break;case a.db.LINETYPE.ACTIVE_END:{let g=L.activations.map((x)=>x.actor).lastIndexOf(p.from);L.activations.splice(g,1).splice(0,1)}break}if(p.placement!==void 0)o=await na(p,e,a),p.noteModel=o,h.forEach((g)=>{i=g,i.from=w.getMin(i.from,o.startx),i.to=w.getMax(i.to,o.startx+o.width),i.width=w.getMax(i.width,Math.abs(i.from-i.to))-d.labelBoxWidth});else if(f=da(p,e,a),p.msgModel=f,f.startx&&f.stopx&&h.length>0)h.forEach((g)=>{if(i=g,f.startx===f.stopx){let x=e.get(p.from),k=e.get(p.to);i.from=w.getMin(x.x-f.width/2,x.x-x.width/2,i.from),i.to=w.getMax(k.x+f.width/2,k.x+x.width/2,i.to),i.width=w.getMax(i.width,Math.abs(i.to-i.from))-d.labelBoxWidth}else i.from=w.getMin(f.startx,i.from),i.to=w.getMax(f.stopx,i.to),i.width=w.getMax(i.width,f.width)-d.labelBoxWidth})}return L.activations=[],l.debug("Loop type widths:",n),n},"calculateLoopBounds"),pa={bounds:L,drawActors:fe,drawActorsPopup:rr,setConf:ar,draw:sa},Ra={parser:Er,get db(){return new xr},renderer:pa,styles:Ir,init:t((r)=>{if(!r.sequence)r.sequence={};if(r.wrap)r.sequence.wrap=r.wrap,va({sequence:{wrap:r.wrap}})},"init")};export{Ra as diagram};
|
|
169
|
+
`;if(J.append("path").attr("d",tt),x==="neo")J.attr("filter",`url(#${kt(n)})`);let it=h.get(e.name)??0;if(Rt.has(_))J.style("stroke",ct(I,it)),J.style("fill",ct(k,it));else J.style("stroke",S);if(J.attr("transform",`translate(${v}, ${M})`),e.rectData=y,Ot(s,Lt(e.description))(e.description,A,y.x,f?f.labelCenterY-y.height/2:y.y+35,y.width,y.height,{class:`actor ${ee}`},s),!f){let ot=J.select("path:last-child");if(ot.node()){let Tt=ot.node().getBBox();e.height=Tt.height+(s.sequence.labelBoxHeight??0)}}if(!a)A.attr("data-et","participant"),A.attr("data-type","database"),A.attr("data-id",e.name);return e.height},"drawActorTypeDatabase"),vr=t(function(r,e,s,a,n,h){let i=a?e.stopy:e.starty,o=e.x+e.width/2,f=Ft(e,s,a,i),p=f?f.lifelineStartY:i+80,_=22,g=f?f.glyphBottomY-22:i+12,x=r.append("g").lower(),{look:k,theme:I,themeVariables:S}=s,{bkgColorArray:T,borderColorArray:A,actorBorder:y}=S;if(!a)Q++,x.append("line").attr("id","actor"+Q).attr("x1",o).attr("y1",p).attr("x2",o).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=Q;let P=r.append("g"),v=Dt;if(a)v+=` ${At}`;else v+=` ${St}`;P.attr("class",v),P.attr("name",e.name);let N=Ar();if(N.x=e.x,N.y=i,N.fill="#eaeaea",N.width=e.width,N.height=e.height,N.class="actor",P.append("line").attr("id","actor-man-torso"+Q).attr("x1",e.x+e.width/2-55).attr("y1",g).attr("x2",e.x+e.width/2-15).attr("y2",g),P.append("line").attr("id","actor-man-arms"+Q).attr("x1",e.x+e.width/2-55).attr("y1",g-10).attr("x2",e.x+e.width/2-55).attr("y2",g+10),P.append("circle").attr("cx",e.x+e.width/2).attr("cy",g).attr("r",22),k==="neo")P.attr("filter",`url(#${kt(n)})`);let M=h.get(e.name)??0;if(Rt.has(I))P.style("stroke",ct(A,M)),P.style("fill",ct(T,M));else P.style("stroke",y);if(!f){let B=P.node().getBBox();e.height=B.height+(s.sequence.labelBoxHeight??0)}if(Ot(s,Lt(e.description))(e.description,P,N.x,f?f.labelCenterY-N.height/2:N.y+15,N.width,N.height,{class:`actor ${Dt}`},s),!f)P.attr("transform","translate(0,21)");if(!a)P.attr("data-et","participant"),P.attr("data-type","boundary"),P.attr("data-id",e.name);return e.height},"drawActorTypeBoundary"),Cr=t(function(r,e,s,a,n){let h=a?e.stopy:e.starty,i=e.x+e.width/2,o=Ft(e,s,a,h),f=o?o.lifelineStartY:h+80,{theme:p,themeVariables:_}=s,{bkgColorArray:g,borderColorArray:x,actorBorder:k}=_,I=r.append("g").lower();if(!a)Q++,I.append("line").attr("id","actor"+Q).attr("x1",i).attr("y1",f).attr("x2",i).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=Q;let S=r.append("g"),T=Dt;if(a)T+=` ${At}`;else T+=` ${St}`;if(S.attr("class",T),S.attr("name",e.name),!a)S.attr("data-et","participant").attr("data-type","actor").attr("data-id",e.name);let A=o?jt/Ue:1,y=t((B)=>o?o.glyphBottomY-(Je-B)*A:h+B,"gy"),P=t((B)=>i+B*A,"gx");S.append("line").attr("id","actor-man-torso"+Q).attr("x1",i).attr("y1",y(25)).attr("x2",i).attr("y2",y(45)),S.append("line").attr("id","actor-man-arms"+Q).attr("x1",P(-Pt/2)).attr("y1",y(33)).attr("x2",P(Pt/2)).attr("y2",y(33)),S.append("line").attr("x1",P(-Pt/2)).attr("y1",y(60)).attr("x2",i).attr("y2",y(45)),S.append("line").attr("x1",i).attr("y1",y(45)).attr("x2",P(Pt/2-2)).attr("y2",y(60));let v=S.append("circle");if(v.attr("cx",e.x+e.width/2),v.attr("cy",y(10)),v.attr("r",15*A),v.attr("width",e.width),v.attr("height",e.height),!o)e.height=Ue;let N=Ar();N.x=e.x,N.y=h,N.fill="#eaeaea",N.width=e.width,N.height=e.height,N.class="actor",N.rx=3,N.ry=3;let M=n.get(e.name)??0;if(Rt.has(p))S.style("stroke",ct(x,M)),S.style("fill",ct(g,M));else S.style("stroke",k);return Ot(s,Lt(e.description))(e.description,S,N.x,o?o.labelCenterY-N.height/2:h+35,N.width,N.height,{class:`actor ${Dt}`},s),e.height},"drawActorTypeActor"),Mr=t(async function(r,e,s,a,n,h,i){let o=i??new Map([...h.db.getActors().values()].map((f,p)=>[f.name,p]));switch(e.type){case"actor":return await Cr(r,e,s,a,o);case"participant":return await Sr(r,e,s,a,n,o);case"boundary":return await vr(r,e,s,a,n,o);case"control":return await wr(r,e,s,a,n,o);case"entity":return await Pr(r,e,s,a,n,o);case"database":return await Dr(r,e,s,a,n,o);case"collections":return await kr(r,e,s,a,n,o);case"queue":return await Nr(r,e,s,a,n,o)}},"drawActor"),Br=t(function(r,e,s){let n=r.append("g");if(je(n,e),e.name)Ot(s)(e.name,n,e.x,e.y+s.boxTextMargin+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},s);n.lower()},"drawBox"),Yr=t(function(r){return r.append("g")},"anchorElement"),Vr=t(function(r,e,s,a,n,h,i){let{theme:o,themeVariables:f}=a,{bkgColorArray:p,borderColorArray:_,mainBkg:g}=f,x=Ar(),{anchored:k,actor:I}=e;x.x=e.startx,x.y=e.starty,x.class="activation"+n%3,x.width=e.stopx-e.startx,x.height=s-e.starty;let S=Ht(k,x),A=(i??new Map([...h.db.getActors().values()].map((y,P)=>[y.name,P]))).get(I)??0;if(Rt.has(o))S.style("stroke",ct(_,A)),S.style("fill",ct(p,A)??g)},"drawActivation"),Wr=t(async function(r,e,s,a,n){let{boxMargin:h,boxTextMargin:i,labelBoxHeight:o,labelBoxWidth:f,messageFontFamily:p,messageFontSize:_,messageFontWeight:g}=a,x=r.append("g").attr("data-et","control-structure").attr("data-id","i"+n.id),k=t(function(T,A,y,P){return x.append("line").attr("x1",T).attr("y1",A).attr("x2",y).attr("y2",P).attr("class","loopLine")},"drawLoopLine");if(k(e.startx,e.starty,e.stopx,e.starty),k(e.stopx,e.starty,e.stopx,e.stopy),k(e.startx,e.stopy,e.stopx,e.stopy),k(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0)e.sections.forEach(function(T){k(e.startx,T.y,e.stopx,T.y).style("stroke-dasharray","3, 3")});let I=rm();I.text=s,I.x=e.startx,I.y=e.starty,I.fontFamily=p,I.fontSize=_,I.fontWeight=g,I.anchor="middle",I.valign="middle",I.tspan=!1,I.width=Math.max(f??0,50),I.height=o+(a.look==="neo"?15:0)||20,I.textMargin=i,I.class="labelText",Ze(x,I),I=tr(),I.text=e.title,I.x=e.startx+f/2+(e.stopx-e.startx)/2,I.y=e.starty+h+i,I.anchor="middle",I.valign="middle",I.textMargin=i,I.class="loopText",I.fontFamily=p,I.fontSize=_,I.fontWeight=g,I.wrap=!0;let S=Lt(I.text)?await $t(x,I,e):Yt(x,I);if(e.sectionTitles!==void 0){for(let[T,A]of Object.entries(e.sectionTitles))if(A.message){if(I.text=A.message,I.x=e.startx+(e.stopx-e.startx)/2,I.y=e.sections[T].y+h+i,I.class="sectionTitle",I.anchor="middle",I.valign="middle",I.tspan=!1,I.fontFamily=p,I.fontSize=_,I.fontWeight=g,I.wrap=e.wrap,Lt(I.text))e.starty=e.sections[T].y,await $t(x,I,e);else Yt(x,I);let y=Math.round(S.map((P)=>(P._groups||P)[0][0].getBBox().height).reduce((P,v)=>P+v));e.sections[T].height+=y-(h+i)}}return e.height=Math.round(e.stopy-e.starty),x},"drawLoop"),je=t(function(r,e){bd(r,e)},"drawBackgroundRect"),Kr=t(function(r,e){r.append("defs").append("symbol").attr("id",e+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),Hr=t(function(r,e){r.append("defs").append("symbol").attr("id",e+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),Fr=t(function(r,e){r.append("defs").append("symbol").attr("id",e+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),qr=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),zr=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-filled-head").attr("refX",15.5).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")},"insertArrowFilledHead"),Ur=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),Gr=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),kt=t((r)=>r?`${r}-drop-shadow`:"drop-shadow","dropShadowId"),Xr=t(function(r,e,s){let{theme:a}=e;r.append("defs").append("filter").attr("id",kt(s)).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a==="redux"||a==="redux-color"?"#000000":"#FFFFFF"}`)},"insertDropShadow"),tr=t(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),Qr=t(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Ot=function(){function r(h,i,o,f,p,_,g){let x=i.append("text").attr("x",o+p/2).attr("y",f+_/2+5).style("text-anchor","middle").text(h);n(x,g)}t(r,"byText");function e(h,i,o,f,p,_,g,x){let{actorFontSize:k,actorFontFamily:I,actorFontWeight:S}=x,[T,A]=jn(k),y=h.split(w.lineBreakRegex);for(let P=0;P<y.length;P++){let v=P*T-T*(y.length-1)/2,N=i.append("text").attr("x",o+p/2).attr("y",f).style("text-anchor","middle").style("font-size",A).style("font-weight",S).style("font-family",I);N.append("tspan").attr("x",o+p/2).attr("dy",v).text(y[P]),N.attr("y",f+_/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(N,g)}}t(e,"byTspan");function s(h,i,o,f,p,_,g,x){let k=i.append("switch"),S=k.append("foreignObject").attr("x",o).attr("y",f).attr("width",p).attr("height",_).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");S.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(h),e(h,k,o,f,p,_,g,x),n(S,g)}t(s,"byFo");async function a(h,i,o,f,p,_,g,x){let k=await yc(h,E()),I=i.append("switch"),T=I.append("foreignObject").attr("x",o+p/2-k.width/2).attr("y",f+_/2-k.height/2).attr("width",k.width).attr("height",k.height).append("xhtml:div").style("height","100%").style("width","100%");T.append("div").style("text-align","center").style("vertical-align","middle").html(await vc(h,E())),e(h,I,o,f,p,_,g,x),n(T,g)}t(a,"byKatex");function n(h,i){for(let o in i)if(i.hasOwnProperty(o))h.attr(o,i[o])}return t(n,"_setTextAttrs"),function(h,i=!1){if(i)return a;return h.textPlacement==="fo"?s:h.textPlacement==="old"?r:e}}(),Jr=function(){function r(n,h,i,o,f,p,_){let g=h.append("text").attr("x",i).attr("y",o).style("text-anchor","start").text(n);a(g,_)}t(r,"byText");function e(n,h,i,o,f,p,_,g){let{actorFontSize:x,actorFontFamily:k,actorFontWeight:I}=g,S=n.split(w.lineBreakRegex);for(let T=0;T<S.length;T++){let A=T*x-x*(S.length-1)/2,y=h.append("text").attr("x",i).attr("y",o).style("text-anchor","start").style("font-size",x).style("font-weight",I).style("font-family",k);y.append("tspan").attr("x",i).attr("dy",A).text(S[T]),y.attr("y",o+p/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),a(y,_)}}t(e,"byTspan");function s(n,h,i,o,f,p,_,g){let x=h.append("switch"),I=x.append("foreignObject").attr("x",i).attr("y",o).attr("width",f).attr("height",p).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");I.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,x,i,o,f,p,_,g),a(I,_)}t(s,"byFo");function a(n,h){for(let i in h)if(h.hasOwnProperty(i))n.attr(i,h[i])}return t(a,"_setTextAttrs"),function(n){return n.textPlacement==="fo"?s:n.textPlacement==="old"?r:e}}(),Zr=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-solidTopArrowHead").attr("refX",7.9).attr("refY",7.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 8 L 0 8 z")},"insertSolidTopArrowHead"),$r=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-solidBottomArrowHead").attr("refX",7.9).attr("refY",0.75).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 0 L 0 8 z")},"insertSolidBottomArrowHead"),jr=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-stickTopArrowHead").attr("refX",7.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 7 7").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickTopArrowHead"),ta=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-stickBottomArrowHead").attr("refX",7.5).attr("refY",0).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 7 L 7 0").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickBottomArrowHead"),st={drawRect:Ht,drawText:Yt,drawLabel:Ze,drawActor:Mr,drawBox:Br,drawPopup:mr,anchorElement:Yr,drawActivation:Vr,drawLoop:Wr,drawBackgroundRect:je,insertArrowHead:qr,insertArrowFilledHead:zr,insertSequenceNumber:Ur,insertArrowCrossHead:Gr,insertDatabaseIcon:Kr,insertComputerIcon:Hr,insertClockIcon:Fr,getTextObj:tr,getNoteRect:Qr,fixLifeLineHeights:$e,sanitizeUrl:_e.sanitizeUrl,insertDropShadow:Xr,insertSolidTopArrowHead:Zr,insertSolidBottomArrowHead:$r,insertStickTopArrowHead:jr,insertStickBottomArrowHead:ta},d={},L={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:t(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map((r)=>r.height||0))+(this.loops.length===0?0:this.loops.map((r)=>r.height||0).reduce((r,e)=>r+e))+(this.messages.length===0?0:this.messages.map((r)=>r.height||0).reduce((r,e)=>r+e))+(this.notes.length===0?0:this.notes.map((r)=>r.height||0).reduce((r,e)=>r+e))},"getHeight"),clear:t(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:t(function(r){this.boxes.push(r)},"addBox"),addActor:t(function(r){this.actors.push(r)},"addActor"),addLoop:t(function(r){this.loops.push(r)},"addLoop"),addMessage:t(function(r){this.messages.push(r)},"addMessage"),addNote:t(function(r){this.notes.push(r)},"addNote"),lastActor:t(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:t(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:t(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:t(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:t(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,ar(m())},"init"),updateVal:t(function(r,e,s,a){if(r[e]===void 0)r[e]=s;else r[e]=a(s,r[e])},"updateVal"),updateBounds:t(function(r,e,s,a){let n=this,h=0;function i(o){return t(function(p){h++;let _=n.sequenceItems.length-h+1;if(n.updateVal(p,"starty",e-_*d.boxMargin,Math.min),n.updateVal(p,"stopy",a+_*d.boxMargin,Math.max),n.updateVal(L.data,"startx",r-_*d.boxMargin,Math.min),n.updateVal(L.data,"stopx",s+_*d.boxMargin,Math.max),o!=="activation")n.updateVal(p,"startx",r-_*d.boxMargin,Math.min),n.updateVal(p,"stopx",s+_*d.boxMargin,Math.max),n.updateVal(L.data,"starty",e-_*d.boxMargin,Math.min),n.updateVal(L.data,"stopy",a+_*d.boxMargin,Math.max)},"updateItemBounds")}t(i,"updateFn"),this.sequenceItems.forEach(i()),this.activations.forEach(i("activation"))},"updateBounds"),insert:t(function(r,e,s,a){let n=w.getMin(r,s),h=w.getMax(r,s),i=w.getMin(e,a),o=w.getMax(e,a);this.updateVal(L.data,"startx",n,Math.min),this.updateVal(L.data,"starty",i,Math.min),this.updateVal(L.data,"stopx",h,Math.max),this.updateVal(L.data,"stopy",o,Math.max),this.updateBounds(n,i,h,o)},"insert"),newActivation:t(function(r,e,s){let a=s.get(r.from),n=ae(r.from).length||0,h=a.x+a.width/2+(n-1)*d.activationWidth/2;this.activations.push({startx:h,starty:this.verticalPos+2,stopx:h+d.activationWidth,stopy:void 0,actor:r.from,anchored:st.anchorElement(e)})},"newActivation"),endActivation:t(function(r){let e=this.activations.map(function(s){return s.actor}).lastIndexOf(r.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:t(function(r={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:r.message,wrap:r.wrap,width:r.width,height:0,fill:e}},"createLoop"),newLoop:t(function(r={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(r,e))},"newLoop"),endLoop:t(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:t(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:t(function(r){let e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:L.getVerticalPos(),height:0}),e.sectionTitles.push(r),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:t(function(){if(this.isLoopOverlap())this.savedVerticalPos=this.verticalPos},"saveVerticalPos"),resetVerticalPos:t(function(){if(this.isLoopOverlap())this.verticalPos=this.savedVerticalPos},"resetVerticalPos"),bumpVerticalPos:t(function(r){this.verticalPos=this.verticalPos+r,this.data.stopy=w.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:t(function(){return this.verticalPos},"getVerticalPos"),getBounds:t(function(){return{bounds:this.data,models:this.models}},"getBounds")},ea=t(async function(r,e,s){L.bumpVerticalPos(d.boxMargin),e.height=d.boxMargin,e.starty=L.getVerticalPos();let a=Ar();a.x=e.startx,a.y=e.starty,a.width=e.width||d.width,a.class="note";let n=r.append("g");n.attr("data-et","note"),n.attr("data-id","i"+s);let h=st.drawRect(n,a),i=rm();i.x=e.startx,i.y=e.starty,i.width=a.width,i.dy="1em",i.text=e.message,i.class="noteText",i.fontFamily=d.noteFontFamily,i.fontSize=d.noteFontSize,i.fontWeight=d.noteFontWeight,i.anchor=d.noteAlign,i.textMargin=d.noteMargin,i.valign="center";let o=Lt(i.text)?await $t(n,i):Yt(n,i),f=Math.round(o.map((p)=>(p._groups||p)[0][0].getBBox().height).reduce((p,_)=>p+_));h.attr("height",f+2*d.noteMargin),e.height+=f+2*d.noteMargin,L.bumpVerticalPos(f+2*d.noteMargin),e.stopy=e.starty+f+2*d.noteMargin,e.stopx=e.startx+a.width,L.insert(e.startx,e.starty,e.stopx,e.stopy),L.models.addNote(e)},"drawNote"),Ge=t(function(r,e,s,a,n,h,i){let o=a.db.getActors(),f=o.get(e.from),p=o.get(e.to),_=s.sequenceVisible,g=f.x+f.width/2,x=p.x+p.width/2,k=g<=x,I=or(e,a),S=r.append("g"),T=16.5,A=t((M,B)=>{let X=M?T:-T;return B?-X:X},"getCircleOffset"),y=t((M)=>{S.append("circle").attr("cx",M).attr("cy",i).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:P,CENTRAL_CONNECTION_REVERSE:v,CENTRAL_CONNECTION_DUAL:N}=a.db.LINETYPE;if(_)switch(e.centralConnection){case P:if(I)x+=A(k,!0);break;case v:if(!I)g+=A(k,!1);break;case N:if(I)x+=A(k,!0);else g+=A(k,!1);break}switch(e.centralConnection){case P:y(x);break;case v:y(g);break;case N:y(g),y(x);break}},"drawCentralConnection"),vt=t((r)=>({fontFamily:r.messageFontFamily,fontSize:r.messageFontSize,fontWeight:r.messageFontWeight}),"messageFont"),Bt=t((r)=>({fontFamily:r.noteFontFamily,fontSize:r.noteFontSize,fontWeight:r.noteFontWeight}),"noteFont"),ue=t((r)=>({fontFamily:r.actorFontFamily,fontSize:r.actorFontSize,fontWeight:r.actorFontWeight}),"actorFont");async function er(r,e){L.bumpVerticalPos(10);let{startx:s,stopx:a,message:n}=e,h=w.splitBreaks(n).length,i=Lt(n),o=i?await yc(n,m()):V.calculateTextDimensions(n,vt(d));if(!i){let g=o.height/h;e.height+=g,L.bumpVerticalPos(g)}let f,p=o.height-10,_=o.width;if(s===a){if(f=L.getVerticalPos()+p,!d.rightAngles)p+=d.boxMargin,f=L.getVerticalPos()+p;p+=30;let g=w.getMax(_/2,d.width/2);L.insert(s-g,L.getVerticalPos()-10+p,a+g,L.getVerticalPos()+30+p)}else p+=d.boxMargin,f=L.getVerticalPos()+p,L.insert(s,f-10,a,f);return L.bumpVerticalPos(p),e.height+=p,e.stopy=e.starty+e.height,L.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),f}t(er,"boundMessage");var ra=t(async function(r,e,s,a,n,h){let{startx:i,stopx:o,starty:f,message:p,type:_,sequenceIndex:g,sequenceVisible:x}=e,k=V.calculateTextDimensions(p,vt(d)),I=rm();if(I.x=Math.min(i,o),I.y=f+10,I.width=Math.abs(o-i),I.class="messageText",I.dy="1em",I.text=p,I.fontFamily=d.messageFontFamily,I.fontSize=d.messageFontSize,I.fontWeight=d.messageFontWeight,I.anchor=d.messageAlign,I.valign="center",I.textMargin=d.wrapPadding,I.tspan=!1,Lt(I.text))await $t(r,I,{startx:i,stopx:o,starty:s});else Yt(r,I);let S=k.width,T;if(i===o){let y=x||d.showSequenceNumbers,P=or(n,a),v=ha(n,a),N=i+(y&&(P||v)?10:0);if(d.rightAngles)T=r.append("path").attr("d",`M ${N},${s} H ${i+w.getMax(d.width/2,S/2)} V ${s+25} H ${i}`);else T=r.append("path").attr("d","M "+N+","+s+" C "+(N+60)+","+(s-10)+" "+(i+60)+","+(s+30)+" "+i+","+(s+20));if(pe(n,a))Ge(r,n,e,a,i,o,s)}else if(T=r.append("line"),T.attr("x1",i),T.attr("y1",s),T.attr("x2",o),T.attr("y2",s),pe(n,a))Ge(r,n,e,a,i,o,s);if(_===a.db.LINETYPE.DOTTED||_===a.db.LINETYPE.DOTTED_CROSS||_===a.db.LINETYPE.DOTTED_POINT||_===a.db.LINETYPE.DOTTED_OPEN||_===a.db.LINETYPE.BIDIRECTIONAL_DOTTED||_===a.db.LINETYPE.SOLID_TOP_DOTTED||_===a.db.LINETYPE.SOLID_BOTTOM_DOTTED||_===a.db.LINETYPE.STICK_TOP_DOTTED||_===a.db.LINETYPE.STICK_BOTTOM_DOTTED||_===a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||_===a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||_===a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||_===a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)T.style("stroke-dasharray","3, 3"),T.attr("class","messageLine1");else T.attr("class","messageLine0");T.attr("data-et","message"),T.attr("data-id","i"+e.id),T.attr("data-from",e.from),T.attr("data-to",e.to);let A="";if(d.arrowMarkerAbsolute)A=Jg(!0);if(T.attr("stroke-width",2),T.attr("stroke","none"),T.style("fill","none"),_===a.db.LINETYPE.SOLID_TOP||_===a.db.LINETYPE.SOLID_TOP_DOTTED)T.attr("marker-end","url("+A+"#"+h+"-solidTopArrowHead)");if(_===a.db.LINETYPE.SOLID_BOTTOM||_===a.db.LINETYPE.SOLID_BOTTOM_DOTTED)T.attr("marker-end","url("+A+"#"+h+"-solidBottomArrowHead)");if(_===a.db.LINETYPE.STICK_TOP||_===a.db.LINETYPE.STICK_TOP_DOTTED)T.attr("marker-end","url("+A+"#"+h+"-stickTopArrowHead)");if(_===a.db.LINETYPE.STICK_BOTTOM||_===a.db.LINETYPE.STICK_BOTTOM_DOTTED)T.attr("marker-end","url("+A+"#"+h+"-stickBottomArrowHead)");if(_===a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||_===a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)T.attr("marker-start","url("+A+"#"+h+"-solidBottomArrowHead)");if(_===a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||_===a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)T.attr("marker-start","url("+A+"#"+h+"-solidTopArrowHead)");if(_===a.db.LINETYPE.STICK_ARROW_TOP_REVERSE||_===a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)T.attr("marker-start","url("+A+"#"+h+"-stickBottomArrowHead)");if(_===a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||_===a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)T.attr("marker-start","url("+A+"#"+h+"-stickTopArrowHead)");if(_===a.db.LINETYPE.SOLID||_===a.db.LINETYPE.DOTTED)T.attr("marker-end","url("+A+"#"+h+"-arrowhead)");if(_===a.db.LINETYPE.BIDIRECTIONAL_SOLID||_===a.db.LINETYPE.BIDIRECTIONAL_DOTTED)T.attr("marker-start","url("+A+"#"+h+"-arrowhead)"),T.attr("marker-end","url("+A+"#"+h+"-arrowhead)");if(_===a.db.LINETYPE.SOLID_POINT||_===a.db.LINETYPE.DOTTED_POINT)T.attr("marker-end","url("+A+"#"+h+"-filled-head)");if(_===a.db.LINETYPE.SOLID_CROSS||_===a.db.LINETYPE.DOTTED_CROSS)T.attr("marker-end","url("+A+"#"+h+"-crosshead)");if(x||d.showSequenceNumbers){let y=_===a.db.LINETYPE.BIDIRECTIONAL_SOLID||_===a.db.LINETYPE.BIDIRECTIONAL_DOTTED,P=_===a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||_===a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||_===a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||_===a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||_===a.db.LINETYPE.STICK_ARROW_TOP_REVERSE||_===a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||_===a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||_===a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,v=6,N=pe(n,a),M=i,B=o;if(y){if(i<o)M=i+12;else M=i-6+(N?-5:0),M+=n?.centralConnection===a.db.LINETYPE.CENTRAL_CONNECTION_DUAL||n?.centralConnection===a.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0;T.attr("x1",M)}else if(P){if(o>i)B=o-12;else B=o-6,M+=n?.centralConnection===a.db.LINETYPE.CENTRAL_CONNECTION_DUAL||n?.centralConnection===a.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0;B+=N?15:0,T.attr("x2",B),T.attr("x1",M)}else T.attr("x1",i+6);let X=0,J=i===o,tt=i<=o;if(J)X=e.fromBounds+1;else if(P)X=tt?e.toBounds-1:e.fromBounds+1;else X=tt?e.fromBounds+1:e.toBounds-1;let it="12px",ot=g.toString().length;if(ot>5)it="7px";else if(ot>3)it="9px";r.append("line").attr("x1",X).attr("y1",s).attr("x2",X).attr("y2",s).attr("stroke-width",0).attr("marker-start","url("+A+"#"+h+"-sequencenumber)"),r.append("text").attr("x",X).attr("y",s+4).attr("font-family","sans-serif").attr("font-size",it).attr("text-anchor","middle").attr("class","sequenceNumber").text(g)}},"drawMessage"),aa=t(function(r,e,s,a,n,h,i){let o=0,f=0,p=void 0,_=0;for(let g of a){let x=e.get(g),k=x.box;if(p&&p!=k){if(!i)L.models.addBox(p);f+=d.boxMargin+p.margin}if(k&&k!=p){if(!i)k.x=o+f,k.y=n;f+=k.margin}if(x.width=w.getMax(x.width||d.width,d.width),x.height=w.getMax(x.height||d.height,d.height),x.margin=x.margin||d.actorMargin,_=w.getMax(_,x.height),s.get(x.name))f+=x.width/2;if(x.x=o+f,x.starty=L.getVerticalPos(),L.insert(x.x,n,x.x+x.width,x.height),o+=x.width+f,x.box)x.box.width=o+k.margin-x.box.x;f=x.margin,p=x.box,L.models.addActor(x)}if(p&&!i)L.models.addBox(p);L.bumpVerticalPos(_)},"addActorRenderingData"),fe=t(async function(r,e,s,a,n,h,i){if(!a)for(let o of s){let f=e.get(o);await st.drawActor(r,f,d,!1,n,h,i)}else{let o=0;L.bumpVerticalPos(d.boxMargin*2);for(let f of s){let p=e.get(f);if(!p.stopy)p.stopy=L.getVerticalPos();let _=await st.drawActor(r,p,d,!0,n,h,i);o=w.getMax(o,_)}L.bumpVerticalPos(o+d.boxMargin)}},"drawActors"),rr=t(function(r,e,s,a){let n=0,h=0;for(let i of s){let o=e.get(i),f=ia(o),p=st.drawPopup(r,o,f,d,d.forceMenus,a);if(p.height>n)n=p.height;if(p.width+o.x>h)h=p.width+o.x}return{maxHeight:n,maxWidth:h}},"drawActorsPopup"),ar=t(function(r){if(lt(d,r),r.fontFamily)d.actorFontFamily=d.noteFontFamily=d.messageFontFamily=r.fontFamily;if(r.fontSize)d.actorFontSize=d.noteFontSize=d.messageFontSize=r.fontSize;if(r.fontWeight)d.actorFontWeight=d.noteFontWeight=d.messageFontWeight=r.fontWeight},"setConf"),ae=t(function(r){return L.activations.filter(function(e){return e.actor===r})},"actorActivations"),Xe=t(function(r,e){let s=e.get(r),a=ae(r),n=a.reduce(function(i,o){return w.getMin(i,o.startx)},s.x+s.width/2-1),h=a.reduce(function(i,o){return w.getMax(i,o.stopx)},s.x+s.width/2+1);return[n,h]},"activationBounds");function It(r,e,s,a,n){L.bumpVerticalPos(s);let h=a;if(e.id&&e.message&&r[e.id]){let i=r[e.id].width,o=vt(d);e.message=V.wrapLabel(`[${e.message}]`,i-2*d.wrapPadding,o),e.width=i,e.wrap=!0;let f=V.calculateTextDimensions(e.message,o),p=w.getMax(f.height,d.labelBoxHeight);h=a+p,l.debug(`${p} - ${e.message}`)}n(e),L.bumpVerticalPos(h)}t(It,"adjustLoopHeightForWrap");function sr(r,e,s,a,n,h,i){function o(_,g){if(_.x<n.get(r.from).x)L.insert(e.stopx-g,e.starty,e.startx,e.stopy+_.height/2+d.noteMargin),e.stopx=e.stopx+g;else L.insert(e.startx,e.starty,e.stopx+g,e.stopy+_.height/2+d.noteMargin),e.stopx=e.stopx-g}t(o,"receiverAdjustment");function f(_,g){if(_.x<n.get(r.to).x)L.insert(e.startx-g,e.starty,e.stopx,e.stopy+_.height/2+d.noteMargin),e.startx=e.startx+g;else L.insert(e.stopx,e.starty,e.startx+g,e.stopy+_.height/2+d.noteMargin),e.startx=e.startx-g}t(f,"senderAdjustment");let p=[Jt.ACTOR,Jt.CONTROL,Jt.ENTITY,Jt.DATABASE];if(h.get(r.to)==a){let _=n.get(r.to),g=p.includes(_.type)?Pt/2+3:_.width/2+3;o(_,g),_.starty=s-_.height/2,L.bumpVerticalPos(_.height/2)}else if(i.get(r.from)==a){let _=n.get(r.from);if(d.mirrorActors){let g=p.includes(_.type)?Pt/2:_.width/2;f(_,g)}_.stopy=s-_.height/2,L.bumpVerticalPos(_.height/2)}else if(i.get(r.to)==a){let _=n.get(r.to);if(d.mirrorActors){let g=p.includes(_.type)?Pt/2+3:_.width/2+3;o(_,g)}_.stopy=s-_.height/2,L.bumpVerticalPos(_.height/2)}}t(sr,"adjustCreatedDestroyedData");var sa=t(async function(r,e,s,a){let{securityLevel:n,sequence:h,look:i,themeVariables:o}=m();d=h;let f;if(n==="sandbox")f=b("#i"+e);let p=n==="sandbox"?b(f.nodes()[0].contentDocument.body):b("body"),_=n==="sandbox"?f.nodes()[0].contentDocument:document;L.init(),l.debug(a.db);let g=n==="sandbox"?p.select(`[id="${e}"]`):b(`[id="${e}"]`),x=a.db.getActors(),k=a.db.getCreatedActors(),I=a.db.getDestroyedActors(),S=a.db.getBoxes(),T=a.db.getActorKeys(),A=a.db.getMessages(),y=a.db.getDiagramTitle(),P=a.db.hasAtLeastOneBox(),v=a.db.hasAtLeastOneBoxWithTitle(),N=await ir(x,A,a);if(d.height=await nr(x,N,S),st.insertComputerIcon(g,e),st.insertDatabaseIcon(g,e),st.insertClockIcon(g,e),P){if(L.bumpVerticalPos(d.boxMargin),v)L.bumpVerticalPos(S[0].textMaxHeight)}if(d.hideUnusedParticipants===!0){let D=new Set;A.forEach((W)=>{D.add(W.from),D.add(W.to)}),T=T.filter((W)=>D.has(W))}let M=new Map(T.map((D,W)=>[x.get(D)?.name??D,W]));aa(g,x,k,T,0,A,!1);let B=await Ta(A,x,N,a);if(st.insertArrowHead(g,e),st.insertArrowCrossHead(g,e),st.insertArrowFilledHead(g,e),st.insertSequenceNumber(g,e),st.insertSolidTopArrowHead(g,e),st.insertSolidBottomArrowHead(g,e),st.insertStickTopArrowHead(g,e),st.insertStickBottomArrowHead(g,e),i==="neo")st.insertDropShadow(g,d,e);function X(D,W){let bt=L.endActivation(D);if(bt.starty+18>W)bt.starty=W-6,W+=12;st.drawActivation(g,bt,W,d,ae(D.from).length,a,M),L.insert(bt.startx,W-10,bt.stopx,W)}t(X,"activeEnd");let J=1,tt=1,it=[],ot=[],Tt=0;for(let D of A){let W,bt,ut;switch(D.type){case a.db.LINETYPE.NOTE:L.resetVerticalPos(),bt=D.noteModel,await ea(g,bt,D.id);break;case a.db.LINETYPE.ACTIVE_START:L.newActivation(D,g,x);break;case a.db.LINETYPE.CENTRAL_CONNECTION:L.newActivation(D,g,x);break;case a.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:L.newActivation(D,g,x);break;case a.db.LINETYPE.ACTIVE_END:X(D,L.getVerticalPos());break;case a.db.LINETYPE.LOOP_START:It(B,D,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>L.newLoop(et));break;case a.db.LINETYPE.LOOP_END:W=L.endLoop(),await st.drawLoop(g,W,"loop",d,D),L.bumpVerticalPos(W.stopy-L.getVerticalPos()),L.models.addLoop(W);break;case a.db.LINETYPE.RECT_START:It(B,D,d.boxMargin,d.boxMargin,(et)=>{let Ct=et.message;if(!Ct)Ct=o?.rectBkgColor||o?.actorBkg||"rgba(128, 128, 128, 0.5)";L.newLoop(void 0,Ct)});break;case a.db.LINETYPE.RECT_END:W=L.endLoop(),ot.push(W),L.models.addLoop(W),L.bumpVerticalPos(W.stopy-L.getVerticalPos());break;case a.db.LINETYPE.OPT_START:It(B,D,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>L.newLoop(et));break;case a.db.LINETYPE.OPT_END:W=L.endLoop(),await st.drawLoop(g,W,"opt",d,D),L.bumpVerticalPos(W.stopy-L.getVerticalPos()),L.models.addLoop(W);break;case a.db.LINETYPE.ALT_START:It(B,D,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>L.newLoop(et));break;case a.db.LINETYPE.ALT_ELSE:It(B,D,d.boxMargin+d.boxTextMargin,d.boxMargin,(et)=>L.addSectionToLoop(et));break;case a.db.LINETYPE.ALT_END:W=L.endLoop(),await st.drawLoop(g,W,"alt",d,D),L.bumpVerticalPos(W.stopy-L.getVerticalPos()),L.models.addLoop(W);break;case a.db.LINETYPE.PAR_START:case a.db.LINETYPE.PAR_OVER_START:It(B,D,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>L.newLoop(et)),L.saveVerticalPos();break;case a.db.LINETYPE.PAR_AND:It(B,D,d.boxMargin+d.boxTextMargin,d.boxMargin,(et)=>L.addSectionToLoop(et));break;case a.db.LINETYPE.PAR_END:W=L.endLoop(),await st.drawLoop(g,W,"par",d,D),L.bumpVerticalPos(W.stopy-L.getVerticalPos()),L.models.addLoop(W);break;case a.db.LINETYPE.AUTONUMBER:if(J=D.message.start||J,tt=D.message.step||tt,D.message.visible)a.db.enableSequenceNumbers();else a.db.disableSequenceNumbers();break;case a.db.LINETYPE.CRITICAL_START:It(B,D,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>L.newLoop(et));break;case a.db.LINETYPE.CRITICAL_OPTION:It(B,D,d.boxMargin+d.boxTextMargin,d.boxMargin,(et)=>L.addSectionToLoop(et));break;case a.db.LINETYPE.CRITICAL_END:W=L.endLoop(),await st.drawLoop(g,W,"critical",d,D),L.bumpVerticalPos(W.stopy-L.getVerticalPos()),L.models.addLoop(W);break;case a.db.LINETYPE.BREAK_START:It(B,D,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>L.newLoop(et));break;case a.db.LINETYPE.BREAK_END:W=L.endLoop(),await st.drawLoop(g,W,"break",d,D),L.bumpVerticalPos(W.stopy-L.getVerticalPos()),L.models.addLoop(W);break;default:try{ut=D.msgModel,ut.starty=L.getVerticalPos(),ut.sequenceIndex=J,ut.sequenceVisible=a.db.showSequenceNumbers(),ut.id=D.id,ut.from=D.from,ut.to=D.to;let et=await er(g,ut);sr(D,ut,et,Tt,x,k,I),it.push({messageModel:ut,lineStartY:et,msg:D}),L.models.addMessage(ut)}catch(et){l.error("error while drawing message",et)}}if([a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,a.db.LINETYPE.SOLID_TOP,a.db.LINETYPE.SOLID_BOTTOM,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.SOLID_TOP_DOTTED,a.db.LINETYPE.SOLID_BOTTOM_DOTTED,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.DOTTED,a.db.LINETYPE.SOLID_CROSS,a.db.LINETYPE.DOTTED_CROSS,a.db.LINETYPE.SOLID_POINT,a.db.LINETYPE.DOTTED_POINT,a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(D.type))J=Math.round((J+tt)*100)/100;Tt++}l.debug("createdActors",k),l.debug("destroyedActors",I),await fe(g,x,T,!1,e,a,M);for(let D of it)await ra(g,D.messageModel,D.lineStartY,a,D.msg,e);if(d.mirrorActors)await fe(g,x,T,!0,e,a,M);ot.forEach((D)=>st.drawBackgroundRect(g,D)),$e(g,x,T,d);for(let D of L.models.boxes){D.height=L.getVerticalPos()-D.y,L.insert(D.x,D.y,D.x+D.width,D.height);let W=d.boxMargin*2;D.startx=D.x-W,D.starty=D.y-W*0.25,D.stopx=D.startx+D.width+2*W,D.stopy=D.starty+D.height+W*0.75,D.stroke="rgb(0,0,0, 0.5)",st.drawBox(g,D,d)}if(P)L.bumpVerticalPos(d.boxMargin);let pt=rr(g,x,T,_),{bounds:nt}=L.getBounds();if(nt.startx===void 0)nt.startx=0;if(nt.starty===void 0)nt.starty=0;if(nt.stopx===void 0)nt.stopx=0;if(nt.stopy===void 0)nt.stopy=0;let ft=nt.stopy-nt.starty;if(ft<pt.maxHeight)ft=pt.maxHeight;let Et=ft+2*d.diagramMarginY;if(d.mirrorActors)Et=Et-d.boxMargin+d.bottomMarginAdj;let Z=nt.stopx-nt.startx;if(Z<pt.maxWidth)Z=pt.maxWidth;let U=Z+2*d.diagramMarginX;if(y)g.append("text").text(y).attr("x",(nt.stopx-nt.startx)/2-2*d.diagramMarginX).attr("y",-25);ne(g,Et,U,d.useMaxWidth);let Vt=y?40:0,qt=x.size&&i==="neo"?30:0;g.attr("viewBox",nt.startx-d.diagramMarginX+" -"+(d.diagramMarginY+Vt)+" "+U+" "+(Et+Vt+qt)),l.debug("models:",L.models)},"draw");async function ir(r,e,s){let a={};for(let n of e)if(r.get(n.to)&&r.get(n.from)){let h=r.get(n.to);if(n.placement===s.db.PLACEMENT.LEFTOF&&!h.prevActor)continue;if(n.placement===s.db.PLACEMENT.RIGHTOF&&!h.nextActor)continue;let i=n.placement!==void 0,o=!i,f=i?Bt(d):vt(d),p=n.wrap?V.wrapLabel(n.message,d.width-2*d.wrapPadding,f):n.message,g=(Lt(p)?await yc(n.message,m()):V.calculateTextDimensions(p,f)).width+2*d.wrapPadding;if(o&&n.from===h.nextActor)a[n.to]=w.getMax(a[n.to]||0,g);else if(o&&n.from===h.prevActor)a[n.from]=w.getMax(a[n.from]||0,g);else if(o&&n.from===n.to)a[n.from]=w.getMax(a[n.from]||0,g/2),a[n.to]=w.getMax(a[n.to]||0,g/2);else if(n.placement===s.db.PLACEMENT.RIGHTOF)a[n.from]=w.getMax(a[n.from]||0,g);else if(n.placement===s.db.PLACEMENT.LEFTOF)a[h.prevActor]=w.getMax(a[h.prevActor]||0,g);else if(n.placement===s.db.PLACEMENT.OVER){if(h.prevActor)a[h.prevActor]=w.getMax(a[h.prevActor]||0,g/2);if(h.nextActor)a[n.from]=w.getMax(a[n.from]||0,g/2)}}return l.debug("maxMessageWidthPerActor:",a),a}t(ir,"getMaxMessageWidthPerActor");var ia=t(function(r){let e=0,s=ue(d);for(let a in r.links){let h=V.calculateTextDimensions(a,s).width+2*d.wrapPadding+2*d.boxMargin;if(e<h)e=h}return e},"getRequiredPopupWidth");async function nr(r,e,s){let a=0;for(let h of r.keys()){let i=r.get(h);if(i.wrap)i.description=V.wrapLabel(i.description,d.width-2*d.wrapPadding,ue(d));let o=Lt(i.description)?await yc(i.description,m()):V.calculateTextDimensions(i.description,ue(d));if(i.width=i.wrap?d.width:w.getMax(d.width,o.width+2*d.wrapPadding),m().look==="neo")i.actorTextHeight=o.height,i.height=w.getMax(Qe(o.height),d.height);else i.height=i.wrap?w.getMax(o.height,d.height):d.height;a=w.getMax(a,i.height)}for(let h in e){let i=r.get(h);if(!i)continue;let o=r.get(i.nextActor);if(!o){let g=e[h]+d.actorMargin-i.width/2;i.margin=w.getMax(g,d.actorMargin);continue}let p=e[h]+d.actorMargin-i.width/2-o.width/2;i.margin=w.getMax(p,d.actorMargin)}let n=0;return s.forEach((h)=>{let i=vt(d),o=h.actorKeys.reduce((g,x)=>g+=r.get(x).width+(r.get(x).margin||0),0),f=d.boxMargin*8;if(o+=f,o-=2*d.boxTextMargin,h.wrap)h.name=V.wrapLabel(h.name,o-2*d.wrapPadding,i);let p=V.calculateTextDimensions(h.name,i);n=w.getMax(p.height,n);let _=w.getMax(o,p.width+2*d.wrapPadding);if(h.margin=d.boxTextMargin,o<_){let g=(_-o)/2;h.margin+=g}}),s.forEach((h)=>h.textMaxHeight=n),w.getMax(a,d.height)}t(nr,"calculateActorMargins");var na=t(async function(r,e,s){let a=e.get(r.from),n=e.get(r.to),h=a.x,i=n.x,o=r.wrap&&r.message,f=Lt(r.message)?await yc(r.message,m()):V.calculateTextDimensions(o?V.wrapLabel(r.message,d.width,Bt(d)):r.message,Bt(d)),p={width:o?d.width:w.getMax(d.width,f.width+2*d.noteMargin),height:0,startx:a.x,stopx:0,starty:0,stopy:0,message:r.message};if(r.placement===s.db.PLACEMENT.RIGHTOF)p.width=o?w.getMax(d.width,f.width):w.getMax(a.width/2+n.width/2,f.width+2*d.noteMargin),p.startx=h+(a.width+d.actorMargin)/2;else if(r.placement===s.db.PLACEMENT.LEFTOF)p.width=o?w.getMax(d.width,f.width+2*d.noteMargin):w.getMax(a.width/2+n.width/2,f.width+2*d.noteMargin),p.startx=h-p.width+(a.width-d.actorMargin)/2;else if(r.to===r.from)f=V.calculateTextDimensions(o?V.wrapLabel(r.message,w.getMax(d.width,a.width),Bt(d)):r.message,Bt(d)),p.width=o?w.getMax(d.width,a.width):w.getMax(a.width,d.width,f.width+2*d.noteMargin),p.startx=h+(a.width-p.width)/2;else p.width=Math.abs(h+a.width/2-(i+n.width/2))+d.actorMargin,p.startx=h<i?h+a.width/2-d.actorMargin/2:i+n.width/2-d.actorMargin/2;if(o)p.message=V.wrapLabel(r.message,p.width-2*d.wrapPadding,Bt(d));return l.debug(`NM:[${p.startx},${p.stopx},${p.starty},${p.stopy}:${p.width},${p.height}=${r.message}]`),p},"buildNoteModel"),oa=4,ca=6,pe=t(function(r,e){let{CENTRAL_CONNECTION:s,CENTRAL_CONNECTION_REVERSE:a,CENTRAL_CONNECTION_DUAL:n}=e.db.LINETYPE;return[s,a,n].includes(r.centralConnection)},"hasCentralConnection"),la=t(function(r,e,s){let{CENTRAL_CONNECTION_REVERSE:a,CENTRAL_CONNECTION_DUAL:n,BIDIRECTIONAL_SOLID:h,BIDIRECTIONAL_DOTTED:i}=e.db.LINETYPE,o=0;if(r.centralConnection===a||r.centralConnection===n)o+=oa;if((r.centralConnection===a||r.centralConnection===n)&&(r.type===h||r.type===i))o+=s?0:-ca;return o},"calculateCentralConnectionOffset"),or=t(function(r,e){let{SOLID_ARROW_TOP_REVERSE:s,SOLID_ARROW_TOP_REVERSE_DOTTED:a,SOLID_ARROW_BOTTOM_REVERSE:n,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:h,STICK_ARROW_TOP_REVERSE:i,STICK_ARROW_TOP_REVERSE_DOTTED:o,STICK_ARROW_BOTTOM_REVERSE:f,STICK_ARROW_BOTTOM_REVERSE_DOTTED:p}=e.db.LINETYPE;return[s,a,n,h,i,o,f,p].includes(r.type)},"isReverseArrowType"),ha=t(function(r,e){let{BIDIRECTIONAL_SOLID:s,BIDIRECTIONAL_DOTTED:a}=e.db.LINETYPE;return[s,a].includes(r.type)},"isBidirectionalArrowType"),da=t(function(r,e,s){let{look:a}=m();if(![s.db.LINETYPE.SOLID_OPEN,s.db.LINETYPE.DOTTED_OPEN,s.db.LINETYPE.SOLID,s.db.LINETYPE.SOLID_TOP,s.db.LINETYPE.SOLID_BOTTOM,s.db.LINETYPE.STICK_TOP,s.db.LINETYPE.STICK_BOTTOM,s.db.LINETYPE.SOLID_TOP_DOTTED,s.db.LINETYPE.SOLID_BOTTOM_DOTTED,s.db.LINETYPE.STICK_TOP_DOTTED,s.db.LINETYPE.STICK_BOTTOM_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,s.db.LINETYPE.STICK_ARROW_TOP_REVERSE,s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.DOTTED,s.db.LINETYPE.SOLID_CROSS,s.db.LINETYPE.DOTTED_CROSS,s.db.LINETYPE.SOLID_POINT,s.db.LINETYPE.DOTTED_POINT,s.db.LINETYPE.BIDIRECTIONAL_SOLID,s.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(r.type))return{};let[n,h]=Xe(r.from,e),[i,o]=Xe(r.to,e),f=n<=i,p=f?h:n,_=f?i:o;if(a==="neo"){if(r.type!==s.db.LINETYPE.SOLID_OPEN)_+=f?-3:3;if(r.type===s.db.LINETYPE.BIDIRECTIONAL_SOLID||r.type===s.db.LINETYPE.BIDIRECTIONAL_DOTTED)p+=f?3:-3}p+=la(r,s,f);let g=Math.abs(i-o)>2,x=t((T)=>f?-T:T,"adjustValue");if(r.from===r.to)_=p;else{if(r.activate&&!g)_+=x(d.activationWidth/2-1);if(![s.db.LINETYPE.SOLID_OPEN,s.db.LINETYPE.DOTTED_OPEN,s.db.LINETYPE.STICK_TOP,s.db.LINETYPE.STICK_BOTTOM,s.db.LINETYPE.STICK_TOP_DOTTED,s.db.LINETYPE.STICK_BOTTOM_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.STICK_ARROW_TOP_REVERSE,s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,s.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(r.type))_+=x(3);if([s.db.LINETYPE.BIDIRECTIONAL_SOLID,s.db.LINETYPE.BIDIRECTIONAL_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(r.type))p-=x(3)}let k=[n,h,i,o],I=Math.abs(p-_);if(r.wrap&&r.message)r.message=V.wrapLabel(r.message,w.getMax(I+2*d.wrapPadding,d.width),vt(d));let S=V.calculateTextDimensions(r.message,vt(d));return{width:w.getMax(r.wrap?0:S.width+2*d.wrapPadding,I+2*d.wrapPadding,d.width),height:0,startx:p,stopx:_,starty:0,stopy:0,message:r.message,type:r.type,wrap:r.wrap,fromBounds:Math.min.apply(null,k),toBounds:Math.max.apply(null,k)}},"buildMessageModel"),Ta=t(async function(r,e,s,a){let n={},h=[],i,o,f;for(let p of r){switch(p.type){case a.db.LINETYPE.LOOP_START:case a.db.LINETYPE.ALT_START:case a.db.LINETYPE.OPT_START:case a.db.LINETYPE.PAR_START:case a.db.LINETYPE.PAR_OVER_START:case a.db.LINETYPE.CRITICAL_START:case a.db.LINETYPE.BREAK_START:h.push({id:p.id,msg:p.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case a.db.LINETYPE.ALT_ELSE:case a.db.LINETYPE.PAR_AND:case a.db.LINETYPE.CRITICAL_OPTION:if(p.message)i=h.pop(),n[i.id]=i,n[p.id]=i,h.push(i);break;case a.db.LINETYPE.LOOP_END:case a.db.LINETYPE.ALT_END:case a.db.LINETYPE.OPT_END:case a.db.LINETYPE.PAR_END:case a.db.LINETYPE.CRITICAL_END:case a.db.LINETYPE.BREAK_END:i=h.pop(),n[i.id]=i;break;case a.db.LINETYPE.ACTIVE_START:{let g=e.get(p.from?p.from:p.to.actor),x=ae(p.from?p.from:p.to.actor).length,k=g.x+g.width/2+(x-1)*d.activationWidth/2,I={startx:k,stopx:k+d.activationWidth,actor:p.from,enabled:!0};L.activations.push(I)}break;case a.db.LINETYPE.ACTIVE_END:{let g=L.activations.map((x)=>x.actor).lastIndexOf(p.from);L.activations.splice(g,1).splice(0,1)}break}if(p.placement!==void 0)o=await na(p,e,a),p.noteModel=o,h.forEach((g)=>{i=g,i.from=w.getMin(i.from,o.startx),i.to=w.getMax(i.to,o.startx+o.width),i.width=w.getMax(i.width,Math.abs(i.from-i.to))-d.labelBoxWidth});else if(f=da(p,e,a),p.msgModel=f,f.startx&&f.stopx&&h.length>0)h.forEach((g)=>{if(i=g,f.startx===f.stopx){let x=e.get(p.from),k=e.get(p.to);i.from=w.getMin(x.x-f.width/2,x.x-x.width/2,i.from),i.to=w.getMax(k.x+f.width/2,k.x+x.width/2,i.to),i.width=w.getMax(i.width,Math.abs(i.to-i.from))-d.labelBoxWidth}else i.from=w.getMin(f.startx,i.from),i.to=w.getMax(f.stopx,i.to),i.width=w.getMax(i.width,f.width)-d.labelBoxWidth})}return L.activations=[],l.debug("Loop type widths:",n),n},"calculateLoopBounds"),pa={bounds:L,drawActors:fe,drawActorsPopup:rr,setConf:ar,draw:sa},Ra={parser:Er,get db(){return new gr},renderer:pa,styles:Ir,init:t((r)=>{if(!r.sequence)r.sequence={};if(r.wrap)r.sequence.wrap=r.wrap,wa({sequence:{wrap:r.wrap}})},"init")};export{Ra as diagram};
|