@render-harness/ui 0.1.2 → 0.1.4

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.
Files changed (97) hide show
  1. package/dist/static/assets/{architectureDiagram-3BPJPVTR-DLNRxqTW.js → architectureDiagram-3BPJPVTR-CFD3Y1kc.js} +2 -2
  2. package/dist/static/assets/{architectureDiagram-3BPJPVTR-DLNRxqTW.js.map → architectureDiagram-3BPJPVTR-CFD3Y1kc.js.map} +1 -1
  3. package/dist/static/assets/{blockDiagram-GPEHLZMM-CCWTkWe6.js → blockDiagram-GPEHLZMM-Elf3j5Yp.js} +3 -3
  4. package/dist/static/assets/{blockDiagram-GPEHLZMM-CCWTkWe6.js.map → blockDiagram-GPEHLZMM-Elf3j5Yp.js.map} +1 -1
  5. package/dist/static/assets/{c4Diagram-AAUBKEIU-qO0tZRXO.js → c4Diagram-AAUBKEIU-COPyA4Y2.js} +2 -2
  6. package/dist/static/assets/{c4Diagram-AAUBKEIU-qO0tZRXO.js.map → c4Diagram-AAUBKEIU-COPyA4Y2.js.map} +1 -1
  7. package/dist/static/assets/{chunk-3OPIFGDE-xcRWDOrg.js → chunk-3OPIFGDE-P0oLihOV.js} +2 -2
  8. package/dist/static/assets/{chunk-3OPIFGDE-xcRWDOrg.js.map → chunk-3OPIFGDE-P0oLihOV.js.map} +1 -1
  9. package/dist/static/assets/{chunk-5ZQYHXKU-B_3UEJ_q.js → chunk-5ZQYHXKU-CCVDVWrS.js} +2 -2
  10. package/dist/static/assets/{chunk-5ZQYHXKU-B_3UEJ_q.js.map → chunk-5ZQYHXKU-CCVDVWrS.js.map} +1 -1
  11. package/dist/static/assets/{chunk-727SXJPM-c1bbIj6N.js → chunk-727SXJPM-CNNkFQDE.js} +2 -2
  12. package/dist/static/assets/{chunk-727SXJPM-c1bbIj6N.js.map → chunk-727SXJPM-CNNkFQDE.js.map} +1 -1
  13. package/dist/static/assets/{chunk-AQP2D5EJ-Wv0w6wvH.js → chunk-AQP2D5EJ-BmW_1ljM.js} +2 -2
  14. package/dist/static/assets/{chunk-AQP2D5EJ-Wv0w6wvH.js.map → chunk-AQP2D5EJ-BmW_1ljM.js.map} +1 -1
  15. package/dist/static/assets/{chunk-KSCS5N6A-BZrceHGX.js → chunk-KSCS5N6A-B2emJsw5.js} +3 -3
  16. package/dist/static/assets/{chunk-KSCS5N6A-BZrceHGX.js.map → chunk-KSCS5N6A-B2emJsw5.js.map} +1 -1
  17. package/dist/static/assets/{chunk-L5ZTLDWV-BAcjEn3C.js → chunk-L5ZTLDWV-DZfwPtSD.js} +2 -2
  18. package/dist/static/assets/{chunk-L5ZTLDWV-BAcjEn3C.js.map → chunk-L5ZTLDWV-DZfwPtSD.js.map} +1 -1
  19. package/dist/static/assets/{chunk-O5CBEL6O-KRO56hHQ.js → chunk-O5CBEL6O-CNfA3Ek9.js} +2 -2
  20. package/dist/static/assets/{chunk-O5CBEL6O-KRO56hHQ.js.map → chunk-O5CBEL6O-CNfA3Ek9.js.map} +1 -1
  21. package/dist/static/assets/classDiagram-4FO5ZUOK-BRBJdDvt.js +2 -0
  22. package/dist/static/assets/{classDiagram-4FO5ZUOK-oexPF7ww.js.map → classDiagram-4FO5ZUOK-BRBJdDvt.js.map} +1 -1
  23. package/dist/static/assets/classDiagram-v2-Q7XG4LA2-CQjk9kLc.js +2 -0
  24. package/dist/static/assets/{classDiagram-v2-Q7XG4LA2-Dc4jeSLj.js.map → classDiagram-v2-Q7XG4LA2-CQjk9kLc.js.map} +1 -1
  25. package/dist/static/assets/{dagre-BM42HDAG-au4dCVgC.js → dagre-BM42HDAG-DovnSGTF.js} +2 -2
  26. package/dist/static/assets/{dagre-BM42HDAG-au4dCVgC.js.map → dagre-BM42HDAG-DovnSGTF.js.map} +1 -1
  27. package/dist/static/assets/{diagram-2AECGRRQ-rJMnDhBW.js → diagram-2AECGRRQ-DL9VAGtd.js} +2 -2
  28. package/dist/static/assets/{diagram-2AECGRRQ-rJMnDhBW.js.map → diagram-2AECGRRQ-DL9VAGtd.js.map} +1 -1
  29. package/dist/static/assets/{diagram-5GNKFQAL-diIxjA-v.js → diagram-5GNKFQAL-Crr9YjF6.js} +2 -2
  30. package/dist/static/assets/{diagram-5GNKFQAL-diIxjA-v.js.map → diagram-5GNKFQAL-Crr9YjF6.js.map} +1 -1
  31. package/dist/static/assets/{diagram-KO2AKTUF-D9IYocVR.js → diagram-KO2AKTUF-B3yOnGTs.js} +2 -2
  32. package/dist/static/assets/{diagram-KO2AKTUF-D9IYocVR.js.map → diagram-KO2AKTUF-B3yOnGTs.js.map} +1 -1
  33. package/dist/static/assets/{diagram-LMA3HP47-BtdvpqaH.js → diagram-LMA3HP47-KALO7OjG.js} +2 -2
  34. package/dist/static/assets/{diagram-LMA3HP47-BtdvpqaH.js.map → diagram-LMA3HP47-KALO7OjG.js.map} +1 -1
  35. package/dist/static/assets/{diagram-OG6HWLK6-CaRkxDoj.js → diagram-OG6HWLK6-D0GPjAxV.js} +2 -2
  36. package/dist/static/assets/{diagram-OG6HWLK6-CaRkxDoj.js.map → diagram-OG6HWLK6-D0GPjAxV.js.map} +1 -1
  37. package/dist/static/assets/{erDiagram-TEJ5UH35-CgifrqeZ.js → erDiagram-TEJ5UH35-ksCvepnP.js} +2 -2
  38. package/dist/static/assets/{erDiagram-TEJ5UH35-CgifrqeZ.js.map → erDiagram-TEJ5UH35-ksCvepnP.js.map} +1 -1
  39. package/dist/static/assets/{flowDiagram-I6XJVG4X-DaguIeM_.js → flowDiagram-I6XJVG4X-BT1bpfq2.js} +2 -2
  40. package/dist/static/assets/{flowDiagram-I6XJVG4X-DaguIeM_.js.map → flowDiagram-I6XJVG4X-BT1bpfq2.js.map} +1 -1
  41. package/dist/static/assets/ganttDiagram-6RSMTGT7-Cg3QTIl7.js +293 -0
  42. package/dist/static/assets/ganttDiagram-6RSMTGT7-Cg3QTIl7.js.map +1 -0
  43. package/dist/static/assets/{gitGraphDiagram-PVQCEYII-Ht-SDjxh.js → gitGraphDiagram-PVQCEYII-AW-DbGHw.js} +2 -2
  44. package/dist/static/assets/{gitGraphDiagram-PVQCEYII-Ht-SDjxh.js.map → gitGraphDiagram-PVQCEYII-AW-DbGHw.js.map} +1 -1
  45. package/dist/static/assets/index-B1CSiQFH.js +260 -0
  46. package/dist/static/assets/index-B1CSiQFH.js.map +1 -0
  47. package/dist/static/assets/{index-luXiT-gK.css → index-BJZaWHUt.css} +1 -1
  48. package/dist/static/assets/{infoDiagram-5YYISTIA-CwLGA7Zu.js → infoDiagram-5YYISTIA-DZzRjoNy.js} +2 -2
  49. package/dist/static/assets/{infoDiagram-5YYISTIA-CwLGA7Zu.js.map → infoDiagram-5YYISTIA-DZzRjoNy.js.map} +1 -1
  50. package/dist/static/assets/init-D6CV0rqX.js +2 -0
  51. package/dist/static/assets/{init-Dfd1k18d.js.map → init-D6CV0rqX.js.map} +1 -1
  52. package/dist/static/assets/{ishikawaDiagram-YF4QCWOH-CaZCrUUR.js → ishikawaDiagram-YF4QCWOH-A-bX4Zu0.js} +2 -2
  53. package/dist/static/assets/{ishikawaDiagram-YF4QCWOH-CaZCrUUR.js.map → ishikawaDiagram-YF4QCWOH-A-bX4Zu0.js.map} +1 -1
  54. package/dist/static/assets/{kanban-definition-UN3LZRKU-DlYha85J.js → kanban-definition-UN3LZRKU-ibATe6sx.js} +2 -2
  55. package/dist/static/assets/{kanban-definition-UN3LZRKU-DlYha85J.js.map → kanban-definition-UN3LZRKU-ibATe6sx.js.map} +1 -1
  56. package/dist/static/assets/{line-GCwXS1Fi.js → line-DvIoplHa.js} +2 -2
  57. package/dist/static/assets/{line-GCwXS1Fi.js.map → line-DvIoplHa.js.map} +1 -1
  58. package/dist/static/assets/linear-D0P02-YR.js +2 -0
  59. package/dist/static/assets/{linear-CTnL8jvu.js.map → linear-D0P02-YR.js.map} +1 -1
  60. package/dist/static/assets/{mindmap-definition-RKZ34NQL-CPJIWJdQ.js → mindmap-definition-RKZ34NQL-BYhA5Frb.js} +2 -2
  61. package/dist/static/assets/{mindmap-definition-RKZ34NQL-CPJIWJdQ.js.map → mindmap-definition-RKZ34NQL-BYhA5Frb.js.map} +1 -1
  62. package/dist/static/assets/{ordinal-DjeI0KOh.js → ordinal-D-PEDSg4.js} +2 -2
  63. package/dist/static/assets/{ordinal-DjeI0KOh.js.map → ordinal-D-PEDSg4.js.map} +1 -1
  64. package/dist/static/assets/{pieDiagram-4H26LBE5-DTVmF_CH.js → pieDiagram-4H26LBE5-qud9ZeDs.js} +2 -2
  65. package/dist/static/assets/{pieDiagram-4H26LBE5-DTVmF_CH.js.map → pieDiagram-4H26LBE5-qud9ZeDs.js.map} +1 -1
  66. package/dist/static/assets/{quadrantDiagram-W4KKPZXB-Bho6zy_y.js → quadrantDiagram-W4KKPZXB-B5lPA7rJ.js} +2 -2
  67. package/dist/static/assets/{quadrantDiagram-W4KKPZXB-Bho6zy_y.js.map → quadrantDiagram-W4KKPZXB-B5lPA7rJ.js.map} +1 -1
  68. package/dist/static/assets/{requirementDiagram-4Y6WPE33-CLyoVwlh.js → requirementDiagram-4Y6WPE33-C0mLADne.js} +2 -2
  69. package/dist/static/assets/{requirementDiagram-4Y6WPE33-CLyoVwlh.js.map → requirementDiagram-4Y6WPE33-C0mLADne.js.map} +1 -1
  70. package/dist/static/assets/{sankeyDiagram-5OEKKPKP-V2yvk-0Z.js → sankeyDiagram-5OEKKPKP-vwfoPxTH.js} +2 -2
  71. package/dist/static/assets/{sankeyDiagram-5OEKKPKP-V2yvk-0Z.js.map → sankeyDiagram-5OEKKPKP-vwfoPxTH.js.map} +1 -1
  72. package/dist/static/assets/{sequenceDiagram-3UESZ5HK-Dp03aXVk.js → sequenceDiagram-3UESZ5HK-DtPUE6ba.js} +2 -2
  73. package/dist/static/assets/{sequenceDiagram-3UESZ5HK-Dp03aXVk.js.map → sequenceDiagram-3UESZ5HK-DtPUE6ba.js.map} +1 -1
  74. package/dist/static/assets/{stateDiagram-AJRCARHV-BEJW-_HK.js → stateDiagram-AJRCARHV-BaeNtGLJ.js} +2 -2
  75. package/dist/static/assets/{stateDiagram-AJRCARHV-BEJW-_HK.js.map → stateDiagram-AJRCARHV-BaeNtGLJ.js.map} +1 -1
  76. package/dist/static/assets/stateDiagram-v2-BHNVJYJU-DbTX_m6G.js +2 -0
  77. package/dist/static/assets/{stateDiagram-v2-BHNVJYJU-Bo19-vKE.js.map → stateDiagram-v2-BHNVJYJU-DbTX_m6G.js.map} +1 -1
  78. package/dist/static/assets/{timeline-definition-PNZ67QCA-C4KTq0mQ.js → timeline-definition-PNZ67QCA-C9H1UzNY.js} +2 -2
  79. package/dist/static/assets/{timeline-definition-PNZ67QCA-C4KTq0mQ.js.map → timeline-definition-PNZ67QCA-C9H1UzNY.js.map} +1 -1
  80. package/dist/static/assets/{vennDiagram-CIIHVFJN-1jmBZPSZ.js → vennDiagram-CIIHVFJN-BpQ2qCN5.js} +2 -2
  81. package/dist/static/assets/{vennDiagram-CIIHVFJN-1jmBZPSZ.js.map → vennDiagram-CIIHVFJN-BpQ2qCN5.js.map} +1 -1
  82. package/dist/static/assets/{wardleyDiagram-YWT4CUSO-A8XYzYTW.js → wardleyDiagram-YWT4CUSO-CQ8dLujr.js} +2 -2
  83. package/dist/static/assets/{wardleyDiagram-YWT4CUSO-A8XYzYTW.js.map → wardleyDiagram-YWT4CUSO-CQ8dLujr.js.map} +1 -1
  84. package/dist/static/assets/{xychartDiagram-2RQKCTM6-CuyUQvFt.js → xychartDiagram-2RQKCTM6-BCRK_Cs-.js} +4 -4
  85. package/dist/static/assets/xychartDiagram-2RQKCTM6-BCRK_Cs-.js.map +1 -0
  86. package/dist/static/index.html +14 -10
  87. package/package.json +14 -13
  88. package/dist/static/assets/classDiagram-4FO5ZUOK-oexPF7ww.js +0 -2
  89. package/dist/static/assets/classDiagram-v2-Q7XG4LA2-Dc4jeSLj.js +0 -2
  90. package/dist/static/assets/ganttDiagram-6RSMTGT7-DIFubQTa.js +0 -293
  91. package/dist/static/assets/ganttDiagram-6RSMTGT7-DIFubQTa.js.map +0 -1
  92. package/dist/static/assets/index-D5tmHkO_.js +0 -228
  93. package/dist/static/assets/index-D5tmHkO_.js.map +0 -1
  94. package/dist/static/assets/init-Dfd1k18d.js +0 -2
  95. package/dist/static/assets/linear-CTnL8jvu.js +0 -2
  96. package/dist/static/assets/stateDiagram-v2-BHNVJYJU-Bo19-vKE.js +0 -2
  97. package/dist/static/assets/xychartDiagram-2RQKCTM6-CuyUQvFt.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import{g as e,h as t}from"./src-DoMhBUqV.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,v as l,w as u,x as d,y as f}from"./chunk-CSCIHK7Q-BBzr5U3o.js";import{i as p}from"./chunk-5ZQYHXKU-B_3UEJ_q.js";import{a as m}from"./index-D5tmHkO_.js";import{t as h}from"./chunk-4BX2VUAB-BqYEJTr3.js";import{t as g}from"./mermaid-parser.core-BO_-QleW.js";var _=t((e,t)=>{let n=e<=1?e*100:e;if(n<0||n>100)throw Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return n},`toPercent`),v=t((e,t,n)=>({x:_(t,`${n} evolution`),y:_(e,`${n} visibility`)}),`toCoordinates`),y=t(e=>{if(e){if(e===`+<>`)return`bidirectional`;if(e===`+<`)return`backward`;if(e===`+>`)return`forward`}},`getFlowFromPort`),b=t(e=>{if(!e?.startsWith(`+`))return{};let t=/^\+'([^']*)'/.exec(e)?.[1];return e.includes(`<>`)?{flow:`bidirectional`,label:t}:e.includes(`<`)?{flow:`backward`,label:t}:e.includes(`>`)?{flow:`forward`,label:t}:{label:t}},`extractFlowFromArrow`),x=t((e,t)=>{if(h(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let n=e.evolution.stages.map(e=>e.secondName?`${e.name.trim()} / ${e.secondName.trim()}`:e.name.trim()),r=e.evolution.stages.filter(e=>e.boundary!==void 0).map(e=>e.boundary);t.updateAxes({stages:n,stageBoundaries:r})}if(e.anchors.forEach(e=>{let n=v(e.visibility,e.evolution,`Anchor "${e.name}"`);t.addNode(e.name,e.name,n.x,n.y,`anchor`)}),e.components.forEach(e=>{let n=v(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,a=e.decorator?.strategy;t.addNode(e.name,e.name,n.x,n.y,`component`,r,i,e.inertia,a)}),e.notes.forEach(e=>{let n=v(e.visibility,e.evolution,`Note "${e.text}"`);t.addNote(e.text,n.x,n.y)}),e.pipelines.forEach(e=>{let n=t.getNode(e.parent);if(!n||typeof n.y!=`number`)throw Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);let r=n.y;t.startPipeline(e.parent),e.components.forEach(n=>{let i=`${e.parent}_${n.name}`,a=n.label?(n.label.negX?-1:1)*n.label.offsetX:void 0,o=n.label?(n.label.negY?-1:1)*n.label.offsetY:void 0,s=_(n.evolution,`Pipeline component "${n.name}" evolution`);t.addNode(i,n.name,s,r,`pipeline-component`,a,o),t.addPipelineComponent(e.parent,i)})}),e.links.forEach(e=>{let n=!!e.arrow&&(e.arrow.includes(`-.->`)||e.arrow.includes(`.-.`)),r=y(e.fromPort)??y(e.toPort),{flow:i,label:a}=b(e.arrow);!r&&i&&(r=i);let o=e.linkLabel,s=a??o;t.addLink(t.resolveNodeId(e.from),t.resolveNodeId(e.to),n,s,r)}),e.evolves.forEach(e=>{let n=t.getNode(e.component);if(n?.y!==void 0){let r=_(e.target,`Evolve target for "${e.component}"`);t.addTrend(e.component,r,n.y)}}),e.annotations.length>0){let n=e.annotations[0],r=v(n.x,n.y,`Annotations box`);t.setAnnotationsBox(r.x,r.y)}e.annotation.forEach(e=>{let n=v(e.x,e.y,`Annotation ${e.number}`);t.addAnnotation(e.number,[{x:n.x,y:n.y}],e.text)}),e.accelerators.forEach(e=>{let n=v(e.x,e.y,`Accelerator "${e.name}"`);t.addAccelerator(e.name,n.x,n.y)}),e.deaccelerators.forEach(e=>{let n=v(e.x,e.y,`Deaccelerator "${e.name}"`);t.addDeaccelerator(e.name,n.x,n.y)})},`populateDb`),S={parser:{yy:void 0},parse:t(async t=>{let n=await g(`wardley`,t);e.debug(n);let r=S.parser?.yy;if(!r||typeof r.addNode!=`function`)throw Error(`parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);x(n,r)},`parse`)},C=new class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{t(this,`WardleyBuilder`)}addNode(e){let t=this.nodes.get(e.id)??{id:e.id,label:e.label},n={...t,...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY};this.nodes.set(e.id,n)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});let t=this.nodes.get(e);t&&(t.isPipelineParent=!0)}addPipelineComponent(e,t){let n=this.pipelines.get(e);n&&n.componentIds.push(t);let r=this.nodes.get(t);r&&(r.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,t){this.annotationsBox={x:e,y:t}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,t){this.size={width:e,height:t}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(let[t,n]of this.nodes)if(n.label===e)return t;return e}build(){let e=[];for(let t of this.nodes.values()){if(typeof t.x!=`number`||typeof t.y!=`number`)throw Error(`Node "${t.label}" is missing coordinates`);e.push(t)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}};function w(){return d()[`wardley-beta`]}t(w,`getConfig`);function T(e,t,n,r,i,a,o,s,c){C.addNode({id:e,label:t,x:n,y:r,className:i,labelOffsetX:a,labelOffsetY:o,inertia:s,sourceStrategy:c})}t(T,`addNode`);function E(e,t,n=!1,r,i){C.addLink({source:e,target:t,dashed:n,label:r,flow:i})}t(E,`addLink`);function D(e,t,n){C.addTrend({nodeId:e,targetX:t,targetY:n})}t(D,`addTrend`);function O(e,t,n){C.addAnnotation({number:e,coordinates:t,text:n})}t(O,`addAnnotation`);function k(e,t,n){C.addNote({text:e,x:t,y:n})}t(k,`addNote`);function A(e,t,n){C.addAccelerator({name:e,x:t,y:n})}t(A,`addAccelerator`);function j(e,t,n){C.addDeaccelerator({name:e,x:t,y:n})}t(j,`addDeaccelerator`);function M(e,t){C.setAnnotationsBox(e,t)}t(M,`setAnnotationsBox`);function N(e,t){C.setSize(e,t)}t(N,`setSize`);function P(e){C.startPipeline(e)}t(P,`startPipeline`);function F(e,t){C.addPipelineComponent(e,t)}t(F,`addPipelineComponent`);function I(e){C.setAxes(e)}t(I,`updateAxes`);function L(e){return C.getNode(e)}t(L,`getNode`);function R(e){return C.resolveNodeId(e)}t(R,`resolveNodeId`);function z(){return C.build()}t(z,`getWardleyData`);function B(){C.clear(),o()}t(B,`clear`);var V={getConfig:w,addNode:T,addLink:E,addTrend:D,addAnnotation:O,addNote:k,addAccelerator:A,addDeaccelerator:j,setAnnotationsBox:M,setSize:N,startPipeline:P,addPipelineComponent:F,updateAxes:I,getNode:L,resolveNodeId:R,getWardleyData:z,clear:B,setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:u,getAccDescription:l,setAccDescription:r},H=[`Genesis`,`Custom Built`,`Product`,`Commodity`],U=t(()=>{let{themeVariables:e}=d();return{backgroundColor:e.wardley?.backgroundColor??e.background??`#fff`,axisColor:e.wardley?.axisColor??`#000`,axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??`#222`,gridColor:e.wardley?.gridColor??`rgba(100, 100, 100, 0.2)`,componentFill:e.wardley?.componentFill??`#fff`,componentStroke:e.wardley?.componentStroke??`#000`,componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??`#222`,linkStroke:e.wardley?.linkStroke??`#000`,evolutionStroke:e.wardley?.evolutionStroke??`#dc3545`,annotationStroke:e.wardley?.annotationStroke??`#000`,annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??`#222`,annotationFill:e.wardley?.annotationFill??e.background??`#fff`}},`getTheme`),W=t(()=>{let e=d()[`wardley-beta`];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},`getConfigValues`),G={parser:S,db:V,renderer:{draw:t((n,r,i,a)=>{e.debug(`Rendering Wardley map
