frizz-server 0.13.4 → 0.13.6

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 (94) hide show
  1. package/dist/claude-agent-broker.js +10152 -10057
  2. package/dist/dev-child.js +381 -67
  3. package/package.json +1 -1
  4. package/runtime/cc-worker/bin/frizz-mcp.mjs +131 -5
  5. package/runtime/cc-worker/skills/gh/SKILL.md +4 -2
  6. package/web-dist/assets/{TerminalPane-BA0mIiPN.js → TerminalPane-P7iAI_rU.js} +1 -1
  7. package/web-dist/assets/{abnfDiagram-VRR7QNED-C0d_GOgf.js → abnfDiagram-VRR7QNED-B0JxaKjB.js} +1 -1
  8. package/web-dist/assets/architecture-TIHT7OUA-ZNmKXuTL.js +1 -0
  9. package/web-dist/assets/{architectureDiagram-ZJ3FMSHR-CLDHAnqy.js → architectureDiagram-ZJ3FMSHR-E8bWaWhF.js} +1 -1
  10. package/web-dist/assets/{blockDiagram-677ZJIJ3-Byj82lPn.js → blockDiagram-677ZJIJ3-BNg7FcxS.js} +1 -1
  11. package/web-dist/assets/{c4Diagram-LMCZKHZV-BSiBmLxJ.js → c4Diagram-LMCZKHZV-BHkry-JG.js} +1 -1
  12. package/web-dist/assets/channel-CTEEc7oT.js +1 -0
  13. package/web-dist/assets/{chunk-32BRIVSS-DjJuumwL.js → chunk-32BRIVSS-BJLx0sIU.js} +1 -1
  14. package/web-dist/assets/{chunk-52WLFC77-7w-u-XrO.js → chunk-52WLFC77-DmMATfuh.js} +1 -1
  15. package/web-dist/assets/{chunk-C7G6YPKG-CrQOxr9R.js → chunk-C7G6YPKG-Ceg42lXA.js} +1 -1
  16. package/web-dist/assets/{chunk-EX3LRPZG-CyElaUyz.js → chunk-EX3LRPZG-CAx16zp2.js} +1 -1
  17. package/web-dist/assets/{chunk-FWX5IMBZ-uBs1pWz3.js → chunk-FWX5IMBZ-DWb22U8j.js} +2 -2
  18. package/web-dist/assets/{chunk-HOUHSVGY-D-0S_vPu.js → chunk-HOUHSVGY-bKZVUQyT.js} +1 -1
  19. package/web-dist/assets/{chunk-ICXQ74PX-BPZjHh6l.js → chunk-ICXQ74PX-C3i_eW5g.js} +1 -1
  20. package/web-dist/assets/{chunk-MOJQB5TN-DQ8X1g7u.js → chunk-MOJQB5TN-Bt6x6J8D.js} +1 -1
  21. package/web-dist/assets/{chunk-OGEWGWER-DwEl4tV6.js → chunk-OGEWGWER-BwJ73hmt.js} +1 -1
  22. package/web-dist/assets/{chunk-PUDLZKDR-w7FH7FgF.js → chunk-PUDLZKDR-DfcEHpjL.js} +1 -1
  23. package/web-dist/assets/{chunk-Q4XR5HBZ-DUF1qPxz.js → chunk-Q4XR5HBZ-VYeS43tP.js} +1 -1
  24. package/web-dist/assets/{chunk-V7JOEXUC-DQDZupnO.js → chunk-V7JOEXUC-Cs1_YKkF.js} +1 -1
  25. package/web-dist/assets/{chunk-VAUOI2AC-DcBMBNly.js → chunk-VAUOI2AC-CCOn0B9D.js} +1 -1
  26. package/web-dist/assets/{chunk-VR4S4FIN-DSR3Pq54.js → chunk-VR4S4FIN-CL_PLrUe.js} +1 -1
  27. package/web-dist/assets/{chunk-WYO6CB5R-DqmEM55p.js → chunk-WYO6CB5R-Dupt_rk_.js} +1 -1
  28. package/web-dist/assets/{chunk-ZGVPDNZ5-DiAOqAtq.js → chunk-ZGVPDNZ5-UwgE4khW.js} +1 -1
  29. package/web-dist/assets/classDiagram-OUVF2IWQ-D5na7mob.js +1 -0
  30. package/web-dist/assets/classDiagram-v2-EOCWNBFH-D5na7mob.js +1 -0
  31. package/web-dist/assets/{cynefin-VYW2F7L2-BOgXXJux.js → cynefin-VYW2F7L2-DGZJYJNa.js} +1 -1
  32. package/web-dist/assets/{cynefinDiagram-TSTJHNR4-D_cDNjb5.js → cynefinDiagram-TSTJHNR4-B34DgCmC.js} +1 -1
  33. package/web-dist/assets/{dagre-VKFMJZFB-COoeIysT.js → dagre-VKFMJZFB-C7HODJG3.js} +1 -1
  34. package/web-dist/assets/{diagram-FQU43EPY-DvObHRy5.js → diagram-FQU43EPY-CunP-lqf.js} +1 -1
  35. package/web-dist/assets/{diagram-G47NLZAW-CVsApdT5.js → diagram-G47NLZAW-C3O84bOk.js} +1 -1
  36. package/web-dist/assets/{diagram-NH7WQ7WH-B1R3H3FB.js → diagram-NH7WQ7WH-Dv0TR4Ic.js} +1 -1
  37. package/web-dist/assets/{diagram-OA4YK3LP-CLoRC7it.js → diagram-OA4YK3LP-CUvcZIxp.js} +1 -1
  38. package/web-dist/assets/{diagram-WEI45ONY-BNtWH_b0.js → diagram-WEI45ONY-CwPr97NN.js} +1 -1
  39. package/web-dist/assets/{ebnfDiagram-CCIWWBDH-BIHit-oa.js → ebnfDiagram-CCIWWBDH-Dq2O1mOC.js} +1 -1
  40. package/web-dist/assets/{erDiagram-Q63AITRT-CX3wj9wZ.js → erDiagram-Q63AITRT-C6dJ8Dpx.js} +1 -1
  41. package/web-dist/assets/eventmodeling-45OFAUF4-B8cYCwrU.js +1 -0
  42. package/web-dist/assets/flowDiagram-23GEKE2U-C-EWCSnf.js +1 -0
  43. package/web-dist/assets/{ganttDiagram-NO4QXBWP-ovukTiTD.js → ganttDiagram-NO4QXBWP-sa-TSsB5.js} +1 -1
  44. package/web-dist/assets/{gitGraph-TEB2WS4Q-C9E-9V1E.js → gitGraph-TEB2WS4Q-BdZIuH-o.js} +1 -1
  45. package/web-dist/assets/{gitGraphDiagram-IHSO6WYX-BtJWd26X.js → gitGraphDiagram-IHSO6WYX-C__OynR9.js} +1 -1
  46. package/web-dist/assets/{index-rU3F6wBN.js → index-CGrszN1x.js} +96 -96
  47. package/web-dist/assets/index-d_g5kIKJ.css +1 -0
  48. package/web-dist/assets/{info-DKCQHKI2-DGGMsp6D.js → info-DKCQHKI2-BEaDQqRu.js} +1 -1
  49. package/web-dist/assets/{infoDiagram-FWYZ7A6U-yVcULGK0.js → infoDiagram-FWYZ7A6U-RJlw-Bzq.js} +1 -1
  50. package/web-dist/assets/{ishikawaDiagram-FXEZZL3T-BXGbRvgE.js → ishikawaDiagram-FXEZZL3T-xop_QrWs.js} +1 -1
  51. package/web-dist/assets/{journeyDiagram-5HDEW3XC-KyPIkV6n.js → journeyDiagram-5HDEW3XC-O6nmpoje.js} +1 -1
  52. package/web-dist/assets/{kanban-definition-HUTT4EX6-7IRwylrK.js → kanban-definition-HUTT4EX6-IXwPs_L0.js} +1 -1
  53. package/web-dist/assets/{line-DHhaY6hP.js → line-BMRguCzE.js} +1 -1
  54. package/web-dist/assets/{mermaid-parser.core-D_zIUq4c.js → mermaid-parser.core-BCXFwFN1.js} +3 -3
  55. package/web-dist/assets/{mermaid.core-Cer3Sm6Y.js → mermaid.core-Cqq_9ya3.js} +3 -3
  56. package/web-dist/assets/{mindmap-definition-LN4V7U3C-Ds5w6J2p.js → mindmap-definition-LN4V7U3C-DEfWfnOg.js} +1 -1
  57. package/web-dist/assets/{packet-7NZHBO7P-BxQmF_wj.js → packet-7NZHBO7P-CQGAnngT.js} +1 -1
  58. package/web-dist/assets/{pegDiagram-2B236MQR-BgcChc4K.js → pegDiagram-2B236MQR-tOrSsHlA.js} +1 -1
  59. package/web-dist/assets/{pie-RZYD4A2V-7ckW3b8f.js → pie-RZYD4A2V-C0KP3XF8.js} +1 -1
  60. package/web-dist/assets/{pieDiagram-ENE6RG2P-dAKPXidr.js → pieDiagram-ENE6RG2P-FzmIWC1K.js} +1 -1
  61. package/web-dist/assets/{quadrantDiagram-ABIIQ3AL-BhIIvMD3.js → quadrantDiagram-ABIIQ3AL-N6zuxKqV.js} +1 -1
  62. package/web-dist/assets/{radar-I7S5WNFK-BjHZZeUT.js → radar-I7S5WNFK-CB3WQRMp.js} +1 -1
  63. package/web-dist/assets/{railroad-3IZDKUUU-DGLm30_k.js → railroad-3IZDKUUU-Ck8x0o2o.js} +1 -1
  64. package/web-dist/assets/railroad-abnf-AHOZXSZD-QzrMOCpt.js +1 -0
  65. package/web-dist/assets/railroad-ebnf-EBAXGLYW-CwEnUu4A.js +1 -0
  66. package/web-dist/assets/railroad-peg-LSFZ7HO6-BoDEbNAA.js +1 -0
  67. package/web-dist/assets/{railroadDiagram-RFXS5EU6-NDZ1o78x.js → railroadDiagram-RFXS5EU6-6TyF6de4.js} +1 -1
  68. package/web-dist/assets/{requirementDiagram-TGXJPOKE-ClwNJzK_.js → requirementDiagram-TGXJPOKE-D6n7xpc4.js} +1 -1
  69. package/web-dist/assets/{sankeyDiagram-HTMAVEWB-DUe4YqBe.js → sankeyDiagram-HTMAVEWB-B7R6Natf.js} +1 -1
  70. package/web-dist/assets/{sequenceDiagram-DBY2YBRQ-Co6LVrCi.js → sequenceDiagram-DBY2YBRQ-CFbbuWF6.js} +1 -1
  71. package/web-dist/assets/{stateDiagram-2N3HPSRC-SsEEX3n0.js → stateDiagram-2N3HPSRC-DwXu0kos.js} +1 -1
  72. package/web-dist/assets/stateDiagram-v2-6OUMAXLB-CQctakxF.js +1 -0
  73. package/web-dist/assets/{swimlanes-5IMT3BWC-CoVdeWtQ.js → swimlanes-5IMT3BWC-Clie2Qk3.js} +1 -1
  74. package/web-dist/assets/swimlanesDiagram-G3AALYLV-CGOfs7yz.js +8 -0
  75. package/web-dist/assets/{timeline-definition-FHXFAJF6-FWjCOjFe.js → timeline-definition-FHXFAJF6-DWDsPzuQ.js} +1 -1
  76. package/web-dist/assets/{treeView-QDETBFTQ-C5XuetRx.js → treeView-QDETBFTQ-Ddd-Wxpb.js} +1 -1
  77. package/web-dist/assets/{treemap-6X3UGDF4-DSYA_yZU.js → treemap-6X3UGDF4-CuZ3jD4K.js} +1 -1
  78. package/web-dist/assets/{vennDiagram-L72KCM5P-CBlj6q2E.js → vennDiagram-L72KCM5P-BoE4aTMb.js} +1 -1
  79. package/web-dist/assets/{wardley-OPB4EBWU-xRxS5w8C.js → wardley-OPB4EBWU-CfaztQL0.js} +1 -1
  80. package/web-dist/assets/{wardleyDiagram-EHGQE667-BOJNbJTn.js → wardleyDiagram-EHGQE667-pxcV16qp.js} +1 -1
  81. package/web-dist/assets/{xychartDiagram-FW5EYKEG-BH7s_eja.js → xychartDiagram-FW5EYKEG--d5N7oDL.js} +1 -1
  82. package/web-dist/index.html +2 -2
  83. package/web-dist/assets/architecture-TIHT7OUA-Dabq5ynP.js +0 -1
  84. package/web-dist/assets/channel-569Fbotp.js +0 -1
  85. package/web-dist/assets/classDiagram-OUVF2IWQ-DdJ4fu0T.js +0 -1
  86. package/web-dist/assets/classDiagram-v2-EOCWNBFH-DdJ4fu0T.js +0 -1
  87. package/web-dist/assets/eventmodeling-45OFAUF4-Bxh_9VAJ.js +0 -1
  88. package/web-dist/assets/flowDiagram-23GEKE2U-BVT2CoPd.js +0 -1
  89. package/web-dist/assets/index-PAxGNU-o.css +0 -1
  90. package/web-dist/assets/railroad-abnf-AHOZXSZD-ez6c0JVR.js +0 -1
  91. package/web-dist/assets/railroad-ebnf-EBAXGLYW-G_O_IjaE.js +0 -1
  92. package/web-dist/assets/railroad-peg-LSFZ7HO6-CDAvQbft.js +0 -1
  93. package/web-dist/assets/stateDiagram-v2-6OUMAXLB-BCCL236E.js +0 -1
  94. package/web-dist/assets/swimlanesDiagram-G3AALYLV-BXTLDQC2.js +0 -8
