@rainmanhhh/pi-web 0.15.17 → 0.15.19

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 (93) hide show
  1. package/dist/server.mjs +97 -97
  2. package/dist/static/assets/{CodeMirrorEditor-BPwCXTaH.js → CodeMirrorEditor-z5JZvVaz.js} +2 -2
  3. package/dist/static/assets/{abnfDiagram-VCTEODGH-DxWBeOcc.js → abnfDiagram-VCTEODGH-D7w47GGV.js} +1 -1
  4. package/dist/static/assets/architecture-7GRP2DOG-CpWlXq20.js +1 -0
  5. package/dist/static/assets/{architectureDiagram-5GKGNRK7-C704nnhr.js → architectureDiagram-5GKGNRK7-DHlTsrl2.js} +1 -1
  6. package/dist/static/assets/{blockDiagram-I7D4REHJ-Dw5qwBUL.js → blockDiagram-I7D4REHJ-CTzZJbQr.js} +1 -1
  7. package/dist/static/assets/{c4Diagram-7LVT6UL2-DUWa5y_O.js → c4Diagram-7LVT6UL2-OPbyD0n4.js} +1 -1
  8. package/dist/static/assets/channel-DsJmURRj.js +1 -0
  9. package/dist/static/assets/{chunk-4HAMMTFA-guQlW-25.js → chunk-4HAMMTFA-BCc47eN9.js} +1 -1
  10. package/dist/static/assets/{chunk-75Z2AOVW-baNoC3Nx.js → chunk-75Z2AOVW-je7n2rKZ.js} +1 -1
  11. package/dist/static/assets/{chunk-DU6HZSFF-DsMNAX-a.js → chunk-DU6HZSFF-F1zixM7P.js} +2 -3
  12. package/dist/static/assets/{chunk-F27PBJKO-DGQQqj79.js → chunk-F27PBJKO-bn_h_vql.js} +1 -1
  13. package/dist/static/assets/{chunk-GMAD6QVW-Cx6hmskd.js → chunk-GMAD6QVW-BkmOYpMZ.js} +1 -1
  14. package/dist/static/assets/{chunk-GVQU2GXP-DOUvtsu8.js → chunk-GVQU2GXP-DBRfkWOA.js} +1 -1
  15. package/dist/static/assets/{chunk-IMKFNOWR-Bnboyr1t.js → chunk-IMKFNOWR-auG3qzSH.js} +1 -1
  16. package/dist/static/assets/{chunk-L3NEJ4N5-BRwqsadj.js → chunk-L3NEJ4N5-Cg85FDTa.js} +1 -1
  17. package/dist/static/assets/{chunk-OSK3NFVY-DUSwTUow.js → chunk-OSK3NFVY-BORKGa6B.js} +1 -1
  18. package/dist/static/assets/{chunk-P2QGCYS3-I7TvSKBB.js → chunk-P2QGCYS3-BG5yayjZ.js} +1 -1
  19. package/dist/static/assets/{chunk-POPQ4Y6H-C5mkb1ue.js → chunk-POPQ4Y6H-TRNSxIx6.js} +1 -1
  20. package/dist/static/assets/{chunk-PWAF6VOD-DX5nLVh3.js → chunk-PWAF6VOD-Bel4-2PG.js} +1 -1
  21. package/dist/static/assets/{chunk-SHT3W25Y-D6gg_Rn2.js → chunk-SHT3W25Y-BFseijXL.js} +1 -1
  22. package/dist/static/assets/{chunk-SVP7TREG-Cck6YTMM.js → chunk-SVP7TREG-CxGvF3bh.js} +1 -1
  23. package/dist/static/assets/{chunk-TICWLB2K-CiA7XPeH.js → chunk-TICWLB2K-BkLryK6f.js} +1 -1
  24. package/dist/static/assets/classDiagram-ZZMXUADV-I34fGXzE.js +1 -0
  25. package/dist/static/assets/classDiagram-v2-VYDZK3BY-I34fGXzE.js +1 -0
  26. package/dist/static/assets/{cynefin-OW5HDTMX-BoXH7aLv.js → cynefin-OW5HDTMX-BOquGwE_.js} +1 -1
  27. package/dist/static/assets/{cynefinDiagram-5FMLGOSQ-D5UkT8__.js → cynefinDiagram-5FMLGOSQ-C2dh1htx.js} +1 -1
  28. package/dist/static/assets/{dagre-GXQ25YYZ-Dnm7RV2u.js → dagre-GXQ25YYZ-CoCEYkhu.js} +1 -1
  29. package/dist/static/assets/{diagram-S7CK7UJ4-TonIYOyM.js → diagram-S7CK7UJ4-ZcF03w2q.js} +1 -1
  30. package/dist/static/assets/{diagram-UQ7AKVKN-Cgd3aoKW.js → diagram-UQ7AKVKN-DJAOtMgf.js} +1 -1
  31. package/dist/static/assets/{diagram-VSXAHHWV-BaBo6W5N.js → diagram-VSXAHHWV-ZvSc_1lS.js} +1 -1
  32. package/dist/static/assets/{diagram-VX7I27RA-BT0Ap-7T.js → diagram-VX7I27RA-BqKSTrQm.js} +1 -1
  33. package/dist/static/assets/{diagram-Z3DM3KII-DAycUrTi.js → diagram-Z3DM3KII-BoAAZ-Gf.js} +1 -1
  34. package/dist/static/assets/{ebnfDiagram-PWID7BFC-BCX21uHE.js → ebnfDiagram-PWID7BFC-C4nZQ34u.js} +1 -1
  35. package/dist/static/assets/{erDiagram-RLTQ6QDP-DUWDuLLK.js → erDiagram-RLTQ6QDP-DHxQyvip.js} +1 -1
  36. package/dist/static/assets/eventmodeling-NTZA5JFV-CN1q40jh.js +1 -0
  37. package/dist/static/assets/flowDiagram-HODETNUW-DZhc5NWB.js +1 -0
  38. package/dist/static/assets/{ganttDiagram-EL5Y4UJY-xd_q9hl6.js → ganttDiagram-EL5Y4UJY-nvTE9U1T.js} +1 -1
  39. package/dist/static/assets/{gitGraph-4MIJSDKK-B8r9TLfO.js → gitGraph-4MIJSDKK-DQyxt_0l.js} +1 -1
  40. package/dist/static/assets/{gitGraphDiagram-WWUBYQGX-nI6cLuPU.js → gitGraphDiagram-WWUBYQGX-fiX3LUpm.js} +1 -1
  41. package/dist/static/assets/highlighted-body-KPVGNVTW-BUovTyTo.js +1 -0
  42. package/dist/static/assets/{index-B5Ak4TFa.js → index-B_rFcWxq.js} +129 -129
  43. package/dist/static/assets/{info-A6RAGUB7-KKHJQbpc.js → info-A6RAGUB7-BsyeDuCZ.js} +1 -1
  44. package/dist/static/assets/{infoDiagram-27XIBGKW-BnHNjaSI.js → infoDiagram-27XIBGKW-CUkEnPRo.js} +1 -1
  45. package/dist/static/assets/{ishikawaDiagram-5VMMS53U-BHOWb5jF.js → ishikawaDiagram-5VMMS53U-BC2LjZtP.js} +1 -1
  46. package/dist/static/assets/{journeyDiagram-3NMN7TZE-CwpsFMBT.js → journeyDiagram-3NMN7TZE-XHhalwt7.js} +1 -1
  47. package/dist/static/assets/{kanban-definition-UXKFOSKX-CV3J_qEU.js → kanban-definition-UXKFOSKX-C1fZQ4oO.js} +1 -1
  48. package/dist/static/assets/katex-GAxSWBzH.js +257 -0
  49. package/dist/static/assets/{line-BQKiURJi.js → line-B5iGabJ_.js} +1 -1
  50. package/dist/static/assets/mermaid-HWGCJPDP-bLZnfVLU.js +1 -0
  51. package/dist/static/assets/{mermaid-parser.core-BuUNo7Sx.js → mermaid-parser.core-CT4Hovqk.js} +3 -3
  52. package/dist/static/assets/{mermaid.core-DT7id6Bs.js → mermaid.core-BM8Ni9pk.js} +4 -4
  53. package/dist/static/assets/{mindmap-definition-YA3MSWOX-BzX6BMK8.js → mindmap-definition-YA3MSWOX-KXL60EQS.js} +1 -1
  54. package/dist/static/assets/{packet-AYTQ26CC-CqTitJmW.js → packet-AYTQ26CC-CoSbMgq2.js} +1 -1
  55. package/dist/static/assets/{pegDiagram-XKGWAZYB-BSsNI_aa.js → pegDiagram-XKGWAZYB-Cj8BPlBh.js} +1 -1
  56. package/dist/static/assets/{pie-WAS4IAKB-DqI6KiOp.js → pie-WAS4IAKB-DJ1DEMIs.js} +1 -1
  57. package/dist/static/assets/{pieDiagram-E7YTZNPT-GaNk6-hF.js → pieDiagram-E7YTZNPT-6FNFPpj2.js} +1 -1
  58. package/dist/static/assets/{quadrantDiagram-AXDQQJYC-BYx94j6-.js → quadrantDiagram-AXDQQJYC-BPgL9cTP.js} +1 -1
  59. package/dist/static/assets/{radar-RG4KPBEZ-pWbAdB_O.js → radar-RG4KPBEZ-CAFDOW2d.js} +1 -1
  60. package/dist/static/assets/{railroad-74A4TZTK-BPlDdnN5.js → railroad-74A4TZTK-heF3ssgy.js} +1 -1
  61. package/dist/static/assets/railroad-abnf-HS5TGJTU-CWSufJw3.js +1 -0
  62. package/dist/static/assets/railroad-ebnf-LZEXJU2U-Cr_-U_6d.js +1 -0
  63. package/dist/static/assets/railroad-peg-WCYAUIDC-7cb5utXa.js +1 -0
  64. package/dist/static/assets/{railroadDiagram-O6MQD6OU-D5fpks2-.js → railroadDiagram-O6MQD6OU-CVjIfx2D.js} +1 -1
  65. package/dist/static/assets/{requirementDiagram-BXWQKSXE-Bgo2O4BD.js → requirementDiagram-BXWQKSXE-CoNC6TkE.js} +1 -1
  66. package/dist/static/assets/{sankeyDiagram-P5KCCOFB-DTL_8m4m.js → sankeyDiagram-P5KCCOFB-CZLEeCNB.js} +1 -1
  67. package/dist/static/assets/{sequenceDiagram-WJ2MYXX4-CyKPciRp.js → sequenceDiagram-WJ2MYXX4-aYSNzBOm.js} +1 -1
  68. package/dist/static/assets/{stateDiagram-D77RDMKH-DI-liFTc.js → stateDiagram-D77RDMKH-USHXu7xJ.js} +1 -1
  69. package/dist/static/assets/stateDiagram-v2-MP3YSRHH-SvD-RXLV.js +1 -0
  70. package/dist/static/assets/{swimlanes-42K2YHIH-ClS2o1_J.js → swimlanes-42K2YHIH-CGFxweK2.js} +1 -1
  71. package/dist/static/assets/swimlanesDiagram-VR7AAH4N-O4_gj5tZ.js +8 -0
  72. package/dist/static/assets/{timeline-definition-24CTP7MA-BO5LQRqK.js → timeline-definition-24CTP7MA-DDNt3HCD.js} +1 -1
  73. package/dist/static/assets/{treeView-Q6P3EWNA-Bq_NPRZu.js → treeView-Q6P3EWNA-BqS57PR-.js} +1 -1
  74. package/dist/static/assets/{treemap-WGGIJYW6-BbWzDRGF.js → treemap-WGGIJYW6-BMX3Ii89.js} +1 -1
  75. package/dist/static/assets/{vennDiagram-4TSXK5OY-BZC5HMZ7.js → vennDiagram-4TSXK5OY-BIVmnDSP.js} +1 -1
  76. package/dist/static/assets/{wardley-WFR3VGLG-EF2QFhha.js → wardley-WFR3VGLG-IlDtbeva.js} +1 -1
  77. package/dist/static/assets/{wardleyDiagram-VM6X3IG4-CZes1JeU.js → wardleyDiagram-VM6X3IG4-CnawrdTx.js} +1 -1
  78. package/dist/static/assets/{xychartDiagram-S5SC5T6Z-BpRigzay.js → xychartDiagram-S5SC5T6Z-CrPuE8t5.js} +1 -1
  79. package/dist/static/index.html +1 -1
  80. package/package.json +1 -1
  81. package/dist/static/assets/architecture-7GRP2DOG-BTpVldFT.js +0 -1
  82. package/dist/static/assets/channel-C4MSXFd7.js +0 -1
  83. package/dist/static/assets/classDiagram-ZZMXUADV-DV110_ku.js +0 -1
  84. package/dist/static/assets/classDiagram-v2-VYDZK3BY-DV110_ku.js +0 -1
  85. package/dist/static/assets/eventmodeling-NTZA5JFV-BipI_sP_.js +0 -1
  86. package/dist/static/assets/flowDiagram-HODETNUW-CpbyUo6g.js +0 -1
  87. package/dist/static/assets/highlighted-body-KPVGNVTW-CdvAhBCX.js +0 -1
  88. package/dist/static/assets/mermaid-HWGCJPDP-D9AtY6cb.js +0 -1
  89. package/dist/static/assets/railroad-abnf-HS5TGJTU-BKhrIfu6.js +0 -1
  90. package/dist/static/assets/railroad-ebnf-LZEXJU2U-DHd_3uj4.js +0 -1
  91. package/dist/static/assets/railroad-peg-WCYAUIDC-DT0ksufm.js +0 -1
  92. package/dist/static/assets/stateDiagram-v2-MP3YSRHH-COBVA3m_.js +0 -1
  93. package/dist/static/assets/swimlanesDiagram-VR7AAH4N-BPfYMmn_.js +0 -8