1
+ import{g as e,h as t}from"./src-DoMhBUqV.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,v as l,w as u,x as d,y as f}from"./chunk-CSCIHK7Q-BBzr5U3o.js";import{i as p}from"./chunk-5ZQYHXKU-CCVDVWrS.js";import{a as m}from"./index-B1CSiQFH.js";import{t as h}from"./chunk-4BX2VUAB-BqYEJTr3.js";import{t as g}from"./mermaid-parser.core-BO_-QleW.js";var _=t((e,t)=>{let n=e<=1?e*100:e;if(n<0||n>100)throw Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return n},`toPercent`),v=t((e,t,n)=>({x:_(t,`${n} evolution`),y:_(e,`${n} visibility`)}),`toCoordinates`),y=t(e=>{if(e){if(e===`+<>`)return`bidirectional`;if(e===`+<`)return`backward`;if(e===`+>`)return`forward`}},`getFlowFromPort`),b=t(e=>{if(!e?.startsWith(`+`))return{};let t=/^\+'([^']*)'/.exec(e)?.[1];return e.includes(`<>`)?{flow:`bidirectional`,label:t}:e.includes(`<`)?{flow:`backward`,label:t}:e.includes(`>`)?{flow:`forward`,label:t}:{label:t}},`extractFlowFromArrow`),x=t((e,t)=>{if(h(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let n=e.evolution.stages.map(e=>e.secondName?`${e.name.trim()} / ${e.secondName.trim()}`:e.name.trim()),r=e.evolution.stages.filter(e=>e.boundary!==void 0).map(e=>e.boundary);t.updateAxes({stages:n,stageBoundaries:r})}if(e.anchors.forEach(e=>{let n=v(e.visibility,e.evolution,`Anchor "${e.name}"`);t.addNode(e.name,e.name,n.x,n.y,`anchor`)}),e.components.forEach(e=>{let n=v(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,a=e.decorator?.strategy;t.addNode(e.name,e.name,n.x,n.y,`component`,r,i,e.inertia,a)}),e.notes.forEach(e=>{let n=v(e.visibility,e.evolution,`Note "${e.text}"`);t.addNote(e.text,n.x,n.y)}),e.pipelines.forEach(e=>{let n=t.getNode(e.parent);if(!n||typeof n.y!=`number`)throw Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);let r=n.y;t.startPipeline(e.parent),e.components.forEach(n=>{let i=`${e.parent}_${n.name}`,a=n.label?(n.label.negX?-1:1)*n.label.offsetX:void 0,o=n.label?(n.label.negY?-1:1)*n.label.offsetY:void 0,s=_(n.evolution,`Pipeline component "${n.name}" evolution`);t.addNode(i,n.name,s,r,`pipeline-component`,a,o),t.addPipelineComponent(e.parent,i)})}),e.links.forEach(e=>{let n=!!e.arrow&&(e.arrow.includes(`-.->`)||e.arrow.includes(`.-.`)),r=y(e.fromPort)??y(e.toPort),{flow:i,label:a}=b(e.arrow);!r&&i&&(r=i);let o=e.linkLabel,s=a??o;t.addLink(t.resolveNodeId(e.from),t.resolveNodeId(e.to),n,s,r)}),e.evolves.forEach(e=>{let n=t.getNode(e.component);if(n?.y!==void 0){let r=_(e.target,`Evolve target for "${e.component}"`);t.addTrend(e.component,r,n.y)}}),e.annotations.length>0){let n=e.annotations[0],r=v(n.x,n.y,`Annotations box`);t.setAnnotationsBox(r.x,r.y)}e.annotation.forEach(e=>{let n=v(e.x,e.y,`Annotation ${e.number}`);t.addAnnotation(e.number,[{x:n.x,y:n.y}],e.text)}),e.accelerators.forEach(e=>{let n=v(e.x,e.y,`Accelerator "${e.name}"`);t.addAccelerator(e.name,n.x,n.y)}),e.deaccelerators.forEach(e=>{let n=v(e.x,e.y,`Deaccelerator "${e.name}"`);t.addDeaccelerator(e.name,n.x,n.y)})},`populateDb`),S={parser:{yy:void 0},parse:t(async t=>{let n=await g(`wardley`,t);e.debug(n);let r=S.parser?.yy;if(!r||typeof r.addNode!=`function`)throw Error(`parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);x(n,r)},`parse`)},C=new class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{t(this,`WardleyBuilder`)}addNode(e){let t=this.nodes.get(e.id)??{id:e.id,label:e.label},n={...t,...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY};this.nodes.set(e.id,n)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});let t=this.nodes.get(e);t&&(t.isPipelineParent=!0)}addPipelineComponent(e,t){let n=this.pipelines.get(e);n&&n.componentIds.push(t);let r=this.nodes.get(t);r&&(r.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,t){this.annotationsBox={x:e,y:t}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,t){this.size={width:e,height:t}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(let[t,n]of this.nodes)if(n.label===e)return t;return e}build(){let e=[];for(let t of this.nodes.values()){if(typeof t.x!=`number`||typeof t.y!=`number`)throw Error(`Node "${t.label}" is missing coordinates`);e.push(t)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}};function w(){return d()[`wardley-beta`]}t(w,`getConfig`);function T(e,t,n,r,i,a,o,s,c){C.addNode({id:e,label:t,x:n,y:r,className:i,labelOffsetX:a,labelOffsetY:o,inertia:s,sourceStrategy:c})}t(T,`addNode`);function E(e,t,n=!1,r,i){C.addLink({source:e,target:t,dashed:n,label:r,flow:i})}t(E,`addLink`);function D(e,t,n){C.addTrend({nodeId:e,targetX:t,targetY:n})}t(D,`addTrend`);function O(e,t,n){C.addAnnotation({number:e,coordinates:t,text:n})}t(O,`addAnnotation`);function k(e,t,n){C.addNote({text:e,x:t,y:n})}t(k,`addNote`);function A(e,t,n){C.addAccelerator({name:e,x:t,y:n})}t(A,`addAccelerator`);function j(e,t,n){C.addDeaccelerator({name:e,x:t,y:n})}t(j,`addDeaccelerator`);function M(e,t){C.setAnnotationsBox(e,t)}t(M,`setAnnotationsBox`);function N(e,t){C.setSize(e,t)}t(N,`setSize`);function P(e){C.startPipeline(e)}t(P,`startPipeline`);function F(e,t){C.addPipelineComponent(e,t)}t(F,`addPipelineComponent`);function I(e){C.setAxes(e)}t(I,`updateAxes`);function L(e){return C.getNode(e)}t(L,`getNode`);function R(e){return C.resolveNodeId(e)}t(R,`resolveNodeId`);function z(){return C.build()}t(z,`getWardleyData`);function B(){C.clear(),o()}t(B,`clear`);var V={getConfig:w,addNode:T,addLink:E,addTrend:D,addAnnotation:O,addNote:k,addAccelerator:A,addDeaccelerator:j,setAnnotationsBox:M,setSize:N,startPipeline:P,addPipelineComponent:F,updateAxes:I,getNode:L,resolveNodeId:R,getWardleyData:z,clear:B,setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:u,getAccDescription:l,setAccDescription:r},H=[`Genesis`,`Custom Built`,`Product`,`Commodity`],U=t(()=>{let{themeVariables:e}=d();return{backgroundColor:e.wardley?.backgroundColor??e.background??`#fff`,axisColor:e.wardley?.axisColor??`#000`,axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??`#222`,gridColor:e.wardley?.gridColor??`rgba(100, 100, 100, 0.2)`,componentFill:e.wardley?.componentFill??`#fff`,componentStroke:e.wardley?.componentStroke??`#000`,componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??`#222`,linkStroke:e.wardley?.linkStroke??`#000`,evolutionStroke:e.wardley?.evolutionStroke??`#dc3545`,annotationStroke:e.wardley?.annotationStroke??`#000`,annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??`#222`,annotationFill:e.wardley?.annotationFill??e.background??`#fff`}},`getTheme`),W=t(()=>{let e=d()[`wardley-beta`];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},`getConfigValues`),G={parser:S,db:V,renderer:{draw:t((n,r,i,a)=>{e.debug(`Rendering Wardley map
2
2
  `+n);let o=W(),s=U(),l=o.nodeRadius*1.6,u=a.db,d=u.getWardleyData(),f=u.getDiagramTitle(),p=d.size?.width??o.width,h=d.size?.height??o.height,g=m(r);g.selectAll(`*`).remove(),c(g,h,p,o.useMaxWidth),g.attr(`viewBox`,`0 0 ${p} ${h}`);let _=g.append(`g`).attr(`class`,`wardley-map`),v=g.append(`defs`);v.append(`marker`).attr(`id`,`arrow-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,s.evolutionStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-end-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,s.linkStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-start-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,1).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 z`).attr(`fill`,s.linkStroke).attr(`stroke`,`none`),_.append(`rect`).attr(`class`,`wardley-background`).attr(`width`,p).attr(`height`,h).attr(`fill`,s.backgroundColor);let y=p-o.padding*2,b=h-o.padding*2;f&&_.append(`text`).attr(`class`,`wardley-title`).attr(`x`,p/2).attr(`y`,o.padding/2).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize*1.05).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let x=t(e=>o.padding+e/100*y,`projectX`),S=t(e=>h-o.padding-e/100*b,`projectY`),C=_.append(`g`).attr(`class`,`wardley-axes`);C.append(`line`).attr(`x1`,o.padding).attr(`x2`,p-o.padding).attr(`y1`,h-o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.axisColor).attr(`stroke-width`,1),C.append(`line`).attr(`x1`,o.padding).attr(`x2`,o.padding).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.axisColor).attr(`stroke-width`,1);let w=d.axes.xLabel??`Evolution`,T=d.axes.yLabel??`Visibility`;C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-x`).attr(`x`,o.padding+y/2).attr(`y`,h-o.padding/4).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).text(w),C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-y`).attr(`x`,o.padding/3).attr(`y`,o.padding+b/2).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`transform`,`rotate(-90 ${o.padding/3} ${o.padding+b/2})`).text(T);let E=d.axes.stages&&d.axes.stages.length>0?d.axes.stages:H;if(E.length>0){let e=_.append(`g`).attr(`class`,`wardley-stages`),t=d.axes.stageBoundaries,n=[];if(t&&t.length===E.length){let e=0;t.forEach(t=>{n.push({start:e,end:t}),e=t})}else{let e=1/E.length;E.forEach((t,r)=>{n.push({start:r*e,end:(r+1)*e})})}E.forEach((t,r)=>{let i=n[r],a=o.padding+i.start*y,c=(a+(o.padding+i.end*y))/2;r>0&&e.append(`line`).attr(`x1`,a).attr(`x2`,a).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,`#000`).attr(`stroke-width`,1).attr(`stroke-dasharray`,`5 5`).attr(`opacity`,.8),e.append(`text`).attr(`class`,`wardley-stage-label`).attr(`x`,c).attr(`y`,h-o.padding/1.5).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize-2).attr(`text-anchor`,`middle`).text(t)})}if(o.showGrid){let e=_.append(`g`).attr(`class`,`wardley-grid`);for(let t=1;t<4;t++){let n=t/4,r=o.padding+y*n;e.append(`line`).attr(`x1`,r).attr(`x2`,r).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.gridColor).attr(`stroke-dasharray`,`2 6`),e.append(`line`).attr(`x1`,o.padding).attr(`x2`,p-o.padding).attr(`y1`,h-o.padding-b*n).attr(`y2`,h-o.padding-b*n).attr(`stroke`,s.gridColor).attr(`stroke-dasharray`,`2 6`)}}let D=new Map;if(d.nodes.forEach(e=>{D.set(e.id,{x:x(e.x),y:S(e.y),node:e})}),d.pipelines.length>0){let e=_.append(`g`).attr(`class`,`wardley-pipelines`),t=_.append(`g`).attr(`class`,`wardley-pipeline-links`);d.pipelines.forEach(n=>{if(n.componentIds.length===0)return;let r=n.componentIds.map(e=>({id:e,pos:D.get(e),node:d.nodes.find(t=>t.id===e)})).filter(e=>e.pos&&e.node).sort((e,t)=>e.node.x-t.node.x);for(let e=0;e<r.length-1;e++){let n=r[e],i=r[e+1];t.append(`line`).attr(`class`,`wardley-pipeline-evolution-link`).attr(`x1`,n.pos.x).attr(`y1`,n.pos.y).attr(`x2`,i.pos.x).attr(`y2`,i.pos.y).attr(`stroke`,s.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`)}let i=1/0,a=-1/0,c=0;if(n.componentIds.forEach(e=>{let t=D.get(e);t&&(i=Math.min(i,t.x),a=Math.max(a,t.x),c=t.y)}),i!==1/0&&a!==-1/0){let t=o.nodeRadius*4,r=c-t/2,u=D.get(n.nodeId);u&&(u.x=(i+a)/2,u.y=r-l/6),e.append(`rect`).attr(`class`,`wardley-pipeline-box`).attr(`x`,i-15).attr(`y`,r).attr(`width`,a-i+30).attr(`height`,t).attr(`fill`,`none`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}})}let O=_.append(`g`).attr(`class`,`wardley-links`),k=new Map;d.pipelines.forEach(e=>{k.set(e.nodeId,new Set(e.componentIds))});let A=d.links.filter(e=>!(!D.has(e.source)||!D.has(e.target)||k.get(e.target)?.has(e.source)));O.selectAll(`line`).data(A).enter().append(`line`).attr(`class`,e=>`wardley-link${e.dashed?` wardley-link--dashed`:``}`).attr(`x1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.x+i/s*r}).attr(`y1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.y+a/s*r}).attr(`x2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.x+i/s*r}).attr(`y2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.y+a/s*r}).attr(`stroke`,s.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,e=>e.dashed?`6 6`:null).attr(`marker-end`,e=>e.flow===`forward`||e.flow===`bidirectional`?`url(#link-arrow-end-${r})`:null).attr(`marker-start`,e=>e.flow===`backward`||e.flow===`bidirectional`?`url(#link-arrow-start-${r})`:null),O.selectAll(`text`).data(A.filter(e=>e.label)).enter().append(`text`).attr(`class`,`wardley-link-label`).attr(`x`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.x+n.x)/2,i=n.y-t.y,a=n.x-t.x;return r+i/Math.sqrt(a*a+i*i)*8}).attr(`y`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.y+n.y)/2,i=n.x-t.x,a=n.y-t.y,o=Math.sqrt(i*i+a*a);return r+-i/o*8}).attr(`fill`,s.axisTextColor).attr(`font-size`,o.labelFontSize).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).attr(`transform`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.x+n.x)/2,i=(t.y+n.y)/2,a=n.x-t.x,o=n.y-t.y,s=Math.sqrt(a*a+o*o),c=o/s,l=-a/s,u=r+c*8,d=i+l*8,f=Math.atan2(o,a)*180/Math.PI;return(f>90||f<-90)&&(f+=180),`rotate(${f} ${u} ${d})`}).text(e=>e.label);let j=_.append(`g`).attr(`class`,`wardley-trends`),M=d.trends.map(e=>{let t=D.get(e.nodeId);if(!t)return null;let n=x(e.targetX),r=S(e.targetY),i=n-t.x,a=r-t.y,s=Math.sqrt(i*i+a*a),c=o.nodeRadius+2;return{origin:t,targetX:n,targetY:r,adjustedX2:s>c?n-i/s*c:n,adjustedY2:s>c?r-a/s*c:r}}).filter(e=>e!==null);j.selectAll(`line`).data(M).enter().append(`line`).attr(`class`,`wardley-trend`).attr(`x1`,e=>e.origin.x).attr(`y1`,e=>e.origin.y).attr(`x2`,e=>e.adjustedX2).attr(`y2`,e=>e.adjustedY2).attr(`stroke`,s.evolutionStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`).attr(`marker-end`,`url(#arrow-${r})`);let N=_.append(`g`).attr(`class`,`wardley-nodes`).selectAll(`g`).data(d.nodes).enter().append(`g`).attr(`class`,e=>[`wardley-node`,e.className?`wardley-node--${e.className}`:``].filter(Boolean).join(` `));N.filter(e=>e.sourceStrategy===`outsource`).append(`circle`).attr(`class`,`wardley-outsource-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#666`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.sourceStrategy===`buy`).append(`circle`).attr(`class`,`wardley-buy-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#ccc`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.sourceStrategy===`build`).append(`circle`).attr(`class`,`wardley-build-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#eee`).attr(`stroke`,`#000`).attr(`stroke-width`,1);let P=N.filter(e=>e.sourceStrategy===`market`);P.append(`circle`).attr(`class`,`wardley-market-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>!e.isPipelineParent&&e.sourceStrategy!==`market`&&e.className!==`anchor`).append(`circle`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius).attr(`fill`,s.componentFill).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1);let F=o.nodeRadius*.7,I=o.nodeRadius*1.2;if(P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x).attr(`y1`,e=>D.get(e.id).y-I).attr(`x2`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`y2`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`y1`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`x2`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`y2`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`y1`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`x2`,e=>D.get(e.id).x).attr(`y2`,e=>D.get(e.id).y-I).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y-I).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`cy`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`cy`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),N.filter(e=>e.isPipelineParent===!0).append(`rect`).attr(`x`,e=>D.get(e.id).x-l/2).attr(`y`,e=>D.get(e.id).y-l/2).attr(`width`,l).attr(`height`,l).attr(`fill`,s.componentFill).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.inertia===!0).append(`line`).attr(`class`,`wardley-inertia`).attr(`x1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l:o.nodeRadius*2;return t.y-n/2}).attr(`x2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l:o.nodeRadius*2;return t.y+n/2}).attr(`stroke`,s.componentStroke).attr(`stroke-width`,6),N.append(`text`).attr(`x`,e=>{let t=D.get(e.id);if(e.className===`anchor`)return e.labelOffsetX===void 0?t.x:t.x+e.labelOffsetX;let n=o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetX===void 0&&(n+=10);let r=e.labelOffsetX??n;return t.x+r}).attr(`y`,e=>{let t=D.get(e.id);if(e.className===`anchor`)return e.labelOffsetY===void 0?t.y-3:t.y+e.labelOffsetY;let n=-o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetY===void 0&&(n-=10);let r=e.labelOffsetY??n;return t.y+r}).attr(`class`,`wardley-node-label`).attr(`fill`,e=>e.className===`evolved`?s.evolutionStroke:e.className===`anchor`?`#000`:s.componentLabelColor).attr(`font-size`,o.labelFontSize).attr(`font-weight`,e=>e.className===`anchor`?`bold`:`normal`).attr(`text-anchor`,e=>e.className===`anchor`?`middle`:`start`).attr(`dominant-baseline`,e=>e.className===`anchor`?`middle`:`auto`).text(e=>e.label),d.annotations.length>0){let e=_.append(`g`).attr(`class`,`wardley-annotations`);if(d.annotations.forEach(t=>{let n=t.coordinates.map(e=>({x:x(e.x),y:S(e.y)}));if(n.length>1)for(let t=0;t<n.length-1;t++)e.append(`line`).attr(`class`,`wardley-annotation-line`).attr(`x1`,n[t].x).attr(`y1`,n[t].y).attr(`x2`,n[t+1].x).attr(`y2`,n[t+1].y).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`stroke-dasharray`,`4 4`);n.forEach(n=>{let r=e.append(`g`).attr(`class`,`wardley-annotation`);r.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`fill`,`white`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5),r.append(`text`).attr(`x`,n.x).attr(`y`,n.y).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.number)})}),d.annotationsBox){let t=x(d.annotationsBox.x),n=S(d.annotationsBox.y),r=e.append(`g`).attr(`class`,`wardley-annotations-box`),i=[...d.annotations].filter(e=>e.text).sort((e,t)=>e.number-t.number),a=[];if(i.forEach((e,i)=>{let o=r.append(`text`).attr(`x`,t+10).attr(`y`,n+10+(i+1)*16).attr(`font-size`,11).attr(`fill`,s.axisTextColor).attr(`text-anchor`,`start`).attr(`dominant-baseline`,`middle`).text(`${e.number}. ${e.text}`);a.push(o)}),a.length>0){let e=0,c=0;a.forEach(t=>{let n=t.node(),r=n.getComputedTextLength();e=Math.max(e,r);let i=n.getBBox();c=Math.max(c,i.height)});let l=e+20+105,u=i.length*16+20+c/2,d=o.padding,f=p-o.padding-l,m=o.padding,g=h-o.padding-u;t=Math.max(d,Math.min(t,f)),n=Math.max(m,Math.min(n,g)),a.forEach((e,r)=>{e.attr(`x`,t+10).attr(`y`,n+10+(r+1)*16)}),r.insert(`rect`,`text`).attr(`x`,t).attr(`y`,n).attr(`width`,l).attr(`height`,u).attr(`fill`,`white`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}}}if(d.notes.length>0){let e=_.append(`g`).attr(`class`,`wardley-notes`);d.notes.forEach(t=>{let n=x(t.x),r=S(t.y);e.append(`text`).attr(`x`,n).attr(`y`,r).attr(`text-anchor`,`start`).attr(`font-size`,11).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.text)})}if(d.accelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-accelerators`);d.accelerators.forEach(t=>{let n=x(t.x),r=S(t.y),i=`
