@copilotkitnext/react 0.0.22-alpha.7 → 0.0.22-alpha.8
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/package.json +4 -4
- package/dist/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
- package/dist/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
- package/dist/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
- package/dist/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
- package/dist/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
- package/dist/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
- package/dist/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
- package/dist/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
- package/dist/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
- package/dist/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
- package/dist/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
- package/dist/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
- package/dist/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
- package/dist/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
- package/dist/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
- package/dist/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
- package/dist/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
- package/dist/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
- package/dist/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
- package/dist/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
- package/dist/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
- package/dist/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
- package/dist/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
- package/dist/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
- package/dist/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
- package/dist/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
- package/dist/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
- package/dist/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
- package/dist/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
- package/dist/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
- package/dist/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
- package/dist/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
- package/dist/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
- package/dist/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
- package/dist/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
- package/dist/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
- package/dist/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
- package/dist/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
- package/dist/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
- package/dist/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
- package/dist/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
- package/dist/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
- package/dist/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
- package/dist/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
- package/dist/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
- package/dist/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
- package/dist/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
- package/dist/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
- package/dist/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
- package/dist/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
- package/dist/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
- package/dist/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
- package/dist/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
- package/dist/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
- package/dist/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
- package/dist/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
- package/dist/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
- package/dist/angular-html-LD6QEAZE.mjs +0 -7
- package/dist/angular-html-LD6QEAZE.mjs.map +0 -1
- package/dist/angular-ts-FGK7I2F5.mjs +0 -37
- package/dist/angular-ts-FGK7I2F5.mjs.map +0 -1
- package/dist/angular-ts-XZTE5LQS.mjs +0 -37
- package/dist/angular-ts-XZTE5LQS.mjs.map +0 -1
- package/dist/apl-VB2EG5RZ.mjs +0 -22
- package/dist/apl-VB2EG5RZ.mjs.map +0 -1
- package/dist/architectureDiagram-VXUJARFQ-PPLKSFYC.mjs +0 -8712
- package/dist/architectureDiagram-VXUJARFQ-PPLKSFYC.mjs.map +0 -1
- package/dist/blade-EZDWULER.mjs +0 -26
- package/dist/blade-EZDWULER.mjs.map +0 -1
- package/dist/blade-HS4Z7O3Y.mjs +0 -26
- package/dist/blade-HS4Z7O3Y.mjs.map +0 -1
- package/dist/blockDiagram-VD42YOAC-7SIEWHYD.mjs +0 -3618
- package/dist/blockDiagram-VD42YOAC-7SIEWHYD.mjs.map +0 -1
- package/dist/c4Diagram-YG6GDRKO-G2UUBRHQ.mjs +0 -2495
- package/dist/c4Diagram-YG6GDRKO-G2UUBRHQ.mjs.map +0 -1
- package/dist/chunk-2BAFECUC.mjs +0 -28
- package/dist/chunk-2BAFECUC.mjs.map +0 -1
- package/dist/chunk-BF5LDW2L.mjs +0 -65
- package/dist/chunk-BF5LDW2L.mjs.map +0 -1
- package/dist/chunk-BUEC2HNL.mjs +0 -762
- package/dist/chunk-BUEC2HNL.mjs.map +0 -1
- package/dist/chunk-CRGJ2YCV.mjs +0 -109
- package/dist/chunk-CRGJ2YCV.mjs.map +0 -1
- package/dist/chunk-DKZXT4VQ.mjs +0 -19
- package/dist/chunk-DKZXT4VQ.mjs.map +0 -1
- package/dist/chunk-DYQXFOGA.mjs +0 -34
- package/dist/chunk-DYQXFOGA.mjs.map +0 -1
- package/dist/chunk-ENI667QL.mjs +0 -806
- package/dist/chunk-ENI667QL.mjs.map +0 -1
- package/dist/chunk-GEUZOPED.mjs +0 -1834
- package/dist/chunk-GEUZOPED.mjs.map +0 -1
- package/dist/chunk-GU7334FJ.mjs +0 -538
- package/dist/chunk-GU7334FJ.mjs.map +0 -1
- package/dist/chunk-HNKEYT4A.mjs +0 -4693
- package/dist/chunk-HNKEYT4A.mjs.map +0 -1
- package/dist/chunk-HTMHAYGC.mjs +0 -14
- package/dist/chunk-HTMHAYGC.mjs.map +0 -1
- package/dist/chunk-JRLFMJ6U.mjs +0 -1923
- package/dist/chunk-JRLFMJ6U.mjs.map +0 -1
- package/dist/chunk-JYRND4DC.mjs +0 -22
- package/dist/chunk-JYRND4DC.mjs.map +0 -1
- package/dist/chunk-KFEPUFID.mjs +0 -52
- package/dist/chunk-KFEPUFID.mjs.map +0 -1
- package/dist/chunk-M3UH7XZX.mjs +0 -6222
- package/dist/chunk-M3UH7XZX.mjs.map +0 -1
- package/dist/chunk-ND4RYWG7.mjs +0 -12
- package/dist/chunk-ND4RYWG7.mjs.map +0 -1
- package/dist/chunk-VLSLBZME.mjs +0 -51
- package/dist/chunk-VLSLBZME.mjs.map +0 -1
- package/dist/chunk-WJBV3P3K.mjs +0 -55
- package/dist/chunk-WJBV3P3K.mjs.map +0 -1
- package/dist/chunk-X2TQ2HDS.mjs +0 -44
- package/dist/chunk-X2TQ2HDS.mjs.map +0 -1
- package/dist/chunk-YIDZOZG3.mjs +0 -103
- package/dist/chunk-YIDZOZG3.mjs.map +0 -1
- package/dist/chunk-YLW7IP7V.mjs +0 -14525
- package/dist/chunk-YLW7IP7V.mjs.map +0 -1
- package/dist/classDiagram-2ON5EDUG-WUV4PTK5.mjs +0 -38
- package/dist/classDiagram-2ON5EDUG-WUV4PTK5.mjs.map +0 -1
- package/dist/classDiagram-v2-WZHVMYZB-J4QNVYPE.mjs +0 -38
- package/dist/classDiagram-v2-WZHVMYZB-J4QNVYPE.mjs.map +0 -1
- package/dist/cobol-PNTKRG5I.mjs +0 -17
- package/dist/cobol-PNTKRG5I.mjs.map +0 -1
- package/dist/crystal-BSMHK65A.mjs +0 -23
- package/dist/crystal-BSMHK65A.mjs.map +0 -1
- package/dist/dagre-6UL2VRFP-XN667C7N.mjs +0 -710
- package/dist/dagre-6UL2VRFP-XN667C7N.mjs.map +0 -1
- package/dist/diagram-PSM6KHXK-VA2CF5LZ.mjs +0 -538
- package/dist/diagram-PSM6KHXK-VA2CF5LZ.mjs.map +0 -1
- package/dist/diagram-QEK2KX5R-H3EHES33.mjs +0 -319
- package/dist/diagram-QEK2KX5R-H3EHES33.mjs.map +0 -1
- package/dist/diagram-S2PKOQOG-FOQYPB22.mjs +0 -231
- package/dist/diagram-S2PKOQOG-FOQYPB22.mjs.map +0 -1
- package/dist/edge-JOI74UJM.mjs +0 -19
- package/dist/edge-JOI74UJM.mjs.map +0 -1
- package/dist/elixir-FEL6DDPJ.mjs +0 -15
- package/dist/elixir-FEL6DDPJ.mjs.map +0 -1
- package/dist/erDiagram-Q2GNP2WA-IXNJSD2A.mjs +0 -1175
- package/dist/erDiagram-Q2GNP2WA-IXNJSD2A.mjs.map +0 -1
- package/dist/erb-Q2D6FWX3.mjs +0 -32
- package/dist/erb-Q2D6FWX3.mjs.map +0 -1
- package/dist/flowDiagram-NV44I4VS-ISKGEBMD.mjs +0 -2349
- package/dist/flowDiagram-NV44I4VS-ISKGEBMD.mjs.map +0 -1
- package/dist/ganttDiagram-LVOFAZNH-OAL7V7IR.mjs +0 -2344
- package/dist/ganttDiagram-LVOFAZNH-OAL7V7IR.mjs.map +0 -1
- package/dist/gitGraphDiagram-NY62KEGX-RKN2CCAZ.mjs +0 -1221
- package/dist/gitGraphDiagram-NY62KEGX-RKN2CCAZ.mjs.map +0 -1
- package/dist/glimmer-js-B32LCGFA.mjs +0 -19
- package/dist/glimmer-js-B32LCGFA.mjs.map +0 -1
- package/dist/glimmer-ts-4PHFAQCG.mjs +0 -19
- package/dist/glimmer-ts-4PHFAQCG.mjs.map +0 -1
- package/dist/hack-3ZNSL4KD.mjs +0 -17
- package/dist/hack-3ZNSL4KD.mjs.map +0 -1
- package/dist/handlebars-ICBC3AZK.mjs +0 -19
- package/dist/handlebars-ICBC3AZK.mjs.map +0 -1
- package/dist/html-BGY5P773.mjs +0 -6
- package/dist/html-BGY5P773.mjs.map +0 -1
- package/dist/html-derivative-3HGXHHFE.mjs +0 -7
- package/dist/html-derivative-3HGXHHFE.mjs.map +0 -1
- package/dist/index.css +0 -2385
- package/dist/index.css.map +0 -1
- package/dist/infoDiagram-F6ZHWCRC-Z7KMJJ45.mjs +0 -49
- package/dist/infoDiagram-F6ZHWCRC-Z7KMJJ45.mjs.map +0 -1
- package/dist/jinja-WL6HNMB5.mjs +0 -22
- package/dist/jinja-WL6HNMB5.mjs.map +0 -1
- package/dist/journeyDiagram-XKPGCS4Q-BMTOBHZ4.mjs +0 -1259
- package/dist/journeyDiagram-XKPGCS4Q-BMTOBHZ4.mjs.map +0 -1
- package/dist/kanban-definition-3W4ZIXB7-MVFRARF4.mjs +0 -1062
- package/dist/kanban-definition-3W4ZIXB7-MVFRARF4.mjs.map +0 -1
- package/dist/katex-4R42CMCB.mjs +0 -4
- package/dist/katex-4R42CMCB.mjs.map +0 -1
- package/dist/liquid-YS3YPW54.mjs +0 -19
- package/dist/liquid-YS3YPW54.mjs.map +0 -1
- package/dist/logo-mark-OHF64HAY.svg +0 -8
- package/dist/mdc-A66KLOT4.mjs +0 -20
- package/dist/mdc-A66KLOT4.mjs.map +0 -1
- package/dist/mermaid.core-4OWTNZSL.mjs +0 -1587
- package/dist/mermaid.core-4OWTNZSL.mjs.map +0 -1
- package/dist/mermaid.core-7AUE4M6E.mjs +0 -1587
- package/dist/mermaid.core-7AUE4M6E.mjs.map +0 -1
- package/dist/mindmap-definition-VGOIOE7T-7FMA2CPY.mjs +0 -1112
- package/dist/mindmap-definition-VGOIOE7T-7FMA2CPY.mjs.map +0 -1
- package/dist/mindmap-definition-VGOIOE7T-VNF7JZOY.mjs +0 -1112
- package/dist/mindmap-definition-VGOIOE7T-VNF7JZOY.mjs.map +0 -1
- package/dist/nim-HUBKBJHZ.mjs +0 -26
- package/dist/nim-HUBKBJHZ.mjs.map +0 -1
- package/dist/perl-QHAMWWQ5.mjs +0 -22
- package/dist/perl-QHAMWWQ5.mjs.map +0 -1
- package/dist/php-FS5GKSPN.mjs +0 -11
- package/dist/php-FS5GKSPN.mjs.map +0 -1
- package/dist/pieDiagram-ADFJNKIX-EER3WTCU.mjs +0 -200
- package/dist/pieDiagram-ADFJNKIX-EER3WTCU.mjs.map +0 -1
- package/dist/pug-WTY5FMEA.mjs +0 -17
- package/dist/pug-WTY5FMEA.mjs.map +0 -1
- package/dist/quadrantDiagram-AYHSOK5B-WQCIRJOK.mjs +0 -1344
- package/dist/quadrantDiagram-AYHSOK5B-WQCIRJOK.mjs.map +0 -1
- package/dist/razor-BAB7LFWZ.mjs +0 -17
- package/dist/razor-BAB7LFWZ.mjs.map +0 -1
- package/dist/requirementDiagram-UZGBJVZJ-RVM6Q2TT.mjs +0 -1179
- package/dist/requirementDiagram-UZGBJVZJ-RVM6Q2TT.mjs.map +0 -1
- package/dist/rst-AY7U27YM.mjs +0 -41
- package/dist/rst-AY7U27YM.mjs.map +0 -1
- package/dist/rst-Y2VLYMJI.mjs +0 -41
- package/dist/rst-Y2VLYMJI.mjs.map +0 -1
- package/dist/ruby-K4BNEYWG.mjs +0 -22
- package/dist/ruby-K4BNEYWG.mjs.map +0 -1
- package/dist/sankeyDiagram-TZEHDZUN-H7BVEXGO.mjs +0 -1230
- package/dist/sankeyDiagram-TZEHDZUN-H7BVEXGO.mjs.map +0 -1
- package/dist/sequenceDiagram-WL72ISMW-XBGZSOYI.mjs +0 -3885
- package/dist/sequenceDiagram-WL72ISMW-XBGZSOYI.mjs.map +0 -1
- package/dist/soy-5QMQV2KL.mjs +0 -15
- package/dist/soy-5QMQV2KL.mjs.map +0 -1
- package/dist/stateDiagram-FKZM4ZOC-WRIBVFSJ.mjs +0 -467
- package/dist/stateDiagram-FKZM4ZOC-WRIBVFSJ.mjs.map +0 -1
- package/dist/stateDiagram-v2-4FDKWEC3-SPDO7R6D.mjs +0 -37
- package/dist/stateDiagram-v2-4FDKWEC3-SPDO7R6D.mjs.map +0 -1
- package/dist/templ-VSARRSO2.mjs +0 -17
- package/dist/templ-VSARRSO2.mjs.map +0 -1
- package/dist/timeline-definition-IT6M3QCI-PX4A2RIH.mjs +0 -1226
- package/dist/timeline-definition-IT6M3QCI-PX4A2RIH.mjs.map +0 -1
- package/dist/ts-tags-YK3Q2LIW.mjs +0 -68
- package/dist/ts-tags-YK3Q2LIW.mjs.map +0 -1
- package/dist/twig-HNMWLN6H.mjs +0 -40
- package/dist/twig-HNMWLN6H.mjs.map +0 -1
- package/dist/vue-7OSX6ZY5.mjs +0 -10
- package/dist/vue-7OSX6ZY5.mjs.map +0 -1
- package/dist/vue-html-AQH2V2EU.mjs +0 -20
- package/dist/vue-html-AQH2V2EU.mjs.map +0 -1
- package/dist/vue-vine-GCYT2IGV.mjs +0 -29
- package/dist/vue-vine-GCYT2IGV.mjs.map +0 -1
- package/dist/xychartDiagram-PRI3JC2R-65KZQZDU.mjs +0 -1865
- package/dist/xychartDiagram-PRI3JC2R-65KZQZDU.mjs.map +0 -1
package/dist/chunk-ENI667QL.mjs
DELETED
|
@@ -1,806 +0,0 @@
|
|
|
1
|
-
import { markerOffsets, getLineFunctionsWithOffset, markerOffsets2 } from './chunk-KFMFHSJF.mjs';
|
|
2
|
-
import { createLabel_default, at } from './chunk-M3UH7XZX.mjs';
|
|
3
|
-
import { getSubGraphTitleMargins } from './chunk-6WA5F2SG.mjs';
|
|
4
|
-
import { styles2String, isLabelStyle } from './chunk-YIDZOZG3.mjs';
|
|
5
|
-
import { createText } from './chunk-BUEC2HNL.mjs';
|
|
6
|
-
import { utils_default } from './chunk-GU7334FJ.mjs';
|
|
7
|
-
import { getConfig2, evaluate } from './chunk-HNKEYT4A.mjs';
|
|
8
|
-
import { __name, log, select_default, line_default, basis_default, linear_default, stepBefore, stepAfter, step_default, natural_default, monotoneY, monotoneX, catmullRom_default, bumpY, bumpX, cardinal_default } from './chunk-WHXHCOFP.mjs';
|
|
9
|
-
|
|
10
|
-
// ../../node_modules/.pnpm/mermaid@11.12.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QXUST7PY.mjs
|
|
11
|
-
var addEdgeMarkers = /* @__PURE__ */ __name((svgPath, edge, url, id, diagramType, strokeColor) => {
|
|
12
|
-
if (edge.arrowTypeStart) {
|
|
13
|
-
addEdgeMarker(svgPath, "start", edge.arrowTypeStart, url, id, diagramType, strokeColor);
|
|
14
|
-
}
|
|
15
|
-
if (edge.arrowTypeEnd) {
|
|
16
|
-
addEdgeMarker(svgPath, "end", edge.arrowTypeEnd, url, id, diagramType, strokeColor);
|
|
17
|
-
}
|
|
18
|
-
}, "addEdgeMarkers");
|
|
19
|
-
var arrowTypesMap = {
|
|
20
|
-
arrow_cross: { type: "cross", fill: false },
|
|
21
|
-
arrow_point: { type: "point", fill: true },
|
|
22
|
-
arrow_barb: { type: "barb", fill: true },
|
|
23
|
-
arrow_circle: { type: "circle", fill: false },
|
|
24
|
-
aggregation: { type: "aggregation", fill: false },
|
|
25
|
-
extension: { type: "extension", fill: false },
|
|
26
|
-
composition: { type: "composition", fill: true },
|
|
27
|
-
dependency: { type: "dependency", fill: true },
|
|
28
|
-
lollipop: { type: "lollipop", fill: false },
|
|
29
|
-
only_one: { type: "onlyOne", fill: false },
|
|
30
|
-
zero_or_one: { type: "zeroOrOne", fill: false },
|
|
31
|
-
one_or_more: { type: "oneOrMore", fill: false },
|
|
32
|
-
zero_or_more: { type: "zeroOrMore", fill: false },
|
|
33
|
-
requirement_arrow: { type: "requirement_arrow", fill: false },
|
|
34
|
-
requirement_contains: { type: "requirement_contains", fill: false }
|
|
35
|
-
};
|
|
36
|
-
var addEdgeMarker = /* @__PURE__ */ __name((svgPath, position, arrowType, url, id, diagramType, strokeColor) => {
|
|
37
|
-
const arrowTypeInfo = arrowTypesMap[arrowType];
|
|
38
|
-
if (!arrowTypeInfo) {
|
|
39
|
-
log.warn(`Unknown arrow type: ${arrowType}`);
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
const endMarkerType = arrowTypeInfo.type;
|
|
43
|
-
const suffix = position === "start" ? "Start" : "End";
|
|
44
|
-
const originalMarkerId = `${id}_${diagramType}-${endMarkerType}${suffix}`;
|
|
45
|
-
if (strokeColor && strokeColor.trim() !== "") {
|
|
46
|
-
const colorId = strokeColor.replace(/[^\dA-Za-z]/g, "_");
|
|
47
|
-
const coloredMarkerId = `${originalMarkerId}_${colorId}`;
|
|
48
|
-
if (!document.getElementById(coloredMarkerId)) {
|
|
49
|
-
const originalMarker = document.getElementById(originalMarkerId);
|
|
50
|
-
if (originalMarker) {
|
|
51
|
-
const coloredMarker = originalMarker.cloneNode(true);
|
|
52
|
-
coloredMarker.id = coloredMarkerId;
|
|
53
|
-
const paths = coloredMarker.querySelectorAll("path, circle, line");
|
|
54
|
-
paths.forEach((path) => {
|
|
55
|
-
path.setAttribute("stroke", strokeColor);
|
|
56
|
-
if (arrowTypeInfo.fill) {
|
|
57
|
-
path.setAttribute("fill", strokeColor);
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
originalMarker.parentNode?.appendChild(coloredMarker);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
svgPath.attr(`marker-${position}`, `url(${url}#${coloredMarkerId})`);
|
|
64
|
-
} else {
|
|
65
|
-
svgPath.attr(`marker-${position}`, `url(${url}#${originalMarkerId})`);
|
|
66
|
-
}
|
|
67
|
-
}, "addEdgeMarker");
|
|
68
|
-
var edgeLabels = /* @__PURE__ */ new Map();
|
|
69
|
-
var terminalLabels = /* @__PURE__ */ new Map();
|
|
70
|
-
var clear = /* @__PURE__ */ __name(() => {
|
|
71
|
-
edgeLabels.clear();
|
|
72
|
-
terminalLabels.clear();
|
|
73
|
-
}, "clear");
|
|
74
|
-
var getLabelStyles = /* @__PURE__ */ __name((styleArray) => {
|
|
75
|
-
let styles = styleArray ? styleArray.reduce((acc, style) => acc + ";" + style, "") : "";
|
|
76
|
-
return styles;
|
|
77
|
-
}, "getLabelStyles");
|
|
78
|
-
var insertEdgeLabel = /* @__PURE__ */ __name(async (elem, edge) => {
|
|
79
|
-
let useHtmlLabels = evaluate(getConfig2().flowchart.htmlLabels);
|
|
80
|
-
const { labelStyles } = styles2String(edge);
|
|
81
|
-
edge.labelStyle = labelStyles;
|
|
82
|
-
const labelElement = await createText(elem, edge.label, {
|
|
83
|
-
style: edge.labelStyle,
|
|
84
|
-
useHtmlLabels,
|
|
85
|
-
addSvgBackground: true,
|
|
86
|
-
isNode: false
|
|
87
|
-
});
|
|
88
|
-
log.info("abc82", edge, edge.labelType);
|
|
89
|
-
const edgeLabel = elem.insert("g").attr("class", "edgeLabel");
|
|
90
|
-
const label = edgeLabel.insert("g").attr("class", "label").attr("data-id", edge.id);
|
|
91
|
-
label.node().appendChild(labelElement);
|
|
92
|
-
let bbox = labelElement.getBBox();
|
|
93
|
-
if (useHtmlLabels) {
|
|
94
|
-
const div = labelElement.children[0];
|
|
95
|
-
const dv = select_default(labelElement);
|
|
96
|
-
bbox = div.getBoundingClientRect();
|
|
97
|
-
dv.attr("width", bbox.width);
|
|
98
|
-
dv.attr("height", bbox.height);
|
|
99
|
-
}
|
|
100
|
-
label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")");
|
|
101
|
-
edgeLabels.set(edge.id, edgeLabel);
|
|
102
|
-
edge.width = bbox.width;
|
|
103
|
-
edge.height = bbox.height;
|
|
104
|
-
let fo;
|
|
105
|
-
if (edge.startLabelLeft) {
|
|
106
|
-
const startLabelElement = await createLabel_default(
|
|
107
|
-
edge.startLabelLeft,
|
|
108
|
-
getLabelStyles(edge.labelStyle)
|
|
109
|
-
);
|
|
110
|
-
const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals");
|
|
111
|
-
const inner = startEdgeLabelLeft.insert("g").attr("class", "inner");
|
|
112
|
-
fo = inner.node().appendChild(startLabelElement);
|
|
113
|
-
const slBox = startLabelElement.getBBox();
|
|
114
|
-
inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")");
|
|
115
|
-
if (!terminalLabels.get(edge.id)) {
|
|
116
|
-
terminalLabels.set(edge.id, {});
|
|
117
|
-
}
|
|
118
|
-
terminalLabels.get(edge.id).startLeft = startEdgeLabelLeft;
|
|
119
|
-
setTerminalWidth(fo, edge.startLabelLeft);
|
|
120
|
-
}
|
|
121
|
-
if (edge.startLabelRight) {
|
|
122
|
-
const startLabelElement = await createLabel_default(
|
|
123
|
-
edge.startLabelRight,
|
|
124
|
-
getLabelStyles(edge.labelStyle)
|
|
125
|
-
);
|
|
126
|
-
const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals");
|
|
127
|
-
const inner = startEdgeLabelRight.insert("g").attr("class", "inner");
|
|
128
|
-
fo = startEdgeLabelRight.node().appendChild(startLabelElement);
|
|
129
|
-
inner.node().appendChild(startLabelElement);
|
|
130
|
-
const slBox = startLabelElement.getBBox();
|
|
131
|
-
inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")");
|
|
132
|
-
if (!terminalLabels.get(edge.id)) {
|
|
133
|
-
terminalLabels.set(edge.id, {});
|
|
134
|
-
}
|
|
135
|
-
terminalLabels.get(edge.id).startRight = startEdgeLabelRight;
|
|
136
|
-
setTerminalWidth(fo, edge.startLabelRight);
|
|
137
|
-
}
|
|
138
|
-
if (edge.endLabelLeft) {
|
|
139
|
-
const endLabelElement = await createLabel_default(edge.endLabelLeft, getLabelStyles(edge.labelStyle));
|
|
140
|
-
const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals");
|
|
141
|
-
const inner = endEdgeLabelLeft.insert("g").attr("class", "inner");
|
|
142
|
-
fo = inner.node().appendChild(endLabelElement);
|
|
143
|
-
const slBox = endLabelElement.getBBox();
|
|
144
|
-
inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")");
|
|
145
|
-
endEdgeLabelLeft.node().appendChild(endLabelElement);
|
|
146
|
-
if (!terminalLabels.get(edge.id)) {
|
|
147
|
-
terminalLabels.set(edge.id, {});
|
|
148
|
-
}
|
|
149
|
-
terminalLabels.get(edge.id).endLeft = endEdgeLabelLeft;
|
|
150
|
-
setTerminalWidth(fo, edge.endLabelLeft);
|
|
151
|
-
}
|
|
152
|
-
if (edge.endLabelRight) {
|
|
153
|
-
const endLabelElement = await createLabel_default(edge.endLabelRight, getLabelStyles(edge.labelStyle));
|
|
154
|
-
const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals");
|
|
155
|
-
const inner = endEdgeLabelRight.insert("g").attr("class", "inner");
|
|
156
|
-
fo = inner.node().appendChild(endLabelElement);
|
|
157
|
-
const slBox = endLabelElement.getBBox();
|
|
158
|
-
inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")");
|
|
159
|
-
endEdgeLabelRight.node().appendChild(endLabelElement);
|
|
160
|
-
if (!terminalLabels.get(edge.id)) {
|
|
161
|
-
terminalLabels.set(edge.id, {});
|
|
162
|
-
}
|
|
163
|
-
terminalLabels.get(edge.id).endRight = endEdgeLabelRight;
|
|
164
|
-
setTerminalWidth(fo, edge.endLabelRight);
|
|
165
|
-
}
|
|
166
|
-
return labelElement;
|
|
167
|
-
}, "insertEdgeLabel");
|
|
168
|
-
function setTerminalWidth(fo, value) {
|
|
169
|
-
if (getConfig2().flowchart.htmlLabels && fo) {
|
|
170
|
-
fo.style.width = value.length * 9 + "px";
|
|
171
|
-
fo.style.height = "12px";
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
__name(setTerminalWidth, "setTerminalWidth");
|
|
175
|
-
var positionEdgeLabel = /* @__PURE__ */ __name((edge, paths) => {
|
|
176
|
-
log.debug("Moving label abc88 ", edge.id, edge.label, edgeLabels.get(edge.id), paths);
|
|
177
|
-
let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;
|
|
178
|
-
const siteConfig = getConfig2();
|
|
179
|
-
const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);
|
|
180
|
-
if (edge.label) {
|
|
181
|
-
const el = edgeLabels.get(edge.id);
|
|
182
|
-
let x = edge.x;
|
|
183
|
-
let y = edge.y;
|
|
184
|
-
if (path) {
|
|
185
|
-
const pos = utils_default.calcLabelPosition(path);
|
|
186
|
-
log.debug(
|
|
187
|
-
"Moving label " + edge.label + " from (",
|
|
188
|
-
x,
|
|
189
|
-
",",
|
|
190
|
-
y,
|
|
191
|
-
") to (",
|
|
192
|
-
pos.x,
|
|
193
|
-
",",
|
|
194
|
-
pos.y,
|
|
195
|
-
") abc88"
|
|
196
|
-
);
|
|
197
|
-
if (paths.updatedPath) {
|
|
198
|
-
x = pos.x;
|
|
199
|
-
y = pos.y;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
el.attr("transform", `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`);
|
|
203
|
-
}
|
|
204
|
-
if (edge.startLabelLeft) {
|
|
205
|
-
const el = terminalLabels.get(edge.id).startLeft;
|
|
206
|
-
let x = edge.x;
|
|
207
|
-
let y = edge.y;
|
|
208
|
-
if (path) {
|
|
209
|
-
const pos = utils_default.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path);
|
|
210
|
-
x = pos.x;
|
|
211
|
-
y = pos.y;
|
|
212
|
-
}
|
|
213
|
-
el.attr("transform", `translate(${x}, ${y})`);
|
|
214
|
-
}
|
|
215
|
-
if (edge.startLabelRight) {
|
|
216
|
-
const el = terminalLabels.get(edge.id).startRight;
|
|
217
|
-
let x = edge.x;
|
|
218
|
-
let y = edge.y;
|
|
219
|
-
if (path) {
|
|
220
|
-
const pos = utils_default.calcTerminalLabelPosition(
|
|
221
|
-
edge.arrowTypeStart ? 10 : 0,
|
|
222
|
-
"start_right",
|
|
223
|
-
path
|
|
224
|
-
);
|
|
225
|
-
x = pos.x;
|
|
226
|
-
y = pos.y;
|
|
227
|
-
}
|
|
228
|
-
el.attr("transform", `translate(${x}, ${y})`);
|
|
229
|
-
}
|
|
230
|
-
if (edge.endLabelLeft) {
|
|
231
|
-
const el = terminalLabels.get(edge.id).endLeft;
|
|
232
|
-
let x = edge.x;
|
|
233
|
-
let y = edge.y;
|
|
234
|
-
if (path) {
|
|
235
|
-
const pos = utils_default.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path);
|
|
236
|
-
x = pos.x;
|
|
237
|
-
y = pos.y;
|
|
238
|
-
}
|
|
239
|
-
el.attr("transform", `translate(${x}, ${y})`);
|
|
240
|
-
}
|
|
241
|
-
if (edge.endLabelRight) {
|
|
242
|
-
const el = terminalLabels.get(edge.id).endRight;
|
|
243
|
-
let x = edge.x;
|
|
244
|
-
let y = edge.y;
|
|
245
|
-
if (path) {
|
|
246
|
-
const pos = utils_default.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path);
|
|
247
|
-
x = pos.x;
|
|
248
|
-
y = pos.y;
|
|
249
|
-
}
|
|
250
|
-
el.attr("transform", `translate(${x}, ${y})`);
|
|
251
|
-
}
|
|
252
|
-
}, "positionEdgeLabel");
|
|
253
|
-
var outsideNode = /* @__PURE__ */ __name((node, point2) => {
|
|
254
|
-
const x = node.x;
|
|
255
|
-
const y = node.y;
|
|
256
|
-
const dx = Math.abs(point2.x - x);
|
|
257
|
-
const dy = Math.abs(point2.y - y);
|
|
258
|
-
const w = node.width / 2;
|
|
259
|
-
const h = node.height / 2;
|
|
260
|
-
return dx >= w || dy >= h;
|
|
261
|
-
}, "outsideNode");
|
|
262
|
-
var intersection = /* @__PURE__ */ __name((node, outsidePoint, insidePoint) => {
|
|
263
|
-
log.debug(`intersection calc abc89:
|
|
264
|
-
outsidePoint: ${JSON.stringify(outsidePoint)}
|
|
265
|
-
insidePoint : ${JSON.stringify(insidePoint)}
|
|
266
|
-
node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`);
|
|
267
|
-
const x = node.x;
|
|
268
|
-
const y = node.y;
|
|
269
|
-
const dx = Math.abs(x - insidePoint.x);
|
|
270
|
-
const w = node.width / 2;
|
|
271
|
-
let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx;
|
|
272
|
-
const h = node.height / 2;
|
|
273
|
-
const Q = Math.abs(outsidePoint.y - insidePoint.y);
|
|
274
|
-
const R = Math.abs(outsidePoint.x - insidePoint.x);
|
|
275
|
-
if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) {
|
|
276
|
-
let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;
|
|
277
|
-
r = R * q / Q;
|
|
278
|
-
const res = {
|
|
279
|
-
x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r,
|
|
280
|
-
y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q
|
|
281
|
-
};
|
|
282
|
-
if (r === 0) {
|
|
283
|
-
res.x = outsidePoint.x;
|
|
284
|
-
res.y = outsidePoint.y;
|
|
285
|
-
}
|
|
286
|
-
if (R === 0) {
|
|
287
|
-
res.x = outsidePoint.x;
|
|
288
|
-
}
|
|
289
|
-
if (Q === 0) {
|
|
290
|
-
res.y = outsidePoint.y;
|
|
291
|
-
}
|
|
292
|
-
log.debug(`abc89 top/bottom calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res);
|
|
293
|
-
return res;
|
|
294
|
-
} else {
|
|
295
|
-
if (insidePoint.x < outsidePoint.x) {
|
|
296
|
-
r = outsidePoint.x - w - x;
|
|
297
|
-
} else {
|
|
298
|
-
r = x - w - outsidePoint.x;
|
|
299
|
-
}
|
|
300
|
-
let q = Q * r / R;
|
|
301
|
-
let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r;
|
|
302
|
-
let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q;
|
|
303
|
-
log.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y });
|
|
304
|
-
if (r === 0) {
|
|
305
|
-
_x = outsidePoint.x;
|
|
306
|
-
_y = outsidePoint.y;
|
|
307
|
-
}
|
|
308
|
-
if (R === 0) {
|
|
309
|
-
_x = outsidePoint.x;
|
|
310
|
-
}
|
|
311
|
-
if (Q === 0) {
|
|
312
|
-
_y = outsidePoint.y;
|
|
313
|
-
}
|
|
314
|
-
return { x: _x, y: _y };
|
|
315
|
-
}
|
|
316
|
-
}, "intersection");
|
|
317
|
-
var cutPathAtIntersect = /* @__PURE__ */ __name((_points, boundaryNode) => {
|
|
318
|
-
log.warn("abc88 cutPathAtIntersect", _points, boundaryNode);
|
|
319
|
-
let points = [];
|
|
320
|
-
let lastPointOutside = _points[0];
|
|
321
|
-
let isInside = false;
|
|
322
|
-
_points.forEach((point2) => {
|
|
323
|
-
log.info("abc88 checking point", point2, boundaryNode);
|
|
324
|
-
if (!outsideNode(boundaryNode, point2) && !isInside) {
|
|
325
|
-
const inter = intersection(boundaryNode, lastPointOutside, point2);
|
|
326
|
-
log.debug("abc88 inside", point2, lastPointOutside, inter);
|
|
327
|
-
log.debug("abc88 intersection", inter, boundaryNode);
|
|
328
|
-
let pointPresent = false;
|
|
329
|
-
points.forEach((p) => {
|
|
330
|
-
pointPresent = pointPresent || p.x === inter.x && p.y === inter.y;
|
|
331
|
-
});
|
|
332
|
-
if (!points.some((e) => e.x === inter.x && e.y === inter.y)) {
|
|
333
|
-
points.push(inter);
|
|
334
|
-
} else {
|
|
335
|
-
log.warn("abc88 no intersect", inter, points);
|
|
336
|
-
}
|
|
337
|
-
isInside = true;
|
|
338
|
-
} else {
|
|
339
|
-
log.warn("abc88 outside", point2, lastPointOutside);
|
|
340
|
-
lastPointOutside = point2;
|
|
341
|
-
if (!isInside) {
|
|
342
|
-
points.push(point2);
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
});
|
|
346
|
-
log.debug("returning points", points);
|
|
347
|
-
return points;
|
|
348
|
-
}, "cutPathAtIntersect");
|
|
349
|
-
function extractCornerPoints(points) {
|
|
350
|
-
const cornerPoints = [];
|
|
351
|
-
const cornerPointPositions = [];
|
|
352
|
-
for (let i = 1; i < points.length - 1; i++) {
|
|
353
|
-
const prev = points[i - 1];
|
|
354
|
-
const curr = points[i];
|
|
355
|
-
const next = points[i + 1];
|
|
356
|
-
if (prev.x === curr.x && curr.y === next.y && Math.abs(curr.x - next.x) > 5 && Math.abs(curr.y - prev.y) > 5) {
|
|
357
|
-
cornerPoints.push(curr);
|
|
358
|
-
cornerPointPositions.push(i);
|
|
359
|
-
} else if (prev.y === curr.y && curr.x === next.x && Math.abs(curr.x - prev.x) > 5 && Math.abs(curr.y - next.y) > 5) {
|
|
360
|
-
cornerPoints.push(curr);
|
|
361
|
-
cornerPointPositions.push(i);
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
return { cornerPoints, cornerPointPositions };
|
|
365
|
-
}
|
|
366
|
-
__name(extractCornerPoints, "extractCornerPoints");
|
|
367
|
-
var findAdjacentPoint = /* @__PURE__ */ __name(function(pointA, pointB, distance) {
|
|
368
|
-
const xDiff = pointB.x - pointA.x;
|
|
369
|
-
const yDiff = pointB.y - pointA.y;
|
|
370
|
-
const length = Math.sqrt(xDiff * xDiff + yDiff * yDiff);
|
|
371
|
-
const ratio = distance / length;
|
|
372
|
-
return { x: pointB.x - ratio * xDiff, y: pointB.y - ratio * yDiff };
|
|
373
|
-
}, "findAdjacentPoint");
|
|
374
|
-
var fixCorners = /* @__PURE__ */ __name(function(lineData) {
|
|
375
|
-
const { cornerPointPositions } = extractCornerPoints(lineData);
|
|
376
|
-
const newLineData = [];
|
|
377
|
-
for (let i = 0; i < lineData.length; i++) {
|
|
378
|
-
if (cornerPointPositions.includes(i)) {
|
|
379
|
-
const prevPoint = lineData[i - 1];
|
|
380
|
-
const nextPoint = lineData[i + 1];
|
|
381
|
-
const cornerPoint = lineData[i];
|
|
382
|
-
const newPrevPoint = findAdjacentPoint(prevPoint, cornerPoint, 5);
|
|
383
|
-
const newNextPoint = findAdjacentPoint(nextPoint, cornerPoint, 5);
|
|
384
|
-
const xDiff = newNextPoint.x - newPrevPoint.x;
|
|
385
|
-
const yDiff = newNextPoint.y - newPrevPoint.y;
|
|
386
|
-
newLineData.push(newPrevPoint);
|
|
387
|
-
const a = Math.sqrt(2) * 2;
|
|
388
|
-
let newCornerPoint = { x: cornerPoint.x, y: cornerPoint.y };
|
|
389
|
-
if (Math.abs(nextPoint.x - prevPoint.x) > 10 && Math.abs(nextPoint.y - prevPoint.y) >= 10) {
|
|
390
|
-
log.debug(
|
|
391
|
-
"Corner point fixing",
|
|
392
|
-
Math.abs(nextPoint.x - prevPoint.x),
|
|
393
|
-
Math.abs(nextPoint.y - prevPoint.y)
|
|
394
|
-
);
|
|
395
|
-
const r = 5;
|
|
396
|
-
if (cornerPoint.x === newPrevPoint.x) {
|
|
397
|
-
newCornerPoint = {
|
|
398
|
-
x: xDiff < 0 ? newPrevPoint.x - r + a : newPrevPoint.x + r - a,
|
|
399
|
-
y: yDiff < 0 ? newPrevPoint.y - a : newPrevPoint.y + a
|
|
400
|
-
};
|
|
401
|
-
} else {
|
|
402
|
-
newCornerPoint = {
|
|
403
|
-
x: xDiff < 0 ? newPrevPoint.x - a : newPrevPoint.x + a,
|
|
404
|
-
y: yDiff < 0 ? newPrevPoint.y - r + a : newPrevPoint.y + r - a
|
|
405
|
-
};
|
|
406
|
-
}
|
|
407
|
-
} else {
|
|
408
|
-
log.debug(
|
|
409
|
-
"Corner point skipping fixing",
|
|
410
|
-
Math.abs(nextPoint.x - prevPoint.x),
|
|
411
|
-
Math.abs(nextPoint.y - prevPoint.y)
|
|
412
|
-
);
|
|
413
|
-
}
|
|
414
|
-
newLineData.push(newCornerPoint, newNextPoint);
|
|
415
|
-
} else {
|
|
416
|
-
newLineData.push(lineData[i]);
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
return newLineData;
|
|
420
|
-
}, "fixCorners");
|
|
421
|
-
var generateDashArray = /* @__PURE__ */ __name((len, oValueS, oValueE) => {
|
|
422
|
-
const middleLength = len - oValueS - oValueE;
|
|
423
|
-
const dashLength = 2;
|
|
424
|
-
const gapLength = 2;
|
|
425
|
-
const dashGapPairLength = dashLength + gapLength;
|
|
426
|
-
const numberOfPairs = Math.floor(middleLength / dashGapPairLength);
|
|
427
|
-
const middlePattern = Array(numberOfPairs).fill(`${dashLength} ${gapLength}`).join(" ");
|
|
428
|
-
const dashArray = `0 ${oValueS} ${middlePattern} ${oValueE}`;
|
|
429
|
-
return dashArray;
|
|
430
|
-
}, "generateDashArray");
|
|
431
|
-
var insertEdge = /* @__PURE__ */ __name(function(elem, edge, clusterDb, diagramType, startNode, endNode, id, skipIntersect = false) {
|
|
432
|
-
const { handDrawnSeed } = getConfig2();
|
|
433
|
-
let points = edge.points;
|
|
434
|
-
let pointsHasChanged = false;
|
|
435
|
-
const tail = startNode;
|
|
436
|
-
var head = endNode;
|
|
437
|
-
const edgeClassStyles = [];
|
|
438
|
-
for (const key in edge.cssCompiledStyles) {
|
|
439
|
-
if (isLabelStyle(key)) {
|
|
440
|
-
continue;
|
|
441
|
-
}
|
|
442
|
-
edgeClassStyles.push(edge.cssCompiledStyles[key]);
|
|
443
|
-
}
|
|
444
|
-
log.debug("UIO intersect check", edge.points, head.x, tail.x);
|
|
445
|
-
if (head.intersect && tail.intersect && !skipIntersect) {
|
|
446
|
-
points = points.slice(1, edge.points.length - 1);
|
|
447
|
-
points.unshift(tail.intersect(points[0]));
|
|
448
|
-
log.debug(
|
|
449
|
-
"Last point UIO",
|
|
450
|
-
edge.start,
|
|
451
|
-
"-->",
|
|
452
|
-
edge.end,
|
|
453
|
-
points[points.length - 1],
|
|
454
|
-
head,
|
|
455
|
-
head.intersect(points[points.length - 1])
|
|
456
|
-
);
|
|
457
|
-
points.push(head.intersect(points[points.length - 1]));
|
|
458
|
-
}
|
|
459
|
-
const pointsStr = btoa(JSON.stringify(points));
|
|
460
|
-
if (edge.toCluster) {
|
|
461
|
-
log.info("to cluster abc88", clusterDb.get(edge.toCluster));
|
|
462
|
-
points = cutPathAtIntersect(edge.points, clusterDb.get(edge.toCluster).node);
|
|
463
|
-
pointsHasChanged = true;
|
|
464
|
-
}
|
|
465
|
-
if (edge.fromCluster) {
|
|
466
|
-
log.debug(
|
|
467
|
-
"from cluster abc88",
|
|
468
|
-
clusterDb.get(edge.fromCluster),
|
|
469
|
-
JSON.stringify(points, null, 2)
|
|
470
|
-
);
|
|
471
|
-
points = cutPathAtIntersect(points.reverse(), clusterDb.get(edge.fromCluster).node).reverse();
|
|
472
|
-
pointsHasChanged = true;
|
|
473
|
-
}
|
|
474
|
-
let lineData = points.filter((p) => !Number.isNaN(p.y));
|
|
475
|
-
lineData = fixCorners(lineData);
|
|
476
|
-
let curve = basis_default;
|
|
477
|
-
curve = linear_default;
|
|
478
|
-
switch (edge.curve) {
|
|
479
|
-
case "linear":
|
|
480
|
-
curve = linear_default;
|
|
481
|
-
break;
|
|
482
|
-
case "basis":
|
|
483
|
-
curve = basis_default;
|
|
484
|
-
break;
|
|
485
|
-
case "cardinal":
|
|
486
|
-
curve = cardinal_default;
|
|
487
|
-
break;
|
|
488
|
-
case "bumpX":
|
|
489
|
-
curve = bumpX;
|
|
490
|
-
break;
|
|
491
|
-
case "bumpY":
|
|
492
|
-
curve = bumpY;
|
|
493
|
-
break;
|
|
494
|
-
case "catmullRom":
|
|
495
|
-
curve = catmullRom_default;
|
|
496
|
-
break;
|
|
497
|
-
case "monotoneX":
|
|
498
|
-
curve = monotoneX;
|
|
499
|
-
break;
|
|
500
|
-
case "monotoneY":
|
|
501
|
-
curve = monotoneY;
|
|
502
|
-
break;
|
|
503
|
-
case "natural":
|
|
504
|
-
curve = natural_default;
|
|
505
|
-
break;
|
|
506
|
-
case "step":
|
|
507
|
-
curve = step_default;
|
|
508
|
-
break;
|
|
509
|
-
case "stepAfter":
|
|
510
|
-
curve = stepAfter;
|
|
511
|
-
break;
|
|
512
|
-
case "stepBefore":
|
|
513
|
-
curve = stepBefore;
|
|
514
|
-
break;
|
|
515
|
-
default:
|
|
516
|
-
curve = basis_default;
|
|
517
|
-
}
|
|
518
|
-
const { x, y } = getLineFunctionsWithOffset(edge);
|
|
519
|
-
const lineFunction = line_default().x(x).y(y).curve(curve);
|
|
520
|
-
let strokeClasses;
|
|
521
|
-
switch (edge.thickness) {
|
|
522
|
-
case "normal":
|
|
523
|
-
strokeClasses = "edge-thickness-normal";
|
|
524
|
-
break;
|
|
525
|
-
case "thick":
|
|
526
|
-
strokeClasses = "edge-thickness-thick";
|
|
527
|
-
break;
|
|
528
|
-
case "invisible":
|
|
529
|
-
strokeClasses = "edge-thickness-invisible";
|
|
530
|
-
break;
|
|
531
|
-
default:
|
|
532
|
-
strokeClasses = "edge-thickness-normal";
|
|
533
|
-
}
|
|
534
|
-
switch (edge.pattern) {
|
|
535
|
-
case "solid":
|
|
536
|
-
strokeClasses += " edge-pattern-solid";
|
|
537
|
-
break;
|
|
538
|
-
case "dotted":
|
|
539
|
-
strokeClasses += " edge-pattern-dotted";
|
|
540
|
-
break;
|
|
541
|
-
case "dashed":
|
|
542
|
-
strokeClasses += " edge-pattern-dashed";
|
|
543
|
-
break;
|
|
544
|
-
default:
|
|
545
|
-
strokeClasses += " edge-pattern-solid";
|
|
546
|
-
}
|
|
547
|
-
let svgPath;
|
|
548
|
-
let linePath = edge.curve === "rounded" ? generateRoundedPath(applyMarkerOffsetsToPoints(lineData, edge), 5) : lineFunction(lineData);
|
|
549
|
-
const edgeStyles = Array.isArray(edge.style) ? edge.style : [edge.style];
|
|
550
|
-
let strokeColor = edgeStyles.find((style) => style?.startsWith("stroke:"));
|
|
551
|
-
let animatedEdge = false;
|
|
552
|
-
if (edge.look === "handDrawn") {
|
|
553
|
-
const rc = at.svg(elem);
|
|
554
|
-
Object.assign([], lineData);
|
|
555
|
-
const svgPathNode = rc.path(linePath, {
|
|
556
|
-
roughness: 0.3,
|
|
557
|
-
seed: handDrawnSeed
|
|
558
|
-
});
|
|
559
|
-
strokeClasses += " transition";
|
|
560
|
-
svgPath = select_default(svgPathNode).select("path").attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edgeStyles ? edgeStyles.reduce((acc, style) => acc + ";" + style, "") : "");
|
|
561
|
-
let d = svgPath.attr("d");
|
|
562
|
-
svgPath.attr("d", d);
|
|
563
|
-
elem.node().appendChild(svgPath.node());
|
|
564
|
-
} else {
|
|
565
|
-
const stylesFromClasses = edgeClassStyles.join(";");
|
|
566
|
-
const styles = edgeStyles ? edgeStyles.reduce((acc, style) => acc + style + ";", "") : "";
|
|
567
|
-
let animationClass = "";
|
|
568
|
-
if (edge.animate) {
|
|
569
|
-
animationClass = " edge-animation-fast";
|
|
570
|
-
}
|
|
571
|
-
if (edge.animation) {
|
|
572
|
-
animationClass = " edge-animation-" + edge.animation;
|
|
573
|
-
}
|
|
574
|
-
const pathStyle = (stylesFromClasses ? stylesFromClasses + ";" + styles + ";" : styles) + ";" + (edgeStyles ? edgeStyles.reduce((acc, style) => acc + ";" + style, "") : "");
|
|
575
|
-
svgPath = elem.append("path").attr("d", linePath).attr("id", edge.id).attr(
|
|
576
|
-
"class",
|
|
577
|
-
" " + strokeClasses + (edge.classes ? " " + edge.classes : "") + (animationClass ?? "")
|
|
578
|
-
).attr("style", pathStyle);
|
|
579
|
-
strokeColor = pathStyle.match(/stroke:([^;]+)/)?.[1];
|
|
580
|
-
animatedEdge = edge.animate === true || !!edge.animation || stylesFromClasses.includes("animation");
|
|
581
|
-
const pathNode = svgPath.node();
|
|
582
|
-
const len = typeof pathNode.getTotalLength === "function" ? pathNode.getTotalLength() : 0;
|
|
583
|
-
const oValueS = markerOffsets2[edge.arrowTypeStart] || 0;
|
|
584
|
-
const oValueE = markerOffsets2[edge.arrowTypeEnd] || 0;
|
|
585
|
-
if (edge.look === "neo" && !animatedEdge) {
|
|
586
|
-
const dashArray = edge.pattern === "dotted" || edge.pattern === "dashed" ? generateDashArray(len, oValueS, oValueE) : `0 ${oValueS} ${len - oValueS - oValueE} ${oValueE}`;
|
|
587
|
-
const mOffset = `stroke-dasharray: ${dashArray}; stroke-dashoffset: 0;`;
|
|
588
|
-
svgPath.attr("style", mOffset + svgPath.attr("style"));
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
svgPath.attr("data-edge", true);
|
|
592
|
-
svgPath.attr("data-et", "edge");
|
|
593
|
-
svgPath.attr("data-id", edge.id);
|
|
594
|
-
svgPath.attr("data-points", pointsStr);
|
|
595
|
-
if (edge.showPoints) {
|
|
596
|
-
lineData.forEach((point3) => {
|
|
597
|
-
elem.append("circle").style("stroke", "red").style("fill", "red").attr("r", 1).attr("cx", point3.x).attr("cy", point3.y);
|
|
598
|
-
});
|
|
599
|
-
}
|
|
600
|
-
let url = "";
|
|
601
|
-
if (getConfig2().flowchart.arrowMarkerAbsolute || getConfig2().state.arrowMarkerAbsolute) {
|
|
602
|
-
url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search;
|
|
603
|
-
url = url.replace(/\(/g, "\\(").replace(/\)/g, "\\)");
|
|
604
|
-
}
|
|
605
|
-
log.info("arrowTypeStart", edge.arrowTypeStart);
|
|
606
|
-
log.info("arrowTypeEnd", edge.arrowTypeEnd);
|
|
607
|
-
addEdgeMarkers(svgPath, edge, url, id, diagramType, strokeColor);
|
|
608
|
-
const midIndex = Math.floor(points.length / 2);
|
|
609
|
-
const point2 = points[midIndex];
|
|
610
|
-
if (!utils_default.isLabelCoordinateInPath(point2, svgPath.attr("d"))) {
|
|
611
|
-
pointsHasChanged = true;
|
|
612
|
-
}
|
|
613
|
-
let paths = {};
|
|
614
|
-
if (pointsHasChanged) {
|
|
615
|
-
paths.updatedPath = points;
|
|
616
|
-
}
|
|
617
|
-
paths.originalPath = edge.points;
|
|
618
|
-
return paths;
|
|
619
|
-
}, "insertEdge");
|
|
620
|
-
function generateRoundedPath(points, radius) {
|
|
621
|
-
if (points.length < 2) {
|
|
622
|
-
return "";
|
|
623
|
-
}
|
|
624
|
-
let path = "";
|
|
625
|
-
const size = points.length;
|
|
626
|
-
const epsilon = 1e-5;
|
|
627
|
-
for (let i = 0; i < size; i++) {
|
|
628
|
-
const currPoint = points[i];
|
|
629
|
-
const prevPoint = points[i - 1];
|
|
630
|
-
const nextPoint = points[i + 1];
|
|
631
|
-
if (i === 0) {
|
|
632
|
-
path += `M${currPoint.x},${currPoint.y}`;
|
|
633
|
-
} else if (i === size - 1) {
|
|
634
|
-
path += `L${currPoint.x},${currPoint.y}`;
|
|
635
|
-
} else {
|
|
636
|
-
const dx1 = currPoint.x - prevPoint.x;
|
|
637
|
-
const dy1 = currPoint.y - prevPoint.y;
|
|
638
|
-
const dx2 = nextPoint.x - currPoint.x;
|
|
639
|
-
const dy2 = nextPoint.y - currPoint.y;
|
|
640
|
-
const len1 = Math.hypot(dx1, dy1);
|
|
641
|
-
const len2 = Math.hypot(dx2, dy2);
|
|
642
|
-
if (len1 < epsilon || len2 < epsilon) {
|
|
643
|
-
path += `L${currPoint.x},${currPoint.y}`;
|
|
644
|
-
continue;
|
|
645
|
-
}
|
|
646
|
-
const nx1 = dx1 / len1;
|
|
647
|
-
const ny1 = dy1 / len1;
|
|
648
|
-
const nx2 = dx2 / len2;
|
|
649
|
-
const ny2 = dy2 / len2;
|
|
650
|
-
const dot = nx1 * nx2 + ny1 * ny2;
|
|
651
|
-
const clampedDot = Math.max(-1, Math.min(1, dot));
|
|
652
|
-
const angle = Math.acos(clampedDot);
|
|
653
|
-
if (angle < epsilon || Math.abs(Math.PI - angle) < epsilon) {
|
|
654
|
-
path += `L${currPoint.x},${currPoint.y}`;
|
|
655
|
-
continue;
|
|
656
|
-
}
|
|
657
|
-
const cutLen = Math.min(radius / Math.sin(angle / 2), len1 / 2, len2 / 2);
|
|
658
|
-
const startX = currPoint.x - nx1 * cutLen;
|
|
659
|
-
const startY = currPoint.y - ny1 * cutLen;
|
|
660
|
-
const endX = currPoint.x + nx2 * cutLen;
|
|
661
|
-
const endY = currPoint.y + ny2 * cutLen;
|
|
662
|
-
path += `L${startX},${startY}`;
|
|
663
|
-
path += `Q${currPoint.x},${currPoint.y} ${endX},${endY}`;
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
return path;
|
|
667
|
-
}
|
|
668
|
-
__name(generateRoundedPath, "generateRoundedPath");
|
|
669
|
-
function calculateDeltaAndAngle(point1, point2) {
|
|
670
|
-
if (!point1 || !point2) {
|
|
671
|
-
return { angle: 0, deltaX: 0, deltaY: 0 };
|
|
672
|
-
}
|
|
673
|
-
const deltaX = point2.x - point1.x;
|
|
674
|
-
const deltaY = point2.y - point1.y;
|
|
675
|
-
const angle = Math.atan2(deltaY, deltaX);
|
|
676
|
-
return { angle, deltaX, deltaY };
|
|
677
|
-
}
|
|
678
|
-
__name(calculateDeltaAndAngle, "calculateDeltaAndAngle");
|
|
679
|
-
function applyMarkerOffsetsToPoints(points, edge) {
|
|
680
|
-
const newPoints = points.map((point2) => ({ ...point2 }));
|
|
681
|
-
if (points.length >= 2 && markerOffsets[edge.arrowTypeStart]) {
|
|
682
|
-
const offsetValue = markerOffsets[edge.arrowTypeStart];
|
|
683
|
-
const point1 = points[0];
|
|
684
|
-
const point2 = points[1];
|
|
685
|
-
const { angle } = calculateDeltaAndAngle(point1, point2);
|
|
686
|
-
const offsetX = offsetValue * Math.cos(angle);
|
|
687
|
-
const offsetY = offsetValue * Math.sin(angle);
|
|
688
|
-
newPoints[0].x = point1.x + offsetX;
|
|
689
|
-
newPoints[0].y = point1.y + offsetY;
|
|
690
|
-
}
|
|
691
|
-
const n = points.length;
|
|
692
|
-
if (n >= 2 && markerOffsets[edge.arrowTypeEnd]) {
|
|
693
|
-
const offsetValue = markerOffsets[edge.arrowTypeEnd];
|
|
694
|
-
const point1 = points[n - 1];
|
|
695
|
-
const point2 = points[n - 2];
|
|
696
|
-
const { angle } = calculateDeltaAndAngle(point2, point1);
|
|
697
|
-
const offsetX = offsetValue * Math.cos(angle);
|
|
698
|
-
const offsetY = offsetValue * Math.sin(angle);
|
|
699
|
-
newPoints[n - 1].x = point1.x - offsetX;
|
|
700
|
-
newPoints[n - 1].y = point1.y - offsetY;
|
|
701
|
-
}
|
|
702
|
-
return newPoints;
|
|
703
|
-
}
|
|
704
|
-
__name(applyMarkerOffsetsToPoints, "applyMarkerOffsetsToPoints");
|
|
705
|
-
var insertMarkers = /* @__PURE__ */ __name((elem, markerArray, type, id) => {
|
|
706
|
-
markerArray.forEach((markerName) => {
|
|
707
|
-
markers[markerName](elem, type, id);
|
|
708
|
-
});
|
|
709
|
-
}, "insertMarkers");
|
|
710
|
-
var extension = /* @__PURE__ */ __name((elem, type, id) => {
|
|
711
|
-
log.trace("Making markers for ", id);
|
|
712
|
-
elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionStart").attr("class", "marker extension " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z");
|
|
713
|
-
elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd").attr("class", "marker extension " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
|
|
714
|
-
}, "extension");
|
|
715
|
-
var composition = /* @__PURE__ */ __name((elem, type, id) => {
|
|
716
|
-
elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart").attr("class", "marker composition " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
717
|
-
elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd").attr("class", "marker composition " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
718
|
-
}, "composition");
|
|
719
|
-
var aggregation = /* @__PURE__ */ __name((elem, type, id) => {
|
|
720
|
-
elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart").attr("class", "marker aggregation " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
721
|
-
elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd").attr("class", "marker aggregation " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
722
|
-
}, "aggregation");
|
|
723
|
-
var dependency = /* @__PURE__ */ __name((elem, type, id) => {
|
|
724
|
-
elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart").attr("class", "marker dependency " + type).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z");
|
|
725
|
-
elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd").attr("class", "marker dependency " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
|
|
726
|
-
}, "dependency");
|
|
727
|
-
var lollipop = /* @__PURE__ */ __name((elem, type, id) => {
|
|
728
|
-
elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart").attr("class", "marker lollipop " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
|
|
729
|
-
elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd").attr("class", "marker lollipop " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
|
|
730
|
-
}, "lollipop");
|
|
731
|
-
var point = /* @__PURE__ */ __name((elem, type, id) => {
|
|
732
|
-
elem.append("marker").attr("id", id + "_" + type + "-pointEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 8).attr("markerHeight", 8).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
733
|
-
elem.append("marker").attr("id", id + "_" + type + "-pointStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 8).attr("markerHeight", 8).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
734
|
-
}, "point");
|
|
735
|
-
var circle = /* @__PURE__ */ __name((elem, type, id) => {
|
|
736
|
-
elem.append("marker").attr("id", id + "_" + type + "-circleEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
737
|
-
elem.append("marker").attr("id", id + "_" + type + "-circleStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
738
|
-
}, "circle");
|
|
739
|
-
var cross = /* @__PURE__ */ __name((elem, type, id) => {
|
|
740
|
-
elem.append("marker").attr("id", id + "_" + type + "-crossEnd").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
|
|
741
|
-
elem.append("marker").attr("id", id + "_" + type + "-crossStart").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
|
|
742
|
-
}, "cross");
|
|
743
|
-
var barb = /* @__PURE__ */ __name((elem, type, id) => {
|
|
744
|
-
elem.append("defs").append("marker").attr("id", id + "_" + type + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
|
|
745
|
-
}, "barb");
|
|
746
|
-
var only_one = /* @__PURE__ */ __name((elem, type, id) => {
|
|
747
|
-
elem.append("defs").append("marker").attr("id", id + "_" + type + "-onlyOneStart").attr("class", "marker onlyOne " + type).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("d", "M9,0 L9,18 M15,0 L15,18");
|
|
748
|
-
elem.append("defs").append("marker").attr("id", id + "_" + type + "-onlyOneEnd").attr("class", "marker onlyOne " + type).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("d", "M3,0 L3,18 M9,0 L9,18");
|
|
749
|
-
}, "only_one");
|
|
750
|
-
var zero_or_one = /* @__PURE__ */ __name((elem, type, id) => {
|
|
751
|
-
const startMarker = elem.append("defs").append("marker").attr("id", id + "_" + type + "-zeroOrOneStart").attr("class", "marker zeroOrOne " + type).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto");
|
|
752
|
-
startMarker.append("circle").attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6);
|
|
753
|
-
startMarker.append("path").attr("d", "M9,0 L9,18");
|
|
754
|
-
const endMarker = elem.append("defs").append("marker").attr("id", id + "_" + type + "-zeroOrOneEnd").attr("class", "marker zeroOrOne " + type).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto");
|
|
755
|
-
endMarker.append("circle").attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6);
|
|
756
|
-
endMarker.append("path").attr("d", "M21,0 L21,18");
|
|
757
|
-
}, "zero_or_one");
|
|
758
|
-
var one_or_more = /* @__PURE__ */ __name((elem, type, id) => {
|
|
759
|
-
elem.append("defs").append("marker").attr("id", id + "_" + type + "-oneOrMoreStart").attr("class", "marker oneOrMore " + type).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27");
|
|
760
|
-
elem.append("defs").append("marker").attr("id", id + "_" + type + "-oneOrMoreEnd").attr("class", "marker oneOrMore " + type).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18");
|
|
761
|
-
}, "one_or_more");
|
|
762
|
-
var zero_or_more = /* @__PURE__ */ __name((elem, type, id) => {
|
|
763
|
-
const startMarker = elem.append("defs").append("marker").attr("id", id + "_" + type + "-zeroOrMoreStart").attr("class", "marker zeroOrMore " + type).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto");
|
|
764
|
-
startMarker.append("circle").attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6);
|
|
765
|
-
startMarker.append("path").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18");
|
|
766
|
-
const endMarker = elem.append("defs").append("marker").attr("id", id + "_" + type + "-zeroOrMoreEnd").attr("class", "marker zeroOrMore " + type).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto");
|
|
767
|
-
endMarker.append("circle").attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6);
|
|
768
|
-
endMarker.append("path").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18");
|
|
769
|
-
}, "zero_or_more");
|
|
770
|
-
var requirement_arrow = /* @__PURE__ */ __name((elem, type, id) => {
|
|
771
|
-
elem.append("defs").append("marker").attr("id", id + "_" + type + "-requirement_arrowEnd").attr("refX", 20).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").append("path").attr(
|
|
772
|
-
"d",
|
|
773
|
-
`M0,0
|
|
774
|
-
L20,10
|
|
775
|
-
M20,10
|
|
776
|
-
L0,20`
|
|
777
|
-
);
|
|
778
|
-
}, "requirement_arrow");
|
|
779
|
-
var requirement_contains = /* @__PURE__ */ __name((elem, type, id) => {
|
|
780
|
-
const containsNode = elem.append("defs").append("marker").attr("id", id + "_" + type + "-requirement_containsStart").attr("refX", 0).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").append("g");
|
|
781
|
-
containsNode.append("circle").attr("cx", 10).attr("cy", 10).attr("r", 9).attr("fill", "none");
|
|
782
|
-
containsNode.append("line").attr("x1", 1).attr("x2", 19).attr("y1", 10).attr("y2", 10);
|
|
783
|
-
containsNode.append("line").attr("y1", 1).attr("y2", 19).attr("x1", 10).attr("x2", 10);
|
|
784
|
-
}, "requirement_contains");
|
|
785
|
-
var markers = {
|
|
786
|
-
extension,
|
|
787
|
-
composition,
|
|
788
|
-
aggregation,
|
|
789
|
-
dependency,
|
|
790
|
-
lollipop,
|
|
791
|
-
point,
|
|
792
|
-
circle,
|
|
793
|
-
cross,
|
|
794
|
-
barb,
|
|
795
|
-
only_one,
|
|
796
|
-
zero_or_one,
|
|
797
|
-
one_or_more,
|
|
798
|
-
zero_or_more,
|
|
799
|
-
requirement_arrow,
|
|
800
|
-
requirement_contains
|
|
801
|
-
};
|
|
802
|
-
var markers_default = insertMarkers;
|
|
803
|
-
|
|
804
|
-
export { clear, insertEdge, insertEdgeLabel, markers_default, positionEdgeLabel };
|
|
805
|
-
//# sourceMappingURL=chunk-ENI667QL.mjs.map
|
|
806
|
-
//# sourceMappingURL=chunk-ENI667QL.mjs.map
|