@kong-ui-public/documentation 0.8.27-pr.2132.c7fba69a4.0 → 0.8.27
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/_basePickBy-DF_KwdVi-HVXnmpaQ.js +151 -0
- package/dist/_baseUniq-DefQzZRT-CTix3bMY.js +614 -0
- package/dist/arc-B4xWw-B6-BGnuysbe.js +83 -0
- package/dist/architecture-I3QFYML2-7TNhn42L-52ENK4nk.js +5 -0
- package/dist/architectureDiagram-UYN6MBPD-Bg70hFZ--BirbHF75.js +4592 -0
- package/dist/astro-Uf8_VxKJ-CZxoSljj.js +16 -0
- package/dist/blockDiagram-ZHA2E4KO-Ylh05M-x-AVJfewxx.js +2247 -0
- package/dist/c-DASdrs7p-DASdrs7p.js +6 -0
- package/dist/c4Diagram-6F5ED5ID-BA0B_CmS-WdUKqC7Z.js +1581 -0
- package/dist/channel-B5uWur4x-BHu9WG2d.js +5 -0
- package/dist/chunk-5HRBRIJM-B7MbirM8-YDLjZbXN.js +24 -0
- package/dist/chunk-7U56Z5CX-CfNu7Hr2-BQzILIp1.js +1213 -0
- package/dist/chunk-ASOPGD6M-CwvgmaRl-BZAjlsEd.js +64 -0
- package/dist/chunk-KFBOBJHC-BB675Bua-GRhe6aGs.js +15 -0
- package/dist/chunk-T2TOU4HS-BgV1wucS-5Sa82KgW.js +1301 -0
- package/dist/chunk-TMUBEWPD-C22TGOO0-Bl2u--DY.js +9 -0
- package/dist/classDiagram-LNE6IOMH-D5SiSVyM-BbV9LB8E.js +14 -0
- package/dist/classDiagram-v2-MQ7JQ4JX-D5SiSVyM-BbV9LB8E.js +14 -0
- package/dist/clone-CmU1hwye-Lu5-ol5h.js +8 -0
- package/dist/csharp-CYWRhZ2R-CYWRhZ2R.js +6 -0
- package/dist/css-D1aVdRIU-D1aVdRIU.js +6 -0
- package/dist/csv-DvCncUGQ-Tno401i9.js +6 -0
- package/dist/cytoscape.esm-DAyNQ0qu-B7WxGuVh.js +16110 -0
- package/dist/dagre-4EVJKHTY-DMTVcQfE-C1Tr0EYY.js +447 -0
- package/dist/diagram-QW4FP2JN-jc61JuWr-DOMFELfS.js +126 -0
- package/dist/diff-XmNrvgM1-XmNrvgM1.js +6 -0
- package/dist/docker-DWH2onkn-DWH2onkn.js +6 -0
- package/dist/documentation.es.js +7 -0
- package/dist/documentation.umd.js +2404 -0
- package/dist/erDiagram-6RL3IURR-1byskxwI-B-wzYh8R.js +937 -0
- package/dist/flowDiagram-7ASYPVHJ-B3phEI8o-CVXSVDmh.js +1484 -0
- package/dist/ganttDiagram-NTVNEXSI-vYnO_T5c-Ccxkb7aQ.js +2491 -0
- package/dist/git-commit-BspYIY3P-VkbIfR3L.js +8 -0
- package/dist/git-rebase--zLBTjUa-DEW2tfKx.js +8 -0
- package/dist/gitGraph-YCYPL57B-DPx67Iu5-BPrLSH0g.js +5 -0
- package/dist/gitGraphDiagram-NRZ2UAAF-BHxB7Gjs-CeRxz6oW.js +712 -0
- package/dist/go-BErP6iv1-BErP6iv1.js +6 -0
- package/dist/graph-_eClejaU-DigE4Bf5.js +247 -0
- package/dist/graphql-DWpQF4JI-C-3VJmtp.js +14 -0
- package/dist/haml-CMN0hQaL-BV5BsZTy.js +10 -0
- package/dist/handlebars-Cc-7fXX5-B9YgDKzT.js +14 -0
- package/dist/haskell-CtlGos0K-CtlGos0K.js +6 -0
- package/dist/html-B0P_v3yU-BojM9zZg.js +10 -0
- package/dist/html-derivative-BJFFAxYV-iD6NAoKm.js +8 -0
- package/dist/http-Dcjm_K1m-1LFSbOE1.js +14 -0
- package/dist/index-B_RqyDIa.js +37033 -0
- package/dist/info-46DW6VJ7-DeIQKKyY-CVPexu5P.js +5 -0
- package/dist/infoDiagram-A4XQUW5V-Cx0WE_JZ-B_t8JIcX.js +22 -0
- package/dist/ini-BUcvsX-U-BUcvsX-U.js +6 -0
- package/dist/init-DjUOC4st-C8Nwz6AJ.js +16 -0
- package/dist/java-B7odJ7Ap-B7odJ7Ap.js +6 -0
- package/dist/javascript-fa8UlHZE-fa8UlHZE.js +6 -0
- package/dist/journeyDiagram-G5WM74LC-CUWL5R5G-DWlpHybW.js +810 -0
- package/dist/json-71t8ZF9g-71t8ZF9g.js +6 -0
- package/dist/json5-Z7F6rA6a-Z7F6rA6a.js +6 -0
- package/dist/jsonc-Dphhs4m2-Dphhs4m2.js +6 -0
- package/dist/jsonl-D9jj92Gg-D9jj92Gg.js +6 -0
- package/dist/jsx-Bkesy5tT-Bkesy5tT.js +6 -0
- package/dist/kanban-definition-QRCXZQQD-r5CdvT2h-BUkOeUnm.js +718 -0
- package/dist/katex-Qk2jHgyB-CF_fuFJb.js +11637 -0
- package/dist/kotlin-DCgZY7Ii-DCgZY7Ii.js +6 -0
- package/dist/latex-CZXk8SiZ-DbjDPp_f.js +11 -0
- package/dist/layout-DfjmtgNY-Bw6LFOXt.js +1321 -0
- package/dist/less-DQA4v-Nm-DQA4v-Nm.js +6 -0
- package/dist/linear-BGmbGdcc-C--Nxp9Q.js +423 -0
- package/dist/liquid-CvufO3kO-D90bBAdm.js +14 -0
- package/dist/lua-BVfhNLDr-DAa90qLN.js +8 -0
- package/dist/make-BjuHP00g-BjuHP00g.js +6 -0
- package/dist/markdown-B6guhLWd-B6guhLWd.js +6 -0
- package/dist/material-theme-lighter-BUBw43Yz-BUBw43Yz.js +4 -0
- package/dist/material-theme-palenight-C1RVm8K1-C1RVm8K1.js +4 -0
- package/dist/mdc-Bq810vct-Dr8CpN8f.js +12 -0
- package/dist/mdx-DIoECIFU-DIoECIFU.js +6 -0
- package/dist/mermaid-BZ7WHNIe-BZ7WHNIe.js +6 -0
- package/dist/mermaid-parser.core-DxgZuQQq-uP-grJig.js +12400 -0
- package/dist/mindmap-definition-GWI6TPTV-DX5GL05M-B8Eu6UCe.js +3219 -0
- package/dist/nginx-Can2eAjw-DKMoypYC.js +8 -0
- package/dist/objective-c-BGg9R27G-BGg9R27G.js +6 -0
- package/dist/ordinal-DfAQgscy-BEJTu10r.js +61 -0
- package/dist/packet-W2GHVCYJ-CI_-E3C--D1lo2o0i.js +5 -0
- package/dist/pascal-l2bqd7Dz-l2bqd7Dz.js +6 -0
- package/dist/perl-DaMQyPwp-Cxx4wmV7.js +16 -0
- package/dist/php-BL3EfPBi-BZu5YwDX.js +18 -0
- package/dist/pie-BEWT4RHE-B52QOymI-BoBX6ZnD.js +5 -0
- package/dist/pieDiagram-YF2LJOPJ-IHpbN7M9-BBPOh3m7.js +161 -0
- package/dist/plsql-oVq_K_wH-oVq_K_wH.js +6 -0
- package/dist/postcss-BZ3MNRIJ-BZ3MNRIJ.js +6 -0
- package/dist/powershell-Diwyv8Eh-Diwyv8Eh.js +6 -0
- package/dist/proto-o9HLmF90-o9HLmF90.js +6 -0
- package/dist/pug-HKe4Luo3-BYb0El_4.js +12 -0
- package/dist/python-xYxLFJY--xYxLFJY-.js +6 -0
- package/dist/quadrantDiagram-OS5C2QUG-DyfTAjs0-CvYOplDG.js +1024 -0
- package/dist/r-F-9I-ITZ-F-9I-ITZ.js +6 -0
- package/dist/reg-CMUdAgIP-CMUdAgIP.js +6 -0
- package/dist/requirementDiagram-MIRIMTAZ-DpFia6HM-BNS6fGqi.js +768 -0
- package/dist/rst-B8JEEtLI-Dyxh6LOj.js +22 -0
- package/dist/ruby-FDlfLkNa-nf7VLvCK.js +50 -0
- package/dist/rust-Pc7DCsZD-Pc7DCsZD.js +6 -0
- package/dist/sankeyDiagram-Y46BX6SQ-a6p3ZaX0-Cwasp0IA.js +805 -0
- package/dist/sass-iCyS6eP9-iCyS6eP9.js +6 -0
- package/dist/scss-DhHc4lxB-D1lMETuy.js +8 -0
- package/dist/sequenceDiagram-G6AWOVSC-DlZ7du4U-z70BwBnZ.js +2274 -0
- package/dist/shellscript-Dn0-btNd-Dn0-btNd.js +6 -0
- package/dist/shellsession-8OLo3sB6-DD6AdPYk.js +8 -0
- package/dist/splunk-CTqDjQdo-CTqDjQdo.js +6 -0
- package/dist/sql-DCkt643--DCkt643-.js +6 -0
- package/dist/ssh-config-DHHGll-v-DHHGll-v.js +6 -0
- package/dist/stateDiagram-MAYHULR4-tK3TdntS-PielUO6n.js +268 -0
- package/dist/stateDiagram-v2-4JROLMXI-Ib4sJL3A--uDyhxdT.js +14 -0
- package/dist/style.css +1 -0
- package/dist/stylus-n_9f0QQ5-n_9f0QQ5.js +6 -0
- package/dist/svelte-01qw6Rxm-Cjp5Srko.js +14 -0
- package/dist/swift-BAWqNR8A-BAWqNR8A.js +6 -0
- package/dist/timeline-definition-U7ZMHBDA-Db9d-9_E-kHwjVd5T.js +804 -0
- package/dist/toml-CQSfOn0e-CQSfOn0e.js +6 -0
- package/dist/tsx-DiGsgWT8-DiGsgWT8.js +6 -0
- package/dist/twig-DxrNSc26-BIWbKTFO.js +18 -0
- package/dist/types/components/DocumentationContent.vue.d.ts +177 -0
- package/dist/types/components/DocumentationContent.vue.d.ts.map +1 -0
- package/dist/types/components/DocumentationDisplay.vue.d.ts +323 -0
- package/dist/types/components/DocumentationDisplay.vue.d.ts.map +1 -0
- package/dist/types/components/DocumentationPageEmptyState.vue.d.ts +30 -0
- package/dist/types/components/DocumentationPageEmptyState.vue.d.ts.map +1 -0
- package/dist/types/components/ProductDocumentModal.vue.d.ts +71 -0
- package/dist/types/components/ProductDocumentModal.vue.d.ts.map +1 -0
- package/dist/types/composables/index.d.ts +6 -0
- package/dist/types/composables/index.d.ts.map +1 -0
- package/dist/types/composables/useI18n.d.ts +9 -0
- package/dist/types/composables/useI18n.d.ts.map +1 -0
- package/dist/types/external-links.d.ts +5 -0
- package/dist/types/external-links.d.ts.map +1 -0
- package/dist/types/helpers.d.ts +8 -0
- package/dist/types/helpers.d.ts.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/types/document-list.d.ts +28 -0
- package/dist/types/types/document-list.d.ts.map +1 -0
- package/dist/types/types/document-modal.d.ts +8 -0
- package/dist/types/types/document-modal.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +3 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/typescript-buWNZFwO-buWNZFwO.js +6 -0
- package/dist/v-wa8Orrdd-wa8Orrdd.js +6 -0
- package/dist/vb-E2_-jk4M-E2_-jk4M.js +6 -0
- package/dist/viml-B-zWOd7Z-B-zWOd7Z.js +6 -0
- package/dist/vue-DdqTpW8B-BrYVXV7A.js +31 -0
- package/dist/vue-html-B9t4RWro-D1UeMTSX.js +10 -0
- package/dist/wasm-Bv5f0gKv-Bv5f0gKv.js +6 -0
- package/dist/wgsl-DnPoPGDU-DnPoPGDU.js +6 -0
- package/dist/xml-ChBsf5uy-0Ovnixsj.js +8 -0
- package/dist/xsl-BefjlXrd-CZ7IlB9K.js +8 -0
- package/dist/xychartDiagram-6QU3TZC5-L2EgHpF7-Dbx9eZ7M.js +1304 -0
- package/dist/yaml-Bbg74JKr-Bbg74JKr.js +6 -0
- package/package.json +2 -2
|
@@ -0,0 +1,2274 @@
|
|
|
1
|
+
import { x as Ne, y as Nt, p as zt, d as Me, m as Oe, h as De } from "./chunk-ASOPGD6M-CwvgmaRl-BZAjlsEd.js";
|
|
2
|
+
import { e as Se } from "./chunk-KFBOBJHC-BB675Bua-GRhe6aGs.js";
|
|
3
|
+
import { _ as l, ah as ae, a6 as Re, am as Ce, al as Be, g as rt, a5 as se, a8 as $e, a7 as Ye, ab as _, aY as re, bf as lt, bg as wt, aq as Y, l as G, ar as Ve, ae as Mt, bh as ie, aD as Yt, bi as Fe, a9 as We, af as kt, ag as qe } from "./index-B_RqyDIa.js";
|
|
4
|
+
var Vt = function() {
|
|
5
|
+
var t = /* @__PURE__ */ l(function(ct, E, v, b) {
|
|
6
|
+
for (v = v || {}, b = ct.length; b--; v[ct[b]] = E) ;
|
|
7
|
+
return v;
|
|
8
|
+
}, "o"), e = [1, 2], n = [1, 3], a = [1, 4], s = [2, 4], r = [1, 9], c = [1, 11], h = [1, 13], g = [1, 14], i = [1, 16], x = [1, 17], m = [1, 18], u = [1, 24], T = [1, 25], w = [1, 26], L = [1, 27], k = [1, 28], B = [1, 29], O = [1, 30], $ = [1, 31], S = [1, 32], W = [1, 33], q = [1, 34], J = [1, 35], et = [1, 36], z = [1, 37], H = [1, 38], F = [1, 39], D = [1, 41], Z = [1, 42], j = [1, 43], Q = [1, 44], at = [1, 45], M = [1, 46], f = [1, 4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 48, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], P = [4, 5, 16, 50, 52, 53], X = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], it = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], A = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 48, 50, 52, 53, 54, 59, 60, 61, 62, 70], Kt = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 50, 52, 53, 54, 59, 60, 61, 62, 70], nt = [68, 69, 70], ht = [1, 122], St = {
|
|
9
|
+
trace: /* @__PURE__ */ l(function() {
|
|
10
|
+
}, "trace"),
|
|
11
|
+
yy: {},
|
|
12
|
+
symbols_: { error: 2, start: 3, SPACE: 4, NEWLINE: 5, SD: 6, document: 7, line: 8, statement: 9, box_section: 10, box_line: 11, participant_statement: 12, create: 13, box: 14, restOfLine: 15, end: 16, signal: 17, autonumber: 18, NUM: 19, off: 20, activate: 21, actor: 22, deactivate: 23, note_statement: 24, links_statement: 25, link_statement: 26, properties_statement: 27, details_statement: 28, title: 29, legacy_title: 30, acc_title: 31, acc_title_value: 32, acc_descr: 33, acc_descr_value: 34, acc_descr_multiline_value: 35, loop: 36, rect: 37, opt: 38, alt: 39, else_sections: 40, par: 41, par_sections: 42, par_over: 43, critical: 44, option_sections: 45, break: 46, option: 47, and: 48, else: 49, participant: 50, AS: 51, participant_actor: 52, destroy: 53, note: 54, placement: 55, text2: 56, over: 57, actor_pair: 58, links: 59, link: 60, properties: 61, details: 62, spaceList: 63, ",": 64, left_of: 65, right_of: 66, signaltype: 67, "+": 68, "-": 69, ACTOR: 70, SOLID_OPEN_ARROW: 71, DOTTED_OPEN_ARROW: 72, SOLID_ARROW: 73, BIDIRECTIONAL_SOLID_ARROW: 74, DOTTED_ARROW: 75, BIDIRECTIONAL_DOTTED_ARROW: 76, SOLID_CROSS: 77, DOTTED_CROSS: 78, SOLID_POINT: 79, DOTTED_POINT: 80, TXT: 81, $accept: 0, $end: 1 },
|
|
13
|
+
terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 6: "SD", 13: "create", 14: "box", 15: "restOfLine", 16: "end", 18: "autonumber", 19: "NUM", 20: "off", 21: "activate", 23: "deactivate", 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", 41: "par", 43: "par_over", 44: "critical", 46: "break", 47: "option", 48: "and", 49: "else", 50: "participant", 51: "AS", 52: "participant_actor", 53: "destroy", 54: "note", 57: "over", 59: "links", 60: "link", 61: "properties", 62: "details", 64: ",", 65: "left_of", 66: "right_of", 68: "+", 69: "-", 70: "ACTOR", 71: "SOLID_OPEN_ARROW", 72: "DOTTED_OPEN_ARROW", 73: "SOLID_ARROW", 74: "BIDIRECTIONAL_SOLID_ARROW", 75: "DOTTED_ARROW", 76: "BIDIRECTIONAL_DOTTED_ARROW", 77: "SOLID_CROSS", 78: "DOTTED_CROSS", 79: "SOLID_POINT", 80: "DOTTED_POINT", 81: "TXT" },
|
|
14
|
+
productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [10, 0], [10, 2], [11, 2], [11, 1], [11, 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], [45, 1], [45, 4], [42, 1], [42, 4], [40, 1], [40, 4], [12, 5], [12, 3], [12, 5], [12, 3], [12, 3], [24, 4], [24, 4], [25, 3], [26, 3], [27, 3], [28, 3], [63, 2], [63, 1], [58, 3], [58, 1], [55, 1], [55, 1], [17, 5], [17, 5], [17, 4], [22, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [56, 1]],
|
|
15
|
+
performAction: /* @__PURE__ */ l(function(ct, E, v, b, N, d, U) {
|
|
16
|
+
var p = d.length - 1;
|
|
17
|
+
switch (N) {
|
|
18
|
+
case 3:
|
|
19
|
+
return b.apply(d[p]), d[p];
|
|
20
|
+
case 4:
|
|
21
|
+
case 9:
|
|
22
|
+
this.$ = [];
|
|
23
|
+
break;
|
|
24
|
+
case 5:
|
|
25
|
+
case 10:
|
|
26
|
+
d[p - 1].push(d[p]), this.$ = d[p - 1];
|
|
27
|
+
break;
|
|
28
|
+
case 6:
|
|
29
|
+
case 7:
|
|
30
|
+
case 11:
|
|
31
|
+
case 12:
|
|
32
|
+
this.$ = d[p];
|
|
33
|
+
break;
|
|
34
|
+
case 8:
|
|
35
|
+
case 13:
|
|
36
|
+
this.$ = [];
|
|
37
|
+
break;
|
|
38
|
+
case 15:
|
|
39
|
+
d[p].type = "createParticipant", this.$ = d[p];
|
|
40
|
+
break;
|
|
41
|
+
case 16:
|
|
42
|
+
d[p - 1].unshift({ type: "boxStart", boxData: b.parseBoxData(d[p - 2]) }), d[p - 1].push({ type: "boxEnd", boxText: d[p - 2] }), this.$ = d[p - 1];
|
|
43
|
+
break;
|
|
44
|
+
case 18:
|
|
45
|
+
this.$ = { type: "sequenceIndex", sequenceIndex: Number(d[p - 2]), sequenceIndexStep: Number(d[p - 1]), sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
|
|
46
|
+
break;
|
|
47
|
+
case 19:
|
|
48
|
+
this.$ = { type: "sequenceIndex", sequenceIndex: Number(d[p - 1]), sequenceIndexStep: 1, sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
|
|
49
|
+
break;
|
|
50
|
+
case 20:
|
|
51
|
+
this.$ = { type: "sequenceIndex", sequenceVisible: !1, signalType: b.LINETYPE.AUTONUMBER };
|
|
52
|
+
break;
|
|
53
|
+
case 21:
|
|
54
|
+
this.$ = { type: "sequenceIndex", sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
|
|
55
|
+
break;
|
|
56
|
+
case 22:
|
|
57
|
+
this.$ = { type: "activeStart", signalType: b.LINETYPE.ACTIVE_START, actor: d[p - 1].actor };
|
|
58
|
+
break;
|
|
59
|
+
case 23:
|
|
60
|
+
this.$ = { type: "activeEnd", signalType: b.LINETYPE.ACTIVE_END, actor: d[p - 1].actor };
|
|
61
|
+
break;
|
|
62
|
+
case 29:
|
|
63
|
+
b.setDiagramTitle(d[p].substring(6)), this.$ = d[p].substring(6);
|
|
64
|
+
break;
|
|
65
|
+
case 30:
|
|
66
|
+
b.setDiagramTitle(d[p].substring(7)), this.$ = d[p].substring(7);
|
|
67
|
+
break;
|
|
68
|
+
case 31:
|
|
69
|
+
this.$ = d[p].trim(), b.setAccTitle(this.$);
|
|
70
|
+
break;
|
|
71
|
+
case 32:
|
|
72
|
+
case 33:
|
|
73
|
+
this.$ = d[p].trim(), b.setAccDescription(this.$);
|
|
74
|
+
break;
|
|
75
|
+
case 34:
|
|
76
|
+
d[p - 1].unshift({ type: "loopStart", loopText: b.parseMessage(d[p - 2]), signalType: b.LINETYPE.LOOP_START }), d[p - 1].push({ type: "loopEnd", loopText: d[p - 2], signalType: b.LINETYPE.LOOP_END }), this.$ = d[p - 1];
|
|
77
|
+
break;
|
|
78
|
+
case 35:
|
|
79
|
+
d[p - 1].unshift({ type: "rectStart", color: b.parseMessage(d[p - 2]), signalType: b.LINETYPE.RECT_START }), d[p - 1].push({ type: "rectEnd", color: b.parseMessage(d[p - 2]), signalType: b.LINETYPE.RECT_END }), this.$ = d[p - 1];
|
|
80
|
+
break;
|
|
81
|
+
case 36:
|
|
82
|
+
d[p - 1].unshift({ type: "optStart", optText: b.parseMessage(d[p - 2]), signalType: b.LINETYPE.OPT_START }), d[p - 1].push({ type: "optEnd", optText: b.parseMessage(d[p - 2]), signalType: b.LINETYPE.OPT_END }), this.$ = d[p - 1];
|
|
83
|
+
break;
|
|
84
|
+
case 37:
|
|
85
|
+
d[p - 1].unshift({ type: "altStart", altText: b.parseMessage(d[p - 2]), signalType: b.LINETYPE.ALT_START }), d[p - 1].push({ type: "altEnd", signalType: b.LINETYPE.ALT_END }), this.$ = d[p - 1];
|
|
86
|
+
break;
|
|
87
|
+
case 38:
|
|
88
|
+
d[p - 1].unshift({ type: "parStart", parText: b.parseMessage(d[p - 2]), signalType: b.LINETYPE.PAR_START }), d[p - 1].push({ type: "parEnd", signalType: b.LINETYPE.PAR_END }), this.$ = d[p - 1];
|
|
89
|
+
break;
|
|
90
|
+
case 39:
|
|
91
|
+
d[p - 1].unshift({ type: "parStart", parText: b.parseMessage(d[p - 2]), signalType: b.LINETYPE.PAR_OVER_START }), d[p - 1].push({ type: "parEnd", signalType: b.LINETYPE.PAR_END }), this.$ = d[p - 1];
|
|
92
|
+
break;
|
|
93
|
+
case 40:
|
|
94
|
+
d[p - 1].unshift({ type: "criticalStart", criticalText: b.parseMessage(d[p - 2]), signalType: b.LINETYPE.CRITICAL_START }), d[p - 1].push({ type: "criticalEnd", signalType: b.LINETYPE.CRITICAL_END }), this.$ = d[p - 1];
|
|
95
|
+
break;
|
|
96
|
+
case 41:
|
|
97
|
+
d[p - 1].unshift({ type: "breakStart", breakText: b.parseMessage(d[p - 2]), signalType: b.LINETYPE.BREAK_START }), d[p - 1].push({ type: "breakEnd", optText: b.parseMessage(d[p - 2]), signalType: b.LINETYPE.BREAK_END }), this.$ = d[p - 1];
|
|
98
|
+
break;
|
|
99
|
+
case 43:
|
|
100
|
+
this.$ = d[p - 3].concat([{ type: "option", optionText: b.parseMessage(d[p - 1]), signalType: b.LINETYPE.CRITICAL_OPTION }, d[p]]);
|
|
101
|
+
break;
|
|
102
|
+
case 45:
|
|
103
|
+
this.$ = d[p - 3].concat([{ type: "and", parText: b.parseMessage(d[p - 1]), signalType: b.LINETYPE.PAR_AND }, d[p]]);
|
|
104
|
+
break;
|
|
105
|
+
case 47:
|
|
106
|
+
this.$ = d[p - 3].concat([{ type: "else", altText: b.parseMessage(d[p - 1]), signalType: b.LINETYPE.ALT_ELSE }, d[p]]);
|
|
107
|
+
break;
|
|
108
|
+
case 48:
|
|
109
|
+
d[p - 3].draw = "participant", d[p - 3].type = "addParticipant", d[p - 3].description = b.parseMessage(d[p - 1]), this.$ = d[p - 3];
|
|
110
|
+
break;
|
|
111
|
+
case 49:
|
|
112
|
+
d[p - 1].draw = "participant", d[p - 1].type = "addParticipant", this.$ = d[p - 1];
|
|
113
|
+
break;
|
|
114
|
+
case 50:
|
|
115
|
+
d[p - 3].draw = "actor", d[p - 3].type = "addParticipant", d[p - 3].description = b.parseMessage(d[p - 1]), this.$ = d[p - 3];
|
|
116
|
+
break;
|
|
117
|
+
case 51:
|
|
118
|
+
d[p - 1].draw = "actor", d[p - 1].type = "addParticipant", this.$ = d[p - 1];
|
|
119
|
+
break;
|
|
120
|
+
case 52:
|
|
121
|
+
d[p - 1].type = "destroyParticipant", this.$ = d[p - 1];
|
|
122
|
+
break;
|
|
123
|
+
case 53:
|
|
124
|
+
this.$ = [d[p - 1], { type: "addNote", placement: d[p - 2], actor: d[p - 1].actor, text: d[p] }];
|
|
125
|
+
break;
|
|
126
|
+
case 54:
|
|
127
|
+
d[p - 2] = [].concat(d[p - 1], d[p - 1]).slice(0, 2), d[p - 2][0] = d[p - 2][0].actor, d[p - 2][1] = d[p - 2][1].actor, this.$ = [d[p - 1], { type: "addNote", placement: b.PLACEMENT.OVER, actor: d[p - 2].slice(0, 2), text: d[p] }];
|
|
128
|
+
break;
|
|
129
|
+
case 55:
|
|
130
|
+
this.$ = [d[p - 1], { type: "addLinks", actor: d[p - 1].actor, text: d[p] }];
|
|
131
|
+
break;
|
|
132
|
+
case 56:
|
|
133
|
+
this.$ = [d[p - 1], { type: "addALink", actor: d[p - 1].actor, text: d[p] }];
|
|
134
|
+
break;
|
|
135
|
+
case 57:
|
|
136
|
+
this.$ = [d[p - 1], { type: "addProperties", actor: d[p - 1].actor, text: d[p] }];
|
|
137
|
+
break;
|
|
138
|
+
case 58:
|
|
139
|
+
this.$ = [d[p - 1], { type: "addDetails", actor: d[p - 1].actor, text: d[p] }];
|
|
140
|
+
break;
|
|
141
|
+
case 61:
|
|
142
|
+
this.$ = [d[p - 2], d[p]];
|
|
143
|
+
break;
|
|
144
|
+
case 62:
|
|
145
|
+
this.$ = d[p];
|
|
146
|
+
break;
|
|
147
|
+
case 63:
|
|
148
|
+
this.$ = b.PLACEMENT.LEFTOF;
|
|
149
|
+
break;
|
|
150
|
+
case 64:
|
|
151
|
+
this.$ = b.PLACEMENT.RIGHTOF;
|
|
152
|
+
break;
|
|
153
|
+
case 65:
|
|
154
|
+
this.$ = [
|
|
155
|
+
d[p - 4],
|
|
156
|
+
d[p - 1],
|
|
157
|
+
{ type: "addMessage", from: d[p - 4].actor, to: d[p - 1].actor, signalType: d[p - 3], msg: d[p], activate: !0 },
|
|
158
|
+
{ type: "activeStart", signalType: b.LINETYPE.ACTIVE_START, actor: d[p - 1].actor }
|
|
159
|
+
];
|
|
160
|
+
break;
|
|
161
|
+
case 66:
|
|
162
|
+
this.$ = [
|
|
163
|
+
d[p - 4],
|
|
164
|
+
d[p - 1],
|
|
165
|
+
{ type: "addMessage", from: d[p - 4].actor, to: d[p - 1].actor, signalType: d[p - 3], msg: d[p] },
|
|
166
|
+
{ type: "activeEnd", signalType: b.LINETYPE.ACTIVE_END, actor: d[p - 4].actor }
|
|
167
|
+
];
|
|
168
|
+
break;
|
|
169
|
+
case 67:
|
|
170
|
+
this.$ = [d[p - 3], d[p - 1], { type: "addMessage", from: d[p - 3].actor, to: d[p - 1].actor, signalType: d[p - 2], msg: d[p] }];
|
|
171
|
+
break;
|
|
172
|
+
case 68:
|
|
173
|
+
this.$ = { type: "addParticipant", actor: d[p] };
|
|
174
|
+
break;
|
|
175
|
+
case 69:
|
|
176
|
+
this.$ = b.LINETYPE.SOLID_OPEN;
|
|
177
|
+
break;
|
|
178
|
+
case 70:
|
|
179
|
+
this.$ = b.LINETYPE.DOTTED_OPEN;
|
|
180
|
+
break;
|
|
181
|
+
case 71:
|
|
182
|
+
this.$ = b.LINETYPE.SOLID;
|
|
183
|
+
break;
|
|
184
|
+
case 72:
|
|
185
|
+
this.$ = b.LINETYPE.BIDIRECTIONAL_SOLID;
|
|
186
|
+
break;
|
|
187
|
+
case 73:
|
|
188
|
+
this.$ = b.LINETYPE.DOTTED;
|
|
189
|
+
break;
|
|
190
|
+
case 74:
|
|
191
|
+
this.$ = b.LINETYPE.BIDIRECTIONAL_DOTTED;
|
|
192
|
+
break;
|
|
193
|
+
case 75:
|
|
194
|
+
this.$ = b.LINETYPE.SOLID_CROSS;
|
|
195
|
+
break;
|
|
196
|
+
case 76:
|
|
197
|
+
this.$ = b.LINETYPE.DOTTED_CROSS;
|
|
198
|
+
break;
|
|
199
|
+
case 77:
|
|
200
|
+
this.$ = b.LINETYPE.SOLID_POINT;
|
|
201
|
+
break;
|
|
202
|
+
case 78:
|
|
203
|
+
this.$ = b.LINETYPE.DOTTED_POINT;
|
|
204
|
+
break;
|
|
205
|
+
case 79:
|
|
206
|
+
this.$ = b.parseMessage(d[p].trim().substring(1));
|
|
207
|
+
break;
|
|
208
|
+
}
|
|
209
|
+
}, "anonymous"),
|
|
210
|
+
table: [{ 3: 1, 4: e, 5: n, 6: a }, { 1: [3] }, { 3: 5, 4: e, 5: n, 6: a }, { 3: 6, 4: e, 5: n, 6: a }, t([1, 4, 5, 13, 14, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], s, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: r, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: g, 17: 15, 18: i, 21: x, 22: 40, 23: m, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: T, 31: w, 33: L, 35: k, 36: B, 37: O, 38: $, 39: S, 41: W, 43: q, 44: J, 46: et, 50: z, 52: H, 53: F, 54: D, 59: Z, 60: j, 61: Q, 62: at, 70: M }, t(f, [2, 5]), { 9: 47, 12: 12, 13: h, 14: g, 17: 15, 18: i, 21: x, 22: 40, 23: m, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: T, 31: w, 33: L, 35: k, 36: B, 37: O, 38: $, 39: S, 41: W, 43: q, 44: J, 46: et, 50: z, 52: H, 53: F, 54: D, 59: Z, 60: j, 61: Q, 62: at, 70: M }, t(f, [2, 7]), t(f, [2, 8]), t(f, [2, 14]), { 12: 48, 50: z, 52: H, 53: F }, { 15: [1, 49] }, { 5: [1, 50] }, { 5: [1, 53], 19: [1, 51], 20: [1, 52] }, { 22: 54, 70: M }, { 22: 55, 70: M }, { 5: [1, 56] }, { 5: [1, 57] }, { 5: [1, 58] }, { 5: [1, 59] }, { 5: [1, 60] }, t(f, [2, 29]), t(f, [2, 30]), { 32: [1, 61] }, { 34: [1, 62] }, t(f, [2, 33]), { 15: [1, 63] }, { 15: [1, 64] }, { 15: [1, 65] }, { 15: [1, 66] }, { 15: [1, 67] }, { 15: [1, 68] }, { 15: [1, 69] }, { 15: [1, 70] }, { 22: 71, 70: M }, { 22: 72, 70: M }, { 22: 73, 70: M }, { 67: 74, 71: [1, 75], 72: [1, 76], 73: [1, 77], 74: [1, 78], 75: [1, 79], 76: [1, 80], 77: [1, 81], 78: [1, 82], 79: [1, 83], 80: [1, 84] }, { 55: 85, 57: [1, 86], 65: [1, 87], 66: [1, 88] }, { 22: 89, 70: M }, { 22: 90, 70: M }, { 22: 91, 70: M }, { 22: 92, 70: M }, t([5, 51, 64, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81], [2, 68]), t(f, [2, 6]), t(f, [2, 15]), t(P, [2, 9], { 10: 93 }), t(f, [2, 17]), { 5: [1, 95], 19: [1, 94] }, { 5: [1, 96] }, t(f, [2, 21]), { 5: [1, 97] }, { 5: [1, 98] }, t(f, [2, 24]), t(f, [2, 25]), t(f, [2, 26]), t(f, [2, 27]), t(f, [2, 28]), t(f, [2, 31]), t(f, [2, 32]), t(X, s, { 7: 99 }), t(X, s, { 7: 100 }), t(X, s, { 7: 101 }), t(it, s, { 40: 102, 7: 103 }), t(A, s, { 42: 104, 7: 105 }), t(A, s, { 7: 105, 42: 106 }), t(Kt, s, { 45: 107, 7: 108 }), t(X, s, { 7: 109 }), { 5: [1, 111], 51: [1, 110] }, { 5: [1, 113], 51: [1, 112] }, { 5: [1, 114] }, { 22: 117, 68: [1, 115], 69: [1, 116], 70: M }, t(nt, [2, 69]), t(nt, [2, 70]), t(nt, [2, 71]), t(nt, [2, 72]), t(nt, [2, 73]), t(nt, [2, 74]), t(nt, [2, 75]), t(nt, [2, 76]), t(nt, [2, 77]), t(nt, [2, 78]), { 22: 118, 70: M }, { 22: 120, 58: 119, 70: M }, { 70: [2, 63] }, { 70: [2, 64] }, { 56: 121, 81: ht }, { 56: 123, 81: ht }, { 56: 124, 81: ht }, { 56: 125, 81: ht }, { 4: [1, 128], 5: [1, 130], 11: 127, 12: 129, 16: [1, 126], 50: z, 52: H, 53: F }, { 5: [1, 131] }, t(f, [2, 19]), t(f, [2, 20]), t(f, [2, 22]), t(f, [2, 23]), { 4: r, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: g, 16: [1, 132], 17: 15, 18: i, 21: x, 22: 40, 23: m, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: T, 31: w, 33: L, 35: k, 36: B, 37: O, 38: $, 39: S, 41: W, 43: q, 44: J, 46: et, 50: z, 52: H, 53: F, 54: D, 59: Z, 60: j, 61: Q, 62: at, 70: M }, { 4: r, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: g, 16: [1, 133], 17: 15, 18: i, 21: x, 22: 40, 23: m, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: T, 31: w, 33: L, 35: k, 36: B, 37: O, 38: $, 39: S, 41: W, 43: q, 44: J, 46: et, 50: z, 52: H, 53: F, 54: D, 59: Z, 60: j, 61: Q, 62: at, 70: M }, { 4: r, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: g, 16: [1, 134], 17: 15, 18: i, 21: x, 22: 40, 23: m, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: T, 31: w, 33: L, 35: k, 36: B, 37: O, 38: $, 39: S, 41: W, 43: q, 44: J, 46: et, 50: z, 52: H, 53: F, 54: D, 59: Z, 60: j, 61: Q, 62: at, 70: M }, { 16: [1, 135] }, { 4: r, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: g, 16: [2, 46], 17: 15, 18: i, 21: x, 22: 40, 23: m, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: T, 31: w, 33: L, 35: k, 36: B, 37: O, 38: $, 39: S, 41: W, 43: q, 44: J, 46: et, 49: [1, 136], 50: z, 52: H, 53: F, 54: D, 59: Z, 60: j, 61: Q, 62: at, 70: M }, { 16: [1, 137] }, { 4: r, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: g, 16: [2, 44], 17: 15, 18: i, 21: x, 22: 40, 23: m, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: T, 31: w, 33: L, 35: k, 36: B, 37: O, 38: $, 39: S, 41: W, 43: q, 44: J, 46: et, 48: [1, 138], 50: z, 52: H, 53: F, 54: D, 59: Z, 60: j, 61: Q, 62: at, 70: M }, { 16: [1, 139] }, { 16: [1, 140] }, { 4: r, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: g, 16: [2, 42], 17: 15, 18: i, 21: x, 22: 40, 23: m, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: T, 31: w, 33: L, 35: k, 36: B, 37: O, 38: $, 39: S, 41: W, 43: q, 44: J, 46: et, 47: [1, 141], 50: z, 52: H, 53: F, 54: D, 59: Z, 60: j, 61: Q, 62: at, 70: M }, { 4: r, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: g, 16: [1, 142], 17: 15, 18: i, 21: x, 22: 40, 23: m, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: T, 31: w, 33: L, 35: k, 36: B, 37: O, 38: $, 39: S, 41: W, 43: q, 44: J, 46: et, 50: z, 52: H, 53: F, 54: D, 59: Z, 60: j, 61: Q, 62: at, 70: M }, { 15: [1, 143] }, t(f, [2, 49]), { 15: [1, 144] }, t(f, [2, 51]), t(f, [2, 52]), { 22: 145, 70: M }, { 22: 146, 70: M }, { 56: 147, 81: ht }, { 56: 148, 81: ht }, { 56: 149, 81: ht }, { 64: [1, 150], 81: [2, 62] }, { 5: [2, 55] }, { 5: [2, 79] }, { 5: [2, 56] }, { 5: [2, 57] }, { 5: [2, 58] }, t(f, [2, 16]), t(P, [2, 10]), { 12: 151, 50: z, 52: H, 53: F }, t(P, [2, 12]), t(P, [2, 13]), t(f, [2, 18]), t(f, [2, 34]), t(f, [2, 35]), t(f, [2, 36]), t(f, [2, 37]), { 15: [1, 152] }, t(f, [2, 38]), { 15: [1, 153] }, t(f, [2, 39]), t(f, [2, 40]), { 15: [1, 154] }, t(f, [2, 41]), { 5: [1, 155] }, { 5: [1, 156] }, { 56: 157, 81: ht }, { 56: 158, 81: ht }, { 5: [2, 67] }, { 5: [2, 53] }, { 5: [2, 54] }, { 22: 159, 70: M }, t(P, [2, 11]), t(it, s, { 7: 103, 40: 160 }), t(A, s, { 7: 105, 42: 161 }), t(Kt, s, { 7: 108, 45: 162 }), t(f, [2, 48]), t(f, [2, 50]), { 5: [2, 65] }, { 5: [2, 66] }, { 81: [2, 61] }, { 16: [2, 47] }, { 16: [2, 45] }, { 16: [2, 43] }],
|
|
211
|
+
defaultActions: { 5: [2, 1], 6: [2, 2], 87: [2, 63], 88: [2, 64], 121: [2, 55], 122: [2, 79], 123: [2, 56], 124: [2, 57], 125: [2, 58], 147: [2, 67], 148: [2, 53], 149: [2, 54], 157: [2, 65], 158: [2, 66], 159: [2, 61], 160: [2, 47], 161: [2, 45], 162: [2, 43] },
|
|
212
|
+
parseError: /* @__PURE__ */ l(function(ct, E) {
|
|
213
|
+
if (E.recoverable)
|
|
214
|
+
this.trace(ct);
|
|
215
|
+
else {
|
|
216
|
+
var v = new Error(ct);
|
|
217
|
+
throw v.hash = E, v;
|
|
218
|
+
}
|
|
219
|
+
}, "parseError"),
|
|
220
|
+
parse: /* @__PURE__ */ l(function(ct) {
|
|
221
|
+
var E = this, v = [0], b = [], N = [null], d = [], U = this.table, p = "", _t = 0, Gt = 0, ve = 2, Jt = 1, Pe = d.slice.call(arguments, 1), V = Object.create(this.lexer), gt = { yy: {} };
|
|
222
|
+
for (var Rt in this.yy)
|
|
223
|
+
Object.prototype.hasOwnProperty.call(this.yy, Rt) && (gt.yy[Rt] = this.yy[Rt]);
|
|
224
|
+
V.setInput(ct, gt.yy), gt.yy.lexer = V, gt.yy.parser = this, typeof V.yylloc > "u" && (V.yylloc = {});
|
|
225
|
+
var Ct = V.yylloc;
|
|
226
|
+
d.push(Ct);
|
|
227
|
+
var ke = V.options && V.options.ranges;
|
|
228
|
+
typeof gt.yy.parseError == "function" ? this.parseError = gt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
229
|
+
function Ae(tt) {
|
|
230
|
+
v.length = v.length - 2 * tt, N.length = N.length - tt, d.length = d.length - tt;
|
|
231
|
+
}
|
|
232
|
+
l(Ae, "popStack");
|
|
233
|
+
function Zt() {
|
|
234
|
+
var tt;
|
|
235
|
+
return tt = b.pop() || V.lex() || Jt, typeof tt != "number" && (tt instanceof Array && (b = tt, tt = b.pop()), tt = E.symbols_[tt] || tt), tt;
|
|
236
|
+
}
|
|
237
|
+
l(Zt, "lex");
|
|
238
|
+
for (var K, ut, st, Bt, Tt = {}, vt, pt, Qt, Pt; ; ) {
|
|
239
|
+
if (ut = v[v.length - 1], this.defaultActions[ut] ? st = this.defaultActions[ut] : ((K === null || typeof K > "u") && (K = Zt()), st = U[ut] && U[ut][K]), typeof st > "u" || !st.length || !st[0]) {
|
|
240
|
+
var $t = "";
|
|
241
|
+
Pt = [];
|
|
242
|
+
for (vt in U[ut])
|
|
243
|
+
this.terminals_[vt] && vt > ve && Pt.push("'" + this.terminals_[vt] + "'");
|
|
244
|
+
V.showPosition ? $t = "Parse error on line " + (_t + 1) + `:
|
|
245
|
+
` + V.showPosition() + `
|
|
246
|
+
Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[K] || K) + "'" : $t = "Parse error on line " + (_t + 1) + ": Unexpected " + (K == Jt ? "end of input" : "'" + (this.terminals_[K] || K) + "'"), this.parseError($t, {
|
|
247
|
+
text: V.match,
|
|
248
|
+
token: this.terminals_[K] || K,
|
|
249
|
+
line: V.yylineno,
|
|
250
|
+
loc: Ct,
|
|
251
|
+
expected: Pt
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
if (st[0] instanceof Array && st.length > 1)
|
|
255
|
+
throw new Error("Parse Error: multiple actions possible at state: " + ut + ", token: " + K);
|
|
256
|
+
switch (st[0]) {
|
|
257
|
+
case 1:
|
|
258
|
+
v.push(K), N.push(V.yytext), d.push(V.yylloc), v.push(st[1]), K = null, Gt = V.yyleng, p = V.yytext, _t = V.yylineno, Ct = V.yylloc;
|
|
259
|
+
break;
|
|
260
|
+
case 2:
|
|
261
|
+
if (pt = this.productions_[st[1]][1], Tt.$ = N[N.length - pt], Tt._$ = {
|
|
262
|
+
first_line: d[d.length - (pt || 1)].first_line,
|
|
263
|
+
last_line: d[d.length - 1].last_line,
|
|
264
|
+
first_column: d[d.length - (pt || 1)].first_column,
|
|
265
|
+
last_column: d[d.length - 1].last_column
|
|
266
|
+
}, ke && (Tt._$.range = [
|
|
267
|
+
d[d.length - (pt || 1)].range[0],
|
|
268
|
+
d[d.length - 1].range[1]
|
|
269
|
+
]), Bt = this.performAction.apply(Tt, [
|
|
270
|
+
p,
|
|
271
|
+
Gt,
|
|
272
|
+
_t,
|
|
273
|
+
gt.yy,
|
|
274
|
+
st[1],
|
|
275
|
+
N,
|
|
276
|
+
d
|
|
277
|
+
].concat(Pe)), typeof Bt < "u")
|
|
278
|
+
return Bt;
|
|
279
|
+
pt && (v = v.slice(0, -1 * pt * 2), N = N.slice(0, -1 * pt), d = d.slice(0, -1 * pt)), v.push(this.productions_[st[1]][0]), N.push(Tt.$), d.push(Tt._$), Qt = U[v[v.length - 2]][v[v.length - 1]], v.push(Qt);
|
|
280
|
+
break;
|
|
281
|
+
case 3:
|
|
282
|
+
return !0;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
return !0;
|
|
286
|
+
}, "parse")
|
|
287
|
+
}, _e = /* @__PURE__ */ function() {
|
|
288
|
+
var ct = {
|
|
289
|
+
EOF: 1,
|
|
290
|
+
parseError: /* @__PURE__ */ l(function(E, v) {
|
|
291
|
+
if (this.yy.parser)
|
|
292
|
+
this.yy.parser.parseError(E, v);
|
|
293
|
+
else
|
|
294
|
+
throw new Error(E);
|
|
295
|
+
}, "parseError"),
|
|
296
|
+
// resets the lexer, sets new input
|
|
297
|
+
setInput: /* @__PURE__ */ l(function(E, v) {
|
|
298
|
+
return this.yy = v || this.yy || {}, this._input = E, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
299
|
+
first_line: 1,
|
|
300
|
+
first_column: 0,
|
|
301
|
+
last_line: 1,
|
|
302
|
+
last_column: 0
|
|
303
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
304
|
+
}, "setInput"),
|
|
305
|
+
// consumes and returns one char from the input
|
|
306
|
+
input: /* @__PURE__ */ l(function() {
|
|
307
|
+
var E = this._input[0];
|
|
308
|
+
this.yytext += E, this.yyleng++, this.offset++, this.match += E, this.matched += E;
|
|
309
|
+
var v = E.match(/(?:\r\n?|\n).*/g);
|
|
310
|
+
return v ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), E;
|
|
311
|
+
}, "input"),
|
|
312
|
+
// unshifts one char (or a string) into the input
|
|
313
|
+
unput: /* @__PURE__ */ l(function(E) {
|
|
314
|
+
var v = E.length, b = E.split(/(?:\r\n?|\n)/g);
|
|
315
|
+
this._input = E + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - v), this.offset -= v;
|
|
316
|
+
var N = this.match.split(/(?:\r\n?|\n)/g);
|
|
317
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), b.length - 1 && (this.yylineno -= b.length - 1);
|
|
318
|
+
var d = this.yylloc.range;
|
|
319
|
+
return this.yylloc = {
|
|
320
|
+
first_line: this.yylloc.first_line,
|
|
321
|
+
last_line: this.yylineno + 1,
|
|
322
|
+
first_column: this.yylloc.first_column,
|
|
323
|
+
last_column: b ? (b.length === N.length ? this.yylloc.first_column : 0) + N[N.length - b.length].length - b[0].length : this.yylloc.first_column - v
|
|
324
|
+
}, this.options.ranges && (this.yylloc.range = [d[0], d[0] + this.yyleng - v]), this.yyleng = this.yytext.length, this;
|
|
325
|
+
}, "unput"),
|
|
326
|
+
// When called from action, caches matched text and appends it on next action
|
|
327
|
+
more: /* @__PURE__ */ l(function() {
|
|
328
|
+
return this._more = !0, this;
|
|
329
|
+
}, "more"),
|
|
330
|
+
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
|
331
|
+
reject: /* @__PURE__ */ l(function() {
|
|
332
|
+
if (this.options.backtrack_lexer)
|
|
333
|
+
this._backtrack = !0;
|
|
334
|
+
else
|
|
335
|
+
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).
|
|
336
|
+
` + this.showPosition(), {
|
|
337
|
+
text: "",
|
|
338
|
+
token: null,
|
|
339
|
+
line: this.yylineno
|
|
340
|
+
});
|
|
341
|
+
return this;
|
|
342
|
+
}, "reject"),
|
|
343
|
+
// retain first n characters of the match
|
|
344
|
+
less: /* @__PURE__ */ l(function(E) {
|
|
345
|
+
this.unput(this.match.slice(E));
|
|
346
|
+
}, "less"),
|
|
347
|
+
// displays already matched input, i.e. for error messages
|
|
348
|
+
pastInput: /* @__PURE__ */ l(function() {
|
|
349
|
+
var E = this.matched.substr(0, this.matched.length - this.match.length);
|
|
350
|
+
return (E.length > 20 ? "..." : "") + E.substr(-20).replace(/\n/g, "");
|
|
351
|
+
}, "pastInput"),
|
|
352
|
+
// displays upcoming input, i.e. for error messages
|
|
353
|
+
upcomingInput: /* @__PURE__ */ l(function() {
|
|
354
|
+
var E = this.match;
|
|
355
|
+
return E.length < 20 && (E += this._input.substr(0, 20 - E.length)), (E.substr(0, 20) + (E.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
356
|
+
}, "upcomingInput"),
|
|
357
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
358
|
+
showPosition: /* @__PURE__ */ l(function() {
|
|
359
|
+
var E = this.pastInput(), v = new Array(E.length + 1).join("-");
|
|
360
|
+
return E + this.upcomingInput() + `
|
|
361
|
+
` + v + "^";
|
|
362
|
+
}, "showPosition"),
|
|
363
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
364
|
+
test_match: /* @__PURE__ */ l(function(E, v) {
|
|
365
|
+
var b, N, d;
|
|
366
|
+
if (this.options.backtrack_lexer && (d = {
|
|
367
|
+
yylineno: this.yylineno,
|
|
368
|
+
yylloc: {
|
|
369
|
+
first_line: this.yylloc.first_line,
|
|
370
|
+
last_line: this.last_line,
|
|
371
|
+
first_column: this.yylloc.first_column,
|
|
372
|
+
last_column: this.yylloc.last_column
|
|
373
|
+
},
|
|
374
|
+
yytext: this.yytext,
|
|
375
|
+
match: this.match,
|
|
376
|
+
matches: this.matches,
|
|
377
|
+
matched: this.matched,
|
|
378
|
+
yyleng: this.yyleng,
|
|
379
|
+
offset: this.offset,
|
|
380
|
+
_more: this._more,
|
|
381
|
+
_input: this._input,
|
|
382
|
+
yy: this.yy,
|
|
383
|
+
conditionStack: this.conditionStack.slice(0),
|
|
384
|
+
done: this.done
|
|
385
|
+
}, this.options.ranges && (d.yylloc.range = this.yylloc.range.slice(0))), N = E[0].match(/(?:\r\n?|\n).*/g), N && (this.yylineno += N.length), this.yylloc = {
|
|
386
|
+
first_line: this.yylloc.last_line,
|
|
387
|
+
last_line: this.yylineno + 1,
|
|
388
|
+
first_column: this.yylloc.last_column,
|
|
389
|
+
last_column: N ? N[N.length - 1].length - N[N.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + E[0].length
|
|
390
|
+
}, this.yytext += E[0], this.match += E[0], this.matches = E, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(E[0].length), this.matched += E[0], b = this.performAction.call(this, this.yy, this, v, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), b)
|
|
391
|
+
return b;
|
|
392
|
+
if (this._backtrack) {
|
|
393
|
+
for (var U in d)
|
|
394
|
+
this[U] = d[U];
|
|
395
|
+
return !1;
|
|
396
|
+
}
|
|
397
|
+
return !1;
|
|
398
|
+
}, "test_match"),
|
|
399
|
+
// return next match in input
|
|
400
|
+
next: /* @__PURE__ */ l(function() {
|
|
401
|
+
if (this.done)
|
|
402
|
+
return this.EOF;
|
|
403
|
+
this._input || (this.done = !0);
|
|
404
|
+
var E, v, b, N;
|
|
405
|
+
this._more || (this.yytext = "", this.match = "");
|
|
406
|
+
for (var d = this._currentRules(), U = 0; U < d.length; U++)
|
|
407
|
+
if (b = this._input.match(this.rules[d[U]]), b && (!v || b[0].length > v[0].length)) {
|
|
408
|
+
if (v = b, N = U, this.options.backtrack_lexer) {
|
|
409
|
+
if (E = this.test_match(b, d[U]), E !== !1)
|
|
410
|
+
return E;
|
|
411
|
+
if (this._backtrack) {
|
|
412
|
+
v = !1;
|
|
413
|
+
continue;
|
|
414
|
+
} else
|
|
415
|
+
return !1;
|
|
416
|
+
} else if (!this.options.flex)
|
|
417
|
+
break;
|
|
418
|
+
}
|
|
419
|
+
return v ? (E = this.test_match(v, d[N]), E !== !1 ? E : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
420
|
+
` + this.showPosition(), {
|
|
421
|
+
text: "",
|
|
422
|
+
token: null,
|
|
423
|
+
line: this.yylineno
|
|
424
|
+
});
|
|
425
|
+
}, "next"),
|
|
426
|
+
// return next match that has a token
|
|
427
|
+
lex: /* @__PURE__ */ l(function() {
|
|
428
|
+
var E = this.next();
|
|
429
|
+
return E || this.lex();
|
|
430
|
+
}, "lex"),
|
|
431
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
432
|
+
begin: /* @__PURE__ */ l(function(E) {
|
|
433
|
+
this.conditionStack.push(E);
|
|
434
|
+
}, "begin"),
|
|
435
|
+
// pop the previously active lexer condition state off the condition stack
|
|
436
|
+
popState: /* @__PURE__ */ l(function() {
|
|
437
|
+
var E = this.conditionStack.length - 1;
|
|
438
|
+
return E > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
439
|
+
}, "popState"),
|
|
440
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
441
|
+
_currentRules: /* @__PURE__ */ l(function() {
|
|
442
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
443
|
+
}, "_currentRules"),
|
|
444
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
445
|
+
topState: /* @__PURE__ */ l(function(E) {
|
|
446
|
+
return E = this.conditionStack.length - 1 - Math.abs(E || 0), E >= 0 ? this.conditionStack[E] : "INITIAL";
|
|
447
|
+
}, "topState"),
|
|
448
|
+
// alias for begin(condition)
|
|
449
|
+
pushState: /* @__PURE__ */ l(function(E) {
|
|
450
|
+
this.begin(E);
|
|
451
|
+
}, "pushState"),
|
|
452
|
+
// return the number of states currently on the stack
|
|
453
|
+
stateStackSize: /* @__PURE__ */ l(function() {
|
|
454
|
+
return this.conditionStack.length;
|
|
455
|
+
}, "stateStackSize"),
|
|
456
|
+
options: { "case-insensitive": !0 },
|
|
457
|
+
performAction: /* @__PURE__ */ l(function(E, v, b, N) {
|
|
458
|
+
switch (b) {
|
|
459
|
+
case 0:
|
|
460
|
+
return 5;
|
|
461
|
+
case 1:
|
|
462
|
+
break;
|
|
463
|
+
case 2:
|
|
464
|
+
break;
|
|
465
|
+
case 3:
|
|
466
|
+
break;
|
|
467
|
+
case 4:
|
|
468
|
+
break;
|
|
469
|
+
case 5:
|
|
470
|
+
break;
|
|
471
|
+
case 6:
|
|
472
|
+
return 19;
|
|
473
|
+
case 7:
|
|
474
|
+
return this.begin("LINE"), 14;
|
|
475
|
+
case 8:
|
|
476
|
+
return this.begin("ID"), 50;
|
|
477
|
+
case 9:
|
|
478
|
+
return this.begin("ID"), 52;
|
|
479
|
+
case 10:
|
|
480
|
+
return 13;
|
|
481
|
+
case 11:
|
|
482
|
+
return this.begin("ID"), 53;
|
|
483
|
+
case 12:
|
|
484
|
+
return v.yytext = v.yytext.trim(), this.begin("ALIAS"), 70;
|
|
485
|
+
case 13:
|
|
486
|
+
return this.popState(), this.popState(), this.begin("LINE"), 51;
|
|
487
|
+
case 14:
|
|
488
|
+
return this.popState(), this.popState(), 5;
|
|
489
|
+
case 15:
|
|
490
|
+
return this.begin("LINE"), 36;
|
|
491
|
+
case 16:
|
|
492
|
+
return this.begin("LINE"), 37;
|
|
493
|
+
case 17:
|
|
494
|
+
return this.begin("LINE"), 38;
|
|
495
|
+
case 18:
|
|
496
|
+
return this.begin("LINE"), 39;
|
|
497
|
+
case 19:
|
|
498
|
+
return this.begin("LINE"), 49;
|
|
499
|
+
case 20:
|
|
500
|
+
return this.begin("LINE"), 41;
|
|
501
|
+
case 21:
|
|
502
|
+
return this.begin("LINE"), 43;
|
|
503
|
+
case 22:
|
|
504
|
+
return this.begin("LINE"), 48;
|
|
505
|
+
case 23:
|
|
506
|
+
return this.begin("LINE"), 44;
|
|
507
|
+
case 24:
|
|
508
|
+
return this.begin("LINE"), 47;
|
|
509
|
+
case 25:
|
|
510
|
+
return this.begin("LINE"), 46;
|
|
511
|
+
case 26:
|
|
512
|
+
return this.popState(), 15;
|
|
513
|
+
case 27:
|
|
514
|
+
return 16;
|
|
515
|
+
case 28:
|
|
516
|
+
return 65;
|
|
517
|
+
case 29:
|
|
518
|
+
return 66;
|
|
519
|
+
case 30:
|
|
520
|
+
return 59;
|
|
521
|
+
case 31:
|
|
522
|
+
return 60;
|
|
523
|
+
case 32:
|
|
524
|
+
return 61;
|
|
525
|
+
case 33:
|
|
526
|
+
return 62;
|
|
527
|
+
case 34:
|
|
528
|
+
return 57;
|
|
529
|
+
case 35:
|
|
530
|
+
return 54;
|
|
531
|
+
case 36:
|
|
532
|
+
return this.begin("ID"), 21;
|
|
533
|
+
case 37:
|
|
534
|
+
return this.begin("ID"), 23;
|
|
535
|
+
case 38:
|
|
536
|
+
return 29;
|
|
537
|
+
case 39:
|
|
538
|
+
return 30;
|
|
539
|
+
case 40:
|
|
540
|
+
return this.begin("acc_title"), 31;
|
|
541
|
+
case 41:
|
|
542
|
+
return this.popState(), "acc_title_value";
|
|
543
|
+
case 42:
|
|
544
|
+
return this.begin("acc_descr"), 33;
|
|
545
|
+
case 43:
|
|
546
|
+
return this.popState(), "acc_descr_value";
|
|
547
|
+
case 44:
|
|
548
|
+
this.begin("acc_descr_multiline");
|
|
549
|
+
break;
|
|
550
|
+
case 45:
|
|
551
|
+
this.popState();
|
|
552
|
+
break;
|
|
553
|
+
case 46:
|
|
554
|
+
return "acc_descr_multiline_value";
|
|
555
|
+
case 47:
|
|
556
|
+
return 6;
|
|
557
|
+
case 48:
|
|
558
|
+
return 18;
|
|
559
|
+
case 49:
|
|
560
|
+
return 20;
|
|
561
|
+
case 50:
|
|
562
|
+
return 64;
|
|
563
|
+
case 51:
|
|
564
|
+
return 5;
|
|
565
|
+
case 52:
|
|
566
|
+
return v.yytext = v.yytext.trim(), 70;
|
|
567
|
+
case 53:
|
|
568
|
+
return 73;
|
|
569
|
+
case 54:
|
|
570
|
+
return 74;
|
|
571
|
+
case 55:
|
|
572
|
+
return 75;
|
|
573
|
+
case 56:
|
|
574
|
+
return 76;
|
|
575
|
+
case 57:
|
|
576
|
+
return 71;
|
|
577
|
+
case 58:
|
|
578
|
+
return 72;
|
|
579
|
+
case 59:
|
|
580
|
+
return 77;
|
|
581
|
+
case 60:
|
|
582
|
+
return 78;
|
|
583
|
+
case 61:
|
|
584
|
+
return 79;
|
|
585
|
+
case 62:
|
|
586
|
+
return 80;
|
|
587
|
+
case 63:
|
|
588
|
+
return 81;
|
|
589
|
+
case 64:
|
|
590
|
+
return 68;
|
|
591
|
+
case 65:
|
|
592
|
+
return 69;
|
|
593
|
+
case 66:
|
|
594
|
+
return 5;
|
|
595
|
+
case 67:
|
|
596
|
+
return "INVALID";
|
|
597
|
+
}
|
|
598
|
+
}, "anonymous"),
|
|
599
|
+
rules: [/^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[0-9]+(?=[ \n]+))/i, /^(?:box\b)/i, /^(?:participant\b)/i, /^(?:actor\b)/i, /^(?:create\b)/i, /^(?:destroy\b)/i, /^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/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, /^(?::(?:(?:no)?wrap)?[^#\n;]+)/i, /^(?:\+)/i, /^(?:-)/i, /^(?:$)/i, /^(?:.)/i],
|
|
600
|
+
conditions: { acc_descr_multiline: { rules: [45, 46], inclusive: !1 }, acc_descr: { rules: [43], inclusive: !1 }, acc_title: { rules: [41], inclusive: !1 }, ID: { rules: [2, 3, 12], inclusive: !1 }, ALIAS: { rules: [2, 3, 13, 14], inclusive: !1 }, LINE: { rules: [2, 3, 26], inclusive: !1 }, INITIAL: { rules: [0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67], inclusive: !0 } }
|
|
601
|
+
};
|
|
602
|
+
return ct;
|
|
603
|
+
}();
|
|
604
|
+
St.lexer = _e;
|
|
605
|
+
function Lt() {
|
|
606
|
+
this.yy = {};
|
|
607
|
+
}
|
|
608
|
+
return l(Lt, "Parser"), Lt.prototype = St, St.Parser = Lt, new Lt();
|
|
609
|
+
}();
|
|
610
|
+
Vt.parser = Vt;
|
|
611
|
+
var ze = Vt, I = new Se(() => ({
|
|
612
|
+
prevActor: void 0,
|
|
613
|
+
actors: /* @__PURE__ */ new Map(),
|
|
614
|
+
createdActors: /* @__PURE__ */ new Map(),
|
|
615
|
+
destroyedActors: /* @__PURE__ */ new Map(),
|
|
616
|
+
boxes: [],
|
|
617
|
+
messages: [],
|
|
618
|
+
notes: [],
|
|
619
|
+
sequenceNumbersEnabled: !1,
|
|
620
|
+
wrapEnabled: void 0,
|
|
621
|
+
currentBox: void 0,
|
|
622
|
+
lastCreated: void 0,
|
|
623
|
+
lastDestroyed: void 0
|
|
624
|
+
})), He = /* @__PURE__ */ l(function(t) {
|
|
625
|
+
I.records.boxes.push({
|
|
626
|
+
name: t.text,
|
|
627
|
+
wrap: t.wrap ?? yt(),
|
|
628
|
+
fill: t.color,
|
|
629
|
+
actorKeys: []
|
|
630
|
+
}), I.records.currentBox = I.records.boxes.slice(-1)[0];
|
|
631
|
+
}, "addBox"), Ft = /* @__PURE__ */ l(function(t, e, n, a) {
|
|
632
|
+
let s = I.records.currentBox;
|
|
633
|
+
const r = I.records.actors.get(t);
|
|
634
|
+
if (r) {
|
|
635
|
+
if (I.records.currentBox && r.box && I.records.currentBox !== r.box)
|
|
636
|
+
throw new Error(
|
|
637
|
+
`A same participant should only be defined in one Box: ${r.name} can't be in '${r.box.name}' and in '${I.records.currentBox.name}' at the same time.`
|
|
638
|
+
);
|
|
639
|
+
if (s = r.box ? r.box : I.records.currentBox, r.box = s, r && e === r.name && n == null)
|
|
640
|
+
return;
|
|
641
|
+
}
|
|
642
|
+
if ((n == null ? void 0 : n.text) == null && (n = { text: e, type: a }), (a == null || n.text == null) && (n = { text: e, type: a }), I.records.actors.set(t, {
|
|
643
|
+
box: s,
|
|
644
|
+
name: e,
|
|
645
|
+
description: n.text,
|
|
646
|
+
wrap: n.wrap ?? yt(),
|
|
647
|
+
prevActor: I.records.prevActor,
|
|
648
|
+
links: {},
|
|
649
|
+
properties: {},
|
|
650
|
+
actorCnt: null,
|
|
651
|
+
rectData: null,
|
|
652
|
+
type: a ?? "participant"
|
|
653
|
+
}), I.records.prevActor) {
|
|
654
|
+
const c = I.records.actors.get(I.records.prevActor);
|
|
655
|
+
c && (c.nextActor = t);
|
|
656
|
+
}
|
|
657
|
+
I.records.currentBox && I.records.currentBox.actorKeys.push(t), I.records.prevActor = t;
|
|
658
|
+
}, "addActor"), je = /* @__PURE__ */ l((t) => {
|
|
659
|
+
let e, n = 0;
|
|
660
|
+
if (!t)
|
|
661
|
+
return 0;
|
|
662
|
+
for (e = 0; e < I.records.messages.length; e++)
|
|
663
|
+
I.records.messages[e].type === Et.ACTIVE_START && I.records.messages[e].from === t && n++, I.records.messages[e].type === Et.ACTIVE_END && I.records.messages[e].from === t && n--;
|
|
664
|
+
return n;
|
|
665
|
+
}, "activationCount"), Ue = /* @__PURE__ */ l(function(t, e, n, a) {
|
|
666
|
+
I.records.messages.push({
|
|
667
|
+
from: t,
|
|
668
|
+
to: e,
|
|
669
|
+
message: n.text,
|
|
670
|
+
wrap: n.wrap ?? yt(),
|
|
671
|
+
answer: a
|
|
672
|
+
});
|
|
673
|
+
}, "addMessage"), R = /* @__PURE__ */ l(function(t, e, n, a, s = !1) {
|
|
674
|
+
if (a === Et.ACTIVE_END && je(t ?? "") < 1) {
|
|
675
|
+
const r = new Error("Trying to inactivate an inactive participant (" + t + ")");
|
|
676
|
+
throw r.hash = {
|
|
677
|
+
text: "->>-",
|
|
678
|
+
token: "->>-",
|
|
679
|
+
line: "1",
|
|
680
|
+
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
|
|
681
|
+
expected: ["'ACTIVE_PARTICIPANT'"]
|
|
682
|
+
}, r;
|
|
683
|
+
}
|
|
684
|
+
return I.records.messages.push({
|
|
685
|
+
from: t,
|
|
686
|
+
to: e,
|
|
687
|
+
message: (n == null ? void 0 : n.text) ?? "",
|
|
688
|
+
wrap: (n == null ? void 0 : n.wrap) ?? yt(),
|
|
689
|
+
type: a,
|
|
690
|
+
activate: s
|
|
691
|
+
}), !0;
|
|
692
|
+
}, "addSignal"), Ke = /* @__PURE__ */ l(function() {
|
|
693
|
+
return I.records.boxes.length > 0;
|
|
694
|
+
}, "hasAtLeastOneBox"), Ge = /* @__PURE__ */ l(function() {
|
|
695
|
+
return I.records.boxes.some((t) => t.name);
|
|
696
|
+
}, "hasAtLeastOneBoxWithTitle"), Je = /* @__PURE__ */ l(function() {
|
|
697
|
+
return I.records.messages;
|
|
698
|
+
}, "getMessages"), Ze = /* @__PURE__ */ l(function() {
|
|
699
|
+
return I.records.boxes;
|
|
700
|
+
}, "getBoxes"), Qe = /* @__PURE__ */ l(function() {
|
|
701
|
+
return I.records.actors;
|
|
702
|
+
}, "getActors"), Xe = /* @__PURE__ */ l(function() {
|
|
703
|
+
return I.records.createdActors;
|
|
704
|
+
}, "getCreatedActors"), t0 = /* @__PURE__ */ l(function() {
|
|
705
|
+
return I.records.destroyedActors;
|
|
706
|
+
}, "getDestroyedActors"), It = /* @__PURE__ */ l(function(t) {
|
|
707
|
+
return I.records.actors.get(t);
|
|
708
|
+
}, "getActor"), e0 = /* @__PURE__ */ l(function() {
|
|
709
|
+
return [...I.records.actors.keys()];
|
|
710
|
+
}, "getActorKeys"), a0 = /* @__PURE__ */ l(function() {
|
|
711
|
+
I.records.sequenceNumbersEnabled = !0;
|
|
712
|
+
}, "enableSequenceNumbers"), s0 = /* @__PURE__ */ l(function() {
|
|
713
|
+
I.records.sequenceNumbersEnabled = !1;
|
|
714
|
+
}, "disableSequenceNumbers"), r0 = /* @__PURE__ */ l(() => I.records.sequenceNumbersEnabled, "showSequenceNumbers"), i0 = /* @__PURE__ */ l(function(t) {
|
|
715
|
+
I.records.wrapEnabled = t;
|
|
716
|
+
}, "setWrap"), oe = /* @__PURE__ */ l((t) => {
|
|
717
|
+
if (t === void 0)
|
|
718
|
+
return {};
|
|
719
|
+
t = t.trim();
|
|
720
|
+
const e = /^:?wrap:/.exec(t) !== null ? !0 : /^:?nowrap:/.exec(t) !== null ? !1 : void 0;
|
|
721
|
+
return { cleanedText: (e === void 0 ? t : t.replace(/^:?(?:no)?wrap:/, "")).trim(), wrap: e };
|
|
722
|
+
}, "extractWrap"), yt = /* @__PURE__ */ l(() => {
|
|
723
|
+
var t;
|
|
724
|
+
return I.records.wrapEnabled !== void 0 ? I.records.wrapEnabled : ((t = rt().sequence) == null ? void 0 : t.wrap) ?? !1;
|
|
725
|
+
}, "autoWrap"), o0 = /* @__PURE__ */ l(function() {
|
|
726
|
+
I.reset(), Ve();
|
|
727
|
+
}, "clear"), n0 = /* @__PURE__ */ l(function(t) {
|
|
728
|
+
const e = t.trim(), { wrap: n, cleanedText: a } = oe(e), s = {
|
|
729
|
+
text: a,
|
|
730
|
+
wrap: n
|
|
731
|
+
};
|
|
732
|
+
return G.debug(`parseMessage: ${JSON.stringify(s)}`), s;
|
|
733
|
+
}, "parseMessage"), c0 = /* @__PURE__ */ l(function(t) {
|
|
734
|
+
const e = /^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);
|
|
735
|
+
let n = e != null && e[1] ? e[1].trim() : "transparent", a = e != null && e[2] ? e[2].trim() : void 0;
|
|
736
|
+
if (window != null && window.CSS)
|
|
737
|
+
window.CSS.supports("color", n) || (n = "transparent", a = t.trim());
|
|
738
|
+
else {
|
|
739
|
+
const c = new Option().style;
|
|
740
|
+
c.color = n, c.color !== n && (n = "transparent", a = t.trim());
|
|
741
|
+
}
|
|
742
|
+
const { wrap: s, cleanedText: r } = oe(a);
|
|
743
|
+
return {
|
|
744
|
+
text: r ? Mt(r, rt()) : void 0,
|
|
745
|
+
color: n,
|
|
746
|
+
wrap: s
|
|
747
|
+
};
|
|
748
|
+
}, "parseBoxData"), Et = {
|
|
749
|
+
SOLID: 0,
|
|
750
|
+
DOTTED: 1,
|
|
751
|
+
NOTE: 2,
|
|
752
|
+
SOLID_CROSS: 3,
|
|
753
|
+
DOTTED_CROSS: 4,
|
|
754
|
+
SOLID_OPEN: 5,
|
|
755
|
+
DOTTED_OPEN: 6,
|
|
756
|
+
LOOP_START: 10,
|
|
757
|
+
LOOP_END: 11,
|
|
758
|
+
ALT_START: 12,
|
|
759
|
+
ALT_ELSE: 13,
|
|
760
|
+
ALT_END: 14,
|
|
761
|
+
OPT_START: 15,
|
|
762
|
+
OPT_END: 16,
|
|
763
|
+
ACTIVE_START: 17,
|
|
764
|
+
ACTIVE_END: 18,
|
|
765
|
+
PAR_START: 19,
|
|
766
|
+
PAR_AND: 20,
|
|
767
|
+
PAR_END: 21,
|
|
768
|
+
RECT_START: 22,
|
|
769
|
+
RECT_END: 23,
|
|
770
|
+
SOLID_POINT: 24,
|
|
771
|
+
DOTTED_POINT: 25,
|
|
772
|
+
AUTONUMBER: 26,
|
|
773
|
+
CRITICAL_START: 27,
|
|
774
|
+
CRITICAL_OPTION: 28,
|
|
775
|
+
CRITICAL_END: 29,
|
|
776
|
+
BREAK_START: 30,
|
|
777
|
+
BREAK_END: 31,
|
|
778
|
+
PAR_OVER_START: 32,
|
|
779
|
+
BIDIRECTIONAL_SOLID: 33,
|
|
780
|
+
BIDIRECTIONAL_DOTTED: 34
|
|
781
|
+
}, d0 = {
|
|
782
|
+
FILLED: 0,
|
|
783
|
+
OPEN: 1
|
|
784
|
+
}, l0 = {
|
|
785
|
+
LEFTOF: 0,
|
|
786
|
+
RIGHTOF: 1,
|
|
787
|
+
OVER: 2
|
|
788
|
+
}, ne = /* @__PURE__ */ l(function(t, e, n) {
|
|
789
|
+
const a = {
|
|
790
|
+
actor: t,
|
|
791
|
+
placement: e,
|
|
792
|
+
message: n.text,
|
|
793
|
+
wrap: n.wrap ?? yt()
|
|
794
|
+
}, s = [].concat(t, t);
|
|
795
|
+
I.records.notes.push(a), I.records.messages.push({
|
|
796
|
+
from: s[0],
|
|
797
|
+
to: s[1],
|
|
798
|
+
message: n.text,
|
|
799
|
+
wrap: n.wrap ?? yt(),
|
|
800
|
+
type: Et.NOTE,
|
|
801
|
+
placement: e
|
|
802
|
+
});
|
|
803
|
+
}, "addNote"), ce = /* @__PURE__ */ l(function(t, e) {
|
|
804
|
+
const n = It(t);
|
|
805
|
+
try {
|
|
806
|
+
let a = Mt(e.text, rt());
|
|
807
|
+
a = a.replace(/&/g, "&"), a = a.replace(/=/g, "=");
|
|
808
|
+
const s = JSON.parse(a);
|
|
809
|
+
Ot(n, s);
|
|
810
|
+
} catch (a) {
|
|
811
|
+
G.error("error while parsing actor link text", a);
|
|
812
|
+
}
|
|
813
|
+
}, "addLinks"), h0 = /* @__PURE__ */ l(function(t, e) {
|
|
814
|
+
const n = It(t);
|
|
815
|
+
try {
|
|
816
|
+
const a = {};
|
|
817
|
+
let s = Mt(e.text, rt());
|
|
818
|
+
const r = s.indexOf("@");
|
|
819
|
+
s = s.replace(/&/g, "&"), s = s.replace(/=/g, "=");
|
|
820
|
+
const c = s.slice(0, r - 1).trim(), h = s.slice(r + 1).trim();
|
|
821
|
+
a[c] = h, Ot(n, a);
|
|
822
|
+
} catch (a) {
|
|
823
|
+
G.error("error while parsing actor link text", a);
|
|
824
|
+
}
|
|
825
|
+
}, "addALink");
|
|
826
|
+
function Ot(t, e) {
|
|
827
|
+
if (t.links == null)
|
|
828
|
+
t.links = e;
|
|
829
|
+
else
|
|
830
|
+
for (const n in e)
|
|
831
|
+
t.links[n] = e[n];
|
|
832
|
+
}
|
|
833
|
+
l(Ot, "insertLinks");
|
|
834
|
+
var de = /* @__PURE__ */ l(function(t, e) {
|
|
835
|
+
const n = It(t);
|
|
836
|
+
try {
|
|
837
|
+
const a = Mt(e.text, rt()), s = JSON.parse(a);
|
|
838
|
+
Ht(n, s);
|
|
839
|
+
} catch (a) {
|
|
840
|
+
G.error("error while parsing actor properties text", a);
|
|
841
|
+
}
|
|
842
|
+
}, "addProperties");
|
|
843
|
+
function Ht(t, e) {
|
|
844
|
+
if (t.properties == null)
|
|
845
|
+
t.properties = e;
|
|
846
|
+
else
|
|
847
|
+
for (const n in e)
|
|
848
|
+
t.properties[n] = e[n];
|
|
849
|
+
}
|
|
850
|
+
l(Ht, "insertProperties");
|
|
851
|
+
function le() {
|
|
852
|
+
I.records.currentBox = void 0;
|
|
853
|
+
}
|
|
854
|
+
l(le, "boxEnd");
|
|
855
|
+
var he = /* @__PURE__ */ l(function(t, e) {
|
|
856
|
+
const n = It(t), a = document.getElementById(e.text);
|
|
857
|
+
try {
|
|
858
|
+
const s = a.innerHTML, r = JSON.parse(s);
|
|
859
|
+
r.properties && Ht(n, r.properties), r.links && Ot(n, r.links);
|
|
860
|
+
} catch (s) {
|
|
861
|
+
G.error("error while parsing actor details text", s);
|
|
862
|
+
}
|
|
863
|
+
}, "addDetails"), p0 = /* @__PURE__ */ l(function(t, e) {
|
|
864
|
+
if ((t == null ? void 0 : t.properties) !== void 0)
|
|
865
|
+
return t.properties[e];
|
|
866
|
+
}, "getActorProperty"), pe = /* @__PURE__ */ l(function(t) {
|
|
867
|
+
if (Array.isArray(t))
|
|
868
|
+
t.forEach(function(e) {
|
|
869
|
+
pe(e);
|
|
870
|
+
});
|
|
871
|
+
else
|
|
872
|
+
switch (t.type) {
|
|
873
|
+
case "sequenceIndex":
|
|
874
|
+
I.records.messages.push({
|
|
875
|
+
from: void 0,
|
|
876
|
+
to: void 0,
|
|
877
|
+
message: {
|
|
878
|
+
start: t.sequenceIndex,
|
|
879
|
+
step: t.sequenceIndexStep,
|
|
880
|
+
visible: t.sequenceVisible
|
|
881
|
+
},
|
|
882
|
+
wrap: !1,
|
|
883
|
+
type: t.signalType
|
|
884
|
+
});
|
|
885
|
+
break;
|
|
886
|
+
case "addParticipant":
|
|
887
|
+
Ft(t.actor, t.actor, t.description, t.draw);
|
|
888
|
+
break;
|
|
889
|
+
case "createParticipant":
|
|
890
|
+
if (I.records.actors.has(t.actor))
|
|
891
|
+
throw new Error(
|
|
892
|
+
"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"
|
|
893
|
+
);
|
|
894
|
+
I.records.lastCreated = t.actor, Ft(t.actor, t.actor, t.description, t.draw), I.records.createdActors.set(t.actor, I.records.messages.length);
|
|
895
|
+
break;
|
|
896
|
+
case "destroyParticipant":
|
|
897
|
+
I.records.lastDestroyed = t.actor, I.records.destroyedActors.set(t.actor, I.records.messages.length);
|
|
898
|
+
break;
|
|
899
|
+
case "activeStart":
|
|
900
|
+
R(t.actor, void 0, void 0, t.signalType);
|
|
901
|
+
break;
|
|
902
|
+
case "activeEnd":
|
|
903
|
+
R(t.actor, void 0, void 0, t.signalType);
|
|
904
|
+
break;
|
|
905
|
+
case "addNote":
|
|
906
|
+
ne(t.actor, t.placement, t.text);
|
|
907
|
+
break;
|
|
908
|
+
case "addLinks":
|
|
909
|
+
ce(t.actor, t.text);
|
|
910
|
+
break;
|
|
911
|
+
case "addALink":
|
|
912
|
+
h0(t.actor, t.text);
|
|
913
|
+
break;
|
|
914
|
+
case "addProperties":
|
|
915
|
+
de(t.actor, t.text);
|
|
916
|
+
break;
|
|
917
|
+
case "addDetails":
|
|
918
|
+
he(t.actor, t.text);
|
|
919
|
+
break;
|
|
920
|
+
case "addMessage":
|
|
921
|
+
if (I.records.lastCreated) {
|
|
922
|
+
if (t.to !== I.records.lastCreated)
|
|
923
|
+
throw new Error(
|
|
924
|
+
"The created participant " + I.records.lastCreated.name + " does not have an associated creating message after its declaration. Please check the sequence diagram."
|
|
925
|
+
);
|
|
926
|
+
I.records.lastCreated = void 0;
|
|
927
|
+
} else if (I.records.lastDestroyed) {
|
|
928
|
+
if (t.to !== I.records.lastDestroyed && t.from !== I.records.lastDestroyed)
|
|
929
|
+
throw new Error(
|
|
930
|
+
"The destroyed participant " + I.records.lastDestroyed.name + " does not have an associated destroying message after its declaration. Please check the sequence diagram."
|
|
931
|
+
);
|
|
932
|
+
I.records.lastDestroyed = void 0;
|
|
933
|
+
}
|
|
934
|
+
R(t.from, t.to, t.msg, t.signalType, t.activate);
|
|
935
|
+
break;
|
|
936
|
+
case "boxStart":
|
|
937
|
+
He(t.boxData);
|
|
938
|
+
break;
|
|
939
|
+
case "boxEnd":
|
|
940
|
+
le();
|
|
941
|
+
break;
|
|
942
|
+
case "loopStart":
|
|
943
|
+
R(void 0, void 0, t.loopText, t.signalType);
|
|
944
|
+
break;
|
|
945
|
+
case "loopEnd":
|
|
946
|
+
R(void 0, void 0, void 0, t.signalType);
|
|
947
|
+
break;
|
|
948
|
+
case "rectStart":
|
|
949
|
+
R(void 0, void 0, t.color, t.signalType);
|
|
950
|
+
break;
|
|
951
|
+
case "rectEnd":
|
|
952
|
+
R(void 0, void 0, void 0, t.signalType);
|
|
953
|
+
break;
|
|
954
|
+
case "optStart":
|
|
955
|
+
R(void 0, void 0, t.optText, t.signalType);
|
|
956
|
+
break;
|
|
957
|
+
case "optEnd":
|
|
958
|
+
R(void 0, void 0, void 0, t.signalType);
|
|
959
|
+
break;
|
|
960
|
+
case "altStart":
|
|
961
|
+
R(void 0, void 0, t.altText, t.signalType);
|
|
962
|
+
break;
|
|
963
|
+
case "else":
|
|
964
|
+
R(void 0, void 0, t.altText, t.signalType);
|
|
965
|
+
break;
|
|
966
|
+
case "altEnd":
|
|
967
|
+
R(void 0, void 0, void 0, t.signalType);
|
|
968
|
+
break;
|
|
969
|
+
case "setAccTitle":
|
|
970
|
+
se(t.text);
|
|
971
|
+
break;
|
|
972
|
+
case "parStart":
|
|
973
|
+
R(void 0, void 0, t.parText, t.signalType);
|
|
974
|
+
break;
|
|
975
|
+
case "and":
|
|
976
|
+
R(void 0, void 0, t.parText, t.signalType);
|
|
977
|
+
break;
|
|
978
|
+
case "parEnd":
|
|
979
|
+
R(void 0, void 0, void 0, t.signalType);
|
|
980
|
+
break;
|
|
981
|
+
case "criticalStart":
|
|
982
|
+
R(void 0, void 0, t.criticalText, t.signalType);
|
|
983
|
+
break;
|
|
984
|
+
case "option":
|
|
985
|
+
R(void 0, void 0, t.optionText, t.signalType);
|
|
986
|
+
break;
|
|
987
|
+
case "criticalEnd":
|
|
988
|
+
R(void 0, void 0, void 0, t.signalType);
|
|
989
|
+
break;
|
|
990
|
+
case "breakStart":
|
|
991
|
+
R(void 0, void 0, t.breakText, t.signalType);
|
|
992
|
+
break;
|
|
993
|
+
case "breakEnd":
|
|
994
|
+
R(void 0, void 0, void 0, t.signalType);
|
|
995
|
+
break;
|
|
996
|
+
}
|
|
997
|
+
}, "apply"), Xt = {
|
|
998
|
+
addActor: Ft,
|
|
999
|
+
addMessage: Ue,
|
|
1000
|
+
addSignal: R,
|
|
1001
|
+
addLinks: ce,
|
|
1002
|
+
addDetails: he,
|
|
1003
|
+
addProperties: de,
|
|
1004
|
+
autoWrap: yt,
|
|
1005
|
+
setWrap: i0,
|
|
1006
|
+
enableSequenceNumbers: a0,
|
|
1007
|
+
disableSequenceNumbers: s0,
|
|
1008
|
+
showSequenceNumbers: r0,
|
|
1009
|
+
getMessages: Je,
|
|
1010
|
+
getActors: Qe,
|
|
1011
|
+
getCreatedActors: Xe,
|
|
1012
|
+
getDestroyedActors: t0,
|
|
1013
|
+
getActor: It,
|
|
1014
|
+
getActorKeys: e0,
|
|
1015
|
+
getActorProperty: p0,
|
|
1016
|
+
getAccTitle: Re,
|
|
1017
|
+
getBoxes: Ze,
|
|
1018
|
+
getDiagramTitle: Ce,
|
|
1019
|
+
setDiagramTitle: Be,
|
|
1020
|
+
getConfig: /* @__PURE__ */ l(() => rt().sequence, "getConfig"),
|
|
1021
|
+
clear: o0,
|
|
1022
|
+
parseMessage: n0,
|
|
1023
|
+
parseBoxData: c0,
|
|
1024
|
+
LINETYPE: Et,
|
|
1025
|
+
ARROWTYPE: d0,
|
|
1026
|
+
PLACEMENT: l0,
|
|
1027
|
+
addNote: ne,
|
|
1028
|
+
setAccTitle: se,
|
|
1029
|
+
apply: pe,
|
|
1030
|
+
setAccDescription: $e,
|
|
1031
|
+
getAccDescription: Ye,
|
|
1032
|
+
hasAtLeastOneBox: Ke,
|
|
1033
|
+
hasAtLeastOneBoxWithTitle: Ge
|
|
1034
|
+
}, g0 = /* @__PURE__ */ l((t) => `.actor {
|
|
1035
|
+
stroke: ${t.actorBorder};
|
|
1036
|
+
fill: ${t.actorBkg};
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
text.actor > tspan {
|
|
1040
|
+
fill: ${t.actorTextColor};
|
|
1041
|
+
stroke: none;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
.actor-line {
|
|
1045
|
+
stroke: ${t.actorLineColor};
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
.messageLine0 {
|
|
1049
|
+
stroke-width: 1.5;
|
|
1050
|
+
stroke-dasharray: none;
|
|
1051
|
+
stroke: ${t.signalColor};
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
.messageLine1 {
|
|
1055
|
+
stroke-width: 1.5;
|
|
1056
|
+
stroke-dasharray: 2, 2;
|
|
1057
|
+
stroke: ${t.signalColor};
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
#arrowhead path {
|
|
1061
|
+
fill: ${t.signalColor};
|
|
1062
|
+
stroke: ${t.signalColor};
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
.sequenceNumber {
|
|
1066
|
+
fill: ${t.sequenceNumberColor};
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
#sequencenumber {
|
|
1070
|
+
fill: ${t.signalColor};
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
#crosshead path {
|
|
1074
|
+
fill: ${t.signalColor};
|
|
1075
|
+
stroke: ${t.signalColor};
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
.messageText {
|
|
1079
|
+
fill: ${t.signalTextColor};
|
|
1080
|
+
stroke: none;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
.labelBox {
|
|
1084
|
+
stroke: ${t.labelBoxBorderColor};
|
|
1085
|
+
fill: ${t.labelBoxBkgColor};
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
.labelText, .labelText > tspan {
|
|
1089
|
+
fill: ${t.labelTextColor};
|
|
1090
|
+
stroke: none;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
.loopText, .loopText > tspan {
|
|
1094
|
+
fill: ${t.loopTextColor};
|
|
1095
|
+
stroke: none;
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
.loopLine {
|
|
1099
|
+
stroke-width: 2px;
|
|
1100
|
+
stroke-dasharray: 2, 2;
|
|
1101
|
+
stroke: ${t.labelBoxBorderColor};
|
|
1102
|
+
fill: ${t.labelBoxBorderColor};
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
.note {
|
|
1106
|
+
//stroke: #decc93;
|
|
1107
|
+
stroke: ${t.noteBorderColor};
|
|
1108
|
+
fill: ${t.noteBkgColor};
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
.noteText, .noteText > tspan {
|
|
1112
|
+
fill: ${t.noteTextColor};
|
|
1113
|
+
stroke: none;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
.activation0 {
|
|
1117
|
+
fill: ${t.activationBkgColor};
|
|
1118
|
+
stroke: ${t.activationBorderColor};
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
.activation1 {
|
|
1122
|
+
fill: ${t.activationBkgColor};
|
|
1123
|
+
stroke: ${t.activationBorderColor};
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
.activation2 {
|
|
1127
|
+
fill: ${t.activationBkgColor};
|
|
1128
|
+
stroke: ${t.activationBorderColor};
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
.actorPopupMenu {
|
|
1132
|
+
position: absolute;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
.actorPopupMenuPanel {
|
|
1136
|
+
position: absolute;
|
|
1137
|
+
fill: ${t.actorBkg};
|
|
1138
|
+
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
|
1139
|
+
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
|
|
1140
|
+
}
|
|
1141
|
+
.actor-man line {
|
|
1142
|
+
stroke: ${t.actorBorder};
|
|
1143
|
+
fill: ${t.actorBkg};
|
|
1144
|
+
}
|
|
1145
|
+
.actor-man circle, line {
|
|
1146
|
+
stroke: ${t.actorBorder};
|
|
1147
|
+
fill: ${t.actorBkg};
|
|
1148
|
+
stroke-width: 2px;
|
|
1149
|
+
}
|
|
1150
|
+
`, "getStyles"), u0 = g0, xt = 18 * 2, ge = "actor-top", ue = "actor-bottom", x0 = "actor-box", te = "actor-man", jt = /* @__PURE__ */ l(function(t, e) {
|
|
1151
|
+
return Ne(t, e);
|
|
1152
|
+
}, "drawRect"), y0 = /* @__PURE__ */ l(function(t, e, n, a, s) {
|
|
1153
|
+
if (e.links === void 0 || e.links === null || Object.keys(e.links).length === 0)
|
|
1154
|
+
return { height: 0, width: 0 };
|
|
1155
|
+
const r = e.links, c = e.actorCnt, h = e.rectData;
|
|
1156
|
+
var g = "none";
|
|
1157
|
+
s && (g = "block !important");
|
|
1158
|
+
const i = t.append("g");
|
|
1159
|
+
i.attr("id", "actor" + c + "_popup"), i.attr("class", "actorPopupMenu"), i.attr("display", g);
|
|
1160
|
+
var x = "";
|
|
1161
|
+
h.class !== void 0 && (x = " " + h.class);
|
|
1162
|
+
let m = h.width > n ? h.width : n;
|
|
1163
|
+
const u = i.append("rect");
|
|
1164
|
+
if (u.attr("class", "actorPopupMenuPanel" + x), u.attr("x", h.x), u.attr("y", h.height), u.attr("fill", h.fill), u.attr("stroke", h.stroke), u.attr("width", m), u.attr("height", h.height), u.attr("rx", h.rx), u.attr("ry", h.ry), r != null) {
|
|
1165
|
+
var T = 20;
|
|
1166
|
+
for (let k in r) {
|
|
1167
|
+
var w = i.append("a"), L = ae.sanitizeUrl(r[k]);
|
|
1168
|
+
w.attr("xlink:href", L), w.attr("target", "_blank"), D0(a)(
|
|
1169
|
+
k,
|
|
1170
|
+
w,
|
|
1171
|
+
h.x + 10,
|
|
1172
|
+
h.height + T,
|
|
1173
|
+
m,
|
|
1174
|
+
20,
|
|
1175
|
+
{ class: "actor" },
|
|
1176
|
+
a
|
|
1177
|
+
), T += 30;
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
return u.attr("height", T), { height: h.height + T, width: m };
|
|
1181
|
+
}, "drawPopup"), m0 = /* @__PURE__ */ l(function(t) {
|
|
1182
|
+
return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }";
|
|
1183
|
+
}, "popupMenuToggle"), At = /* @__PURE__ */ l(async function(t, e, n = null) {
|
|
1184
|
+
let a = t.append("foreignObject");
|
|
1185
|
+
const s = await ie(e.text, Yt()), r = a.append("xhtml:div").attr("style", "width: fit-content;").attr("xmlns", "http://www.w3.org/1999/xhtml").html(s).node().getBoundingClientRect();
|
|
1186
|
+
if (a.attr("height", Math.round(r.height)).attr("width", Math.round(r.width)), e.class === "noteText") {
|
|
1187
|
+
const c = t.node().firstChild;
|
|
1188
|
+
c.setAttribute("height", r.height + 2 * e.textMargin);
|
|
1189
|
+
const h = c.getBBox();
|
|
1190
|
+
a.attr("x", Math.round(h.x + h.width / 2 - r.width / 2)).attr("y", Math.round(h.y + h.height / 2 - r.height / 2));
|
|
1191
|
+
} else if (n) {
|
|
1192
|
+
let { startx: c, stopx: h, starty: g } = n;
|
|
1193
|
+
if (c > h) {
|
|
1194
|
+
const i = c;
|
|
1195
|
+
c = h, h = i;
|
|
1196
|
+
}
|
|
1197
|
+
a.attr("x", Math.round(c + Math.abs(c - h) / 2 - r.width / 2)), e.class === "loopText" ? a.attr("y", Math.round(g)) : a.attr("y", Math.round(g - r.height));
|
|
1198
|
+
}
|
|
1199
|
+
return [a];
|
|
1200
|
+
}, "drawKatex"), bt = /* @__PURE__ */ l(function(t, e) {
|
|
1201
|
+
let n = 0, a = 0;
|
|
1202
|
+
const s = e.text.split(_.lineBreakRegex), [r, c] = re(e.fontSize);
|
|
1203
|
+
let h = [], g = 0, i = /* @__PURE__ */ l(() => e.y, "yfunc");
|
|
1204
|
+
if (e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0)
|
|
1205
|
+
switch (e.valign) {
|
|
1206
|
+
case "top":
|
|
1207
|
+
case "start":
|
|
1208
|
+
i = /* @__PURE__ */ l(() => Math.round(e.y + e.textMargin), "yfunc");
|
|
1209
|
+
break;
|
|
1210
|
+
case "middle":
|
|
1211
|
+
case "center":
|
|
1212
|
+
i = /* @__PURE__ */ l(() => Math.round(e.y + (n + a + e.textMargin) / 2), "yfunc");
|
|
1213
|
+
break;
|
|
1214
|
+
case "bottom":
|
|
1215
|
+
case "end":
|
|
1216
|
+
i = /* @__PURE__ */ l(() => Math.round(
|
|
1217
|
+
e.y + (n + a + 2 * e.textMargin) - e.textMargin
|
|
1218
|
+
), "yfunc");
|
|
1219
|
+
break;
|
|
1220
|
+
}
|
|
1221
|
+
if (e.anchor !== void 0 && e.textMargin !== void 0 && e.width !== void 0)
|
|
1222
|
+
switch (e.anchor) {
|
|
1223
|
+
case "left":
|
|
1224
|
+
case "start":
|
|
1225
|
+
e.x = Math.round(e.x + e.textMargin), e.anchor = "start", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
|
|
1226
|
+
break;
|
|
1227
|
+
case "middle":
|
|
1228
|
+
case "center":
|
|
1229
|
+
e.x = Math.round(e.x + e.width / 2), e.anchor = "middle", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
|
|
1230
|
+
break;
|
|
1231
|
+
case "right":
|
|
1232
|
+
case "end":
|
|
1233
|
+
e.x = Math.round(e.x + e.width - e.textMargin), e.anchor = "end", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
|
|
1234
|
+
break;
|
|
1235
|
+
}
|
|
1236
|
+
for (let [x, m] of s.entries()) {
|
|
1237
|
+
e.textMargin !== void 0 && e.textMargin === 0 && r !== void 0 && (g = x * r);
|
|
1238
|
+
const u = t.append("text");
|
|
1239
|
+
u.attr("x", e.x), u.attr("y", i()), e.anchor !== void 0 && u.attr("text-anchor", e.anchor).attr("dominant-baseline", e.dominantBaseline).attr("alignment-baseline", e.alignmentBaseline), e.fontFamily !== void 0 && u.style("font-family", e.fontFamily), c !== void 0 && u.style("font-size", c), e.fontWeight !== void 0 && u.style("font-weight", e.fontWeight), e.fill !== void 0 && u.attr("fill", e.fill), e.class !== void 0 && u.attr("class", e.class), e.dy !== void 0 ? u.attr("dy", e.dy) : g !== 0 && u.attr("dy", g);
|
|
1240
|
+
const T = m || Fe;
|
|
1241
|
+
if (e.tspan) {
|
|
1242
|
+
const w = u.append("tspan");
|
|
1243
|
+
w.attr("x", e.x), e.fill !== void 0 && w.attr("fill", e.fill), w.text(T);
|
|
1244
|
+
} else
|
|
1245
|
+
u.text(T);
|
|
1246
|
+
e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0 && (a += (u._groups || u)[0][0].getBBox().height, n = a), h.push(u);
|
|
1247
|
+
}
|
|
1248
|
+
return h;
|
|
1249
|
+
}, "drawText"), xe = /* @__PURE__ */ l(function(t, e) {
|
|
1250
|
+
function n(s, r, c, h, g) {
|
|
1251
|
+
return s + "," + r + " " + (s + c) + "," + r + " " + (s + c) + "," + (r + h - g) + " " + (s + c - g * 1.2) + "," + (r + h) + " " + s + "," + (r + h);
|
|
1252
|
+
}
|
|
1253
|
+
l(n, "genPoints");
|
|
1254
|
+
const a = t.append("polygon");
|
|
1255
|
+
return a.attr("points", n(e.x, e.y, e.width, e.height, 7)), a.attr("class", "labelBox"), e.y = e.y + e.height / 2, bt(t, e), a;
|
|
1256
|
+
}, "drawLabel"), dt = -1, ye = /* @__PURE__ */ l((t, e, n, a) => {
|
|
1257
|
+
t.select && n.forEach((s) => {
|
|
1258
|
+
const r = e.get(s), c = t.select("#actor" + r.actorCnt);
|
|
1259
|
+
!a.mirrorActors && r.stopy ? c.attr("y2", r.stopy + r.height / 2) : a.mirrorActors && c.attr("y2", r.stopy);
|
|
1260
|
+
});
|
|
1261
|
+
}, "fixLifeLineHeights"), T0 = /* @__PURE__ */ l(function(t, e, n, a) {
|
|
1262
|
+
var s, r;
|
|
1263
|
+
const c = a ? e.stopy : e.starty, h = e.x + e.width / 2, g = c + e.height, i = t.append("g").lower();
|
|
1264
|
+
var x = i;
|
|
1265
|
+
a || (dt++, Object.keys(e.links || {}).length && !n.forceMenus && x.attr("onclick", m0(`actor${dt}_popup`)).attr("cursor", "pointer"), x.append("line").attr("id", "actor" + dt).attr("x1", h).attr("y1", g).attr("x2", h).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", e.name), x = i.append("g"), e.actorCnt = dt, e.links != null && x.attr("id", "root-" + dt));
|
|
1266
|
+
const m = Nt();
|
|
1267
|
+
var u = "actor";
|
|
1268
|
+
(s = e.properties) != null && s.class ? u = e.properties.class : m.fill = "#eaeaea", a ? u += ` ${ue}` : u += ` ${ge}`, m.x = e.x, m.y = c, m.width = e.width, m.height = e.height, m.class = u, m.rx = 3, m.ry = 3, m.name = e.name;
|
|
1269
|
+
const T = jt(x, m);
|
|
1270
|
+
if (e.rectData = m, (r = e.properties) != null && r.icon) {
|
|
1271
|
+
const L = e.properties.icon.trim();
|
|
1272
|
+
L.charAt(0) === "@" ? Oe(x, m.x + m.width - 20, m.y + 10, L.substr(1)) : De(x, m.x + m.width - 20, m.y + 10, L);
|
|
1273
|
+
}
|
|
1274
|
+
Ut(n, lt(e.description))(
|
|
1275
|
+
e.description,
|
|
1276
|
+
x,
|
|
1277
|
+
m.x,
|
|
1278
|
+
m.y,
|
|
1279
|
+
m.width,
|
|
1280
|
+
m.height,
|
|
1281
|
+
{ class: `actor ${x0}` },
|
|
1282
|
+
n
|
|
1283
|
+
);
|
|
1284
|
+
let w = e.height;
|
|
1285
|
+
if (T.node) {
|
|
1286
|
+
const L = T.node().getBBox();
|
|
1287
|
+
e.height = L.height, w = L.height;
|
|
1288
|
+
}
|
|
1289
|
+
return w;
|
|
1290
|
+
}, "drawActorTypeParticipant"), f0 = /* @__PURE__ */ l(function(t, e, n, a) {
|
|
1291
|
+
const s = a ? e.stopy : e.starty, r = e.x + e.width / 2, c = s + 80, h = t.append("g").lower();
|
|
1292
|
+
a || (dt++, h.append("line").attr("id", "actor" + dt).attr("x1", r).attr("y1", c).attr("x2", r).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", e.name), e.actorCnt = dt);
|
|
1293
|
+
const g = t.append("g");
|
|
1294
|
+
let i = te;
|
|
1295
|
+
a ? i += ` ${ue}` : i += ` ${ge}`, g.attr("class", i), g.attr("name", e.name);
|
|
1296
|
+
const x = Nt();
|
|
1297
|
+
x.x = e.x, x.y = s, x.fill = "#eaeaea", x.width = e.width, x.height = e.height, x.class = "actor", x.rx = 3, x.ry = 3, g.append("line").attr("id", "actor-man-torso" + dt).attr("x1", r).attr("y1", s + 25).attr("x2", r).attr("y2", s + 45), g.append("line").attr("id", "actor-man-arms" + dt).attr("x1", r - xt / 2).attr("y1", s + 33).attr("x2", r + xt / 2).attr("y2", s + 33), g.append("line").attr("x1", r - xt / 2).attr("y1", s + 60).attr("x2", r).attr("y2", s + 45), g.append("line").attr("x1", r).attr("y1", s + 45).attr("x2", r + xt / 2 - 2).attr("y2", s + 60);
|
|
1298
|
+
const m = g.append("circle");
|
|
1299
|
+
m.attr("cx", e.x + e.width / 2), m.attr("cy", s + 10), m.attr("r", 15), m.attr("width", e.width), m.attr("height", e.height);
|
|
1300
|
+
const u = g.node().getBBox();
|
|
1301
|
+
return e.height = u.height, Ut(n, lt(e.description))(
|
|
1302
|
+
e.description,
|
|
1303
|
+
g,
|
|
1304
|
+
x.x,
|
|
1305
|
+
x.y + 35,
|
|
1306
|
+
x.width,
|
|
1307
|
+
x.height,
|
|
1308
|
+
{ class: `actor ${te}` },
|
|
1309
|
+
n
|
|
1310
|
+
), e.height;
|
|
1311
|
+
}, "drawActorTypeActor"), b0 = /* @__PURE__ */ l(async function(t, e, n, a) {
|
|
1312
|
+
switch (e.type) {
|
|
1313
|
+
case "actor":
|
|
1314
|
+
return await f0(t, e, n, a);
|
|
1315
|
+
case "participant":
|
|
1316
|
+
return await T0(t, e, n, a);
|
|
1317
|
+
}
|
|
1318
|
+
}, "drawActor"), E0 = /* @__PURE__ */ l(function(t, e, n) {
|
|
1319
|
+
const a = t.append("g");
|
|
1320
|
+
me(a, e), e.name && Ut(n)(
|
|
1321
|
+
e.name,
|
|
1322
|
+
a,
|
|
1323
|
+
e.x,
|
|
1324
|
+
e.y + (e.textMaxHeight || 0) / 2,
|
|
1325
|
+
e.width,
|
|
1326
|
+
0,
|
|
1327
|
+
{ class: "text" },
|
|
1328
|
+
n
|
|
1329
|
+
), a.lower();
|
|
1330
|
+
}, "drawBox"), w0 = /* @__PURE__ */ l(function(t) {
|
|
1331
|
+
return t.append("g");
|
|
1332
|
+
}, "anchorElement"), I0 = /* @__PURE__ */ l(function(t, e, n, a, s) {
|
|
1333
|
+
const r = Nt(), c = e.anchored;
|
|
1334
|
+
r.x = e.startx, r.y = e.starty, r.class = "activation" + s % 3, r.width = e.stopx - e.startx, r.height = n - e.starty, jt(c, r);
|
|
1335
|
+
}, "drawActivation"), L0 = /* @__PURE__ */ l(async function(t, e, n, a) {
|
|
1336
|
+
const {
|
|
1337
|
+
boxMargin: s,
|
|
1338
|
+
boxTextMargin: r,
|
|
1339
|
+
labelBoxHeight: c,
|
|
1340
|
+
labelBoxWidth: h,
|
|
1341
|
+
messageFontFamily: g,
|
|
1342
|
+
messageFontSize: i,
|
|
1343
|
+
messageFontWeight: x
|
|
1344
|
+
} = a, m = t.append("g"), u = /* @__PURE__ */ l(function(L, k, B, O) {
|
|
1345
|
+
return m.append("line").attr("x1", L).attr("y1", k).attr("x2", B).attr("y2", O).attr("class", "loopLine");
|
|
1346
|
+
}, "drawLoopLine");
|
|
1347
|
+
u(e.startx, e.starty, e.stopx, e.starty), u(e.stopx, e.starty, e.stopx, e.stopy), u(e.startx, e.stopy, e.stopx, e.stopy), u(e.startx, e.starty, e.startx, e.stopy), e.sections !== void 0 && e.sections.forEach(function(L) {
|
|
1348
|
+
u(e.startx, L.y, e.stopx, L.y).style(
|
|
1349
|
+
"stroke-dasharray",
|
|
1350
|
+
"3, 3"
|
|
1351
|
+
);
|
|
1352
|
+
});
|
|
1353
|
+
let T = zt();
|
|
1354
|
+
T.text = n, T.x = e.startx, T.y = e.starty, T.fontFamily = g, T.fontSize = i, T.fontWeight = x, T.anchor = "middle", T.valign = "middle", T.tspan = !1, T.width = h || 50, T.height = c || 20, T.textMargin = r, T.class = "labelText", xe(m, T), T = Te(), T.text = e.title, T.x = e.startx + h / 2 + (e.stopx - e.startx) / 2, T.y = e.starty + s + r, T.anchor = "middle", T.valign = "middle", T.textMargin = r, T.class = "loopText", T.fontFamily = g, T.fontSize = i, T.fontWeight = x, T.wrap = !0;
|
|
1355
|
+
let w = lt(T.text) ? await At(m, T, e) : bt(m, T);
|
|
1356
|
+
if (e.sectionTitles !== void 0) {
|
|
1357
|
+
for (const [L, k] of Object.entries(e.sectionTitles))
|
|
1358
|
+
if (k.message) {
|
|
1359
|
+
T.text = k.message, T.x = e.startx + (e.stopx - e.startx) / 2, T.y = e.sections[L].y + s + r, T.class = "loopText", T.anchor = "middle", T.valign = "middle", T.tspan = !1, T.fontFamily = g, T.fontSize = i, T.fontWeight = x, T.wrap = e.wrap, lt(T.text) ? (e.starty = e.sections[L].y, await At(m, T, e)) : bt(m, T);
|
|
1360
|
+
let B = Math.round(
|
|
1361
|
+
w.map((O) => (O._groups || O)[0][0].getBBox().height).reduce((O, $) => O + $)
|
|
1362
|
+
);
|
|
1363
|
+
e.sections[L].height += B - (s + r);
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
return e.height = Math.round(e.stopy - e.starty), m;
|
|
1367
|
+
}, "drawLoop"), me = /* @__PURE__ */ l(function(t, e) {
|
|
1368
|
+
Me(t, e);
|
|
1369
|
+
}, "drawBackgroundRect"), _0 = /* @__PURE__ */ l(function(t) {
|
|
1370
|
+
t.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
|
|
1371
|
+
"d",
|
|
1372
|
+
"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"
|
|
1373
|
+
);
|
|
1374
|
+
}, "insertDatabaseIcon"), v0 = /* @__PURE__ */ l(function(t) {
|
|
1375
|
+
t.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
|
|
1376
|
+
"d",
|
|
1377
|
+
"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"
|
|
1378
|
+
);
|
|
1379
|
+
}, "insertComputerIcon"), P0 = /* @__PURE__ */ l(function(t) {
|
|
1380
|
+
t.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
|
|
1381
|
+
"d",
|
|
1382
|
+
"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"
|
|
1383
|
+
);
|
|
1384
|
+
}, "insertClockIcon"), k0 = /* @__PURE__ */ l(function(t) {
|
|
1385
|
+
t.append("defs").append("marker").attr("id", "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");
|
|
1386
|
+
}, "insertArrowHead"), A0 = /* @__PURE__ */ l(function(t) {
|
|
1387
|
+
t.append("defs").append("marker").attr("id", "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");
|
|
1388
|
+
}, "insertArrowFilledHead"), N0 = /* @__PURE__ */ l(function(t) {
|
|
1389
|
+
t.append("defs").append("marker").attr("id", "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);
|
|
1390
|
+
}, "insertSequenceNumber"), M0 = /* @__PURE__ */ l(function(t) {
|
|
1391
|
+
t.append("defs").append("marker").attr("id", "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");
|
|
1392
|
+
}, "insertArrowCrossHead"), Te = /* @__PURE__ */ l(function() {
|
|
1393
|
+
return {
|
|
1394
|
+
x: 0,
|
|
1395
|
+
y: 0,
|
|
1396
|
+
fill: void 0,
|
|
1397
|
+
anchor: void 0,
|
|
1398
|
+
style: "#666",
|
|
1399
|
+
width: void 0,
|
|
1400
|
+
height: void 0,
|
|
1401
|
+
textMargin: 0,
|
|
1402
|
+
rx: 0,
|
|
1403
|
+
ry: 0,
|
|
1404
|
+
tspan: !0,
|
|
1405
|
+
valign: void 0
|
|
1406
|
+
};
|
|
1407
|
+
}, "getTextObj"), O0 = /* @__PURE__ */ l(function() {
|
|
1408
|
+
return {
|
|
1409
|
+
x: 0,
|
|
1410
|
+
y: 0,
|
|
1411
|
+
fill: "#EDF2AE",
|
|
1412
|
+
stroke: "#666",
|
|
1413
|
+
width: 100,
|
|
1414
|
+
anchor: "start",
|
|
1415
|
+
height: 100,
|
|
1416
|
+
rx: 0,
|
|
1417
|
+
ry: 0
|
|
1418
|
+
};
|
|
1419
|
+
}, "getNoteRect"), Ut = /* @__PURE__ */ function() {
|
|
1420
|
+
function t(r, c, h, g, i, x, m) {
|
|
1421
|
+
const u = c.append("text").attr("x", h + i / 2).attr("y", g + x / 2 + 5).style("text-anchor", "middle").text(r);
|
|
1422
|
+
s(u, m);
|
|
1423
|
+
}
|
|
1424
|
+
l(t, "byText");
|
|
1425
|
+
function e(r, c, h, g, i, x, m, u) {
|
|
1426
|
+
const { actorFontSize: T, actorFontFamily: w, actorFontWeight: L } = u, [k, B] = re(T), O = r.split(_.lineBreakRegex);
|
|
1427
|
+
for (let $ = 0; $ < O.length; $++) {
|
|
1428
|
+
const S = $ * k - k * (O.length - 1) / 2, W = c.append("text").attr("x", h + i / 2).attr("y", g).style("text-anchor", "middle").style("font-size", B).style("font-weight", L).style("font-family", w);
|
|
1429
|
+
W.append("tspan").attr("x", h + i / 2).attr("dy", S).text(O[$]), W.attr("y", g + x / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), s(W, m);
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
l(e, "byTspan");
|
|
1433
|
+
function n(r, c, h, g, i, x, m, u) {
|
|
1434
|
+
const T = c.append("switch"), w = T.append("foreignObject").attr("x", h).attr("y", g).attr("width", i).attr("height", x).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
1435
|
+
w.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(r), e(r, T, h, g, i, x, m, u), s(w, m);
|
|
1436
|
+
}
|
|
1437
|
+
l(n, "byFo");
|
|
1438
|
+
async function a(r, c, h, g, i, x, m, u) {
|
|
1439
|
+
const T = await wt(r, Yt()), w = c.append("switch"), L = w.append("foreignObject").attr("x", h + i / 2 - T.width / 2).attr("y", g + x / 2 - T.height / 2).attr("width", T.width).attr("height", T.height).append("xhtml:div").style("height", "100%").style("width", "100%");
|
|
1440
|
+
L.append("div").style("text-align", "center").style("vertical-align", "middle").html(await ie(r, Yt())), e(r, w, h, g, i, x, m, u), s(L, m);
|
|
1441
|
+
}
|
|
1442
|
+
l(a, "byKatex");
|
|
1443
|
+
function s(r, c) {
|
|
1444
|
+
for (const h in c)
|
|
1445
|
+
c.hasOwnProperty(h) && r.attr(h, c[h]);
|
|
1446
|
+
}
|
|
1447
|
+
return l(s, "_setTextAttrs"), function(r, c = !1) {
|
|
1448
|
+
return c ? a : r.textPlacement === "fo" ? n : r.textPlacement === "old" ? t : e;
|
|
1449
|
+
};
|
|
1450
|
+
}(), D0 = /* @__PURE__ */ function() {
|
|
1451
|
+
function t(s, r, c, h, g, i, x) {
|
|
1452
|
+
const m = r.append("text").attr("x", c).attr("y", h).style("text-anchor", "start").text(s);
|
|
1453
|
+
a(m, x);
|
|
1454
|
+
}
|
|
1455
|
+
l(t, "byText");
|
|
1456
|
+
function e(s, r, c, h, g, i, x, m) {
|
|
1457
|
+
const { actorFontSize: u, actorFontFamily: T, actorFontWeight: w } = m, L = s.split(_.lineBreakRegex);
|
|
1458
|
+
for (let k = 0; k < L.length; k++) {
|
|
1459
|
+
const B = k * u - u * (L.length - 1) / 2, O = r.append("text").attr("x", c).attr("y", h).style("text-anchor", "start").style("font-size", u).style("font-weight", w).style("font-family", T);
|
|
1460
|
+
O.append("tspan").attr("x", c).attr("dy", B).text(L[k]), O.attr("y", h + i / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), a(O, x);
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
l(e, "byTspan");
|
|
1464
|
+
function n(s, r, c, h, g, i, x, m) {
|
|
1465
|
+
const u = r.append("switch"), T = u.append("foreignObject").attr("x", c).attr("y", h).attr("width", g).attr("height", i).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
1466
|
+
T.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(s), e(s, u, c, h, g, i, x, m), a(T, x);
|
|
1467
|
+
}
|
|
1468
|
+
l(n, "byFo");
|
|
1469
|
+
function a(s, r) {
|
|
1470
|
+
for (const c in r)
|
|
1471
|
+
r.hasOwnProperty(c) && s.attr(c, r[c]);
|
|
1472
|
+
}
|
|
1473
|
+
return l(a, "_setTextAttrs"), function(s) {
|
|
1474
|
+
return s.textPlacement === "fo" ? n : s.textPlacement === "old" ? t : e;
|
|
1475
|
+
};
|
|
1476
|
+
}(), C = {
|
|
1477
|
+
drawRect: jt,
|
|
1478
|
+
drawText: bt,
|
|
1479
|
+
drawLabel: xe,
|
|
1480
|
+
drawActor: b0,
|
|
1481
|
+
drawBox: E0,
|
|
1482
|
+
drawPopup: y0,
|
|
1483
|
+
anchorElement: w0,
|
|
1484
|
+
drawActivation: I0,
|
|
1485
|
+
drawLoop: L0,
|
|
1486
|
+
drawBackgroundRect: me,
|
|
1487
|
+
insertArrowHead: k0,
|
|
1488
|
+
insertArrowFilledHead: A0,
|
|
1489
|
+
insertSequenceNumber: N0,
|
|
1490
|
+
insertArrowCrossHead: M0,
|
|
1491
|
+
insertDatabaseIcon: _0,
|
|
1492
|
+
insertComputerIcon: v0,
|
|
1493
|
+
insertClockIcon: P0,
|
|
1494
|
+
getTextObj: Te,
|
|
1495
|
+
getNoteRect: O0,
|
|
1496
|
+
fixLifeLineHeights: ye,
|
|
1497
|
+
sanitizeUrl: ae.sanitizeUrl
|
|
1498
|
+
}, o = {}, y = {
|
|
1499
|
+
data: {
|
|
1500
|
+
startx: void 0,
|
|
1501
|
+
stopx: void 0,
|
|
1502
|
+
starty: void 0,
|
|
1503
|
+
stopy: void 0
|
|
1504
|
+
},
|
|
1505
|
+
verticalPos: 0,
|
|
1506
|
+
sequenceItems: [],
|
|
1507
|
+
activations: [],
|
|
1508
|
+
models: {
|
|
1509
|
+
getHeight: /* @__PURE__ */ l(function() {
|
|
1510
|
+
return Math.max.apply(
|
|
1511
|
+
null,
|
|
1512
|
+
this.actors.length === 0 ? [0] : this.actors.map((t) => t.height || 0)
|
|
1513
|
+
) + (this.loops.length === 0 ? 0 : this.loops.map((t) => t.height || 0).reduce((t, e) => t + e)) + (this.messages.length === 0 ? 0 : this.messages.map((t) => t.height || 0).reduce((t, e) => t + e)) + (this.notes.length === 0 ? 0 : this.notes.map((t) => t.height || 0).reduce((t, e) => t + e));
|
|
1514
|
+
}, "getHeight"),
|
|
1515
|
+
clear: /* @__PURE__ */ l(function() {
|
|
1516
|
+
this.actors = [], this.boxes = [], this.loops = [], this.messages = [], this.notes = [];
|
|
1517
|
+
}, "clear"),
|
|
1518
|
+
addBox: /* @__PURE__ */ l(function(t) {
|
|
1519
|
+
this.boxes.push(t);
|
|
1520
|
+
}, "addBox"),
|
|
1521
|
+
addActor: /* @__PURE__ */ l(function(t) {
|
|
1522
|
+
this.actors.push(t);
|
|
1523
|
+
}, "addActor"),
|
|
1524
|
+
addLoop: /* @__PURE__ */ l(function(t) {
|
|
1525
|
+
this.loops.push(t);
|
|
1526
|
+
}, "addLoop"),
|
|
1527
|
+
addMessage: /* @__PURE__ */ l(function(t) {
|
|
1528
|
+
this.messages.push(t);
|
|
1529
|
+
}, "addMessage"),
|
|
1530
|
+
addNote: /* @__PURE__ */ l(function(t) {
|
|
1531
|
+
this.notes.push(t);
|
|
1532
|
+
}, "addNote"),
|
|
1533
|
+
lastActor: /* @__PURE__ */ l(function() {
|
|
1534
|
+
return this.actors[this.actors.length - 1];
|
|
1535
|
+
}, "lastActor"),
|
|
1536
|
+
lastLoop: /* @__PURE__ */ l(function() {
|
|
1537
|
+
return this.loops[this.loops.length - 1];
|
|
1538
|
+
}, "lastLoop"),
|
|
1539
|
+
lastMessage: /* @__PURE__ */ l(function() {
|
|
1540
|
+
return this.messages[this.messages.length - 1];
|
|
1541
|
+
}, "lastMessage"),
|
|
1542
|
+
lastNote: /* @__PURE__ */ l(function() {
|
|
1543
|
+
return this.notes[this.notes.length - 1];
|
|
1544
|
+
}, "lastNote"),
|
|
1545
|
+
actors: [],
|
|
1546
|
+
boxes: [],
|
|
1547
|
+
loops: [],
|
|
1548
|
+
messages: [],
|
|
1549
|
+
notes: []
|
|
1550
|
+
},
|
|
1551
|
+
init: /* @__PURE__ */ l(function() {
|
|
1552
|
+
this.sequenceItems = [], this.activations = [], this.models.clear(), this.data = {
|
|
1553
|
+
startx: void 0,
|
|
1554
|
+
stopx: void 0,
|
|
1555
|
+
starty: void 0,
|
|
1556
|
+
stopy: void 0
|
|
1557
|
+
}, this.verticalPos = 0, Ee(rt());
|
|
1558
|
+
}, "init"),
|
|
1559
|
+
updateVal: /* @__PURE__ */ l(function(t, e, n, a) {
|
|
1560
|
+
t[e] === void 0 ? t[e] = n : t[e] = a(n, t[e]);
|
|
1561
|
+
}, "updateVal"),
|
|
1562
|
+
updateBounds: /* @__PURE__ */ l(function(t, e, n, a) {
|
|
1563
|
+
const s = this;
|
|
1564
|
+
let r = 0;
|
|
1565
|
+
function c(h) {
|
|
1566
|
+
return /* @__PURE__ */ l(function(g) {
|
|
1567
|
+
r++;
|
|
1568
|
+
const i = s.sequenceItems.length - r + 1;
|
|
1569
|
+
s.updateVal(g, "starty", e - i * o.boxMargin, Math.min), s.updateVal(g, "stopy", a + i * o.boxMargin, Math.max), s.updateVal(y.data, "startx", t - i * o.boxMargin, Math.min), s.updateVal(y.data, "stopx", n + i * o.boxMargin, Math.max), h !== "activation" && (s.updateVal(g, "startx", t - i * o.boxMargin, Math.min), s.updateVal(g, "stopx", n + i * o.boxMargin, Math.max), s.updateVal(y.data, "starty", e - i * o.boxMargin, Math.min), s.updateVal(y.data, "stopy", a + i * o.boxMargin, Math.max));
|
|
1570
|
+
}, "updateItemBounds");
|
|
1571
|
+
}
|
|
1572
|
+
l(c, "updateFn"), this.sequenceItems.forEach(c()), this.activations.forEach(c("activation"));
|
|
1573
|
+
}, "updateBounds"),
|
|
1574
|
+
insert: /* @__PURE__ */ l(function(t, e, n, a) {
|
|
1575
|
+
const s = _.getMin(t, n), r = _.getMax(t, n), c = _.getMin(e, a), h = _.getMax(e, a);
|
|
1576
|
+
this.updateVal(y.data, "startx", s, Math.min), this.updateVal(y.data, "starty", c, Math.min), this.updateVal(y.data, "stopx", r, Math.max), this.updateVal(y.data, "stopy", h, Math.max), this.updateBounds(s, c, r, h);
|
|
1577
|
+
}, "insert"),
|
|
1578
|
+
newActivation: /* @__PURE__ */ l(function(t, e, n) {
|
|
1579
|
+
const a = n.get(t.from), s = Dt(t.from).length || 0, r = a.x + a.width / 2 + (s - 1) * o.activationWidth / 2;
|
|
1580
|
+
this.activations.push({
|
|
1581
|
+
startx: r,
|
|
1582
|
+
starty: this.verticalPos + 2,
|
|
1583
|
+
stopx: r + o.activationWidth,
|
|
1584
|
+
stopy: void 0,
|
|
1585
|
+
actor: t.from,
|
|
1586
|
+
anchored: C.anchorElement(e)
|
|
1587
|
+
});
|
|
1588
|
+
}, "newActivation"),
|
|
1589
|
+
endActivation: /* @__PURE__ */ l(function(t) {
|
|
1590
|
+
const e = this.activations.map(function(n) {
|
|
1591
|
+
return n.actor;
|
|
1592
|
+
}).lastIndexOf(t.from);
|
|
1593
|
+
return this.activations.splice(e, 1)[0];
|
|
1594
|
+
}, "endActivation"),
|
|
1595
|
+
createLoop: /* @__PURE__ */ l(function(t = { message: void 0, wrap: !1, width: void 0 }, e) {
|
|
1596
|
+
return {
|
|
1597
|
+
startx: void 0,
|
|
1598
|
+
starty: this.verticalPos,
|
|
1599
|
+
stopx: void 0,
|
|
1600
|
+
stopy: void 0,
|
|
1601
|
+
title: t.message,
|
|
1602
|
+
wrap: t.wrap,
|
|
1603
|
+
width: t.width,
|
|
1604
|
+
height: 0,
|
|
1605
|
+
fill: e
|
|
1606
|
+
};
|
|
1607
|
+
}, "createLoop"),
|
|
1608
|
+
newLoop: /* @__PURE__ */ l(function(t = { message: void 0, wrap: !1, width: void 0 }, e) {
|
|
1609
|
+
this.sequenceItems.push(this.createLoop(t, e));
|
|
1610
|
+
}, "newLoop"),
|
|
1611
|
+
endLoop: /* @__PURE__ */ l(function() {
|
|
1612
|
+
return this.sequenceItems.pop();
|
|
1613
|
+
}, "endLoop"),
|
|
1614
|
+
isLoopOverlap: /* @__PURE__ */ l(function() {
|
|
1615
|
+
return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : !1;
|
|
1616
|
+
}, "isLoopOverlap"),
|
|
1617
|
+
addSectionToLoop: /* @__PURE__ */ l(function(t) {
|
|
1618
|
+
const e = this.sequenceItems.pop();
|
|
1619
|
+
e.sections = e.sections || [], e.sectionTitles = e.sectionTitles || [], e.sections.push({ y: y.getVerticalPos(), height: 0 }), e.sectionTitles.push(t), this.sequenceItems.push(e);
|
|
1620
|
+
}, "addSectionToLoop"),
|
|
1621
|
+
saveVerticalPos: /* @__PURE__ */ l(function() {
|
|
1622
|
+
this.isLoopOverlap() && (this.savedVerticalPos = this.verticalPos);
|
|
1623
|
+
}, "saveVerticalPos"),
|
|
1624
|
+
resetVerticalPos: /* @__PURE__ */ l(function() {
|
|
1625
|
+
this.isLoopOverlap() && (this.verticalPos = this.savedVerticalPos);
|
|
1626
|
+
}, "resetVerticalPos"),
|
|
1627
|
+
bumpVerticalPos: /* @__PURE__ */ l(function(t) {
|
|
1628
|
+
this.verticalPos = this.verticalPos + t, this.data.stopy = _.getMax(this.data.stopy, this.verticalPos);
|
|
1629
|
+
}, "bumpVerticalPos"),
|
|
1630
|
+
getVerticalPos: /* @__PURE__ */ l(function() {
|
|
1631
|
+
return this.verticalPos;
|
|
1632
|
+
}, "getVerticalPos"),
|
|
1633
|
+
getBounds: /* @__PURE__ */ l(function() {
|
|
1634
|
+
return { bounds: this.data, models: this.models };
|
|
1635
|
+
}, "getBounds")
|
|
1636
|
+
}, S0 = /* @__PURE__ */ l(async function(t, e) {
|
|
1637
|
+
y.bumpVerticalPos(o.boxMargin), e.height = o.boxMargin, e.starty = y.getVerticalPos();
|
|
1638
|
+
const n = Nt();
|
|
1639
|
+
n.x = e.startx, n.y = e.starty, n.width = e.width || o.width, n.class = "note";
|
|
1640
|
+
const a = t.append("g"), s = C.drawRect(a, n), r = zt();
|
|
1641
|
+
r.x = e.startx, r.y = e.starty, r.width = n.width, r.dy = "1em", r.text = e.message, r.class = "noteText", r.fontFamily = o.noteFontFamily, r.fontSize = o.noteFontSize, r.fontWeight = o.noteFontWeight, r.anchor = o.noteAlign, r.textMargin = o.noteMargin, r.valign = "center";
|
|
1642
|
+
const c = lt(r.text) ? await At(a, r) : bt(a, r), h = Math.round(
|
|
1643
|
+
c.map((g) => (g._groups || g)[0][0].getBBox().height).reduce((g, i) => g + i)
|
|
1644
|
+
);
|
|
1645
|
+
s.attr("height", h + 2 * o.noteMargin), e.height += h + 2 * o.noteMargin, y.bumpVerticalPos(h + 2 * o.noteMargin), e.stopy = e.starty + h + 2 * o.noteMargin, e.stopx = e.startx + n.width, y.insert(e.startx, e.starty, e.stopx, e.stopy), y.models.addNote(e);
|
|
1646
|
+
}, "drawNote"), mt = /* @__PURE__ */ l((t) => ({
|
|
1647
|
+
fontFamily: t.messageFontFamily,
|
|
1648
|
+
fontSize: t.messageFontSize,
|
|
1649
|
+
fontWeight: t.messageFontWeight
|
|
1650
|
+
}), "messageFont"), ft = /* @__PURE__ */ l((t) => ({
|
|
1651
|
+
fontFamily: t.noteFontFamily,
|
|
1652
|
+
fontSize: t.noteFontSize,
|
|
1653
|
+
fontWeight: t.noteFontWeight
|
|
1654
|
+
}), "noteFont"), Wt = /* @__PURE__ */ l((t) => ({
|
|
1655
|
+
fontFamily: t.actorFontFamily,
|
|
1656
|
+
fontSize: t.actorFontSize,
|
|
1657
|
+
fontWeight: t.actorFontWeight
|
|
1658
|
+
}), "actorFont");
|
|
1659
|
+
async function fe(t, e) {
|
|
1660
|
+
y.bumpVerticalPos(10);
|
|
1661
|
+
const { startx: n, stopx: a, message: s } = e, r = _.splitBreaks(s).length, c = lt(s), h = c ? await wt(s, rt()) : Y.calculateTextDimensions(s, mt(o));
|
|
1662
|
+
if (!c) {
|
|
1663
|
+
const m = h.height / r;
|
|
1664
|
+
e.height += m, y.bumpVerticalPos(m);
|
|
1665
|
+
}
|
|
1666
|
+
let g, i = h.height - 10;
|
|
1667
|
+
const x = h.width;
|
|
1668
|
+
if (n === a) {
|
|
1669
|
+
g = y.getVerticalPos() + i, o.rightAngles || (i += o.boxMargin, g = y.getVerticalPos() + i), i += 30;
|
|
1670
|
+
const m = _.getMax(x / 2, o.width / 2);
|
|
1671
|
+
y.insert(
|
|
1672
|
+
n - m,
|
|
1673
|
+
y.getVerticalPos() - 10 + i,
|
|
1674
|
+
a + m,
|
|
1675
|
+
y.getVerticalPos() + 30 + i
|
|
1676
|
+
);
|
|
1677
|
+
} else
|
|
1678
|
+
i += o.boxMargin, g = y.getVerticalPos() + i, y.insert(n, g - 10, a, g);
|
|
1679
|
+
return y.bumpVerticalPos(i), e.height += i, e.stopy = e.starty + e.height, y.insert(e.fromBounds, e.starty, e.toBounds, e.stopy), g;
|
|
1680
|
+
}
|
|
1681
|
+
l(fe, "boundMessage");
|
|
1682
|
+
var R0 = /* @__PURE__ */ l(async function(t, e, n, a) {
|
|
1683
|
+
const { startx: s, stopx: r, starty: c, message: h, type: g, sequenceIndex: i, sequenceVisible: x } = e, m = Y.calculateTextDimensions(h, mt(o)), u = zt();
|
|
1684
|
+
u.x = s, u.y = c + 10, u.width = r - s, u.class = "messageText", u.dy = "1em", u.text = h, u.fontFamily = o.messageFontFamily, u.fontSize = o.messageFontSize, u.fontWeight = o.messageFontWeight, u.anchor = o.messageAlign, u.valign = "center", u.textMargin = o.wrapPadding, u.tspan = !1, lt(u.text) ? await At(t, u, { startx: s, stopx: r, starty: n }) : bt(t, u);
|
|
1685
|
+
const T = m.width;
|
|
1686
|
+
let w;
|
|
1687
|
+
s === r ? o.rightAngles ? w = t.append("path").attr(
|
|
1688
|
+
"d",
|
|
1689
|
+
`M ${s},${n} H ${s + _.getMax(o.width / 2, T / 2)} V ${n + 25} H ${s}`
|
|
1690
|
+
) : w = t.append("path").attr(
|
|
1691
|
+
"d",
|
|
1692
|
+
"M " + s + "," + n + " C " + (s + 60) + "," + (n - 10) + " " + (s + 60) + "," + (n + 30) + " " + s + "," + (n + 20)
|
|
1693
|
+
) : (w = t.append("line"), w.attr("x1", s), w.attr("y1", n), w.attr("x2", r), w.attr("y2", n)), g === a.db.LINETYPE.DOTTED || g === a.db.LINETYPE.DOTTED_CROSS || g === a.db.LINETYPE.DOTTED_POINT || g === a.db.LINETYPE.DOTTED_OPEN || g === a.db.LINETYPE.BIDIRECTIONAL_DOTTED ? (w.style("stroke-dasharray", "3, 3"), w.attr("class", "messageLine1")) : w.attr("class", "messageLine0");
|
|
1694
|
+
let L = "";
|
|
1695
|
+
o.arrowMarkerAbsolute && (L = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, L = L.replace(/\(/g, "\\("), L = L.replace(/\)/g, "\\)")), w.attr("stroke-width", 2), w.attr("stroke", "none"), w.style("fill", "none"), (g === a.db.LINETYPE.SOLID || g === a.db.LINETYPE.DOTTED) && w.attr("marker-end", "url(" + L + "#arrowhead)"), (g === a.db.LINETYPE.BIDIRECTIONAL_SOLID || g === a.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (w.attr("marker-start", "url(" + L + "#arrowhead)"), w.attr("marker-end", "url(" + L + "#arrowhead)")), (g === a.db.LINETYPE.SOLID_POINT || g === a.db.LINETYPE.DOTTED_POINT) && w.attr("marker-end", "url(" + L + "#filled-head)"), (g === a.db.LINETYPE.SOLID_CROSS || g === a.db.LINETYPE.DOTTED_CROSS) && w.attr("marker-end", "url(" + L + "#crosshead)"), (x || o.showSequenceNumbers) && (w.attr("marker-start", "url(" + L + "#sequencenumber)"), t.append("text").attr("x", s).attr("y", n + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(i));
|
|
1696
|
+
}, "drawMessage"), C0 = /* @__PURE__ */ l(function(t, e, n, a, s, r, c) {
|
|
1697
|
+
let h = 0, g = 0, i, x = 0;
|
|
1698
|
+
for (const m of a) {
|
|
1699
|
+
const u = e.get(m), T = u.box;
|
|
1700
|
+
i && i != T && (c || y.models.addBox(i), g += o.boxMargin + i.margin), T && T != i && (c || (T.x = h + g, T.y = s), g += T.margin), u.width = u.width || o.width, u.height = _.getMax(u.height || o.height, o.height), u.margin = u.margin || o.actorMargin, x = _.getMax(x, u.height), n.get(u.name) && (g += u.width / 2), u.x = h + g, u.starty = y.getVerticalPos(), y.insert(u.x, s, u.x + u.width, u.height), h += u.width + g, u.box && (u.box.width = h + T.margin - u.box.x), g = u.margin, i = u.box, y.models.addActor(u);
|
|
1701
|
+
}
|
|
1702
|
+
i && !c && y.models.addBox(i), y.bumpVerticalPos(x);
|
|
1703
|
+
}, "addActorRenderingData"), qt = /* @__PURE__ */ l(async function(t, e, n, a) {
|
|
1704
|
+
if (a) {
|
|
1705
|
+
let s = 0;
|
|
1706
|
+
y.bumpVerticalPos(o.boxMargin * 2);
|
|
1707
|
+
for (const r of n) {
|
|
1708
|
+
const c = e.get(r);
|
|
1709
|
+
c.stopy || (c.stopy = y.getVerticalPos());
|
|
1710
|
+
const h = await C.drawActor(t, c, o, !0);
|
|
1711
|
+
s = _.getMax(s, h);
|
|
1712
|
+
}
|
|
1713
|
+
y.bumpVerticalPos(s + o.boxMargin);
|
|
1714
|
+
} else
|
|
1715
|
+
for (const s of n) {
|
|
1716
|
+
const r = e.get(s);
|
|
1717
|
+
await C.drawActor(t, r, o, !1);
|
|
1718
|
+
}
|
|
1719
|
+
}, "drawActors"), be = /* @__PURE__ */ l(function(t, e, n, a) {
|
|
1720
|
+
let s = 0, r = 0;
|
|
1721
|
+
for (const c of n) {
|
|
1722
|
+
const h = e.get(c), g = $0(h), i = C.drawPopup(
|
|
1723
|
+
t,
|
|
1724
|
+
h,
|
|
1725
|
+
g,
|
|
1726
|
+
o,
|
|
1727
|
+
o.forceMenus,
|
|
1728
|
+
a
|
|
1729
|
+
);
|
|
1730
|
+
i.height > s && (s = i.height), i.width + h.x > r && (r = i.width + h.x);
|
|
1731
|
+
}
|
|
1732
|
+
return { maxHeight: s, maxWidth: r };
|
|
1733
|
+
}, "drawActorsPopup"), Ee = /* @__PURE__ */ l(function(t) {
|
|
1734
|
+
We(o, t), t.fontFamily && (o.actorFontFamily = o.noteFontFamily = o.messageFontFamily = t.fontFamily), t.fontSize && (o.actorFontSize = o.noteFontSize = o.messageFontSize = t.fontSize), t.fontWeight && (o.actorFontWeight = o.noteFontWeight = o.messageFontWeight = t.fontWeight);
|
|
1735
|
+
}, "setConf"), Dt = /* @__PURE__ */ l(function(t) {
|
|
1736
|
+
return y.activations.filter(function(e) {
|
|
1737
|
+
return e.actor === t;
|
|
1738
|
+
});
|
|
1739
|
+
}, "actorActivations"), ee = /* @__PURE__ */ l(function(t, e) {
|
|
1740
|
+
const n = e.get(t), a = Dt(t), s = a.reduce(
|
|
1741
|
+
function(c, h) {
|
|
1742
|
+
return _.getMin(c, h.startx);
|
|
1743
|
+
},
|
|
1744
|
+
n.x + n.width / 2 - 1
|
|
1745
|
+
), r = a.reduce(
|
|
1746
|
+
function(c, h) {
|
|
1747
|
+
return _.getMax(c, h.stopx);
|
|
1748
|
+
},
|
|
1749
|
+
n.x + n.width / 2 + 1
|
|
1750
|
+
);
|
|
1751
|
+
return [s, r];
|
|
1752
|
+
}, "activationBounds");
|
|
1753
|
+
function ot(t, e, n, a, s) {
|
|
1754
|
+
y.bumpVerticalPos(n);
|
|
1755
|
+
let r = a;
|
|
1756
|
+
if (e.id && e.message && t[e.id]) {
|
|
1757
|
+
const c = t[e.id].width, h = mt(o);
|
|
1758
|
+
e.message = Y.wrapLabel(`[${e.message}]`, c - 2 * o.wrapPadding, h), e.width = c, e.wrap = !0;
|
|
1759
|
+
const g = Y.calculateTextDimensions(e.message, h), i = _.getMax(g.height, o.labelBoxHeight);
|
|
1760
|
+
r = a + i, G.debug(`${i} - ${e.message}`);
|
|
1761
|
+
}
|
|
1762
|
+
s(e), y.bumpVerticalPos(r);
|
|
1763
|
+
}
|
|
1764
|
+
l(ot, "adjustLoopHeightForWrap");
|
|
1765
|
+
function we(t, e, n, a, s, r, c) {
|
|
1766
|
+
function h(i, x) {
|
|
1767
|
+
i.x < s.get(t.from).x ? (y.insert(
|
|
1768
|
+
e.stopx - x,
|
|
1769
|
+
e.starty,
|
|
1770
|
+
e.startx,
|
|
1771
|
+
e.stopy + i.height / 2 + o.noteMargin
|
|
1772
|
+
), e.stopx = e.stopx + x) : (y.insert(
|
|
1773
|
+
e.startx,
|
|
1774
|
+
e.starty,
|
|
1775
|
+
e.stopx + x,
|
|
1776
|
+
e.stopy + i.height / 2 + o.noteMargin
|
|
1777
|
+
), e.stopx = e.stopx - x);
|
|
1778
|
+
}
|
|
1779
|
+
l(h, "receiverAdjustment");
|
|
1780
|
+
function g(i, x) {
|
|
1781
|
+
i.x < s.get(t.to).x ? (y.insert(
|
|
1782
|
+
e.startx - x,
|
|
1783
|
+
e.starty,
|
|
1784
|
+
e.stopx,
|
|
1785
|
+
e.stopy + i.height / 2 + o.noteMargin
|
|
1786
|
+
), e.startx = e.startx + x) : (y.insert(
|
|
1787
|
+
e.stopx,
|
|
1788
|
+
e.starty,
|
|
1789
|
+
e.startx + x,
|
|
1790
|
+
e.stopy + i.height / 2 + o.noteMargin
|
|
1791
|
+
), e.startx = e.startx - x);
|
|
1792
|
+
}
|
|
1793
|
+
if (l(g, "senderAdjustment"), r.get(t.to) == a) {
|
|
1794
|
+
const i = s.get(t.to), x = i.type == "actor" ? xt / 2 + 3 : i.width / 2 + 3;
|
|
1795
|
+
h(i, x), i.starty = n - i.height / 2, y.bumpVerticalPos(i.height / 2);
|
|
1796
|
+
} else if (c.get(t.from) == a) {
|
|
1797
|
+
const i = s.get(t.from);
|
|
1798
|
+
if (o.mirrorActors) {
|
|
1799
|
+
const x = i.type == "actor" ? xt / 2 : i.width / 2;
|
|
1800
|
+
g(i, x);
|
|
1801
|
+
}
|
|
1802
|
+
i.stopy = n - i.height / 2, y.bumpVerticalPos(i.height / 2);
|
|
1803
|
+
} else if (c.get(t.to) == a) {
|
|
1804
|
+
const i = s.get(t.to);
|
|
1805
|
+
if (o.mirrorActors) {
|
|
1806
|
+
const x = i.type == "actor" ? xt / 2 + 3 : i.width / 2 + 3;
|
|
1807
|
+
h(i, x);
|
|
1808
|
+
}
|
|
1809
|
+
i.stopy = n - i.height / 2, y.bumpVerticalPos(i.height / 2);
|
|
1810
|
+
}
|
|
1811
|
+
}
|
|
1812
|
+
l(we, "adjustCreatedDestroyedData");
|
|
1813
|
+
var B0 = /* @__PURE__ */ l(async function(t, e, n, a) {
|
|
1814
|
+
const { securityLevel: s, sequence: r } = rt();
|
|
1815
|
+
o = r;
|
|
1816
|
+
let c;
|
|
1817
|
+
s === "sandbox" && (c = kt("#i" + e));
|
|
1818
|
+
const h = s === "sandbox" ? kt(c.nodes()[0].contentDocument.body) : kt("body"), g = s === "sandbox" ? c.nodes()[0].contentDocument : document;
|
|
1819
|
+
y.init(), G.debug(a.db);
|
|
1820
|
+
const i = s === "sandbox" ? h.select(`[id="${e}"]`) : kt(`[id="${e}"]`), x = a.db.getActors(), m = a.db.getCreatedActors(), u = a.db.getDestroyedActors(), T = a.db.getBoxes();
|
|
1821
|
+
let w = a.db.getActorKeys();
|
|
1822
|
+
const L = a.db.getMessages(), k = a.db.getDiagramTitle(), B = a.db.hasAtLeastOneBox(), O = a.db.hasAtLeastOneBoxWithTitle(), $ = await Ie(x, L, a);
|
|
1823
|
+
if (o.height = await Le(x, $, T), C.insertComputerIcon(i), C.insertDatabaseIcon(i), C.insertClockIcon(i), B && (y.bumpVerticalPos(o.boxMargin), O && y.bumpVerticalPos(T[0].textMaxHeight)), o.hideUnusedParticipants === !0) {
|
|
1824
|
+
const f = /* @__PURE__ */ new Set();
|
|
1825
|
+
L.forEach((P) => {
|
|
1826
|
+
f.add(P.from), f.add(P.to);
|
|
1827
|
+
}), w = w.filter((P) => f.has(P));
|
|
1828
|
+
}
|
|
1829
|
+
C0(i, x, m, w, 0, L, !1);
|
|
1830
|
+
const S = await F0(L, x, $, a);
|
|
1831
|
+
C.insertArrowHead(i), C.insertArrowCrossHead(i), C.insertArrowFilledHead(i), C.insertSequenceNumber(i);
|
|
1832
|
+
function W(f, P) {
|
|
1833
|
+
const X = y.endActivation(f);
|
|
1834
|
+
X.starty + 18 > P && (X.starty = P - 6, P += 12), C.drawActivation(
|
|
1835
|
+
i,
|
|
1836
|
+
X,
|
|
1837
|
+
P,
|
|
1838
|
+
o,
|
|
1839
|
+
Dt(f.from).length
|
|
1840
|
+
), y.insert(X.startx, P - 10, X.stopx, P);
|
|
1841
|
+
}
|
|
1842
|
+
l(W, "activeEnd");
|
|
1843
|
+
let q = 1, J = 1;
|
|
1844
|
+
const et = [], z = [];
|
|
1845
|
+
let H = 0;
|
|
1846
|
+
for (const f of L) {
|
|
1847
|
+
let P, X, it;
|
|
1848
|
+
switch (f.type) {
|
|
1849
|
+
case a.db.LINETYPE.NOTE:
|
|
1850
|
+
y.resetVerticalPos(), X = f.noteModel, await S0(i, X);
|
|
1851
|
+
break;
|
|
1852
|
+
case a.db.LINETYPE.ACTIVE_START:
|
|
1853
|
+
y.newActivation(f, i, x);
|
|
1854
|
+
break;
|
|
1855
|
+
case a.db.LINETYPE.ACTIVE_END:
|
|
1856
|
+
W(f, y.getVerticalPos());
|
|
1857
|
+
break;
|
|
1858
|
+
case a.db.LINETYPE.LOOP_START:
|
|
1859
|
+
ot(
|
|
1860
|
+
S,
|
|
1861
|
+
f,
|
|
1862
|
+
o.boxMargin,
|
|
1863
|
+
o.boxMargin + o.boxTextMargin,
|
|
1864
|
+
(A) => y.newLoop(A)
|
|
1865
|
+
);
|
|
1866
|
+
break;
|
|
1867
|
+
case a.db.LINETYPE.LOOP_END:
|
|
1868
|
+
P = y.endLoop(), await C.drawLoop(i, P, "loop", o), y.bumpVerticalPos(P.stopy - y.getVerticalPos()), y.models.addLoop(P);
|
|
1869
|
+
break;
|
|
1870
|
+
case a.db.LINETYPE.RECT_START:
|
|
1871
|
+
ot(
|
|
1872
|
+
S,
|
|
1873
|
+
f,
|
|
1874
|
+
o.boxMargin,
|
|
1875
|
+
o.boxMargin,
|
|
1876
|
+
(A) => y.newLoop(void 0, A.message)
|
|
1877
|
+
);
|
|
1878
|
+
break;
|
|
1879
|
+
case a.db.LINETYPE.RECT_END:
|
|
1880
|
+
P = y.endLoop(), z.push(P), y.models.addLoop(P), y.bumpVerticalPos(P.stopy - y.getVerticalPos());
|
|
1881
|
+
break;
|
|
1882
|
+
case a.db.LINETYPE.OPT_START:
|
|
1883
|
+
ot(
|
|
1884
|
+
S,
|
|
1885
|
+
f,
|
|
1886
|
+
o.boxMargin,
|
|
1887
|
+
o.boxMargin + o.boxTextMargin,
|
|
1888
|
+
(A) => y.newLoop(A)
|
|
1889
|
+
);
|
|
1890
|
+
break;
|
|
1891
|
+
case a.db.LINETYPE.OPT_END:
|
|
1892
|
+
P = y.endLoop(), await C.drawLoop(i, P, "opt", o), y.bumpVerticalPos(P.stopy - y.getVerticalPos()), y.models.addLoop(P);
|
|
1893
|
+
break;
|
|
1894
|
+
case a.db.LINETYPE.ALT_START:
|
|
1895
|
+
ot(
|
|
1896
|
+
S,
|
|
1897
|
+
f,
|
|
1898
|
+
o.boxMargin,
|
|
1899
|
+
o.boxMargin + o.boxTextMargin,
|
|
1900
|
+
(A) => y.newLoop(A)
|
|
1901
|
+
);
|
|
1902
|
+
break;
|
|
1903
|
+
case a.db.LINETYPE.ALT_ELSE:
|
|
1904
|
+
ot(
|
|
1905
|
+
S,
|
|
1906
|
+
f,
|
|
1907
|
+
o.boxMargin + o.boxTextMargin,
|
|
1908
|
+
o.boxMargin,
|
|
1909
|
+
(A) => y.addSectionToLoop(A)
|
|
1910
|
+
);
|
|
1911
|
+
break;
|
|
1912
|
+
case a.db.LINETYPE.ALT_END:
|
|
1913
|
+
P = y.endLoop(), await C.drawLoop(i, P, "alt", o), y.bumpVerticalPos(P.stopy - y.getVerticalPos()), y.models.addLoop(P);
|
|
1914
|
+
break;
|
|
1915
|
+
case a.db.LINETYPE.PAR_START:
|
|
1916
|
+
case a.db.LINETYPE.PAR_OVER_START:
|
|
1917
|
+
ot(
|
|
1918
|
+
S,
|
|
1919
|
+
f,
|
|
1920
|
+
o.boxMargin,
|
|
1921
|
+
o.boxMargin + o.boxTextMargin,
|
|
1922
|
+
(A) => y.newLoop(A)
|
|
1923
|
+
), y.saveVerticalPos();
|
|
1924
|
+
break;
|
|
1925
|
+
case a.db.LINETYPE.PAR_AND:
|
|
1926
|
+
ot(
|
|
1927
|
+
S,
|
|
1928
|
+
f,
|
|
1929
|
+
o.boxMargin + o.boxTextMargin,
|
|
1930
|
+
o.boxMargin,
|
|
1931
|
+
(A) => y.addSectionToLoop(A)
|
|
1932
|
+
);
|
|
1933
|
+
break;
|
|
1934
|
+
case a.db.LINETYPE.PAR_END:
|
|
1935
|
+
P = y.endLoop(), await C.drawLoop(i, P, "par", o), y.bumpVerticalPos(P.stopy - y.getVerticalPos()), y.models.addLoop(P);
|
|
1936
|
+
break;
|
|
1937
|
+
case a.db.LINETYPE.AUTONUMBER:
|
|
1938
|
+
q = f.message.start || q, J = f.message.step || J, f.message.visible ? a.db.enableSequenceNumbers() : a.db.disableSequenceNumbers();
|
|
1939
|
+
break;
|
|
1940
|
+
case a.db.LINETYPE.CRITICAL_START:
|
|
1941
|
+
ot(
|
|
1942
|
+
S,
|
|
1943
|
+
f,
|
|
1944
|
+
o.boxMargin,
|
|
1945
|
+
o.boxMargin + o.boxTextMargin,
|
|
1946
|
+
(A) => y.newLoop(A)
|
|
1947
|
+
);
|
|
1948
|
+
break;
|
|
1949
|
+
case a.db.LINETYPE.CRITICAL_OPTION:
|
|
1950
|
+
ot(
|
|
1951
|
+
S,
|
|
1952
|
+
f,
|
|
1953
|
+
o.boxMargin + o.boxTextMargin,
|
|
1954
|
+
o.boxMargin,
|
|
1955
|
+
(A) => y.addSectionToLoop(A)
|
|
1956
|
+
);
|
|
1957
|
+
break;
|
|
1958
|
+
case a.db.LINETYPE.CRITICAL_END:
|
|
1959
|
+
P = y.endLoop(), await C.drawLoop(i, P, "critical", o), y.bumpVerticalPos(P.stopy - y.getVerticalPos()), y.models.addLoop(P);
|
|
1960
|
+
break;
|
|
1961
|
+
case a.db.LINETYPE.BREAK_START:
|
|
1962
|
+
ot(
|
|
1963
|
+
S,
|
|
1964
|
+
f,
|
|
1965
|
+
o.boxMargin,
|
|
1966
|
+
o.boxMargin + o.boxTextMargin,
|
|
1967
|
+
(A) => y.newLoop(A)
|
|
1968
|
+
);
|
|
1969
|
+
break;
|
|
1970
|
+
case a.db.LINETYPE.BREAK_END:
|
|
1971
|
+
P = y.endLoop(), await C.drawLoop(i, P, "break", o), y.bumpVerticalPos(P.stopy - y.getVerticalPos()), y.models.addLoop(P);
|
|
1972
|
+
break;
|
|
1973
|
+
default:
|
|
1974
|
+
try {
|
|
1975
|
+
it = f.msgModel, it.starty = y.getVerticalPos(), it.sequenceIndex = q, it.sequenceVisible = a.db.showSequenceNumbers();
|
|
1976
|
+
const A = await fe(i, it);
|
|
1977
|
+
we(
|
|
1978
|
+
f,
|
|
1979
|
+
it,
|
|
1980
|
+
A,
|
|
1981
|
+
H,
|
|
1982
|
+
x,
|
|
1983
|
+
m,
|
|
1984
|
+
u
|
|
1985
|
+
), et.push({ messageModel: it, lineStartY: A }), y.models.addMessage(it);
|
|
1986
|
+
} catch (A) {
|
|
1987
|
+
G.error("error while drawing message", A);
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1990
|
+
[
|
|
1991
|
+
a.db.LINETYPE.SOLID_OPEN,
|
|
1992
|
+
a.db.LINETYPE.DOTTED_OPEN,
|
|
1993
|
+
a.db.LINETYPE.SOLID,
|
|
1994
|
+
a.db.LINETYPE.DOTTED,
|
|
1995
|
+
a.db.LINETYPE.SOLID_CROSS,
|
|
1996
|
+
a.db.LINETYPE.DOTTED_CROSS,
|
|
1997
|
+
a.db.LINETYPE.SOLID_POINT,
|
|
1998
|
+
a.db.LINETYPE.DOTTED_POINT,
|
|
1999
|
+
a.db.LINETYPE.BIDIRECTIONAL_SOLID,
|
|
2000
|
+
a.db.LINETYPE.BIDIRECTIONAL_DOTTED
|
|
2001
|
+
].includes(f.type) && (q = q + J), H++;
|
|
2002
|
+
}
|
|
2003
|
+
G.debug("createdActors", m), G.debug("destroyedActors", u), await qt(i, x, w, !1);
|
|
2004
|
+
for (const f of et)
|
|
2005
|
+
await R0(i, f.messageModel, f.lineStartY, a);
|
|
2006
|
+
o.mirrorActors && await qt(i, x, w, !0), z.forEach((f) => C.drawBackgroundRect(i, f)), ye(i, x, w, o);
|
|
2007
|
+
for (const f of y.models.boxes)
|
|
2008
|
+
f.height = y.getVerticalPos() - f.y, y.insert(f.x, f.y, f.x + f.width, f.height), f.startx = f.x, f.starty = f.y, f.stopx = f.startx + f.width, f.stopy = f.starty + f.height, f.stroke = "rgb(0,0,0, 0.5)", C.drawBox(i, f, o);
|
|
2009
|
+
B && y.bumpVerticalPos(o.boxMargin);
|
|
2010
|
+
const F = be(i, x, w, g), { bounds: D } = y.getBounds();
|
|
2011
|
+
D.startx === void 0 && (D.startx = 0), D.starty === void 0 && (D.starty = 0), D.stopx === void 0 && (D.stopx = 0), D.stopy === void 0 && (D.stopy = 0);
|
|
2012
|
+
let Z = D.stopy - D.starty;
|
|
2013
|
+
Z < F.maxHeight && (Z = F.maxHeight);
|
|
2014
|
+
let j = Z + 2 * o.diagramMarginY;
|
|
2015
|
+
o.mirrorActors && (j = j - o.boxMargin + o.bottomMarginAdj);
|
|
2016
|
+
let Q = D.stopx - D.startx;
|
|
2017
|
+
Q < F.maxWidth && (Q = F.maxWidth);
|
|
2018
|
+
const at = Q + 2 * o.diagramMarginX;
|
|
2019
|
+
k && i.append("text").text(k).attr("x", (D.stopx - D.startx) / 2 - 2 * o.diagramMarginX).attr("y", -25), qe(i, j, at, o.useMaxWidth);
|
|
2020
|
+
const M = k ? 40 : 0;
|
|
2021
|
+
i.attr(
|
|
2022
|
+
"viewBox",
|
|
2023
|
+
D.startx - o.diagramMarginX + " -" + (o.diagramMarginY + M) + " " + at + " " + (j + M)
|
|
2024
|
+
), G.debug("models:", y.models);
|
|
2025
|
+
}, "draw");
|
|
2026
|
+
async function Ie(t, e, n) {
|
|
2027
|
+
const a = {};
|
|
2028
|
+
for (const s of e)
|
|
2029
|
+
if (t.get(s.to) && t.get(s.from)) {
|
|
2030
|
+
const r = t.get(s.to);
|
|
2031
|
+
if (s.placement === n.db.PLACEMENT.LEFTOF && !r.prevActor || s.placement === n.db.PLACEMENT.RIGHTOF && !r.nextActor)
|
|
2032
|
+
continue;
|
|
2033
|
+
const c = s.placement !== void 0, h = !c, g = c ? ft(o) : mt(o), i = s.wrap ? Y.wrapLabel(s.message, o.width - 2 * o.wrapPadding, g) : s.message, x = (lt(i) ? await wt(s.message, rt()) : Y.calculateTextDimensions(i, g)).width + 2 * o.wrapPadding;
|
|
2034
|
+
h && s.from === r.nextActor ? a[s.to] = _.getMax(
|
|
2035
|
+
a[s.to] || 0,
|
|
2036
|
+
x
|
|
2037
|
+
) : h && s.from === r.prevActor ? a[s.from] = _.getMax(
|
|
2038
|
+
a[s.from] || 0,
|
|
2039
|
+
x
|
|
2040
|
+
) : h && s.from === s.to ? (a[s.from] = _.getMax(
|
|
2041
|
+
a[s.from] || 0,
|
|
2042
|
+
x / 2
|
|
2043
|
+
), a[s.to] = _.getMax(
|
|
2044
|
+
a[s.to] || 0,
|
|
2045
|
+
x / 2
|
|
2046
|
+
)) : s.placement === n.db.PLACEMENT.RIGHTOF ? a[s.from] = _.getMax(
|
|
2047
|
+
a[s.from] || 0,
|
|
2048
|
+
x
|
|
2049
|
+
) : s.placement === n.db.PLACEMENT.LEFTOF ? a[r.prevActor] = _.getMax(
|
|
2050
|
+
a[r.prevActor] || 0,
|
|
2051
|
+
x
|
|
2052
|
+
) : s.placement === n.db.PLACEMENT.OVER && (r.prevActor && (a[r.prevActor] = _.getMax(
|
|
2053
|
+
a[r.prevActor] || 0,
|
|
2054
|
+
x / 2
|
|
2055
|
+
)), r.nextActor && (a[s.from] = _.getMax(
|
|
2056
|
+
a[s.from] || 0,
|
|
2057
|
+
x / 2
|
|
2058
|
+
)));
|
|
2059
|
+
}
|
|
2060
|
+
return G.debug("maxMessageWidthPerActor:", a), a;
|
|
2061
|
+
}
|
|
2062
|
+
l(Ie, "getMaxMessageWidthPerActor");
|
|
2063
|
+
var $0 = /* @__PURE__ */ l(function(t) {
|
|
2064
|
+
let e = 0;
|
|
2065
|
+
const n = Wt(o);
|
|
2066
|
+
for (const a in t.links) {
|
|
2067
|
+
const s = Y.calculateTextDimensions(a, n).width + 2 * o.wrapPadding + 2 * o.boxMargin;
|
|
2068
|
+
e < s && (e = s);
|
|
2069
|
+
}
|
|
2070
|
+
return e;
|
|
2071
|
+
}, "getRequiredPopupWidth");
|
|
2072
|
+
async function Le(t, e, n) {
|
|
2073
|
+
let a = 0;
|
|
2074
|
+
for (const r of t.keys()) {
|
|
2075
|
+
const c = t.get(r);
|
|
2076
|
+
c.wrap && (c.description = Y.wrapLabel(
|
|
2077
|
+
c.description,
|
|
2078
|
+
o.width - 2 * o.wrapPadding,
|
|
2079
|
+
Wt(o)
|
|
2080
|
+
));
|
|
2081
|
+
const h = lt(c.description) ? await wt(c.description, rt()) : Y.calculateTextDimensions(c.description, Wt(o));
|
|
2082
|
+
c.width = c.wrap ? o.width : _.getMax(o.width, h.width + 2 * o.wrapPadding), c.height = c.wrap ? _.getMax(h.height, o.height) : o.height, a = _.getMax(a, c.height);
|
|
2083
|
+
}
|
|
2084
|
+
for (const r in e) {
|
|
2085
|
+
const c = t.get(r);
|
|
2086
|
+
if (!c)
|
|
2087
|
+
continue;
|
|
2088
|
+
const h = t.get(c.nextActor);
|
|
2089
|
+
if (!h) {
|
|
2090
|
+
const i = e[r] + o.actorMargin - c.width / 2;
|
|
2091
|
+
c.margin = _.getMax(i, o.actorMargin);
|
|
2092
|
+
continue;
|
|
2093
|
+
}
|
|
2094
|
+
const g = e[r] + o.actorMargin - c.width / 2 - h.width / 2;
|
|
2095
|
+
c.margin = _.getMax(g, o.actorMargin);
|
|
2096
|
+
}
|
|
2097
|
+
let s = 0;
|
|
2098
|
+
return n.forEach((r) => {
|
|
2099
|
+
const c = mt(o);
|
|
2100
|
+
let h = r.actorKeys.reduce((x, m) => x += t.get(m).width + (t.get(m).margin || 0), 0);
|
|
2101
|
+
h -= 2 * o.boxTextMargin, r.wrap && (r.name = Y.wrapLabel(r.name, h - 2 * o.wrapPadding, c));
|
|
2102
|
+
const g = Y.calculateTextDimensions(r.name, c);
|
|
2103
|
+
s = _.getMax(g.height, s);
|
|
2104
|
+
const i = _.getMax(h, g.width + 2 * o.wrapPadding);
|
|
2105
|
+
if (r.margin = o.boxTextMargin, h < i) {
|
|
2106
|
+
const x = (i - h) / 2;
|
|
2107
|
+
r.margin += x;
|
|
2108
|
+
}
|
|
2109
|
+
}), n.forEach((r) => r.textMaxHeight = s), _.getMax(a, o.height);
|
|
2110
|
+
}
|
|
2111
|
+
l(Le, "calculateActorMargins");
|
|
2112
|
+
var Y0 = /* @__PURE__ */ l(async function(t, e, n) {
|
|
2113
|
+
const a = e.get(t.from), s = e.get(t.to), r = a.x, c = s.x, h = t.wrap && t.message;
|
|
2114
|
+
let g = lt(t.message) ? await wt(t.message, rt()) : Y.calculateTextDimensions(
|
|
2115
|
+
h ? Y.wrapLabel(t.message, o.width, ft(o)) : t.message,
|
|
2116
|
+
ft(o)
|
|
2117
|
+
);
|
|
2118
|
+
const i = {
|
|
2119
|
+
width: h ? o.width : _.getMax(o.width, g.width + 2 * o.noteMargin),
|
|
2120
|
+
height: 0,
|
|
2121
|
+
startx: a.x,
|
|
2122
|
+
stopx: 0,
|
|
2123
|
+
starty: 0,
|
|
2124
|
+
stopy: 0,
|
|
2125
|
+
message: t.message
|
|
2126
|
+
};
|
|
2127
|
+
return t.placement === n.db.PLACEMENT.RIGHTOF ? (i.width = h ? _.getMax(o.width, g.width) : _.getMax(
|
|
2128
|
+
a.width / 2 + s.width / 2,
|
|
2129
|
+
g.width + 2 * o.noteMargin
|
|
2130
|
+
), i.startx = r + (a.width + o.actorMargin) / 2) : t.placement === n.db.PLACEMENT.LEFTOF ? (i.width = h ? _.getMax(o.width, g.width + 2 * o.noteMargin) : _.getMax(
|
|
2131
|
+
a.width / 2 + s.width / 2,
|
|
2132
|
+
g.width + 2 * o.noteMargin
|
|
2133
|
+
), i.startx = r - i.width + (a.width - o.actorMargin) / 2) : t.to === t.from ? (g = Y.calculateTextDimensions(
|
|
2134
|
+
h ? Y.wrapLabel(t.message, _.getMax(o.width, a.width), ft(o)) : t.message,
|
|
2135
|
+
ft(o)
|
|
2136
|
+
), i.width = h ? _.getMax(o.width, a.width) : _.getMax(a.width, o.width, g.width + 2 * o.noteMargin), i.startx = r + (a.width - i.width) / 2) : (i.width = Math.abs(r + a.width / 2 - (c + s.width / 2)) + o.actorMargin, i.startx = r < c ? r + a.width / 2 - o.actorMargin / 2 : c + s.width / 2 - o.actorMargin / 2), h && (i.message = Y.wrapLabel(
|
|
2137
|
+
t.message,
|
|
2138
|
+
i.width - 2 * o.wrapPadding,
|
|
2139
|
+
ft(o)
|
|
2140
|
+
)), G.debug(
|
|
2141
|
+
`NM:[${i.startx},${i.stopx},${i.starty},${i.stopy}:${i.width},${i.height}=${t.message}]`
|
|
2142
|
+
), i;
|
|
2143
|
+
}, "buildNoteModel"), V0 = /* @__PURE__ */ l(function(t, e, n) {
|
|
2144
|
+
if (![
|
|
2145
|
+
n.db.LINETYPE.SOLID_OPEN,
|
|
2146
|
+
n.db.LINETYPE.DOTTED_OPEN,
|
|
2147
|
+
n.db.LINETYPE.SOLID,
|
|
2148
|
+
n.db.LINETYPE.DOTTED,
|
|
2149
|
+
n.db.LINETYPE.SOLID_CROSS,
|
|
2150
|
+
n.db.LINETYPE.DOTTED_CROSS,
|
|
2151
|
+
n.db.LINETYPE.SOLID_POINT,
|
|
2152
|
+
n.db.LINETYPE.DOTTED_POINT,
|
|
2153
|
+
n.db.LINETYPE.BIDIRECTIONAL_SOLID,
|
|
2154
|
+
n.db.LINETYPE.BIDIRECTIONAL_DOTTED
|
|
2155
|
+
].includes(t.type))
|
|
2156
|
+
return {};
|
|
2157
|
+
const [a, s] = ee(t.from, e), [r, c] = ee(t.to, e), h = a <= r;
|
|
2158
|
+
let g = h ? s : a, i = h ? r : c;
|
|
2159
|
+
const x = Math.abs(r - c) > 2, m = /* @__PURE__ */ l((L) => h ? -L : L, "adjustValue");
|
|
2160
|
+
t.from === t.to ? i = g : (t.activate && !x && (i += m(o.activationWidth / 2 - 1)), [n.db.LINETYPE.SOLID_OPEN, n.db.LINETYPE.DOTTED_OPEN].includes(t.type) || (i += m(3)), [n.db.LINETYPE.BIDIRECTIONAL_SOLID, n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(
|
|
2161
|
+
t.type
|
|
2162
|
+
) && (g -= m(3)));
|
|
2163
|
+
const u = [a, s, r, c], T = Math.abs(g - i);
|
|
2164
|
+
t.wrap && t.message && (t.message = Y.wrapLabel(
|
|
2165
|
+
t.message,
|
|
2166
|
+
_.getMax(T + 2 * o.wrapPadding, o.width),
|
|
2167
|
+
mt(o)
|
|
2168
|
+
));
|
|
2169
|
+
const w = Y.calculateTextDimensions(t.message, mt(o));
|
|
2170
|
+
return {
|
|
2171
|
+
width: _.getMax(
|
|
2172
|
+
t.wrap ? 0 : w.width + 2 * o.wrapPadding,
|
|
2173
|
+
T + 2 * o.wrapPadding,
|
|
2174
|
+
o.width
|
|
2175
|
+
),
|
|
2176
|
+
height: 0,
|
|
2177
|
+
startx: g,
|
|
2178
|
+
stopx: i,
|
|
2179
|
+
starty: 0,
|
|
2180
|
+
stopy: 0,
|
|
2181
|
+
message: t.message,
|
|
2182
|
+
type: t.type,
|
|
2183
|
+
wrap: t.wrap,
|
|
2184
|
+
fromBounds: Math.min.apply(null, u),
|
|
2185
|
+
toBounds: Math.max.apply(null, u)
|
|
2186
|
+
};
|
|
2187
|
+
}, "buildMessageModel"), F0 = /* @__PURE__ */ l(async function(t, e, n, a) {
|
|
2188
|
+
const s = {}, r = [];
|
|
2189
|
+
let c, h, g;
|
|
2190
|
+
for (const i of t) {
|
|
2191
|
+
switch (i.id = Y.random({ length: 10 }), i.type) {
|
|
2192
|
+
case a.db.LINETYPE.LOOP_START:
|
|
2193
|
+
case a.db.LINETYPE.ALT_START:
|
|
2194
|
+
case a.db.LINETYPE.OPT_START:
|
|
2195
|
+
case a.db.LINETYPE.PAR_START:
|
|
2196
|
+
case a.db.LINETYPE.PAR_OVER_START:
|
|
2197
|
+
case a.db.LINETYPE.CRITICAL_START:
|
|
2198
|
+
case a.db.LINETYPE.BREAK_START:
|
|
2199
|
+
r.push({
|
|
2200
|
+
id: i.id,
|
|
2201
|
+
msg: i.message,
|
|
2202
|
+
from: Number.MAX_SAFE_INTEGER,
|
|
2203
|
+
to: Number.MIN_SAFE_INTEGER,
|
|
2204
|
+
width: 0
|
|
2205
|
+
});
|
|
2206
|
+
break;
|
|
2207
|
+
case a.db.LINETYPE.ALT_ELSE:
|
|
2208
|
+
case a.db.LINETYPE.PAR_AND:
|
|
2209
|
+
case a.db.LINETYPE.CRITICAL_OPTION:
|
|
2210
|
+
i.message && (c = r.pop(), s[c.id] = c, s[i.id] = c, r.push(c));
|
|
2211
|
+
break;
|
|
2212
|
+
case a.db.LINETYPE.LOOP_END:
|
|
2213
|
+
case a.db.LINETYPE.ALT_END:
|
|
2214
|
+
case a.db.LINETYPE.OPT_END:
|
|
2215
|
+
case a.db.LINETYPE.PAR_END:
|
|
2216
|
+
case a.db.LINETYPE.CRITICAL_END:
|
|
2217
|
+
case a.db.LINETYPE.BREAK_END:
|
|
2218
|
+
c = r.pop(), s[c.id] = c;
|
|
2219
|
+
break;
|
|
2220
|
+
case a.db.LINETYPE.ACTIVE_START:
|
|
2221
|
+
{
|
|
2222
|
+
const x = e.get(i.from ? i.from : i.to.actor), m = Dt(i.from ? i.from : i.to.actor).length, u = x.x + x.width / 2 + (m - 1) * o.activationWidth / 2, T = {
|
|
2223
|
+
startx: u,
|
|
2224
|
+
stopx: u + o.activationWidth,
|
|
2225
|
+
actor: i.from,
|
|
2226
|
+
enabled: !0
|
|
2227
|
+
};
|
|
2228
|
+
y.activations.push(T);
|
|
2229
|
+
}
|
|
2230
|
+
break;
|
|
2231
|
+
case a.db.LINETYPE.ACTIVE_END:
|
|
2232
|
+
{
|
|
2233
|
+
const x = y.activations.map((m) => m.actor).lastIndexOf(i.from);
|
|
2234
|
+
y.activations.splice(x, 1).splice(0, 1);
|
|
2235
|
+
}
|
|
2236
|
+
break;
|
|
2237
|
+
}
|
|
2238
|
+
i.placement !== void 0 ? (h = await Y0(i, e, a), i.noteModel = h, r.forEach((x) => {
|
|
2239
|
+
c = x, c.from = _.getMin(c.from, h.startx), c.to = _.getMax(c.to, h.startx + h.width), c.width = _.getMax(c.width, Math.abs(c.from - c.to)) - o.labelBoxWidth;
|
|
2240
|
+
})) : (g = V0(i, e, a), i.msgModel = g, g.startx && g.stopx && r.length > 0 && r.forEach((x) => {
|
|
2241
|
+
if (c = x, g.startx === g.stopx) {
|
|
2242
|
+
const m = e.get(i.from), u = e.get(i.to);
|
|
2243
|
+
c.from = _.getMin(
|
|
2244
|
+
m.x - g.width / 2,
|
|
2245
|
+
m.x - m.width / 2,
|
|
2246
|
+
c.from
|
|
2247
|
+
), c.to = _.getMax(
|
|
2248
|
+
u.x + g.width / 2,
|
|
2249
|
+
u.x + m.width / 2,
|
|
2250
|
+
c.to
|
|
2251
|
+
), c.width = _.getMax(c.width, Math.abs(c.to - c.from)) - o.labelBoxWidth;
|
|
2252
|
+
} else
|
|
2253
|
+
c.from = _.getMin(g.startx, c.from), c.to = _.getMax(g.stopx, c.to), c.width = _.getMax(c.width, g.width) - o.labelBoxWidth;
|
|
2254
|
+
}));
|
|
2255
|
+
}
|
|
2256
|
+
return y.activations = [], G.debug("Loop type widths:", s), s;
|
|
2257
|
+
}, "calculateLoopBounds"), W0 = {
|
|
2258
|
+
bounds: y,
|
|
2259
|
+
drawActors: qt,
|
|
2260
|
+
drawActorsPopup: be,
|
|
2261
|
+
setConf: Ee,
|
|
2262
|
+
draw: B0
|
|
2263
|
+
}, j0 = {
|
|
2264
|
+
parser: ze,
|
|
2265
|
+
db: Xt,
|
|
2266
|
+
renderer: W0,
|
|
2267
|
+
styles: u0,
|
|
2268
|
+
init: /* @__PURE__ */ l(({ wrap: t }) => {
|
|
2269
|
+
Xt.setWrap(t);
|
|
2270
|
+
}, "init")
|
|
2271
|
+
};
|
|
2272
|
+
export {
|
|
2273
|
+
j0 as diagram
|
|
2274
|
+
};
|