@@ -1 +1 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-C4XfhTaE.js";import{O as r,c as i,s as a,x as o}from"./chunk-WYO6CB5R-DqmEM55p.js";import{et as s,g as c}from"./chunk-ICXQ74PX-BPZjHh6l.js";import{t as l}from"./line-DHhaY6hP.js";import"./chunk-HOUHSVGY-D-0S_vPu.js";import"./chunk-Q4XR5HBZ-DUF1qPxz.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-DwEl4tV6.js";import{t as u}from"./graphlib-B8gBHxth.js";import{t as d}from"./dagre-CXRCoUWR.js";import"./chunk-32BRIVSS-DjJuumwL.js";import"./chunk-XXDRQBXY-DYlTP5J-.js";import"./chunk-VR4S4FIN-DSR3Pq54.js";import"./chunk-C7G6YPKG-CrQOxr9R.js";import"./chunk-ZGVPDNZ5-DiAOqAtq.js";import"./chunk-52WLFC77-7w-u-XrO.js";import"./chunk-FWX5IMBZ-uBs1pWz3.js";import{i as f,n as p,t as m}from"./chunk-EX3LRPZG-CyElaUyz.js";var h=e(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit).attr(`cy`,o().state.padding+o().state.sizeUnit),`drawStartState`),g=e(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,o().state.textHeight).attr(`class`,`divider`).attr(`x2`,o().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),_=e((e,t)=>{let n=e.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+2*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,r.width+2*o().state.padding).attr(`height`,r.height+2*o().state.padding).attr(`rx`,o().state.radius),n},`drawSimpleState`),v=e((t,n)=>{let r=e(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*o().state.padding).text(t);n||r.attr(`dy`,o().state.textHeight)},`addTspan`),i=t.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+1.3*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(n.descriptions[0]).node().getBBox(),a=i.height,s=t.append(`text`).attr(`x`,o().state.padding).attr(`y`,a+o().state.padding*.4+o().state.dividerMargin+o().state.textHeight).attr(`class`,`state-description`),c=!0,l=!0;n.descriptions.forEach(function(e){c||(r(s,e,l),l=!1),c=!1});let u=t.append(`line`).attr(`x1`,o().state.padding).attr(`y1`,o().state.padding+a+o().state.dividerMargin/2).attr(`y2`,o().state.padding+a+o().state.dividerMargin/2).attr(`class`,`descr-divider`),d=s.node().getBBox(),f=Math.max(d.width,i.width);return u.attr(`x2`,f+3*o().state.padding),t.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,f+2*o().state.padding).attr(`height`,d.height+a+2*o().state.padding).attr(`rx`,o().state.radius),t},`drawDescrState`),y=e((e,t,n)=>{let r=o().state.padding,i=2*o().state.padding,a=e.node().getBBox(),s=a.width,c=a.x,l=e.append(`text`).attr(`x`,0).attr(`y`,o().state.titleShift).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+i,d=Math.max(u,s);d===s&&(d+=i);let f,p=e.node().getBBox();t.doc,f=c-r,u>s&&(f=(s-d)/2+r),Math.abs(c-p.x)<r&&u>s&&(f=c-(u-s)/2);let m=1-o().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+o().state.textHeight+o().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=s&&l.attr(`x`,c+(d-i)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,o().state.textHeight*3).attr(`rx`,o().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*o().state.textHeight).attr(`rx`,o().state.radius),e},`addTitleAndBox`),b=e(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,o().state.sizeUnit+o().state.miniPadding).attr(`cx`,o().state.padding+o().state.sizeUnit+o().state.miniPadding).attr(`cy`,o().state.padding+o().state.sizeUnit+o().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit+2).attr(`cy`,o().state.padding+o().state.sizeUnit+2)),`drawEndState`),x=e((e,t)=>{let n=o().state.forkWidth,r=o().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,o().state.padding).attr(`y`,o().state.padding)},`drawForkJoinState`),S=e((e,t,n,r)=>{let i=0,s=r.append(`text`);s.style(`text-anchor`,`start`),s.attr(`class`,`noteText`);let c=e.replace(/\r\n/g,`<br/>`);c=c.replace(/\n/g,`<br/>`);let l=c.split(a.lineBreakRegex),u=1.25*o().state.noteMargin;for(let e of l){let r=e.trim();if(r.length>0){let e=s.append(`tspan`);if(e.text(r),u===0){let t=e.node().getBBox();u+=t.height}i+=u,e.attr(`x`,t+o().state.noteMargin),e.attr(`y`,n+i+1.25*o().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:i}},`_drawLongText`),C=e((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,o().state.padding),{textWidth:r,textHeight:i}=S(e,0,0,t.append(`g`));return n.attr(`height`,i+2*o().state.noteMargin),n.attr(`width`,r+o().state.noteMargin*2),n},`drawNote`),w=e(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},i=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&h(i),t.type===`end`&&b(i),(t.type===`fork`||t.type===`join`)&&x(i,t),t.type===`note`&&C(t.note.text,i),t.type===`divider`&&g(i),t.type==="default"&&t.descriptions.length===0&&_(i,t),t.type==="default"&&t.descriptions.length>0&&v(i,t);let a=i.node().getBBox();return r.width=a.width+2*o().state.padding,r.height=a.height+2*o().state.padding,r},`drawState`),T=0,E=e(function(n,i,u){let d=e(function(e){switch(e){case m.relationType.AGGREGATION:return`aggregation`;case m.relationType.EXTENSION:return`extension`;case m.relationType.COMPOSITION:return`composition`;case m.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);i.points=i.points.filter(e=>!Number.isNaN(e.y));let f=i.points,p=l().x(function(e){return e.x}).y(function(e){return e.y}).curve(s),h=n.append(`path`).attr(`d`,p(f)).attr(`id`,`edge`+T).attr(`class`,`transition`),g=``;if(o().state.arrowMarkerAbsolute&&(g=r(!0)),h.attr(`marker-end`,`url(`+g+`#`+d(m.relationType.DEPENDENCY)+`End)`),u.title!==void 0){let e=n.append(`g`).attr(`class`,`stateLabel`),{x:r,y:s}=c.calcLabelPosition(i.points),l=a.getRows(u.title),d=0,f=[],p=0,m=0;for(let n=0;n<=l.length;n++){let i=e.append(`text`).attr(`text-anchor`,`middle`).text(l[n]).attr(`x`,r).attr(`y`,s+d),a=i.node().getBBox();p=Math.max(p,a.width),m=Math.min(m,a.x),t.info(a.x,r,s+d),d===0&&(d=i.node().getBBox().height,t.info(`Title height`,d,s)),f.push(i)}let h=d*l.length;if(l.length>1){let e=(l.length-1)*d*.5;f.forEach((t,n)=>t.attr(`y`,s+n*d-e)),h=d*l.length}let g=e.node().getBBox();e.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,r-p/2-o().state.padding/2).attr(`y`,s-h/2-o().state.padding/2-3.5).attr(`width`,p+o().state.padding).attr(`height`,h+o().state.padding),t.info(g)}T++},`drawEdge`),D,O={},k=e(function(){},`setConf`),A=e(function(e){e.append(`defs`).append(`marker`).attr(`id`,`dependencyEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`insertMarkers`),j=e(function(e,r,a,s){D=o().state;let c=o().securityLevel,l;c===`sandbox`&&(l=n(`#i`+r));let u=n(c===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=c===`sandbox`?l.nodes()[0].contentDocument:document;t.debug(`Rendering diagram `+e);let f=u.select(`[id='${r}']`);A(f),N(s.db.getRootDoc(),f.append(`g`).attr(`id`,r+`-root`),void 0,!1,u,d,s);let p=D.padding,m=f.node().getBBox(),h=m.width+p*2,g=m.height+p*2;i(f,g,h*1.75,D.useMaxWidth),f.attr(`viewBox`,`${m.x-D.padding} ${m.y-D.padding} `+h+` `+g)},`draw`),M=e(e=>e?e.length*D.fontSizeFactor:1,`getLabelWidth`),N=e((e,n,r,i,o,s,c)=>{let l=new u({compound:!0,multigraph:!0}),f,p=!0;for(f=0;f<e.length;f++)if(e[f].stmt===`relation`){p=!1;break}r?l.setGraph({rankdir:`LR`,multigraph:!0,compound:!0,ranker:`tight-tree`,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,isMultiGraph:!0}):l.setGraph({rankdir:`TB`,multigraph:!0,compound:!0,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,ranker:`tight-tree`,isMultiGraph:!0}),l.setDefaultEdgeLabel(function(){return{}});let m=c.db.getStates(),h=c.db.getRelations(),g=Object.keys(m);for(let e of g){let t=m[e];r&&(t.parentId=r);let a;if(t.doc){let e=n.append(`g`).attr(`id`,t.id).attr(`class`,`stateGroup`);a=N(t.doc,e,t.id,!i,o,s,c);{e=y(e,t,i);let n=e.node().getBBox();a.width=n.width,a.height=n.height+D.padding/2,O[t.id]={y:D.compositTitleSize}}}else a=w(n,t,l);if(t.note){let e=w(n,{descriptions:[],id:t.id+`-note`,note:t.note,type:`note`},l);t.note.position===`left of`?(l.setNode(a.id+`-note`,e),l.setNode(a.id,a)):(l.setNode(a.id,a),l.setNode(a.id+`-note`,e)),l.setParent(a.id,a.id+`-group`),l.setParent(a.id+`-note`,a.id+`-group`)}else l.setNode(a.id,a)}t.debug(`Count=`,l.nodeCount(),l);let _=0;h.forEach(function(e){_++,t.debug(`Setting edge`,e),l.setEdge(e.id1,e.id2,{relation:e,width:M(e.title),height:D.labelHeight*a.getRows(e.title).length,labelpos:`c`},`id`+_)}),d(l),t.debug(`Graph after layout`,l.nodes());let v=n.node();l.nodes().forEach(function(e){e!==void 0&&l.node(e)!==void 0?(t.warn(`Node `+e+`: `+JSON.stringify(l.node(e))),o.select(`#`+v.id+` #`+e).attr(`transform`,`translate(`+(l.node(e).x-l.node(e).width/2)+`,`+(l.node(e).y+(O[e]?O[e].y:0)-l.node(e).height/2)+` )`),o.select(`#`+v.id+` #`+e).attr(`data-x-shift`,l.node(e).x-l.node(e).width/2),s.querySelectorAll(`#`+v.id+` #`+e+` .divider`).forEach(e=>{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):t.debug(`No Node `+e+`: `+JSON.stringify(l.node(e)))});let b=v.getBBox();l.edges().forEach(function(e){e!==void 0&&l.edge(e)!==void 0&&(t.debug(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(l.edge(e))),E(n,l.edge(e),l.edge(e).relation))}),b=v.getBBox();let x={id:r||`root`,label:r||`root`,width:0,height:0};return x.width=b.width+2*D.padding,x.height=b.height+2*D.padding,t.debug(`Doc rendered`,x,l),x},`renderDoc`),P={parser:p,get db(){return new m(1)},renderer:{setConf:k,draw:j},styles:f,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{P as diagram};
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-C4XfhTaE.js";import{O as r,c as i,s as a,x as o}from"./chunk-WYO6CB5R-Dupt_rk_.js";import{et as s,g as c}from"./chunk-ICXQ74PX-C3i_eW5g.js";import{t as l}from"./line-BMRguCzE.js";import"./chunk-HOUHSVGY-bKZVUQyT.js";import"./chunk-Q4XR5HBZ-VYeS43tP.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-BwJ73hmt.js";import{t as u}from"./graphlib-B8gBHxth.js";import{t as d}from"./dagre-CXRCoUWR.js";import"./chunk-32BRIVSS-BJLx0sIU.js";import"./chunk-XXDRQBXY-DYlTP5J-.js";import"./chunk-VR4S4FIN-CL_PLrUe.js";import"./chunk-C7G6YPKG-Ceg42lXA.js";import"./chunk-ZGVPDNZ5-UwgE4khW.js";import"./chunk-52WLFC77-DmMATfuh.js";import"./chunk-FWX5IMBZ-DWb22U8j.js";import{i as f,n as p,t as m}from"./chunk-EX3LRPZG-CAx16zp2.js";var h=e(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit).attr(`cy`,o().state.padding+o().state.sizeUnit),`drawStartState`),g=e(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,o().state.textHeight).attr(`class`,`divider`).attr(`x2`,o().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),_=e((e,t)=>{let n=e.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+2*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,r.width+2*o().state.padding).attr(`height`,r.height+2*o().state.padding).attr(`rx`,o().state.radius),n},`drawSimpleState`),v=e((t,n)=>{let r=e(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*o().state.padding).text(t);n||r.attr(`dy`,o().state.textHeight)},`addTspan`),i=t.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+1.3*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(n.descriptions[0]).node().getBBox(),a=i.height,s=t.append(`text`).attr(`x`,o().state.padding).attr(`y`,a+o().state.padding*.4+o().state.dividerMargin+o().state.textHeight).attr(`class`,`state-description`),c=!0,l=!0;n.descriptions.forEach(function(e){c||(r(s,e,l),l=!1),c=!1});let u=t.append(`line`).attr(`x1`,o().state.padding).attr(`y1`,o().state.padding+a+o().state.dividerMargin/2).attr(`y2`,o().state.padding+a+o().state.dividerMargin/2).attr(`class`,`descr-divider`),d=s.node().getBBox(),f=Math.max(d.width,i.width);return u.attr(`x2`,f+3*o().state.padding),t.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,f+2*o().state.padding).attr(`height`,d.height+a+2*o().state.padding).attr(`rx`,o().state.radius),t},`drawDescrState`),y=e((e,t,n)=>{let r=o().state.padding,i=2*o().state.padding,a=e.node().getBBox(),s=a.width,c=a.x,l=e.append(`text`).attr(`x`,0).attr(`y`,o().state.titleShift).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+i,d=Math.max(u,s);d===s&&(d+=i);let f,p=e.node().getBBox();t.doc,f=c-r,u>s&&(f=(s-d)/2+r),Math.abs(c-p.x)<r&&u>s&&(f=c-(u-s)/2);let m=1-o().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+o().state.textHeight+o().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=s&&l.attr(`x`,c+(d-i)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,o().state.textHeight*3).attr(`rx`,o().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*o().state.textHeight).attr(`rx`,o().state.radius),e},`addTitleAndBox`),b=e(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,o().state.sizeUnit+o().state.miniPadding).attr(`cx`,o().state.padding+o().state.sizeUnit+o().state.miniPadding).attr(`cy`,o().state.padding+o().state.sizeUnit+o().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit+2).attr(`cy`,o().state.padding+o().state.sizeUnit+2)),`drawEndState`),x=e((e,t)=>{let n=o().state.forkWidth,r=o().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,o().state.padding).attr(`y`,o().state.padding)},`drawForkJoinState`),S=e((e,t,n,r)=>{let i=0,s=r.append(`text`);s.style(`text-anchor`,`start`),s.attr(`class`,`noteText`);let c=e.replace(/\r\n/g,`<br/>`);c=c.replace(/\n/g,`<br/>`);let l=c.split(a.lineBreakRegex),u=1.25*o().state.noteMargin;for(let e of l){let r=e.trim();if(r.length>0){let e=s.append(`tspan`);if(e.text(r),u===0){let t=e.node().getBBox();u+=t.height}i+=u,e.attr(`x`,t+o().state.noteMargin),e.attr(`y`,n+i+1.25*o().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:i}},`_drawLongText`),C=e((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,o().state.padding),{textWidth:r,textHeight:i}=S(e,0,0,t.append(`g`));return n.attr(`height`,i+2*o().state.noteMargin),n.attr(`width`,r+o().state.noteMargin*2),n},`drawNote`),w=e(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},i=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&h(i),t.type===`end`&&b(i),(t.type===`fork`||t.type===`join`)&&x(i,t),t.type===`note`&&C(t.note.text,i),t.type===`divider`&&g(i),t.type==="default"&&t.descriptions.length===0&&_(i,t),t.type==="default"&&t.descriptions.length>0&&v(i,t);let a=i.node().getBBox();return r.width=a.width+2*o().state.padding,r.height=a.height+2*o().state.padding,r},`drawState`),T=0,E=e(function(n,i,u){let d=e(function(e){switch(e){case m.relationType.AGGREGATION:return`aggregation`;case m.relationType.EXTENSION:return`extension`;case m.relationType.COMPOSITION:return`composition`;case m.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);i.points=i.points.filter(e=>!Number.isNaN(e.y));let f=i.points,p=l().x(function(e){return e.x}).y(function(e){return e.y}).curve(s),h=n.append(`path`).attr(`d`,p(f)).attr(`id`,`edge`+T).attr(`class`,`transition`),g=``;if(o().state.arrowMarkerAbsolute&&(g=r(!0)),h.attr(`marker-end`,`url(`+g+`#`+d(m.relationType.DEPENDENCY)+`End)`),u.title!==void 0){let e=n.append(`g`).attr(`class`,`stateLabel`),{x:r,y:s}=c.calcLabelPosition(i.points),l=a.getRows(u.title),d=0,f=[],p=0,m=0;for(let n=0;n<=l.length;n++){let i=e.append(`text`).attr(`text-anchor`,`middle`).text(l[n]).attr(`x`,r).attr(`y`,s+d),a=i.node().getBBox();p=Math.max(p,a.width),m=Math.min(m,a.x),t.info(a.x,r,s+d),d===0&&(d=i.node().getBBox().height,t.info(`Title height`,d,s)),f.push(i)}let h=d*l.length;if(l.length>1){let e=(l.length-1)*d*.5;f.forEach((t,n)=>t.attr(`y`,s+n*d-e)),h=d*l.length}let g=e.node().getBBox();e.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,r-p/2-o().state.padding/2).attr(`y`,s-h/2-o().state.padding/2-3.5).attr(`width`,p+o().state.padding).attr(`height`,h+o().state.padding),t.info(g)}T++},`drawEdge`),D,O={},k=e(function(){},`setConf`),A=e(function(e){e.append(`defs`).append(`marker`).attr(`id`,`dependencyEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`insertMarkers`),j=e(function(e,r,a,s){D=o().state;let c=o().securityLevel,l;c===`sandbox`&&(l=n(`#i`+r));let u=n(c===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=c===`sandbox`?l.nodes()[0].contentDocument:document;t.debug(`Rendering diagram `+e);let f=u.select(`[id='${r}']`);A(f),N(s.db.getRootDoc(),f.append(`g`).attr(`id`,r+`-root`),void 0,!1,u,d,s);let p=D.padding,m=f.node().getBBox(),h=m.width+p*2,g=m.height+p*2;i(f,g,h*1.75,D.useMaxWidth),f.attr(`viewBox`,`${m.x-D.padding} ${m.y-D.padding} `+h+` `+g)},`draw`),M=e(e=>e?e.length*D.fontSizeFactor:1,`getLabelWidth`),N=e((e,n,r,i,o,s,c)=>{let l=new u({compound:!0,multigraph:!0}),f,p=!0;for(f=0;f<e.length;f++)if(e[f].stmt===`relation`){p=!1;break}r?l.setGraph({rankdir:`LR`,multigraph:!0,compound:!0,ranker:`tight-tree`,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,isMultiGraph:!0}):l.setGraph({rankdir:`TB`,multigraph:!0,compound:!0,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,ranker:`tight-tree`,isMultiGraph:!0}),l.setDefaultEdgeLabel(function(){return{}});let m=c.db.getStates(),h=c.db.getRelations(),g=Object.keys(m);for(let e of g){let t=m[e];r&&(t.parentId=r);let a;if(t.doc){let e=n.append(`g`).attr(`id`,t.id).attr(`class`,`stateGroup`);a=N(t.doc,e,t.id,!i,o,s,c);{e=y(e,t,i);let n=e.node().getBBox();a.width=n.width,a.height=n.height+D.padding/2,O[t.id]={y:D.compositTitleSize}}}else a=w(n,t,l);if(t.note){let e=w(n,{descriptions:[],id:t.id+`-note`,note:t.note,type:`note`},l);t.note.position===`left of`?(l.setNode(a.id+`-note`,e),l.setNode(a.id,a)):(l.setNode(a.id,a),l.setNode(a.id+`-note`,e)),l.setParent(a.id,a.id+`-group`),l.setParent(a.id+`-note`,a.id+`-group`)}else l.setNode(a.id,a)}t.debug(`Count=`,l.nodeCount(),l);let _=0;h.forEach(function(e){_++,t.debug(`Setting edge`,e),l.setEdge(e.id1,e.id2,{relation:e,width:M(e.title),height:D.labelHeight*a.getRows(e.title).length,labelpos:`c`},`id`+_)}),d(l),t.debug(`Graph after layout`,l.nodes());let v=n.node();l.nodes().forEach(function(e){e!==void 0&&l.node(e)!==void 0?(t.warn(`Node `+e+`: `+JSON.stringify(l.node(e))),o.select(`#`+v.id+` #`+e).attr(`transform`,`translate(`+(l.node(e).x-l.node(e).width/2)+`,`+(l.node(e).y+(O[e]?O[e].y:0)-l.node(e).height/2)+` )`),o.select(`#`+v.id+` #`+e).attr(`data-x-shift`,l.node(e).x-l.node(e).width/2),s.querySelectorAll(`#`+v.id+` #`+e+` .divider`).forEach(e=>{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):t.debug(`No Node `+e+`: `+JSON.stringify(l.node(e)))});let b=v.getBBox();l.edges().forEach(function(e){e!==void 0&&l.edge(e)!==void 0&&(t.debug(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(l.edge(e))),E(n,l.edge(e),l.edge(e).relation))}),b=v.getBBox();let x={id:r||`root`,label:r||`root`,width:0,height:0};return x.width=b.width+2*D.padding,x.height=b.height+2*D.padding,t.debug(`Doc rendered`,x,l),x},`renderDoc`),P={parser:p,get db(){return new m(1)},renderer:{setConf:k,draw:j},styles:f,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{P as diagram};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-C4XfhTaE.js";import"./chunk-WYO6CB5R-Dupt_rk_.js";import"./chunk-ICXQ74PX-C3i_eW5g.js";import"./chunk-HOUHSVGY-bKZVUQyT.js";import"./chunk-Q4XR5HBZ-VYeS43tP.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-BwJ73hmt.js";import"./chunk-32BRIVSS-BJLx0sIU.js";import"./chunk-XXDRQBXY-DYlTP5J-.js";import"./chunk-VR4S4FIN-CL_PLrUe.js";import"./chunk-C7G6YPKG-Ceg42lXA.js";import"./chunk-ZGVPDNZ5-UwgE4khW.js";import"./chunk-52WLFC77-DmMATfuh.js";import"./chunk-FWX5IMBZ-DWb22U8j.js";import{i as t,n,r,t as i}from"./chunk-EX3LRPZG-CAx16zp2.js";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};