3
3
  M ${n} ${r-30/2}
4
4
  L ${n+60-20} ${r-30/2}
@@ -76,4 +76,4 @@ import{g as e,h as t}from"./src-DoMhBUqV.js";import{D as n,H as r,K as i,U as a,
76
76
  fill: ${t.axisTextColor};
77
77
  }
78
78
  `},`styles`)};export{G as diagram};
79
- //# sourceMappingURL=wardleyDiagram-YWT4CUSO-A8XYzYTW.js.map
79
+ //# sourceMappingURL=wardleyDiagram-YWT4CUSO-CQ8dLujr.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wardleyDiagram-YWT4CUSO-A8XYzYTW.js","names":["getThemeVariables"],"sources":["../../../../../node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-YWT4CUSO.mjs"],"sourcesContent":["import {\n selectSvgElement\n} from \"./chunk-WU5MYG2G.mjs\";\nimport {\n populateCommonDb\n} from \"./chunk-4BX2VUAB.mjs\";\nimport {\n cleanAndMerge\n} from \"./chunk-5ZQYHXKU.mjs\";\nimport {\n clear,\n configureSvgSize,\n getAccDescription,\n getAccTitle,\n getConfig,\n getConfig2,\n getDiagramTitle,\n getThemeVariables,\n setAccDescription,\n setAccTitle,\n setDiagramTitle\n} from \"./chunk-CSCIHK7Q.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/wardley/wardleyParser.ts\nimport { parse } from \"@mermaid-js/parser\";\nvar toPercent = /* @__PURE__ */ __name((value, context) => {\n const normalized = value <= 1 ? value * 100 : value;\n if (normalized < 0 || normalized > 100) {\n throw new Error(\n `${context} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${value}`\n );\n }\n return normalized;\n}, \"toPercent\");\nvar toCoordinates = /* @__PURE__ */ __name((visibility, evolution, context) => {\n return {\n x: toPercent(evolution, `${context} evolution`),\n y: toPercent(visibility, `${context} visibility`)\n };\n}, \"toCoordinates\");\nvar getFlowFromPort = /* @__PURE__ */ __name((port) => {\n if (!port) {\n return void 0;\n }\n if (port === \"+<>\") {\n return \"bidirectional\";\n }\n if (port === \"+<\") {\n return \"backward\";\n }\n if (port === \"+>\") {\n return \"forward\";\n }\n return void 0;\n}, \"getFlowFromPort\");\nvar extractFlowFromArrow = /* @__PURE__ */ __name((arrow) => {\n if (!arrow?.startsWith(\"+\")) {\n return {};\n }\n const labelMatch = /^\\+'([^']*)'/.exec(arrow);\n const flowLabel = labelMatch?.[1];\n if (arrow.includes(\"<>\")) {\n return { flow: \"bidirectional\", label: flowLabel };\n }\n if (arrow.includes(\"<\")) {\n return { flow: \"backward\", label: flowLabel };\n }\n if (arrow.includes(\">\")) {\n return { flow: \"forward\", label: flowLabel };\n }\n return { label: flowLabel };\n}, \"extractFlowFromArrow\");\nvar populateDb = /* @__PURE__ */ __name((ast, db) => {\n populateCommonDb(ast, db);\n if (ast.size) {\n db.setSize(ast.size.width, ast.size.height);\n }\n if (ast.evolution) {\n const stages = ast.evolution.stages.map((stage) => {\n if (stage.secondName) {\n return `${stage.name.trim()} / ${stage.secondName.trim()}`;\n }\n return stage.name.trim();\n });\n const stageBoundaries = ast.evolution.stages.filter((stage) => stage.boundary !== void 0).map((stage) => stage.boundary);\n db.updateAxes({ stages, stageBoundaries });\n }\n ast.anchors.forEach((anchor) => {\n const coords = toCoordinates(anchor.visibility, anchor.evolution, `Anchor \"${anchor.name}\"`);\n db.addNode(anchor.name, anchor.name, coords.x, coords.y, \"anchor\");\n });\n ast.components.forEach((component) => {\n const coords = toCoordinates(\n component.visibility,\n component.evolution,\n `Component \"${component.name}\"`\n );\n const labelOffsetX = component.label ? (component.label.negX ? -1 : 1) * component.label.offsetX : void 0;\n const labelOffsetY = component.label ? (component.label.negY ? -1 : 1) * component.label.offsetY : void 0;\n const sourceStrategy = component.decorator?.strategy;\n db.addNode(\n component.name,\n component.name,\n coords.x,\n coords.y,\n \"component\",\n labelOffsetX,\n labelOffsetY,\n component.inertia,\n sourceStrategy\n );\n });\n ast.notes.forEach((note) => {\n const coords = toCoordinates(note.visibility, note.evolution, `Note \"${note.text}\"`);\n db.addNote(note.text, coords.x, coords.y);\n });\n ast.pipelines.forEach((pipeline) => {\n const parentNode = db.getNode(pipeline.parent);\n if (!parentNode || typeof parentNode.y !== \"number\") {\n throw new Error(\n `Pipeline \"${pipeline.parent}\" must reference an existing component with coordinates.`\n );\n }\n const parentY = parentNode.y;\n db.startPipeline(pipeline.parent);\n pipeline.components.forEach((component) => {\n const componentId = `${pipeline.parent}_${component.name}`;\n const labelOffsetX = component.label ? (component.label.negX ? -1 : 1) * component.label.offsetX : void 0;\n const labelOffsetY = component.label ? (component.label.negY ? -1 : 1) * component.label.offsetY : void 0;\n const x = toPercent(component.evolution, `Pipeline component \"${component.name}\" evolution`);\n db.addNode(\n componentId,\n component.name,\n x,\n parentY,\n \"pipeline-component\",\n labelOffsetX,\n labelOffsetY\n );\n db.addPipelineComponent(pipeline.parent, componentId);\n });\n });\n ast.links.forEach((link) => {\n const isDashed = !!link.arrow && (link.arrow.includes(\"-.->\") || link.arrow.includes(\".-.\"));\n let flow = getFlowFromPort(link.fromPort) ?? getFlowFromPort(link.toPort);\n const { flow: arrowFlow, label: flowLabel } = extractFlowFromArrow(link.arrow);\n if (!flow && arrowFlow) {\n flow = arrowFlow;\n }\n const annotation = link.linkLabel;\n const label = flowLabel ?? annotation;\n db.addLink(db.resolveNodeId(link.from), db.resolveNodeId(link.to), isDashed, label, flow);\n });\n ast.evolves.forEach((evolve) => {\n const node = db.getNode(evolve.component);\n if (node?.y !== void 0) {\n const target = toPercent(evolve.target, `Evolve target for \"${evolve.component}\"`);\n db.addTrend(evolve.component, target, node.y);\n }\n });\n if (ast.annotations.length > 0) {\n const annotationsBox = ast.annotations[0];\n const coords = toCoordinates(annotationsBox.x, annotationsBox.y, \"Annotations box\");\n db.setAnnotationsBox(coords.x, coords.y);\n }\n ast.annotation.forEach((annotation) => {\n const coords = toCoordinates(annotation.x, annotation.y, `Annotation ${annotation.number}`);\n db.addAnnotation(annotation.number, [{ x: coords.x, y: coords.y }], annotation.text);\n });\n ast.accelerators.forEach((accelerator) => {\n const coords = toCoordinates(accelerator.x, accelerator.y, `Accelerator \"${accelerator.name}\"`);\n db.addAccelerator(accelerator.name, coords.x, coords.y);\n });\n ast.deaccelerators.forEach((deaccelerator) => {\n const coords = toCoordinates(\n deaccelerator.x,\n deaccelerator.y,\n `Deaccelerator \"${deaccelerator.name}\"`\n );\n db.addDeaccelerator(deaccelerator.name, coords.x, coords.y);\n });\n}, \"populateDb\");\nvar parser = {\n parser: {\n // @ts-expect-error - WardleyDB is not assignable to DiagramDB\n yy: void 0\n },\n parse: /* @__PURE__ */ __name(async (input) => {\n const ast = await parse(\"wardley\", input);\n log.debug(ast);\n const db = parser.parser?.yy;\n if (!db || typeof db.addNode !== \"function\") {\n throw new Error(\n \"parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.\"\n );\n }\n populateDb(ast, db);\n }, \"parse\")\n};\n\n// src/diagrams/wardley/wardleyBuilder.ts\nvar WardleyBuilder = class {\n constructor() {\n this.nodes = /* @__PURE__ */ new Map();\n this.links = [];\n this.trends = /* @__PURE__ */ new Map();\n this.pipelines = /* @__PURE__ */ new Map();\n this.annotations = [];\n this.notes = [];\n this.accelerators = [];\n this.deaccelerators = [];\n this.axes = {};\n }\n static {\n __name(this, \"WardleyBuilder\");\n }\n addNode(node) {\n const existing = this.nodes.get(node.id) ?? { id: node.id, label: node.label };\n const merged = {\n ...existing,\n ...node,\n className: node.className ?? existing.className,\n labelOffsetX: node.labelOffsetX ?? existing.labelOffsetX,\n labelOffsetY: node.labelOffsetY ?? existing.labelOffsetY\n };\n this.nodes.set(node.id, merged);\n }\n addLink(link) {\n this.links.push(link);\n }\n addTrend(trend) {\n this.trends.set(trend.nodeId, trend);\n }\n startPipeline(nodeId) {\n this.pipelines.set(nodeId, { nodeId, componentIds: [] });\n const node = this.nodes.get(nodeId);\n if (node) {\n node.isPipelineParent = true;\n }\n }\n addPipelineComponent(pipelineNodeId, componentId) {\n const pipeline = this.pipelines.get(pipelineNodeId);\n if (pipeline) {\n pipeline.componentIds.push(componentId);\n }\n const node = this.nodes.get(componentId);\n if (node) {\n node.inPipeline = true;\n }\n }\n addAnnotation(annotation) {\n this.annotations.push(annotation);\n }\n addNote(note) {\n this.notes.push(note);\n }\n addAccelerator(accelerator) {\n this.accelerators.push(accelerator);\n }\n addDeaccelerator(deaccelerator) {\n this.deaccelerators.push(deaccelerator);\n }\n setAnnotationsBox(x, y) {\n this.annotationsBox = { x, y };\n }\n setAxes(partial) {\n this.axes = {\n ...this.axes,\n ...partial\n };\n }\n setSize(width, height) {\n this.size = { width, height };\n }\n getNode(id) {\n return this.nodes.get(id);\n }\n /**\n * Resolve a name to a node ID. Tries exact ID match first,\n * then falls back to finding a node whose label matches the name\n * (handles pipeline components which have synthetic IDs like \"Parent_Child\").\n */\n resolveNodeId(name) {\n if (this.nodes.has(name)) {\n return name;\n }\n for (const [id, node] of this.nodes) {\n if (node.label === name) {\n return id;\n }\n }\n return name;\n }\n build() {\n const nodes = [];\n for (const node of this.nodes.values()) {\n if (typeof node.x !== \"number\" || typeof node.y !== \"number\") {\n throw new Error(`Node \"${node.label}\" is missing coordinates`);\n }\n nodes.push(node);\n }\n return {\n nodes,\n links: [...this.links],\n trends: [...this.trends.values()],\n pipelines: [...this.pipelines.values()],\n annotations: [...this.annotations],\n notes: [...this.notes],\n accelerators: [...this.accelerators],\n deaccelerators: [...this.deaccelerators],\n annotationsBox: this.annotationsBox,\n axes: { ...this.axes },\n size: this.size\n };\n }\n clear() {\n this.nodes.clear();\n this.links = [];\n this.trends.clear();\n this.pipelines.clear();\n this.annotations = [];\n this.notes = [];\n this.accelerators = [];\n this.deaccelerators = [];\n this.annotationsBox = void 0;\n this.axes = {};\n this.size = void 0;\n }\n};\n\n// src/diagrams/wardley/wardleyDb.ts\nvar builder = new WardleyBuilder();\nfunction getConfig3() {\n return getConfig2()[\"wardley-beta\"];\n}\n__name(getConfig3, \"getConfig\");\nfunction addNode(id, label, x, y, className, labelOffsetX, labelOffsetY, inertia, sourceStrategy) {\n builder.addNode({\n id,\n label,\n x,\n y,\n className,\n labelOffsetX,\n labelOffsetY,\n inertia,\n sourceStrategy\n });\n}\n__name(addNode, \"addNode\");\nfunction addLink(sourceId, targetId, dashed = false, label, flow) {\n builder.addLink({\n source: sourceId,\n target: targetId,\n dashed,\n label,\n flow\n });\n}\n__name(addLink, \"addLink\");\nfunction addTrend(nodeId, targetX, targetY) {\n builder.addTrend({ nodeId, targetX, targetY });\n}\n__name(addTrend, \"addTrend\");\nfunction addAnnotation(number, coordinates, text) {\n builder.addAnnotation({\n number,\n coordinates,\n text\n });\n}\n__name(addAnnotation, \"addAnnotation\");\nfunction addNote(text, x, y) {\n builder.addNote({\n text,\n x,\n y\n });\n}\n__name(addNote, \"addNote\");\nfunction addAccelerator(name, x, y) {\n builder.addAccelerator({\n name,\n x,\n y\n });\n}\n__name(addAccelerator, \"addAccelerator\");\nfunction addDeaccelerator(name, x, y) {\n builder.addDeaccelerator({\n name,\n x,\n y\n });\n}\n__name(addDeaccelerator, \"addDeaccelerator\");\nfunction setAnnotationsBox(x, y) {\n builder.setAnnotationsBox(x, y);\n}\n__name(setAnnotationsBox, \"setAnnotationsBox\");\nfunction setSize(width, height) {\n builder.setSize(width, height);\n}\n__name(setSize, \"setSize\");\nfunction startPipeline(nodeId) {\n builder.startPipeline(nodeId);\n}\n__name(startPipeline, \"startPipeline\");\nfunction addPipelineComponent(pipelineNodeId, componentId) {\n builder.addPipelineComponent(pipelineNodeId, componentId);\n}\n__name(addPipelineComponent, \"addPipelineComponent\");\nfunction updateAxes(partial) {\n builder.setAxes(partial);\n}\n__name(updateAxes, \"updateAxes\");\nfunction getNode(id) {\n return builder.getNode(id);\n}\n__name(getNode, \"getNode\");\nfunction resolveNodeId(name) {\n return builder.resolveNodeId(name);\n}\n__name(resolveNodeId, \"resolveNodeId\");\nfunction getWardleyData() {\n return builder.build();\n}\n__name(getWardleyData, \"getWardleyData\");\nfunction clear2() {\n builder.clear();\n clear();\n}\n__name(clear2, \"clear\");\nvar wardleyDb_default = {\n getConfig: getConfig3,\n addNode,\n addLink,\n addTrend,\n addAnnotation,\n addNote,\n addAccelerator,\n addDeaccelerator,\n setAnnotationsBox,\n setSize,\n startPipeline,\n addPipelineComponent,\n updateAxes,\n getNode,\n resolveNodeId,\n getWardleyData,\n clear: clear2,\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription\n};\n\n// src/diagrams/wardley/wardleyRenderer.ts\nvar DEFAULT_STAGES = [\"Genesis\", \"Custom Built\", \"Product\", \"Commodity\"];\nvar getTheme = /* @__PURE__ */ __name(() => {\n const { themeVariables } = getConfig2();\n return {\n backgroundColor: themeVariables.wardley?.backgroundColor ?? themeVariables.background ?? \"#fff\",\n axisColor: themeVariables.wardley?.axisColor ?? \"#000\",\n axisTextColor: themeVariables.wardley?.axisTextColor ?? themeVariables.primaryTextColor ?? \"#222\",\n gridColor: themeVariables.wardley?.gridColor ?? \"rgba(100, 100, 100, 0.2)\",\n componentFill: themeVariables.wardley?.componentFill ?? \"#fff\",\n componentStroke: themeVariables.wardley?.componentStroke ?? \"#000\",\n componentLabelColor: themeVariables.wardley?.componentLabelColor ?? themeVariables.primaryTextColor ?? \"#222\",\n linkStroke: themeVariables.wardley?.linkStroke ?? \"#000\",\n evolutionStroke: themeVariables.wardley?.evolutionStroke ?? \"#dc3545\",\n annotationStroke: themeVariables.wardley?.annotationStroke ?? \"#000\",\n annotationTextColor: themeVariables.wardley?.annotationTextColor ?? themeVariables.primaryTextColor ?? \"#222\",\n annotationFill: themeVariables.wardley?.annotationFill ?? themeVariables.background ?? \"#fff\"\n };\n}, \"getTheme\");\nvar getConfigValues = /* @__PURE__ */ __name(() => {\n const wardleyConfig = getConfig2()[\"wardley-beta\"];\n return {\n width: wardleyConfig?.width ?? 900,\n height: wardleyConfig?.height ?? 600,\n padding: wardleyConfig?.padding ?? 48,\n nodeRadius: wardleyConfig?.nodeRadius ?? 6,\n nodeLabelOffset: wardleyConfig?.nodeLabelOffset ?? 8,\n axisFontSize: wardleyConfig?.axisFontSize ?? 12,\n labelFontSize: wardleyConfig?.labelFontSize ?? 10,\n showGrid: wardleyConfig?.showGrid ?? false,\n useMaxWidth: wardleyConfig?.useMaxWidth ?? true\n };\n}, \"getConfigValues\");\nvar draw = /* @__PURE__ */ __name((text, id, _version, diagObj) => {\n log.debug(\"Rendering Wardley map\\n\" + text);\n const configValues = getConfigValues();\n const theme = getTheme();\n const squareSize = configValues.nodeRadius * 1.6;\n const db = diagObj.db;\n const data = db.getWardleyData();\n const title = db.getDiagramTitle();\n const width = data.size?.width ?? configValues.width;\n const height = data.size?.height ?? configValues.height;\n const svg = selectSvgElement(id);\n svg.selectAll(\"*\").remove();\n configureSvgSize(svg, height, width, configValues.useMaxWidth);\n svg.attr(\"viewBox\", `0 0 ${width} ${height}`);\n const root = svg.append(\"g\").attr(\"class\", \"wardley-map\");\n const defs = svg.append(\"defs\");\n defs.append(\"marker\").attr(\"id\", `arrow-${id}`).attr(\"viewBox\", \"0 0 10 10\").attr(\"refX\", 9).attr(\"refY\", 5).attr(\"markerWidth\", 6).attr(\"markerHeight\", 6).attr(\"orient\", \"auto-start-reverse\").append(\"path\").attr(\"d\", \"M 0 0 L 10 5 L 0 10 z\").attr(\"fill\", theme.evolutionStroke).attr(\"stroke\", \"none\");\n defs.append(\"marker\").attr(\"id\", `link-arrow-end-${id}`).attr(\"viewBox\", \"0 0 10 10\").attr(\"refX\", 9).attr(\"refY\", 5).attr(\"markerWidth\", 5).attr(\"markerHeight\", 5).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 0 0 L 10 5 L 0 10 z\").attr(\"fill\", theme.linkStroke).attr(\"stroke\", \"none\");\n defs.append(\"marker\").attr(\"id\", `link-arrow-start-${id}`).attr(\"viewBox\", \"0 0 10 10\").attr(\"refX\", 1).attr(\"refY\", 5).attr(\"markerWidth\", 5).attr(\"markerHeight\", 5).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 10 0 L 0 5 L 10 10 z\").attr(\"fill\", theme.linkStroke).attr(\"stroke\", \"none\");\n root.append(\"rect\").attr(\"class\", \"wardley-background\").attr(\"width\", width).attr(\"height\", height).attr(\"fill\", theme.backgroundColor);\n const chartWidth = width - configValues.padding * 2;\n const chartHeight = height - configValues.padding * 2;\n if (title) {\n root.append(\"text\").attr(\"class\", \"wardley-title\").attr(\"x\", width / 2).attr(\"y\", configValues.padding / 2).attr(\"fill\", theme.axisTextColor).attr(\"font-size\", configValues.axisFontSize * 1.05).attr(\"font-weight\", \"bold\").attr(\"text-anchor\", \"middle\").attr(\"dominant-baseline\", \"middle\").text(title);\n }\n const projectX = /* @__PURE__ */ __name((value) => configValues.padding + value / 100 * chartWidth, \"projectX\");\n const projectY = /* @__PURE__ */ __name((value) => height - configValues.padding - value / 100 * chartHeight, \"projectY\");\n const axisGroup = root.append(\"g\").attr(\"class\", \"wardley-axes\");\n axisGroup.append(\"line\").attr(\"x1\", configValues.padding).attr(\"x2\", width - configValues.padding).attr(\"y1\", height - configValues.padding).attr(\"y2\", height - configValues.padding).attr(\"stroke\", theme.axisColor).attr(\"stroke-width\", 1);\n axisGroup.append(\"line\").attr(\"x1\", configValues.padding).attr(\"x2\", configValues.padding).attr(\"y1\", configValues.padding).attr(\"y2\", height - configValues.padding).attr(\"stroke\", theme.axisColor).attr(\"stroke-width\", 1);\n const xLabel = data.axes.xLabel ?? \"Evolution\";\n const yLabel = data.axes.yLabel ?? \"Visibility\";\n axisGroup.append(\"text\").attr(\"class\", \"wardley-axis-label wardley-axis-label-x\").attr(\"x\", configValues.padding + chartWidth / 2).attr(\"y\", height - configValues.padding / 4).attr(\"fill\", theme.axisTextColor).attr(\"font-size\", configValues.axisFontSize).attr(\"font-weight\", \"bold\").attr(\"text-anchor\", \"middle\").text(xLabel);\n axisGroup.append(\"text\").attr(\"class\", \"wardley-axis-label wardley-axis-label-y\").attr(\"x\", configValues.padding / 3).attr(\"y\", configValues.padding + chartHeight / 2).attr(\"fill\", theme.axisTextColor).attr(\"font-size\", configValues.axisFontSize).attr(\"font-weight\", \"bold\").attr(\"text-anchor\", \"middle\").attr(\n \"transform\",\n `rotate(-90 ${configValues.padding / 3} ${configValues.padding + chartHeight / 2})`\n ).text(yLabel);\n const stages = data.axes.stages && data.axes.stages.length > 0 ? data.axes.stages : DEFAULT_STAGES;\n if (stages.length > 0) {\n const stageGroup = root.append(\"g\").attr(\"class\", \"wardley-stages\");\n const boundaries = data.axes.stageBoundaries;\n const stagePositions = [];\n if (boundaries && boundaries.length === stages.length) {\n let prevBoundary = 0;\n boundaries.forEach((boundary) => {\n stagePositions.push({ start: prevBoundary, end: boundary });\n prevBoundary = boundary;\n });\n } else {\n const stageWidth = 1 / stages.length;\n stages.forEach((_, index) => {\n stagePositions.push({\n start: index * stageWidth,\n end: (index + 1) * stageWidth\n });\n });\n }\n stages.forEach((stage, index) => {\n const pos = stagePositions[index];\n const startX = configValues.padding + pos.start * chartWidth;\n const endX = configValues.padding + pos.end * chartWidth;\n const centerX = (startX + endX) / 2;\n if (index > 0) {\n stageGroup.append(\"line\").attr(\"x1\", startX).attr(\"x2\", startX).attr(\"y1\", configValues.padding).attr(\"y2\", height - configValues.padding).attr(\"stroke\", \"#000\").attr(\"stroke-width\", 1).attr(\"stroke-dasharray\", \"5 5\").attr(\"opacity\", 0.8);\n }\n stageGroup.append(\"text\").attr(\"class\", \"wardley-stage-label\").attr(\"x\", centerX).attr(\"y\", height - configValues.padding / 1.5).attr(\"fill\", theme.axisTextColor).attr(\"font-size\", configValues.axisFontSize - 2).attr(\"text-anchor\", \"middle\").text(stage);\n });\n }\n if (configValues.showGrid) {\n const gridGroup = root.append(\"g\").attr(\"class\", \"wardley-grid\");\n for (let i = 1; i < 4; i++) {\n const ratio = i / 4;\n const x = configValues.padding + chartWidth * ratio;\n gridGroup.append(\"line\").attr(\"x1\", x).attr(\"x2\", x).attr(\"y1\", configValues.padding).attr(\"y2\", height - configValues.padding).attr(\"stroke\", theme.gridColor).attr(\"stroke-dasharray\", \"2 6\");\n gridGroup.append(\"line\").attr(\"x1\", configValues.padding).attr(\"x2\", width - configValues.padding).attr(\"y1\", height - configValues.padding - chartHeight * ratio).attr(\"y2\", height - configValues.padding - chartHeight * ratio).attr(\"stroke\", theme.gridColor).attr(\"stroke-dasharray\", \"2 6\");\n }\n }\n const positions = /* @__PURE__ */ new Map();\n data.nodes.forEach((node) => {\n positions.set(node.id, {\n x: projectX(node.x),\n y: projectY(node.y),\n node\n });\n });\n if (data.pipelines.length > 0) {\n const pipelineGroup = root.append(\"g\").attr(\"class\", \"wardley-pipelines\");\n const pipelineLinksGroup = root.append(\"g\").attr(\"class\", \"wardley-pipeline-links\");\n data.pipelines.forEach((pipeline) => {\n if (pipeline.componentIds.length === 0) {\n return;\n }\n const sortedComponents = pipeline.componentIds.map((id2) => ({ id: id2, pos: positions.get(id2), node: data.nodes.find((n) => n.id === id2) })).filter((c) => c.pos && c.node).sort((a, b) => a.node.x - b.node.x);\n for (let i = 0; i < sortedComponents.length - 1; i++) {\n const current = sortedComponents[i];\n const next = sortedComponents[i + 1];\n pipelineLinksGroup.append(\"line\").attr(\"class\", \"wardley-pipeline-evolution-link\").attr(\"x1\", current.pos.x).attr(\"y1\", current.pos.y).attr(\"x2\", next.pos.x).attr(\"y2\", next.pos.y).attr(\"stroke\", theme.linkStroke).attr(\"stroke-width\", 1).attr(\"stroke-dasharray\", \"4 4\");\n }\n let minX = Infinity;\n let maxX = -Infinity;\n let y = 0;\n pipeline.componentIds.forEach((componentId) => {\n const pos = positions.get(componentId);\n if (pos) {\n minX = Math.min(minX, pos.x);\n maxX = Math.max(maxX, pos.x);\n y = pos.y;\n }\n });\n if (minX !== Infinity && maxX !== -Infinity) {\n const padding = 15;\n const height2 = configValues.nodeRadius * 4;\n const boxTop = y - height2 / 2;\n const parentPos = positions.get(pipeline.nodeId);\n if (parentPos) {\n const centerX = (minX + maxX) / 2;\n parentPos.x = centerX;\n parentPos.y = boxTop - squareSize / 6;\n }\n pipelineGroup.append(\"rect\").attr(\"class\", \"wardley-pipeline-box\").attr(\"x\", minX - padding).attr(\"y\", boxTop).attr(\"width\", maxX - minX + padding * 2).attr(\"height\", height2).attr(\"fill\", \"none\").attr(\"stroke\", theme.axisColor).attr(\"stroke-width\", 1.5).attr(\"rx\", 4).attr(\"ry\", 4);\n }\n });\n }\n const linksGroup = root.append(\"g\").attr(\"class\", \"wardley-links\");\n const pipelineMap = /* @__PURE__ */ new Map();\n data.pipelines.forEach((pipeline) => {\n pipelineMap.set(pipeline.nodeId, new Set(pipeline.componentIds));\n });\n const validLinks = data.links.filter((link) => {\n if (!positions.has(link.source) || !positions.has(link.target)) {\n return false;\n }\n const pipelineComponents = pipelineMap.get(link.target);\n if (pipelineComponents?.has(link.source)) {\n return false;\n }\n return true;\n });\n linksGroup.selectAll(\"line\").data(validLinks).enter().append(\"line\").attr(\"class\", (link) => `wardley-link${link.dashed ? \" wardley-link--dashed\" : \"\"}`).attr(\"x1\", (link) => {\n const sourcePos = positions.get(link.source);\n const targetPos = positions.get(link.target);\n const sourceNode = data.nodes.find((n) => n.id === link.source);\n const radius = sourceNode.isPipelineParent ? squareSize / Math.sqrt(2) : configValues.nodeRadius;\n const dx = targetPos.x - sourcePos.x;\n const dy = targetPos.y - sourcePos.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n return sourcePos.x + dx / distance * radius;\n }).attr(\"y1\", (link) => {\n const sourcePos = positions.get(link.source);\n const targetPos = positions.get(link.target);\n const sourceNode = data.nodes.find((n) => n.id === link.source);\n const radius = sourceNode.isPipelineParent ? squareSize / Math.sqrt(2) : configValues.nodeRadius;\n const dx = targetPos.x - sourcePos.x;\n const dy = targetPos.y - sourcePos.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n return sourcePos.y + dy / distance * radius;\n }).attr(\"x2\", (link) => {\n const sourcePos = positions.get(link.source);\n const targetPos = positions.get(link.target);\n const targetNode = data.nodes.find((n) => n.id === link.target);\n const radius = targetNode.isPipelineParent ? squareSize / Math.sqrt(2) : configValues.nodeRadius;\n const dx = sourcePos.x - targetPos.x;\n const dy = sourcePos.y - targetPos.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n return targetPos.x + dx / distance * radius;\n }).attr(\"y2\", (link) => {\n const sourcePos = positions.get(link.source);\n const targetPos = positions.get(link.target);\n const targetNode = data.nodes.find((n) => n.id === link.target);\n const radius = targetNode.isPipelineParent ? squareSize / Math.sqrt(2) : configValues.nodeRadius;\n const dx = sourcePos.x - targetPos.x;\n const dy = sourcePos.y - targetPos.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n return targetPos.y + dy / distance * radius;\n }).attr(\"stroke\", theme.linkStroke).attr(\"stroke-width\", 1).attr(\"stroke-dasharray\", (link) => link.dashed ? \"6 6\" : null).attr(\"marker-end\", (link) => {\n if (link.flow === \"forward\" || link.flow === \"bidirectional\") {\n return `url(#link-arrow-end-${id})`;\n }\n return null;\n }).attr(\"marker-start\", (link) => {\n if (link.flow === \"backward\" || link.flow === \"bidirectional\") {\n return `url(#link-arrow-start-${id})`;\n }\n return null;\n });\n linksGroup.selectAll(\"text\").data(validLinks.filter((link) => link.label)).enter().append(\"text\").attr(\"class\", \"wardley-link-label\").attr(\"x\", (link) => {\n const sourcePos = positions.get(link.source);\n const targetPos = positions.get(link.target);\n const midX = (sourcePos.x + targetPos.x) / 2;\n const dy = targetPos.y - sourcePos.y;\n const dx = targetPos.x - sourcePos.x;\n const distance = Math.sqrt(dx * dx + dy * dy);\n const offset = 8;\n const perpX = dy / distance;\n return midX + perpX * offset;\n }).attr(\"y\", (link) => {\n const sourcePos = positions.get(link.source);\n const targetPos = positions.get(link.target);\n const midY = (sourcePos.y + targetPos.y) / 2;\n const dx = targetPos.x - sourcePos.x;\n const dy = targetPos.y - sourcePos.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n const offset = 8;\n const perpY = -dx / distance;\n return midY + perpY * offset;\n }).attr(\"fill\", theme.axisTextColor).attr(\"font-size\", configValues.labelFontSize).attr(\"text-anchor\", \"middle\").attr(\"dominant-baseline\", \"middle\").attr(\"transform\", (link) => {\n const sourcePos = positions.get(link.source);\n const targetPos = positions.get(link.target);\n const midX = (sourcePos.x + targetPos.x) / 2;\n const midY = (sourcePos.y + targetPos.y) / 2;\n const dx = targetPos.x - sourcePos.x;\n const dy = targetPos.y - sourcePos.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n const offset = 8;\n const perpX = dy / distance;\n const perpY = -dx / distance;\n const labelX = midX + perpX * offset;\n const labelY = midY + perpY * offset;\n let angle = Math.atan2(dy, dx) * 180 / Math.PI;\n if (angle > 90 || angle < -90) {\n angle += 180;\n }\n return `rotate(${angle} ${labelX} ${labelY})`;\n }).text((link) => link.label);\n const trendGroup = root.append(\"g\").attr(\"class\", \"wardley-trends\");\n const trendsWithPositions = data.trends.map((trend) => {\n const origin = positions.get(trend.nodeId);\n if (!origin) {\n return null;\n }\n const targetX = projectX(trend.targetX);\n const targetY = projectY(trend.targetY);\n const dx = targetX - origin.x;\n const dy = targetY - origin.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n const shortenBy = configValues.nodeRadius + 2;\n const adjustedX2 = distance > shortenBy ? targetX - dx / distance * shortenBy : targetX;\n const adjustedY2 = distance > shortenBy ? targetY - dy / distance * shortenBy : targetY;\n return {\n origin,\n targetX,\n targetY,\n adjustedX2,\n adjustedY2\n };\n }).filter((trend) => trend !== null);\n trendGroup.selectAll(\"line\").data(trendsWithPositions).enter().append(\"line\").attr(\"class\", \"wardley-trend\").attr(\"x1\", (trend) => trend.origin.x).attr(\"y1\", (trend) => trend.origin.y).attr(\"x2\", (trend) => trend.adjustedX2).attr(\"y2\", (trend) => trend.adjustedY2).attr(\"stroke\", theme.evolutionStroke).attr(\"stroke-width\", 1).attr(\"stroke-dasharray\", \"4 4\").attr(\"marker-end\", `url(#arrow-${id})`);\n const nodesGroup = root.append(\"g\").attr(\"class\", \"wardley-nodes\");\n const nodeEnter = nodesGroup.selectAll(\"g\").data(data.nodes).enter().append(\"g\").attr(\n \"class\",\n (node) => [\"wardley-node\", node.className ? `wardley-node--${node.className}` : \"\"].filter(Boolean).join(\" \")\n );\n nodeEnter.filter((node) => node.sourceStrategy === \"outsource\").append(\"circle\").attr(\"class\", \"wardley-outsource-overlay\").attr(\"cx\", (node) => positions.get(node.id).x).attr(\"cy\", (node) => positions.get(node.id).y).attr(\"r\", configValues.nodeRadius * 2).attr(\"fill\", \"#666\").attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 1);\n nodeEnter.filter((node) => node.sourceStrategy === \"buy\").append(\"circle\").attr(\"class\", \"wardley-buy-overlay\").attr(\"cx\", (node) => positions.get(node.id).x).attr(\"cy\", (node) => positions.get(node.id).y).attr(\"r\", configValues.nodeRadius * 2).attr(\"fill\", \"#ccc\").attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 1);\n nodeEnter.filter((node) => node.sourceStrategy === \"build\").append(\"circle\").attr(\"class\", \"wardley-build-overlay\").attr(\"cx\", (node) => positions.get(node.id).x).attr(\"cy\", (node) => positions.get(node.id).y).attr(\"r\", configValues.nodeRadius * 2).attr(\"fill\", \"#eee\").attr(\"stroke\", \"#000\").attr(\"stroke-width\", 1);\n const marketNodes = nodeEnter.filter((node) => node.sourceStrategy === \"market\");\n marketNodes.append(\"circle\").attr(\"class\", \"wardley-market-overlay\").attr(\"cx\", (node) => positions.get(node.id).x).attr(\"cy\", (node) => positions.get(node.id).y).attr(\"r\", configValues.nodeRadius * 2).attr(\"fill\", \"white\").attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 1);\n nodeEnter.filter(\n (node) => !node.isPipelineParent && node.sourceStrategy !== \"market\" && node.className !== \"anchor\"\n ).append(\"circle\").attr(\"cx\", (node) => positions.get(node.id).x).attr(\"cy\", (node) => positions.get(node.id).y).attr(\"r\", configValues.nodeRadius).attr(\"fill\", theme.componentFill).attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 1);\n const smallCircleRadius = configValues.nodeRadius * 0.7;\n const triangleRadius = configValues.nodeRadius * 1.2;\n marketNodes.append(\"line\").attr(\"class\", \"wardley-market-line\").attr(\"x1\", (node) => positions.get(node.id).x).attr(\"y1\", (node) => positions.get(node.id).y - triangleRadius).attr(\"x2\", (node) => positions.get(node.id).x - triangleRadius * Math.cos(Math.PI / 6)).attr(\"y2\", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 1);\n marketNodes.append(\"line\").attr(\"class\", \"wardley-market-line\").attr(\"x1\", (node) => positions.get(node.id).x - triangleRadius * Math.cos(Math.PI / 6)).attr(\"y1\", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr(\"x2\", (node) => positions.get(node.id).x + triangleRadius * Math.cos(Math.PI / 6)).attr(\"y2\", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 1);\n marketNodes.append(\"line\").attr(\"class\", \"wardley-market-line\").attr(\"x1\", (node) => positions.get(node.id).x + triangleRadius * Math.cos(Math.PI / 6)).attr(\"y1\", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr(\"x2\", (node) => positions.get(node.id).x).attr(\"y2\", (node) => positions.get(node.id).y - triangleRadius).attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 1);\n marketNodes.append(\"circle\").attr(\"class\", \"wardley-market-dot\").attr(\"cx\", (node) => positions.get(node.id).x).attr(\"cy\", (node) => positions.get(node.id).y - triangleRadius).attr(\"r\", smallCircleRadius).attr(\"fill\", \"white\").attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 2);\n marketNodes.append(\"circle\").attr(\"class\", \"wardley-market-dot\").attr(\"cx\", (node) => positions.get(node.id).x - triangleRadius * Math.cos(Math.PI / 6)).attr(\"cy\", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr(\"r\", smallCircleRadius).attr(\"fill\", \"white\").attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 2);\n marketNodes.append(\"circle\").attr(\"class\", \"wardley-market-dot\").attr(\"cx\", (node) => positions.get(node.id).x + triangleRadius * Math.cos(Math.PI / 6)).attr(\"cy\", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr(\"r\", smallCircleRadius).attr(\"fill\", \"white\").attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 2);\n nodeEnter.filter((node) => node.isPipelineParent === true).append(\"rect\").attr(\"x\", (node) => positions.get(node.id).x - squareSize / 2).attr(\"y\", (node) => positions.get(node.id).y - squareSize / 2).attr(\"width\", squareSize).attr(\"height\", squareSize).attr(\"fill\", theme.componentFill).attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 1);\n nodeEnter.filter((node) => node.inertia === true).append(\"line\").attr(\"class\", \"wardley-inertia\").attr(\"x1\", (node) => {\n const pos = positions.get(node.id);\n let offset = node.isPipelineParent ? squareSize / 2 + 15 : configValues.nodeRadius + 15;\n if (node.sourceStrategy) {\n offset += configValues.nodeRadius + 10;\n }\n return pos.x + offset;\n }).attr(\"y1\", (node) => {\n const pos = positions.get(node.id);\n const lineHeight = node.isPipelineParent ? squareSize : configValues.nodeRadius * 2;\n return pos.y - lineHeight / 2;\n }).attr(\"x2\", (node) => {\n const pos = positions.get(node.id);\n let offset = node.isPipelineParent ? squareSize / 2 + 15 : configValues.nodeRadius + 15;\n if (node.sourceStrategy) {\n offset += configValues.nodeRadius + 10;\n }\n return pos.x + offset;\n }).attr(\"y2\", (node) => {\n const pos = positions.get(node.id);\n const lineHeight = node.isPipelineParent ? squareSize : configValues.nodeRadius * 2;\n return pos.y + lineHeight / 2;\n }).attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 6);\n nodeEnter.append(\"text\").attr(\"x\", (node) => {\n const pos = positions.get(node.id);\n if (node.className === \"anchor\") {\n return node.labelOffsetX !== void 0 ? pos.x + node.labelOffsetX : pos.x;\n }\n let defaultOffset = configValues.nodeLabelOffset;\n if (node.sourceStrategy && node.labelOffsetX === void 0) {\n defaultOffset += 10;\n }\n const customOffset = node.labelOffsetX ?? defaultOffset;\n return pos.x + customOffset;\n }).attr(\"y\", (node) => {\n const pos = positions.get(node.id);\n if (node.className === \"anchor\") {\n return node.labelOffsetY !== void 0 ? pos.y + node.labelOffsetY : pos.y - 3;\n }\n let defaultOffset = -configValues.nodeLabelOffset;\n if (node.sourceStrategy && node.labelOffsetY === void 0) {\n defaultOffset -= 10;\n }\n const customOffset = node.labelOffsetY ?? defaultOffset;\n return pos.y + customOffset;\n }).attr(\"class\", \"wardley-node-label\").attr(\"fill\", (node) => {\n if (node.className === \"evolved\") {\n return theme.evolutionStroke;\n }\n if (node.className === \"anchor\") {\n return \"#000\";\n }\n return theme.componentLabelColor;\n }).attr(\"font-size\", configValues.labelFontSize).attr(\"font-weight\", (node) => node.className === \"anchor\" ? \"bold\" : \"normal\").attr(\"text-anchor\", (node) => node.className === \"anchor\" ? \"middle\" : \"start\").attr(\"dominant-baseline\", (node) => node.className === \"anchor\" ? \"middle\" : \"auto\").text((node) => node.label);\n if (data.annotations.length > 0) {\n const annotationsGroup = root.append(\"g\").attr(\"class\", \"wardley-annotations\");\n data.annotations.forEach((annotation) => {\n const projectedCoords = annotation.coordinates.map((coord) => ({\n x: projectX(coord.x),\n y: projectY(coord.y)\n }));\n if (projectedCoords.length > 1) {\n for (let i = 0; i < projectedCoords.length - 1; i++) {\n annotationsGroup.append(\"line\").attr(\"class\", \"wardley-annotation-line\").attr(\"x1\", projectedCoords[i].x).attr(\"y1\", projectedCoords[i].y).attr(\"x2\", projectedCoords[i + 1].x).attr(\"y2\", projectedCoords[i + 1].y).attr(\"stroke\", theme.axisColor).attr(\"stroke-width\", 1.5).attr(\"stroke-dasharray\", \"4 4\");\n }\n }\n projectedCoords.forEach((coord) => {\n const annotationNode = annotationsGroup.append(\"g\").attr(\"class\", \"wardley-annotation\");\n annotationNode.append(\"circle\").attr(\"cx\", coord.x).attr(\"cy\", coord.y).attr(\"r\", 10).attr(\"fill\", \"white\").attr(\"stroke\", theme.axisColor).attr(\"stroke-width\", 1.5);\n annotationNode.append(\"text\").attr(\"x\", coord.x).attr(\"y\", coord.y).attr(\"text-anchor\", \"middle\").attr(\"dominant-baseline\", \"central\").attr(\"font-size\", 10).attr(\"fill\", theme.axisTextColor).attr(\"font-weight\", \"bold\").text(annotation.number);\n });\n });\n if (data.annotationsBox) {\n let boxX = projectX(data.annotationsBox.x);\n let boxY = projectY(data.annotationsBox.y);\n const padding = 10;\n const lineHeight = 16;\n const fontSize = 11;\n const textBoxGroup = annotationsGroup.append(\"g\").attr(\"class\", \"wardley-annotations-box\");\n const sortedAnnotations = [...data.annotations].filter((a) => a.text).sort((a, b) => a.number - b.number);\n const textElements = [];\n sortedAnnotations.forEach((annotation, idx) => {\n const text2 = textBoxGroup.append(\"text\").attr(\"x\", boxX + padding).attr(\"y\", boxY + padding + (idx + 1) * lineHeight).attr(\"font-size\", fontSize).attr(\"fill\", theme.axisTextColor).attr(\"text-anchor\", \"start\").attr(\"dominant-baseline\", \"middle\").text(`${annotation.number}. ${annotation.text}`);\n textElements.push(text2);\n });\n if (textElements.length > 0) {\n let maxWidth = 0;\n let maxHeight = 0;\n textElements.forEach((text2) => {\n const textNode = text2.node();\n const textWidth = textNode.getComputedTextLength();\n maxWidth = Math.max(maxWidth, textWidth);\n const bbox = textNode.getBBox();\n maxHeight = Math.max(maxHeight, bbox.height);\n });\n const boxWidth = maxWidth + padding * 2 + 105;\n const boxHeight = sortedAnnotations.length * lineHeight + padding * 2 + maxHeight / 2;\n const minX = configValues.padding;\n const maxX = width - configValues.padding - boxWidth;\n const minY = configValues.padding;\n const maxY = height - configValues.padding - boxHeight;\n boxX = Math.max(minX, Math.min(boxX, maxX));\n boxY = Math.max(minY, Math.min(boxY, maxY));\n textElements.forEach((text2, idx) => {\n text2.attr(\"x\", boxX + padding).attr(\"y\", boxY + padding + (idx + 1) * lineHeight);\n });\n textBoxGroup.insert(\"rect\", \"text\").attr(\"x\", boxX).attr(\"y\", boxY).attr(\"width\", boxWidth).attr(\"height\", boxHeight).attr(\"fill\", \"white\").attr(\"stroke\", theme.axisColor).attr(\"stroke-width\", 1.5).attr(\"rx\", 4).attr(\"ry\", 4);\n }\n }\n }\n if (data.notes.length > 0) {\n const notesGroup = root.append(\"g\").attr(\"class\", \"wardley-notes\");\n data.notes.forEach((note) => {\n const noteX = projectX(note.x);\n const noteY = projectY(note.y);\n notesGroup.append(\"text\").attr(\"x\", noteX).attr(\"y\", noteY).attr(\"text-anchor\", \"start\").attr(\"font-size\", 11).attr(\"fill\", theme.axisTextColor).attr(\"font-weight\", \"bold\").text(note.text);\n });\n }\n if (data.accelerators.length > 0) {\n const acceleratorsGroup = root.append(\"g\").attr(\"class\", \"wardley-accelerators\");\n data.accelerators.forEach((accelerator) => {\n const accX = projectX(accelerator.x);\n const accY = projectY(accelerator.y);\n const arrowWidth = 60;\n const arrowHeight = 30;\n const arrowHeadWidth = 20;\n const arrowPath = `\n M ${accX} ${accY - arrowHeight / 2}\n L ${accX + arrowWidth - arrowHeadWidth} ${accY - arrowHeight / 2}\n L ${accX + arrowWidth - arrowHeadWidth} ${accY - arrowHeight / 2 - 8}\n L ${accX + arrowWidth} ${accY}\n L ${accX + arrowWidth - arrowHeadWidth} ${accY + arrowHeight / 2 + 8}\n L ${accX + arrowWidth - arrowHeadWidth} ${accY + arrowHeight / 2}\n L ${accX} ${accY + arrowHeight / 2}\n Z\n `;\n acceleratorsGroup.append(\"path\").attr(\"d\", arrowPath).attr(\"fill\", \"white\").attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 1);\n acceleratorsGroup.append(\"text\").attr(\"x\", accX + arrowWidth / 2).attr(\"y\", accY + arrowHeight / 2 + 15).attr(\"text-anchor\", \"middle\").attr(\"font-size\", 10).attr(\"fill\", theme.axisTextColor).attr(\"font-weight\", \"bold\").text(accelerator.name);\n });\n }\n if (data.deaccelerators.length > 0) {\n const deacceleratorsGroup = root.append(\"g\").attr(\"class\", \"wardley-deaccelerators\");\n data.deaccelerators.forEach((deaccelerator) => {\n const decX = projectX(deaccelerator.x);\n const decY = projectY(deaccelerator.y);\n const arrowWidth = 60;\n const arrowHeight = 30;\n const arrowHeadWidth = 20;\n const arrowPath = `\n M ${decX + arrowWidth} ${decY - arrowHeight / 2}\n L ${decX + arrowHeadWidth} ${decY - arrowHeight / 2}\n L ${decX + arrowHeadWidth} ${decY - arrowHeight / 2 - 8}\n L ${decX} ${decY}\n L ${decX + arrowHeadWidth} ${decY + arrowHeight / 2 + 8}\n L ${decX + arrowHeadWidth} ${decY + arrowHeight / 2}\n L ${decX + arrowWidth} ${decY + arrowHeight / 2}\n Z\n `;\n deacceleratorsGroup.append(\"path\").attr(\"d\", arrowPath).attr(\"fill\", \"white\").attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 1);\n deacceleratorsGroup.append(\"text\").attr(\"x\", decX + arrowWidth / 2).attr(\"y\", decY + arrowHeight / 2 + 15).attr(\"text-anchor\", \"middle\").attr(\"font-size\", 10).attr(\"fill\", theme.axisTextColor).attr(\"font-weight\", \"bold\").text(deaccelerator.name);\n });\n }\n}, \"draw\");\nvar wardleyRenderer_default = {\n draw\n};\n\n// src/diagrams/wardley/styles.ts\nvar styles = /* @__PURE__ */ __name(({\n wardley\n} = {}) => {\n const defaultThemeVariables = getThemeVariables();\n const currentConfig = getConfig();\n const themeVariables = cleanAndMerge(defaultThemeVariables, currentConfig.themeVariables);\n const w = cleanAndMerge(themeVariables.wardley, wardley);\n return `\n .wardley-background {\n fill: ${w.backgroundColor};\n }\n .wardley-axes line, .wardley-axes path {\n stroke: ${w.axisColor};\n }\n .wardley-axis-label {\n fill: ${w.axisTextColor};\n }\n .wardley-stage-label {\n fill: ${w.axisTextColor};\n }\n .wardley-grid line {\n stroke: ${w.gridColor};\n }\n .wardley-node circle {\n fill: ${w.componentFill};\n stroke: ${w.componentStroke};\n }\n .wardley-node-label {\n fill: ${w.componentLabelColor};\n }\n .wardley-link {\n stroke: ${w.linkStroke};\n }\n .wardley-link--dashed {\n stroke-dasharray: 4 4;\n }\n .wardley-link-label {\n fill: ${w.axisTextColor};\n }\n .wardley-trend line {\n stroke: ${w.evolutionStroke};\n }\n .wardley-annotation-line {\n stroke: ${w.annotationStroke};\n }\n .wardley-annotation circle {\n fill: ${w.annotationFill};\n stroke: ${w.annotationStroke};\n }\n .wardley-annotation text {\n fill: ${w.annotationTextColor};\n }\n .wardley-annotations-box rect {\n fill: ${w.annotationFill};\n stroke: ${w.annotationStroke};\n }\n .wardley-annotations-box text {\n fill: ${w.annotationTextColor};\n }\n .wardley-pipeline-box {\n stroke: ${w.componentStroke};\n }\n .wardley-notes text {\n fill: ${w.axisTextColor};\n }\n `;\n}, \"styles\");\n\n// src/diagrams/wardley/wardleyDiagram.ts\nvar diagram = {\n parser,\n db: wardleyDb_default,\n renderer: wardleyRenderer_default,\n styles\n};\nexport {\n diagram\n};\n"],"x_google_ignoreList":[0],"mappings":"+VA6BA,IAAI,EAA4B,GAAQ,EAAO,IAAY,CACzD,IAAM,EAAa,GAAS,EAAI,EAAQ,IAAM,EAC9C,GAAI,EAAa,GAAK,EAAa,IACjC,MAAU,MACR,GAAG,EAAQ,kEAAkE,IAC9E,CAEH,OAAO,GACN,YAAY,CACX,EAAgC,GAAQ,EAAY,EAAW,KAC1D,CACL,EAAG,EAAU,EAAW,GAAG,EAAQ,YAAY,CAC/C,EAAG,EAAU,EAAY,GAAG,EAAQ,aAAa,CAClD,EACA,gBAAgB,CACf,EAAkC,EAAQ,GAAS,CAChD,KAGL,IAAI,IAAS,MACX,MAAO,gBAET,GAAI,IAAS,KACX,MAAO,WAET,GAAI,IAAS,KACX,MAAO,YAGR,kBAAkB,CACjB,EAAuC,EAAQ,GAAU,CAC3D,GAAI,CAAC,GAAO,WAAW,IAAI,CACzB,MAAO,EAAE,CAGX,IAAM,EADa,eAAe,KAAK,EACX,GAAG,GAU/B,OATI,EAAM,SAAS,KAAK,CACf,CAAE,KAAM,gBAAiB,MAAO,EAAW,CAEhD,EAAM,SAAS,IAAI,CACd,CAAE,KAAM,WAAY,MAAO,EAAW,CAE3C,EAAM,SAAS,IAAI,CACd,CAAE,KAAM,UAAW,MA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AE,iBAAiB;;;YAGrB,EAAE,eAAe;cACf,EAAE,iBAAiB;;;YAGrB,EAAE,oBAAoB;;;YAGtB,EAAE,eAAe;cACf,EAAE,iBAAiB;;;YAGrB,EAAE,oBAAoB;;;cAGpB,EAAE,gBAAgB;;;YAGpB,EAAE,cAAc;;KAGzB,SAOK,CACP"}
1
+ {"version":3,"file":"wardleyDiagram-YWT4CUSO-CQ8dLujr.js","names":["getThemeVariables"],"sources":["../../../../../node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-YWT4CUSO.mjs"],"sourcesContent":["import {\n selectSvgElement\n} from \"./chunk-WU5MYG2G.mjs\";\nimport {\n populateCommonDb\n} from \"./chunk-4BX2VUAB.mjs\";\nimport {\n cleanAndMerge\n} from \"./chunk-5ZQYHXKU.mjs\";\nimport {\n clear,\n configureSvgSize,\n getAccDescription,\n getAccTitle,\n getConfig,\n getConfig2,\n getDiagramTitle,\n getThemeVariables,\n setAccDescription,\n setAccTitle,\n setDiagramTitle\n} from \"./chunk-CSCIHK7Q.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/wardley/wardleyParser.ts\nimport { parse } from \"@mermaid-js/parser\";\nvar toPercent = /* @__PURE__ */ __name((value, context) => {\n const normalized = value <= 1 ? value * 100 : value;\n if (normalized < 0 || normalized > 100) {\n throw new Error(\n `${context} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${value}`\n );\n }\n return normalized;\n}, \"toPercent\");\nvar toCoordinates = /* @__PURE__ */ __name((visibility, evolution, context) => {\n return {\n x: toPercent(evolution, `${context} evolution`),\n y: toPercent(visibility, `${context} visibility`)\n };\n}, \"toCoordinates\");\nvar getFlowFromPort = /* @__PURE__ */ __name((port) => {\n if (!port) {\n return void 0;\n }\n if (port === \"+<>\") {\n return \"bidirectional\";\n }\n if (port === \"+<\") {\n return \"backward\";\n }\n if (port === \"+>\") {\n return \"forward\";\n }\n return void 0;\n}, \"getFlowFromPort\");\nvar extractFlowFromArrow = /* @__PURE__ */ __name((arrow) => {\n if (!arrow?.startsWith(\"+\")) {\n return {};\n }\n const labelMatch = /^\\+'([^']*)'/.exec(arrow);\n const flowLabel = labelMatch?.[1];\n if (arrow.includes(\"<>\")) {\n return { flow: \"bidirectional\", label: flowLabel };\n }\n if (arrow.includes(\"<\")) {\n return { flow: \"backward\", label: flowLabel };\n }\n if (arrow.includes(\">\")) {\n return { flow: \"forward\", label: flowLabel };\n }\n return { label: flowLabel };\n}, \"extractFlowFromArrow\");\nvar populateDb = /* @__PURE__ */ __name((ast, db) => {\n populateCommonDb(ast, db);\n if (ast.size) {\n db.setSize(ast.size.width, ast.size.height);\n }\n if (ast.evolution) {\n const stages = ast.evolution.stages.map((stage) => {\n if (stage.secondName) {\n return `${stage.name.trim()} / ${stage.secondName.trim()}`;\n }\n return stage.name.trim();\n });\n const stageBoundaries = ast.evolution.stages.filter((stage) => stage.boundary !== void 0).map((stage) => stage.boundary);\n db.updateAxes({ stages, stageBoundaries });\n }\n ast.anchors.forEach((anchor) => {\n const coords = toCoordinates(anchor.visibility, anchor.evolution, `Anchor \"${anchor.name}\"`);\n db.addNode(anchor.name, anchor.name, coords.x, coords.y, \"anchor\");\n });\n ast.components.forEach((component) => {\n const coords = toCoordinates(\n component.visibility,\n component.evolution,\n `Component \"${component.name}\"`\n );\n const labelOffsetX = component.label ? (component.label.negX ? -1 : 1) * component.label.offsetX : void 0;\n const labelOffsetY = component.label ? (component.label.negY ? -1 : 1) * component.label.offsetY : void 0;\n const sourceStrategy = component.decorator?.strategy;\n db.addNode(\n component.name,\n component.name,\n coords.x,\n coords.y,\n \"component\",\n labelOffsetX,\n labelOffsetY,\n component.inertia,\n sourceStrategy\n );\n });\n ast.notes.forEach((note) => {\n const coords = toCoordinates(note.visibility, note.evolution, `Note \"${note.text}\"`);\n db.addNote(note.text, coords.x, coords.y);\n });\n ast.pipelines.forEach((pipeline) => {\n const parentNode = db.getNode(pipeline.parent);\n if (!parentNode || typeof parentNode.y !== \"number\") {\n throw new Error(\n `Pipeline \"${pipeline.parent}\" must reference an existing component with coordinates.`\n );\n }\n const parentY = parentNode.y;\n db.startPipeline(pipeline.parent);\n pipeline.components.forEach((component) => {\n const componentId = `${pipeline.parent}_${component.name}`;\n const labelOffsetX = component.label ? (component.label.negX ? -1 : 1) * component.label.offsetX : void 0;\n const labelOffsetY = component.label ? (component.label.negY ? -1 : 1) * component.label.offsetY : void 0;\n const x = toPercent(component.evolution, `Pipeline component \"${component.name}\" evolution`);\n db.addNode(\n componentId,\n component.name,\n x,\n parentY,\n \"pipeline-component\",\n labelOffsetX,\n labelOffsetY\n );\n db.addPipelineComponent(pipeline.parent, componentId);\n });\n });\n ast.links.forEach((link) => {\n const isDashed = !!link.arrow && (link.arrow.includes(\"-.->\") || link.arrow.includes(\".-.\"));\n let flow = getFlowFromPort(link.fromPort) ?? getFlowFromPort(link.toPort);\n const { flow: arrowFlow, label: flowLabel } = extractFlowFromArrow(link.arrow);\n if (!flow && arrowFlow) {\n flow = arrowFlow;\n }\n const annotation = link.linkLabel;\n const label = flowLabel ?? annotation;\n db.addLink(db.resolveNodeId(link.from), db.resolveNodeId(link.to), isDashed, label, flow);\n });\n ast.evolves.forEach((evolve) => {\n const node = db.getNode(evolve.component);\n if (node?.y !== void 0) {\n const target = toPercent(evolve.target, `Evolve target for \"${evolve.component}\"`);\n db.addTrend(evolve.component, target, node.y);\n }\n });\n if (ast.annotations.length > 0) {\n const annotationsBox = ast.annotations[0];\n const coords = toCoordinates(annotationsBox.x, annotationsBox.y, \"Annotations box\");\n db.setAnnotationsBox(coords.x, coords.y);\n }\n ast.annotation.forEach((annotation) => {\n const coords = toCoordinates(annotation.x, annotation.y, `Annotation ${annotation.number}`);\n db.addAnnotation(annotation.number, [{ x: coords.x, y: coords.y }], annotation.text);\n });\n ast.accelerators.forEach((accelerator) => {\n const coords = toCoordinates(accelerator.x, accelerator.y, `Accelerator \"${accelerator.name}\"`);\n db.addAccelerator(accelerator.name, coords.x, coords.y);\n });\n ast.deaccelerators.forEach((deaccelerator) => {\n const coords = toCoordinates(\n deaccelerator.x,\n deaccelerator.y,\n `Deaccelerator \"${deaccelerator.name}\"`\n );\n db.addDeaccelerator(deaccelerator.name, coords.x, coords.y);\n });\n}, \"populateDb\");\nvar parser = {\n parser: {\n // @ts-expect-error - WardleyDB is not assignable to DiagramDB\n yy: void 0\n },\n parse: /* @__PURE__ */ __name(async (input) => {\n const ast = await parse(\"wardley\", input);\n log.debug(ast);\n const db = parser.parser?.yy;\n if (!db || typeof db.addNode !== \"function\") {\n throw new Error(\n \"parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.\"\n );\n }\n populateDb(ast, db);\n }, \"parse\")\n};\n\n// src/diagrams/wardley/wardleyBuilder.ts\nvar WardleyBuilder = class {\n constructor() {\n this.nodes = /* @__PURE__ */ new Map();\n this.links = [];\n this.trends = /* @__PURE__ */ new Map();\n this.pipelines = /* @__PURE__ */ new Map();\n this.annotations = [];\n this.notes = [];\n this.accelerators = [];\n this.deaccelerators = [];\n this.axes = {};\n }\n static {\n __name(this, \"WardleyBuilder\");\n }\n addNode(node) {\n const existing = this.nodes.get(node.id) ?? { id: node.id, label: node.label };\n const merged = {\n ...existing,\n ...node,\n className: node.className ?? existing.className,\n labelOffsetX: node.labelOffsetX ?? existing.labelOffsetX,\n labelOffsetY: node.labelOffsetY ?? existing.labelOffsetY\n };\n this.nodes.set(node.id, merged);\n }\n addLink(link) {\n this.links.push(link);\n }\n addTrend(trend) {\n this.trends.set(trend.nodeId, trend);\n }\n startPipeline(nodeId) {\n this.pipelines.set(nodeId, { nodeId, componentIds: [] });\n const node = this.nodes.get(nodeId);\n if (node) {\n node.isPipelineParent = true;\n }\n }\n addPipelineComponent(pipelineNodeId, componentId) {\n const pipeline = this.pipelines.get(pipelineNodeId);\n if (pipeline) {\n pipeline.componentIds.push(componentId);\n }\n const node = this.nodes.get(componentId);\n if (node) {\n node.inPipeline = true;\n }\n }\n addAnnotation(annotation) {\n this.annotations.push(annotation);\n }\n addNote(note) {\n this.notes.push(note);\n }\n addAccelerator(accelerator) {\n this.accelerators.push(accelerator);\n }\n addDeaccelerator(deaccelerator) {\n this.deaccelerators.push(deaccelerator);\n }\n setAnnotationsBox(x, y) {\n this.annotationsBox = { x, y };\n }\n setAxes(partial) {\n this.axes = {\n ...this.axes,\n ...partial\n };\n }\n setSize(width, height) {\n this.size = { width, height };\n }\n getNode(id) {\n return this.nodes.get(id);\n }\n /**\n * Resolve a name to a node ID. Tries exact ID match first,\n * then falls back to finding a node whose label matches the name\n * (handles pipeline components which have synthetic IDs like \"Parent_Child\").\n */\n resolveNodeId(name) {\n if (this.nodes.has(name)) {\n return name;\n }\n for (const [id, node] of this.nodes) {\n if (node.label === name) {\n return id;\n }\n }\n return name;\n }\n build() {\n const nodes = [];\n for (const node of this.nodes.values()) {\n if (typeof node.x !== \"number\" || typeof node.y !== \"number\") {\n throw new Error(`Node \"${node.label}\" is missing coordinates`);\n }\n nodes.push(node);\n }\n return {\n nodes,\n links: [...this.links],\n trends: [...this.trends.values()],\n pipelines: [...this.pipelines.values()],\n annotations: [...this.annotations],\n notes: [...this.notes],\n accelerators: [...this.accelerators],\n deaccelerators: [...this.deaccelerators],\n annotationsBox: this.annotationsBox,\n axes: { ...this.axes },\n size: this.size\n };\n }\n clear() {\n this.nodes.clear();\n this.links = [];\n this.trends.clear();\n this.pipelines.clear();\n this.annotations = [];\n this.notes = [];\n this.accelerators = [];\n this.deaccelerators = [];\n this.annotationsBox = void 0;\n this.axes = {};\n this.size = void 0;\n }\n};\n\n// src/diagrams/wardley/wardleyDb.ts\nvar builder = new WardleyBuilder();\nfunction getConfig3() {\n return getConfig2()[\"wardley-beta\"];\n}\n__name(getConfig3, \"getConfig\");\nfunction addNode(id, label, x, y, className, labelOffsetX, labelOffsetY, inertia, sourceStrategy) {\n builder.addNode({\n id,\n label,\n x,\n y,\n className,\n labelOffsetX,\n labelOffsetY,\n inertia,\n sourceStrategy\n });\n}\n__name(addNode, \"addNode\");\nfunction addLink(sourceId, targetId, dashed = false, label, flow) {\n builder.addLink({\n source: sourceId,\n target: targetId,\n dashed,\n label,\n flow\n });\n}\n__name(addLink, \"addLink\");\nfunction addTrend(nodeId, targetX, targetY) {\n builder.addTrend({ nodeId, targetX, targetY });\n}\n__name(addTrend, \"addTrend\");\nfunction addAnnotation(number, coordinates, text) {\n builder.addAnnotation({\n number,\n coordinates,\n text\n });\n}\n__name(addAnnotation, \"addAnnotation\");\nfunction addNote(text, x, y) {\n builder.addNote({\n text,\n x,\n y\n });\n}\n__name(addNote, \"addNote\");\nfunction addAccelerator(name, x, y) {\n builder.addAccelerator({\n name,\n x,\n y\n });\n}\n__name(addAccelerator, \"addAccelerator\");\nfunction addDeaccelerator(name, x, y) {\n builder.addDeaccelerator({\n name,\n x,\n y\n });\n}\n__name(addDeaccelerator, \"addDeaccelerator\");\nfunction setAnnotationsBox(x, y) {\n builder.setAnnotationsBox(x, y);\n}\n__name(setAnnotationsBox, \"setAnnotationsBox\");\nfunction setSize(width, height) {\n builder.setSize(width, height);\n}\n__name(setSize, \"setSize\");\nfunction startPipeline(nodeId) {\n builder.startPipeline(nodeId);\n}\n__name(startPipeline, \"startPipeline\");\nfunction addPipelineComponent(pipelineNodeId, componentId) {\n builder.addPipelineComponent(pipelineNodeId, componentId);\n}\n__name(addPipelineComponent, \"addPipelineComponent\");\nfunction updateAxes(partial) {\n builder.setAxes(partial);\n}\n__name(updateAxes, \"updateAxes\");\nfunction getNode(id) {\n return builder.getNode(id);\n}\n__name(getNode, \"getNode\");\nfunction resolveNodeId(name) {\n return builder.resolveNodeId(name);\n}\n__name(resolveNodeId, \"resolveNodeId\");\nfunction getWardleyData() {\n return builder.build();\n}\n__name(getWardleyData, \"getWardleyData\");\nfunction clear2() {\n builder.clear();\n clear();\n}\n__name(clear2, \"clear\");\nvar wardleyDb_default = {\n getConfig: getConfig3,\n addNode,\n addLink,\n addTrend,\n addAnnotation,\n addNote,\n addAccelerator,\n addDeaccelerator,\n setAnnotationsBox,\n setSize,\n startPipeline,\n addPipelineComponent,\n updateAxes,\n getNode,\n resolveNodeId,\n getWardleyData,\n clear: clear2,\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription\n};\n\n// src/diagrams/wardley/wardleyRenderer.ts\nvar DEFAULT_STAGES = [\"Genesis\", \"Custom Built\", \"Product\", \"Commodity\"];\nvar getTheme = /* @__PURE__ */ __name(() => {\n const { themeVariables } = getConfig2();\n return {\n backgroundColor: themeVariables.wardley?.backgroundColor ?? themeVariables.background ?? \"#fff\",\n axisColor: themeVariables.wardley?.axisColor ?? \"#000\",\n axisTextColor: themeVariables.wardley?.axisTextColor ?? themeVariables.primaryTextColor ?? \"#222\",\n gridColor: themeVariables.wardley?.gridColor ?? \"rgba(100, 100, 100, 0.2)\",\n componentFill: themeVariables.wardley?.componentFill ?? \"#fff\",\n componentStroke: themeVariables.wardley?.componentStroke ?? \"#000\",\n componentLabelColor: themeVariables.wardley?.componentLabelColor ?? themeVariables.primaryTextColor ?? \"#222\",\n linkStroke: themeVariables.wardley?.linkStroke ?? \"#000\",\n evolutionStroke: themeVariables.wardley?.evolutionStroke ?? \"#dc3545\",\n annotationStroke: themeVariables.wardley?.annotationStroke ?? \"#000\",\n annotationTextColor: themeVariables.wardley?.annotationTextColor ?? themeVariables.primaryTextColor ?? \"#222\",\n annotationFill: themeVariables.wardley?.annotationFill ?? themeVariables.background ?? \"#fff\"\n };\n}, \"getTheme\");\nvar getConfigValues = /* @__PURE__ */ __name(() => {\n const wardleyConfig = getConfig2()[\"wardley-beta\"];\n return {\n width: wardleyConfig?.width ?? 900,\n height: wardleyConfig?.height ?? 600,\n padding: wardleyConfig?.padding ?? 48,\n nodeRadius: wardleyConfig?.nodeRadius ?? 6,\n nodeLabelOffset: wardleyConfig?.nodeLabelOffset ?? 8,\n axisFontSize: wardleyConfig?.axisFontSize ?? 12,\n labelFontSize: wardleyConfig?.labelFontSize ?? 10,\n showGrid: wardleyConfig?.showGrid ?? false,\n useMaxWidth: wardleyConfig?.useMaxWidth ?? true\n };\n}, \"getConfigValues\");\nvar draw = /* @__PURE__ */ __name((text, id, _version, diagObj) => {\n log.debug(\"Rendering Wardley map\\n\" + text);\n const configValues = getConfigValues();\n const theme = getTheme();\n const squareSize = configValues.nodeRadius * 1.6;\n const db = diagObj.db;\n const data = db.getWardleyData();\n const title = db.getDiagramTitle();\n const width = data.size?.width ?? configValues.width;\n const height = data.size?.height ?? configValues.height;\n const svg = selectSvgElement(id);\n svg.selectAll(\"*\").remove();\n configureSvgSize(svg, height, width, configValues.useMaxWidth);\n svg.attr(\"viewBox\", `0 0 ${width} ${height}`);\n const root = svg.append(\"g\").attr(\"class\", \"wardley-map\");\n const defs = svg.append(\"defs\");\n defs.append(\"marker\").attr(\"id\", `arrow-${id}`).attr(\"viewBox\", \"0 0 10 10\").attr(\"refX\", 9).attr(\"refY\", 5).attr(\"markerWidth\", 6).attr(\"markerHeight\", 6).attr(\"orient\", \"auto-start-reverse\").append(\"path\").attr(\"d\", \"M 0 0 L 10 5 L 0 10 z\").attr(\"fill\", theme.evolutionStroke).attr(\"stroke\", \"none\");\n defs.append(\"marker\").attr(\"id\", `link-arrow-end-${id}`).attr(\"viewBox\", \"0 0 10 10\").attr(\"refX\", 9).attr(\"refY\", 5).attr(\"markerWidth\", 5).attr(\"markerHeight\", 5).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 0 0 L 10 5 L 0 10 z\").attr(\"fill\", theme.linkStroke).attr(\"stroke\", \"none\");\n defs.append(\"marker\").attr(\"id\", `link-arrow-start-${id}`).attr(\"viewBox\", \"0 0 10 10\").attr(\"refX\", 1).attr(\"refY\", 5).attr(\"markerWidth\", 5).attr(\"markerHeight\", 5).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 10 0 L 0 5 L 10 10 z\").attr(\"fill\", theme.linkStroke).attr(\"stroke\", \"none\");\n root.append(\"rect\").attr(\"class\", \"wardley-background\").attr(\"width\", width).attr(\"height\", height).attr(\"fill\", theme.backgroundColor);\n const chartWidth = width - configValues.padding * 2;\n const chartHeight = height - configValues.padding * 2;\n if (title) {\n root.append(\"text\").attr(\"class\", \"wardley-title\").attr(\"x\", width / 2).attr(\"y\", configValues.padding / 2).attr(\"fill\", theme.axisTextColor).attr(\"font-size\", configValues.axisFontSize * 1.05).attr(\"font-weight\", \"bold\").attr(\"text-anchor\", \"middle\").attr(\"dominant-baseline\", \"middle\").text(title);\n }\n const projectX = /* @__PURE__ */ __name((value) => configValues.padding + value / 100 * chartWidth, \"projectX\");\n const projectY = /* @__PURE__ */ __name((value) => height - configValues.padding - value / 100 * chartHeight, \"projectY\");\n const axisGroup = root.append(\"g\").attr(\"class\", \"wardley-axes\");\n axisGroup.append(\"line\").attr(\"x1\", configValues.padding).attr(\"x2\", width - configValues.padding).attr(\"y1\", height - configValues.padding).attr(\"y2\", height - configValues.padding).attr(\"stroke\", theme.axisColor).attr(\"stroke-width\", 1);\n axisGroup.append(\"line\").attr(\"x1\", configValues.padding).attr(\"x2\", configValues.padding).attr(\"y1\", configValues.padding).attr(\"y2\", height - configValues.padding).attr(\"stroke\", theme.axisColor).attr(\"stroke-width\", 1);\n const xLabel = data.axes.xLabel ?? \"Evolution\";\n const yLabel = data.axes.yLabel ?? \"Visibility\";\n axisGroup.append(\"text\").attr(\"class\", \"wardley-axis-label wardley-axis-label-x\").attr(\"x\", configValues.padding + chartWidth / 2).attr(\"y\", height - configValues.padding / 4).attr(\"fill\", theme.axisTextColor).attr(\"font-size\", configValues.axisFontSize).attr(\"font-weight\", \"bold\").attr(\"text-anchor\", \"middle\").text(xLabel);\n axisGroup.append(\"text\").attr(\"class\", \"wardley-axis-label wardley-axis-label-y\").attr(\"x\", configValues.padding / 3).attr(\"y\", configValues.padding + chartHeight / 2).attr(\"fill\", theme.axisTextColor).attr(\"font-size\", configValues.axisFontSize).attr(\"font-weight\", \"bold\").attr(\"text-anchor\", \"middle\").attr(\n \"transform\",\n `rotate(-90 ${configValues.padding / 3} ${configValues.padding + chartHeight / 2})`\n ).text(yLabel);\n const stages = data.axes.stages && data.axes.stages.length > 0 ? data.axes.stages : DEFAULT_STAGES;\n if (stages.length > 0) {\n const stageGroup = root.append(\"g\").attr(\"class\", \"wardley-stages\");\n const boundaries = data.axes.stageBoundaries;\n const stagePositions = [];\n if (boundaries && boundaries.length === stages.length) {\n let prevBoundary = 0;\n boundaries.forEach((boundary) => {\n stagePositions.push({ start: prevBoundary, end: boundary });\n prevBoundary = boundary;\n });\n } else {\n const stageWidth = 1 / stages.length;\n stages.forEach((_, index) => {\n stagePositions.push({\n start: index * stageWidth,\n end: (index + 1) * stageWidth\n });\n });\n }\n stages.forEach((stage, index) => {\n const pos = stagePositions[index];\n const startX = configValues.padding + pos.start * chartWidth;\n const endX = configValues.padding + pos.end * chartWidth;\n const centerX = (startX + endX) / 2;\n if (index > 0) {\n stageGroup.append(\"line\").attr(\"x1\", startX).attr(\"x2\", startX).attr(\"y1\", configValues.padding).attr(\"y2\", height - configValues.padding).attr(\"stroke\", \"#000\").attr(\"stroke-width\", 1).attr(\"stroke-dasharray\", \"5 5\").attr(\"opacity\", 0.8);\n }\n stageGroup.append(\"text\").attr(\"class\", \"wardley-stage-label\").attr(\"x\", centerX).attr(\"y\", height - configValues.padding / 1.5).attr(\"fill\", theme.axisTextColor).attr(\"font-size\", configValues.axisFontSize - 2).attr(\"text-anchor\", \"middle\").text(stage);\n });\n }\n if (configValues.showGrid) {\n const gridGroup = root.append(\"g\").attr(\"class\", \"wardley-grid\");\n for (let i = 1; i < 4; i++) {\n const ratio = i / 4;\n const x = configValues.padding + chartWidth * ratio;\n gridGroup.append(\"line\").attr(\"x1\", x).attr(\"x2\", x).attr(\"y1\", configValues.padding).attr(\"y2\", height - configValues.padding).attr(\"stroke\", theme.gridColor).attr(\"stroke-dasharray\", \"2 6\");\n gridGroup.append(\"line\").attr(\"x1\", configValues.padding).attr(\"x2\", width - configValues.padding).attr(\"y1\", height - configValues.padding - chartHeight * ratio).attr(\"y2\", height - configValues.padding - chartHeight * ratio).attr(\"stroke\", theme.gridColor).attr(\"stroke-dasharray\", \"2 6\");\n }\n }\n const positions = /* @__PURE__ */ new Map();\n data.nodes.forEach((node) => {\n positions.set(node.id, {\n x: projectX(node.x),\n y: projectY(node.y),\n node\n });\n });\n if (data.pipelines.length > 0) {\n const pipelineGroup = root.append(\"g\").attr(\"class\", \"wardley-pipelines\");\n const pipelineLinksGroup = root.append(\"g\").attr(\"class\", \"wardley-pipeline-links\");\n data.pipelines.forEach((pipeline) => {\n if (pipeline.componentIds.length === 0) {\n return;\n }\n const sortedComponents = pipeline.componentIds.map((id2) => ({ id: id2, pos: positions.get(id2), node: data.nodes.find((n) => n.id === id2) })).filter((c) => c.pos && c.node).sort((a, b) => a.node.x - b.node.x);\n for (let i = 0; i < sortedComponents.length - 1; i++) {\n const current = sortedComponents[i];\n const next = sortedComponents[i + 1];\n pipelineLinksGroup.append(\"line\").attr(\"class\", \"wardley-pipeline-evolution-link\").attr(\"x1\", current.pos.x).attr(\"y1\", current.pos.y).attr(\"x2\", next.pos.x).attr(\"y2\", next.pos.y).attr(\"stroke\", theme.linkStroke).attr(\"stroke-width\", 1).attr(\"stroke-dasharray\", \"4 4\");\n }\n let minX = Infinity;\n let maxX = -Infinity;\n let y = 0;\n pipeline.componentIds.forEach((componentId) => {\n const pos = positions.get(componentId);\n if (pos) {\n minX = Math.min(minX, pos.x);\n maxX = Math.max(maxX, pos.x);\n y = pos.y;\n }\n });\n if (minX !== Infinity && maxX !== -Infinity) {\n const padding = 15;\n const height2 = configValues.nodeRadius * 4;\n const boxTop = y - height2 / 2;\n const parentPos = positions.get(pipeline.nodeId);\n if (parentPos) {\n const centerX = (minX + maxX) / 2;\n parentPos.x = centerX;\n parentPos.y = boxTop - squareSize / 6;\n }\n pipelineGroup.append(\"rect\").attr(\"class\", \"wardley-pipeline-box\").attr(\"x\", minX - padding).attr(\"y\", boxTop).attr(\"width\", maxX - minX + padding * 2).attr(\"height\", height2).attr(\"fill\", \"none\").attr(\"stroke\", theme.axisColor).attr(\"stroke-width\", 1.5).attr(\"rx\", 4).attr(\"ry\", 4);\n }\n });\n }\n const linksGroup = root.append(\"g\").attr(\"class\", \"wardley-links\");\n const pipelineMap = /* @__PURE__ */ new Map();\n data.pipelines.forEach((pipeline) => {\n pipelineMap.set(pipeline.nodeId, new Set(pipeline.componentIds));\n });\n const validLinks = data.links.filter((link) => {\n if (!positions.has(link.source) || !positions.has(link.target)) {\n return false;\n }\n const pipelineComponents = pipelineMap.get(link.target);\n if (pipelineComponents?.has(link.source)) {\n return false;\n }\n return true;\n });\n linksGroup.selectAll(\"line\").data(validLinks).enter().append(\"line\").attr(\"class\", (link) => `wardley-link${link.dashed ? \" wardley-link--dashed\" : \"\"}`).attr(\"x1\", (link) => {\n const sourcePos = positions.get(link.source);\n const targetPos = positions.get(link.target);\n const sourceNode = data.nodes.find((n) => n.id === link.source);\n const radius = sourceNode.isPipelineParent ? squareSize / Math.sqrt(2) : configValues.nodeRadius;\n const dx = targetPos.x - sourcePos.x;\n const dy = targetPos.y - sourcePos.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n return sourcePos.x + dx / distance * radius;\n }).attr(\"y1\", (link) => {\n const sourcePos = positions.get(link.source);\n const targetPos = positions.get(link.target);\n const sourceNode = data.nodes.find((n) => n.id === link.source);\n const radius = sourceNode.isPipelineParent ? squareSize / Math.sqrt(2) : configValues.nodeRadius;\n const dx = targetPos.x - sourcePos.x;\n const dy = targetPos.y - sourcePos.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n return sourcePos.y + dy / distance * radius;\n }).attr(\"x2\", (link) => {\n const sourcePos = positions.get(link.source);\n const targetPos = positions.get(link.target);\n const targetNode = data.nodes.find((n) => n.id === link.target);\n const radius = targetNode.isPipelineParent ? squareSize / Math.sqrt(2) : configValues.nodeRadius;\n const dx = sourcePos.x - targetPos.x;\n const dy = sourcePos.y - targetPos.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n return targetPos.x + dx / distance * radius;\n }).attr(\"y2\", (link) => {\n const sourcePos = positions.get(link.source);\n const targetPos = positions.get(link.target);\n const targetNode = data.nodes.find((n) => n.id === link.target);\n const radius = targetNode.isPipelineParent ? squareSize / Math.sqrt(2) : configValues.nodeRadius;\n const dx = sourcePos.x - targetPos.x;\n const dy = sourcePos.y - targetPos.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n return targetPos.y + dy / distance * radius;\n }).attr(\"stroke\", theme.linkStroke).attr(\"stroke-width\", 1).attr(\"stroke-dasharray\", (link) => link.dashed ? \"6 6\" : null).attr(\"marker-end\", (link) => {\n if (link.flow === \"forward\" || link.flow === \"bidirectional\") {\n return `url(#link-arrow-end-${id})`;\n }\n return null;\n }).attr(\"marker-start\", (link) => {\n if (link.flow === \"backward\" || link.flow === \"bidirectional\") {\n return `url(#link-arrow-start-${id})`;\n }\n return null;\n });\n linksGroup.selectAll(\"text\").data(validLinks.filter((link) => link.label)).enter().append(\"text\").attr(\"class\", \"wardley-link-label\").attr(\"x\", (link) => {\n const sourcePos = positions.get(link.source);\n const targetPos = positions.get(link.target);\n const midX = (sourcePos.x + targetPos.x) / 2;\n const dy = targetPos.y - sourcePos.y;\n const dx = targetPos.x - sourcePos.x;\n const distance = Math.sqrt(dx * dx + dy * dy);\n const offset = 8;\n const perpX = dy / distance;\n return midX + perpX * offset;\n }).attr(\"y\", (link) => {\n const sourcePos = positions.get(link.source);\n const targetPos = positions.get(link.target);\n const midY = (sourcePos.y + targetPos.y) / 2;\n const dx = targetPos.x - sourcePos.x;\n const dy = targetPos.y - sourcePos.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n const offset = 8;\n const perpY = -dx / distance;\n return midY + perpY * offset;\n }).attr(\"fill\", theme.axisTextColor).attr(\"font-size\", configValues.labelFontSize).attr(\"text-anchor\", \"middle\").attr(\"dominant-baseline\", \"middle\").attr(\"transform\", (link) => {\n const sourcePos = positions.get(link.source);\n const targetPos = positions.get(link.target);\n const midX = (sourcePos.x + targetPos.x) / 2;\n const midY = (sourcePos.y + targetPos.y) / 2;\n const dx = targetPos.x - sourcePos.x;\n const dy = targetPos.y - sourcePos.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n const offset = 8;\n const perpX = dy / distance;\n const perpY = -dx / distance;\n const labelX = midX + perpX * offset;\n const labelY = midY + perpY * offset;\n let angle = Math.atan2(dy, dx) * 180 / Math.PI;\n if (angle > 90 || angle < -90) {\n angle += 180;\n }\n return `rotate(${angle} ${labelX} ${labelY})`;\n }).text((link) => link.label);\n const trendGroup = root.append(\"g\").attr(\"class\", \"wardley-trends\");\n const trendsWithPositions = data.trends.map((trend) => {\n const origin = positions.get(trend.nodeId);\n if (!origin) {\n return null;\n }\n const targetX = projectX(trend.targetX);\n const targetY = projectY(trend.targetY);\n const dx = targetX - origin.x;\n const dy = targetY - origin.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n const shortenBy = configValues.nodeRadius + 2;\n const adjustedX2 = distance > shortenBy ? targetX - dx / distance * shortenBy : targetX;\n const adjustedY2 = distance > shortenBy ? targetY - dy / distance * shortenBy : targetY;\n return {\n origin,\n targetX,\n targetY,\n adjustedX2,\n adjustedY2\n };\n }).filter((trend) => trend !== null);\n trendGroup.selectAll(\"line\").data(trendsWithPositions).enter().append(\"line\").attr(\"class\", \"wardley-trend\").attr(\"x1\", (trend) => trend.origin.x).attr(\"y1\", (trend) => trend.origin.y).attr(\"x2\", (trend) => trend.adjustedX2).attr(\"y2\", (trend) => trend.adjustedY2).attr(\"stroke\", theme.evolutionStroke).attr(\"stroke-width\", 1).attr(\"stroke-dasharray\", \"4 4\").attr(\"marker-end\", `url(#arrow-${id})`);\n const nodesGroup = root.append(\"g\").attr(\"class\", \"wardley-nodes\");\n const nodeEnter = nodesGroup.selectAll(\"g\").data(data.nodes).enter().append(\"g\").attr(\n \"class\",\n (node) => [\"wardley-node\", node.className ? `wardley-node--${node.className}` : \"\"].filter(Boolean).join(\" \")\n );\n nodeEnter.filter((node) => node.sourceStrategy === \"outsource\").append(\"circle\").attr(\"class\", \"wardley-outsource-overlay\").attr(\"cx\", (node) => positions.get(node.id).x).attr(\"cy\", (node) => positions.get(node.id).y).attr(\"r\", configValues.nodeRadius * 2).attr(\"fill\", \"#666\").attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 1);\n nodeEnter.filter((node) => node.sourceStrategy === \"buy\").append(\"circle\").attr(\"class\", \"wardley-buy-overlay\").attr(\"cx\", (node) => positions.get(node.id).x).attr(\"cy\", (node) => positions.get(node.id).y).attr(\"r\", configValues.nodeRadius * 2).attr(\"fill\", \"#ccc\").attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 1);\n nodeEnter.filter((node) => node.sourceStrategy === \"build\").append(\"circle\").attr(\"class\", \"wardley-build-overlay\").attr(\"cx\", (node) => positions.get(node.id).x).attr(\"cy\", (node) => positions.get(node.id).y).attr(\"r\", configValues.nodeRadius * 2).attr(\"fill\", \"#eee\").attr(\"stroke\", \"#000\").attr(\"stroke-width\", 1);\n const marketNodes = nodeEnter.filter((node) => node.sourceStrategy === \"market\");\n marketNodes.append(\"circle\").attr(\"class\", \"wardley-market-overlay\").attr(\"cx\", (node) => positions.get(node.id).x).attr(\"cy\", (node) => positions.get(node.id).y).attr(\"r\", configValues.nodeRadius * 2).attr(\"fill\", \"white\").attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 1);\n nodeEnter.filter(\n (node) => !node.isPipelineParent && node.sourceStrategy !== \"market\" && node.className !== \"anchor\"\n ).append(\"circle\").attr(\"cx\", (node) => positions.get(node.id).x).attr(\"cy\", (node) => positions.get(node.id).y).attr(\"r\", configValues.nodeRadius).attr(\"fill\", theme.componentFill).attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 1);\n const smallCircleRadius = configValues.nodeRadius * 0.7;\n const triangleRadius = configValues.nodeRadius * 1.2;\n marketNodes.append(\"line\").attr(\"class\", \"wardley-market-line\").attr(\"x1\", (node) => positions.get(node.id).x).attr(\"y1\", (node) => positions.get(node.id).y - triangleRadius).attr(\"x2\", (node) => positions.get(node.id).x - triangleRadius * Math.cos(Math.PI / 6)).attr(\"y2\", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 1);\n marketNodes.append(\"line\").attr(\"class\", \"wardley-market-line\").attr(\"x1\", (node) => positions.get(node.id).x - triangleRadius * Math.cos(Math.PI / 6)).attr(\"y1\", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr(\"x2\", (node) => positions.get(node.id).x + triangleRadius * Math.cos(Math.PI / 6)).attr(\"y2\", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 1);\n marketNodes.append(\"line\").attr(\"class\", \"wardley-market-line\").attr(\"x1\", (node) => positions.get(node.id).x + triangleRadius * Math.cos(Math.PI / 6)).attr(\"y1\", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr(\"x2\", (node) => positions.get(node.id).x).attr(\"y2\", (node) => positions.get(node.id).y - triangleRadius).attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 1);\n marketNodes.append(\"circle\").attr(\"class\", \"wardley-market-dot\").attr(\"cx\", (node) => positions.get(node.id).x).attr(\"cy\", (node) => positions.get(node.id).y - triangleRadius).attr(\"r\", smallCircleRadius).attr(\"fill\", \"white\").attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 2);\n marketNodes.append(\"circle\").attr(\"class\", \"wardley-market-dot\").attr(\"cx\", (node) => positions.get(node.id).x - triangleRadius * Math.cos(Math.PI / 6)).attr(\"cy\", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr(\"r\", smallCircleRadius).attr(\"fill\", \"white\").attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 2);\n marketNodes.append(\"circle\").attr(\"class\", \"wardley-market-dot\").attr(\"cx\", (node) => positions.get(node.id).x + triangleRadius * Math.cos(Math.PI / 6)).attr(\"cy\", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr(\"r\", smallCircleRadius).attr(\"fill\", \"white\").attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 2);\n nodeEnter.filter((node) => node.isPipelineParent === true).append(\"rect\").attr(\"x\", (node) => positions.get(node.id).x - squareSize / 2).attr(\"y\", (node) => positions.get(node.id).y - squareSize / 2).attr(\"width\", squareSize).attr(\"height\", squareSize).attr(\"fill\", theme.componentFill).attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 1);\n nodeEnter.filter((node) => node.inertia === true).append(\"line\").attr(\"class\", \"wardley-inertia\").attr(\"x1\", (node) => {\n const pos = positions.get(node.id);\n let offset = node.isPipelineParent ? squareSize / 2 + 15 : configValues.nodeRadius + 15;\n if (node.sourceStrategy) {\n offset += configValues.nodeRadius + 10;\n }\n return pos.x + offset;\n }).attr(\"y1\", (node) => {\n const pos = positions.get(node.id);\n const lineHeight = node.isPipelineParent ? squareSize : configValues.nodeRadius * 2;\n return pos.y - lineHeight / 2;\n }).attr(\"x2\", (node) => {\n const pos = positions.get(node.id);\n let offset = node.isPipelineParent ? squareSize / 2 + 15 : configValues.nodeRadius + 15;\n if (node.sourceStrategy) {\n offset += configValues.nodeRadius + 10;\n }\n return pos.x + offset;\n }).attr(\"y2\", (node) => {\n const pos = positions.get(node.id);\n const lineHeight = node.isPipelineParent ? squareSize : configValues.nodeRadius * 2;\n return pos.y + lineHeight / 2;\n }).attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 6);\n nodeEnter.append(\"text\").attr(\"x\", (node) => {\n const pos = positions.get(node.id);\n if (node.className === \"anchor\") {\n return node.labelOffsetX !== void 0 ? pos.x + node.labelOffsetX : pos.x;\n }\n let defaultOffset = configValues.nodeLabelOffset;\n if (node.sourceStrategy && node.labelOffsetX === void 0) {\n defaultOffset += 10;\n }\n const customOffset = node.labelOffsetX ?? defaultOffset;\n return pos.x + customOffset;\n }).attr(\"y\", (node) => {\n const pos = positions.get(node.id);\n if (node.className === \"anchor\") {\n return node.labelOffsetY !== void 0 ? pos.y + node.labelOffsetY : pos.y - 3;\n }\n let defaultOffset = -configValues.nodeLabelOffset;\n if (node.sourceStrategy && node.labelOffsetY === void 0) {\n defaultOffset -= 10;\n }\n const customOffset = node.labelOffsetY ?? defaultOffset;\n return pos.y + customOffset;\n }).attr(\"class\", \"wardley-node-label\").attr(\"fill\", (node) => {\n if (node.className === \"evolved\") {\n return theme.evolutionStroke;\n }\n if (node.className === \"anchor\") {\n return \"#000\";\n }\n return theme.componentLabelColor;\n }).attr(\"font-size\", configValues.labelFontSize).attr(\"font-weight\", (node) => node.className === \"anchor\" ? \"bold\" : \"normal\").attr(\"text-anchor\", (node) => node.className === \"anchor\" ? \"middle\" : \"start\").attr(\"dominant-baseline\", (node) => node.className === \"anchor\" ? \"middle\" : \"auto\").text((node) => node.label);\n if (data.annotations.length > 0) {\n const annotationsGroup = root.append(\"g\").attr(\"class\", \"wardley-annotations\");\n data.annotations.forEach((annotation) => {\n const projectedCoords = annotation.coordinates.map((coord) => ({\n x: projectX(coord.x),\n y: projectY(coord.y)\n }));\n if (projectedCoords.length > 1) {\n for (let i = 0; i < projectedCoords.length - 1; i++) {\n annotationsGroup.append(\"line\").attr(\"class\", \"wardley-annotation-line\").attr(\"x1\", projectedCoords[i].x).attr(\"y1\", projectedCoords[i].y).attr(\"x2\", projectedCoords[i + 1].x).attr(\"y2\", projectedCoords[i + 1].y).attr(\"stroke\", theme.axisColor).attr(\"stroke-width\", 1.5).attr(\"stroke-dasharray\", \"4 4\");\n }\n }\n projectedCoords.forEach((coord) => {\n const annotationNode = annotationsGroup.append(\"g\").attr(\"class\", \"wardley-annotation\");\n annotationNode.append(\"circle\").attr(\"cx\", coord.x).attr(\"cy\", coord.y).attr(\"r\", 10).attr(\"fill\", \"white\").attr(\"stroke\", theme.axisColor).attr(\"stroke-width\", 1.5);\n annotationNode.append(\"text\").attr(\"x\", coord.x).attr(\"y\", coord.y).attr(\"text-anchor\", \"middle\").attr(\"dominant-baseline\", \"central\").attr(\"font-size\", 10).attr(\"fill\", theme.axisTextColor).attr(\"font-weight\", \"bold\").text(annotation.number);\n });\n });\n if (data.annotationsBox) {\n let boxX = projectX(data.annotationsBox.x);\n let boxY = projectY(data.annotationsBox.y);\n const padding = 10;\n const lineHeight = 16;\n const fontSize = 11;\n const textBoxGroup = annotationsGroup.append(\"g\").attr(\"class\", \"wardley-annotations-box\");\n const sortedAnnotations = [...data.annotations].filter((a) => a.text).sort((a, b) => a.number - b.number);\n const textElements = [];\n sortedAnnotations.forEach((annotation, idx) => {\n const text2 = textBoxGroup.append(\"text\").attr(\"x\", boxX + padding).attr(\"y\", boxY + padding + (idx + 1) * lineHeight).attr(\"font-size\", fontSize).attr(\"fill\", theme.axisTextColor).attr(\"text-anchor\", \"start\").attr(\"dominant-baseline\", \"middle\").text(`${annotation.number}. ${annotation.text}`);\n textElements.push(text2);\n });\n if (textElements.length > 0) {\n let maxWidth = 0;\n let maxHeight = 0;\n textElements.forEach((text2) => {\n const textNode = text2.node();\n const textWidth = textNode.getComputedTextLength();\n maxWidth = Math.max(maxWidth, textWidth);\n const bbox = textNode.getBBox();\n maxHeight = Math.max(maxHeight, bbox.height);\n });\n const boxWidth = maxWidth + padding * 2 + 105;\n const boxHeight = sortedAnnotations.length * lineHeight + padding * 2 + maxHeight / 2;\n const minX = configValues.padding;\n const maxX = width - configValues.padding - boxWidth;\n const minY = configValues.padding;\n const maxY = height - configValues.padding - boxHeight;\n boxX = Math.max(minX, Math.min(boxX, maxX));\n boxY = Math.max(minY, Math.min(boxY, maxY));\n textElements.forEach((text2, idx) => {\n text2.attr(\"x\", boxX + padding).attr(\"y\", boxY + padding + (idx + 1) * lineHeight);\n });\n textBoxGroup.insert(\"rect\", \"text\").attr(\"x\", boxX).attr(\"y\", boxY).attr(\"width\", boxWidth).attr(\"height\", boxHeight).attr(\"fill\", \"white\").attr(\"stroke\", theme.axisColor).attr(\"stroke-width\", 1.5).attr(\"rx\", 4).attr(\"ry\", 4);\n }\n }\n }\n if (data.notes.length > 0) {\n const notesGroup = root.append(\"g\").attr(\"class\", \"wardley-notes\");\n data.notes.forEach((note) => {\n const noteX = projectX(note.x);\n const noteY = projectY(note.y);\n notesGroup.append(\"text\").attr(\"x\", noteX).attr(\"y\", noteY).attr(\"text-anchor\", \"start\").attr(\"font-size\", 11).attr(\"fill\", theme.axisTextColor).attr(\"font-weight\", \"bold\").text(note.text);\n });\n }\n if (data.accelerators.length > 0) {\n const acceleratorsGroup = root.append(\"g\").attr(\"class\", \"wardley-accelerators\");\n data.accelerators.forEach((accelerator) => {\n const accX = projectX(accelerator.x);\n const accY = projectY(accelerator.y);\n const arrowWidth = 60;\n const arrowHeight = 30;\n const arrowHeadWidth = 20;\n const arrowPath = `\n M ${accX} ${accY - arrowHeight / 2}\n L ${accX + arrowWidth - arrowHeadWidth} ${accY - arrowHeight / 2}\n L ${accX + arrowWidth - arrowHeadWidth} ${accY - arrowHeight / 2 - 8}\n L ${accX + arrowWidth} ${accY}\n L ${accX + arrowWidth - arrowHeadWidth} ${accY + arrowHeight / 2 + 8}\n L ${accX + arrowWidth - arrowHeadWidth} ${accY + arrowHeight / 2}\n L ${accX} ${accY + arrowHeight / 2}\n Z\n `;\n acceleratorsGroup.append(\"path\").attr(\"d\", arrowPath).attr(\"fill\", \"white\").attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 1);\n acceleratorsGroup.append(\"text\").attr(\"x\", accX + arrowWidth / 2).attr(\"y\", accY + arrowHeight / 2 + 15).attr(\"text-anchor\", \"middle\").attr(\"font-size\", 10).attr(\"fill\", theme.axisTextColor).attr(\"font-weight\", \"bold\").text(accelerator.name);\n });\n }\n if (data.deaccelerators.length > 0) {\n const deacceleratorsGroup = root.append(\"g\").attr(\"class\", \"wardley-deaccelerators\");\n data.deaccelerators.forEach((deaccelerator) => {\n const decX = projectX(deaccelerator.x);\n const decY = projectY(deaccelerator.y);\n const arrowWidth = 60;\n const arrowHeight = 30;\n const arrowHeadWidth = 20;\n const arrowPath = `\n M ${decX + arrowWidth} ${decY - arrowHeight / 2}\n L ${decX + arrowHeadWidth} ${decY - arrowHeight / 2}\n L ${decX + arrowHeadWidth} ${decY - arrowHeight / 2 - 8}\n L ${decX} ${decY}\n L ${decX + arrowHeadWidth} ${decY + arrowHeight / 2 + 8}\n L ${decX + arrowHeadWidth} ${decY + arrowHeight / 2}\n L ${decX + arrowWidth} ${decY + arrowHeight / 2}\n Z\n `;\n deacceleratorsGroup.append(\"path\").attr(\"d\", arrowPath).attr(\"fill\", \"white\").attr(\"stroke\", theme.componentStroke).attr(\"stroke-width\", 1);\n deacceleratorsGroup.append(\"text\").attr(\"x\", decX + arrowWidth / 2).attr(\"y\", decY + arrowHeight / 2 + 15).attr(\"text-anchor\", \"middle\").attr(\"font-size\", 10).attr(\"fill\", theme.axisTextColor).attr(\"font-weight\", \"bold\").text(deaccelerator.name);\n });\n }\n}, \"draw\");\nvar wardleyRenderer_default = {\n draw\n};\n\n// src/diagrams/wardley/styles.ts\nvar styles = /* @__PURE__ */ __name(({\n wardley\n} = {}) => {\n const defaultThemeVariables = getThemeVariables();\n const currentConfig = getConfig();\n const themeVariables = cleanAndMerge(defaultThemeVariables, currentConfig.themeVariables);\n const w = cleanAndMerge(themeVariables.wardley, wardley);\n return `\n .wardley-background {\n fill: ${w.backgroundColor};\n }\n .wardley-axes line, .wardley-axes path {\n stroke: ${w.axisColor};\n }\n .wardley-axis-label {\n fill: ${w.axisTextColor};\n }\n .wardley-stage-label {\n fill: ${w.axisTextColor};\n }\n .wardley-grid line {\n stroke: ${w.gridColor};\n }\n .wardley-node circle {\n fill: ${w.componentFill};\n stroke: ${w.componentStroke};\n }\n .wardley-node-label {\n fill: ${w.componentLabelColor};\n }\n .wardley-link {\n stroke: ${w.linkStroke};\n }\n .wardley-link--dashed {\n stroke-dasharray: 4 4;\n }\n .wardley-link-label {\n fill: ${w.axisTextColor};\n }\n .wardley-trend line {\n stroke: ${w.evolutionStroke};\n }\n .wardley-annotation-line {\n stroke: ${w.annotationStroke};\n }\n .wardley-annotation circle {\n fill: ${w.annotationFill};\n stroke: ${w.annotationStroke};\n }\n .wardley-annotation text {\n fill: ${w.annotationTextColor};\n }\n .wardley-annotations-box rect {\n fill: ${w.annotationFill};\n stroke: ${w.annotationStroke};\n }\n .wardley-annotations-box text {\n fill: ${w.annotationTextColor};\n }\n .wardley-pipeline-box {\n stroke: ${w.componentStroke};\n }\n .wardley-notes text {\n fill: ${w.axisTextColor};\n }\n `;\n}, \"styles\");\n\n// src/diagrams/wardley/wardleyDiagram.ts\nvar diagram = {\n parser,\n db: wardleyDb_default,\n renderer: wardleyRenderer_default,\n styles\n};\nexport {\n diagram\n};\n"],"x_google_ignoreList":[0],"mappings":"+VA6BA,IAAI,EAA4B,GAAQ,EAAO,IAAY,CACzD,IAAM,EAAa,GAAS,EAAI,EAAQ,IAAM,EAC9C,GAAI,EAAa,GAAK,EAAa,IACjC,MAAU,MACR,GAAG,EAAQ,kEAAkE,IAC9E,CAEH,OAAO,GACN,YAAY,CACX,EAAgC,GAAQ,EAAY,EAAW,KAC1D,CACL,EAAG,EAAU,EAAW,GAAG,EAAQ,YAAY,CAC/C,EAAG,EAAU,EAAY,GAAG,EAAQ,aAAa,CAClD,EACA,gBAAgB,CACf,EAAkC,EAAQ,GAAS,CAChD,KAGL,IAAI,IAAS,MACX,MAAO,gBAET,GAAI,IAAS,KACX,MAAO,WAET,GAAI,IAAS,KACX,MAAO,YAGR,kBAAkB,CACjB,EAAuC,EAAQ,GAAU,CAC3D,GAAI,CAAC,GAAO,WAAW,IAAI,CACzB,MAAO,EAAE,CAGX,IAAM,EADa,eAAe,KAAK,EACX,GAAG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