@@ -1,4 +1,4 @@
1
- import{$ as e,B as t,F as n,G as r,H as i,I as a,J as o,K as s,L as c,N as l,P as u,Q as d,R as f,U as p,V as m,W as h,X as g,Y as _,Z as ee,et as te,l as v,q as y,rt as b,tt as x,v as S,z as C}from"./chunk-75Z2AOVW-baNoC3Nx.js";import{n as w}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as T,p as E}from"./src-B6xuSHsQ.js";import{a as D,b as O,c as k,it as A,s as ne,x as re}from"./chunk-DU6HZSFF-DsMNAX-a.js";import{t as ie}from"./channel-C4MSXFd7.js";import"./chunk-PWAF6VOD-DX5nLVh3.js";import"./chunk-GMAD6QVW-Cx6hmskd.js";import{t as ae}from"./chunk-5VM5RSS4-ZNzvKenW.js";import"./chunk-P2QGCYS3-I7TvSKBB.js";import"./chunk-4HAMMTFA-guQlW-25.js";import{i as oe,r as se}from"./chunk-GVQU2GXP-DOUvtsu8.js";import{a as ce,c as le,i as ue,s as de}from"./chunk-OSK3NFVY-DUSwTUow.js";import{t as fe}from"./graphlib-DS17s2tU.js";function pe(e){return Array.isArray(e)}function me(e){if(b(e))return e;let t=x(e);if(!he(e))return{};if(pe(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&Object.hasOwn(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(S(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===`[object ArrayBuffer]`)return new ArrayBuffer(e.byteLength);if(t===`[object DataView]`){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===`[object Boolean]`||t===`[object Number]`||t===`[object String]`){let n=e.constructor,r=new n(e.valueOf());return t===`[object String]`?_e(r,e):j(r,e),r}if(t===`[object Date]`)return new Date(Number(e));if(t===`[object RegExp]`){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===`[object Symbol]`)return Object(Symbol.prototype.valueOf.call(e));if(t===`[object Map]`){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===`[object Set]`){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===`[object Arguments]`){let t=e,n={};return j(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return ve(n,e),j(n,e),ge(n,e),n}function he(v){switch(x(v)){case l:case n:case u:case c:case a:case f:case C:case t:case p:case m:case i:case h:case r:case s:case y:case o:case _:case g:case e:case te:case ee:case d:return!0;default:return!1}}function j(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}function ge(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r<n.length;r++){let i=n[r];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function _e(e,t){let n=t.valueOf().length;for(let r in t)Object.hasOwn(t,r)&&(Number.isNaN(Number(r))||Number(r)>=n)&&(e[r]=t[r])}function ve(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}var M=(function(){var e=w(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,15],n=[1,7],r=[1,13],i=[1,14],a=[1,19],o=[1,16],s=[1,17],c=[1,18],l=[8,30],u=[8,10,21,28,29,30,31,39,43,46],d=[1,23],f=[1,24],p=[8,10,15,16,21,28,29,30,31,39,43,46],m=[8,10,15,16,21,27,28,29,30,31,39,43,46],h=[1,49],g={trace:w(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:w(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),this.$=typeof a[s].length==`number`?a[s]:[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),c=r.edgeStrToThickness(a[s-1].edgeTypeStr),l=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:c,pattern:l,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let u=r.generateId();this.$={id:u,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()}}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:a,39:o,43:s,46:c},{8:[1,20]},e(l,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:n,28:r,29:i,31:a,39:o,43:s,46:c}),e(u,[2,16],{14:22,15:d,16:f}),e(u,[2,17]),e(u,[2,18]),e(u,[2,19]),e(u,[2,20]),e(u,[2,21]),e(u,[2,22]),e(p,[2,25],{27:[1,25]}),e(u,[2,26]),{19:26,26:12,31:a},{10:t,11:27,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:a,39:o,43:s,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(m,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(l,[2,13]),{26:35,31:a},{31:[2,14]},{17:[1,36]},e(p,[2,24]),{10:t,11:37,13:4,14:22,15:d,16:f,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:a,39:o,43:s,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(m,[2,30]),{18:[1,43]},{18:[1,44]},e(p,[2,23]),{18:[1,45]},{30:[1,46]},e(u,[2,28]),e(u,[2,35]),e(u,[2,36]),e(u,[2,37]),e(u,[2,38]),{36:[1,47]},{33:48,34:h},{15:[1,50]},e(u,[2,27]),e(m,[2,33]),{38:[1,51]},{33:52,34:h,38:[2,31]},{31:[2,15]},e(m,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:w(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:w(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,c=0,l=0,u=0,d=2,f=1,p=a.slice.call(arguments,1),m=Object.create(this.lexer),h={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(h.yy[g]=this.yy[g]);m.setInput(e,h.yy),h.yy.lexer=m,h.yy.parser=this,m.yylloc===void 0&&(m.yylloc={});var _=m.yylloc;a.push(_);var ee=m.options&&m.options.ranges;this.parseError=typeof h.yy.parseError==`function`?h.yy.parseError:Object.getPrototypeOf(this).parseError;function te(e){n.length-=2*e,i.length-=e,a.length-=e}w(te,`popStack`);function v(){var e=r.pop()||m.lex()||f;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}w(v,`lex`);for(var y,b,x,S,C,T={},E,D,O,k;;){if(x=n[n.length-1],this.defaultActions[x]?S=this.defaultActions[x]:(y??=v(),S=o[x]&&o[x][y]),S===void 0||!S.length||!S[0]){var A=``;for(E in k=[],o[x])this.terminals_[E]&&E>d&&k.push(`'`+this.terminals_[E]+`'`);A=m.showPosition?`Parse error on line `+(c+1)+`:
1
+ import{$ as e,B as t,F as n,G as r,H as i,I as a,J as o,K as s,L as c,N as l,P as u,Q as d,R as f,U as p,V as m,W as h,X as g,Y as _,Z as ee,et as te,l as v,q as y,rt as b,tt as x,v as S,z as C}from"./chunk-75Z2AOVW-je7n2rKZ.js";import{n as w}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as T,p as E}from"./src-B6xuSHsQ.js";import{a as D,b as O,c as k,it as A,s as ne,x as re}from"./chunk-DU6HZSFF-F1zixM7P.js";import{t as ie}from"./channel-DsJmURRj.js";import"./chunk-PWAF6VOD-Bel4-2PG.js";import"./chunk-GMAD6QVW-BkmOYpMZ.js";import{t as ae}from"./chunk-5VM5RSS4-ZNzvKenW.js";import"./chunk-P2QGCYS3-BG5yayjZ.js";import"./chunk-4HAMMTFA-BCc47eN9.js";import{i as oe,r as se}from"./chunk-GVQU2GXP-DBRfkWOA.js";import{a as ce,c as le,i as ue,s as de}from"./chunk-OSK3NFVY-BORKGa6B.js";import{t as fe}from"./graphlib-DS17s2tU.js";function pe(e){return Array.isArray(e)}function me(e){if(b(e))return e;let t=x(e);if(!he(e))return{};if(pe(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&Object.hasOwn(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(S(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===`[object ArrayBuffer]`)return new ArrayBuffer(e.byteLength);if(t===`[object DataView]`){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===`[object Boolean]`||t===`[object Number]`||t===`[object String]`){let n=e.constructor,r=new n(e.valueOf());return t===`[object String]`?_e(r,e):j(r,e),r}if(t===`[object Date]`)return new Date(Number(e));if(t===`[object RegExp]`){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===`[object Symbol]`)return Object(Symbol.prototype.valueOf.call(e));if(t===`[object Map]`){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===`[object Set]`){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===`[object Arguments]`){let t=e,n={};return j(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return ve(n,e),j(n,e),ge(n,e),n}function he(v){switch(x(v)){case l:case n:case u:case c:case a:case f:case C:case t:case p:case m:case i:case h:case r:case s:case y:case o:case _:case g:case e:case te:case ee:case d:return!0;default:return!1}}function j(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}function ge(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r<n.length;r++){let i=n[r];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function _e(e,t){let n=t.valueOf().length;for(let r in t)Object.hasOwn(t,r)&&(Number.isNaN(Number(r))||Number(r)>=n)&&(e[r]=t[r])}function ve(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}var M=(function(){var e=w(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,15],n=[1,7],r=[1,13],i=[1,14],a=[1,19],o=[1,16],s=[1,17],c=[1,18],l=[8,30],u=[8,10,21,28,29,30,31,39,43,46],d=[1,23],f=[1,24],p=[8,10,15,16,21,28,29,30,31,39,43,46],m=[8,10,15,16,21,27,28,29,30,31,39,43,46],h=[1,49],g={trace:w(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:w(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),this.$=typeof a[s].length==`number`?a[s]:[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),c=r.edgeStrToThickness(a[s-1].edgeTypeStr),l=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:c,pattern:l,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let u=r.generateId();this.$={id:u,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()}}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:a,39:o,43:s,46:c},{8:[1,20]},e(l,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:n,28:r,29:i,31:a,39:o,43:s,46:c}),e(u,[2,16],{14:22,15:d,16:f}),e(u,[2,17]),e(u,[2,18]),e(u,[2,19]),e(u,[2,20]),e(u,[2,21]),e(u,[2,22]),e(p,[2,25],{27:[1,25]}),e(u,[2,26]),{19:26,26:12,31:a},{10:t,11:27,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:a,39:o,43:s,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(m,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(l,[2,13]),{26:35,31:a},{31:[2,14]},{17:[1,36]},e(p,[2,24]),{10:t,11:37,13:4,14:22,15:d,16:f,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:a,39:o,43:s,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(m,[2,30]),{18:[1,43]},{18:[1,44]},e(p,[2,23]),{18:[1,45]},{30:[1,46]},e(u,[2,28]),e(u,[2,35]),e(u,[2,36]),e(u,[2,37]),e(u,[2,38]),{36:[1,47]},{33:48,34:h},{15:[1,50]},e(u,[2,27]),e(m,[2,33]),{38:[1,51]},{33:52,34:h,38:[2,31]},{31:[2,15]},e(m,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:w(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:w(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,c=0,l=0,u=0,d=2,f=1,p=a.slice.call(arguments,1),m=Object.create(this.lexer),h={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(h.yy[g]=this.yy[g]);m.setInput(e,h.yy),h.yy.lexer=m,h.yy.parser=this,m.yylloc===void 0&&(m.yylloc={});var _=m.yylloc;a.push(_);var ee=m.options&&m.options.ranges;this.parseError=typeof h.yy.parseError==`function`?h.yy.parseError:Object.getPrototypeOf(this).parseError;function te(e){n.length-=2*e,i.length-=e,a.length-=e}w(te,`popStack`);function v(){var e=r.pop()||m.lex()||f;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}w(v,`lex`);for(var y,b,x,S,C,T={},E,D,O,k;;){if(x=n[n.length-1],this.defaultActions[x]?S=this.defaultActions[x]:(y??=v(),S=o[x]&&o[x][y]),S===void 0||!S.length||!S[0]){var A=``;for(E in k=[],o[x])this.terminals_[E]&&E>d&&k.push(`'`+this.terminals_[E]+`'`);A=m.showPosition?`Parse error on line `+(c+1)+`:
2
2
  `+m.showPosition()+`
3
3
  Expecting `+k.join(`, `)+`, got '`+(this.terminals_[y]||y)+`'`:`Parse error on line `+(c+1)+`: Unexpected `+(y==f?`end of input`:`'`+(this.terminals_[y]||y)+`'`),this.parseError(A,{text:m.match,token:this.terminals_[y]||y,line:m.yylineno,loc:_,expected:k})}if(S[0]instanceof Array&&S.length>1)throw Error(`Parse Error: multiple actions possible at state: `+x+`, token: `+y);switch(S[0]){case 1:n.push(y),i.push(m.yytext),a.push(m.yylloc),n.push(S[1]),y=null,b?(y=b,b=null):(l=m.yyleng,s=m.yytext,c=m.yylineno,_=m.yylloc,u>0&&u--);break;case 2:if(D=this.productions_[S[1]][1],T.$=i[i.length-D],T._$={first_line:a[a.length-(D||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(D||1)].first_column,last_column:a[a.length-1].last_column},ee&&(T._$.range=[a[a.length-(D||1)].range[0],a[a.length-1].range[1]]),C=this.performAction.apply(T,[s,l,c,h.yy,S[1],i,a].concat(p)),C!==void 0)return C;D&&(n=n.slice(0,-1*D*2),i=i.slice(0,-1*D),a=a.slice(0,-1*D)),n.push(this.productions_[S[1]][0]),i.push(T.$),a.push(T._$),O=o[n[n.length-2]][n[n.length-1]],n.push(O);break;case 3:return!0}}return!0},`parse`)};g.lexer=(function(){return{EOF:1,parseError:w(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:w(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:w(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:w(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:w(function(){return this._more=!0,this},`more`),reject:w(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:w(function(e){this.unput(this.match.slice(e))},`less`),pastInput:w(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:w(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:w(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{_ as e,n as t,r as n}from"./chunk-75Z2AOVW-baNoC3Nx.js";import{n as r}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as i,p as a}from"./src-B6xuSHsQ.js";import{H as o,U as s,c as l,r as u,s as d,v as f,x as p,y as m,z as h}from"./chunk-DU6HZSFF-DsMNAX-a.js";import"./chunk-PWAF6VOD-DX5nLVh3.js";import"./chunk-GMAD6QVW-Cx6hmskd.js";import"./chunk-P2QGCYS3-I7TvSKBB.js";import{o as g}from"./chunk-4HAMMTFA-guQlW-25.js";import{a as _}from"./chunk-F27PBJKO-DGQQqj79.js";var v=(function(){var e=r(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,24],n=[1,25],i=[1,26],a=[1,27],o=[1,28],s=[1,63],l=[1,64],u=[1,65],d=[1,66],f=[1,67],p=[1,68],m=[1,69],h=[1,29],g=[1,30],_=[1,31],v=[1,32],y=[1,33],b=[1,34],x=[1,35],S=[1,36],C=[1,37],w=[1,38],T=[1,39],E=[1,40],D=[1,41],O=[1,42],k=[1,43],A=[1,44],j=[1,45],M=[1,46],N=[1,47],P=[1,48],F=[1,50],I=[1,51],L=[1,52],R=[1,53],z=[1,54],B=[1,55],V=[1,56],H=[1,57],U=[1,58],W=[1,59],G=[1,60],ee=[14,42],te=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ne=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],K=[1,82],q=[1,83],J=[1,84],Y=[1,85],X=[12,14,42],re=[12,14,33,42],ie=[12,14,33,42,76,77,79,80],ae=[12,33],oe=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],se={trace:r(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:`error`,6:`direction_tb`,7:`direction_bt`,8:`direction_rl`,9:`direction_lr`,11:`C4_CONTEXT`,12:`NEWLINE`,14:`EOF`,15:`C4_CONTAINER`,16:`C4_COMPONENT`,17:`C4_DYNAMIC`,18:`C4_DEPLOYMENT`,22:`title`,23:`accDescription`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`LBRACE`,34:`ENTERPRISE_BOUNDARY`,36:`SYSTEM_BOUNDARY`,37:`BOUNDARY`,38:`CONTAINER_BOUNDARY`,39:`NODE`,40:`NODE_L`,41:`NODE_R`,42:`RBRACE`,44:`PERSON`,45:`PERSON_EXT`,46:`SYSTEM`,47:`SYSTEM_DB`,48:`SYSTEM_QUEUE`,49:`SYSTEM_EXT`,50:`SYSTEM_EXT_DB`,51:`SYSTEM_EXT_QUEUE`,52:`CONTAINER`,53:`CONTAINER_DB`,54:`CONTAINER_QUEUE`,55:`CONTAINER_EXT`,56:`CONTAINER_EXT_DB`,57:`CONTAINER_EXT_QUEUE`,58:`COMPONENT`,59:`COMPONENT_DB`,60:`COMPONENT_QUEUE`,61:`COMPONENT_EXT`,62:`COMPONENT_EXT_DB`,63:`COMPONENT_EXT_QUEUE`,64:`REL`,65:`BIREL`,66:`REL_U`,67:`REL_D`,68:`REL_L`,69:`REL_R`,70:`REL_B`,71:`REL_INDEX`,72:`UPDATE_EL_STYLE`,73:`UPDATE_REL_STYLE`,74:`UPDATE_LAYOUT_CONFIG`,76:`STR`,77:`STR_KEY`,78:`STR_VALUE`,79:`ATTRIBUTE`,80:`ATTRIBUTE_EMPTY`},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:r(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:r.setDirection(`TB`);break;case 4:r.setDirection(`BT`);break;case 5:r.setDirection(`RL`);break;case 6:r.setDirection(`LR`);break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[s-3]);break;case 19:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 28:a[s].splice(2,0,`ENTERPRISE`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,`SYSTEM`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,`CONTAINER`),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:r.addDeploymentNode(`node`,...a[s]),this.$=a[s];break;case 33:r.addDeploymentNode(`nodeL`,...a[s]),this.$=a[s];break;case 34:r.addDeploymentNode(`nodeR`,...a[s]),this.$=a[s];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem(`person`,...a[s]),this.$=a[s];break;case 40:r.addPersonOrSystem(`external_person`,...a[s]),this.$=a[s];break;case 41:r.addPersonOrSystem(`system`,...a[s]),this.$=a[s];break;case 42:r.addPersonOrSystem(`system_db`,...a[s]),this.$=a[s];break;case 43:r.addPersonOrSystem(`system_queue`,...a[s]),this.$=a[s];break;case 44:r.addPersonOrSystem(`external_system`,...a[s]),this.$=a[s];break;case 45:r.addPersonOrSystem(`external_system_db`,...a[s]),this.$=a[s];break;case 46:r.addPersonOrSystem(`external_system_queue`,...a[s]),this.$=a[s];break;case 47:r.addContainer(`container`,...a[s]),this.$=a[s];break;case 48:r.addContainer(`container_db`,...a[s]),this.$=a[s];break;case 49:r.addContainer(`container_queue`,...a[s]),this.$=a[s];break;case 50:r.addContainer(`external_container`,...a[s]),this.$=a[s];break;case 51:r.addContainer(`external_container_db`,...a[s]),this.$=a[s];break;case 52:r.addContainer(`external_container_queue`,...a[s]),this.$=a[s];break;case 53:r.addComponent(`component`,...a[s]),this.$=a[s];break;case 54:r.addComponent(`component_db`,...a[s]),this.$=a[s];break;case 55:r.addComponent(`component_queue`,...a[s]),this.$=a[s];break;case 56:r.addComponent(`external_component`,...a[s]),this.$=a[s];break;case 57:r.addComponent(`external_component_db`,...a[s]),this.$=a[s];break;case 58:r.addComponent(`external_component_queue`,...a[s]),this.$=a[s];break;case 60:r.addRel(`rel`,...a[s]),this.$=a[s];break;case 61:r.addRel(`birel`,...a[s]),this.$=a[s];break;case 62:r.addRel(`rel_u`,...a[s]),this.$=a[s];break;case 63:r.addRel(`rel_d`,...a[s]),this.$=a[s];break;case 64:r.addRel(`rel_l`,...a[s]),this.$=a[s];break;case 65:r.addRel(`rel_r`,...a[s]),this.$=a[s];break;case 66:r.addRel(`rel_b`,...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),r.addRel(`rel`,...a[s]),this.$=a[s];break;case 68:r.updateElStyle(`update_el_style`,...a[s]),this.$=a[s];break;case 69:r.updateRelStyle(`update_rel_style`,...a[s]),this.$=a[s];break;case 70:r.updateLayoutConfig(`update_layout_config`,...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:let e={};e[a[s-1].trim()]=a[s].trim(),this.$=e;break;case 76:this.$=``}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:n,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:70,19:20,20:21,21:22,22:t,23:n,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:71,19:20,20:21,21:22,22:t,23:n,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:72,19:20,20:21,21:22,22:t,23:n,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:73,19:20,20:21,21:22,22:t,23:n,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{14:[1,74]},e(ee,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),e(ee,[2,14]),e(te,[2,16],{12:[1,76]}),e(ee,[2,36],{12:[1,77]}),e(ne,[2,19]),e(ne,[2,20]),{25:[1,78]},{27:[1,79]},e(ne,[2,23]),{35:80,75:81,76:K,77:q,79:J,80:Y},{35:86,75:81,76:K,77:q,79:J,80:Y},{35:87,75:81,76:K,77:q,79:J,80:Y},{35:88,75:81,76:K,77:q,79:J,80:Y},{35:89,75:81,76:K,77:q,79:J,80:Y},{35:90,75:81,76:K,77:q,79:J,80:Y},{35:91,75:81,76:K,77:q,79:J,80:Y},{35:92,75:81,76:K,77:q,79:J,80:Y},{35:93,75:81,76:K,77:q,79:J,80:Y},{35:94,75:81,76:K,77:q,79:J,80:Y},{35:95,75:81,76:K,77:q,79:J,80:Y},{35:96,75:81,76:K,77:q,79:J,80:Y},{35:97,75:81,76:K,77:q,79:J,80:Y},{35:98,75:81,76:K,77:q,79:J,80:Y},{35:99,75:81,76:K,77:q,79:J,80:Y},{35:100,75:81,76:K,77:q,79:J,80:Y},{35:101,75:81,76:K,77:q,79:J,80:Y},{35:102,75:81,76:K,77:q,79:J,80:Y},{35:103,75:81,76:K,77:q,79:J,80:Y},{35:104,75:81,76:K,77:q,79:J,80:Y},e(X,[2,59]),{35:105,75:81,76:K,77:q,79:J,80:Y},{35:106,75:81,76:K,77:q,79:J,80:Y},{35:107,75:81,76:K,77:q,79:J,80:Y},{35:108,75:81,76:K,77:q,79:J,80:Y},{35:109,75:81,76:K,77:q,79:J,80:Y},{35:110,75:81,76:K,77:q,79:J,80:Y},{35:111,75:81,76:K,77:q,79:J,80:Y},{35:112,75:81,76:K,77:q,79:J,80:Y},{35:113,75:81,76:K,77:q,79:J,80:Y},{35:114,75:81,76:K,77:q,79:J,80:Y},{35:115,75:81,76:K,77:q,79:J,80:Y},{20:116,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{12:[1,118],33:[1,117]},{35:119,75:81,76:K,77:q,79:J,80:Y},{35:120,75:81,76:K,77:q,79:J,80:Y},{35:121,75:81,76:K,77:q,79:J,80:Y},{35:122,75:81,76:K,77:q,79:J,80:Y},{35:123,75:81,76:K,77:q,79:J,80:Y},{35:124,75:81,76:K,77:q,79:J,80:Y},{35:125,75:81,76:K,77:q,79:J,80:Y},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(ee,[2,15]),e(te,[2,17],{21:22,19:130,22:t,23:n,24:i,26:a,28:o}),e(ee,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:n,24:i,26:a,28:o,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),e(ne,[2,21]),e(ne,[2,22]),e(X,[2,39]),e(re,[2,71],{75:81,35:132,76:K,77:q,79:J,80:Y}),e(ie,[2,73]),{78:[1,133]},e(ie,[2,75]),e(ie,[2,76]),e(X,[2,40]),e(X,[2,41]),e(X,[2,42]),e(X,[2,43]),e(X,[2,44]),e(X,[2,45]),e(X,[2,46]),e(X,[2,47]),e(X,[2,48]),e(X,[2,49]),e(X,[2,50]),e(X,[2,51]),e(X,[2,52]),e(X,[2,53]),e(X,[2,54]),e(X,[2,55]),e(X,[2,56]),e(X,[2,57]),e(X,[2,58]),e(X,[2,60]),e(X,[2,61]),e(X,[2,62]),e(X,[2,63]),e(X,[2,64]),e(X,[2,65]),e(X,[2,66]),e(X,[2,67]),e(X,[2,68]),e(X,[2,69]),e(X,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(ae,[2,28]),e(ae,[2,29]),e(ae,[2,30]),e(ae,[2,31]),e(ae,[2,32]),e(ae,[2,33]),e(ae,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(te,[2,18]),e(ee,[2,38]),e(re,[2,72]),e(ie,[2,74]),e(X,[2,24]),e(X,[2,35]),e(oe,[2,25]),e(oe,[2,26],{12:[1,138]}),e(oe,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:r(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:r(function(e){var t=this,n=[0],i=[],a=[null],o=[],s=this.table,l=``,u=0,d=0,f=0,p=2,m=1,h=o.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;o.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){n.length-=2*e,a.length-=e,o.length-=e}r(x,`popStack`);function S(){var e=i.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}r(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=n[n.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=s[T]&&s[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],s[T])this.terminals_[k]&&k>p&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(u+1)+`:
1
+ import{_ as e,n as t,r as n}from"./chunk-75Z2AOVW-je7n2rKZ.js";import{n as r}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as i,p as a}from"./src-B6xuSHsQ.js";import{H as o,U as s,c as l,r as u,s as d,v as f,x as p,y as m,z as h}from"./chunk-DU6HZSFF-F1zixM7P.js";import"./chunk-PWAF6VOD-Bel4-2PG.js";import"./chunk-GMAD6QVW-BkmOYpMZ.js";import"./chunk-P2QGCYS3-BG5yayjZ.js";import{o as g}from"./chunk-4HAMMTFA-BCc47eN9.js";import{a as _}from"./chunk-F27PBJKO-bn_h_vql.js";var v=(function(){var e=r(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,24],n=[1,25],i=[1,26],a=[1,27],o=[1,28],s=[1,63],l=[1,64],u=[1,65],d=[1,66],f=[1,67],p=[1,68],m=[1,69],h=[1,29],g=[1,30],_=[1,31],v=[1,32],y=[1,33],b=[1,34],x=[1,35],S=[1,36],C=[1,37],w=[1,38],T=[1,39],E=[1,40],D=[1,41],O=[1,42],k=[1,43],A=[1,44],j=[1,45],M=[1,46],N=[1,47],P=[1,48],F=[1,50],I=[1,51],L=[1,52],R=[1,53],z=[1,54],B=[1,55],V=[1,56],H=[1,57],U=[1,58],W=[1,59],G=[1,60],ee=[14,42],te=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ne=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],K=[1,82],q=[1,83],J=[1,84],Y=[1,85],X=[12,14,42],re=[12,14,33,42],ie=[12,14,33,42,76,77,79,80],ae=[12,33],oe=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],se={trace:r(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:`error`,6:`direction_tb`,7:`direction_bt`,8:`direction_rl`,9:`direction_lr`,11:`C4_CONTEXT`,12:`NEWLINE`,14:`EOF`,15:`C4_CONTAINER`,16:`C4_COMPONENT`,17:`C4_DYNAMIC`,18:`C4_DEPLOYMENT`,22:`title`,23:`accDescription`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`LBRACE`,34:`ENTERPRISE_BOUNDARY`,36:`SYSTEM_BOUNDARY`,37:`BOUNDARY`,38:`CONTAINER_BOUNDARY`,39:`NODE`,40:`NODE_L`,41:`NODE_R`,42:`RBRACE`,44:`PERSON`,45:`PERSON_EXT`,46:`SYSTEM`,47:`SYSTEM_DB`,48:`SYSTEM_QUEUE`,49:`SYSTEM_EXT`,50:`SYSTEM_EXT_DB`,51:`SYSTEM_EXT_QUEUE`,52:`CONTAINER`,53:`CONTAINER_DB`,54:`CONTAINER_QUEUE`,55:`CONTAINER_EXT`,56:`CONTAINER_EXT_DB`,57:`CONTAINER_EXT_QUEUE`,58:`COMPONENT`,59:`COMPONENT_DB`,60:`COMPONENT_QUEUE`,61:`COMPONENT_EXT`,62:`COMPONENT_EXT_DB`,63:`COMPONENT_EXT_QUEUE`,64:`REL`,65:`BIREL`,66:`REL_U`,67:`REL_D`,68:`REL_L`,69:`REL_R`,70:`REL_B`,71:`REL_INDEX`,72:`UPDATE_EL_STYLE`,73:`UPDATE_REL_STYLE`,74:`UPDATE_LAYOUT_CONFIG`,76:`STR`,77:`STR_KEY`,78:`STR_VALUE`,79:`ATTRIBUTE`,80:`ATTRIBUTE_EMPTY`},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:r(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:r.setDirection(`TB`);break;case 4:r.setDirection(`BT`);break;case 5:r.setDirection(`RL`);break;case 6:r.setDirection(`LR`);break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[s-3]);break;case 19:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 28:a[s].splice(2,0,`ENTERPRISE`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,`SYSTEM`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,`CONTAINER`),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:r.addDeploymentNode(`node`,...a[s]),this.$=a[s];break;case 33:r.addDeploymentNode(`nodeL`,...a[s]),this.$=a[s];break;case 34:r.addDeploymentNode(`nodeR`,...a[s]),this.$=a[s];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem(`person`,...a[s]),this.$=a[s];break;case 40:r.addPersonOrSystem(`external_person`,...a[s]),this.$=a[s];break;case 41:r.addPersonOrSystem(`system`,...a[s]),this.$=a[s];break;case 42:r.addPersonOrSystem(`system_db`,...a[s]),this.$=a[s];break;case 43:r.addPersonOrSystem(`system_queue`,...a[s]),this.$=a[s];break;case 44:r.addPersonOrSystem(`external_system`,...a[s]),this.$=a[s];break;case 45:r.addPersonOrSystem(`external_system_db`,...a[s]),this.$=a[s];break;case 46:r.addPersonOrSystem(`external_system_queue`,...a[s]),this.$=a[s];break;case 47:r.addContainer(`container`,...a[s]),this.$=a[s];break;case 48:r.addContainer(`container_db`,...a[s]),this.$=a[s];break;case 49:r.addContainer(`container_queue`,...a[s]),this.$=a[s];break;case 50:r.addContainer(`external_container`,...a[s]),this.$=a[s];break;case 51:r.addContainer(`external_container_db`,...a[s]),this.$=a[s];break;case 52:r.addContainer(`external_container_queue`,...a[s]),this.$=a[s];break;case 53:r.addComponent(`component`,...a[s]),this.$=a[s];break;case 54:r.addComponent(`component_db`,...a[s]),this.$=a[s];break;case 55:r.addComponent(`component_queue`,...a[s]),this.$=a[s];break;case 56:r.addComponent(`external_component`,...a[s]),this.$=a[s];break;case 57:r.addComponent(`external_component_db`,...a[s]),this.$=a[s];break;case 58:r.addComponent(`external_component_queue`,...a[s]),this.$=a[s];break;case 60:r.addRel(`rel`,...a[s]),this.$=a[s];break;case 61:r.addRel(`birel`,...a[s]),this.$=a[s];break;case 62:r.addRel(`rel_u`,...a[s]),this.$=a[s];break;case 63:r.addRel(`rel_d`,...a[s]),this.$=a[s];break;case 64:r.addRel(`rel_l`,...a[s]),this.$=a[s];break;case 65:r.addRel(`rel_r`,...a[s]),this.$=a[s];break;case 66:r.addRel(`rel_b`,...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),r.addRel(`rel`,...a[s]),this.$=a[s];break;case 68:r.updateElStyle(`update_el_style`,...a[s]),this.$=a[s];break;case 69:r.updateRelStyle(`update_rel_style`,...a[s]),this.$=a[s];break;case 70:r.updateLayoutConfig(`update_layout_config`,...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:let e={};e[a[s-1].trim()]=a[s].trim(),this.$=e;break;case 76:this.$=``}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:n,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:70,19:20,20:21,21:22,22:t,23:n,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:71,19:20,20:21,21:22,22:t,23:n,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:72,19:20,20:21,21:22,22:t,23:n,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:73,19:20,20:21,21:22,22:t,23:n,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{14:[1,74]},e(ee,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),e(ee,[2,14]),e(te,[2,16],{12:[1,76]}),e(ee,[2,36],{12:[1,77]}),e(ne,[2,19]),e(ne,[2,20]),{25:[1,78]},{27:[1,79]},e(ne,[2,23]),{35:80,75:81,76:K,77:q,79:J,80:Y},{35:86,75:81,76:K,77:q,79:J,80:Y},{35:87,75:81,76:K,77:q,79:J,80:Y},{35:88,75:81,76:K,77:q,79:J,80:Y},{35:89,75:81,76:K,77:q,79:J,80:Y},{35:90,75:81,76:K,77:q,79:J,80:Y},{35:91,75:81,76:K,77:q,79:J,80:Y},{35:92,75:81,76:K,77:q,79:J,80:Y},{35:93,75:81,76:K,77:q,79:J,80:Y},{35:94,75:81,76:K,77:q,79:J,80:Y},{35:95,75:81,76:K,77:q,79:J,80:Y},{35:96,75:81,76:K,77:q,79:J,80:Y},{35:97,75:81,76:K,77:q,79:J,80:Y},{35:98,75:81,76:K,77:q,79:J,80:Y},{35:99,75:81,76:K,77:q,79:J,80:Y},{35:100,75:81,76:K,77:q,79:J,80:Y},{35:101,75:81,76:K,77:q,79:J,80:Y},{35:102,75:81,76:K,77:q,79:J,80:Y},{35:103,75:81,76:K,77:q,79:J,80:Y},{35:104,75:81,76:K,77:q,79:J,80:Y},e(X,[2,59]),{35:105,75:81,76:K,77:q,79:J,80:Y},{35:106,75:81,76:K,77:q,79:J,80:Y},{35:107,75:81,76:K,77:q,79:J,80:Y},{35:108,75:81,76:K,77:q,79:J,80:Y},{35:109,75:81,76:K,77:q,79:J,80:Y},{35:110,75:81,76:K,77:q,79:J,80:Y},{35:111,75:81,76:K,77:q,79:J,80:Y},{35:112,75:81,76:K,77:q,79:J,80:Y},{35:113,75:81,76:K,77:q,79:J,80:Y},{35:114,75:81,76:K,77:q,79:J,80:Y},{35:115,75:81,76:K,77:q,79:J,80:Y},{20:116,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{12:[1,118],33:[1,117]},{35:119,75:81,76:K,77:q,79:J,80:Y},{35:120,75:81,76:K,77:q,79:J,80:Y},{35:121,75:81,76:K,77:q,79:J,80:Y},{35:122,75:81,76:K,77:q,79:J,80:Y},{35:123,75:81,76:K,77:q,79:J,80:Y},{35:124,75:81,76:K,77:q,79:J,80:Y},{35:125,75:81,76:K,77:q,79:J,80:Y},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(ee,[2,15]),e(te,[2,17],{21:22,19:130,22:t,23:n,24:i,26:a,28:o}),e(ee,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:n,24:i,26:a,28:o,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),e(ne,[2,21]),e(ne,[2,22]),e(X,[2,39]),e(re,[2,71],{75:81,35:132,76:K,77:q,79:J,80:Y}),e(ie,[2,73]),{78:[1,133]},e(ie,[2,75]),e(ie,[2,76]),e(X,[2,40]),e(X,[2,41]),e(X,[2,42]),e(X,[2,43]),e(X,[2,44]),e(X,[2,45]),e(X,[2,46]),e(X,[2,47]),e(X,[2,48]),e(X,[2,49]),e(X,[2,50]),e(X,[2,51]),e(X,[2,52]),e(X,[2,53]),e(X,[2,54]),e(X,[2,55]),e(X,[2,56]),e(X,[2,57]),e(X,[2,58]),e(X,[2,60]),e(X,[2,61]),e(X,[2,62]),e(X,[2,63]),e(X,[2,64]),e(X,[2,65]),e(X,[2,66]),e(X,[2,67]),e(X,[2,68]),e(X,[2,69]),e(X,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(ae,[2,28]),e(ae,[2,29]),e(ae,[2,30]),e(ae,[2,31]),e(ae,[2,32]),e(ae,[2,33]),e(ae,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(te,[2,18]),e(ee,[2,38]),e(re,[2,72]),e(ie,[2,74]),e(X,[2,24]),e(X,[2,35]),e(oe,[2,25]),e(oe,[2,26],{12:[1,138]}),e(oe,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:r(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:r(function(e){var t=this,n=[0],i=[],a=[null],o=[],s=this.table,l=``,u=0,d=0,f=0,p=2,m=1,h=o.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;o.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){n.length-=2*e,a.length-=e,o.length-=e}r(x,`popStack`);function S(){var e=i.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}r(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=n[n.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=s[T]&&s[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],s[T])this.terminals_[k]&&k>p&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(u+1)+`:
2
2
  `+g.showPosition()+`
3
3
  Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(u+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:n.push(C),a.push(g.yytext),o.push(g.yylloc),n.push(E[1]),C=null,w?(C=w,w=null):(d=g.yyleng,l=g.yytext,u=g.yylineno,y=g.yylloc,f>0&&f--);break;case 2:if(A=this.productions_[E[1]][1],O.$=a[a.length-A],O._$={first_line:o[o.length-(A||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(A||1)].first_column,last_column:o[o.length-1].last_column},b&&(O._$.range=[o[o.length-(A||1)].range[0],o[o.length-1].range[1]]),D=this.performAction.apply(O,[l,d,u,_.yy,E[1],a,o].concat(h)),D!==void 0)return D;A&&(n=n.slice(0,-1*A*2),a=a.slice(0,-1*A),o=o.slice(0,-1*A)),n.push(this.productions_[E[1]][0]),a.push(O.$),o.push(O._$),j=s[n[n.length-2]][n[n.length-1]],n.push(j);break;case 3:return!0}}return!0},`parse`)};se.lexer=(function(){return{EOF:1,parseError:r(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:r(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:r(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:r(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:r(function(){return this._more=!0,this},`more`),reject:r(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:r(function(e){this.unput(this.match.slice(e))},`less`),pastInput:r(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:r(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:r(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -0,0 +1 @@
1
+ import{at as e,ot as t}from"./chunk-DU6HZSFF-F1zixM7P.js";var n=(n,r)=>t.lang.round(e.parse(n)[r]);export{n as t};
@@ -1,4 +1,4 @@
1
- import{a as e,p as t,r as n,u as r}from"./chunk-75Z2AOVW-baNoC3Nx.js";import{n as i}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as a,p as o}from"./src-B6xuSHsQ.js";import{A as s,B as c,M as l,T as u,b as d,f,g as p,x as m,z as h}from"./chunk-DU6HZSFF-DsMNAX-a.js";import{t as g}from"./chunk-PWAF6VOD-DX5nLVh3.js";import{n as _,r as v}from"./chunk-GMAD6QVW-Cx6hmskd.js";import{a as y,i as b,r as x,t as S}from"./chunk-P2QGCYS3-I7TvSKBB.js";import{t as C}from"./rough.esm-Dy-Kn_BL.js";var w=1,T=3;async function E(e){let n=e.getElementsByTagName(`img`);if(!n||n.length===0)return;let r=!D(e);await Promise.all([...n].map(e=>new Promise(n=>{function a(){if(e.style.display=`flex`,e.style.flexDirection=`column`,r){let n=m().fontSize?m().fontSize:window.getComputedStyle(document.body).fontSize,[r=f.fontSize]=t(n),i=r*5+`px`;e.style.minWidth=i,e.style.maxWidth=i}else e.style.width=`100%`;n(e)}i(a,`setupImage`),setTimeout(()=>{e.complete&&a()}),e.addEventListener(`error`,a),e.addEventListener(`load`,a)})))}i(E,`configureLabelImages`);function D(e){return e.nodeType===T?e.textContent?.trim()!==``:e.nodeType!==w||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(D)}i(D,`hasTextBesidesImages`);var O=3,k=32,A=i(async(t,n,i)=>{let a=m(),s=t.insert(`g`).attr(`class`,i??`node default`).attr(`id`,n.domId||n.id),c=s.insert(`g`).attr(`class`,`label`).attr(`style`,r(n.labelStyle)),l=[{text:typeof n.label==`string`?n.label:n.label?.[0]??``,cssClass:`c4-name`},{text:n.stereotype,cssClass:`c4-type`},...(n.description??[]).map(e=>({text:e,cssClass:`c4-descr`}))].filter(e=>e.text),u=n.width?Math.max(n.width-2*(n.padding??0),k):m().flowchart?.wrappingWidth??200,d=a.c4?.wrap??!0?u:1/0,f=await Promise.all(l.map(async t=>{let r=c.append(`g`).attr(`class`,t.cssClass),i=await _(r,h(e(t.text??``),a),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:d,style:n.labelStyle},a);return o(i).selectAll(`tspan.text-outer-tspan`).attr(`text-anchor`,`middle`),o(i).selectAll(`tspan.text-inner-tspan`).attr(`font-weight`,null).attr(`font-style`,null),{el:r,box:r.node().getBBox()}})),p=Math.max(...f.map(({box:e})=>e.width),0),g=0;for(let{el:e,box:t}of f)e.attr(`transform`,`translate(${p/2-t.x-t.width/2}, ${g-t.y})`),g+=t.height+O;let v=f.length>0?g-O:0;return c.insert(`rect`,`:first-child`),c.attr(`transform`,`translate(${-p/2}, ${-v/2})`),{shapeSvg:s,bbox:c.node().getBBox(),halfPadding:(n.padding??0)/2,label:c}},`c4LabelHelper`),j=i(async(t,n,i)=>{if(n.stereotype!==void 0)return A(t,n,i);let a,s=n.useHtmlLabels||p(m()?.htmlLabels);a=i||`node default`;let c=t.insert(`g`).attr(`class`,a).attr(`id`,n.domId||n.id),l=c.insert(`g`).attr(`class`,`label`).attr(`style`,r(n.labelStyle)),u;u=n.label===void 0?``:typeof n.label==`string`?n.label:n.label[0];let d=!!n.icon||!!n.img,f=n.labelType===`markdown`,g=await _(l,h(e(u),m()),{useHtmlLabels:s,width:n.width||n.wrappingWidth||m().flowchart?.wrappingWidth,classes:f?`markdown-node-label`:``,style:n.labelStyle,addSvgBackground:d,markdown:f},m()),y=(n?.padding??0)/2,b;if(s){let e=g.children[0],t=o(g);await E(e),b=await v.measure(()=>e.getBoundingClientRect()),t.attr(`width`,b.width),t.attr(`height`,b.height)}else b=await v.measure(()=>g.getBBox());return s?l.attr(`transform`,`translate(`+-b.width/2+`, `+-b.height/2+`)`):l.attr(`transform`,`translate(0, `+-b.height/2+`)`),n.centerLabel&&l.attr(`transform`,`translate(`+-b.width/2+`, `+-b.height/2+`)`),l.insert(`rect`,`:first-child`),{shapeSvg:c,bbox:b,halfPadding:y,label:l}},`labelHelper`),M=i(async(t,n,r)=>{let i=r.useHtmlLabels??u(m()),a=t.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),s=await _(a,h(e(n),m()),{useHtmlLabels:i,width:r.width||m()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),c=r.padding/2,l;if(u(m())){let e=s.children[0],t=o(s);l=await v.measure(()=>e.getBoundingClientRect()),t.attr(`width`,l.width),t.attr(`height`,l.height)}else l=await v.measure(()=>s.getBBox());return i?a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`):a.attr(`transform`,`translate(0, `+-l.height/2+`)`),r.centerLabel&&a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`),a.insert(`rect`,`:first-child`),{shapeSvg:t,bbox:l,halfPadding:c,label:a}},`insertLabel`),N=i((e,t,n)=>{if(n){e.width=n.width,e.height=n.height;return}let r=t.node().getBBox();e.width=r.width,e.height=r.height},`updateNodeBounds`),P=i((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function F(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}i(F,`createPathFromPoints`);function I(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}i(I,`generateFullSineWavePoints`);function L(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}i(L,`generateCirclePoints`);function ee(e){let t=Array.from(e.childNodes).filter(e=>e.tagName===`path`),n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),r=t.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);n.setAttribute(`d`,r);let a=t.find(e=>e.getAttribute(`fill`)!==`none`),o=t.find(e=>e.getAttribute(`stroke`)!==`none`),s=i((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(n),c}i(ee,`mergePaths`);var R=i((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),z=i((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),te=i(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let o=m(),s=u(o);return await _(e,a,{style:n,isTitle:r,useHtmlLabels:s,markdown:!1,isNode:i,width:1/0},o)},`createLabel`);function B(e,t){return e.intersect(t)}i(B,`intersectNode`);var ne=B;function V(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}i(V,`intersectEllipse`);var H=V;function re(e,t,n){return H(e,t,t,n)}i(re,`intersectCircle`);var ie=re;function U(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&W(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&W(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}i(U,`intersectLine`);function W(e,t){return e*t>0}i(W,`sameSign`);var G=U;function ae(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=G(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}i(ae,`intersectPolygon`);var K={node:ne,circle:ie,ellipse:H,polygon:ae,rect:R};function oe(e,t){let{labelStyles:n}=b(t);t.labelStyle=n;let i=P(t),o=i;i||(o=`anchor`);let s=e.insert(`g`).attr(`class`,o).attr(`id`,t.domId||t.id),{cssStyles:c}=t,l=C.svg(s),u=y(t,{fill:`black`,stroke:`none`,fillStyle:`solid`});t.look!==`handDrawn`&&(u.roughness=0);let d=l.circle(0,0,2,u),f=s.insert(()=>d,`:first-child`);return f.attr(`class`,`anchor`).attr(`style`,r(c)),N(t,f),t.intersect=function(e){return a.info(`Circle intersect`,t,1,e),K.circle(t,1,e)},s}i(oe,`anchor`);function se(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}i(se,`generateArcPoints`);function ce(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}i(ce,`calculateArcSagitta`);async function le(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?16:a,s=t.look===`neo`?12:a,c=i(e=>e+s,`calcTotalHeight`),l=i(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await j(e,t,P(t)),f=c(t?.height?t?.height:d.height),[p,m]=l(f),h=ce(f,p,m),g=(t?.width?t?.width:d.width)+o*2+h-h,_=f,{cssStyles:v}=t,x=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...se(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...se(g/2,_/2,g/2,-_/2,p,m,!0)],S=C.svg(u),w=y(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let T=F(x),E=S.path(T,w),D=u.insert(()=>E,`:first-child`);return D.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(${p/2}, 0)`),N(t,D),t.intersect=function(e){return K.polygon(t,x,e)},u}i(le,`bowTieRect`);async function ue(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:a}=b(t);t.labelStyle=r;let{shapeSvg:o,bbox:s,label:c}=await j(e,t,P(t)),l=n?.nodeBorder??n?.lineColor??`currentColor`,u=t.padding??12,d=Math.max(s.width+u*2,t.width??0,80),f=Math.max(Math.min(d*.08,12),5),p=Math.max(s.height+u*2+f,t.height??0),m=-p/2+f,h=p/2,g=d*.72,_=[`M${-d/2},${m}`,`L${-g/2},${h}`,`A${g/2},${f} 0 0 0 ${g/2},${h}`,`L${d/2},${m}`,`A${d/2},${f} 0 0 0 ${-d/2},${m}`,`Z`].join(` `),{cssStyles:v}=t,x=o.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(o).path(_,y(t,{}));x.node()?.appendChild(e),v&&x.attr(`style`,v)}else x.append(`path`).attr(`d`,_).attr(`style`,a);x.append(`ellipse`).attr(`cx`,0).attr(`cy`,m).attr(`rx`,d/2).attr(`ry`,f).attr(`style`,`fill:none;stroke:${l};stroke-width:1px`),N(t,x);let S=m+(h-m)/2;c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${S-s.height/2-(s.y-(s.top??0))})`);let w=i((e,t,n)=>Array.from({length:13},(r,i)=>{let a=Math.PI-i*Math.PI/12;return{x:e*Math.cos(a),y:t+n*f*Math.sin(a)}}),`arc`),T=[...w(d/2,m,-1),...w(g/2,h,1).reverse()];return t.intersect=function(e){return K.polygon(t,T,e)},o}i(ue,`bucket`);var de=20,fe=8,pe=80,me=8;async function he(e,t){let{themeVariables:n}=m(),i=n.clusterBkg,a=n.clusterBorder,{nodeStyles:o}=b(t),{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=t.padding??8,d=c.height,f=Math.max(c.width+l*2,pe,t?.width??0),p=Math.max(d+fe+de+l*2,t?.height??0),h=-f/2,g=-p/2,_=-(fe+de)/2,v=s.select(`.label`);v&&(t.useHtmlLabels??u(m())?v.attr(`transform`,`translate(${-c.width/2}, ${-c.height/2+_})`):v.attr(`transform`,`translate(0, ${-c.height/2+_})`));let x;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{fill:i,stroke:a,fillStyle:`solid`}),o=e.path(z(h,g,f,p,me),n);x=s.insert(()=>o,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,r(t.cssStyles))}else x=s.insert(`rect`,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,o).attr(`rx`,me).attr(`ry`,me).attr(`x`,h).attr(`y`,g).attr(`width`,f).attr(`height`,p).attr(`fill`,i).attr(`stroke`,a);let S=g+l+d+fe;s.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,h+8).attr(`y1`,S).attr(`x2`,h+f-8).attr(`y2`,S).attr(`stroke`,a).attr(`stroke-dasharray`,`3, 3`);let w=S+de/2;for(let e=-1;e<=1;e++)s.append(`circle`).attr(`class`,`collapsed-indicator`).attr(`cx`,e*10).attr(`cy`,w).attr(`r`,2.5).attr(`fill`,a);return N(t,x),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},s}i(he,`collapsedGroup`);function q(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}i(q,`insertPolygonShape`);var ge=[`right`,`left`,`up`,`down`],_e=`point`,ve=i(e=>{let t=new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n)}return t},`expandAndDeduplicateDirections`),ye=i(e=>ge.filter(t=>e.has(t)).join(`|`)||_e,`getDirectionKey`),be={"right|left|up|down":i(({height:e,midpoint:t,padding:n,width:r})=>[{x:0,y:0},{x:t,y:0},{x:r/2,y:2*n},{x:r-t,y:0},{x:r,y:0},{x:r,y:-e/3},{x:r+2*n,y:-e/2},{x:r,y:-2*e/3},{x:r,y:-e},{x:r-t,y:-e},{x:r/2,y:-e-2*n},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*n,y:-e/2},{x:0,y:-e/3}],`right|left|up|down`),"right|left|up":i(({height:e,midpoint:t,width:n})=>[{x:t,y:0},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],`right|left|up`),"right|left|down":i(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:t,y:-e},{x:n-t,y:-e},{x:n,y:0}],`right|left|down`),"right|up|down":i(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:n,y:-e+t},{x:0,y:-e}],`right|up|down`),"left|up|down":i(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:n,y:-e}],`left|up|down`),"right|left":i(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`right|left`),"up|down":i(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`up|down`),"right|up":i(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:0,y:-e}],`right|up`),"right|down":i(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],`right|down`),"left|up":i(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:n,y:-e}],`left|up`),"left|down":i(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],`left|down`),right:i(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e+n}],`right`),left:i(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`left`),up:i(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n}],`up`),down:i(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`down`),[_e]:()=>[{x:0,y:0}]},xe=i((e,t,n,r)=>{let i=ve(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,c=r??t.width+2*s+2*a;return(be[ye(i)]??be[_e])({height:o,midpoint:s,padding:a,width:c})},`getArrowPoints`);async function Se(e,t){let n=t,{shapeSvg:r,bbox:i}=await j(e,n,P(n)),a=n.padding??0,o=i.height+2*a,s=o/2,c=i.width+2*s+a,l=n.width??0,u=n.positioned&&(n.widthInColumns??1)>1&&l>c?l:c,d=xe(n.directions??[],i,n,u),f=q(r,u,o,d);return f.attr(`style`,n.style??null),N(n,f),n.intersect=function(e){return K.polygon(n,d,e)},r}i(Se,`block_arrow`);async function Ce(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+18,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(z(-u/2,f,u,d,12),y(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`line`).attr(`x1`,-u/2).attr(`y1`,f+18).attr(`x2`,u/2).attr(`y2`,f+18).attr(`style`,`stroke:${c};stroke-width:1px`);for(let e=0;e<3;e++)m.append(`circle`).attr(`cx`,-u/2+12+e*9).attr(`cy`,f+9).attr(`r`,2.5).attr(`style`,`fill:${c};stroke:none`);m.append(`rect`).attr(`class`,`browser-address-bar`).attr(`x`,-u/2+44).attr(`y`,f+4).attr(`width`,Math.max(u-56,10)).attr(`height`,10).attr(`rx`,3).attr(`ry`,3).attr(`style`,`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),N(t,m);let h=f+18+(d-18)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}i(Ce,`browser`);var we=12;async function Te(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+we),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+we,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+we},{x:0+we,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{}),r=F(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(s,l,u,p);return r&&m.attr(`style`,r),N(t,m),t.intersect=function(e){return K.polygon(t,p,e)},s}i(Te,`card`);function Ee(e,t){let{nodeStyles:n}=b(t);t.label=``;let r=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=C.svg(r),c=y(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=F(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return K.polygon(t,o,e)},r}i(Ee,`choice`);async function De(e,t,n){let{labelStyles:i,nodeStyles:o}=b(t);t.labelStyle=i;let{shapeSvg:s,bbox:c,halfPadding:l}=await j(e,t,P(t)),u=n?.padding??l,d=t.look===`neo`?c.width/2+32:c.width/2+u,f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{}),i=e.circle(0,0,d*2,n);f=s.insert(()=>i,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,r(p))}else f=s.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,o).attr(`r`,d).attr(`cx`,0).attr(`cy`,0);return N(t,f),t.calcIntersect=function(e,t){let n=e.width/2;return K.circle(e,n,t)},t.intersect=function(e){return a.info(`Circle intersect`,t,d,e),K.circle(t,d,e)},s}i(De,`circle`);async function Oe(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await j(e,n,[`node`,n.cssClasses,n.class].filter(Boolean).join(` `)),o=r.insert(`rect`,`:first-child`),s=n.padding??0,c=n.positioned?n.width??0:i.width+s,l=n.positioned?n.height??0:i.height+s,u=n.positioned?-c/2:-i.width/2-a,d=n.positioned?-l/2:-i.height/2-a;return o.attr(`class`,`basic cluster composite label-container`).attr(`style`,n.style??null).attr(`rx`,n.rx??null).attr(`ry`,n.ry??null).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l),N(n,o),n.intersect=function(e){return K.rect(n,e)},r}i(Oe,`composite`);async function ke(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+20,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(z(-u/2,f,u,d,12),y(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`text`).attr(`x`,-u/2+12).attr(`y`,f+16).attr(`class`,`console-glyph`).attr(`style`,`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(`>_`),N(t,m);let h=f+20+(d-20)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}i(ke,`consoleWindow`);function Ae(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
1
+ import{a as e,p as t,r as n,u as r}from"./chunk-75Z2AOVW-je7n2rKZ.js";import{n as i}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as a,p as o}from"./src-B6xuSHsQ.js";import{A as s,B as c,M as l,T as u,b as d,f,g as p,x as m,z as h}from"./chunk-DU6HZSFF-F1zixM7P.js";import{t as g}from"./chunk-PWAF6VOD-Bel4-2PG.js";import{n as _,r as v}from"./chunk-GMAD6QVW-BkmOYpMZ.js";import{a as y,i as b,r as x,t as S}from"./chunk-P2QGCYS3-BG5yayjZ.js";import{t as C}from"./rough.esm-Dy-Kn_BL.js";var w=1,T=3;async function E(e){let n=e.getElementsByTagName(`img`);if(!n||n.length===0)return;let r=!D(e);await Promise.all([...n].map(e=>new Promise(n=>{function a(){if(e.style.display=`flex`,e.style.flexDirection=`column`,r){let n=m().fontSize?m().fontSize:window.getComputedStyle(document.body).fontSize,[r=f.fontSize]=t(n),i=r*5+`px`;e.style.minWidth=i,e.style.maxWidth=i}else e.style.width=`100%`;n(e)}i(a,`setupImage`),setTimeout(()=>{e.complete&&a()}),e.addEventListener(`error`,a),e.addEventListener(`load`,a)})))}i(E,`configureLabelImages`);function D(e){return e.nodeType===T?e.textContent?.trim()!==``:e.nodeType!==w||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(D)}i(D,`hasTextBesidesImages`);var O=3,k=32,A=i(async(t,n,i)=>{let a=m(),s=t.insert(`g`).attr(`class`,i??`node default`).attr(`id`,n.domId||n.id),c=s.insert(`g`).attr(`class`,`label`).attr(`style`,r(n.labelStyle)),l=[{text:typeof n.label==`string`?n.label:n.label?.[0]??``,cssClass:`c4-name`},{text:n.stereotype,cssClass:`c4-type`},...(n.description??[]).map(e=>({text:e,cssClass:`c4-descr`}))].filter(e=>e.text),u=n.width?Math.max(n.width-2*(n.padding??0),k):m().flowchart?.wrappingWidth??200,d=a.c4?.wrap??!0?u:1/0,f=await Promise.all(l.map(async t=>{let r=c.append(`g`).attr(`class`,t.cssClass),i=await _(r,h(e(t.text??``),a),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:d,style:n.labelStyle},a);return o(i).selectAll(`tspan.text-outer-tspan`).attr(`text-anchor`,`middle`),o(i).selectAll(`tspan.text-inner-tspan`).attr(`font-weight`,null).attr(`font-style`,null),{el:r,box:r.node().getBBox()}})),p=Math.max(...f.map(({box:e})=>e.width),0),g=0;for(let{el:e,box:t}of f)e.attr(`transform`,`translate(${p/2-t.x-t.width/2}, ${g-t.y})`),g+=t.height+O;let v=f.length>0?g-O:0;return c.insert(`rect`,`:first-child`),c.attr(`transform`,`translate(${-p/2}, ${-v/2})`),{shapeSvg:s,bbox:c.node().getBBox(),halfPadding:(n.padding??0)/2,label:c}},`c4LabelHelper`),j=i(async(t,n,i)=>{if(n.stereotype!==void 0)return A(t,n,i);let a,s=n.useHtmlLabels||p(m()?.htmlLabels);a=i||`node default`;let c=t.insert(`g`).attr(`class`,a).attr(`id`,n.domId||n.id),l=c.insert(`g`).attr(`class`,`label`).attr(`style`,r(n.labelStyle)),u;u=n.label===void 0?``:typeof n.label==`string`?n.label:n.label[0];let d=!!n.icon||!!n.img,f=n.labelType===`markdown`,g=await _(l,h(e(u),m()),{useHtmlLabels:s,width:n.width||n.wrappingWidth||m().flowchart?.wrappingWidth,classes:f?`markdown-node-label`:``,style:n.labelStyle,addSvgBackground:d,markdown:f},m()),y=(n?.padding??0)/2,b;if(s){let e=g.children[0],t=o(g);await E(e),b=await v.measure(()=>e.getBoundingClientRect()),t.attr(`width`,b.width),t.attr(`height`,b.height)}else b=await v.measure(()=>g.getBBox());return s?l.attr(`transform`,`translate(`+-b.width/2+`, `+-b.height/2+`)`):l.attr(`transform`,`translate(0, `+-b.height/2+`)`),n.centerLabel&&l.attr(`transform`,`translate(`+-b.width/2+`, `+-b.height/2+`)`),l.insert(`rect`,`:first-child`),{shapeSvg:c,bbox:b,halfPadding:y,label:l}},`labelHelper`),M=i(async(t,n,r)=>{let i=r.useHtmlLabels??u(m()),a=t.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),s=await _(a,h(e(n),m()),{useHtmlLabels:i,width:r.width||m()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),c=r.padding/2,l;if(u(m())){let e=s.children[0],t=o(s);l=await v.measure(()=>e.getBoundingClientRect()),t.attr(`width`,l.width),t.attr(`height`,l.height)}else l=await v.measure(()=>s.getBBox());return i?a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`):a.attr(`transform`,`translate(0, `+-l.height/2+`)`),r.centerLabel&&a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`),a.insert(`rect`,`:first-child`),{shapeSvg:t,bbox:l,halfPadding:c,label:a}},`insertLabel`),N=i((e,t,n)=>{if(n){e.width=n.width,e.height=n.height;return}let r=t.node().getBBox();e.width=r.width,e.height=r.height},`updateNodeBounds`),P=i((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function F(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}i(F,`createPathFromPoints`);function I(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}i(I,`generateFullSineWavePoints`);function L(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}i(L,`generateCirclePoints`);function ee(e){let t=Array.from(e.childNodes).filter(e=>e.tagName===`path`),n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),r=t.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);n.setAttribute(`d`,r);let a=t.find(e=>e.getAttribute(`fill`)!==`none`),o=t.find(e=>e.getAttribute(`stroke`)!==`none`),s=i((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(n),c}i(ee,`mergePaths`);var R=i((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),z=i((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),te=i(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let o=m(),s=u(o);return await _(e,a,{style:n,isTitle:r,useHtmlLabels:s,markdown:!1,isNode:i,width:1/0},o)},`createLabel`);function B(e,t){return e.intersect(t)}i(B,`intersectNode`);var ne=B;function V(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}i(V,`intersectEllipse`);var H=V;function re(e,t,n){return H(e,t,t,n)}i(re,`intersectCircle`);var ie=re;function U(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&W(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&W(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}i(U,`intersectLine`);function W(e,t){return e*t>0}i(W,`sameSign`);var G=U;function ae(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=G(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}i(ae,`intersectPolygon`);var K={node:ne,circle:ie,ellipse:H,polygon:ae,rect:R};function oe(e,t){let{labelStyles:n}=b(t);t.labelStyle=n;let i=P(t),o=i;i||(o=`anchor`);let s=e.insert(`g`).attr(`class`,o).attr(`id`,t.domId||t.id),{cssStyles:c}=t,l=C.svg(s),u=y(t,{fill:`black`,stroke:`none`,fillStyle:`solid`});t.look!==`handDrawn`&&(u.roughness=0);let d=l.circle(0,0,2,u),f=s.insert(()=>d,`:first-child`);return f.attr(`class`,`anchor`).attr(`style`,r(c)),N(t,f),t.intersect=function(e){return a.info(`Circle intersect`,t,1,e),K.circle(t,1,e)},s}i(oe,`anchor`);function se(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}i(se,`generateArcPoints`);function ce(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}i(ce,`calculateArcSagitta`);async function le(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?16:a,s=t.look===`neo`?12:a,c=i(e=>e+s,`calcTotalHeight`),l=i(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await j(e,t,P(t)),f=c(t?.height?t?.height:d.height),[p,m]=l(f),h=ce(f,p,m),g=(t?.width?t?.width:d.width)+o*2+h-h,_=f,{cssStyles:v}=t,x=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...se(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...se(g/2,_/2,g/2,-_/2,p,m,!0)],S=C.svg(u),w=y(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let T=F(x),E=S.path(T,w),D=u.insert(()=>E,`:first-child`);return D.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(${p/2}, 0)`),N(t,D),t.intersect=function(e){return K.polygon(t,x,e)},u}i(le,`bowTieRect`);async function ue(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:a}=b(t);t.labelStyle=r;let{shapeSvg:o,bbox:s,label:c}=await j(e,t,P(t)),l=n?.nodeBorder??n?.lineColor??`currentColor`,u=t.padding??12,d=Math.max(s.width+u*2,t.width??0,80),f=Math.max(Math.min(d*.08,12),5),p=Math.max(s.height+u*2+f,t.height??0),m=-p/2+f,h=p/2,g=d*.72,_=[`M${-d/2},${m}`,`L${-g/2},${h}`,`A${g/2},${f} 0 0 0 ${g/2},${h}`,`L${d/2},${m}`,`A${d/2},${f} 0 0 0 ${-d/2},${m}`,`Z`].join(` `),{cssStyles:v}=t,x=o.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(o).path(_,y(t,{}));x.node()?.appendChild(e),v&&x.attr(`style`,v)}else x.append(`path`).attr(`d`,_).attr(`style`,a);x.append(`ellipse`).attr(`cx`,0).attr(`cy`,m).attr(`rx`,d/2).attr(`ry`,f).attr(`style`,`fill:none;stroke:${l};stroke-width:1px`),N(t,x);let S=m+(h-m)/2;c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${S-s.height/2-(s.y-(s.top??0))})`);let w=i((e,t,n)=>Array.from({length:13},(r,i)=>{let a=Math.PI-i*Math.PI/12;return{x:e*Math.cos(a),y:t+n*f*Math.sin(a)}}),`arc`),T=[...w(d/2,m,-1),...w(g/2,h,1).reverse()];return t.intersect=function(e){return K.polygon(t,T,e)},o}i(ue,`bucket`);var de=20,fe=8,pe=80,me=8;async function he(e,t){let{themeVariables:n}=m(),i=n.clusterBkg,a=n.clusterBorder,{nodeStyles:o}=b(t),{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=t.padding??8,d=c.height,f=Math.max(c.width+l*2,pe,t?.width??0),p=Math.max(d+fe+de+l*2,t?.height??0),h=-f/2,g=-p/2,_=-(fe+de)/2,v=s.select(`.label`);v&&(t.useHtmlLabels??u(m())?v.attr(`transform`,`translate(${-c.width/2}, ${-c.height/2+_})`):v.attr(`transform`,`translate(0, ${-c.height/2+_})`));let x;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{fill:i,stroke:a,fillStyle:`solid`}),o=e.path(z(h,g,f,p,me),n);x=s.insert(()=>o,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,r(t.cssStyles))}else x=s.insert(`rect`,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,o).attr(`rx`,me).attr(`ry`,me).attr(`x`,h).attr(`y`,g).attr(`width`,f).attr(`height`,p).attr(`fill`,i).attr(`stroke`,a);let S=g+l+d+fe;s.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,h+8).attr(`y1`,S).attr(`x2`,h+f-8).attr(`y2`,S).attr(`stroke`,a).attr(`stroke-dasharray`,`3, 3`);let w=S+de/2;for(let e=-1;e<=1;e++)s.append(`circle`).attr(`class`,`collapsed-indicator`).attr(`cx`,e*10).attr(`cy`,w).attr(`r`,2.5).attr(`fill`,a);return N(t,x),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},s}i(he,`collapsedGroup`);function q(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}i(q,`insertPolygonShape`);var ge=[`right`,`left`,`up`,`down`],_e=`point`,ve=i(e=>{let t=new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n)}return t},`expandAndDeduplicateDirections`),ye=i(e=>ge.filter(t=>e.has(t)).join(`|`)||_e,`getDirectionKey`),be={"right|left|up|down":i(({height:e,midpoint:t,padding:n,width:r})=>[{x:0,y:0},{x:t,y:0},{x:r/2,y:2*n},{x:r-t,y:0},{x:r,y:0},{x:r,y:-e/3},{x:r+2*n,y:-e/2},{x:r,y:-2*e/3},{x:r,y:-e},{x:r-t,y:-e},{x:r/2,y:-e-2*n},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*n,y:-e/2},{x:0,y:-e/3}],`right|left|up|down`),"right|left|up":i(({height:e,midpoint:t,width:n})=>[{x:t,y:0},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],`right|left|up`),"right|left|down":i(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:t,y:-e},{x:n-t,y:-e},{x:n,y:0}],`right|left|down`),"right|up|down":i(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:n,y:-e+t},{x:0,y:-e}],`right|up|down`),"left|up|down":i(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:n,y:-e}],`left|up|down`),"right|left":i(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`right|left`),"up|down":i(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`up|down`),"right|up":i(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:0,y:-e}],`right|up`),"right|down":i(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],`right|down`),"left|up":i(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:n,y:-e}],`left|up`),"left|down":i(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],`left|down`),right:i(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e+n}],`right`),left:i(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`left`),up:i(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n}],`up`),down:i(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`down`),[_e]:()=>[{x:0,y:0}]},xe=i((e,t,n,r)=>{let i=ve(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,c=r??t.width+2*s+2*a;return(be[ye(i)]??be[_e])({height:o,midpoint:s,padding:a,width:c})},`getArrowPoints`);async function Se(e,t){let n=t,{shapeSvg:r,bbox:i}=await j(e,n,P(n)),a=n.padding??0,o=i.height+2*a,s=o/2,c=i.width+2*s+a,l=n.width??0,u=n.positioned&&(n.widthInColumns??1)>1&&l>c?l:c,d=xe(n.directions??[],i,n,u),f=q(r,u,o,d);return f.attr(`style`,n.style??null),N(n,f),n.intersect=function(e){return K.polygon(n,d,e)},r}i(Se,`block_arrow`);async function Ce(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+18,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(z(-u/2,f,u,d,12),y(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`line`).attr(`x1`,-u/2).attr(`y1`,f+18).attr(`x2`,u/2).attr(`y2`,f+18).attr(`style`,`stroke:${c};stroke-width:1px`);for(let e=0;e<3;e++)m.append(`circle`).attr(`cx`,-u/2+12+e*9).attr(`cy`,f+9).attr(`r`,2.5).attr(`style`,`fill:${c};stroke:none`);m.append(`rect`).attr(`class`,`browser-address-bar`).attr(`x`,-u/2+44).attr(`y`,f+4).attr(`width`,Math.max(u-56,10)).attr(`height`,10).attr(`rx`,3).attr(`ry`,3).attr(`style`,`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),N(t,m);let h=f+18+(d-18)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}i(Ce,`browser`);var we=12;async function Te(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+we),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+we,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+we},{x:0+we,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{}),r=F(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(s,l,u,p);return r&&m.attr(`style`,r),N(t,m),t.intersect=function(e){return K.polygon(t,p,e)},s}i(Te,`card`);function Ee(e,t){let{nodeStyles:n}=b(t);t.label=``;let r=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=C.svg(r),c=y(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=F(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return K.polygon(t,o,e)},r}i(Ee,`choice`);async function De(e,t,n){let{labelStyles:i,nodeStyles:o}=b(t);t.labelStyle=i;let{shapeSvg:s,bbox:c,halfPadding:l}=await j(e,t,P(t)),u=n?.padding??l,d=t.look===`neo`?c.width/2+32:c.width/2+u,f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{}),i=e.circle(0,0,d*2,n);f=s.insert(()=>i,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,r(p))}else f=s.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,o).attr(`r`,d).attr(`cx`,0).attr(`cy`,0);return N(t,f),t.calcIntersect=function(e,t){let n=e.width/2;return K.circle(e,n,t)},t.intersect=function(e){return a.info(`Circle intersect`,t,d,e),K.circle(t,d,e)},s}i(De,`circle`);async function Oe(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await j(e,n,[`node`,n.cssClasses,n.class].filter(Boolean).join(` `)),o=r.insert(`rect`,`:first-child`),s=n.padding??0,c=n.positioned?n.width??0:i.width+s,l=n.positioned?n.height??0:i.height+s,u=n.positioned?-c/2:-i.width/2-a,d=n.positioned?-l/2:-i.height/2-a;return o.attr(`class`,`basic cluster composite label-container`).attr(`style`,n.style??null).attr(`rx`,n.rx??null).attr(`ry`,n.ry??null).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l),N(n,o),n.intersect=function(e){return K.rect(n,e)},r}i(Oe,`composite`);async function ke(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+20,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(z(-u/2,f,u,d,12),y(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`text`).attr(`x`,-u/2+12).attr(`y`,f+16).attr(`class`,`console-glyph`).attr(`style`,`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(`>_`),N(t,m);let h=f+20+(d-20)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}i(ke,`consoleWindow`);function Ae(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
2
2
  M ${i.x},${i.y} L ${o.x},${o.y}`}i(Ae,`createLine`);function je(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n,t.label=``;let i=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),o=Math.max(30,t?.width??0),{cssStyles:s}=t,c=C.svg(i),l=y(t,{});t.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=c.circle(0,0,o*2,l),d=Ae(o),f=c.path(d,l),p=i.insert(()=>u,`:first-child`);return p.insert(()=>f),p.attr(`class`,`outer-path`),s&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,s),r&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,r),N(t,p),t.intersect=function(e){return a.info(`crossedCircle intersect`,t,{radius:o,point:e}),K.circle(t,o,e)},i}i(je,`crossedCircle`);function J(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}i(J,`generateCirclePoints`);async function Me(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+s,u=a.height+c,d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...J(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...J(l/2+d*2,-d,d,20,-180,-270),...J(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...J(l/2,u/2,d,20,0,90)],m=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...J(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...J(l/2+l*.1,-d,d,20,-180,-270),...J(l/2+l*.1,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...J(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2,y:u/2+d}],h=C.svg(i),g=y(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=F(p).replace(`Z`,``),v=h.path(_,g),x=F(m),S=h.path(x,{...g}),w=i.insert(`g`,`:first-child`);return w.insert(()=>S,`:first-child`).attr(`stroke-opacity`,0),w.insert(()=>v,`:first-child`),w.attr(`class`,`text`),f&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${d}, 0)`),o.attr(`transform`,`translate(${-l/2+d-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),N(t,w),t.intersect=function(e){return K.polygon(t,m,e)},i}i(Me,`curlyBraceLeft`);function Y(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:a,y:l})}return o}i(Y,`generateCirclePoints`);async function Ne(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...Y(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Y(l/2+d*2,-d,d,20,-180,-270),...Y(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Y(l/2,u/2,d,20,0,90)],m=[{x:-l/2,y:-u/2-d},{x:l/2,y:-u/2-d},...Y(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Y(l/2+d*2,-d,d,20,-180,-270),...Y(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Y(l/2,u/2,d,20,0,90),{x:l/2,y:u/2+d},{x:-l/2,y:u/2+d}],h=C.svg(i),g=y(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=F(p).replace(`Z`,``),v=h.path(_,g),x=F(m),S=h.path(x,{...g}),w=i.insert(`g`,`:first-child`);return w.insert(()=>S,`:first-child`).attr(`stroke-opacity`,0),w.insert(()=>v,`:first-child`),w.attr(`class`,`text`),f&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${-d}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),N(t,w),t.intersect=function(e){return K.polygon(t,m,e)},i}i(Ne,`curlyBraceRight`);function X(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}i(X,`generateCirclePoints`);async function Pe(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...X(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...X(l/2+d*2,-d,d,20,-180,-270),...X(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...X(l/2,u/2,d,20,0,90)],m=[...X(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...X(-l/2-d/2,-d,d,20,0,90),...X(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...X(-l/2+d+d/2,u/2,d,30,-180,-270)],h=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...X(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...X(l/2+d*2,-d,d,20,-180,-270),...X(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...X(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2-d-d/2,y:u/2+d},...X(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...X(-l/2-d/2,-d,d,20,0,90),...X(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...X(-l/2+d+d/2,u/2,d,30,-180,-270)],g=C.svg(i),_=y(t,{fill:`none`});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=F(p).replace(`Z`,``),x=g.path(v,_),S=F(m).replace(`Z`,``),w=g.path(S,_),T=F(h),E=g.path(T,{..._}),D=i.insert(`g`,`:first-child`);return D.insert(()=>E,`:first-child`).attr(`stroke-opacity`,0),D.insert(()=>x,`:first-child`),D.insert(()=>w,`:first-child`),D.attr(`class`,`text`),f&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(${d-d/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),N(t,D),t.intersect=function(e){return K.polygon(t,h,e)},i}i(Pe,`curlyBraces`);async function Fe(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(20,(c.width+a*2)*1.25,t?.width??0),u=Math.max(5,c.height+o*2,t?.height??0),d=u/2,{cssStyles:f}=t,p=C.svg(s),m=y(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=l,g=u,_=h-d,v=g/4,x=[{x:_,y:0},{x:v,y:0},{x:0,y:g/2},{x:v,y:g},{x:_,y:g},...L(-_,-g/2,d,50,270,90)],S=F(x),w=p.path(S,m),T=s.insert(()=>w,`:first-child`);return T.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,r),T.attr(`transform`,`translate(${-l/2}, ${-u/2})`),N(t,T),t.intersect=function(e){return K.polygon(t,x,e)},s}i(Fe,`curvedTrapezoid`);async function Ie(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.padding??20,c=Math.max(a.width+s*2,t.width??0,100),l=Math.min(Math.max(c*.23,16),56),u=l*.27,d=Math.max(a.height+s*2,t.height?t.height-(2*l-u):0),f=Math.min(c*.177,d*.45),p=d+2*l-u,m=-p/2,h=m+2*l-u,g=i.insert(`g`,`:first-child`).attr(`class`,`basic label-container`),{cssStyles:_}=t;if(t.look===`handDrawn`){let e=C.svg(i),n=y(t,{}),r=e.path(z(-c/2,h,c,d,f),n),a=e.circle(0,m+l,l*2,n);g.insert(()=>a,`:first-child`),g.insert(()=>r,`:first-child`),_&&g.attr(`style`,_)}else g.append(`rect`).attr(`x`,-c/2).attr(`y`,h).attr(`width`,c).attr(`height`,d).attr(`rx`,f).attr(`ry`,f).attr(`style`,r),g.append(`circle`).attr(`cx`,0).attr(`cy`,m+l).attr(`r`,l).attr(`style`,r);N(t,g);let v=h+d/2;o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${v-a.height/2-(a.y-(a.top??0))})`);let x=m+l,S=Math.asin(Math.min(1,(h-x)/l))*180/Math.PI,w=[...L(0,-x,l,24,180+S,-S),...L(-(-c/2+f),-(h+f),f,12,90,0),...L(-(-c/2+f),-(p/2-f),f,12,360,270),...L(-(c/2-f),-(p/2-f),f,12,270,180),...L(-(c/2-f),-(h+f),f,12,180,90)];return t.intersect=function(e){return K.polygon(t,w,e)},i}i(Ie,`person`);var Le=i((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),Re=i((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),ze=i((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Be=8,Ve=8;async function He(e,t){let{labelStyles:n,nodeStyles:i}=b(t);t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?24:a,s=t.look===`neo`?24:a,c=t.width??0;if(t.width&&(t.width-=s,t.width<Ve&&(t.width=Ve)),t.height){let e=c/2/(2.5+c/50);t.height=t.height-o-e*3,t.height<Be&&(t.height=Be)}let{shapeSvg:l,bbox:u,label:d}=await j(e,t,P(t)),f=Math.max(t.width??0,u.width)+s,p=f/2,m=p/(2.5+f/50),h=Math.max(t.height??0,u.height)+o+m,g,{cssStyles:_}=t;if(t.look===`handDrawn`){let e=C.svg(l),n=Re(0,0,f,h,p,m),r=ze(0,m,f,h,p,m),i=y(t,{}),a=e.path(n,i),o=e.path(r,y(t,{fill:`none`}));g=l.insert(()=>o,`:first-child`),g=l.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container`),_&&g.attr(`style`,_)}else{let e=Le(0,0,f,h,p,m);g=l.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,r(_)).attr(`style`,i)}return g.attr(`label-offset-y`,m),g.attr(`transform`,`translate(${-f/2}, ${-(h/2+m)})`),N(t,g),d.attr(`transform`,`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(t.padding??0)/1.5-(u.y-(u.top??0))})`),t.intersect=function(e){let n=K.rect(t,e),r=n.x-(t.x??0);if(p!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-m)){let i=m*m*(1-r*r/(p*p));i>0&&(i=Math.sqrt(i)),i=m-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},l}i(He,`cylinder`);async function Ue(e,t,n){let{labelStyles:i,nodeStyles:a}=b(t);t.labelStyle=i;let{shapeSvg:o,bbox:s}=await j(e,t,P(t)),c=Math.max(s.width+n.labelPaddingX*2,t?.width||0),l=Math.max(s.height+n.labelPaddingY*2,t?.height||0),u=-c/2,d=-l/2,f,{rx:p,ry:m}=t,{cssStyles:h}=t;if(n?.rx&&n.ry&&(p=n.rx,m=n.ry),t.look===`handDrawn`){let e=C.svg(o),n=y(t,{}),i=p||m?e.path(z(u,d,c,l,p||0),n):e.rectangle(u,d,c,l,n);f=o.insert(()=>i,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,r(h))}else f=o.insert(`rect`,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,a).attr(`rx`,r(p)).attr(`ry`,r(m)).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l);return N(t,f,t.look===`handDrawn`?void 0:{width:c,height:l}),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},o}i(Ue,`drawRect`);async function We(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,c=await Ue(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=C.svg(c),n=y(t,{}),r=c.select(`.basic.label-container > path:nth-child(2)`),i=r.node();if(!i)return c;let a=null;if(i instanceof SVGGraphicsElement)a=i.getBBox();else return c;return c.insert(()=>e.line(a.x,a.y,a.x+a.width,a.y,n),`.basic.label-container g.label`),c.insert(()=>e.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,n),`.basic.label-container g.label`),r.remove(),c}let l=c.select(`.basic.label-container`),u=(Number(l.attr(`width`))||o)??0,d=(Number(l.attr(`height`))||s)??0;return u>0&&d>0&&l.attr(`stroke-dasharray`,`${u} ${d}`),c}i(We,`datastore`);async function Ge(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await j(e,t,P(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:m}=t,h=C.svg(o),g=y(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:f,y:p+d},{x:-f,y:p+d},{x:-f,y:-p},{x:f,y:-p},{x:f,y:p},{x:-f,y:p},{x:-f,y:p+d}],v=h.polygon(_.map(e=>[e.x,e.y]),g),x=o.insert(()=>v,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${f+(t.padding??0)/2-(s.x-(s.left??0))}, ${p+d+(t.padding??0)/2-(s.y-(s.top??0))})`),N(t,x),t.intersect=function(e){return K.rect(t,e)},o}i(Ge,`dividedRectangle`);async function Ke(e,t){let{labelStyles:n,nodeStyles:i}=b(t),o=t.look===`neo`?12:5;t.labelStyle=n;let s=t.padding??0,c=t.look===`neo`?16:s,{shapeSvg:l,bbox:u}=await j(e,t,P(t)),d=(t?.width?t?.width/2:u.width/2)+(c??0),f=d-o,p,{cssStyles:m}=t;if(t.look===`handDrawn`){let e=C.svg(l),n=y(t,{roughness:.2,strokeWidth:2.5}),i=y(t,{roughness:.2,strokeWidth:1.5}),a=e.circle(0,0,d*2,n),o=e.circle(0,0,f*2,i);p=l.insert(`g`,`:first-child`),p.attr(`class`,r(t.cssClasses)).attr(`style`,r(m)),p.node()?.appendChild(a),p.node()?.appendChild(o)}else{p=l.insert(`g`,`:first-child`);let e=p.insert(`circle`,`:first-child`),t=p.insert(`circle`);p.attr(`class`,`basic label-container`).attr(`style`,i),e.attr(`class`,`outer-circle`).attr(`style`,i).attr(`r`,d).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,i).attr(`r`,f).attr(`cx`,0).attr(`cy`,0)}return N(t,p),t.intersect=function(e){return a.info(`DoubleCircle intersect`,t,d,e),K.circle(t,d,e)},l}i(Ke,`doublecircle`);function qe(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.label=``,t.labelStyle=r;let o=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=C.svg(o),{nodeBorder:l}=n,u=y(t,{fillStyle:`solid`});t.look!==`handDrawn`&&(u.roughness=0);let d=c.circle(0,0,14,u),f=o.insert(()=>d,`:first-child`);return f.selectAll(`path`).attr(`style`,`fill: ${l} !important;`),s&&s.length>0&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,s),i&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,i),N(t,f),t.intersect=function(e){return a.info(`filledCircle intersect`,t,{radius:7,point:e}),K.circle(t,7,e)},o}i(qe,`filledCircle`);var Je=10,Ye=10;async function Xe(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,o=t.look===`neo`?i*2:i;(t.width||t.height)&&(t.height=t?.height??0,t.height<Je&&(t.height=Je),t.width=(t?.width??0)-o-o/2,t.width<Ye&&(t.width=Ye));let{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=(t?.width?t?.width:c.width)+(o??0),d=t?.height?t?.height:u+c.height,f=d,p=[{x:0,y:-d},{x:f,y:-d},{x:f/2,y:0}],{cssStyles:m}=t,h=C.svg(s),g=y(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=F(p),v=h.path(_,g),x=s.insert(()=>v,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return m&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,r),t.width=u,t.height=d,N(t,x),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-d/2+(t.padding??0)/2+(c.y-(c.top??0))})`),t.intersect=function(e){return a.info(`Triangle intersect`,t,p,e),K.polygon(t,p,e)},s}i(Xe,`flippedTriangle`);async function Ze(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.padding??12,c=Math.max(a.width+s*2,t.width??0,90),l=a.height+s*2,u=Math.max(Math.min(l*.16,14),8),d=Math.max(l+u,t.height??0),f=d-u,p=Math.max(c*.38,28),m=-d/2,h=[{x:-c/2,y:m},{x:-c/2+p,y:m},{x:-c/2+p,y:m+u},{x:c/2,y:m+u},{x:c/2,y:d/2},{x:-c/2,y:d/2}],g=[`M${h[0].x},${h[0].y}`,...h.slice(1).map(e=>`L${e.x},${e.y}`),`Z`].join(` `),{cssStyles:_}=t,v;if(t.look===`handDrawn`){let e=C.svg(i).path(g,y(t,{}));v=i.insert(()=>e,`:first-child`).attr(`class`,`basic label-container`),_&&v.attr(`style`,_)}else v=i.insert(`path`,`:first-child`).attr(`d`,g).attr(`class`,`basic label-container`).attr(`style`,r);t.look===`handDrawn`?N(t,v):N(t,v,{width:c,height:d});let x=m+u+f/2;return o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(e){return K.polygon(t,h,e)},i}i(Ze,`folder`);function Qe(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=b(t);t.label=``;let o=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);n===`LR`&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=C.svg(o),p=y(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.rectangle(u,d,c,l,p),h=o.insert(()=>m,`:first-child`);s&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),N(t,h);let g=r?.padding??0;return t.width&&t.height&&(t.width+=g/2||0,t.height+=g/2||0),t.intersect=function(e){return K.rect(t,e)},o}i(Qe,`forkJoin`);async function $e(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,o=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10),t.width=(t?.width??0)-i*2,t.width<15&&(t.width=15));let{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.width?t?.width:Math.max(15,c.width))+i*2,u=(t?.height?t?.height:Math.max(10,c.height))+o*2,d=u/2,{cssStyles:f}=t,p=C.svg(s),m=y(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-l/2,y:-u/2},{x:l/2-d,y:-u/2},...L(-l/2+d,0,d,50,90,270),{x:l/2-d,y:u/2},{x:-l/2,y:u/2}],g=F(h),_=p.path(g,m),v=s.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),N(t,v),t.intersect=function(e){return a.info(`Pill intersect`,t,{radius:d,point:e}),K.polygon(t,h,e)},s}i($e,`halfRoundedRectangle`);var et=i((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`);async function tt(e,t){let{labelStyles:n,nodeStyles:r}=b(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=(t?.width??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:c,bbox:l}=await j(e,t,P(t)),u=(t?.height?t?.height:l.height)+o,d=u/i,f=(t?.width?t?.width:l.width)+2*d+s,p=[{x:d,y:0},{x:f-d,y:0},{x:f,y:-u/2},{x:f-d,y:-u},{x:d,y:-u},{x:0,y:-u/2}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=C.svg(c),n=y(t,{}),r=et(0,0,f,u,d),i=e.path(r,n);m=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-f/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,N(t,m),t.intersect=function(e){return K.polygon(t,p,e)},c}i(tt,`hexagon`);async function nt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.label=``,t.labelStyle=n;let{shapeSvg:i}=await j(e,t,P(t)),o=Math.max(30,t?.width??0),s=Math.max(30,t?.height??0),{cssStyles:c}=t,l=C.svg(i),u=y(t,{});t.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],f=F(d),p=l.path(f,u),m=i.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container outer-path`),c&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,c),r&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,r),m.attr(`transform`,`translate(${-o/2}, ${-s/2})`),N(t,m),t.intersect=function(e){return a.info(`Pill intersect`,t,{points:d}),K.polygon(t,d,e)},i}i(nt,`hourglass`);async function rt(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=b(t);t.labelStyle=i;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=r?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await j(e,t,`icon-shape default`),p=t.pos===`t`,m=c,h=c,{nodeBorder:_}=n,{stylesMap:v}=S(t),x=-h/2,w=-m/2,T=t.label?8:0,E=C.svg(u),D=y(t,{stroke:`none`,fill:`none`});t.look!==`handDrawn`&&(D.roughness=0,D.fillStyle=`solid`);let O=E.rectangle(x,w,h,m,D),k=Math.max(h,d.width),A=m+d.height+T,M=E.rectangle(-k/2,-A/2,k,A,{...D,fill:`transparent`,stroke:`none`}),P=u.insert(()=>O,`:first-child`),F=u.insert(()=>M);if(t.icon){let e=u.append(`g`);e.html(`<g>${await g(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${p?d.height/2+T/2-i/2-o:-d.height/2-T/2-i/2-o})`),e.attr(`style`,`color: ${v.get(`stroke`)??_};`)}return f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${p?-A/2:A/2-d.height})`),P.attr(`transform`,`translate(0,${p?d.height/2+T/2:-d.height/2-T/2})`),N(t,F),t.intersect=function(e){if(a.info(`iconSquare intersect`,t,e),!t.label)return K.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,o=[];return o=p?[{x:n-d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2+d.height+T},{x:n+h/2,y:r-i/2+d.height+T},{x:n+h/2,y:r+i/2},{x:n-h/2,y:r+i/2},{x:n-h/2,y:r-i/2+d.height+T},{x:n-d.width/2,y:r-i/2+d.height+T}]:[{x:n-h/2,y:r-i/2},{x:n+h/2,y:r-i/2},{x:n+h/2,y:r-i/2+m},{x:n+d.width/2,y:r-i/2+m},{x:n+d.width/2/2,y:r+i/2},{x:n-d.width/2,y:r+i/2},{x:n-d.width/2,y:r-i/2+m},{x:n-h/2,y:r-i/2+m}],K.polygon(t,o,e)},u}i(rt,`icon`);async function it(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=b(t);t.labelStyle=i;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=r?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await j(e,t,`icon-shape default`),p=t.label?8:0,m=t.pos===`t`,{nodeBorder:h,mainBkg:_}=n,{stylesMap:v}=S(t),x=C.svg(u),w=y(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`),w.stroke=v.get(`fill`)??_;let T=u.append(`g`);t.icon&&T.html(`<g>${await g(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let E=T.node().getBBox(),D=E.width,O=E.height,k=E.x,A=E.y,M=Math.max(D,O)*Math.SQRT2+40,P=x.circle(0,0,M,w),F=Math.max(M,d.width),I=M+d.height+p,L=x.rectangle(-F/2,-I/2,F,I,{...w,fill:`transparent`,stroke:`none`}),ee=u.insert(()=>P,`:first-child`),R=u.insert(()=>L);return T.attr(`transform`,`translate(${-D/2-k},${m?d.height/2+p/2-O/2-A:-d.height/2-p/2-O/2-A})`),T.attr(`style`,`color: ${v.get(`stroke`)??h};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-I/2:I/2-d.height})`),ee.attr(`transform`,`translate(0,${m?d.height/2+p/2:-d.height/2-p/2})`),N(t,R),t.intersect=function(e){return a.info(`iconSquare intersect`,t,e),K.rect(t,e)},u}i(it,`iconCircle`);async function at(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=b(t);t.labelStyle=i;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=r?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await j(e,t,`icon-shape default`),m=t.pos===`t`,h=c+f*2,_=c+f*2,{nodeBorder:v,mainBkg:x}=n,{stylesMap:w}=S(t),T=-_/2,E=-h/2,D=t.label?8:0,O=C.svg(u),k=y(t,{});t.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`),k.stroke=w.get(`fill`)??x;let A=O.path(z(T,E,_,h,5),k),M=Math.max(_,d.width),P=h+d.height+D,F=O.rectangle(-M/2,-P/2,M,P,{...k,fill:`transparent`,stroke:`none`}),I=u.insert(()=>A,`:first-child`).attr(`class`,`icon-shape2`),L=u.insert(()=>F);if(t.icon){let e=u.append(`g`);e.html(`<g>${await g(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${w.get(`stroke`)??v};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-P/2:P/2-d.height})`),I.attr(`transform`,`translate(0,${m?d.height/2+D/2:-d.height/2-D/2})`),N(t,L),t.intersect=function(e){if(a.info(`iconSquare intersect`,t,e),!t.label)return K.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,o=[];return o=m?[{x:n-d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2+d.height+D},{x:n+_/2,y:r-i/2+d.height+D},{x:n+_/2,y:r+i/2},{x:n-_/2,y:r+i/2},{x:n-_/2,y:r-i/2+d.height+D},{x:n-d.width/2,y:r-i/2+d.height+D}]:[{x:n-_/2,y:r-i/2},{x:n+_/2,y:r-i/2},{x:n+_/2,y:r-i/2+h},{x:n+d.width/2,y:r-i/2+h},{x:n+d.width/2/2,y:r+i/2},{x:n-d.width/2,y:r+i/2},{x:n-d.width/2,y:r-i/2+h},{x:n-_/2,y:r-i/2+h}],K.polygon(t,o,e)},u}i(at,`iconRounded`);async function ot(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=b(t);t.labelStyle=i;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=r?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await j(e,t,`icon-shape default`),m=t.pos===`t`,h=c+f*2,_=c+f*2,{nodeBorder:v,mainBkg:x}=n,{stylesMap:w}=S(t),T=-_/2,E=-h/2,D=t.label?8:0,O=C.svg(u),k=y(t,{});t.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`),k.stroke=w.get(`fill`)??x;let A=O.path(z(T,E,_,h,.1),k),M=Math.max(_,d.width),P=h+d.height+D,F=O.rectangle(-M/2,-P/2,M,P,{...k,fill:`transparent`,stroke:`none`}),I=u.insert(()=>A,`:first-child`),L=u.insert(()=>F);if(t.icon){let e=u.append(`g`);e.html(`<g>${await g(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${w.get(`stroke`)??v};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-P/2:P/2-d.height})`),I.attr(`transform`,`translate(0,${m?d.height/2+D/2:-d.height/2-D/2})`),N(t,L),t.intersect=function(e){if(a.info(`iconSquare intersect`,t,e),!t.label)return K.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,o=[];return o=m?[{x:n-d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2+d.height+D},{x:n+_/2,y:r-i/2+d.height+D},{x:n+_/2,y:r+i/2},{x:n-_/2,y:r+i/2},{x:n-_/2,y:r-i/2+d.height+D},{x:n-d.width/2,y:r-i/2+d.height+D}]:[{x:n-_/2,y:r-i/2},{x:n+_/2,y:r-i/2},{x:n+_/2,y:r-i/2+h},{x:n+d.width/2,y:r-i/2+h},{x:n+d.width/2/2,y:r+i/2},{x:n-d.width/2,y:r+i/2},{x:n-d.width/2,y:r-i/2+h},{x:n-_/2,y:r-i/2+h}],K.polygon(t,o,e)},u}i(ot,`iconSquare`);async function st(e,t,{config:{flowchart:n}}){let r=new Image;r.src=t?.img??``,await r.decode();let i=Number(r.naturalWidth.toString().replace(`px`,``)),o=Number(r.naturalHeight.toString().replace(`px`,``));t.imageAspectRatio=i/o;let{labelStyles:s}=b(t);t.labelStyle=s;let c=n?.wrappingWidth;t.defaultWidth=n?.wrappingWidth;let l=Math.max(t.label?c??0:0,t?.assetWidth??i),u=t.constraint===`on`&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,d=t.constraint===`on`?u/t.imageAspectRatio:t?.assetHeight??o;t.width=Math.max(u,c??0);let{shapeSvg:f,bbox:p,label:m}=await j(e,t,`image-shape default`),h=t.pos===`t`,g=-u/2,_=-d/2,v=t.label?8:0,x=C.svg(f),S=y(t,{});t.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let w=x.rectangle(g,_,u,d,S),T=Math.max(u,p.width),E=d+p.height+v,D=x.rectangle(-T/2,-E/2,T,E,{...S,fill:`none`,stroke:`none`}),O=f.insert(()=>w,`:first-child`),k=f.insert(()=>D);if(t.img){let e=f.append(`image`);e.attr(`href`,t.img),e.attr(`width`,u),e.attr(`height`,d),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${h?E/2-d:-E/2})`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-d/2-p.height/2-v/2:d/2-p.height/2+v/2})`),O.attr(`transform`,`translate(0,${h?p.height/2+v/2:-p.height/2-v/2})`),N(t,k),t.intersect=function(e){if(a.info(`iconSquare intersect`,t,e),!t.label)return K.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,o=[];return o=h?[{x:n-p.width/2,y:r-i/2},{x:n+p.width/2,y:r-i/2},{x:n+p.width/2,y:r-i/2+p.height+v},{x:n+u/2,y:r-i/2+p.height+v},{x:n+u/2,y:r+i/2},{x:n-u/2,y:r+i/2},{x:n-u/2,y:r-i/2+p.height+v},{x:n-p.width/2,y:r-i/2+p.height+v}]:[{x:n-u/2,y:r-i/2},{x:n+u/2,y:r-i/2},{x:n+u/2,y:r-i/2+d},{x:n+p.width/2,y:r-i/2+d},{x:n+p.width/2/2,y:r+i/2},{x:n-p.width/2,y:r+i/2},{x:n-p.width/2,y:r-i/2+d},{x:n-u/2,y:r-i/2+d}],K.polygon(t,o,e)},f}i(st,`imageSquare`);async function ct(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(c.height+a*2,t.height??0),u=Math.max(c.width+o*2,(t.width??0)-l),d=[{x:0,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:-3*l/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{}),r=F(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,N(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}i(ct,`inv_trapezoid`);async function lt(e,t){let{shapeSvg:n,bbox:r,label:i}=await j(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),N(t,a),t.intersect=function(e){return K.rect(t,e)},n}i(lt,`labelRect`);async function ut(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:0,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:-(3*l)/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{}),r=F(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,N(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}i(ut,`lean_left`);async function dt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:-3*l/6,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{}),r=F(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,N(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}i(dt,`lean_right`);function ft(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.label=``,t.labelStyle=n;let i=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:o}=t,s=Math.max(35,t?.width??0),c=Math.max(35,t?.height??0),l=[{x:s,y:0},{x:0,y:c+7/2},{x:s-14,y:c+7/2},{x:0,y:2*c},{x:s,y:c-7/2},{x:14,y:c-7/2}],u=C.svg(i),d=y(t,{});t.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=F(l),p=u.path(f,d),m=i.insert(()=>p,`:first-child`);return m.attr(`class`,`outer-path`),o&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,o),r&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,r),m.attr(`transform`,`translate(-${s/2},${-c})`),N(t,m),t.intersect=function(e){return a.info(`lightningBolt intersect`,t,e),K.polygon(t,l,e)},i}i(ft,`lightningBolt`);var pt=i((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),mt=i((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),ht=i((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),gt=10,_t=10;async function vt(e,t){let{labelStyles:n,nodeStyles:i}=b(t);t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?16:a,s=t.look===`neo`?24:a;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-o,t.width<_t&&(t.width=_t);let n=e/2/(2.5+e/50);t.height=(t.height??0)-s-n*3,t.height<gt&&(t.height=gt)}let{shapeSvg:c,bbox:l,label:u}=await j(e,t,P(t)),d=(t?.width?t?.width:l.width)+o*2,f=d/2,p=f/(2.5+d/50),m=(t?.height?t?.height:l.height)+p+s*2,h=m*.1,g,{cssStyles:_}=t;if(t.look===`handDrawn`){let e=C.svg(c),n=mt(0,0,d,m,f,p,h),r=ht(0,p,d,m,f,p),i=y(t,{}),a=e.path(n,i),o=e.path(r,i);c.insert(()=>o,`:first-child`).attr(`class`,`line`),g=c.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container`),_&&g.attr(`style`,_)}else{let e=pt(0,0,d,m,f,p,h);g=c.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,r(_)).attr(`style`,i)}return g.attr(`label-offset-y`,p),g.attr(`transform`,`translate(${-d/2}, ${-(m/2+p)})`),N(t,g),u.attr(`transform`,`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(e){let n=K.rect(t,e),r=n.x-(t.x??0);if(f!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-p)){let i=p*p*(1-r*r/(f*f));i>0&&(i=Math.sqrt(i)),i=p-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},c}i(vt,`linedCylinder`);async function yt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=(t.width??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=(t?.width?t?.width:c.width)+(a??0)*2,d=(t?.height?t?.height:c.height)+(o??0)*2,f=t.look===`neo`?d/4:d/8,p=d+f,{cssStyles:m}=t,h=C.svg(s),g=y(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-u/2-u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:p/2},...I(-u/2-u/2*.1,p/2,u/2+u/2*.1,p/2,f,.8),{x:u/2+u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:-p/2},{x:-u/2,y:-p/2},{x:-u/2,y:p/2*1.1},{x:-u/2,y:-p/2}],v=h.polygon(_.map(e=>[e.x,e.y]),g),x=s.insert(()=>v,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(0,${-f/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f/2-(c.y-(c.top??0))})`),N(t,x),t.intersect=function(e){return K.polygon(t,_,e)},s}i(yt,`linedWaveEdgedRect`);async function bt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*s,10),t.height=Math.max((t?.height??0)-o*2-2*s,10));let{shapeSvg:c,bbox:l,label:u}=await j(e,t,P(t)),d=(t?.width?t?.width:l.width)+a*2+2*s,f=(t?.height?t?.height:l.height)+o*2+2*s,p=d-2*s,m=f-2*s,h=-p/2,g=-m/2,{cssStyles:_}=t,v=C.svg(c),x=y(t,{}),S=[{x:h-s,y:g+s},{x:h-s,y:g+m+s},{x:h+p-s,y:g+m+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g+m-s},{x:h+p+s,y:g+m-s},{x:h+p+s,y:g-s},{x:h+s,y:g-s},{x:h+s,y:g},{x:h,y:g},{x:h,y:g+s}],w=[{x:h,y:g+s},{x:h+p-s,y:g+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g},{x:h,y:g}];t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let T=F(S),E=v.path(T,x),D=F(w),O=v.path(D,x);t.look!==`handDrawn`&&(E=ee(E),O=ee(O));let k=c.insert(`g`,`:first-child`);return k.insert(()=>E),k.insert(()=>O),k.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),N(t,k),t.intersect=function(e){return K.polygon(t,S,e)},c}i(bt,`multiRect`);async function xt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.padding??0,c=t.look===`neo`?16:s,l=t.look===`neo`?12:s,u=!0;(t.width||t.height)&&(u=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-l*3);let d=Math.max(a.width,t?.width??0)+c*2,f=Math.max(a.height,t?.height??0)+l*3,p=t.look===`neo`?f/4:f/8,m=f+(u?p/2:-p/2),h=-d/2,g=-m/2,{cssStyles:_}=t,v=I(h-10,g+m+10,h+d-10,g+m+10,p,.8),x=v?.[v.length-1],S=[{x:h-10,y:g+10},{x:h-10,y:g+m+10},...v,{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:x.y-20},{x:h+d+10,y:x.y-20},{x:h+d+10,y:g-10},{x:h+10,y:g-10},{x:h+10,y:g},{x:h,y:g},{x:h,y:g+10}],w=[{x:h,y:g+10},{x:h+d-10,y:g+10},{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:g},{x:h,y:g}],T=C.svg(i),E=y(t,{});t.look!==`handDrawn`&&(E.roughness=0,E.fillStyle=`solid`);let D=F(S),O=T.path(D,E),k=F(w),A=T.path(k,E),M=i.insert(()=>O,`:first-child`);return M.insert(()=>A),M.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),M.attr(`transform`,`translate(0,${-p/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-p/2-(a.y-(a.top??0))})`),N(t,M),t.intersect=function(e){return K.polygon(t,S,e)},i}i(xt,`multiWaveEdgedRectangle`);async function St(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r,t.useHtmlLabels||u(d())||(t.centerLabel=!0);let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=Math.max(o.width+(t.padding??0)*2,t?.width??0),l=Math.max(o.height+(t.padding??0)*2,t?.height??0),f=-c/2,p=-l/2,{cssStyles:m}=t,h=C.svg(a),g=y(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=h.rectangle(f,p,c,l,g),v=a.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),s.attr(`class`,`label noteLabel`),m&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,m),i&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,i),s.attr(`transform`,`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),N(t,v),t.intersect=function(e){return K.rect(t,e)},a}i(St,`note`);var Ct=i((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`);async function wt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await j(e,t,P(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=C.svg(i),n=y(t,{}),r=Ct(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=q(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),N(t,l),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=K.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}i(wt,`question`);async function Tt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=c.width+(t.look===`neo`?a*2:a),d=Math.max(c.height+(t.look===`neo`?o*2:o),t.height??0),f=d/4,p=-Math.max(u,(t.width??0)-f)/2,m=-d/2,h=m/2,g=[{x:p+h,y:m},{x:p,y:0},{x:p+h,y:-m},{x:-p,y:-m},{x:-p,y:m}],{cssStyles:_}=t,v=C.svg(s),x=y(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=F(g),w=v.path(S,x),T=s.insert(()=>w,`:first-child`);return T.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,r),T.attr(`transform`,`translate(${-h/2},0)`),l.attr(`transform`,`translate(${-h/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),N(t,T),t.intersect=function(e){return K.polygon(t,g,e)},s}i(Tt,`rect_left_inv_arrow`);async function Et(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i;i=t.cssClasses?`node `+t.cssClasses:`node default`;let s=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),c=s.insert(`g`),l=s.insert(`g`).attr(`class`,`label`).attr(`style`,r),d=t.description,f=t.label,p=await te(l,f,t.labelStyle,!0,!0),h={width:0,height:0};if(u(m())){let e=p.children[0],t=o(p);h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}a.info(`Text 2`,d);let g=d||[],_=p.getBBox(),v=await te(l,Array.isArray(g)?g.join(`<br/>`):g,t.labelStyle,!0,!0),x=v.children[0],S=o(v);h=x.getBoundingClientRect(),S.attr(`width`,h.width),S.attr(`height`,h.height);let w=(t.padding||0)/2;o(v).attr(`transform`,`translate( `+(h.width>_.width?0:(_.width-h.width)/2)+`, `+(_.height+w+5)+`)`),o(p).attr(`transform`,`translate( `+(h.width<_.width?0:-(_.width-h.width)/2)+`, 0)`),h=l.node().getBBox(),l.attr(`transform`,`translate(`+-h.width/2+`, `+(-h.height/2-w+3)+`)`);let T=h.width+(t.padding||0),E=h.height+(t.padding||0),D=-h.width/2-w,O=-h.height/2-w,k,A;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{}),r=e.path(z(D,O,T,E,t.rx||0),n),i=e.line(-h.width/2-w,-h.height/2-w+_.height+w,h.width/2+w,-h.height/2-w+_.height+w,n);A=s.insert(()=>(a.debug(`Rough node insert CXC`,r),i),`:first-child`),k=s.insert(()=>(a.debug(`Rough node insert CXC`,r),r),`:first-child`)}else k=c.insert(`rect`,`:first-child`),A=c.insert(`line`),k.attr(`class`,`outer title-state`).attr(`style`,r).attr(`x`,-h.width/2-w).attr(`y`,-h.height/2-w).attr(`width`,h.width+(t.padding||0)).attr(`height`,h.height+(t.padding||0)),A.attr(`class`,`divider`).attr(`x1`,-h.width/2-w).attr(`x2`,h.width/2+w).attr(`y1`,-h.height/2-w+_.height+w).attr(`y2`,-h.height/2-w+_.height+w);return N(t,k),t.intersect=function(e){return K.rect(t,e)},s}i(Et,`rectWithTitle`);async function Dt(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return Ue(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}i(Dt,`roundedRect`);var Z=8;async function Ot(e,t){let{labelStyles:n,nodeStyles:i}=b(t);t.labelStyle=n;let a=t.look===`neo`?16:t.padding??0,o=t.look===`neo`?12:t.padding??0,{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=(t?.width??c.width)+a*2+(t.look===`neo`?Z:Z*2),d=(t?.height??c.height)+o*2,f=u-Z,p=d,m=Z-u/2,h=-d/2,{cssStyles:g}=t,_=C.svg(s),v=y(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let x=[{x:m,y:h},{x:m+f,y:h},{x:m+f,y:h+p},{x:m-Z,y:h+p},{x:m-Z,y:h},{x:m,y:h},{x:m,y:h+p}],S=_.polygon(x.map(e=>[e.x,e.y]),v),w=s.insert(()=>S,`:first-child`);return w.attr(`class`,`basic label-container outer-path`).attr(`style`,r(g)),i&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,i),g&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,i),l.attr(`transform`,`translate(${Z/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),N(t,w),t.intersect=function(e){return K.rect(t,e)},s}i(Ot,`shadedProcess`);async function kt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=(t?.width?t?.width:c.width)+a*2,d=((t?.height?t?.height:c.height)+o*2)*1.5,f=u,p=d/1.5,m=-f/2,h=-p/2,{cssStyles:g}=t,_=C.svg(s),v=y(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let x=[{x:m,y:h},{x:m,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-p/2}],S=F(x),w=_.path(S,v),T=s.insert(()=>w,`:first-child`);return T.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,r),T.attr(`transform`,`translate(0, ${p/4})`),l.attr(`transform`,`translate(${-f/2+(t.padding??0)-(c.x-(c.left??0))}, ${-p/4+(t.padding??0)-(c.y-(c.top??0))})`),N(t,T),t.intersect=function(e){return K.polygon(t,x,e)},s}i(kt,`slopedRect`);async function At(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return Ue(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}i(At,`squareRect`);async function jt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=c.height+(t.look===`neo`?o*2:o),u=c.width+l/4+(t.look===`neo`?a*2:a),d=l/2,{cssStyles:f}=t,p=C.svg(s),m=y(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-u/2+d,y:-l/2},{x:u/2-d,y:-l/2},...L(-u/2+d,0,d,50,90,270),{x:u/2-d,y:l/2},...L(u/2-d,0,d,50,270,450)],g=F(h),_=p.path(g,m),v=s.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),N(t,v),t.intersect=function(e){return K.polygon(t,h,e)},s}i(jt,`stadium`);async function Mt(e,t){return Ue(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}i(Mt,`state`);function Nt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),d=C.svg(u),f=y(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=d.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),m=s??c,h=(t.width??0)*5/14,g=d.circle(0,0,h,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:`solid`}),_=u.insert(()=>p,`:first-child`);if(_.insert(()=>g),t.look!==`handDrawn`&&_.attr(`class`,`outer-path`),a&&_.selectAll(`path`).attr(`style`,a),i&&_.selectAll(`path`).attr(`style`,i),t.width<25&&l&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;_.attr(`style`,`filter:url(#${n})`)}return N(t,_),t.intersect=function(e){return K.circle(t,(t.width??0)/2,e)},u}i(Nt,`stateEnd`);function Pt(e,t,{config:{themeVariables:n}}){let{lineColor:r,nodeShadow:i}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=C.svg(a).circle(0,0,t.width,x(r));o=a.insert(()=>e),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14)}else o=a.insert(`circle`,`:first-child`),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14);if(t.width<25&&i&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;o.attr(`style`,`filter:url(#${n})`)}return N(t,o),t.intersect=function(e){return K.circle(t,(t.width??7)/2,e)},a}i(Pt,`stateStart`);var Ft=8;async function It(e,t){let{labelStyles:n,nodeStyles:i}=b(t);t.labelStyle=n;let a=t?.padding??8,o=t.look===`neo`?28:a,s=t.look===`neo`?12:a,{shapeSvg:c,bbox:l}=await j(e,t,P(t)),u=Math.max(l.width+2*Ft+o,t.width??0),d=Math.max(l.height+s,t.height??0),f=u-2*Ft,p=d,m=-u/2,h=-d/2,g=[{x:0,y:0},{x:f,y:0},{x:f,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:f+8,y:0},{x:f+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look===`handDrawn`){let e=C.svg(c),n=y(t,{}),i=e.rectangle(m,h,f+16,p,n),a=e.line(m+Ft,h,m+Ft,h+p,n),o=e.line(m+Ft+f,h,m+Ft+f,h+p,n);c.insert(()=>a,`:first-child`),c.insert(()=>o,`:first-child`);let s=c.insert(()=>i,`:first-child`),{cssStyles:l}=t;s.attr(`class`,`basic label-container`).attr(`style`,r(l)),N(t,s)}else{let e=q(c,f,p,g);i&&e.attr(`style`,i),N(t,e)}return t.intersect=function(e){return K.polygon(t,g,e)},c}i(It,`subroutine`);var Lt=.2;async function Rt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-Lt*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.height?t?.height:c.height)+o*2,u=Lt*l,d=Lt*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,m=-f/2,h=-p/2,{cssStyles:g}=t,_=C.svg(s),v=y(t,{}),x=[{x:m-u/2,y:h},{x:m+f+u/2,y:h},{x:m+f+u/2,y:h+p},{x:m-u/2,y:h+p}],S=[{x:m+f-u/2,y:h+p},{x:m+f+u/2,y:h+p},{x:m+f+u/2,y:h+p-d}];t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let w=F(x),T=_.path(w,v),E=F(S),D=_.path(E,{...v,fillStyle:`solid`}),O=s.insert(()=>D,`:first-child`);return O.insert(()=>T,`:first-child`),O.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),N(t,O),t.intersect=function(e){return K.polygon(t,x,e)},s}i(Rt,`taggedRect`);async function zt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=.2*s,d=.2*c,f=c+l,{cssStyles:p}=t,m=C.svg(i),h=y(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-s/2-s/2*.1,y:f/2},...I(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],_=-s/2+s/2*.1,v=-f/2-d*.4,x=[{x:_+s-u,y:(v+c)*1.3},{x:_+s,y:v+c-d},{x:_+s,y:(v+c)*.9},...I(_+s,(v+c)*1.25,_+s-u,(v+c)*1.3,-c*.02,.5)],S=F(g),w=m.path(S,h),T=F(x),E=m.path(T,{...h,fillStyle:`solid`}),D=i.insert(()=>E,`:first-child`);return D.insert(()=>w,`:first-child`),D.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),N(t,D),t.intersect=function(e){return K.polygon(t,g,e)},i}i(zt,`taggedWaveEdgedRectangle`);async function Bt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await j(e,t,P(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),N(t,u),t.intersect=function(e){return K.rect(t,e)},i}i(Bt,`text`);var Vt=i((e,t,n,r,i,a)=>`M${e},${t}
3
3
  a${i},${a} 0,0,1 0,${-r}
4
4
  l${n},0
@@ -1,2 +1,2 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-B6xuSHsQ.js";import{R as r,h as i,p as a,r as o,s}from"./chunk-DU6HZSFF-DsMNAX-a.js";import{t as c}from"./dist-v5Q1xZ2K.js";var l=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function u(){}function d(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function f(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ee(e){if(d(e))return e;if(Array.isArray(e)||f(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function p(e){return l.Buffer!==void 0&&l.Buffer.isBuffer(e)}function te(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function m(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var ne=`[object RegExp]`,h=`[object String]`,g=`[object Number]`,_=`[object Boolean]`,v=`[object Arguments]`,y=`[object Symbol]`,b=`[object Date]`,x=`[object Map]`,re=`[object Set]`,ie=`[object Array]`,ae=`[object ArrayBuffer]`,oe=`[object Object]`,se=`[object DataView]`,ce=`[object Uint8Array]`,le=`[object Uint8ClampedArray]`,ue=`[object Uint16Array]`,de=`[object Uint32Array]`,fe=`[object Int8Array]`,pe=`[object Int16Array]`,me=`[object Int32Array]`,he=`[object Float32Array]`,ge=`[object Float64Array]`;function _e(e,t){return S(e,void 0,e,new Map,t)}function S(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(d(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=S(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,S(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(S(a,void 0,n,r,i));return t}if(p(e))return e.subarray();if(f(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=S(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),C(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),C(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),C(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,C(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),C(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),C(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),C(t,e,n,r,i),t}if(typeof e==`object`&&ve(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),C(t,e,n,r,i),t}return e}function C(e,t,n=e,r,i){let a=[...Object.keys(t),...te(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=S(t[s],s,n,r,i))}}function ve(e){switch(m(e)){case v:case ie:case ae:case se:case _:case b:case he:case ge:case fe:case pe:case me:case x:case g:case oe:case ne:case re:case h:case y:case ce:case le:case ue:case de:return!0;default:return!1}}function ye(e){return e===`__proto__`}function w(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function be(e){return Number.isSafeInteger(e)&&e>=0}function xe(e){this._context=e}xe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function Se(e){return new xe(e)}var Ce=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function we(e){return new Ce(e,!0)}function Te(e){return new Ce(e,!1)}function T(){}function E(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function D(e){this._context=e}D.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:E(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:E(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function O(e){return new D(e)}function k(e){this._context=e}k.prototype={areaStart:T,areaEnd:T,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:E(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ee(e){return new k(e)}function De(e){this._context=e}De.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:E(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Oe(e){return new De(e)}function ke(e,t){this._basis=new D(e),this._beta=t}ke.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var Ae=(function e(t){function n(e){return t===1?new D(e):new ke(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function A(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function j(e,t){this._context=e,this._k=(1-t)/6}j.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:A(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:A(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var je=(function e(t){function n(e){return new j(e,t)}return n.tension=function(t){return e(+t)},n})(0);function M(e,t){this._context=e,this._k=(1-t)/6}M.prototype={areaStart:T,areaEnd:T,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:A(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Me=(function e(t){function n(e){return new M(e,t)}return n.tension=function(t){return e(+t)},n})(0);function N(e,t){this._context=e,this._k=(1-t)/6}N.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:A(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ne=(function e(t){function n(e){return new N(e,t)}return n.tension=function(t){return e(+t)},n})(0);function P(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function Pe(e,t){this._context=e,this._alpha=t}Pe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:P(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Fe=(function e(t){function n(e){return t?new Pe(e,t):new j(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Ie(e,t){this._context=e,this._alpha=t}Ie.prototype={areaStart:T,areaEnd:T,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:P(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Le=(function e(t){function n(e){return t?new Ie(e,t):new M(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Re(e,t){this._context=e,this._alpha=t}Re.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:P(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ze=(function e(t){function n(e){return t?new Re(e,t):new N(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Be(e){this._context=e}Be.prototype={areaStart:T,areaEnd:T,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Ve(e){return new Be(e)}function He(e){return e<0?-1:1}function Ue(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(He(a)+He(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function We(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function F(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function I(e){this._context=e}I.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:F(this,this._t0,We(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,F(this,We(this,n=Ue(this,e,t)),n);break;default:F(this,this._t0,n=Ue(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Ge(e){this._context=new Ke(e)}(Ge.prototype=Object.create(I.prototype)).point=function(e,t){I.prototype.point.call(this,t,e)};function Ke(e){this._context=e}Ke.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function qe(e){return new I(e)}function Je(e){return new Ge(e)}function L(e){this._context=e}L.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Ye(e),i=Ye(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o])}(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Ye(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Xe(e){return new L(e)}function R(e,t){this._context=e,this._t=t}R.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function Ze(e){return new R(e,.5)}function Qe(e){return new R(e,0)}function $e(e){return new R(e,1)}function et(e){return e!=null&&typeof e!=`function`&&be(e.length)}function tt(e,t){return _e(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(m(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),C(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case g:case h:case _:{let t=new e.constructor(e?.valueOf());return C(t,e),t}case v:{let t={};return C(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function nt(e){return tt(e)}function z(e){return typeof e==`object`&&!!e&&m(e)===`[object Arguments]`}function B(e){return typeof e==`object`&&!!e}function rt(e){return B(e)&&et(e)}function V(e){return f(e)}function H(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(H.Cache||Map),n}H.Cache=Map;function it(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=U(i,t,r,new Map)}return i}function U(e,t,n,r){if(d(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return ee(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)e in t||(t[e]=void 0)}let i=[...Object.keys(t),...te(t)];for(let a=0;a<i.length;a++){let o=i[a];if(ye(o))continue;let s=t[o],c=e[o];if(z(s)&&(s={...s}),z(c)&&(c={...c}),p(s)&&(s=nt(s)),Array.isArray(s)){if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if(rt(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[]}let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||B(c)&&B(s)&&(w(c)||w(s)||V(c)||V(s))?e[o]=U(c,s,n,r):c==null&&w(s)?e[o]=U({},s,n,r):c==null&&V(s)?e[o]=nt(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}function at(e,...t){return it(e,...t,u)}var ot=c(),st={curveBasis:O,curveBasisClosed:Ee,curveBasisOpen:Oe,curveBumpX:we,curveBumpY:Te,curveBundle:Ae,curveCardinalClosed:Me,curveCardinalOpen:Ne,curveCardinal:je,curveCatmullRomClosed:Le,curveCatmullRomOpen:ze,curveCatmullRom:Fe,curveLinear:Se,curveLinearClosed:Ve,curveMonotoneX:qe,curveMonotoneY:Je,curveNatural:Xe,curveStep:Ze,curveStepAfter:$e,curveStepBefore:Qe},ct=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,lt=e(function(e,t){let n=ut(e,/(?:init\b)|(?:initialize\b)/),i={};if(Array.isArray(n)){let e=n.map(e=>e.args);r(e),i=o(i,[...e])}else i=n.args;if(!i)return;let s=a(e,t),c=`config`;return i[c]!==void 0&&(s===`flowchart-v2`&&(s=`flowchart`),i[s]=i[c],delete i[c]),i},`detectInit`),ut=e(function(e,n=null){try{let r=RegExp(`[%]{2}(?![{]${ct.source})(?=[}][%]{2}).*
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-B6xuSHsQ.js";import{R as r,h as i,p as a,r as o,s}from"./chunk-DU6HZSFF-F1zixM7P.js";import{t as c}from"./dist-v5Q1xZ2K.js";var l=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function u(){}function d(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function f(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ee(e){if(d(e))return e;if(Array.isArray(e)||f(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function p(e){return l.Buffer!==void 0&&l.Buffer.isBuffer(e)}function te(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function m(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var ne=`[object RegExp]`,h=`[object String]`,g=`[object Number]`,_=`[object Boolean]`,v=`[object Arguments]`,y=`[object Symbol]`,b=`[object Date]`,x=`[object Map]`,re=`[object Set]`,ie=`[object Array]`,ae=`[object ArrayBuffer]`,oe=`[object Object]`,se=`[object DataView]`,ce=`[object Uint8Array]`,le=`[object Uint8ClampedArray]`,ue=`[object Uint16Array]`,de=`[object Uint32Array]`,fe=`[object Int8Array]`,pe=`[object Int16Array]`,me=`[object Int32Array]`,he=`[object Float32Array]`,ge=`[object Float64Array]`;function _e(e,t){return S(e,void 0,e,new Map,t)}function S(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(d(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=S(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,S(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(S(a,void 0,n,r,i));return t}if(p(e))return e.subarray();if(f(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=S(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),C(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),C(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),C(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,C(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),C(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),C(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),C(t,e,n,r,i),t}if(typeof e==`object`&&ve(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),C(t,e,n,r,i),t}return e}function C(e,t,n=e,r,i){let a=[...Object.keys(t),...te(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=S(t[s],s,n,r,i))}}function ve(e){switch(m(e)){case v:case ie:case ae:case se:case _:case b:case he:case ge:case fe:case pe:case me:case x:case g:case oe:case ne:case re:case h:case y:case ce:case le:case ue:case de:return!0;default:return!1}}function ye(e){return e===`__proto__`}function w(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function be(e){return Number.isSafeInteger(e)&&e>=0}function xe(e){this._context=e}xe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function Se(e){return new xe(e)}var Ce=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function we(e){return new Ce(e,!0)}function Te(e){return new Ce(e,!1)}function T(){}function E(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function D(e){this._context=e}D.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:E(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:E(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function O(e){return new D(e)}function k(e){this._context=e}k.prototype={areaStart:T,areaEnd:T,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:E(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ee(e){return new k(e)}function De(e){this._context=e}De.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:E(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Oe(e){return new De(e)}function ke(e,t){this._basis=new D(e),this._beta=t}ke.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var Ae=(function e(t){function n(e){return t===1?new D(e):new ke(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function A(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function j(e,t){this._context=e,this._k=(1-t)/6}j.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:A(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:A(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var je=(function e(t){function n(e){return new j(e,t)}return n.tension=function(t){return e(+t)},n})(0);function M(e,t){this._context=e,this._k=(1-t)/6}M.prototype={areaStart:T,areaEnd:T,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:A(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Me=(function e(t){function n(e){return new M(e,t)}return n.tension=function(t){return e(+t)},n})(0);function N(e,t){this._context=e,this._k=(1-t)/6}N.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:A(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ne=(function e(t){function n(e){return new N(e,t)}return n.tension=function(t){return e(+t)},n})(0);function P(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function Pe(e,t){this._context=e,this._alpha=t}Pe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:P(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Fe=(function e(t){function n(e){return t?new Pe(e,t):new j(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Ie(e,t){this._context=e,this._alpha=t}Ie.prototype={areaStart:T,areaEnd:T,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:P(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Le=(function e(t){function n(e){return t?new Ie(e,t):new M(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Re(e,t){this._context=e,this._alpha=t}Re.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:P(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ze=(function e(t){function n(e){return t?new Re(e,t):new N(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Be(e){this._context=e}Be.prototype={areaStart:T,areaEnd:T,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Ve(e){return new Be(e)}function He(e){return e<0?-1:1}function Ue(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(He(a)+He(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function We(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function F(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function I(e){this._context=e}I.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:F(this,this._t0,We(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,F(this,We(this,n=Ue(this,e,t)),n);break;default:F(this,this._t0,n=Ue(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Ge(e){this._context=new Ke(e)}(Ge.prototype=Object.create(I.prototype)).point=function(e,t){I.prototype.point.call(this,t,e)};function Ke(e){this._context=e}Ke.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function qe(e){return new I(e)}function Je(e){return new Ge(e)}function L(e){this._context=e}L.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Ye(e),i=Ye(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o])}(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Ye(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Xe(e){return new L(e)}function R(e,t){this._context=e,this._t=t}R.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function Ze(e){return new R(e,.5)}function Qe(e){return new R(e,0)}function $e(e){return new R(e,1)}function et(e){return e!=null&&typeof e!=`function`&&be(e.length)}function tt(e,t){return _e(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(m(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),C(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case g:case h:case _:{let t=new e.constructor(e?.valueOf());return C(t,e),t}case v:{let t={};return C(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function nt(e){return tt(e)}function z(e){return typeof e==`object`&&!!e&&m(e)===`[object Arguments]`}function B(e){return typeof e==`object`&&!!e}function rt(e){return B(e)&&et(e)}function V(e){return f(e)}function H(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(H.Cache||Map),n}H.Cache=Map;function it(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=U(i,t,r,new Map)}return i}function U(e,t,n,r){if(d(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return ee(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)e in t||(t[e]=void 0)}let i=[...Object.keys(t),...te(t)];for(let a=0;a<i.length;a++){let o=i[a];if(ye(o))continue;let s=t[o],c=e[o];if(z(s)&&(s={...s}),z(c)&&(c={...c}),p(s)&&(s=nt(s)),Array.isArray(s)){if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if(rt(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[]}let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||B(c)&&B(s)&&(w(c)||w(s)||V(c)||V(s))?e[o]=U(c,s,n,r):c==null&&w(s)?e[o]=U({},s,n,r):c==null&&V(s)?e[o]=nt(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}function at(e,...t){return it(e,...t,u)}var ot=c(),st={curveBasis:O,curveBasisClosed:Ee,curveBasisOpen:Oe,curveBumpX:we,curveBumpY:Te,curveBundle:Ae,curveCardinalClosed:Me,curveCardinalOpen:Ne,curveCardinal:je,curveCatmullRomClosed:Le,curveCatmullRomOpen:ze,curveCatmullRom:Fe,curveLinear:Se,curveLinearClosed:Ve,curveMonotoneX:qe,curveMonotoneY:Je,curveNatural:Xe,curveStep:Ze,curveStepAfter:$e,curveStepBefore:Qe},ct=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,lt=e(function(e,t){let n=ut(e,/(?:init\b)|(?:initialize\b)/),i={};if(Array.isArray(n)){let e=n.map(e=>e.args);r(e),i=o(i,[...e])}else i=n.args;if(!i)return;let s=a(e,t),c=`config`;return i[c]!==void 0&&(s===`flowchart-v2`&&(s=`flowchart`),i[s]=i[c],delete i[c]),i},`detectInit`),ut=e(function(e,n=null){try{let r=RegExp(`[%]{2}(?![{]${ct.source})(?=[}][%]{2}).*
2
2
  `,`ig`);e=e.trim().replace(r,``).replace(/'/gm,`"`),t.debug(`Detecting diagram directive${n===null?``:` type:`+n} based on the text:${e}`);let a,o=[];for(;(a=i.exec(e))!==null;)if(a.index===i.lastIndex&&i.lastIndex++,a&&!n||n&&a[1]?.match(n)||n&&a[2]?.match(n)){let e=a[1]?a[1]:a[2],t=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:e,args:t})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(r){return t.error(`ERROR: ${r.message} - Unable to parse directive type: '${n}' based on the text: '${e}'`),{type:void 0,args:null}}},`detectDirective`),dt=e(function(e){return e.replace(i,``)},`removeDirectives`),ft=e(function(e,t){for(let[n,r]of t.entries())if(r.match(e))return n;return-1},`isSubstringInArray`);function W(e,t){return e?st[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}e(W,`interpolateToCurve`);function pt(e,t){let n=e.trim();if(n)return t.securityLevel===`loose`?n:(0,ot.sanitizeUrl)(n)}e(pt,`formatUrl`);var mt=e((e,...n)=>{let r=e.split(`.`),i=r.length-1,a=r[i],o=window;for(let n=0;n<i;n++)if(o=o[r[n]],!o){t.error(`Function name: ${e} not found in window`);return}o[a](...n)},`runFunc`);function G(e,t){return!e||!t?0:Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}e(G,`distance`);function ht(e){let t,n=0;return e.forEach(e=>{n+=G(e,t),t=e}),K(e,n/2)}e(ht,`traverseEdge`);function gt(e){return e.length===1?e[0]:ht(e)}e(gt,`calcLabelPosition`);var _t=e((e,t=2)=>{let n=10**t;return Math.round(e*n)/n},`roundNumber`),K=e((e,t)=>{let n,r=t;for(let t of e){if(n){let e=G(t,n);if(e===0)return n;if(e<r)r-=e;else{let i=r/e;if(i<=0)return n;if(i>=1)return{x:t.x,y:t.y};if(i>0&&i<1)return{x:_t((1-i)*n.x+i*t.x,5),y:_t((1-i)*n.y+i*t.y,5)}}}n=t}throw Error(`Could not find a suitable point for the given distance`)},`calculatePoint`),vt=e((e,n,r)=>{t.info(`our points ${JSON.stringify(n)}`),n[0]!==r&&(n=n.reverse());let i=K(n,25),a=e?10:5,o=Math.atan2(n[0].y-i.y,n[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(n[0].x+i.x)/2,s.y=-Math.cos(o)*a+(n[0].y+i.y)/2,s},`calcCardinalityPosition`);function yt(e,n,r){let i=structuredClone(r);t.info(`our points`,i),n!==`start_left`&&n!==`start_right`&&i.reverse();let a=K(i,25+e),o=10+e*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),c={x:0,y:0};return n===`start_left`?(c.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):n===`end_right`?(c.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):n===`end_left`?(c.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(c.x=Math.sin(s)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2),c}e(yt,`calcTerminalLabelPosition`);function q(e){let t=``,n=``;for(let r of e)r!==void 0&&(r.startsWith(`color:`)||r.startsWith(`text-align:`)?n=n+r+`;`:t=t+r+`;`);return{style:t,labelStyle:n}}e(q,`getStylesFromArray`);var bt=0,xt=e(()=>(bt++,`id-`+Math.random().toString(36).substr(2,12)+`-`+bt),`generateId`);function St(e){let t=``;for(let n=0;n<e;n++)t+=`0123456789abcdef`.charAt(Math.floor(Math.random()*16));return t}e(St,`makeRandomHex`);var Ct=e(e=>St(e.length),`random`),wt=e(function(){return{x:0,y:0,fill:void 0,anchor:`start`,style:`#666`,width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:``}},`getTextObj`),Tt=e(function(e,t){let n=t.text.replace(s.lineBreakRegex,` `),[,r]=Q(t.fontSize),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.style(`text-anchor`,t.anchor),i.style(`font-family`,t.fontFamily),i.style(`font-size`,r),i.style(`font-weight`,t.fontWeight),i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.attr(`fill`,t.fill),a.text(n),i},`drawSimpleText`),Et=H((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,joinWith:`<br/>`},n),s.lineBreakRegex.test(e)))return e;let r=e.split(` `).filter(Boolean),i=[],a=``;return r.forEach((e,o)=>{let s=Y(`${e} `,n),c=Y(a,n);if(s>t){let{hyphenatedStrings:r,remainingWord:o}=Dt(e,t,`-`,n);i.push(a,...r),a=o}else c+s>=t?(i.push(a),a=e):a=[a,e].filter(Boolean).join(` `);o+1===r.length&&i.push(a)}),i.filter(e=>e!==``).join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),Dt=H((e,t,n=`-`,r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,margin:0},r);let i=[...e],a=[],o=``;return i.forEach((e,s)=>{let c=`${o}${e}`;if(Y(c,r)>=t){let e=s+1,t=i.length===e,r=`${c}${n}`;a.push(t?c:r),o=``}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,n=`-`,r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function J(e,t){return X(e,t).height}e(J,`calculateTextHeight`);function Y(e,t){return X(e,t).width}e(Y,`calculateTextWidth`);var X=H((e,t)=>{let{fontSize:r=12,fontFamily:i=`Arial`,fontWeight:a=400}=t;if(!e)return{width:0,height:0};let[,o]=Q(r),c=[`sans-serif`,i],l=e.split(s.lineBreakRegex),u=[],d=n(`body`);if(!d.remove)return{width:0,height:0,lineHeight:0};let f=d.append(`svg`);for(let e of c){let t=0,n={width:0,height:0,lineHeight:0};for(let r of l){let i=wt();i.text=r||`​`;let s=Tt(f,i).style(`font-size`,o).style(`font-weight`,a).style(`font-family`,e),c=(s._groups||s)[0][0].getBBox();if(c.width===0&&c.height===0)throw Error(`svg element not in render tree`);n.width=Math.round(Math.max(n.width,c.width)),t=Math.round(c.height),n.height+=t,n.lineHeight=Math.round(Math.max(n.lineHeight,t))}u.push(n)}return f.remove(),u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Ot=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{e(this,`InitIDGenerator`)}},Z,kt=e(function(e){return Z||=document.createElement(`div`),e=escape(e).replace(/%26/g,`&`).replace(/%23/g,`#`).replace(/%3B/g,`;`),Z.innerHTML=e,unescape(Z.textContent)},`entityDecode`);function At(e){return`str`in e}e(At,`isDetailedError`);var jt=e((e,t,n,r)=>{if(!r)return;let i=e.node()?.getBBox();i&&e.append(`text`).text(r).attr(`text-anchor`,`middle`).attr(`x`,i.x+i.width/2).attr(`y`,-n).attr(`class`,t)},`insertTitle`),Q=e(e=>{if(typeof e==`number`)return[e,e+`px`];let t=parseInt(e??``,10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+`px`]:[t,e]},`parseFontSize`);function $(e,t){return at({},e,t)}e($,`cleanAndMerge`);var Mt={assignWithDepth:o,wrapLabel:Et,calculateTextHeight:J,calculateTextWidth:Y,calculateTextDimensions:X,cleanAndMerge:$,detectInit:lt,detectDirective:ut,isSubstringInArray:ft,interpolateToCurve:W,calcLabelPosition:gt,calcCardinalityPosition:vt,calcTerminalLabelPosition:yt,formatUrl:pt,getStylesFromArray:q,generateId:xt,random:Ct,runFunc:mt,entityDecode:kt,insertTitle:jt,isLabelCoordinateInPath:Lt,parseFontSize:Q,InitIDGenerator:Ot},Nt=e(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°`+t+`¶ß`:`fl°`+t+`¶ß`}),t},`encodeEntities`),Pt=e(function(e){return e.replace(/fl°°/g,`&#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},`decodeEntities`),Ft=e((e,t,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:``}${e}_${t}_${n}${i?`_${i}`:``}`,`getEdgeId`);function It(e){return e??null}e(It,`handleUndefinedAttr`);function Lt(e,t){let n=Math.round(e.x),r=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(n.toString())||i.includes(r.toString())}e(Lt,`isLabelCoordinateInPath`);export{ce as $,we as A,ge as B,Ze as C,Fe as D,Je as E,ie as F,g as G,me as H,_ as I,re as J,oe as K,se as L,Se as M,v as N,je as O,ae as P,de as Q,b as R,Qe as S,qe as T,fe as U,pe as V,x as W,y as X,h as Y,ue as Z,Et as _,Pt as a,et as b,Ft as c,W as d,le as et,At as f,Mt as g,dt as h,$ as i,Te as j,O as k,q as l,Ct as m,J as n,p as nt,Nt as o,Q as p,ne as q,Y as r,d as rt,xt as s,X as t,m as tt,It as u,V as v,Xe as w,$e as x,z as y,he as z};