@marimo-team/frontend 0.14.11-dev8 → 0.14.11

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 (150) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-BZCmp5aR.js → ConnectedDataExplorerComponent-B9BmPz9a.js} +3 -3
  2. package/dist/assets/{ImageComparisonComponent-COH6lRBM.js → ImageComparisonComponent-CNTqLdnf.js} +1 -1
  3. package/dist/assets/{VegaLite-BRccRtf1.js → VegaLite-DLKRDJvl.js} +8 -8
  4. package/dist/assets/_baseEach-BjDLzUwG.js +1 -0
  5. package/dist/assets/_baseMap-CuZ-LBtv.js +1 -0
  6. package/dist/assets/_baseUniq-DqHaT24V.js +1 -0
  7. package/dist/assets/{_createAggregator-8M5K7ZTQ.js → _createAggregator-C_WhAECr.js} +1 -1
  8. package/dist/assets/{any-language-editor-Dx_DmQpj.js → any-language-editor-DrZjy7mH.js} +1 -1
  9. package/dist/assets/arc-ZB5pDULS.js +1 -0
  10. package/dist/assets/architectureDiagram-NQ2NVSRB-DqJfNlvg.js +36 -0
  11. package/dist/assets/blockDiagram-PHRCVELO-BMyZ52bP.js +122 -0
  12. package/dist/assets/{c4Diagram-VJAJSXHY-yQmPFHka.js → c4Diagram-6F6E4RAY-DveKwcb7.js} +2 -2
  13. package/dist/assets/channel-LYGgdr1R.js +1 -0
  14. package/dist/assets/{chunk-4BMEZGHF-PHya-g-m.js → chunk-353BL4L5-DBdJb07A.js} +1 -1
  15. package/dist/assets/{chunk-D6G4REZN-Cp5gAhaU.js → chunk-67H74DCK-DG8iWVJ-.js} +1 -1
  16. package/dist/assets/chunk-6OLS64BW-Dmt4rYEQ.js +220 -0
  17. package/dist/assets/{chunk-XZIHB7SX-CJx8F-BK.js → chunk-AACKK3MU-CDOdA9eC.js} +1 -1
  18. package/dist/assets/chunk-BFAMUDN2-Cf6198RO.js +1 -0
  19. package/dist/assets/chunk-E2GYISFI-fSvIEcyU.js +15 -0
  20. package/dist/assets/{chunk-A2AXSNBT-tIg30O59.js → chunk-QEP2MXWD-D6FP1cQC.js} +4 -3
  21. package/dist/assets/chunk-SKB7J2MH-B7Z1FsaJ.js +1 -0
  22. package/dist/assets/{circle-play-Bj5lce2y.js → circle-play-CBftacWk.js} +2 -2
  23. package/dist/assets/classDiagram-BGRH5UQR-BQbZmSV-.js +1 -0
  24. package/dist/assets/classDiagram-v2-O24JOBDK-BQbZmSV-.js +1 -0
  25. package/dist/assets/clone-DD3sG0_1.js +1 -0
  26. package/dist/assets/compile-mbjlQ5nn.js +10 -0
  27. package/dist/assets/dagre-FFZHY6LT-DX9cGWLP.js +4 -0
  28. package/dist/assets/data-grid-overlay-editor-C4fyHnn1.js +1 -0
  29. package/dist/assets/diagram-3EMPZRKU-BwXQu6c-.js +24 -0
  30. package/dist/assets/diagram-5UYTHUR4-BgOShMim.js +24 -0
  31. package/dist/assets/diagram-ZTM2IBQH-m55tqkSF.js +43 -0
  32. package/dist/assets/edit-page-BMW2Fhcz.js +148 -0
  33. package/dist/assets/{erDiagram-Q7BY3M3F-Bdu1RFft.js → erDiagram-R3QVA2FD-B8SQvwhp.js} +1 -1
  34. package/dist/assets/flowDiagram-PKI6S5ZS-BTbZVZp0.js +162 -0
  35. package/dist/assets/ganttDiagram-EK5VF46D-Dkuqvb7b.js +267 -0
  36. package/dist/assets/gitGraphDiagram-GW3U2K7C-BMQ8L_am.js +65 -0
  37. package/dist/assets/glide-data-editor-BKZWFNVv.js +132 -0
  38. package/dist/assets/glide-data-editor-DcmjcDkq.css +1 -0
  39. package/dist/assets/{graph-CobhnVVx.js → graph-CFDemIXQ.js} +1 -1
  40. package/dist/assets/home-page-DUbYTF9g.js +9 -0
  41. package/dist/assets/index-1az6nvpO.js +1 -0
  42. package/dist/assets/{index-DPNo-jY5.js → index-B0-K_sX8.js} +1 -1
  43. package/dist/assets/{index-DVJeqlnb.js → index-B9WlbtVk.js} +1 -1
  44. package/dist/assets/index-BEQfoZiP.js +1 -0
  45. package/dist/assets/{index-8quJWwGd.js → index-BWEPJWCF.js} +1 -1
  46. package/dist/assets/index-CE3mbf8H.js +1 -0
  47. package/dist/assets/{index-DisN4g0K.js → index-CH2sakSJ.js} +1 -1
  48. package/dist/assets/{index-4adJyO1X.js → index-CRY746sV.js} +1 -1
  49. package/dist/assets/index-C_e9XjpS.js +1 -0
  50. package/dist/assets/{index-RyqulB0I.js → index-CaHkXpUp.js} +1 -1
  51. package/dist/assets/index-CfvA7bvb.js +1 -0
  52. package/dist/assets/{index-CoGECqH1.js → index-ChVO1Vdj.js} +1 -1
  53. package/dist/assets/index-CsdFJkJw.css +1 -0
  54. package/dist/assets/{index-BtQD1xRv.js → index-CylrdBnG.js} +1 -1
  55. package/dist/assets/index-D3Er-byj.js +1 -0
  56. package/dist/assets/{index-kFBaVNpO.js → index-D_Dmmo5g.js} +1 -1
  57. package/dist/assets/{index-Dfhr_H2_.js → index-Drq4Lpl3.js} +1 -1
  58. package/dist/assets/{index-Bfo4GfNg.js → index-MUMVp22V.js} +1 -1
  59. package/dist/assets/{index-CaI_HNZm.js → index-NLK5-sPO.js} +1 -1
  60. package/dist/assets/index-_lj65MZR.js +507 -0
  61. package/dist/assets/{index-BphBwy1v.js → index-d0CXXxee.js} +2 -2
  62. package/dist/assets/infoDiagram-RLU2ROGC-DAW5X38W.js +2 -0
  63. package/dist/assets/journeyDiagram-EWQZEKCU--6lJjuiM.js +139 -0
  64. package/dist/assets/{kanban-definition-NDS4AKOZ-Q5EE_ssH.js → kanban-definition-ILFWEQ3N-CXNPWHB8.js} +9 -8
  65. package/dist/assets/{layout-CDn8-Krb.js → layout-Jgv95YSr.js} +1 -1
  66. package/dist/assets/linear-DtgEMbrz.js +1 -0
  67. package/dist/assets/links-Bjf-1I2i.js +17 -0
  68. package/dist/assets/loro_wasm_bg-bPYKkGLG.wasm +0 -0
  69. package/dist/assets/mermaid-DCMac0Ai.js +152 -0
  70. package/dist/assets/min-VDyC-auF.js +1 -0
  71. package/dist/assets/{mindmap-definition-ALO5MXBD-BIL8Yk33.js → mindmap-definition-CZNETY7S-BEd6cR16.js} +4 -4
  72. package/dist/assets/number-overlay-editor-C3hemckO.js +9 -0
  73. package/dist/assets/{pieDiagram-IB7DONF6-CXSjueVW.js → pieDiagram-NIOCPIFQ-B-zGF99A.js} +1 -1
  74. package/dist/assets/{quadrantDiagram-7GDLP6J5-BpFvASma.js → quadrantDiagram-2OG54O6I-2tF9b_2b.js} +1 -1
  75. package/dist/assets/{react-plotly-0nDvD8D3.js → react-plotly-CdJaKwaj.js} +1 -1
  76. package/dist/assets/{requirementDiagram-KVF5MWMF-unRzxNJE.js → requirementDiagram-SO3GGRV7-DEa34SeY.js} +3 -3
  77. package/dist/assets/run-page-Bg1x8WTa.js +1 -0
  78. package/dist/assets/{sankeyDiagram-QLVOVGJD-Cn-XfYiE.js → sankeyDiagram-4UZDY2LN-DUIUN-K8.js} +4 -4
  79. package/dist/assets/save-worker-B8gk1S9x.js +1 -0
  80. package/dist/assets/sequenceDiagram-ZIKVLSP4-BZGddaB9.js +122 -0
  81. package/dist/assets/slides-component-C2uc6kmf.js +1 -0
  82. package/dist/assets/sortBy-Bob7dKSt.js +1 -0
  83. package/dist/assets/stateDiagram-XX37X6EN-DUi_goR8.js +1 -0
  84. package/dist/assets/stateDiagram-v2-GD6S3NHB-CdRNmgeb.js +1 -0
  85. package/dist/assets/storage-CTvz5ejZ.js +25 -0
  86. package/dist/assets/{terminal-BgXO_ixx.js → terminal-BkOhnp-S.js} +1 -1
  87. package/dist/assets/{time-CRNs3SAd.js → time-BXb9z1yv.js} +1 -1
  88. package/dist/assets/timeline-definition-RI47OAVP-CTWn3WQu.js +61 -0
  89. package/dist/assets/tracing-Z4QREdu3.js +2 -0
  90. package/dist/assets/trash-BWRVB_br.js +6 -0
  91. package/dist/assets/treemap-FKARHQ26-AlpUch0p.js +126 -0
  92. package/dist/assets/vega-component-CX_u3Hhp.js +1 -0
  93. package/dist/assets/worker-BYA2ASe8.js +1 -0
  94. package/dist/assets/worker-Ch6cKXnI.js +1 -0
  95. package/dist/assets/xychartDiagram-H2YORKM3-D0JoLNE8.js +7 -0
  96. package/dist/index.html +4 -2
  97. package/package.json +45 -44
  98. package/dist/assets/_baseEach-lpPh9W5d.js +0 -1
  99. package/dist/assets/_baseMap-SEd-6IK0.js +0 -1
  100. package/dist/assets/_baseUniq-DuEzVkFZ.js +0 -1
  101. package/dist/assets/arc-CfyY4LWz.js +0 -1
  102. package/dist/assets/architectureDiagram-IEHRJDOE-Cjnv8Vq_.js +0 -36
  103. package/dist/assets/blockDiagram-JOT3LUYC-BEIjTgHI.js +0 -121
  104. package/dist/assets/channel-BRxA1AAC.js +0 -1
  105. package/dist/assets/chunk-AEK57VVT-BfGK6Ank.js +0 -220
  106. package/dist/assets/chunk-RZ5BOZE2-DhqVBY2t.js +0 -1
  107. package/dist/assets/classDiagram-GIVACNV2-BO83RfZB.js +0 -1
  108. package/dist/assets/classDiagram-v2-COTLJTTW-BO83RfZB.js +0 -1
  109. package/dist/assets/clone-BlzJWayF.js +0 -1
  110. package/dist/assets/compile-C3U-vg-j.js +0 -10
  111. package/dist/assets/dagre-OKDRZEBW-NdY44hpH.js +0 -4
  112. package/dist/assets/data-editor-DKntw_rI.js +0 -142
  113. package/dist/assets/diagram-SSKATNLV-DF4qzt72.js +0 -43
  114. package/dist/assets/diagram-VNBRO52H-Dbdog9oU.js +0 -24
  115. package/dist/assets/edit-page-BrfZeOgm.js +0 -144
  116. package/dist/assets/flowDiagram-4HSFHLVR-i5Ql-QiJ.js +0 -161
  117. package/dist/assets/ganttDiagram-APWFNJXF-Dmuf1Tpo.js +0 -257
  118. package/dist/assets/gitGraphDiagram-7IBYFJ6S-DPM6GuRf.js +0 -65
  119. package/dist/assets/home-page-HL6VA5dw.js +0 -9
  120. package/dist/assets/index-8IZtaDUn.css +0 -1
  121. package/dist/assets/index-BJcBz6ZX.js +0 -1
  122. package/dist/assets/index-C-WOu_u0.js +0 -1
  123. package/dist/assets/index-CJaEBn8N.js +0 -501
  124. package/dist/assets/index-DBaMrMdr.js +0 -1
  125. package/dist/assets/index-DvEXKxQ8.js +0 -1
  126. package/dist/assets/index-O2ELw6Hz.js +0 -1
  127. package/dist/assets/infoDiagram-PH2N3AL5-LArKQ0VO.js +0 -2
  128. package/dist/assets/journeyDiagram-U35MCT3I-B3lHGKMN.js +0 -138
  129. package/dist/assets/linear-D6T4b48H.js +0 -1
  130. package/dist/assets/loro_wasm_bg-DHBNbovs.wasm +0 -0
  131. package/dist/assets/mermaid-CMc1ns6_.js +0 -152
  132. package/dist/assets/min-rO9M7_m2.js +0 -1
  133. package/dist/assets/radar-MK3ICKWK-_zCJRWdg.js +0 -126
  134. package/dist/assets/run-page-DtL_9ryc.js +0 -1
  135. package/dist/assets/save-worker-DZnx0AG9.js +0 -1
  136. package/dist/assets/sequenceDiagram-X6HHIX6F-CeDzabVO.js +0 -122
  137. package/dist/assets/shutdown-button-CiYHSs8n.js +0 -17
  138. package/dist/assets/slides-component-DloQyWa5.js +0 -1
  139. package/dist/assets/sortBy-HenacHs2.js +0 -1
  140. package/dist/assets/stateDiagram-DGXRK772-PGZIv6yW.js +0 -1
  141. package/dist/assets/stateDiagram-v2-YXO3MK2T-tCMN3u5q.js +0 -1
  142. package/dist/assets/storage-h-OfQolp.js +0 -27
  143. package/dist/assets/timeline-definition-BDJGKUSR-fax3GFbF.js +0 -61
  144. package/dist/assets/tracing-DJ3yaJpl.js +0 -2
  145. package/dist/assets/vega-component-Di8oSnQq.js +0 -1
  146. package/dist/assets/worker-BbdB3qWL.js +0 -1
  147. package/dist/assets/worker-CnoOKJWk.js +0 -1
  148. package/dist/assets/xychartDiagram-VJFVF3MP-CK-bnFkL.js +0 -7
  149. /package/dist/assets/{shutdown-button-C1rhMrxo.css → links-C1rhMrxo.css} +0 -0
  150. /package/dist/assets/{transform-DetRMEbJ.js → transform-CDNfLgV5.js} +0 -0
@@ -1,152 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-OKDRZEBW-NdY44hpH.js","./graph-CobhnVVx.js","./index-CJaEBn8N.js","./index-8IZtaDUn.css","./_baseUniq-DuEzVkFZ.js","./_baseEach-lpPh9W5d.js","./layout-CDn8-Krb.js","./min-rO9M7_m2.js","./_baseMap-SEd-6IK0.js","./sortBy-HenacHs2.js","./clone-BlzJWayF.js","./transform-DetRMEbJ.js","./timer-Bqd5yn_a.js","./step-BwsUM5iJ.js","./c4Diagram-VJAJSXHY-yQmPFHka.js","./chunk-D6G4REZN-Cp5gAhaU.js","./flowDiagram-4HSFHLVR-i5Ql-QiJ.js","./chunk-RZ5BOZE2-DhqVBY2t.js","./channel-BRxA1AAC.js","./erDiagram-Q7BY3M3F-Bdu1RFft.js","./gitGraphDiagram-7IBYFJ6S-DPM6GuRf.js","./chunk-4BMEZGHF-PHya-g-m.js","./chunk-XZIHB7SX-CJx8F-BK.js","./radar-MK3ICKWK-_zCJRWdg.js","./_createAggregator-8M5K7ZTQ.js","./ganttDiagram-APWFNJXF-Dmuf1Tpo.js","./time-CRNs3SAd.js","./linear-D6T4b48H.js","./init-DLRA0X12.js","./infoDiagram-PH2N3AL5-LArKQ0VO.js","./pieDiagram-IB7DONF6-CXSjueVW.js","./arc-CfyY4LWz.js","./ordinal-DDUp3AbE.js","./quadrantDiagram-7GDLP6J5-BpFvASma.js","./xychartDiagram-VJFVF3MP-CK-bnFkL.js","./range-CtcPcB_L.js","./requirementDiagram-KVF5MWMF-unRzxNJE.js","./sequenceDiagram-X6HHIX6F-CeDzabVO.js","./classDiagram-GIVACNV2-BO83RfZB.js","./chunk-A2AXSNBT-tIg30O59.js","./classDiagram-v2-COTLJTTW-BO83RfZB.js","./stateDiagram-DGXRK772-PGZIv6yW.js","./chunk-AEK57VVT-BfGK6Ank.js","./stateDiagram-v2-YXO3MK2T-tCMN3u5q.js","./journeyDiagram-U35MCT3I-B3lHGKMN.js","./timeline-definition-BDJGKUSR-fax3GFbF.js","./mindmap-definition-ALO5MXBD-BIL8Yk33.js","./cytoscape.esm-UYyVlru8.js","./kanban-definition-NDS4AKOZ-Q5EE_ssH.js","./sankeyDiagram-QLVOVGJD-Cn-XfYiE.js","./colors-bszWmPJw.js","./diagram-VNBRO52H-Dbdog9oU.js","./diagram-SSKATNLV-DF4qzt72.js","./blockDiagram-JOT3LUYC-BEIjTgHI.js","./architectureDiagram-IEHRJDOE-Cjnv8Vq_.js"])))=>i.map(i=>d[i]);
2
- import{x as Qm,Y as Km,d0 as Jm,dh as ty,di as ey,cZ as ry,dj as iy,dk as ay,y as oy,$ as gt,dl as gn,dg as ny,dm as Cp,c as sy,Q as ly,U as hy,aJ as cy,L as dy,j as uy,__tla as py}from"./index-CJaEBn8N.js";import{s as lt}from"./transform-DetRMEbJ.js";import{o as kp,q as wp,r as Sp,u as Tp,v as Bp,x as vp,y as gy,z as fn,A as Mp,B as fy,C as my,D as Lp,E as yy,F as xy,G as by,H as Cy,I as ky,k as mn,l as wy}from"./step-BwsUM5iJ.js";let sa,Ue,yn,Gt,xn,ai,At,la,bn,Cn,kn,ha,wn,Le,_p,Mr,oi,ca,Sn,Tn,Ve,tt,N,Z,da,Bn,Fp,u,vn,Ap,Mn,bt,he,ni,ua,be,pa,Ln,ga,_n,Ep,$p,Op,V,Dp,Fn,An,En,Lr,$n,On,Dn,Ip,In,ct,fa,Bt,Jt,Pn,Ce,zn,_e,ma,$,Ge,Pp,zp,Rn,qn,Rp,Nn,Wn,Xt,jn,Hn,qp,Yn,Np,Sy=Promise.all([(()=>{try{return py}catch{}})()]).then(async()=>{var pr,gr,fr,mr,yr,xr,br,Cr,je;var Wp=Object.prototype.hasOwnProperty;ga=function(e){if(e==null)return!0;if(Qm(e)&&(Km(e)||typeof e=="string"||typeof e.splice=="function"||Jm(e)||ty(e)||ey(e)))return!e.length;var t=ry(e);if(t=="[object Map]"||t=="[object Set]")return!e.size;if(iy(e))return!ay(e).length;for(var r in e)if(Wp.call(e,r))return!1;return!0};class Un{constructor(t,r){this._context=t,this._x=r}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(t,r){switch(t=+t,r=+r,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r)}this._x0=t,this._y0=r}}function Vn(e){return new Un(e,!0)}function Gn(e){return new Un(e,!1)}var Xn,Zn={exports:{}},jp=(Xn||(Xn=1,Zn.exports=function(){var e=1e3,t=6e4,r=36e5,i="millisecond",a="second",o="minute",s="hour",n="day",h="week",l="month",c="quarter",d="year",p="date",g="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var v=["th","st","nd","rd"],M=F%100;return"["+F+(v[(M-20)%10]||v[M]||v[0])+"]"}},y=function(F,v,M){var A=String(F);return!A||A.length>=v?F:""+Array(v+1-A.length).join(M)+F},C={s:y,z:function(F){var v=-F.utcOffset(),M=Math.abs(v),A=Math.floor(M/60),_=M%60;return(v<=0?"+":"-")+y(A,2,"0")+":"+y(_,2,"0")},m:function F(v,M){if(v.date()<M.date())return-F(M,v);var A=12*(M.year()-v.year())+(M.month()-v.month()),_=v.clone().add(A,l),O=M-_<0,E=v.clone().add(A+(O?-1:1),l);return+(-(A+(M-_)/(O?_-E:E-_))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:l,y:d,w:h,d:n,D:p,h:s,m:o,s:a,ms:i,Q:c}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},w="en",L={};L[w]=x;var B="$isDayjsObject",b=function(F){return F instanceof P||!(!F||!F[B])},S=function F(v,M,A){var _;if(!v)return w;if(typeof v=="string"){var O=v.toLowerCase();L[O]&&(_=O),M&&(L[O]=M,_=O);var E=v.split("-");if(!_&&E.length>1)return F(E[0])}else{var Q=v.name;L[Q]=v,_=Q}return!A&&_&&(w=_),_||!A&&w},D=function(F,v){if(b(F))return F.clone();var M=typeof v=="object"?v:{};return M.date=F,M.args=arguments,new P(M)},z=C;z.l=S,z.i=b,z.w=function(F,v){return D(F,{locale:v.$L,utc:v.$u,x:v.$x,$offset:v.$offset})};var P=function(){function F(M){this.$L=S(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[B]=!0}var v=F.prototype;return v.parse=function(M){this.$d=function(A){var _=A.date,O=A.utc;if(_===null)return new Date(NaN);if(z.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var E=_.match(f);if(E){var Q=E[2]-1||0,rt=(E[7]||"0").substring(0,3);return O?new Date(Date.UTC(E[1],Q,E[3]||1,E[4]||0,E[5]||0,E[6]||0,rt)):new Date(E[1],Q,E[3]||1,E[4]||0,E[5]||0,E[6]||0,rt)}}return new Date(_)}(M),this.init()},v.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},v.$utils=function(){return z},v.isValid=function(){return this.$d.toString()!==g},v.isSame=function(M,A){var _=D(M);return this.startOf(A)<=_&&_<=this.endOf(A)},v.isAfter=function(M,A){return D(M)<this.startOf(A)},v.isBefore=function(M,A){return this.endOf(A)<D(M)},v.$g=function(M,A,_){return z.u(M)?this[A]:this.set(_,M)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(M,A){var _=this,O=!!z.u(A)||A,E=z.p(M),Q=function(St,xt){var zt=z.w(_.$u?Date.UTC(_.$y,xt,St):new Date(_.$y,xt,St),_);return O?zt:zt.endOf(n)},rt=function(St,xt){return z.w(_.toDate()[St].apply(_.toDate("s"),(O?[0,0,0,0]:[23,59,59,999]).slice(xt)),_)},ut=this.$W,W=this.$M,pt=this.$D,ot="set"+(this.$u?"UTC":"");switch(E){case d:return O?Q(1,0):Q(31,11);case l:return O?Q(1,W):Q(0,W+1);case h:var mt=this.$locale().weekStart||0,ht=(ut<mt?ut+7:ut)-mt;return Q(O?pt-ht:pt+(6-ht),W);case n:case p:return rt(ot+"Hours",0);case s:return rt(ot+"Minutes",1);case o:return rt(ot+"Seconds",2);case a:return rt(ot+"Milliseconds",3);default:return this.clone()}},v.endOf=function(M){return this.startOf(M,!1)},v.$set=function(M,A){var _,O=z.p(M),E="set"+(this.$u?"UTC":""),Q=(_={},_[n]=E+"Date",_[p]=E+"Date",_[l]=E+"Month",_[d]=E+"FullYear",_[s]=E+"Hours",_[o]=E+"Minutes",_[a]=E+"Seconds",_[i]=E+"Milliseconds",_)[O],rt=O===n?this.$D+(A-this.$W):A;if(O===l||O===d){var ut=this.clone().set(p,1);ut.$d[Q](rt),ut.init(),this.$d=ut.set(p,Math.min(this.$D,ut.daysInMonth())).$d}else Q&&this.$d[Q](rt);return this.init(),this},v.set=function(M,A){return this.clone().$set(M,A)},v.get=function(M){return this[z.p(M)]()},v.add=function(M,A){var _,O=this;M=Number(M);var E=z.p(A),Q=function(W){var pt=D(O);return z.w(pt.date(pt.date()+Math.round(W*M)),O)};if(E===l)return this.set(l,this.$M+M);if(E===d)return this.set(d,this.$y+M);if(E===n)return Q(1);if(E===h)return Q(7);var rt=(_={},_[o]=t,_[s]=r,_[a]=e,_)[E]||1,ut=this.$d.getTime()+M*rt;return z.w(ut,this)},v.subtract=function(M,A){return this.add(-1*M,A)},v.format=function(M){var A=this,_=this.$locale();if(!this.isValid())return _.invalidDate||g;var O=M||"YYYY-MM-DDTHH:mm:ssZ",E=z.z(this),Q=this.$H,rt=this.$m,ut=this.$M,W=_.weekdays,pt=_.months,ot=_.meridiem,mt=function(xt,zt,fe,He){return xt&&(xt[zt]||xt(A,O))||fe[zt].slice(0,He)},ht=function(xt){return z.s(Q%12||12,xt,"0")},St=ot||function(xt,zt,fe){var He=xt<12?"AM":"PM";return fe?He.toLowerCase():He};return O.replace(m,function(xt,zt){return zt||function(fe){switch(fe){case"YY":return String(A.$y).slice(-2);case"YYYY":return z.s(A.$y,4,"0");case"M":return ut+1;case"MM":return z.s(ut+1,2,"0");case"MMM":return mt(_.monthsShort,ut,pt,3);case"MMMM":return mt(pt,ut);case"D":return A.$D;case"DD":return z.s(A.$D,2,"0");case"d":return String(A.$W);case"dd":return mt(_.weekdaysMin,A.$W,W,2);case"ddd":return mt(_.weekdaysShort,A.$W,W,3);case"dddd":return W[A.$W];case"H":return String(Q);case"HH":return z.s(Q,2,"0");case"h":return ht(1);case"hh":return ht(2);case"a":return St(Q,rt,!0);case"A":return St(Q,rt,!1);case"m":return String(rt);case"mm":return z.s(rt,2,"0");case"s":return String(A.$s);case"ss":return z.s(A.$s,2,"0");case"SSS":return z.s(A.$ms,3,"0");case"Z":return E}return null}(xt)||E.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(M,A,_){var O,E=this,Q=z.p(A),rt=D(M),ut=(rt.utcOffset()-this.utcOffset())*t,W=this-rt,pt=function(){return z.m(E,rt)};switch(Q){case d:O=pt()/12;break;case l:O=pt();break;case c:O=pt()/3;break;case h:O=(W-ut)/6048e5;break;case n:O=(W-ut)/864e5;break;case s:O=W/r;break;case o:O=W/t;break;case a:O=W/e;break;default:O=W}return _?O:z.a(O)},v.daysInMonth=function(){return this.endOf(l).$D},v.$locale=function(){return L[this.$L]},v.locale=function(M,A){if(!M)return this.$L;var _=this.clone(),O=S(M,A,!0);return O&&(_.$L=O),_},v.clone=function(){return z.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},F}(),I=P.prototype;return D.prototype=I,[["$ms",i],["$s",a],["$m",o],["$H",s],["$W",n],["$M",l],["$y",d],["$D",p]].forEach(function(F){I[F[1]]=function(v){return this.$g(v,F[0],F[1])}}),D.extend=function(F,v){return F.$i||(F(v,P,D),F.$i=!0),D},D.locale=S,D.isDayjs=b,D.unix=function(F){return D(1e3*F)},D.en=L[w],D.Ls=L,D.p={},D}()),Zn.exports);let _r,ce;Dn=oy(jp),_r={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return 2.55*r;e/=360,t/=100;const a=(r/=100)<.5?r*(1+t):r+t-r*t,o=2*r-a;switch(i){case"r":return 255*_r.hue2rgb(o,a,e+1/3);case"g":return 255*_r.hue2rgb(o,a,e);case"b":return 255*_r.hue2rgb(o,a,e-1/3)}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const a=Math.max(e,t,r),o=Math.min(e,t,r),s=(a+o)/2;if(i==="l")return 100*s;if(a===o)return 0;const n=a-o;if(i==="s")return 100*(s>.5?n/(2-a-o):n/(a+o));switch(a){case e:return 60*((t-r)/n+(t<r?6:0));case t:return 60*((r-e)/n+2);case r:return 60*((e-t)/n+4);default:return-1}}},tt={channel:_r,lang:{clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(1e10*e)/1e10},unit:{dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}},ce={};for(let e=0;e<=255;e++)ce[e]=tt.unit.dec2hex(e);const ya=0,Xe=1,Fe=2;class Hp{constructor(){this.type=ya}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=ya}is(t){return this.type===t}}let Fr,Ae,ke,Ze,Qe,xa,Qn,ba,T,R,Ca,ka,Kn,Jn,ts;Fr=new class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new Hp}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=ya,this}_ensureHSL(){const e=this.data,{h:t,s:r,l:i}=e;t===void 0&&(e.h=tt.channel.rgb2hsl(e,"h")),r===void 0&&(e.s=tt.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=tt.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r:t,g:r,b:i}=e;t===void 0&&(e.r=tt.channel.hsl2rgb(e,"r")),r===void 0&&(e.g=tt.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=tt.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,t=e.r;return this.type.is(Fe)||t===void 0?(this._ensureHSL(),tt.channel.hsl2rgb(e,"r")):t}get g(){const e=this.data,t=e.g;return this.type.is(Fe)||t===void 0?(this._ensureHSL(),tt.channel.hsl2rgb(e,"g")):t}get b(){const e=this.data,t=e.b;return this.type.is(Fe)||t===void 0?(this._ensureHSL(),tt.channel.hsl2rgb(e,"b")):t}get h(){const e=this.data,t=e.h;return this.type.is(Xe)||t===void 0?(this._ensureRGB(),tt.channel.rgb2hsl(e,"h")):t}get s(){const e=this.data,t=e.s;return this.type.is(Xe)||t===void 0?(this._ensureRGB(),tt.channel.rgb2hsl(e,"s")):t}get l(){const e=this.data,t=e.l;return this.type.is(Xe)||t===void 0?(this._ensureRGB(),tt.channel.rgb2hsl(e,"l")):t}get a(){return this.data.a}set r(e){this.type.set(Xe),this.changed=!0,this.data.r=e}set g(e){this.type.set(Xe),this.changed=!0,this.data.g=e}set b(e){this.type.set(Xe),this.changed=!0,this.data.b=e}set h(e){this.type.set(Fe),this.changed=!0,this.data.h=e}set s(e){this.type.set(Fe),this.changed=!0,this.data.s=e}set l(e){this.type.set(Fe),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}({r:0,g:0,b:0,a:0},"transparent"),Ae={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Ae.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,o=a%4==0,s=a>4,n=s?1:17,h=s?8:4,l=o?0:-1,c=s?255:15;return Fr.set({r:(i>>h*(l+3)&c)*n,g:(i>>h*(l+2)&c)*n,b:(i>>h*(l+1)&c)*n,a:o?(i&c)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${ce[Math.round(t)]}${ce[Math.round(r)]}${ce[Math.round(i)]}${ce[Math.round(255*a)]}`:`#${ce[Math.round(t)]}${ce[Math.round(r)]}${ce[Math.round(i)]}`}},ke={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(ke.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return tt.channel.clamp.h(.9*parseFloat(r));case"rad":return tt.channel.clamp.h(180*parseFloat(r)/Math.PI);case"turn":return tt.channel.clamp.h(360*parseFloat(r))}}return tt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(ke.re);if(!r)return;const[,i,a,o,s,n]=r;return Fr.set({h:ke._hue2deg(i),s:tt.channel.clamp.s(parseFloat(a)),l:tt.channel.clamp.l(parseFloat(o)),a:s?tt.channel.clamp.a(n?parseFloat(s)/100:parseFloat(s)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${tt.lang.round(t)}, ${tt.lang.round(r)}%, ${tt.lang.round(i)}%, ${a})`:`hsl(${tt.lang.round(t)}, ${tt.lang.round(r)}%, ${tt.lang.round(i)}%)`}},Ze={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Ze.colors[e];if(t)return Ae.parse(t)},stringify:e=>{const t=Ae.stringify(e);for(const r in Ze.colors)if(Ze.colors[r]===t)return r}},Qe={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Qe.re);if(!r)return;const[,i,a,o,s,n,h,l,c]=r;return Fr.set({r:tt.channel.clamp.r(a?2.55*parseFloat(i):parseFloat(i)),g:tt.channel.clamp.g(s?2.55*parseFloat(o):parseFloat(o)),b:tt.channel.clamp.b(h?2.55*parseFloat(n):parseFloat(n)),a:l?tt.channel.clamp.a(c?parseFloat(l)/100:parseFloat(l)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`rgba(${tt.lang.round(t)}, ${tt.lang.round(r)}, ${tt.lang.round(i)}, ${tt.lang.round(a)})`:`rgb(${tt.lang.round(t)}, ${tt.lang.round(r)}, ${tt.lang.round(i)})`}},Gt={format:{keyword:Ze,hex:Ae,rgb:Qe,rgba:Qe,hsl:ke,hsla:ke},parse:e=>{if(typeof e!="string")return e;const t=Ae.parse(e)||Qe.parse(e)||ke.parse(e)||Ze.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Fe)||e.data.r===void 0?ke.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Qe.stringify(e):Ae.stringify(e)},xa=(e,t)=>{const r=Gt.parse(e);for(const i in t)r[i]=tt.channel.clamp[i](t[i]);return Gt.stringify(r)},Ue=(e,t,r=0,i=1)=>{if(typeof e!="number")return xa(e,{a:t});const a=Fr.set({r:tt.channel.clamp.r(e),g:tt.channel.clamp.g(t),b:tt.channel.clamp.b(r),a:tt.channel.clamp.a(i)});return Gt.stringify(a)},Qn=e=>(t=>{const{r,g:i,b:a}=Gt.parse(t),o=.2126*tt.channel.toLinear(r)+.7152*tt.channel.toLinear(i)+.0722*tt.channel.toLinear(a);return tt.lang.round(o)})(e)>=.5,Ve=e=>!Qn(e),ba=(e,t,r)=>{const i=Gt.parse(e),a=i[t],o=tt.channel.clamp[t](a+r);return a!==o&&(i[t]=o),Gt.stringify(i)},N=(e,t)=>ba(e,"l",t),Z=(e,t)=>ba(e,"l",-t),T=(e,t)=>{const r=Gt.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return xa(e,i)},R=(e,t=100)=>{const r=Gt.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((i,a,o=50)=>{const{r:s,g:n,b:h,a:l}=Gt.parse(i),{r:c,g:d,b:p,a:g}=Gt.parse(a),f=o/100,m=2*f-1,x=l-g,y=((m*x===-1?m:(m+x)/(1+m*x))+1)/2,C=1-y;return Ue(s*y+c*C,n*y+d*C,h*y+p*C,l*f+g*(1-f))})(r,e,t)},{entries:Ca,setPrototypeOf:ka,isFrozen:Kn,getPrototypeOf:Jn,getOwnPropertyDescriptor:ts}=Object;let{freeze:Et,seal:Ut,create:es}=Object,{apply:wa,construct:Sa}=typeof Reflect<"u"&&Reflect;Et||(Et=function(e){return e}),Ut||(Ut=function(e){return e}),wa||(wa=function(e,t,r){return e.apply(t,r)}),Sa||(Sa=function(e,t){return new e(...t)});const si=Ot(Array.prototype.forEach),Yp=Ot(Array.prototype.lastIndexOf),rs=Ot(Array.prototype.pop),Ar=Ot(Array.prototype.push),Up=Ot(Array.prototype.splice),li=Ot(String.prototype.toLowerCase),Ta=Ot(String.prototype.toString),is=Ot(String.prototype.match),Er=Ot(String.prototype.replace),Vp=Ot(String.prototype.indexOf),Gp=Ot(String.prototype.trim),Zt=Ot(Object.prototype.hasOwnProperty),$t=Ot(RegExp.prototype.test),$r=(as=TypeError,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Sa(as,t)});var as;function Ot(e){return function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return wa(e,t,i)}}function it(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:li;ka&&ka(e,null);let i=t.length;for(;i--;){let a=t[i];if(typeof a=="string"){const o=r(a);o!==a&&(Kn(t)||(t[i]=o),a=o)}e[a]=!0}return e}function Xp(e){for(let t=0;t<e.length;t++)Zt(e,t)||(e[t]=null);return e}function Ee(e){const t=es(null);for(const[r,i]of Ca(e))Zt(e,r)&&(Array.isArray(i)?t[r]=Xp(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=Ee(i):t[r]=i);return t}function Or(e,t){for(;e!==null;){const r=ts(e,t);if(r){if(r.get)return Ot(r.get);if(typeof r.value=="function")return Ot(r.value)}e=Jn(e)}return function(){return null}}const os=Et(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ba=Et(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),va=Et(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Zp=Et(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ma=Et(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Qp=Et(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ns=Et(["#text"]),ss=Et(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),La=Et(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ls=Et(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),hi=Et(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Kp=Ut(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Jp=Ut(/<%[\w\W]*|[\w\W]*%>/gm),tg=Ut(/\$\{[\w\W]*/gm),eg=Ut(/^data-[\-\w.\u00B7-\uFFFF]+$/),rg=Ut(/^aria-[\-\w]+$/),hs=Ut(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ig=Ut(/^(?:\w+script|data):/i),ag=Ut(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),cs=Ut(/^html$/i),og=Ut(/^[a-z][.\w]*(-[.\w]+)+$/i);var ds=Object.freeze({__proto__:null,ARIA_ATTR:rg,ATTR_WHITESPACE:ag,CUSTOM_ELEMENT:og,DATA_ATTR:eg,DOCTYPE_NAME:cs,ERB_EXPR:Jp,IS_ALLOWED_URI:hs,IS_SCRIPT_OR_DATA:ig,MUSTACHE_EXPR:Kp,TMPLIT_EXPR:tg});const ng=1,sg=3,lg=7,hg=8,cg=9,dg=function(){return typeof window>"u"?null:window};let us,$e,_a,te,ci,Wt,Fa,Ke,ps,Aa,Oe,di,Ea,$a,gs,ui,Dr,Ir,_t,fs,ms,ys,xs,bs,Cs,ks,ws,ee,re,Oa,Da,Ss,Pr,Ts,De,Dt,Je,zr,Rr,Bs,vs,Ms,Ia,Pa,za,Ls,qr,_s,Ra,Fs,qa,As,Es;$e=function e(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:dg();const r=k=>e(k);if(r.version="3.2.4",r.removed=[],!t||!t.document||t.document.nodeType!==cg||!t.Element)return r.isSupported=!1,r;let{document:i}=t;const a=i,o=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:n,Node:h,Element:l,NodeFilter:c,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:g,trustedTypes:f}=t,m=l.prototype,x=Or(m,"cloneNode"),y=Or(m,"remove"),C=Or(m,"nextSibling"),w=Or(m,"childNodes"),L=Or(m,"parentNode");if(typeof n=="function"){const k=i.createElement("template");k.content&&k.content.ownerDocument&&(i=k.content.ownerDocument)}let B,b="";const{implementation:S,createNodeIterator:D,createDocumentFragment:z,getElementsByTagName:P}=i,{importNode:I}=a;let F={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported=typeof Ca=="function"&&typeof L=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:v,ERB_EXPR:M,TMPLIT_EXPR:A,DATA_ATTR:_,ARIA_ATTR:O,IS_SCRIPT_OR_DATA:E,ATTR_WHITESPACE:Q,CUSTOM_ELEMENT:rt}=ds;let{IS_ALLOWED_URI:ut}=ds,W=null;const pt=it({},[...os,...Ba,...va,...Ma,...ns]);let ot=null;const mt=it({},[...ss,...La,...ls,...hi]);let ht=Object.seal(es(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),St=null,xt=null,zt=!0,fe=!0,He=!1,ep=!0,kr=!1,on=!0,Ye=!1,nn=!1,sn=!1,wr=!1,ta=!1,ea=!1,rp=!0,ip=!1,ln=!0,ri=!1,Sr={},Tr=null;const ap=it({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let op=null;const np=it({},["audio","video","img","source","image","track"]);let hn=null;const sp=it({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ra="http://www.w3.org/1998/Math/MathML",ia="http://www.w3.org/2000/svg",me="http://www.w3.org/1999/xhtml";let Br=me,cn=!1,dn=null;const Um=it({},[ra,ia,me],Ta);let aa=it({},["mi","mo","mn","ms","mtext"]),oa=it({},["annotation-xml"]);const Vm=it({},["title","style","font","a","script"]);let ii=null;const Gm=["application/xhtml+xml","text/html"];let Mt=null,vr=null;const Xm=i.createElement("form"),lp=function(k){return k instanceof RegExp||k instanceof Function},un=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!vr||vr!==k){if(k&&typeof k=="object"||(k={}),k=Ee(k),ii=Gm.indexOf(k.PARSER_MEDIA_TYPE)===-1?"text/html":k.PARSER_MEDIA_TYPE,Mt=ii==="application/xhtml+xml"?Ta:li,W=Zt(k,"ALLOWED_TAGS")?it({},k.ALLOWED_TAGS,Mt):pt,ot=Zt(k,"ALLOWED_ATTR")?it({},k.ALLOWED_ATTR,Mt):mt,dn=Zt(k,"ALLOWED_NAMESPACES")?it({},k.ALLOWED_NAMESPACES,Ta):Um,hn=Zt(k,"ADD_URI_SAFE_ATTR")?it(Ee(sp),k.ADD_URI_SAFE_ATTR,Mt):sp,op=Zt(k,"ADD_DATA_URI_TAGS")?it(Ee(np),k.ADD_DATA_URI_TAGS,Mt):np,Tr=Zt(k,"FORBID_CONTENTS")?it({},k.FORBID_CONTENTS,Mt):ap,St=Zt(k,"FORBID_TAGS")?it({},k.FORBID_TAGS,Mt):{},xt=Zt(k,"FORBID_ATTR")?it({},k.FORBID_ATTR,Mt):{},Sr=!!Zt(k,"USE_PROFILES")&&k.USE_PROFILES,zt=k.ALLOW_ARIA_ATTR!==!1,fe=k.ALLOW_DATA_ATTR!==!1,He=k.ALLOW_UNKNOWN_PROTOCOLS||!1,ep=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,kr=k.SAFE_FOR_TEMPLATES||!1,on=k.SAFE_FOR_XML!==!1,Ye=k.WHOLE_DOCUMENT||!1,wr=k.RETURN_DOM||!1,ta=k.RETURN_DOM_FRAGMENT||!1,ea=k.RETURN_TRUSTED_TYPE||!1,sn=k.FORCE_BODY||!1,rp=k.SANITIZE_DOM!==!1,ip=k.SANITIZE_NAMED_PROPS||!1,ln=k.KEEP_CONTENT!==!1,ri=k.IN_PLACE||!1,ut=k.ALLOWED_URI_REGEXP||hs,Br=k.NAMESPACE||me,aa=k.MATHML_TEXT_INTEGRATION_POINTS||aa,oa=k.HTML_INTEGRATION_POINTS||oa,ht=k.CUSTOM_ELEMENT_HANDLING||{},k.CUSTOM_ELEMENT_HANDLING&&lp(k.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ht.tagNameCheck=k.CUSTOM_ELEMENT_HANDLING.tagNameCheck),k.CUSTOM_ELEMENT_HANDLING&&lp(k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ht.attributeNameCheck=k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ht.allowCustomizedBuiltInElements=k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),kr&&(fe=!1),ta&&(wr=!0),Sr&&(W=it({},ns),ot=[],Sr.html===!0&&(it(W,os),it(ot,ss)),Sr.svg===!0&&(it(W,Ba),it(ot,La),it(ot,hi)),Sr.svgFilters===!0&&(it(W,va),it(ot,La),it(ot,hi)),Sr.mathMl===!0&&(it(W,Ma),it(ot,ls),it(ot,hi))),k.ADD_TAGS&&(W===pt&&(W=Ee(W)),it(W,k.ADD_TAGS,Mt)),k.ADD_ATTR&&(ot===mt&&(ot=Ee(ot)),it(ot,k.ADD_ATTR,Mt)),k.ADD_URI_SAFE_ATTR&&it(hn,k.ADD_URI_SAFE_ATTR,Mt),k.FORBID_CONTENTS&&(Tr===ap&&(Tr=Ee(Tr)),it(Tr,k.FORBID_CONTENTS,Mt)),ln&&(W["#text"]=!0),Ye&&it(W,["html","head","body"]),W.table&&(it(W,["tbody"]),delete St.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw $r('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $r('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');B=k.TRUSTED_TYPES_POLICY,b=B.createHTML("")}else B===void 0&&(B=function(Y,q){if(typeof Y!="object"||typeof Y.createPolicy!="function")return null;let nt=null;const dt="data-tt-policy-suffix";q&&q.hasAttribute(dt)&&(nt=q.getAttribute(dt));const at="dompurify"+(nt?"#"+nt:"");try{return Y.createPolicy(at,{createHTML:Tt=>Tt,createScriptURL:Tt=>Tt})}catch{return console.warn("TrustedTypes policy "+at+" could not be created."),null}}(f,o)),B!==null&&typeof b=="string"&&(b=B.createHTML(""));Et&&Et(k),vr=k}},hp=it({},[...Ba,...va,...Zp]),cp=it({},[...Ma,...Qp]),se=function(k){Ar(r.removed,{element:k});try{L(k).removeChild(k)}catch{y(k)}},na=function(k,Y){try{Ar(r.removed,{attribute:Y.getAttributeNode(k),from:Y})}catch{Ar(r.removed,{attribute:null,from:Y})}if(Y.removeAttribute(k),k==="is")if(wr||ta)try{se(Y)}catch{}else try{Y.setAttribute(k,"")}catch{}},dp=function(k){let Y=null,q=null;if(sn)k="<remove></remove>"+k;else{const at=is(k,/^[\r\n\t ]+/);q=at&&at[0]}ii==="application/xhtml+xml"&&Br===me&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const nt=B?B.createHTML(k):k;if(Br===me)try{Y=new g().parseFromString(nt,ii)}catch{}if(!Y||!Y.documentElement){Y=S.createDocument(Br,"template",null);try{Y.documentElement.innerHTML=cn?b:nt}catch{}}const dt=Y.body||Y.documentElement;return k&&q&&dt.insertBefore(i.createTextNode(q),dt.childNodes[0]||null),Br===me?P.call(Y,Ye?"html":"body")[0]:Ye?Y.documentElement:dt},up=function(k){return D.call(k.ownerDocument||k,k,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},pn=function(k){return k instanceof p&&(typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||!(k.attributes instanceof d)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function")},pp=function(k){return typeof h=="function"&&k instanceof h};function ye(k,Y,q){si(k,nt=>{nt.call(r,Y,q,vr)})}const gp=function(k){let Y=null;if(ye(F.beforeSanitizeElements,k,null),pn(k))return se(k),!0;const q=Mt(k.nodeName);if(ye(F.uponSanitizeElement,k,{tagName:q,allowedTags:W}),k.hasChildNodes()&&!pp(k.firstElementChild)&&$t(/<[/\w]/g,k.innerHTML)&&$t(/<[/\w]/g,k.textContent)||k.nodeType===lg||on&&k.nodeType===hg&&$t(/<[/\w]/g,k.data))return se(k),!0;if(!W[q]||St[q]){if(!St[q]&&mp(q)&&(ht.tagNameCheck instanceof RegExp&&$t(ht.tagNameCheck,q)||ht.tagNameCheck instanceof Function&&ht.tagNameCheck(q)))return!1;if(ln&&!Tr[q]){const nt=L(k)||k.parentNode,dt=w(k)||k.childNodes;if(dt&&nt)for(let at=dt.length-1;at>=0;--at){const Tt=x(dt[at],!0);Tt.__removalCount=(k.__removalCount||0)+1,nt.insertBefore(Tt,C(k))}}return se(k),!0}return k instanceof l&&!function(nt){let dt=L(nt);dt&&dt.tagName||(dt={namespaceURI:Br,tagName:"template"});const at=li(nt.tagName),Tt=li(dt.tagName);return!!dn[nt.namespaceURI]&&(nt.namespaceURI===ia?dt.namespaceURI===me?at==="svg":dt.namespaceURI===ra?at==="svg"&&(Tt==="annotation-xml"||aa[Tt]):!!hp[at]:nt.namespaceURI===ra?dt.namespaceURI===me?at==="math":dt.namespaceURI===ia?at==="math"&&oa[Tt]:!!cp[at]:nt.namespaceURI===me?!(dt.namespaceURI===ia&&!oa[Tt])&&!(dt.namespaceURI===ra&&!aa[Tt])&&!cp[at]&&(Vm[at]||!hp[at]):!(ii!=="application/xhtml+xml"||!dn[nt.namespaceURI]))}(k)?(se(k),!0):q!=="noscript"&&q!=="noembed"&&q!=="noframes"||!$t(/<\/no(script|embed|frames)/i,k.innerHTML)?(kr&&k.nodeType===sg&&(Y=k.textContent,si([v,M,A],nt=>{Y=Er(Y,nt," ")}),k.textContent!==Y&&(Ar(r.removed,{element:k.cloneNode()}),k.textContent=Y)),ye(F.afterSanitizeElements,k,null),!1):(se(k),!0)},fp=function(k,Y,q){if(rp&&(Y==="id"||Y==="name")&&(q in i||q in Xm))return!1;if(!(fe&&!xt[Y]&&$t(_,Y))){if(!(zt&&$t(O,Y))){if(!ot[Y]||xt[Y]){if(!(mp(k)&&(ht.tagNameCheck instanceof RegExp&&$t(ht.tagNameCheck,k)||ht.tagNameCheck instanceof Function&&ht.tagNameCheck(k))&&(ht.attributeNameCheck instanceof RegExp&&$t(ht.attributeNameCheck,Y)||ht.attributeNameCheck instanceof Function&&ht.attributeNameCheck(Y))||Y==="is"&&ht.allowCustomizedBuiltInElements&&(ht.tagNameCheck instanceof RegExp&&$t(ht.tagNameCheck,q)||ht.tagNameCheck instanceof Function&&ht.tagNameCheck(q))))return!1}else if(!hn[Y]){if(!$t(ut,Er(q,Q,""))){if((Y!=="src"&&Y!=="xlink:href"&&Y!=="href"||k==="script"||Vp(q,"data:")!==0||!op[k])&&!(He&&!$t(E,Er(q,Q,"")))){if(q)return!1}}}}}return!0},mp=function(k){return k!=="annotation-xml"&&is(k,rt)},yp=function(k){ye(F.beforeSanitizeAttributes,k,null);const{attributes:Y}=k;if(!Y||pn(k))return;const q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ot,forceKeepAttr:void 0};let nt=Y.length;for(;nt--;){const dt=Y[nt],{name:at,namespaceURI:Tt,value:xe}=dt,le=Mt(at);let Rt=at==="value"?xe:Gp(xe);if(q.attrName=le,q.attrValue=Rt,q.keepAttr=!0,q.forceKeepAttr=void 0,ye(F.uponSanitizeAttribute,k,q),Rt=q.attrValue,!ip||le!=="id"&&le!=="name"||(na(at,k),Rt="user-content-"+Rt),on&&$t(/((--!?|])>)|<\/(style|title)/i,Rt)){na(at,k);continue}if(q.forceKeepAttr||(na(at,k),!q.keepAttr))continue;if(!ep&&$t(/\/>/i,Rt)){na(at,k);continue}kr&&si([v,M,A],bp=>{Rt=Er(Rt,bp," ")});const xp=Mt(k.nodeName);if(fp(xp,le,Rt)){if(B&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Tt)switch(f.getAttributeType(xp,le)){case"TrustedHTML":Rt=B.createHTML(Rt);break;case"TrustedScriptURL":Rt=B.createScriptURL(Rt)}try{Tt?k.setAttributeNS(Tt,at,Rt):k.setAttribute(at,Rt),pn(k)?se(k):rs(r.removed)}catch{}}}ye(F.afterSanitizeAttributes,k,null)},Zm=function k(Y){let q=null;const nt=up(Y);for(ye(F.beforeSanitizeShadowDOM,Y,null);q=nt.nextNode();)ye(F.uponSanitizeShadowNode,q,null),gp(q),yp(q),q.content instanceof s&&k(q.content);ye(F.afterSanitizeShadowDOM,Y,null)};return r.sanitize=function(k){let Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=null,nt=null,dt=null,at=null;if(cn=!k,cn&&(k="<!-->"),typeof k!="string"&&!pp(k)){if(typeof k.toString!="function")throw $r("toString is not a function");if(typeof(k=k.toString())!="string")throw $r("dirty is not a string, aborting")}if(!r.isSupported)return k;if(nn||un(Y),r.removed=[],typeof k=="string"&&(ri=!1),ri){if(k.nodeName){const le=Mt(k.nodeName);if(!W[le]||St[le])throw $r("root node is forbidden and cannot be sanitized in-place")}}else if(k instanceof h)q=dp("<!---->"),nt=q.ownerDocument.importNode(k,!0),nt.nodeType===ng&&nt.nodeName==="BODY"||nt.nodeName==="HTML"?q=nt:q.appendChild(nt);else{if(!wr&&!kr&&!Ye&&k.indexOf("<")===-1)return B&&ea?B.createHTML(k):k;if(q=dp(k),!q)return wr?null:ea?b:""}q&&sn&&se(q.firstChild);const Tt=up(ri?k:q);for(;dt=Tt.nextNode();)gp(dt),yp(dt),dt.content instanceof s&&Zm(dt.content);if(ri)return k;if(wr){if(ta)for(at=z.call(q.ownerDocument);q.firstChild;)at.appendChild(q.firstChild);else at=q;return(ot.shadowroot||ot.shadowrootmode)&&(at=I.call(a,at,!0)),at}let xe=Ye?q.outerHTML:q.innerHTML;return Ye&&W["!doctype"]&&q.ownerDocument&&q.ownerDocument.doctype&&q.ownerDocument.doctype.name&&$t(cs,q.ownerDocument.doctype.name)&&(xe="<!DOCTYPE "+q.ownerDocument.doctype.name+`>
3
- `+xe),kr&&si([v,M,A],le=>{xe=Er(xe,le," ")}),B&&ea?B.createHTML(xe):xe},r.setConfig=function(){un(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),nn=!0},r.clearConfig=function(){vr=null,nn=!1},r.isValidAttribute=function(k,Y,q){vr||un({});const nt=Mt(k),dt=Mt(Y);return fp(nt,dt,q)},r.addHook=function(k,Y){typeof Y=="function"&&Ar(F[k],Y)},r.removeHook=function(k,Y){if(Y!==void 0){const q=Yp(F[k],Y);return q===-1?void 0:Up(F[k],q,1)[0]}return rs(F[k])},r.removeHooks=function(k){F[k]=[]},r.removeAllHooks=function(){F={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}(),_a=Object.defineProperty,u=(e,t)=>_a(e,"name",{value:t,configurable:!0}),yn=(e,t)=>{for(var r in t)_a(e,r,{get:t[r],enumerable:!0})},te={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},$={trace:u((...e)=>{},"trace"),debug:u((...e)=>{},"debug"),info:u((...e)=>{},"info"),warn:u((...e)=>{},"warn"),error:u((...e)=>{},"error"),fatal:u((...e)=>{},"fatal")},ci=u(function(e="fatal"){let t=te.fatal;typeof e=="string"?e.toLowerCase()in te&&(t=te[e]):typeof e=="number"&&(t=e),$.trace=()=>{},$.debug=()=>{},$.info=()=>{},$.warn=()=>{},$.error=()=>{},$.fatal=()=>{},t<=te.fatal&&($.fatal=console.error?console.error.bind(console,Wt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Wt("FATAL"))),t<=te.error&&($.error=console.error?console.error.bind(console,Wt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Wt("ERROR"))),t<=te.warn&&($.warn=console.warn?console.warn.bind(console,Wt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Wt("WARN"))),t<=te.info&&($.info=console.info?console.info.bind(console,Wt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Wt("INFO"))),t<=te.debug&&($.debug=console.debug?console.debug.bind(console,Wt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Wt("DEBUG"))),t<=te.trace&&($.trace=console.debug?console.debug.bind(console,Wt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Wt("TRACE")))},"setLogLevel"),Wt=u(e=>`%c${Dn().format("ss.SSS")} : ${e} : `,"format"),Fa=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Ke=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ps=/\s*%%.*\n/gm,Aa=(pr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},u(pr,"UnknownDiagramError"),pr),Oe={},di=u(function(e,t){e=e.replace(Fa,"").replace(Ke,"").replace(ps,`
4
- `);for(const[r,{detector:i}]of Object.entries(Oe))if(i(e,t))return r;throw new Aa(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ea=u((...e)=>{for(const{id:t,detector:r,loader:i}of e)$a(t,r,i)},"registerLazyLoadedDiagrams"),$a=u((e,t,r)=>{Oe[e]&&$.warn(`Detector with key ${e} already exists. Overwriting.`),Oe[e]={detector:t,loader:r},$.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),gs=u(e=>Oe[e].loader,"getDiagramLoader"),ui=u((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(o=>ui(e,o,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(o=>{e.includes(o)||e.push(o)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(o=>{typeof t[o]!="object"||e[o]!==void 0&&typeof e[o]!="object"?(i||typeof e[o]!="object"&&typeof t[o]!="object")&&(e[o]=t[o]):(e[o]===void 0&&(e[o]=Array.isArray(t[o])?[]:{}),e[o]=ui(e[o],t[o],{depth:r-1,clobber:i}))}),e)},"assignWithDepth"),Bt=ui,Dr="#ffffff",Ir="#f2f2f2",_t=u((e,t)=>T(e,t?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),fs=(gr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var r,i,a,o,s,n,h,l,c,d,p,g,f,m,x,y,C,w,L,B,b;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||T(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||T(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||_t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||_t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||_t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||R(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||R(this.tertiaryColor),this.lineColor=this.lineColor||R(this.background),this.arrowheadColor=this.arrowheadColor||R(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Z(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||R(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||N(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||Z(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Z(this.mainBkg,10)):(this.rowOdd=this.rowOdd||N(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||N(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.darkMode)for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScale"+S]=Z(this["cScale"+S],75);else for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScale"+S]=Z(this["cScale"+S],25);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||R(this["cScale"+S]);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this.darkMode?this["cScalePeer"+S]=this["cScalePeer"+S]||N(this["cScale"+S],10):this["cScalePeer"+S]=this["cScalePeer"+S]||Z(this["cScale"+S],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||T(this.mainBkg,{h:180,s:-15,l:t*(5+3*S)}),this["surfacePeer"+S]=this["surfacePeer"+S]||T(this.mainBkg,{h:180,s:-15,l:t*(8+3*S)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||T(this.primaryColor,{h:64}),this.fillType3=this.fillType3||T(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||T(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||T(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||T(this.primaryColor,{h:128}),this.fillType7=this.fillType7||T(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||T(this.primaryColor,{l:-10}),this.pie5=this.pie5||T(this.secondaryColor,{l:-10}),this.pie6=this.pie6||T(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||T(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||T(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((o=this.radar)==null?void 0:o.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((h=this.radar)==null?void 0:h.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((d=this.radar)==null?void 0:d.legendFontSize)||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ve(this.quadrant1Fill)?N(this.quadrant1Fill):Z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((p=this.xyChart)==null?void 0:p.backgroundColor)||this.background,titleColor:((g=this.xyChart)==null?void 0:g.titleColor)||this.primaryTextColor,xAxisTitleColor:((f=this.xyChart)==null?void 0:f.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((m=this.xyChart)==null?void 0:m.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((x=this.xyChart)==null?void 0:x.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((C=this.xyChart)==null?void 0:C.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((w=this.xyChart)==null?void 0:w.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((L=this.xyChart)==null?void 0:L.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((B=this.xyChart)==null?void 0:B.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((b=this.xyChart)==null?void 0:b.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(this.primaryColor,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=Z(this.git0,25),this.git1=Z(this.git1,25),this.git2=Z(this.git2,25),this.git3=Z(this.git3,25),this.git4=Z(this.git4,25),this.git5=Z(this.git5,25),this.git6=Z(this.git6,25),this.git7=Z(this.git7,25)),this.gitInv0=this.gitInv0||R(this.git0),this.gitInv1=this.gitInv1||R(this.git1),this.gitInv2=this.gitInv2||R(this.git2),this.gitInv3=this.gitInv3||R(this.git3),this.gitInv4=this.gitInv4||R(this.git4),this.gitInv5=this.gitInv5||R(this.git5),this.gitInv6=this.gitInv6||R(this.git6),this.gitInv7=this.gitInv7||R(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Dr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ir}calculate(t){if(typeof t!="object")return void this.updateColors();const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(gr,"Theme"),gr),ms=u(e=>{const t=new fs;return t.calculate(e),t},"getThemeVariables"),ys=(fr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=N(this.primaryColor,16),this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=R(this.background),this.secondaryBorderColor=_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_t(this.tertiaryColor,this.darkMode),this.primaryTextColor=R(this.primaryColor),this.secondaryTextColor=R(this.secondaryColor),this.tertiaryTextColor=R(this.tertiaryColor),this.lineColor=R(this.background),this.textColor=R(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=N(R("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ue(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Z("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Z(this.sectionBkgColor,10),this.taskBorderColor=Ue(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ue(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||N(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Z(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,r,i,a,o,s,n,h,l,c,d,p,g,f,m,x,y,C,w,L,B;this.secondBkg=N(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=N(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=N(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330});for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScaleInv"+b]=this["cScaleInv"+b]||R(this["cScale"+b]);for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScalePeer"+b]=this["cScalePeer"+b]||N(this["cScale"+b],10);for(let b=0;b<5;b++)this["surface"+b]=this["surface"+b]||T(this.mainBkg,{h:30,s:-30,l:-(4*b-10)}),this["surfacePeer"+b]=this["surfacePeer"+b]||T(this.mainBkg,{h:30,s:-30,l:-(4*b-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScaleLabel"+b]=this["cScaleLabel"+b]||this.scaleLabelColor;for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["pie"+b]=this["cScale"+b];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ve(this.quadrant1Fill)?N(this.quadrant1Fill):Z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((c=this.xyChart)==null?void 0:c.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((p=this.radar)==null?void 0:p.axisColor)||this.lineColor,axisStrokeWidth:((g=this.radar)==null?void 0:g.axisStrokeWidth)||2,axisLabelFontSize:((f=this.radar)==null?void 0:f.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((x=this.radar)==null?void 0:x.curveStrokeWidth)||2,graticuleColor:((y=this.radar)==null?void 0:y.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((C=this.radar)==null?void 0:C.graticuleStrokeWidth)||1,graticuleOpacity:((w=this.radar)==null?void 0:w.graticuleOpacity)||.3,legendBoxSize:((L=this.radar)==null?void 0:L.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.legendFontSize)||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=N(this.secondaryColor,20),this.git1=N(this.pie2||this.secondaryColor,20),this.git2=N(this.pie3||this.tertiaryColor,20),this.git3=N(this.pie4||T(this.primaryColor,{h:-30}),20),this.git4=N(this.pie5||T(this.primaryColor,{h:-60}),20),this.git5=N(this.pie6||T(this.primaryColor,{h:-90}),10),this.git6=N(this.pie7||T(this.primaryColor,{h:60}),10),this.git7=N(this.pie8||T(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||R(this.git0),this.gitInv1=this.gitInv1||R(this.git1),this.gitInv2=this.gitInv2||R(this.git2),this.gitInv3=this.gitInv3||R(this.git3),this.gitInv4=this.gitInv4||R(this.git4),this.gitInv5=this.gitInv5||R(this.git5),this.gitInv6=this.gitInv6||R(this.git6),this.gitInv7=this.gitInv7||R(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||R(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||R(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||N(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||N(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object")return void this.updateColors();const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(fr,"Theme"),fr),xs=u(e=>{const t=new ys;return t.calculate(e),t},"getThemeVariables"),bs=(mr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=T(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=_t(this.primaryColor,this.darkMode),this.secondaryBorderColor=_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_t(this.tertiaryColor,this.darkMode),this.primaryTextColor=R(this.primaryColor),this.secondaryTextColor=R(this.secondaryColor),this.tertiaryTextColor=R(this.tertiaryColor),this.lineColor=R(this.background),this.textColor=R(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=Ue(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var t,r,i,a,o,s,n,h,l,c,d,p,g,f,m,x,y,C,w,L,B;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Z(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Z(this.tertiaryColor,40);for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScale"+b]=Z(this["cScale"+b],10),this["cScalePeer"+b]=this["cScalePeer"+b]||Z(this["cScale"+b],25);for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScaleInv"+b]=this["cScaleInv"+b]||T(this["cScale"+b],{h:180});for(let b=0;b<5;b++)this["surface"+b]=this["surface"+b]||T(this.mainBkg,{h:30,l:-(5+5*b)}),this["surfacePeer"+b]=this["surfacePeer"+b]||T(this.mainBkg,{h:30,l:-(7+5*b)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||R(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||R(this.labelTextColor);for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScaleLabel"+b]=this["cScaleLabel"+b]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=N(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||N(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||N(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||T(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||T(this.primaryColor,{l:-10}),this.pie5=this.pie5||T(this.secondaryColor,{l:-30}),this.pie6=this.pie6||T(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||T(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||T(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ve(this.quadrant1Fill)?N(this.quadrant1Fill):Z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((s=this.radar)==null?void 0:s.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((l=this.radar)==null?void 0:l.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.xyChart={backgroundColor:((d=this.xyChart)==null?void 0:d.backgroundColor)||this.background,titleColor:((p=this.xyChart)==null?void 0:p.titleColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((f=this.xyChart)==null?void 0:f.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((x=this.xyChart)==null?void 0:x.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((y=this.xyChart)==null?void 0:y.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((C=this.xyChart)==null?void 0:C.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((w=this.xyChart)==null?void 0:w.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((L=this.xyChart)==null?void 0:L.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((B=this.xyChart)==null?void 0:B.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(this.primaryColor,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=Z(this.git0,25),this.git1=Z(this.git1,25),this.git2=Z(this.git2,25),this.git3=Z(this.git3,25),this.git4=Z(this.git4,25),this.git5=Z(this.git5,25),this.git6=Z(this.git6,25),this.git7=Z(this.git7,25)),this.gitInv0=this.gitInv0||Z(R(this.git0),25),this.gitInv1=this.gitInv1||R(this.git1),this.gitInv2=this.gitInv2||R(this.git2),this.gitInv3=this.gitInv3||R(this.git3),this.gitInv4=this.gitInv4||R(this.git4),this.gitInv5=this.gitInv5||R(this.git5),this.gitInv6=this.gitInv6||R(this.git6),this.gitInv7=this.gitInv7||R(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||R(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||R(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Dr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ir}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object")return void this.updateColors();const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(mr,"Theme"),mr),wn=u(e=>{const t=new bs;return t.calculate(e),t},"getThemeVariables"),Cs=(yr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=N("#cde498",10),this.primaryBorderColor=_t(this.primaryColor,this.darkMode),this.secondaryBorderColor=_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_t(this.tertiaryColor,this.darkMode),this.primaryTextColor=R(this.primaryColor),this.secondaryTextColor=R(this.secondaryColor),this.tertiaryTextColor=R(this.primaryColor),this.lineColor=R(this.background),this.textColor=R(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,a,o,s,n,h,l,c,d,p,g,f,m,x,y,C,w,L,B;this.actorBorder=Z(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Z(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Z(this.tertiaryColor,40);for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScale"+b]=Z(this["cScale"+b],10),this["cScalePeer"+b]=this["cScalePeer"+b]||Z(this["cScale"+b],25);for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScaleInv"+b]=this["cScaleInv"+b]||T(this["cScale"+b],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScaleLabel"+b]=this["cScaleLabel"+b]||this.scaleLabelColor;for(let b=0;b<5;b++)this["surface"+b]=this["surface"+b]||T(this.mainBkg,{h:30,s:-30,l:-(5+5*b)}),this["surfacePeer"+b]=this["surfacePeer"+b]||T(this.mainBkg,{h:30,s:-30,l:-(8+5*b)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||N(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||N(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||T(this.primaryColor,{l:-30}),this.pie5=this.pie5||T(this.secondaryColor,{l:-30}),this.pie6=this.pie6||T(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||T(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||T(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ve(this.quadrant1Fill)?N(this.quadrant1Fill):Z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((s=this.radar)==null?void 0:s.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((l=this.radar)==null?void 0:l.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.xyChart={backgroundColor:((d=this.xyChart)==null?void 0:d.backgroundColor)||this.background,titleColor:((p=this.xyChart)==null?void 0:p.titleColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((f=this.xyChart)==null?void 0:f.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((x=this.xyChart)==null?void 0:x.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((y=this.xyChart)==null?void 0:y.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((C=this.xyChart)==null?void 0:C.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((w=this.xyChart)==null?void 0:w.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((L=this.xyChart)==null?void 0:L.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((B=this.xyChart)==null?void 0:B.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(this.primaryColor,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=Z(this.git0,25),this.git1=Z(this.git1,25),this.git2=Z(this.git2,25),this.git3=Z(this.git3,25),this.git4=Z(this.git4,25),this.git5=Z(this.git5,25),this.git6=Z(this.git6,25),this.git7=Z(this.git7,25)),this.gitInv0=this.gitInv0||R(this.git0),this.gitInv1=this.gitInv1||R(this.git1),this.gitInv2=this.gitInv2||R(this.git2),this.gitInv3=this.gitInv3||R(this.git3),this.gitInv4=this.gitInv4||R(this.git4),this.gitInv5=this.gitInv5||R(this.git5),this.gitInv6=this.gitInv6||R(this.git6),this.gitInv7=this.gitInv7||R(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||R(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||R(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Dr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ir}calculate(t){if(typeof t!="object")return void this.updateColors();const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(yr,"Theme"),yr),ks=u(e=>{const t=new Cs;return t.calculate(e),t},"getThemeVariables"),ws=(xr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=N(this.contrast,55),this.background="#ffffff",this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=_t(this.primaryColor,this.darkMode),this.secondaryBorderColor=_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_t(this.tertiaryColor,this.darkMode),this.primaryTextColor=R(this.primaryColor),this.secondaryTextColor=R(this.secondaryColor),this.tertiaryTextColor=R(this.tertiaryColor),this.lineColor=R(this.background),this.textColor=R(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||N(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,a,o,s,n,h,l,c,d,p,g,f,m,x,y,C,w,L,B;this.secondBkg=N(this.contrast,55),this.border2=this.contrast,this.actorBorder=N(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScaleInv"+b]=this["cScaleInv"+b]||R(this["cScale"+b]);for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this.darkMode?this["cScalePeer"+b]=this["cScalePeer"+b]||N(this["cScale"+b],10):this["cScalePeer"+b]=this["cScalePeer"+b]||Z(this["cScale"+b],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["cScaleLabel"+b]=this["cScaleLabel"+b]||this.scaleLabelColor;for(let b=0;b<5;b++)this["surface"+b]=this["surface"+b]||T(this.mainBkg,{l:-(5+5*b)}),this["surfacePeer"+b]=this["surfacePeer"+b]||T(this.mainBkg,{l:-(8+5*b)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=N(this.contrast,30),this.sectionBkgColor2=N(this.contrast,30),this.taskBorderColor=Z(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=N(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Z(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(this.secondaryColor,{h:128});for(let b=0;b<this.THEME_COLOR_LIMIT;b++)this["pie"+b]=this["cScale"+b];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ve(this.quadrant1Fill)?N(this.quadrant1Fill):Z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((c=this.xyChart)==null?void 0:c.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((p=this.radar)==null?void 0:p.axisColor)||this.lineColor,axisStrokeWidth:((g=this.radar)==null?void 0:g.axisStrokeWidth)||2,axisLabelFontSize:((f=this.radar)==null?void 0:f.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((x=this.radar)==null?void 0:x.curveStrokeWidth)||2,graticuleColor:((y=this.radar)==null?void 0:y.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((C=this.radar)==null?void 0:C.graticuleStrokeWidth)||1,graticuleOpacity:((w=this.radar)==null?void 0:w.graticuleOpacity)||.3,legendBoxSize:((L=this.radar)==null?void 0:L.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.legendFontSize)||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Z(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||T(this.primaryColor,{h:-30}),this.git4=this.pie5||T(this.primaryColor,{h:-60}),this.git5=this.pie6||T(this.primaryColor,{h:-90}),this.git6=this.pie7||T(this.primaryColor,{h:60}),this.git7=this.pie8||T(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||R(this.git0),this.gitInv1=this.gitInv1||R(this.git1),this.gitInv2=this.gitInv2||R(this.git2),this.gitInv3=this.gitInv3||R(this.git3),this.gitInv4=this.gitInv4||R(this.git4),this.gitInv5=this.gitInv5||R(this.git5),this.gitInv6=this.gitInv6||R(this.git6),this.gitInv7=this.gitInv7||R(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Dr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ir}calculate(t){if(typeof t!="object")return void this.updateColors();const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(xr,"Theme"),xr),ee={base:{getThemeVariables:ms},dark:{getThemeVariables:xs},default:{getThemeVariables:wn},forest:{getThemeVariables:ks},neutral:{getThemeVariables:u(e=>{const t=new ws;return t.calculate(e),t},"getThemeVariables")}},re={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Oa={...re,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:ee.default.getThemeVariables(),sequence:{...re.sequence,messageFont:u(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:u(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:u(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...re.gantt,tickInterval:void 0,useWidth:void 0},c4:{...re.c4,useWidth:void 0,personFont:u(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:u(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:u(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:u(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:u(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:u(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:u(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:u(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:u(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:u(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:u(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:u(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:u(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:u(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:u(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:u(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:u(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:u(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:u(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:u(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:u(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:u(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...re.pie,useWidth:984},xyChart:{...re.xyChart,useWidth:void 0},requirement:{...re.requirement,useWidth:void 0},packet:{...re.packet},radar:{...re.radar}},Da=u((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Da(e[i],"")]:[...r,t+i],[]),"keyify"),Ss=new Set(Da(Oa,"")),la=Oa,Pr=u(e=>{if($.debug("sanitizeDirective called with",e),typeof e=="object"&&e!=null)if(Array.isArray(e))e.forEach(t=>Pr(t));else{for(const t of Object.keys(e)){if($.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Ss.has(t)||e[t]==null){$.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){$.debug("sanitizing object",t),Pr(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&($.debug("sanitizing css option",t),e[t]=Ts(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}$.debug("After sanitization",e)}},"sanitizeDirective"),Ts=u(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),De=Object.freeze(la),Dt=Bt({},De),Je=[],zr=Bt({},De),Rr=u((e,t)=>{let r=Bt({},e),i={};for(const a of t)za(a),i=Bt(i,a);if(r=Bt(r,i),i.theme&&i.theme in ee){const a=Bt({},us),o=Bt(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in ee&&(r.themeVariables=ee[r.theme].getThemeVariables(o))}return qa(zr=r),zr},"updateCurrentConfig"),Bs=u(e=>(Dt=Bt({},De),Dt=Bt(Dt,e),e.theme&&ee[e.theme]&&(Dt.themeVariables=ee[e.theme].getThemeVariables(e.themeVariables)),Rr(Dt,Je),Dt),"setSiteConfig"),vs=u(e=>{us=Bt({},e)},"saveConfigFromInitialize"),Ms=u(e=>(Dt=Bt(Dt,e),Rr(Dt,Je),Dt),"updateSiteConfig"),Ia=u(()=>Bt({},Dt),"getSiteConfig"),Pa=u(e=>(qa(e),Bt(zr,e),At()),"setConfig"),At=u(()=>Bt({},zr),"getConfig"),za=u(e=>{e&&(["secure",...Dt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&($.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&za(e[t])}))},"sanitize"),Ls=u(e=>{var t;Pr(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Je.push(e),Rr(Dt,Je)},"addDirective"),qr=u((e=Dt)=>{Rr(e,Je=[])},"reset"),_s={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Ra={},Fs=u(e=>{Ra[e]||($.warn(_s[e]),Ra[e]=!0)},"issueWarning"),qa=u(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Fs("LAZY_LOAD_DEPRECATED")},"checkConfig"),Ge=/<br\s*\/?>/gi,As=u(e=>e?ja(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Es=(()=>{let e=!1;return()=>{e||($s(),e=!0)}})();function $s(){const e="data-temp-href-target";$e.addHook("beforeSanitizeAttributes",t=>{t instanceof Element&&t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),$e.addHook("afterSanitizeAttributes",t=>{t instanceof Element&&t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}u($s,"setupDompurifyHooks");let Na,Wa,Os,Ds,Is,Ps,ja,zs,Rs,qs,pi,Ns,Ws,Ha,gi,js,Hs,Nr,Ys,Us,Vs;Na=u(e=>(Es(),$e.sanitize(e)),"removeScript"),Wa=u((e,t)=>{var r;if(((r=t.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=t.securityLevel;i==="antiscript"||i==="strict"?e=Na(e):i!=="loose"&&(e=(e=(e=ja(e)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),e=Ps(e))}return e},"sanitizeMore"),Ce=u((e,t)=>e&&(e=t.dompurifyConfig?$e.sanitize(Wa(e,t),t.dompurifyConfig).toString():$e.sanitize(Wa(e,t),{FORBID_TAGS:["style"]}).toString()),"sanitizeText"),Os=u((e,t)=>typeof e=="string"?Ce(e,t):e.flat().map(r=>Ce(r,t)),"sanitizeTextOrArray"),Ds=u(e=>Ge.test(e),"hasBreaks"),Is=u(e=>e.split(Ge),"splitBreaks"),Ps=u(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),ja=u(e=>e.replace(Ge,"#br#"),"breakToPlaceholder"),zs=u(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=t.replaceAll(/\(/g,"\\("),t=t.replaceAll(/\)/g,"\\)")),t},"getUrl"),bt=u(e=>e!==!1&&!["false","null","0"].includes(String(e).trim().toLowerCase()),"evaluate"),Rs=u(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),qs=u(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),ca=u(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let a=t[i];if(a===","&&i>0&&i+1<t.length){const o=t[i-1],s=t[i+1];Ns(o,s)&&(a=o+","+s,i++,r.pop())}r.push(Ws(a))}return r.join("")},"parseGenericTypes"),pi=u((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Ns=u((e,t)=>{const r=pi(e,"~"),i=pi(t,"~");return r===1&&i===1},"shouldCombineSets"),Ws=u(e=>{const t=pi(e,"~");let r=!1;if(t<=1)return e;t%2!=0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let a=i.indexOf("~"),o=i.lastIndexOf("~");for(;a!==-1&&o!==-1&&a!==o;)i[a]="<",i[o]=">",a=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Ha=u(()=>window.MathMLElement!==void 0,"isMathMLSupported"),gi=/\$\$(.*)\$\$/g,Le=u(e=>{var t;return(((t=e.match(gi))==null?void 0:t.length)??0)>0},"hasKatex"),_p=u(async(e,t)=>{e=await oi(e,t);const r=document.createElement("div");r.innerHTML=e,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),oi=u(async(e,t)=>{if(!Le(e))return e;if(!(Ha()||t.legacyMathML||t.forceLegacyMathML))return e.replace(gi,"MathML is unsupported in this environment.");const{default:r}=await gt(async()=>{const{default:a}=await import("./katex-LV4FpwlL.js");return{default:a}},[],import.meta.url),i=t.forceLegacyMathML||!Ha()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Ge).map(a=>Le(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(gi,(a,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))},"renderKatex"),_e={getRows:As,sanitizeText:Ce,sanitizeTextOrArray:Os,hasBreaks:Ds,splitBreaks:Is,lineBreakRegex:Ge,removeScript:Na,getUrl:zs,evaluate:bt,getMax:Rs,getMin:qs},js=u(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Hs=u(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),fa=u(function(e,t,r,i){const a=Hs(t,r,i);js(e,a)},"configureSvgSize"),Tn=u(function(e,t,r,i){const a=t.node().getBBox(),o=a.width,s=a.height;$.info(`SVG bounds: ${o}x${s}`,a);let n=0,h=0;$.info(`Graph bounds: ${n}x${h}`,e),n=o+2*r,h=s+2*r,$.info(`Calculated bounds: ${n}x${h}`),fa(t,h,n,i);const l=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",l)},"setupGraphViewbox"),Nr={},Ys=u((e,t,r)=>{let i="";return e in Nr&&Nr[e]?i=Nr[e](r):$.warn(`No theme found for ${e}`),` & {
5
- font-family: ${r.fontFamily};
6
- font-size: ${r.fontSize};
7
- fill: ${r.textColor}
8
- }
9
- @keyframes edge-animation-frame {
10
- from {
11
- stroke-dashoffset: 0;
12
- }
13
- }
14
- @keyframes dash {
15
- to {
16
- stroke-dashoffset: 0;
17
- }
18
- }
19
- & .edge-animation-slow {
20
- stroke-dasharray: 9,5 !important;
21
- stroke-dashoffset: 900;
22
- animation: dash 50s linear infinite;
23
- stroke-linecap: round;
24
- }
25
- & .edge-animation-fast {
26
- stroke-dasharray: 9,5 !important;
27
- stroke-dashoffset: 900;
28
- animation: dash 20s linear infinite;
29
- stroke-linecap: round;
30
- }
31
- /* Classes common for multiple diagrams */
32
-
33
- & .error-icon {
34
- fill: ${r.errorBkgColor};
35
- }
36
- & .error-text {
37
- fill: ${r.errorTextColor};
38
- stroke: ${r.errorTextColor};
39
- }
40
-
41
- & .edge-thickness-normal {
42
- stroke-width: 1px;
43
- }
44
- & .edge-thickness-thick {
45
- stroke-width: 3.5px
46
- }
47
- & .edge-pattern-solid {
48
- stroke-dasharray: 0;
49
- }
50
- & .edge-thickness-invisible {
51
- stroke-width: 0;
52
- fill: none;
53
- }
54
- & .edge-pattern-dashed{
55
- stroke-dasharray: 3;
56
- }
57
- .edge-pattern-dotted {
58
- stroke-dasharray: 2;
59
- }
60
-
61
- & .marker {
62
- fill: ${r.lineColor};
63
- stroke: ${r.lineColor};
64
- }
65
- & .marker.cross {
66
- stroke: ${r.lineColor};
67
- }
68
-
69
- & svg {
70
- font-family: ${r.fontFamily};
71
- font-size: ${r.fontSize};
72
- }
73
- & p {
74
- margin: 0
75
- }
76
-
77
- ${i}
78
-
79
- ${t}
80
- `},"getStyles"),Us=u((e,t)=>{t!==void 0&&(Nr[e]=t)},"addStylesForDiagram"),Vs=Ys,da={},yn(da,{clear:()=>Yn,getAccDescription:()=>Pn,getAccTitle:()=>vn,getDiagramTitle:()=>qn,setAccDescription:()=>Nn,setAccTitle:()=>In,setDiagramTitle:()=>Rn});let fi,mi,yi,xi,Ya,Gs,bi,Xs,Wr,jr,Ci,Zs;fi="",mi="",yi="",xi=u(e=>Ce(e,At()),"sanitizeText"),Yn=u(()=>{fi="",yi="",mi=""},"clear"),In=u(e=>{fi=xi(e).replace(/^\s+/g,"")},"setAccTitle"),vn=u(()=>fi,"getAccTitle"),Nn=u(e=>{yi=xi(e).replace(/\n\s+/g,`
81
- `)},"setAccDescription"),Pn=u(()=>yi,"getAccDescription"),Rn=u(e=>{mi=xi(e)},"setDiagramTitle"),qn=u(()=>mi,"getDiagramTitle"),Ya=$,Gs=ci,ct=At,Pp=Pa,Np=De,bi=u(e=>Ce(e,ct()),"sanitizeText"),xn=Tn,Xs=u(()=>da,"getCommonDb"),Wr={},jr=u((e,t,r)=>{var i;Wr[e]&&Ya.warn(`Diagram with id ${e} already registered. Overwriting.`),Wr[e]=t,r&&$a(e,r),Us(e,t.styles),(i=t.injectUtils)==null||i.call(t,Ya,Gs,ct,bi,xn,Xs(),()=>{})},"registerDiagram"),Ci=u(e=>{if(e in Wr)return Wr[e];throw new Zs(e)},"getDiagram"),Zs=(br=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},u(br,"DiagramNotFoundError"),br);function Ua(e){return e==null}function Qs(e){return typeof e=="object"&&e!==null}function Ks(e){return Array.isArray(e)?e:Ua(e)?[]:[e]}function Js(e,t){var r,i,a,o;if(t)for(r=0,i=(o=Object.keys(t)).length;r<i;r+=1)e[a=o[r]]=t[a];return e}function tl(e,t){var r,i="";for(r=0;r<t;r+=1)i+=e;return i}function el(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}u(Ua,"isNothing"),u(Qs,"isObject"),u(Ks,"toArray"),u(Js,"extend"),u(tl,"repeat"),u(el,"isNegativeZero");var kt={isNothing:Ua,isObject:Qs,toArray:Ks,repeat:tl,isNegativeZero:el,extend:Js};function Va(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
82
-
83
- `+e.mark.snippet),i+" "+r):i}function tr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Va(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}u(Va,"formatError"),u(tr,"YAMLException$1"),tr.prototype=Object.create(Error.prototype),tr.prototype.constructor=tr,tr.prototype.toString=u(function(e){return this.name+": "+Va(this,e)},"toString");var qt=tr;function ki(e,t,r,i,a){var o="",s="",n=Math.floor(a/2)-1;return i-t>n&&(t=i-n+(o=" ... ").length),r-i>n&&(r=i+n-(s=" ...").length),{str:o+e.slice(t,r).replace(/\t/g,"\u2192")+s,pos:i-t+o.length}}function wi(e,t){return kt.repeat(" ",t-e.length)+e}function rl(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,a=[0],o=[],s=-1;r=i.exec(e.buffer);)o.push(r.index),a.push(r.index+r[0].length),e.position<=r.index&&s<0&&(s=a.length-2);s<0&&(s=a.length-1);var n,h,l="",c=Math.min(e.line+t.linesAfter,o.length).toString().length,d=t.maxLength-(t.indent+c+3);for(n=1;n<=t.linesBefore&&!(s-n<0);n++)h=ki(e.buffer,a[s-n],o[s-n],e.position-(a[s]-a[s-n]),d),l=kt.repeat(" ",t.indent)+wi((e.line-n+1).toString(),c)+" | "+h.str+`
84
- `+l;for(h=ki(e.buffer,a[s],o[s],e.position,d),l+=kt.repeat(" ",t.indent)+wi((e.line+1).toString(),c)+" | "+h.str+`
85
- `,l+=kt.repeat("-",t.indent+c+3+h.pos)+`^
86
- `,n=1;n<=t.linesAfter&&!(s+n>=o.length);n++)h=ki(e.buffer,a[s+n],o[s+n],e.position-(a[s]-a[s+n]),d),l+=kt.repeat(" ",t.indent)+wi((e.line+n+1).toString(),c)+" | "+h.str+`
87
- `;return l.replace(/\n$/,"")}u(ki,"getLine"),u(wi,"padStart"),u(rl,"makeSnippet");var ug=rl,pg=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],gg=["scalar","sequence","mapping"];function il(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}function al(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(pg.indexOf(r)===-1)throw new qt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=il(t.styleAliases||null),gg.indexOf(this.kind)===-1)throw new qt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}u(il,"compileStyleAliases"),u(al,"Type$1");var Ft=al;function Ga(e,t){var r=[];return e[t].forEach(function(i){var a=r.length;r.forEach(function(o,s){o.tag===i.tag&&o.kind===i.kind&&o.multi===i.multi&&(a=s)}),r[a]=i}),r}function ol(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(a){a.multi?(r.multi[a.kind].push(a),r.multi.fallback.push(a)):r[a.kind][a.tag]=r.fallback[a.tag]=a}for(u(i,"collectType"),e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i);return r}function Si(e){return this.extend(e)}u(Ga,"compileList"),u(ol,"compileMap"),u(Si,"Schema$1"),Si.prototype.extend=u(function(e){var t=[],r=[];if(e instanceof Ft)r.push(e);else if(Array.isArray(e))r=r.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new qt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit))}t.forEach(function(a){if(!(a instanceof Ft))throw new qt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new qt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new qt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(a){if(!(a instanceof Ft))throw new qt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Si.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=Ga(i,"implicit"),i.compiledExplicit=Ga(i,"explicit"),i.compiledTypeMap=ol(i.compiledImplicit,i.compiledExplicit),i},"extend");var fg=new Si({explicit:[new Ft("tag:yaml.org,2002:str",{kind:"scalar",construct:u(function(e){return e!==null?e:""},"construct")}),new Ft("tag:yaml.org,2002:seq",{kind:"sequence",construct:u(function(e){return e!==null?e:[]},"construct")}),new Ft("tag:yaml.org,2002:map",{kind:"mapping",construct:u(function(e){return e!==null?e:{}},"construct")})]});function nl(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function sl(){return null}function ll(e){return e===null}u(nl,"resolveYamlNull"),u(sl,"constructYamlNull"),u(ll,"isNull");var mg=new Ft("tag:yaml.org,2002:null",{kind:"scalar",resolve:nl,construct:sl,predicate:ll,represent:{canonical:u(function(){return"~"},"canonical"),lowercase:u(function(){return"null"},"lowercase"),uppercase:u(function(){return"NULL"},"uppercase"),camelcase:u(function(){return"Null"},"camelcase"),empty:u(function(){return""},"empty")},defaultStyle:"lowercase"});function hl(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function cl(e){return e==="true"||e==="True"||e==="TRUE"}function dl(e){return Object.prototype.toString.call(e)==="[object Boolean]"}u(hl,"resolveYamlBoolean"),u(cl,"constructYamlBoolean"),u(dl,"isBoolean");var yg=new Ft("tag:yaml.org,2002:bool",{kind:"scalar",resolve:hl,construct:cl,predicate:dl,represent:{lowercase:u(function(e){return e?"true":"false"},"lowercase"),uppercase:u(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:u(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function ul(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function pl(e){return 48<=e&&e<=55}function gl(e){return 48<=e&&e<=57}function fl(e){if(e===null)return!1;var t,r=e.length,i=0,a=!1;if(!r)return!1;if((t=e[i])!=="-"&&t!=="+"||(t=e[++i]),t==="0"){if(i+1===r)return!0;if((t=e[++i])==="b"){for(i++;i<r;i++)if((t=e[i])!=="_"){if(t!=="0"&&t!=="1")return!1;a=!0}return a&&t!=="_"}if(t==="x"){for(i++;i<r;i++)if((t=e[i])!=="_"){if(!ul(e.charCodeAt(i)))return!1;a=!0}return a&&t!=="_"}if(t==="o"){for(i++;i<r;i++)if((t=e[i])!=="_"){if(!pl(e.charCodeAt(i)))return!1;a=!0}return a&&t!=="_"}}if(t==="_")return!1;for(;i<r;i++)if((t=e[i])!=="_"){if(!gl(e.charCodeAt(i)))return!1;a=!0}return!(!a||t==="_")}function ml(e){var t,r=e,i=1;if(r.indexOf("_")!==-1&&(r=r.replace(/_/g,"")),(t=r[0])!=="-"&&t!=="+"||(t==="-"&&(i=-1),t=(r=r.slice(1))[0]),r==="0")return 0;if(t==="0"){if(r[1]==="b")return i*parseInt(r.slice(2),2);if(r[1]==="x")return i*parseInt(r.slice(2),16);if(r[1]==="o")return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}function yl(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1==0&&!kt.isNegativeZero(e)}u(ul,"isHexCode"),u(pl,"isOctCode"),u(gl,"isDecCode"),u(fl,"resolveYamlInteger"),u(ml,"constructYamlInteger"),u(yl,"isInteger");var xg=new Ft("tag:yaml.org,2002:int",{kind:"scalar",resolve:fl,construct:ml,predicate:yl,represent:{binary:u(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:u(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:u(function(e){return e.toString(10)},"decimal"),hexadecimal:u(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),bg=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function xl(e){return e!==null&&!(!bg.test(e)||e[e.length-1]==="_")}function bl(e){var t,r;return r=(t=e.replace(/_/g,"").toLowerCase())[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}u(xl,"resolveYamlFloat"),u(bl,"constructYamlFloat");var Cg=/^[-+]?[0-9]+e/;function Cl(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(kt.isNegativeZero(e))return"-0.0";return r=e.toString(10),Cg.test(r)?r.replace("e",".e"):r}function kl(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!=0||kt.isNegativeZero(e))}u(Cl,"representYamlFloat"),u(kl,"isFloat");var kg=new Ft("tag:yaml.org,2002:float",{kind:"scalar",resolve:xl,construct:bl,predicate:kl,represent:Cl,defaultStyle:"lowercase"}),wl=fg.extend({implicit:[mg,yg,xg,kg]}),wg=wl,Sl=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Tl=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Bl(e){return e!==null&&(Sl.exec(e)!==null||Tl.exec(e)!==null)}function vl(e){var t,r,i,a,o,s,n,h,l=0,c=null;if((t=Sl.exec(e))===null&&(t=Tl.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(r,i,a));if(o=+t[4],s=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=6e4*(60*+t[10]+ +(t[11]||0)),t[9]==="-"&&(c=-c)),h=new Date(Date.UTC(r,i,a,o,s,n,l)),c&&h.setTime(h.getTime()-c),h}function Ml(e){return e.toISOString()}u(Bl,"resolveYamlTimestamp"),u(vl,"constructYamlTimestamp"),u(Ml,"representYamlTimestamp");var Sg=new Ft("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Bl,construct:vl,instanceOf:Date,represent:Ml});function Ll(e){return e==="<<"||e===null}u(Ll,"resolveYamlMerge");var Tg=new Ft("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Ll}),Xa=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
88
- \r`;function _l(e){if(e===null)return!1;var t,r,i=0,a=e.length,o=Xa;for(r=0;r<a;r++)if(!((t=o.indexOf(e.charAt(r)))>64)){if(t<0)return!1;i+=6}return i%8==0}function Fl(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,o=Xa,s=0,n=[];for(t=0;t<a;t++)t%4==0&&t&&(n.push(s>>16&255),n.push(s>>8&255),n.push(255&s)),s=s<<6|o.indexOf(i.charAt(t));return(r=a%4*6)===0?(n.push(s>>16&255),n.push(s>>8&255),n.push(255&s)):r===18?(n.push(s>>10&255),n.push(s>>2&255)):r===12&&n.push(s>>4&255),new Uint8Array(n)}function Al(e){var t,r,i="",a=0,o=e.length,s=Xa;for(t=0;t<o;t++)t%3==0&&t&&(i+=s[a>>18&63],i+=s[a>>12&63],i+=s[a>>6&63],i+=s[63&a]),a=(a<<8)+e[t];return(r=o%3)===0?(i+=s[a>>18&63],i+=s[a>>12&63],i+=s[a>>6&63],i+=s[63&a]):r===2?(i+=s[a>>10&63],i+=s[a>>4&63],i+=s[a<<2&63],i+=s[64]):r===1&&(i+=s[a>>2&63],i+=s[a<<4&63],i+=s[64],i+=s[64]),i}function El(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}u(_l,"resolveYamlBinary"),u(Fl,"constructYamlBinary"),u(Al,"representYamlBinary"),u(El,"isBinary");var Bg=new Ft("tag:yaml.org,2002:binary",{kind:"scalar",resolve:_l,construct:Fl,predicate:El,represent:Al}),vg=Object.prototype.hasOwnProperty,Mg=Object.prototype.toString;function $l(e){if(e===null)return!0;var t,r,i,a,o,s=[],n=e;for(t=0,r=n.length;t<r;t+=1){if(i=n[t],o=!1,Mg.call(i)!=="[object Object]")return!1;for(a in i)if(vg.call(i,a)){if(o)return!1;o=!0}if(!o||s.indexOf(a)!==-1)return!1;s.push(a)}return!0}function Ol(e){return e!==null?e:[]}u($l,"resolveYamlOmap"),u(Ol,"constructYamlOmap");var Lg=new Ft("tag:yaml.org,2002:omap",{kind:"sequence",resolve:$l,construct:Ol}),_g=Object.prototype.toString;function Dl(e){if(e===null)return!0;var t,r,i,a,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(i=s[t],_g.call(i)!=="[object Object]"||(a=Object.keys(i)).length!==1)return!1;o[t]=[a[0],i[a[0]]]}return!0}function Il(e){if(e===null)return[];var t,r,i,a,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1)i=s[t],a=Object.keys(i),o[t]=[a[0],i[a[0]]];return o}u(Dl,"resolveYamlPairs"),u(Il,"constructYamlPairs");var Fg=new Ft("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Dl,construct:Il}),Ag=Object.prototype.hasOwnProperty;function Pl(e){if(e===null)return!0;var t,r=e;for(t in r)if(Ag.call(r,t)&&r[t]!==null)return!1;return!0}function zl(e){return e!==null?e:{}}u(Pl,"resolveYamlSet"),u(zl,"constructYamlSet");var Eg=new Ft("tag:yaml.org,2002:set",{kind:"mapping",resolve:Pl,construct:zl}),Rl=wg.extend({implicit:[Sg,Tg],explicit:[Bg,Lg,Fg,Eg]}),we=Object.prototype.hasOwnProperty,$g=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Og=/[\x85\u2028\u2029]/,Dg=/[,\[\]\{\}]/,ql=/^(?:!|!!|![a-z\-]+!)$/i,Nl=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Za(e){return Object.prototype.toString.call(e)}function Qt(e){return e===10||e===13}function Se(e){return e===9||e===32}function It(e){return e===9||e===32||e===10||e===13}function Ie(e){return e===44||e===91||e===93||e===123||e===125}function Wl(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function jl(e){return e===120?2:e===117?4:e===85?8:0}function Hl(e){return 48<=e&&e<=57?e-48:-1}function Qa(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
89
- `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function Yl(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}u(Za,"_class"),u(Qt,"is_EOL"),u(Se,"is_WHITE_SPACE"),u(It,"is_WS_OR_EOL"),u(Ie,"is_FLOW_INDICATOR"),u(Wl,"fromHexCode"),u(jl,"escapedHexLen"),u(Hl,"fromDecimalCode"),u(Qa,"simpleEscapeSequence"),u(Yl,"charFromCodepoint");var Pe,Ul=new Array(256),Vl=new Array(256);for(Pe=0;Pe<256;Pe++)Ul[Pe]=Qa(Pe)?1:0,Vl[Pe]=Qa(Pe);function Gl(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Rl,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Ka(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=ug(r),new qt(t,r)}function X(e,t){throw Ka(e,t)}function Hr(e,t){e.onWarning&&e.onWarning.call(null,Ka(e,t))}u(Gl,"State$1"),u(Ka,"generateError"),u(X,"throwError"),u(Hr,"throwWarning");var Xl={YAML:u(function(e,t,r){var i,a,o;e.version!==null&&X(e,"duplication of %YAML directive"),r.length!==1&&X(e,"YAML directive accepts exactly one argument"),(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))===null&&X(e,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),o=parseInt(i[2],10),a!==1&&X(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&Hr(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:u(function(e,t,r){var i,a;r.length!==2&&X(e,"TAG directive accepts exactly two arguments"),i=r[0],a=r[1],ql.test(i)||X(e,"ill-formed tag handle (first argument) of the TAG directive"),we.call(e.tagMap,i)&&X(e,'there is a previously declared suffix for "'+i+'" tag handle'),Nl.test(a)||X(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{X(e,"tag prefix is malformed: "+a)}e.tagMap[i]=a},"handleTagDirective")};function de(e,t,r,i){var a,o,s,n;if(t<r){if(n=e.input.slice(t,r),i)for(a=0,o=n.length;a<o;a+=1)(s=n.charCodeAt(a))===9||32<=s&&s<=1114111||X(e,"expected valid JSON character");else $g.test(n)&&X(e,"the stream contains non-printable characters");e.result+=n}}function Ja(e,t,r,i){var a,o,s,n;for(kt.isObject(r)||X(e,"cannot merge mappings; the provided source object is unacceptable"),s=0,n=(a=Object.keys(r)).length;s<n;s+=1)o=a[s],we.call(t,o)||(t[o]=r[o],i[o]=!0)}function ze(e,t,r,i,a,o,s,n,h){var l,c;if(Array.isArray(a))for(l=0,c=(a=Array.prototype.slice.call(a)).length;l<c;l+=1)Array.isArray(a[l])&&X(e,"nested arrays are not supported inside keys"),typeof a=="object"&&Za(a[l])==="[object Object]"&&(a[l]="[object Object]");if(typeof a=="object"&&Za(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(l=0,c=o.length;l<c;l+=1)Ja(e,t,o[l],r);else Ja(e,t,o,r);else e.json||we.call(r,a)||!we.call(t,a)||(e.line=s||e.line,e.lineStart=n||e.lineStart,e.position=h||e.position,X(e,"duplicated mapping key")),a==="__proto__"?Object.defineProperty(t,a,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[a]=o,delete r[a];return t}function Ti(e){var t;(t=e.input.charCodeAt(e.position))===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):X(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function yt(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;Se(a);)a===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),a=e.input.charCodeAt(++e.position);if(t&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(!Qt(a))break;for(Ti(e),a=e.input.charCodeAt(e.position),i++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position)}return r!==-1&&i!==0&&e.lineIndent<r&&Hr(e,"deficient indentation"),i}function Yr(e){var t,r=e.position;return!((t=e.input.charCodeAt(r))!==45&&t!==46||t!==e.input.charCodeAt(r+1)||t!==e.input.charCodeAt(r+2)||(r+=3,(t=e.input.charCodeAt(r))!==0&&!It(t)))}function Bi(e,t){t===1?e.result+=" ":t>1&&(e.result+=kt.repeat(`
90
- `,t-1))}function Zl(e,t,r){var i,a,o,s,n,h,l,c,d=e.kind,p=e.result;if(It(c=e.input.charCodeAt(e.position))||Ie(c)||c===35||c===38||c===42||c===33||c===124||c===62||c===39||c===34||c===37||c===64||c===96||(c===63||c===45)&&(It(i=e.input.charCodeAt(e.position+1))||r&&Ie(i)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,s=!1;c!==0;){if(c===58){if(It(i=e.input.charCodeAt(e.position+1))||r&&Ie(i))break}else if(c===35){if(It(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&Yr(e)||r&&Ie(c))break;if(Qt(c)){if(n=e.line,h=e.lineStart,l=e.lineIndent,yt(e,!1,-1),e.lineIndent>=t){s=!0,c=e.input.charCodeAt(e.position);continue}e.position=o,e.line=n,e.lineStart=h,e.lineIndent=l;break}}s&&(de(e,a,o,!1),Bi(e,e.line-n),a=o=e.position,s=!1),Se(c)||(o=e.position+1),c=e.input.charCodeAt(++e.position)}return de(e,a,o,!1),!!e.result||(e.kind=d,e.result=p,!1)}function Ql(e,t){var r,i,a;if((r=e.input.charCodeAt(e.position))!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39){if(de(e,i,e.position,!0),(r=e.input.charCodeAt(++e.position))!==39)return!0;i=e.position,e.position++,a=e.position}else Qt(r)?(de(e,i,a,!0),Bi(e,yt(e,!1,t)),i=a=e.position):e.position===e.lineStart&&Yr(e)?X(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);X(e,"unexpected end of the stream within a single quoted scalar")}function Kl(e,t){var r,i,a,o,s,n;if((n=e.input.charCodeAt(e.position))!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return de(e,r,e.position,!0),e.position++,!0;if(n===92){if(de(e,r,e.position,!0),Qt(n=e.input.charCodeAt(++e.position)))yt(e,!1,t);else if(n<256&&Ul[n])e.result+=Vl[n],e.position++;else if((s=jl(n))>0){for(a=s,o=0;a>0;a--)(s=Wl(n=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+s:X(e,"expected hexadecimal character");e.result+=Yl(o),e.position++}else X(e,"unknown escape sequence");r=i=e.position}else Qt(n)?(de(e,r,i,!0),Bi(e,yt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Yr(e)?X(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}X(e,"unexpected end of the stream within a double quoted scalar")}function Jl(e,t){var r,i,a,o,s,n,h,l,c,d,p,g,f=!0,m=e.tag,x=e.anchor,y=Object.create(null);if((g=e.input.charCodeAt(e.position))===91)s=93,l=!1,o=[];else{if(g!==123)return!1;s=125,l=!0,o={}}for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),g=e.input.charCodeAt(++e.position);g!==0;){if(yt(e,!0,t),(g=e.input.charCodeAt(e.position))===s)return e.position++,e.tag=m,e.anchor=x,e.kind=l?"mapping":"sequence",e.result=o,!0;f?g===44&&X(e,"expected the node content, but found ','"):X(e,"missed comma between flow collection entries"),p=null,n=h=!1,g===63&&It(e.input.charCodeAt(e.position+1))&&(n=h=!0,e.position++,yt(e,!0,t)),r=e.line,i=e.lineStart,a=e.position,Re(e,t,1,!1,!0),d=e.tag,c=e.result,yt(e,!0,t),g=e.input.charCodeAt(e.position),!h&&e.line!==r||g!==58||(n=!0,g=e.input.charCodeAt(++e.position),yt(e,!0,t),Re(e,t,1,!1,!0),p=e.result),l?ze(e,o,y,d,c,p,r,i,a):n?o.push(ze(e,null,y,d,c,p,r,i,a)):o.push(c),yt(e,!0,t),(g=e.input.charCodeAt(e.position))===44?(f=!0,g=e.input.charCodeAt(++e.position)):f=!1}X(e,"unexpected end of the stream within a flow collection")}function th(e,t){var r,i,a,o,s=1,n=!1,h=!1,l=t,c=0,d=!1;if((o=e.input.charCodeAt(e.position))===124)i=!1;else{if(o!==62)return!1;i=!0}for(e.kind="scalar",e.result="";o!==0;)if((o=e.input.charCodeAt(++e.position))===43||o===45)s===1?s=o===43?3:2:X(e,"repeat of a chomping mode identifier");else{if(!((a=Hl(o))>=0))break;a===0?X(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):h?X(e,"repeat of an indentation width identifier"):(l=t+a-1,h=!0)}if(Se(o)){do o=e.input.charCodeAt(++e.position);while(Se(o));if(o===35)do o=e.input.charCodeAt(++e.position);while(!Qt(o)&&o!==0)}for(;o!==0;){for(Ti(e),e.lineIndent=0,o=e.input.charCodeAt(e.position);(!h||e.lineIndent<l)&&o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);if(!h&&e.lineIndent>l&&(l=e.lineIndent),Qt(o))c++;else{if(e.lineIndent<l){s===3?e.result+=kt.repeat(`
91
- `,n?1+c:c):s===1&&n&&(e.result+=`
92
- `);break}for(i?Se(o)?(d=!0,e.result+=kt.repeat(`
93
- `,n?1+c:c)):d?(d=!1,e.result+=kt.repeat(`
94
- `,c+1)):c===0?n&&(e.result+=" "):e.result+=kt.repeat(`
95
- `,c):e.result+=kt.repeat(`
96
- `,n?1+c:c),n=!0,h=!0,c=0,r=e.position;!Qt(o)&&o!==0;)o=e.input.charCodeAt(++e.position);de(e,r,e.position,!1)}}return!0}function to(e,t){var r,i,a=e.tag,o=e.anchor,s=[],n=!1;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),i=e.input.charCodeAt(e.position);i!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,X(e,"tab characters must not be used in indentation")),i===45)&&It(e.input.charCodeAt(e.position+1));)if(n=!0,e.position++,yt(e,!0,-1)&&e.lineIndent<=t)s.push(null),i=e.input.charCodeAt(e.position);else if(r=e.line,Re(e,t,3,!1,!0),s.push(e.result),yt(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&i!==0)X(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!n&&(e.tag=a,e.anchor=o,e.kind="sequence",e.result=s,!0)}function eh(e,t,r){var i,a,o,s,n,h,l,c=e.tag,d=e.anchor,p={},g=Object.create(null),f=null,m=null,x=null,y=!1,C=!1;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=p),l=e.input.charCodeAt(e.position);l!==0;){if(y||e.firstTabInLine===-1||(e.position=e.firstTabInLine,X(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),o=e.line,l!==63&&l!==58||!It(i)){if(s=e.line,n=e.lineStart,h=e.position,!Re(e,r,2,!1,!0))break;if(e.line===o){for(l=e.input.charCodeAt(e.position);Se(l);)l=e.input.charCodeAt(++e.position);if(l===58)It(l=e.input.charCodeAt(++e.position))||X(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(ze(e,p,g,f,m,null,s,n,h),f=m=x=null),C=!0,y=!1,a=!1,f=e.tag,m=e.result;else{if(!C)return e.tag=c,e.anchor=d,!0;X(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!C)return e.tag=c,e.anchor=d,!0;X(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else l===63?(y&&(ze(e,p,g,f,m,null,s,n,h),f=m=x=null),C=!0,y=!0,a=!0):y?(y=!1,a=!0):X(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,l=i;if((e.line===o||e.lineIndent>t)&&(y&&(s=e.line,n=e.lineStart,h=e.position),Re(e,t,4,!0,a)&&(y?m=e.result:x=e.result),y||(ze(e,p,g,f,m,x,s,n,h),f=m=x=null),yt(e,!0,-1),l=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&l!==0)X(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&ze(e,p,g,f,m,null,s,n,h),C&&(e.tag=c,e.anchor=d,e.kind="mapping",e.result=p),C}function rh(e){var t,r,i,a,o=!1,s=!1;if((a=e.input.charCodeAt(e.position))!==33)return!1;if(e.tag!==null&&X(e,"duplication of a tag property"),(a=e.input.charCodeAt(++e.position))===60?(o=!0,a=e.input.charCodeAt(++e.position)):a===33?(s=!0,r="!!",a=e.input.charCodeAt(++e.position)):r="!",t=e.position,o){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(i=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):X(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!It(a);)a===33&&(s?X(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),ql.test(r)||X(e,"named tag handle cannot contain such characters"),s=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),Dg.test(i)&&X(e,"tag suffix cannot contain flow indicator characters")}i&&!Nl.test(i)&&X(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{X(e,"tag name is malformed: "+i)}return o?e.tag=i:we.call(e.tagMap,r)?e.tag=e.tagMap[r]+i:r==="!"?e.tag="!"+i:r==="!!"?e.tag="tag:yaml.org,2002:"+i:X(e,'undeclared tag handle "'+r+'"'),!0}function ih(e){var t,r;if((r=e.input.charCodeAt(e.position))!==38)return!1;for(e.anchor!==null&&X(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!It(r)&&!Ie(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&X(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function ah(e){var t,r,i;if((i=e.input.charCodeAt(e.position))!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!It(i)&&!Ie(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&X(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),we.call(e.anchorMap,r)||X(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],yt(e,!0,-1),!0}function Re(e,t,r,i,a){var o,s,n,h,l,c,d,p,g,f=1,m=!1,x=!1;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=s=n=r===4||r===3,i&&yt(e,!0,-1)&&(m=!0,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)),f===1)for(;rh(e)||ih(e);)yt(e,!0,-1)?(m=!0,n=o,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)):n=!1;if(n&&(n=m||a),f!==1&&r!==4||(p=r===1||r===2?t:t+1,g=e.position-e.lineStart,f===1?n&&(to(e,g)||eh(e,g,p))||Jl(e,p)?x=!0:(s&&th(e,p)||Ql(e,p)||Kl(e,p)?x=!0:ah(e)?(x=!0,e.tag===null&&e.anchor===null||X(e,"alias node should not have any properties")):Zl(e,p,r===1)&&(x=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):f===0&&(x=n&&to(e,g))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&X(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),h=0,l=e.implicitTypes.length;h<l;h+=1)if((d=e.implicitTypes[h]).resolve(e.result)){e.result=d.construct(e.result),e.tag=d.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(we.call(e.typeMap[e.kind||"fallback"],e.tag))d=e.typeMap[e.kind||"fallback"][e.tag];else for(d=null,h=0,l=(c=e.typeMap.multi[e.kind||"fallback"]).length;h<l;h+=1)if(e.tag.slice(0,c[h].tag.length)===c[h].tag){d=c[h];break}d||X(e,"unknown tag !<"+e.tag+">"),e.result!==null&&d.kind!==e.kind&&X(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+d.kind+'", not "'+e.kind+'"'),d.resolve(e.result,e.tag)?(e.result=d.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):X(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||x}function oh(e){var t,r,i,a,o=e.position,s=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(yt(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(s=!0,a=e.input.charCodeAt(++e.position),t=e.position;a!==0&&!It(a);)a=e.input.charCodeAt(++e.position);for(i=[],(r=e.input.slice(t,e.position)).length<1&&X(e,"directive name must not be less than one character in length");a!==0;){for(;Se(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!Qt(a));break}if(Qt(a))break;for(t=e.position;a!==0&&!It(a);)a=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}a!==0&&Ti(e),we.call(Xl,r)?Xl[r](e,r,i):Hr(e,'unknown document directive "'+r+'"')}yt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,yt(e,!0,-1)):s&&X(e,"directives end mark is expected"),Re(e,e.lineIndent-1,4,!1,!0),yt(e,!0,-1),e.checkLineBreaks&&Og.test(e.input.slice(o,e.position))&&Hr(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Yr(e)?e.input.charCodeAt(e.position)===46&&(e.position+=3,yt(e,!0,-1)):e.position<e.length-1&&X(e,"end of the stream or a document separator is expected")}function eo(e,t){t=t||{},(e=String(e)).length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
97
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Gl(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,X(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)oh(r);return r.documents}function nh(e,t){var r=eo(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new qt("expected a single document in the stream, but found more")}}u(de,"captureSegment"),u(Ja,"mergeMappings"),u(ze,"storeMappingPair"),u(Ti,"readLineBreak"),u(yt,"skipSeparationSpace"),u(Yr,"testDocumentSeparator"),u(Bi,"writeFoldedLines"),u(Zl,"readPlainScalar"),u(Ql,"readSingleQuotedScalar"),u(Kl,"readDoubleQuotedScalar"),u(Jl,"readFlowCollection"),u(th,"readBlockScalar"),u(to,"readBlockSequence"),u(eh,"readBlockMapping"),u(rh,"readTagProperty"),u(ih,"readAnchorProperty"),u(ah,"readAlias"),u(Re,"composeNode"),u(oh,"readDocument"),u(eo,"loadDocuments"),u(function(e,t,r){t!==null&&typeof t=="object"&&r===void 0&&(r=t,t=null);var i=eo(e,r);if(typeof t!="function")return i;for(var a=0,o=i.length;a<o;a+=1)t(i[a])},"loadAll$1"),u(nh,"load$1");var Ig={load:nh},sh=Object.prototype.toString,lh=Object.prototype.hasOwnProperty,ro=65279,Pg={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},zg=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Rg=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function hh(e,t){var r,i,a,o,s,n,h;if(t===null)return{};for(r={},a=0,o=(i=Object.keys(t)).length;a<o;a+=1)s=i[a],n=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),(h=e.compiledTypeMap.fallback[s])&&lh.call(h.styleAliases,n)&&(n=h.styleAliases[n]),r[s]=n;return r}function ch(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else{if(!(e<=4294967295))throw new qt("code point within a string may not be greater than 0xFFFFFFFF");r="U",i=8}return"\\"+r+kt.repeat("0",i-t.length)+t}u(hh,"compileStyleMap"),u(ch,"encodeHex");function dh(e){this.schema=e.schema||Rl,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=kt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=hh(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function io(e,t){for(var r,i=kt.repeat(" ",t),a=0,o=-1,s="",n=e.length;a<n;)(o=e.indexOf(`
98
- `,a))===-1?(r=e.slice(a),a=n):(r=e.slice(a,o+1),a=o+1),r.length&&r!==`
99
- `&&(s+=i),s+=r;return s}function vi(e,t){return`
100
- `+kt.repeat(" ",e.indent*t)}function uh(e,t){var r,i;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}function Ur(e){return e===32||e===9}function er(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==ro||65536<=e&&e<=1114111}function ao(e){return er(e)&&e!==ro&&e!==13&&e!==10}function oo(e,t,r){var i=ao(e),a=i&&!Ur(e);return(r?i:i&&e!==44&&e!==91&&e!==93&&e!==123&&e!==125)&&e!==35&&!(t===58&&!a)||ao(t)&&!Ur(t)&&e===35||t===58&&a}function ph(e){return er(e)&&e!==ro&&!Ur(e)&&e!==45&&e!==63&&e!==58&&e!==44&&e!==91&&e!==93&&e!==123&&e!==125&&e!==35&&e!==38&&e!==42&&e!==33&&e!==124&&e!==61&&e!==62&&e!==39&&e!==34&&e!==37&&e!==64&&e!==96}function gh(e){return!Ur(e)&&e!==58}function rr(e,t){var r,i=e.charCodeAt(t);return i>=55296&&i<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1))>=56320&&r<=57343?1024*(i-55296)+r-56320+65536:i}function no(e){return/^\n* /.test(e)}u(dh,"State"),u(io,"indentString"),u(vi,"generateNextLine"),u(uh,"testImplicitResolving"),u(Ur,"isWhitespace"),u(er,"isPrintable"),u(ao,"isNsCharOrWhitespace"),u(oo,"isPlainSafe"),u(ph,"isPlainSafeFirst"),u(gh,"isPlainSafeLast"),u(rr,"codePointAt"),u(no,"needIndentIndicator");function fh(e,t,r,i,a,o,s,n){var h,l=0,c=null,d=!1,p=!1,g=i!==-1,f=-1,m=ph(rr(e,0))&&gh(rr(e,e.length-1));if(t||s)for(h=0;h<e.length;l>=65536?h+=2:h++){if(!er(l=rr(e,h)))return 5;m=m&&oo(l,c,n),c=l}else{for(h=0;h<e.length;l>=65536?h+=2:h++){if((l=rr(e,h))===10)d=!0,g&&(p=p||h-f-1>i&&e[f+1]!==" ",f=h);else if(!er(l))return 5;m=m&&oo(l,c,n),c=l}p=p||g&&h-f-1>i&&e[f+1]!==" "}return d||p?r>9&&no(e)?5:s?o===2?5:2:p?4:3:!m||s||a(e)?o===2?5:2:1}function mh(e,t,r,i,a){e.dump=function(){if(t.length===0)return e.quotingType===2?'""':"''";if(!e.noCompatMode&&(zg.indexOf(t)!==-1||Rg.test(t)))return e.quotingType===2?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),n=i||e.flowLevel>-1&&r>=e.flowLevel;function h(l){return uh(e,l)}switch(u(h,"testAmbiguity"),fh(t,n,e.indent,s,h,e.quotingType,e.forceQuotes&&!i,a)){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+so(t,e.indent)+lo(io(t,o));case 4:return">"+so(t,e.indent)+lo(io(yh(t,s),o));case 5:return'"'+xh(t)+'"';default:throw new qt("impossible error: invalid scalar style")}}()}function so(e,t){var r=no(e)?String(t):"",i=e[e.length-1]===`
101
- `;return r+(i&&(e[e.length-2]===`
102
- `||e===`
103
- `)?"+":i?"":"-")+`
104
- `}function lo(e){return e[e.length-1]===`
105
- `?e.slice(0,-1):e}function yh(e,t){for(var r,i,a,o=/(\n+)([^\n]*)/g,s=(r=(r=e.indexOf(`
106
- `))!==-1?r:e.length,o.lastIndex=r,ho(e.slice(0,r),t)),n=e[0]===`
107
- `||e[0]===" ";a=o.exec(e);){var h=a[1],l=a[2];i=l[0]===" ",s+=h+(n||i||l===""?"":`
108
- `)+ho(l,t),n=i}return s}function ho(e,t){if(e===""||e[0]===" ")return e;for(var r,i,a=/ [^ ]/g,o=0,s=0,n=0,h="";r=a.exec(e);)(n=r.index)-o>t&&(i=s>o?s:n,h+=`
109
- `+e.slice(o,i),o=i+1),s=n;return h+=`
110
- `,e.length-o>t&&s>o?h+=e.slice(o,s)+`
111
- `+e.slice(s+1):h+=e.slice(o),h.slice(1)}function xh(e){for(var t,r="",i=0,a=0;a<e.length;i>=65536?a+=2:a++)i=rr(e,a),!(t=Pg[i])&&er(i)?(r+=e[a],i>=65536&&(r+=e[a+1])):r+=t||ch(i);return r}function bh(e,t,r){var i,a,o,s="",n=e.tag;for(i=0,a=r.length;i<a;i+=1)o=r[i],e.replacer&&(o=e.replacer.call(r,String(i),o)),(ie(e,t,o,!1,!1)||o===void 0&&ie(e,t,null,!1,!1))&&(s!==""&&(s+=","+(e.condenseFlow?"":" ")),s+=e.dump);e.tag=n,e.dump="["+s+"]"}function co(e,t,r,i){var a,o,s,n="",h=e.tag;for(a=0,o=r.length;a<o;a+=1)s=r[a],e.replacer&&(s=e.replacer.call(r,String(a),s)),(ie(e,t+1,s,!0,!0,!1,!0)||s===void 0&&ie(e,t+1,null,!0,!0,!1,!0))&&(i&&n===""||(n+=vi(e,t)),e.dump&&e.dump.charCodeAt(0)===10?n+="-":n+="- ",n+=e.dump);e.tag=h,e.dump=n||"[]"}function Ch(e,t,r){var i,a,o,s,n,h="",l=e.tag,c=Object.keys(r);for(i=0,a=c.length;i<a;i+=1)n="",h!==""&&(n+=", "),e.condenseFlow&&(n+='"'),s=r[o=c[i]],e.replacer&&(s=e.replacer.call(r,o,s)),ie(e,t,o,!1,!1)&&(e.dump.length>1024&&(n+="? "),n+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ie(e,t,s,!1,!1)&&(h+=n+=e.dump));e.tag=l,e.dump="{"+h+"}"}function kh(e,t,r,i){var a,o,s,n,h,l,c="",d=e.tag,p=Object.keys(r);if(e.sortKeys===!0)p.sort();else if(typeof e.sortKeys=="function")p.sort(e.sortKeys);else if(e.sortKeys)throw new qt("sortKeys must be a boolean or a function");for(a=0,o=p.length;a<o;a+=1)l="",i&&c===""||(l+=vi(e,t)),n=r[s=p[a]],e.replacer&&(n=e.replacer.call(r,s,n)),ie(e,t+1,s,!0,!0,!0)&&((h=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024)&&(e.dump&&e.dump.charCodeAt(0)===10?l+="?":l+="? "),l+=e.dump,h&&(l+=vi(e,t)),ie(e,t+1,n,!0,h)&&(e.dump&&e.dump.charCodeAt(0)===10?l+=":":l+=": ",c+=l+=e.dump));e.tag=d,e.dump=c||"{}"}function uo(e,t,r){var i,a,o,s,n,h;for(o=0,s=(a=r?e.explicitTypes:e.implicitTypes).length;o<s;o+=1)if(((n=a[o]).instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(h=e.styleMap[n.tag]||n.defaultStyle,sh.call(n.represent)==="[object Function]")i=n.represent(t,h);else{if(!lh.call(n.represent,h))throw new qt("!<"+n.tag+'> tag resolver accepts not "'+h+'" style');i=n.represent[h](t,h)}e.dump=i}return!0}return!1}function ie(e,t,r,i,a,o,s){e.tag=null,e.dump=r,uo(e,r,!1)||uo(e,r,!0);var n,h=sh.call(e.dump),l=i;i&&(i=e.flowLevel<0||e.flowLevel>t);var c,d,p=h==="[object Object]"||h==="[object Array]";if(p&&(d=(c=e.duplicates.indexOf(r))!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(a=!1),d&&e.usedDuplicates[c])e.dump="*ref_"+c;else{if(p&&d&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),h==="[object Object]")i&&Object.keys(e.dump).length!==0?(kh(e,t,e.dump,a),d&&(e.dump="&ref_"+c+e.dump)):(Ch(e,t,e.dump),d&&(e.dump="&ref_"+c+" "+e.dump));else if(h==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?co(e,t-1,e.dump,a):co(e,t,e.dump,a),d&&(e.dump="&ref_"+c+e.dump)):(bh(e,t,e.dump),d&&(e.dump="&ref_"+c+" "+e.dump));else{if(h!=="[object String]"){if(h==="[object Undefined]"||e.skipInvalid)return!1;throw new qt("unacceptable kind of an object to dump "+h)}e.tag!=="?"&&mh(e,e.dump,t,o,l)}e.tag!==null&&e.tag!=="?"&&(n=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),n=e.tag[0]==="!"?"!"+n:n.slice(0,18)==="tag:yaml.org,2002:"?"!!"+n.slice(18):"!<"+n+">",e.dump=n+" "+e.dump)}return!0}function wh(e,t){var r,i,a=[],o=[];for(Mi(e,a,o),r=0,i=o.length;r<i;r+=1)t.duplicates.push(a[o[r]]);t.usedDuplicates=new Array(i)}function Mi(e,t,r){var i,a,o;if(e!==null&&typeof e=="object")if((a=t.indexOf(e))!==-1)r.indexOf(a)===-1&&r.push(a);else if(t.push(e),Array.isArray(e))for(a=0,o=e.length;a<o;a+=1)Mi(e[a],t,r);else for(a=0,o=(i=Object.keys(e)).length;a<o;a+=1)Mi(e[i[a]],t,r)}u(fh,"chooseScalarStyle"),u(mh,"writeScalar"),u(so,"blockHeader"),u(lo,"dropEndingNewline"),u(yh,"foldString"),u(ho,"foldLine"),u(xh,"escapeString"),u(bh,"writeFlowSequence"),u(co,"writeBlockSequence"),u(Ch,"writeFlowMapping"),u(kh,"writeBlockMapping"),u(uo,"detectType"),u(ie,"writeNode"),u(wh,"getDuplicateReferences"),u(Mi,"inspectNode"),u(function(e,t){var r=new dh(t=t||{});r.noRefs||wh(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),ie(r,0,i,!0,!0)?r.dump+`
112
- `:""},"dump$1"),u(function(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}},"renamed");let jt;kn=wl,Wn=Ig.load,jt={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function Vr(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=ft(e),t=ft(t);const[r,i]=[e.x,e.y],[a,o]=[t.x,t.y],s=a-r,n=o-i;return{angle:Math.atan(n/s),deltaX:s,deltaY:n}}u(Vr,"calculateDeltaAndAngle");let ft;ft=u(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),Mn=u(e=>({x:u(function(t,r,i){let a=0;const o=ft(i[0]).x<ft(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(jt,e.arrowTypeStart)){const{angle:p,deltaX:g}=Vr(i[0],i[1]);a=jt[e.arrowTypeStart]*Math.cos(p)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(jt,e.arrowTypeEnd)){const{angle:p,deltaX:g}=Vr(i[i.length-1],i[i.length-2]);a=jt[e.arrowTypeEnd]*Math.cos(p)*(g>=0?1:-1)}const s=Math.abs(ft(t).x-ft(i[i.length-1]).x),n=Math.abs(ft(t).y-ft(i[i.length-1]).y),h=Math.abs(ft(t).x-ft(i[0]).x),l=Math.abs(ft(t).y-ft(i[0]).y),c=jt[e.arrowTypeStart],d=jt[e.arrowTypeEnd];if(s<d&&s>0&&n<d){let p=d+1-s;p*=o==="right"?-1:1,a-=p}if(h<c&&h>0&&l<c){let p=c+1-h;p*=o==="right"?-1:1,a+=p}return ft(t).x+a},"x"),y:u(function(t,r,i){let a=0;const o=ft(i[0]).y<ft(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(jt,e.arrowTypeStart)){const{angle:p,deltaY:g}=Vr(i[0],i[1]);a=jt[e.arrowTypeStart]*Math.abs(Math.sin(p))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(jt,e.arrowTypeEnd)){const{angle:p,deltaY:g}=Vr(i[i.length-1],i[i.length-2]);a=jt[e.arrowTypeEnd]*Math.abs(Math.sin(p))*(g>=0?1:-1)}const s=Math.abs(ft(t).y-ft(i[i.length-1]).y),n=Math.abs(ft(t).x-ft(i[i.length-1]).x),h=Math.abs(ft(t).y-ft(i[0]).y),l=Math.abs(ft(t).x-ft(i[0]).x),c=jt[e.arrowTypeStart],d=jt[e.arrowTypeEnd];if(s<d&&s>0&&n<d){let p=d+1-s;p*=o==="up"?-1:1,a-=p}if(h<c&&h>0&&l<c){let p=c+1-h;p*=o==="up"?-1:1,a+=p}return ft(t).y+a},"y")}),"getLineFunctionsWithOffset"),ni=u(({flowchart:e})=>{var i,a;const t=((i=e==null?void 0:e.subGraphTitleMargin)==null?void 0:i.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:t+r}},"getSubGraphTitleMargins");const qg=Object.freeze({left:0,top:0,width:16,height:16}),Li=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Sh=Object.freeze({...qg,...Li}),Ng=Object.freeze({...Sh,body:"",hidden:!1}),Wg=Object.freeze({width:null,height:null}),jg=Object.freeze({...Wg,...Li}),po=/^[a-z0-9]+(-[a-z0-9]+)*$/,go=(e,t)=>!!e&&!(e.provider!==""&&!e.provider.match(po)||!(t&&e.prefix===""||e.prefix.match(po))||!e.name.match(po));function Th(e,t){const r=function(i,a){const o={};!i.hFlip!=!a.hFlip&&(o.hFlip=!0),!i.vFlip!=!a.vFlip&&(o.vFlip=!0);const s=((i.rotate||0)+(a.rotate||0))%4;return s&&(o.rotate=s),o}(e,t);for(const i in Ng)i in Li?i in e&&!(i in r)&&(r[i]=Li[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function Bh(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let o={};function s(n){o=Th(i[n]||a[n],o)}return s(t),r.forEach(s),Th(e,o)}function Hg(e,t){if(e.icons[t])return Bh(e,t,[]);const r=function(i,a){const o=i.icons,s=i.aliases||Object.create(null),n=Object.create(null);return(a||Object.keys(o).concat(Object.keys(s))).forEach(function h(l){if(o[l])return n[l]=[];if(!(l in n)){n[l]=null;const c=s[l]&&s[l].parent,d=c&&h(c);d&&(n[l]=[c].concat(d))}return n[l]}),n}(e,[t])[t];return r?Bh(e,t,r):null}const Yg=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ug=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function vh(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(Yg);if(i===null||!i.length)return e;const a=[];let o=i.shift(),s=Ug.test(o);for(;;){if(s){const n=parseFloat(o);isNaN(n)?a.push(o):a.push(Math.ceil(n*t*r)/r)}else a.push(o);if(o=i.shift(),o===void 0)return a.join("");s=!s}}const Vg=/\sid="(\S+)"/g,Gg="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let Xg=0,Mh,Lh,_i,fo,_h,ir,wt;On={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},_i=new Map,fo=new Map,$n=u(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if($.debug("Registering icon pack:",t.name),"loader"in t)fo.set(t.name,t.loader);else{if(!("icons"in t))throw $.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');_i.set(t.name,t.icons)}}},"registerIconPacks"),_h=u(async(e,t)=>{const r=((s,n,h,l="")=>{const c=s.split(":");if(s.slice(0,1)==="@"){if(c.length<2||c.length>3)return null;l=c.shift().slice(1)}if(c.length>3||!c.length)return null;if(c.length>1){const g=c.pop(),f=c.pop(),m={provider:c.length>0?c[0]:l,prefix:f,name:g};return go(m)?m:null}const d=c[0],p=d.split("-");if(p.length>1){const g={provider:l,prefix:p.shift(),name:p.join("-")};return go(g)?g:null}if(h&&l===""){const g={provider:l,prefix:"",name:d};return go(g,h)?g:null}return null})(e,0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let a=_i.get(i);if(!a){const s=fo.get(i);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await s(),prefix:i},_i.set(i,a)}catch(n){throw $.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=Hg(a,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),Lr=u(async(e,t)=>{let r;try{r=await _h(e,t==null?void 0:t.fallbackPrefix)}catch(o){$.error(o),r=On}const i=function(o,s){const n={...Sh,...o},h={...jg,...s},l={left:n.left,top:n.top,width:n.width,height:n.height};let c=n.body;[n,h].forEach(L=>{const B=[],b=L.hFlip,S=L.vFlip;let D,z=L.rotate;switch(b?S?z+=2:(B.push("translate("+(l.width+l.left).toString()+" "+(0-l.top).toString()+")"),B.push("scale(-1 1)"),l.top=l.left=0):S&&(B.push("translate("+(0-l.left).toString()+" "+(l.height+l.top).toString()+")"),B.push("scale(1 -1)"),l.top=l.left=0),z<0&&(z-=4*Math.floor(z/4)),z%=4,z){case 1:D=l.height/2+l.top,B.unshift("rotate(90 "+D.toString()+" "+D.toString()+")");break;case 2:B.unshift("rotate(180 "+(l.width/2+l.left).toString()+" "+(l.height/2+l.top).toString()+")");break;case 3:D=l.width/2+l.left,B.unshift("rotate(-90 "+D.toString()+" "+D.toString()+")")}z%2==1&&(l.left!==l.top&&(D=l.left,l.left=l.top,l.top=D),l.width!==l.height&&(D=l.width,l.width=l.height,l.height=D)),B.length&&(c=function(P,I,F){const v=function(_,O="defs"){let E="";const Q=_.indexOf("<"+O);for(;Q>=0;){const rt=_.indexOf(">",Q),ut=_.indexOf("</"+O);if(rt===-1||ut===-1)break;const W=_.indexOf(">",ut);if(W===-1)break;E+=_.slice(rt+1,ut).trim(),_=_.slice(0,Q).trim()+_.slice(W+1)}return{defs:E,content:_}}(P);return M=v.defs,A=I+v.content+F,M?"<defs>"+M+"</defs>"+A:A;var M,A}(c,'<g transform="'+B.join(" ")+'">',"</g>"))});const d=h.width,p=h.height,g=l.width,f=l.height;let m,x;d===null?(x=p===null?"1em":p==="auto"?f:p,m=vh(x,g/f)):(m=d==="auto"?g:d,x=p===null?vh(m,f/g):p==="auto"?f:p);const y={},C=(L,B)=>{(b=>b==="unset"||b==="undefined"||b==="none")(B)||(y[L]=B.toString())};C("width",m),C("height",x);const w=[l.left,l.top,g,f];return y.viewBox=w.join(" "),{attributes:y,viewBox:w,body:c}}(r,t);return function(o,s){let n=o.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const h in s)n+=" "+h+'="'+s[h]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+o+"</svg>"}(function(o,s=Gg){const n=[];let h;for(;h=Vg.exec(o);)n.push(h[1]);if(!n.length)return o;const l="suffix"+(16777216*Math.random()|Date.now()).toString(16);return n.forEach(c=>{const d=typeof s=="function"?s(c):s+(Xg++).toString(),p=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");o=o.replace(new RegExp('([#;"])('+p+')([")]|\\.[a-z])',"g"),"$1"+d+l+"$3")}),o=o.replace(new RegExp(l,"g"),"")}(i.body),i.attributes)},"getIconSVG"),ir={},wt={};let Fh,Ah,Eh,mo,$h,Oh;zn=function(){if(Lh)return ir;Lh=1,Object.defineProperty(ir,"__esModule",{value:!0}),ir.sanitizeUrl=void 0;var e=(Mh||(Mh=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.BLANK_URL=wt.relativeFirstCharacters=wt.whitespaceEscapeCharsRegex=wt.urlSchemeRegex=wt.ctrlCharactersRegex=wt.htmlCtrlEntityRegex=wt.htmlEntitiesRegex=wt.invalidProtocolRegex=void 0,wt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,wt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,wt.htmlCtrlEntityRegex=/&(newline|tab);/gi,wt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,wt.urlSchemeRegex=/^.+(:|&colon;)/gim,wt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,wt.relativeFirstCharacters=[".","/"],wt.BLANK_URL="about:blank"),wt);function t(i){return i.replace(e.ctrlCharactersRegex,"").replace(e.htmlEntitiesRegex,function(a,o){return String.fromCharCode(o)})}function r(i){try{return decodeURIComponent(i)}catch{return i}}return ir.sanitizeUrl=function(i){if(!i)return e.BLANK_URL;var a,o=r(i.trim());do a=(o=r(o=t(o).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim())).match(e.ctrlCharactersRegex)||o.match(e.htmlEntitiesRegex)||o.match(e.htmlCtrlEntityRegex)||o.match(e.whitespaceEscapeCharsRegex);while(a&&a.length>0);var s=o;if(!s)return e.BLANK_URL;if(function(p){return e.relativeFirstCharacters.indexOf(p[0])>-1}(s))return s;var n=s.trimStart(),h=n.match(e.urlSchemeRegex);if(!h)return s;var l=h[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(l))return e.BLANK_URL;var c=n.replace(/\\/g,"/");if(l==="mailto:"||l.includes("://"))return c;if(l==="http:"||l==="https:"){if(!function(p){return URL.canParse(p)}(c))return e.BLANK_URL;var d=new URL(c);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return c},ir}(),Fp="\u200B",Fh={curveBasis:mn,curveBasisClosed:ky,curveBasisOpen:Cy,curveBumpX:Vn,curveBumpY:Gn,curveBundle:by,curveCardinalClosed:xy,curveCardinalOpen:yy,curveCardinal:Lp,curveCatmullRomClosed:my,curveCatmullRomOpen:fy,curveCatmullRom:Mp,curveLinear:fn,curveLinearClosed:gy,curveMonotoneX:vp,curveMonotoneY:Bp,curveNatural:Tp,curveStep:Sp,curveStepAfter:wp,curveStepBefore:kp},Ah=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Eh=u(function(e,t){const r=mo(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const s=r.map(n=>n.args);Pr(s),i=Bt(i,[...s])}else i=r.args;if(!i)return;let a=di(e,t);const o="config";return i[o]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[o],delete i[o]),i},"detectInit"),mo=u(function(e,t=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${Ah.source})(?=[}][%]{2}).*
113
- `,"ig");let o;e=e.trim().replace(a,"").replace(/'/gm,'"'),$.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);const s=[];for(;(o=Ke.exec(e))!==null;)if(o.index===Ke.lastIndex&&Ke.lastIndex++,o&&!t||t&&((r=o[1])==null?void 0:r.match(t))||t&&((i=o[2])==null?void 0:i.match(t))){const n=o[1]?o[1]:o[2],h=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;s.push({type:n,args:h})}return s.length===0?{type:e,args:null}:s.length===1?s[0]:s}catch(a){return $.error(`ERROR: ${a.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),$h=u(function(e){return e.replace(Ke,"")},"removeDirectives"),Oh=u(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function yo(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Fh[r]??t}function Dh(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?zn.sanitizeUrl(r):r}u(yo,"interpolateToCurve"),u(Dh,"formatUrl");var Zg=u((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let o=window;for(let s=0;s<i;s++)if(o=o[r[s]],!o)return void $.error(`Function name: ${e} not found in window`);o[a](...t)},"runFunc");function xo(e,t){return e&&t?Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function Ih(e){let t,r=0;return e.forEach(i=>{r+=xo(i,t),t=i}),bo(e,r/2)}function Ph(e){return e.length===1?e[0]:Ih(e)}u(xo,"distance"),u(Ih,"traverseEdge"),u(Ph,"calcLabelPosition");var zh=u((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),bo=u((e,t)=>{let r,i=t;for(const a of e){if(r){const o=xo(a,r);if(o===0)return r;if(o<i)i-=o;else{const s=i/o;if(s<=0)return r;if(s>=1)return{x:a.x,y:a.y};if(s>0&&s<1)return{x:zh((1-s)*r.x+s*a.x,5),y:zh((1-s)*r.y+s*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Qg=u((e,t,r)=>{$.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const i=bo(t,25),a=e?10:5,o=Math.atan2(t[0].y-i.y,t[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(t[0].x+i.x)/2,s.y=-Math.cos(o)*a+(t[0].y+i.y)/2,s},"calcCardinalityPosition");function Rh(e,t,r){const i=structuredClone(r);$.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=bo(i,25+e),o=10+.5*e,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),n={x:0,y:0};return t==="start_left"?(n.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,n.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(n.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,n.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(n.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,n.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(n.x=Math.sin(s)*o+(i[0].x+a.x)/2,n.y=-Math.cos(s)*o+(i[0].y+a.y)/2),n}pa=function(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}},u(Rh,"calcTerminalLabelPosition"),u(pa,"getStylesFromArray");let Co;Co=0,Sn=u(()=>(Co++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Co),"generateId");function qh(e){let t="";const r="0123456789abcdef";for(let i=0;i<e;i++)t+=r.charAt(Math.floor(16*Math.random()));return t}u(qh,"makeRandomHex");let Nh,Wh,jh;bn=u(e=>qh(e.length),"random"),Nh=u(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"),Wh=u(function(e,t){const r=t.text.replace(_e.lineBreakRegex," "),[,i]=Mr(t.fontSize),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.style("text-anchor",t.anchor),a.style("font-family",t.fontFamily),a.style("font-size",i),a.style("font-weight",t.fontWeight),a.attr("fill",t.fill),t.class!==void 0&&a.attr("class",t.class);const o=a.append("tspan");return o.attr("x",t.x+2*t.textMargin),o.attr("fill",t.fill),o.text(r),a},"drawSimpleText"),Hn=gn((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),_e.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let o="";return i.forEach((s,n)=>{const h=Jt(`${s} `,r),l=Jt(o,r);if(h>t){const{hyphenatedStrings:c,remainingWord:d}=jh(s,t,"-",r);a.push(o,...c),o=d}else l+h>=t?(a.push(o),o=s):o=[o,s].filter(Boolean).join(" ");n+1===i.length&&a.push(o)}),a.filter(s=>s!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),jh=gn((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],o=[];let s="";return a.forEach((n,h)=>{const l=`${s}${n}`;if(Jt(l,i)>=t){const c=h+1,d=a.length===c,p=`${l}${r}`;o.push(d?l:p),s=""}else s=l}),{hyphenatedStrings:o,remainingWord:s}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`),ma=function(e,t){return ko(e,t).height},Jt=function(e,t){return ko(e,t).width},u(ma,"calculateTextHeight"),u(Jt,"calculateTextWidth");var Fi,ko=gn((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,o]=Mr(r),s=["sans-serif",i],n=e.split(_e.lineBreakRegex),h=[],l=lt("body");if(!l.remove)return{width:0,height:0,lineHeight:0};const c=l.append("svg");for(const d of s){let p=0;const g={width:0,height:0,lineHeight:0};for(const f of n){const m=Nh();m.text=f||"\u200B";const x=Wh(c,m).style("font-size",o).style("font-weight",a).style("font-family",d),y=(x._groups||x)[0][0].getBBox();if(y.width===0&&y.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,y.width)),p=Math.round(y.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}h.push(g)}return c.remove(),h[isNaN(h[1].height)||isNaN(h[1].width)||isNaN(h[1].lineHeight)||h[0].height>h[1].height&&h[0].width>h[1].width&&h[0].lineHeight>h[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Kg=(Cr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},u(Cr,"InitIDGenerator"),Cr),Jg=u(function(e){return Fi=Fi||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Fi.innerHTML=e,unescape(Fi.textContent)},"entityDecode");function wo(e){return"str"in e}u(wo,"isDetailedError");let Hh;Hh=u((e,t,r,i)=>{var o;if(!i)return;const a=(o=e.node())==null?void 0:o.getBBox();a&&e.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Mr=u(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize"),ai=function(e,t){return ny({},e,t)},u(ai,"cleanAndMerge");let Yh;Xt={assignWithDepth:Bt,wrapLabel:Hn,calculateTextHeight:ma,calculateTextWidth:Jt,calculateTextDimensions:ko,cleanAndMerge:ai,detectInit:Eh,detectDirective:mo,isSubstringInArray:Oh,interpolateToCurve:yo,calcLabelPosition:Ph,calcCardinalityPosition:Qg,calcTerminalLabelPosition:Rh,formatUrl:Dh,getStylesFromArray:pa,generateId:Sn,random:bn,runFunc:Zg,entityDecode:Jg,insertTitle:Hh,parseFontSize:Mr,InitIDGenerator:Kg},Yh=u(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"\uFB02\xB0\xB0"+i+"\xB6\xDF":"\uFB02\xB0"+i+"\xB6\xDF"}),t},"encodeEntities"),be=u(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),qp=u((e,t,{counter:r=0,prefix:i,suffix:a},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function Pt(e){return e??null}function Uh(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var a=i.reduce(function(n,h){var l=h.match(/\n([\t ]+|(?!\s).)/g);return l?n.concat(l.map(function(c){var d,p;return(p=(d=c.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&p!==void 0?p:0})):n},[]);if(a.length){var o=new RegExp(`
114
- [ ]{`+Math.min.apply(Math,a)+"}","g");i=i.map(function(n){return n.replace(o,`
115
- `)})}i[0]=i[0].replace(/^\r?\n/,"");var s=i[0];return t.forEach(function(n,h){var l=s.match(/(?:^|\n)( *)$/),c=l?l[1]:"",d=n;typeof n=="string"&&n.includes(`
116
- `)&&(d=String(n).split(`
117
- `).map(function(p,g){return g===0?p:""+c+p}).join(`
118
- `)),s+=d+i[h+1]}),s}function Vh(e,{markdownAutoWrap:t}){const r=Uh(e.replace(/<br\/>/g,`
119
- `).replace(/\n{2,}/g,`
120
- `));return t===!1?r.replace(/ /g,"&nbsp;"):r}function Gh(e,t={}){const r=Vh(e,t),i=Cp.lexer(r),a=[[]];let o=0;function s(n,h="normal"){n.type==="text"?n.text.split(`
121
- `).forEach((l,c)=>{c!==0&&(o++,a.push([])),l.split(" ").forEach(d=>{(d=d.replace(/&#39;/g,"'"))&&a[o].push({content:d,type:h})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(l=>{s(l,n.type)}):n.type==="html"&&a[o].push({content:n.text,type:"normal"})}return u(s,"processNode"),i.forEach(n=>{var h;n.type==="paragraph"?(h=n.tokens)==null||h.forEach(l=>{s(l)}):n.type==="html"&&a[o].push({content:n.text,type:"normal"})}),a}function Xh(e,{markdownAutoWrap:t}={}){const r=Cp.lexer(e);function i(a){var o,s,n;return a.type==="text"?t===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(o=a.tokens)==null?void 0:o.map(i).join("")}</strong>`:a.type==="em"?`<em>${(s=a.tokens)==null?void 0:s.map(i).join("")}</em>`:a.type==="paragraph"?`<p>${(n=a.tokens)==null?void 0:n.map(i).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:`Unsupported markdown: ${a.type}`}return u(i,"output"),r.map(i).join("")}function Zh(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}function Qh(e,t){return So(e,[],Zh(t.content),t.type)}function So(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...o]=r,s=[...t,a];return e([{content:s.join(""),type:i}])?So(e,s,o,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}function Kh(e,t){if(e.some(({content:r})=>r.includes(`
122
- `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Ai(e,t)}function Ai(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let a="";e[0].content===" "&&(a=" ",e.shift());const o=e.shift()??{content:" ",type:"normal"},s=[...i];if(a!==""&&s.push({content:a,type:"normal"}),s.push(o),t(s))return Ai(e,t,r,s);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[n,h]=Qh(t,o);r.push([n]),h.content&&e.unshift(h)}return Ai(e,t,r)}function To(e,t){t&&e.attr("style",t)}async function Jh(e,t,r,i,a=!1){const o=e.append("foreignObject");o.attr("width",10*r+"px"),o.attr("height",10*r+"px");const s=o.append("xhtml:div");let n=t.label;t.label&&Le(t.label)&&(n=await oi(t.label.replace(_e.lineBreakRegex,`
123
- `),ct()));const h=t.isNode?"nodeLabel":"edgeLabel",l=s.append("span");l.html(n),To(l,t.labelStyle),l.attr("class",`${h} ${i}`),To(s,t.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&s.attr("class","labelBkg");let c=s.node().getBoundingClientRect();return c.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),c=s.node().getBoundingClientRect()),o.node()}function Ei(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}function tc(e,t,r){const i=e.append("text"),a=Ei(i,1,t);$i(a,r);const o=a.node().getComputedTextLength();return i.remove(),o}Ln=function(e,t,r){var s;const i=e.append("text"),a=Ei(i,1,t);$i(a,[{content:r,type:"normal"}]);const o=(s=a.node())==null?void 0:s.getBoundingClientRect();return o&&i.remove(),o};function ec(e,t,r,i=!1){const a=t.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),s=a.append("text").attr("y","-10.1");let n=0;for(const h of r){const l=u(d=>tc(a,1.1,d)<=e,"checkWidth"),c=l(h)?[h]:Kh(h,l);for(const d of c)$i(Ei(s,n,1.1),d),n++}if(i){const h=s.node().getBBox(),l=2;return o.attr("x",h.x-l).attr("y",h.y-l).attr("width",h.width+2*l).attr("height",h.height+2*l),a.node()}return s.node()}function $i(e,t){e.text(""),t.forEach((r,i)=>{const a=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?a.text(r.content):a.text(" "+r.content)})}ua=function(e){return e.replace(/fa[bklrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`)},u(Pt,"handleUndefinedAttr"),u(Vh,"preprocessMarkdown"),u(Gh,"markdownToLines"),u(Xh,"markdownToHTML"),u(Zh,"splitTextToChars"),u(Qh,"splitWordToFitWidth"),u(So,"splitWordToFitWidthRecursion"),u(Kh,"splitLineToFitWidth"),u(Ai,"splitLineToFitWidthRecursion"),u(To,"applyStyle"),u(Jh,"addHtmlSpan"),u(Ei,"createTspan"),u(tc,"computeWidthOfText"),u(Ln,"computeDimensionOfText"),u(ec,"createFormattedText"),u($i,"updateTextContentAndStyles"),u(ua,"replaceIconSubstring"),he=u(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:o=!0,isNode:s=!0,width:n=200,addSvgBackground:h=!1}={},l)=>{if($.debug("XYZ createText",t,r,i,a,o,s,"addSvgBackground: ",h),o){const c=Xh(t,l),d=ua(be(c)),p=t.replace(/\\\\/g,"\\"),g={isNode:s,label:Le(t)?p:d,labelStyle:r.replace("fill:","color:")};return await Jh(e,g,n,a,h)}{const c=ec(n,e,Gh(t.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),l),!!t&&h);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(c).attr("style",d)}else{const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");lt(c).select("rect").attr("style",d.replace(/background:/g,"fill:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(c).select("text").attr("style",p)}return c}},"createText");function Bo(e,t,r){if(e&&e.length){const[i,a]=t,o=Math.PI/180*r,s=Math.cos(o),n=Math.sin(o);for(const h of e){const[l,c]=h;h[0]=(l-i)*s-(c-a)*n+i,h[1]=(l-i)*n+(c-a)*s+a}}}function tf(e,t){return e[0]===t[0]&&e[1]===t[1]}function ef(e,t,r,i=1){const a=r,o=Math.max(t,.1),s=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(a)for(const l of s)Bo(l,n,a);const h=function(l,c,d){const p=[];for(const C of l){const w=[...C];tf(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&p.push(w)}const g=[];c=Math.max(c,.1);const f=[];for(const C of p)for(let w=0;w<C.length-1;w++){const L=C[w],B=C[w+1];if(L[1]!==B[1]){const b=Math.min(L[1],B[1]);f.push({ymin:b,ymax:Math.max(L[1],B[1]),x:b===L[1]?L[0]:B[0],islope:(B[0]-L[0])/(B[1]-L[1])})}}if(f.sort((C,w)=>C.ymin<w.ymin?-1:C.ymin>w.ymin?1:C.x<w.x?-1:C.x>w.x?1:C.ymax===w.ymax?0:(C.ymax-w.ymax)/Math.abs(C.ymax-w.ymax)),!f.length)return g;let m=[],x=f[0].ymin,y=0;for(;m.length||f.length;){if(f.length){let C=-1;for(let w=0;w<f.length&&!(f[w].ymin>x);w++)C=w;f.splice(0,C+1).forEach(w=>{m.push({s:x,edge:w})})}if(m=m.filter(C=>!(C.edge.ymax<=x)),m.sort((C,w)=>C.edge.x===w.edge.x?0:(C.edge.x-w.edge.x)/Math.abs(C.edge.x-w.edge.x)),(d!==1||y%c==0)&&m.length>1)for(let C=0;C<m.length;C+=2){const w=C+1;if(w>=m.length)break;const L=m[C].edge,B=m[w].edge;g.push([[Math.round(L.x),x],[Math.round(B.x),x]])}x+=d,m.forEach(C=>{C.edge.x=C.edge.x+d*C.edge.islope}),y++}return g}(s,o,i);if(a){for(const l of s)Bo(l,n,-a);(function(l,c,d){const p=[];l.forEach(g=>p.push(...g)),Bo(p,c,d)})(h,n,-a)}return h}function Gr(e,t){var r;const i=t.hachureAngle+90;let a=t.hachureGap;a<0&&(a=4*t.strokeWidth),a=Math.round(Math.max(a,.1));let o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=a),ef(e,a,i,o||1)}class vo{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Gr(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const a of t)i.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return i}}function Oi(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class rf extends vo{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=Gr(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,s=[],n=.5*i*Math.cos(o),h=.5*i*Math.sin(o);for(const[l,c]of a)Oi([l,c])&&s.push([[l[0]-n,l[1]+h],[...c]],[[l[0]+n,l[1]-h],[...c]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}}class af extends vo{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,a);return i.ops=i.ops.concat(o.ops),i}}class of{constructor(t){this.helper=t}fillPolygons(t,r){const i=Gr(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const s=a/4;for(const n of t){const h=Oi(n),l=h/a,c=Math.ceil(l)-1,d=h-c*a,p=(n[0][0]+n[1][0])/2-a/4,g=Math.min(n[0][1],n[1][1]);for(let f=0;f<c;f++){const m=g+d+f*a,x=p-s+2*Math.random()*s,y=m-s+2*Math.random()*s,C=this.helper.ellipse(x,y,o,o,r);i.push(...C.ops)}}return{type:"fillSketch",ops:i}}}class nf{constructor(t){this.helper=t}fillPolygons(t,r){const i=Gr(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,o=[];return t.forEach(s=>{const n=Oi(s),h=Math.floor(n/(i+a)),l=(n+a-h*(i+a))/2;let c=s[0],d=s[1];c[0]>d[0]&&(c=s[1],d=s[0]);const p=Math.atan((d[1]-c[1])/(d[0]-c[0]));for(let g=0;g<h;g++){const f=g*(i+a),m=f+i,x=[c[0]+f*Math.cos(p)+l*Math.cos(p),c[1]+f*Math.sin(p)+l*Math.sin(p)],y=[c[0]+m*Math.cos(p)+l*Math.cos(p),c[1]+m*Math.sin(p)+l*Math.sin(p)];o.push(...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],r))}}),o}}class sf{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?i:r.zigzagOffset,o=Gr(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(o,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach(o=>{const s=Oi(o),n=Math.round(s/(2*r));let h=o[0],l=o[1];h[0]>l[0]&&(h=o[1],l=o[0]);const c=Math.atan((l[1]-h[1])/(l[0]-h[0]));for(let d=0;d<n;d++){const p=2*d*r,g=2*(d+1)*r,f=Math.sqrt(2*Math.pow(r,2)),m=[h[0]+p*Math.cos(c),h[1]+p*Math.sin(c)],x=[h[0]+g*Math.cos(c),h[1]+g*Math.sin(c)],y=[m[0]+f*Math.cos(c+Math.PI/4),m[1]+f*Math.sin(c+Math.PI/4)];a.push(...this.helper.doubleLineOps(m[0],m[1],y[0],y[1],i),...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],i))}}),a}}const Nt={};class lf{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Di={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Mo(e,t){return e.type===t}function Lo(e){const t=[],r=function(s){const n=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:0,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:1,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return n[n.length]={type:2,text:""},n}(e);let i="BOD",a=0,o=r[a];for(;!Mo(o,2);){let s=0;const n=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return Lo("M0,0"+e);a++,s=Di[o.text],i=o.text}else Mo(o,1)?s=Di[i]:(a++,s=Di[o.text],i=o.text);if(!(a+s<r.length))throw new Error("Path data ended short");for(let h=a;h<a+s;h++){const l=r[h];if(!Mo(l,1))throw new Error("Param not a number: "+i+","+l.text);n[n.length]=+l.text}if(typeof Di[i]!="number")throw new Error("Bad segment: "+i);{const h={key:i,data:n};t.push(h),a+=s,o=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function rc(e){let t=0,r=0,i=0,a=0;const o=[];for(const{key:s,data:n}of e)switch(s){case"M":o.push({key:"M",data:[...n]}),[t,r]=n,[i,a]=n;break;case"m":t+=n[0],r+=n[1],o.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":o.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const h=n.map((l,c)=>c%2?l+r:l+t);o.push({key:"C",data:h}),t=h[4],r=h[5];break}case"Q":o.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const h=n.map((l,c)=>c%2?l+r:l+t);o.push({key:"Q",data:h}),t=h[2],r=h[3];break}case"A":o.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],o.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":o.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const h=n.map((l,c)=>c%2?l+r:l+t);o.push({key:"S",data:h}),t=h[2],r=h[3];break}case"T":o.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=a}return o}function ic(e){const t=[];let r="",i=0,a=0,o=0,s=0,n=0,h=0;for(const{key:l,data:c}of e){switch(l){case"M":t.push({key:"M",data:[...c]}),[i,a]=c,[o,s]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],a=c[5],n=c[2],h=c[3];break;case"L":t.push({key:"L",data:[...c]}),[i,a]=c;break;case"H":i=c[0],t.push({key:"L",data:[i,a]});break;case"V":a=c[0],t.push({key:"L",data:[i,a]});break;case"S":{let d=0,p=0;r==="C"||r==="S"?(d=i+(i-n),p=a+(a-h)):(d=i,p=a),t.push({key:"C",data:[d,p,...c]}),n=c[0],h=c[1],i=c[2],a=c[3];break}case"T":{const[d,p]=c;let g=0,f=0;r==="Q"||r==="T"?(g=i+(i-n),f=a+(a-h)):(g=i,f=a);const m=i+2*(g-i)/3,x=a+2*(f-a)/3,y=d+2*(g-d)/3,C=p+2*(f-p)/3;t.push({key:"C",data:[m,x,y,C,d,p]}),n=g,h=f,i=d,a=p;break}case"Q":{const[d,p,g,f]=c,m=i+2*(d-i)/3,x=a+2*(p-a)/3,y=g+2*(d-g)/3,C=f+2*(p-f)/3;t.push({key:"C",data:[m,x,y,C,g,f]}),n=d,h=p,i=g,a=f;break}case"A":{const d=Math.abs(c[0]),p=Math.abs(c[1]),g=c[2],f=c[3],m=c[4],x=c[5],y=c[6];d===0||p===0?(t.push({key:"C",data:[i,a,x,y,x,y]}),i=x,a=y):i===x&&a===y||(ac(i,a,x,y,d,p,g,f,m).forEach(function(C){t.push({key:"C",data:C})}),i=x,a=y);break}case"Z":t.push({key:"Z",data:[]}),i=o,a=s}r=l}return t}function Xr(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function ac(e,t,r,i,a,o,s,n,h,l){const c=(d=s,Math.PI*d/180);var d;let p=[],g=0,f=0,m=0,x=0;if(l)[g,f,m,x]=l;else{[e,t]=Xr(e,t,-c),[r,i]=Xr(r,i,-c);const v=(e-r)/2,M=(t-i)/2;let A=v*v/(a*a)+M*M/(o*o);A>1&&(A=Math.sqrt(A),a*=A,o*=A);const _=a*a,O=o*o,E=_*O-_*M*M-O*v*v,Q=_*M*M+O*v*v,rt=(n===h?-1:1)*Math.sqrt(Math.abs(E/Q));m=rt*a*M/o+(e+r)/2,x=rt*-o*v/a+(t+i)/2,g=Math.asin(parseFloat(((t-x)/o).toFixed(9))),f=Math.asin(parseFloat(((i-x)/o).toFixed(9))),e<m&&(g=Math.PI-g),r<m&&(f=Math.PI-f),g<0&&(g=2*Math.PI+g),f<0&&(f=2*Math.PI+f),h&&g>f&&(g-=2*Math.PI),!h&&f>g&&(f-=2*Math.PI)}let y=f-g;if(Math.abs(y)>120*Math.PI/180){const v=f,M=r,A=i;f=h&&f>g?g+120*Math.PI/180*1:g+120*Math.PI/180*-1,p=ac(r=m+a*Math.cos(f),i=x+o*Math.sin(f),M,A,a,o,s,0,h,[f,v,m,x])}y=f-g;const C=Math.cos(g),w=Math.sin(g),L=Math.cos(f),B=Math.sin(f),b=Math.tan(y/4),S=4/3*a*b,D=4/3*o*b,z=[e,t],P=[e+S*w,t-D*C],I=[r+S*B,i-D*L],F=[r,i];if(P[0]=2*z[0]-P[0],P[1]=2*z[1]-P[1],l)return[P,I,F].concat(p);{p=[P,I,F].concat(p);const v=[];for(let M=0;M<p.length;M+=3){const A=Xr(p[M][0],p[M][1],c),_=Xr(p[M+1][0],p[M+1][1],c),O=Xr(p[M+2][0],p[M+2][1],c);v.push([A[0],A[1],_[0],_[1],O[0],O[1]])}return v}}const hf={randOffset:function(e,t){return J(e,t)},randOffsetWithRange:function(e,t,r){return Pi(e,t,r)},ellipse:function(e,t,r,i,a){return _o(e,t,a,sc(r,i,a)).opset},doubleLineOps:function(e,t,r,i,a){return Te(e,t,r,i,a,!0)}};function oc(e,t,r,i,a){return{type:"path",ops:Te(e,t,r,i,a)}}function Ii(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let o=0;o<i-1;o++)a.push(...Te(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&a.push(...Te(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?oc(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function nc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=zi(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:zi(r[0],1.5*(1+.22*t.roughness),cc(t));for(let o=1;o<r.length;o++){const s=r[o];if(s.length){const n=zi(s,1*(1+.2*t.roughness),t),h=t.disableMultiStroke?[]:zi(s,1.5*(1+.22*t.roughness),cc(t));for(const l of n)l.op!=="move"&&i.push(l);for(const l of h)l.op!=="move"&&a.push(l)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function sc(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),o=2*Math.PI/a;let s=Math.abs(e/2),n=Math.abs(t/2);const h=1-r.curveFitting;return s+=J(s*h,r),n+=J(n*h,r),{increment:o,rx:s,ry:n}}function _o(e,t,r,i){const[a,o]=uc(i.increment,e,t,i.rx,i.ry,1,i.increment*Pi(.1,Pi(.4,1,r),r),r);let s=Ri(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=uc(i.increment,e,t,i.rx,i.ry,1.5,0,r),h=Ri(n,null,r);s=s.concat(h)}return{estimatedPoints:o,opset:{type:"path",ops:s}}}function lc(e,t,r,i,a,o,s,n,h){const l=e,c=t;let d=Math.abs(r/2),p=Math.abs(i/2);d+=J(.01*d,h),p+=J(.01*p,h);let g=a,f=o;for(;g<0;)g+=2*Math.PI,f+=2*Math.PI;f-g>2*Math.PI&&(g=0,f=2*Math.PI);const m=2*Math.PI/h.curveStepCount,x=Math.min(m/2,(f-g)/2),y=pc(x,l,c,d,p,g,f,1,h);if(!h.disableMultiStroke){const C=pc(x,l,c,d,p,g,f,1.5,h);y.push(...C)}return s&&(n?y.push(...Te(l,c,l+d*Math.cos(g),c+p*Math.sin(g),h),...Te(l,c,l+d*Math.cos(f),c+p*Math.sin(f),h)):y.push({op:"lineTo",data:[l,c]},{op:"lineTo",data:[l+d*Math.cos(g),c+p*Math.sin(g)]})),{type:"path",ops:y}}function hc(e,t){const r=ic(rc(Lo(e))),i=[];let a=[0,0],o=[0,0];for(const{key:s,data:n}of r)switch(s){case"M":o=[n[0],n[1]],a=[n[0],n[1]];break;case"L":i.push(...Te(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]];break;case"C":{const[h,l,c,d,p,g]=n;i.push(...cf(h,l,c,d,p,g,o,t)),o=[p,g];break}case"Z":i.push(...Te(o[0],o[1],a[0],a[1],t)),o=[a[0],a[1]]}return{type:"path",ops:i}}function Fo(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+J(a,t),i[0][1]+J(a,t)]});for(let s=1;s<o;s++)r.push({op:"lineTo",data:[i[s][0]+J(a,t),i[s][1]+J(a,t)]})}}return{type:"fillPath",ops:r}}function ar(e,t){return function(r,i){let a=r.fillStyle||"hachure";if(!Nt[a])switch(a){case"zigzag":Nt[a]||(Nt[a]=new rf(i));break;case"cross-hatch":Nt[a]||(Nt[a]=new af(i));break;case"dots":Nt[a]||(Nt[a]=new of(i));break;case"dashed":Nt[a]||(Nt[a]=new nf(i));break;case"zigzag-line":Nt[a]||(Nt[a]=new sf(i));break;default:a="hachure",Nt[a]||(Nt[a]=new vo(i))}return Nt[a]}(t,hf).fillPolygons(e,t)}function cc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function dc(e){return e.randomizer||(e.randomizer=new lf(e.seed||0)),e.randomizer.next()}function Pi(e,t,r,i=1){return r.roughness*i*(dc(r)*(t-e)+e)}function J(e,t,r=1){return Pi(-e,e,t,r)}function Te(e,t,r,i,a,o=!1){const s=o?a.disableMultiStrokeFill:a.disableMultiStroke,n=Ao(e,t,r,i,a,!0,!1);if(s)return n;const h=Ao(e,t,r,i,a,!0,!0);return n.concat(h)}function Ao(e,t,r,i,a,o,s){const n=Math.pow(e-r,2)+Math.pow(t-i,2),h=Math.sqrt(n);let l=1;l=h<200?1:h>500?.4:-.0016668*h+1.233334;let c=a.maxRandomnessOffset||0;c*c*100>n&&(c=h/10);const d=c/2,p=.2+.2*dc(a);let g=a.bowing*a.maxRandomnessOffset*(i-t)/200,f=a.bowing*a.maxRandomnessOffset*(e-r)/200;g=J(g,a,l),f=J(f,a,l);const m=[],x=()=>J(d,a,l),y=()=>J(c,a,l),C=a.preserveVertices;return s?m.push({op:"move",data:[e+(C?0:x()),t+(C?0:x())]}):m.push({op:"move",data:[e+(C?0:J(c,a,l)),t+(C?0:J(c,a,l))]}),s?m.push({op:"bcurveTo",data:[g+e+(r-e)*p+x(),f+t+(i-t)*p+x(),g+e+2*(r-e)*p+x(),f+t+2*(i-t)*p+x(),r+(C?0:x()),i+(C?0:x())]}):m.push({op:"bcurveTo",data:[g+e+(r-e)*p+y(),f+t+(i-t)*p+y(),g+e+2*(r-e)*p+y(),f+t+2*(i-t)*p+y(),r+(C?0:y()),i+(C?0:y())]}),m}function zi(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+J(t,r),e[0][1]+J(t,r)]),i.push([e[0][0]+J(t,r),e[0][1]+J(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+J(t,r),e[a][1]+J(t,r)]),a===e.length-1&&i.push([e[a][0]+J(t,r),e[a][1]+J(t,r)]);return Ri(i,null,r)}function Ri(e,t,r){const i=e.length,a=[];if(i>3){const o=[],s=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const h=e[n];o[0]=[h[0],h[1]],o[1]=[h[0]+(s*e[n+1][0]-s*e[n-1][0])/6,h[1]+(s*e[n+1][1]-s*e[n-1][1])/6],o[2]=[e[n+1][0]+(s*e[n][0]-s*e[n+2][0])/6,e[n+1][1]+(s*e[n][1]-s*e[n+2][1])/6],o[3]=[e[n+1][0],e[n+1][1]],a.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else i===3?(a.push({op:"move",data:[e[1][0],e[1][1]]}),a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&a.push(...Ao(e[0][0],e[0][1],e[1][0],e[1][1],r,0,!0));return a}function uc(e,t,r,i,a,o,s,n){const h=[],l=[];if(n.roughness===0){e/=4,l.push([t+i*Math.cos(-e),r+a*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const d=[t+i*Math.cos(c),r+a*Math.sin(c)];h.push(d),l.push(d)}l.push([t+i*Math.cos(0),r+a*Math.sin(0)]),l.push([t+i*Math.cos(e),r+a*Math.sin(e)])}else{const c=J(.5,n)-Math.PI/2;l.push([J(o,n)+t+.9*i*Math.cos(c-e),J(o,n)+r+.9*a*Math.sin(c-e)]);const d=2*Math.PI+c-.01;for(let p=c;p<d;p+=e){const g=[J(o,n)+t+i*Math.cos(p),J(o,n)+r+a*Math.sin(p)];h.push(g),l.push(g)}l.push([J(o,n)+t+i*Math.cos(c+2*Math.PI+.5*s),J(o,n)+r+a*Math.sin(c+2*Math.PI+.5*s)]),l.push([J(o,n)+t+.98*i*Math.cos(c+s),J(o,n)+r+.98*a*Math.sin(c+s)]),l.push([J(o,n)+t+.9*i*Math.cos(c+.5*s),J(o,n)+r+.9*a*Math.sin(c+.5*s)])}return[l,h]}function pc(e,t,r,i,a,o,s,n,h){const l=o+J(.1,h),c=[];c.push([J(n,h)+t+.9*i*Math.cos(l-e),J(n,h)+r+.9*a*Math.sin(l-e)]);for(let d=l;d<=s;d+=e)c.push([J(n,h)+t+i*Math.cos(d),J(n,h)+r+a*Math.sin(d)]);return c.push([t+i*Math.cos(s),r+a*Math.sin(s)]),c.push([t+i*Math.cos(s),r+a*Math.sin(s)]),Ri(c,0,h)}function cf(e,t,r,i,a,o,s,n){const h=[],l=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let c=[0,0];const d=n.disableMultiStroke?1:2,p=n.preserveVertices;for(let g=0;g<d;g++)g===0?h.push({op:"move",data:[s[0],s[1]]}):h.push({op:"move",data:[s[0]+(p?0:J(l[0],n)),s[1]+(p?0:J(l[0],n))]}),c=p?[a,o]:[a+J(l[g],n),o+J(l[g],n)],h.push({op:"bcurveTo",data:[e+J(l[g],n),t+J(l[g],n),r+J(l[g],n),i+J(l[g],n),c[0],c[1]]});return h}function Zr(e){return[...e]}function gc(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(Zr(e[0]),Zr(e[1]),Zr(e[2]),Zr(e[2]));else{const a=[];a.push(e[0],e[0]);for(let n=1;n<e.length;n++)a.push(e[n]),n===e.length-1&&a.push(e[n]);const o=[],s=1-t;i.push(Zr(a[0]));for(let n=1;n+2<a.length;n++){const h=a[n];o[0]=[h[0],h[1]],o[1]=[h[0]+(s*a[n+1][0]-s*a[n-1][0])/6,h[1]+(s*a[n+1][1]-s*a[n-1][1])/6],o[2]=[a[n+1][0]+(s*a[n][0]-s*a[n+2][0])/6,a[n+1][1]+(s*a[n][1]-s*a[n+2][1])/6],o[3]=[a[n+1][0],a[n+1][1]],i.push(o[1],o[2],o[3])}}return i}function qi(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function df(e,t,r){const i=qi(t,r);if(i===0)return qi(e,t);let a=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return a=Math.max(0,Math.min(1,a)),qi(e,qe(t,r,a))}function qe(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Eo(e,t,r,i){const a=i||[];if(function(n,h){const l=n[h+0],c=n[h+1],d=n[h+2],p=n[h+3];let g=3*c[0]-2*l[0]-p[0];g*=g;let f=3*c[1]-2*l[1]-p[1];f*=f;let m=3*d[0]-2*p[0]-l[0];m*=m;let x=3*d[1]-2*p[1]-l[1];return x*=x,g<m&&(g=m),f<x&&(f=x),g+f}(e,t)<r){const n=e[t+0];a.length?(o=a[a.length-1],s=n,Math.sqrt(qi(o,s))>1&&a.push(n)):a.push(n),a.push(e[t+3])}else{const h=e[t+0],l=e[t+1],c=e[t+2],d=e[t+3],p=qe(h,l,.5),g=qe(l,c,.5),f=qe(c,d,.5),m=qe(p,g,.5),x=qe(g,f,.5),y=qe(m,x,.5);Eo([h,p,m,y],0,r,a),Eo([y,x,f,d],0,r,a)}var o,s;return a}function uf(e,t){return Ni(e,0,e.length,t)}function Ni(e,t,r,i,a){const o=a||[],s=e[t],n=e[r-1];let h=0,l=1;for(let c=t+1;c<r-1;++c){const d=df(e[c],s,n);d>h&&(h=d,l=c)}return Math.sqrt(h)>i?(Ni(e,t,l+1,i,o),Ni(e,l,r,i,o)):(o.length||o.push(s),o.push(n)),o}function $o(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let o=0;o<a;o++)Eo(e,3*o,t,i);return r&&r>0?Ni(i,0,i.length,r):i}const Ht="none";class pf{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,a,o){const s=this._o(o);return this._d("line",[oc(t,r,i,a,s)],s)}rectangle(t,r,i,a,o){const s=this._o(o),n=[],h=function(l,c,d,p,g){return function(f,m){return Ii(f,!0,m)}([[l,c],[l+d,c],[l+d,c+p],[l,c+p]],g)}(t,r,i,a,s);if(s.fill){const l=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];s.fillStyle==="solid"?n.push(Fo([l],s)):n.push(ar([l],s))}return s.stroke!==Ht&&n.push(h),this._d("rectangle",n,s)}ellipse(t,r,i,a,o){const s=this._o(o),n=[],h=sc(i,a,s),l=_o(t,r,s,h);if(s.fill)if(s.fillStyle==="solid"){const c=_o(t,r,s,h).opset;c.type="fillPath",n.push(c)}else n.push(ar([l.estimatedPoints],s));return s.stroke!==Ht&&n.push(l.opset),this._d("ellipse",n,s)}circle(t,r,i,a){const o=this.ellipse(t,r,i,i,a);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Ii(t,!1,i)],i)}arc(t,r,i,a,o,s,n=!1,h){const l=this._o(h),c=[],d=lc(t,r,i,a,o,s,n,!0,l);if(n&&l.fill)if(l.fillStyle==="solid"){const p=Object.assign({},l);p.disableMultiStroke=!0;const g=lc(t,r,i,a,o,s,!0,!1,p);g.type="fillPath",c.push(g)}else c.push(function(p,g,f,m,x,y,C){const w=p,L=g;let B=Math.abs(f/2),b=Math.abs(m/2);B+=J(.01*B,C),b+=J(.01*b,C);let S=x,D=y;for(;S<0;)S+=2*Math.PI,D+=2*Math.PI;D-S>2*Math.PI&&(S=0,D=2*Math.PI);const z=(D-S)/C.curveStepCount,P=[];for(let I=S;I<=D;I+=z)P.push([w+B*Math.cos(I),L+b*Math.sin(I)]);return P.push([w+B*Math.cos(D),L+b*Math.sin(D)]),P.push([w,L]),ar([P],C)}(t,r,i,a,o,s,l));return l.stroke!==Ht&&c.push(d),this._d("arc",c,l)}curve(t,r){const i=this._o(r),a=[],o=nc(t,i);if(i.fill&&i.fill!==Ht)if(i.fillStyle==="solid"){const s=nc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],n=t;if(n.length){const h=typeof n[0][0]=="number"?[n]:n;for(const l of h)l.length<3?s.push(...l):l.length===3?s.push(...$o(gc([l[0],l[0],l[1],l[2]]),10,(1+i.roughness)/2)):s.push(...$o(gc(l),10,(1+i.roughness)/2))}s.length&&a.push(ar([s],i))}return i.stroke!==Ht&&a.push(o),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],o=Ii(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(Fo([t],i)):a.push(ar([t],i))),i.stroke!==Ht&&a.push(o),this._d("polygon",a,i)}path(t,r){const i=this._o(r),a=[];if(!t)return this._d("path",a,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=i.fill&&i.fill!=="transparent"&&i.fill!==Ht,s=i.stroke!==Ht,n=!!(i.simplification&&i.simplification<1),h=function(c,d,p){const g=ic(rc(Lo(c))),f=[];let m=[],x=[0,0],y=[];const C=()=>{y.length>=4&&m.push(...$o(y,1)),y=[]},w=()=>{C(),m.length&&(f.push(m),m=[])};for(const{key:B,data:b}of g)switch(B){case"M":w(),x=[b[0],b[1]],m.push(x);break;case"L":C(),m.push([b[0],b[1]]);break;case"C":if(!y.length){const S=m.length?m[m.length-1]:x;y.push([S[0],S[1]])}y.push([b[0],b[1]]),y.push([b[2],b[3]]),y.push([b[4],b[5]]);break;case"Z":C(),m.push([x[0],x[1]])}if(w(),!p)return f;const L=[];for(const B of f){const b=uf(B,p);b.length&&L.push(b)}return L}(t,0,n?4-4*(i.simplification||1):(1+i.roughness)/2),l=hc(t,i);if(o)if(i.fillStyle==="solid")if(h.length===1){const c=hc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else a.push(Fo(h,i));else a.push(ar(h,i));return s&&(n?h.forEach(c=>{a.push(Ii(c,!1,i))}):a.push(l)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const o=typeof r=="number"&&r>=0?a.data.map(s=>+s.toFixed(r)):a.data;switch(a.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const o of r){let s=null;switch(o.type){case"path":s={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ht};break;case"fillPath":s={d:this.opsToPath(o),stroke:Ht,strokeWidth:0,fill:i.fill||Ht};break;case"fillSketch":s=this.fillSketch(o,i)}s&&a.push(s)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Ht,strokeWidth:i,fill:Ht}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}const Wi="http://www.w3.org/2000/svg";class gf{constructor(t,r){this.svg=t,this.gen=new pf(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,o=a.createElementNS(Wi,"g"),s=t.options.fixedDecimalPlaceDigits;for(const n of r){let h=null;switch(n.type){case"path":h=a.createElementNS(Wi,"path"),h.setAttribute("d",this.opsToPath(n,s)),h.setAttribute("stroke",i.stroke),h.setAttribute("stroke-width",i.strokeWidth+""),h.setAttribute("fill","none"),i.strokeLineDash&&h.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&h.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":h=a.createElementNS(Wi,"path"),h.setAttribute("d",this.opsToPath(n,s)),h.setAttribute("stroke","none"),h.setAttribute("stroke-width","0"),h.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||h.setAttribute("fill-rule","evenodd");break;case"fillSketch":h=this.fillSketch(a,n,i)}h&&o.appendChild(h)}return o}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const o=t.createElementNS(Wi,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",a+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,o){const s=this.gen.line(t,r,i,a,o);return this.draw(s)}rectangle(t,r,i,a,o){const s=this.gen.rectangle(t,r,i,a,o);return this.draw(s)}ellipse(t,r,i,a,o){const s=this.gen.ellipse(t,r,i,a,o);return this.draw(s)}circle(t,r,i,a){const o=this.gen.circle(t,r,i,a);return this.draw(o)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,a,o,s,n=!1,h){const l=this.gen.arc(t,r,i,a,o,s,n,h);return this.draw(l)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}let H,et,ji,K;H=(e,t)=>new gf(e,t),et=u(async(e,t,r)=>{var d,p;let i;const a=t.useHtmlLabels||bt((d=ct())==null?void 0:d.htmlLabels);i=r||"node default";const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),s=o.insert("g").attr("class","label").attr("style",Pt(t.labelStyle));let n;n=t.label===void 0?"":typeof t.label=="string"?t.label:t.label[0];const h=await he(s,Ce(be(n),ct()),{useHtmlLabels:a,width:t.width||((p=ct().flowchart)==null?void 0:p.wrappingWidth),cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let l=h.getBBox();const c=((t==null?void 0:t.padding)??0)/2;if(a){const g=h.children[0],f=lt(h),m=g.getElementsByTagName("img");if(m){const x=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(C=>{function w(){if(y.style.display="flex",y.style.flexDirection="column",x){const L=ct().fontSize?ct().fontSize:window.getComputedStyle(document.body).fontSize,B=5,[b=la.fontSize]=Mr(L),S=b*B+"px";y.style.minWidth=S,y.style.maxWidth=S}else y.style.width="100%";C(y)}u(w,"setupImage"),setTimeout(()=>{y.complete&&w()}),y.addEventListener("error",w),y.addEventListener("load",w)})))}l=g.getBoundingClientRect(),f.attr("width",l.width),f.attr("height",l.height)}return a?s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"):s.attr("transform","translate(0, "+-l.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:o,bbox:l,halfPadding:c,label:s}},"labelHelper"),ji=u(async(e,t,r)=>{var h,l,c,d,p,g;const i=r.useHtmlLabels||bt((l=(h=ct())==null?void 0:h.flowchart)==null?void 0:l.htmlLabels),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await he(a,Ce(be(t),ct()),{useHtmlLabels:i,width:r.width||((d=(c=ct())==null?void 0:c.flowchart)==null?void 0:d.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let s=o.getBBox();const n=r.padding/2;if(bt((g=(p=ct())==null?void 0:p.flowchart)==null?void 0:g.htmlLabels)){const f=o.children[0],m=lt(o);s=f.getBoundingClientRect(),m.attr("width",s.width),m.attr("height",s.height)}return i?a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):a.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:n,label:a}},"insertLabel"),V=u((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),K=u((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function st(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}function Be(e,t,r,i,a,o){const s=[],n=r-e,h=i-t,l=n/o,c=2*Math.PI/l,d=t+h/2;for(let p=0;p<=50;p++){const g=e+p/50*n,f=d+a*Math.sin(c*(g-e));s.push({x:g,y:f})}return s}function Oo(e,t,r,i,a,o){const s=[],n=a*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let l=0;l<i;l++){const c=n+l*h,d=e+r*Math.cos(c),p=t+r*Math.sin(c);s.push({x:-d,y:-p})}return s}u(st,"createPathFromPoints"),u(Be,"generateFullSineWavePoints"),u(Oo,"generateCirclePoints");var ff=u((e,t)=>{var r,i,a=e.x,o=e.y,s=t.x-a,n=t.y-o,h=e.width/2,l=e.height/2;return Math.abs(n)*h>Math.abs(s)*l?(n<0&&(l=-l),r=n===0?0:l*s/n,i=l):(s<0&&(h=-h),r=h,i=s===0?0:h*n/s),{x:a+r,y:o+i}},"intersectRect"),or=ff;function fc(e,t){t&&e.attr("style",t)}async function mc(e){const t=lt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div");let i=e.label;e.label&&Le(e.label)&&(i=await oi(e.label.replace(_e.lineBreakRegex,`
124
- `),ct()));const a=e.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+a+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+i+"</span>"),fc(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}u(fc,"applyStyle"),u(mc,"addHtmlLabel");let yc,ve,ae,xc,Ne,bc,Do,G,U,Io,Cc,kc,wc,Sc,Tc,Po;yc=u(async(e,t,r,i)=>{let a=e||"";if(typeof a=="object"&&(a=a[0]),bt(ct().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"<br />"),$.info("vertexText"+a);const o={isNode:i,label:be(a).replace(/fa[blrs]?:fa-[\w-]+/g,s=>`<i class='${s.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await mc(o)}{const o=document.createElementNS("http://www.w3.org/2000/svg","text");o.setAttribute("style",t.replace("color:","fill:"));let s=[];s=typeof a=="string"?a.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(a)?a:[];for(const n of s){const h=document.createElementNS("http://www.w3.org/2000/svg","tspan");h.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),h.setAttribute("dy","1em"),h.setAttribute("x","0"),r?h.setAttribute("class","title-row"):h.setAttribute("class","row"),h.textContent=n.trim(),o.appendChild(h)}return o}},"createLabel"),ve=yc,ae=u((e,t,r,i,a)=>["M",e+a,t,"H",e+r-a,"A",a,a,0,0,1,e+r,t+a,"V",t+i-a,"A",a,a,0,0,1,e+r-a,t+i,"H",e+a,"A",a,a,0,0,1,e,t+i-a,"V",t+a,"A",a,a,0,0,1,e+a,t,"Z"].join(" "),"createRoundedRectPathD"),xc=u(e=>{const{handDrawnSeed:t}=ct();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Ne=u(e=>{const t=bc([...e.cssCompiledStyles||[],...e.cssStyles||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),bc=u(e=>{const t=new Map;return e.forEach(r=>{const[i,a]=r.split(":");t.set(i.trim(),a==null?void 0:a.trim())}),t},"styles2Map"),Do=u(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),G=u(e=>{const{stylesArray:t}=Ne(e),r=[],i=[],a=[],o=[];return t.forEach(s=>{const n=s[0];Do(n)?r.push(s.join(":")+" !important"):(i.push(s.join(":")+" !important"),n.includes("stroke")&&a.push(s.join(":")+" !important"),n==="fill"&&o.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:o}},"styles2String"),U=u((e,t)=>{var n;const{themeVariables:r,handDrawnSeed:i}=ct(),{nodeBorder:a,mainBkg:o}=r,{stylesMap:s}=Ne(e);return Object.assign({roughness:.7,fill:s.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||a,seed:i,strokeWidth:((n=s.get("stroke-width"))==null?void 0:n.replace("px",""))||1.3,fillLineDash:[0,0]},t)},"userNodeOverrides"),Io=u(async(e,t)=>{$.info("Creating subgraph rect for ",t.id,t);const r=ct(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:s}=i,{labelStyles:n,nodeStyles:h,borderStyles:l,backgroundStyles:c}=G(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),p=bt(r.flowchart.htmlLabels),g=d.insert("g").attr("class","cluster-label "),f=await he(g,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0});let m=f.getBBox();if(bt(r.flowchart.htmlLabels)){const S=f.children[0],D=lt(f);m=S.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const x=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height,C=t.x-x/2,w=t.y-y/2;let L;if($.trace("Data ",t,JSON.stringify(t)),t.look==="handDrawn"){const S=H(d),D=U(t,{roughness:.7,fill:o,stroke:s,fillWeight:3,seed:a}),z=S.path(ae(C,w,x,y,0),D);L=d.insert(()=>($.debug("Rough node insert CXC",z),z),":first-child"),L.select("path:nth-child(2)").attr("style",l.join(";")),L.select("path").attr("style",c.join(";").replace("fill","stroke"))}else L=d.insert("rect",":first-child"),L.attr("style",h).attr("rx",t.rx).attr("ry",t.ry).attr("x",C).attr("y",w).attr("width",x).attr("height",y);const{subGraphTitleTopMargin:B}=ni(r);if(g.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+B})`),n){const S=g.select("span");S&&S.attr("style",n)}const b=L.node().getBBox();return t.offsetX=0,t.width=b.width,t.height=b.height,t.offsetY=m.height-t.padding/2,t.intersect=function(S){return or(t,S)},{cluster:d,labelBBox:m}},"rect"),Cc=u((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),a=0*t.padding,o=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");const s=i.node().getBBox();return t.width=s.width,t.height=s.height,t.intersect=function(n){return or(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),kc=u(async(e,t)=>{const r=ct(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:o,compositeBackground:s,compositeTitleBackground:n,nodeBorder:h}=i,l=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),c=l.insert("g",":first-child"),d=l.insert("g").attr("class","cluster-label");let p=l.append("rect");const g=d.node().appendChild(await ve(t.label,t.labelStyle,void 0,!0));let f=g.getBBox();if(bt(r.flowchart.htmlLabels)){const z=g.children[0],P=lt(g);f=z.getBoundingClientRect(),P.attr("width",f.width),P.attr("height",f.height)}const m=0*t.padding,x=m/2,y=(t.width<=f.width+t.padding?f.width+t.padding:t.width)+m;t.width<=f.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height+m,w=t.height+m-f.height-6,L=t.x-y/2,B=t.y-C/2;t.width=y;const b=t.y-t.height/2-x+f.height+2;let S;if(t.look==="handDrawn"){const z=t.cssClasses.includes("statediagram-cluster-alt"),P=H(l),I=t.rx||t.ry?P.path(ae(L,B,y,C,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:h,seed:a}):P.rectangle(L,B,y,C,{seed:a});S=l.insert(()=>I,":first-child");const F=P.rectangle(L,b,y,w,{fill:z?o:s,fillStyle:z?"hachure":"solid",stroke:h,seed:a});S=l.insert(()=>I,":first-child"),p=l.insert(()=>F)}else S=c.insert("rect",":first-child"),S.attr("class","outer").attr("x",L).attr("y",B).attr("width",y).attr("height",C).attr("data-look",t.look),p.attr("class","inner").attr("x",L).attr("y",b).attr("width",y).attr("height",w);d.attr("transform",`translate(${t.x-f.width/2}, ${B+1-(bt(r.flowchart.htmlLabels)?0:3)})`);const D=S.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=f.height-t.padding/2,t.labelBBox=f,t.intersect=function(z){return or(t,z)},{cluster:l,labelBBox:f}},"roundedWithTitle"),wc=u(async(e,t)=>{$.info("Creating subgraph rect for ",t.id,t);const r=ct(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:s}=i,{labelStyles:n,nodeStyles:h,borderStyles:l,backgroundStyles:c}=G(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),p=bt(r.flowchart.htmlLabels),g=d.insert("g").attr("class","cluster-label "),f=await he(g,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let m=f.getBBox();if(bt(r.flowchart.htmlLabels)){const S=f.children[0],D=lt(f);m=S.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const x=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height,C=t.x-x/2,w=t.y-y/2;let L;if($.trace("Data ",t,JSON.stringify(t)),t.look==="handDrawn"){const S=H(d),D=U(t,{roughness:.7,fill:o,stroke:s,fillWeight:4,seed:a}),z=S.path(ae(C,w,x,y,t.rx),D);L=d.insert(()=>($.debug("Rough node insert CXC",z),z),":first-child"),L.select("path:nth-child(2)").attr("style",l.join(";")),L.select("path").attr("style",c.join(";").replace("fill","stroke"))}else L=d.insert("rect",":first-child"),L.attr("style",h).attr("rx",t.rx).attr("ry",t.ry).attr("x",C).attr("y",w).attr("width",x).attr("height",y);const{subGraphTitleTopMargin:B}=ni(r);if(g.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+B})`),n){const S=g.select("span");S&&S.attr("style",n)}const b=L.node().getBBox();return t.offsetX=0,t.width=b.width,t.height=b.height,t.offsetY=m.height-t.padding/2,t.intersect=function(S){return or(t,S)},{cluster:d,labelBBox:m}},"kanbanSection"),Sc=u((e,t)=>{const r=ct(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:o}=i,s=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),n=s.insert("g",":first-child"),h=0*t.padding,l=t.width+h;t.diff=-t.padding;const c=t.height+h,d=t.x-l/2,p=t.y-c/2;let g;if(t.width=l,t.look==="handDrawn"){const m=H(s).rectangle(d,p,l,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:a});g=s.insert(()=>m,":first-child")}else g=n.insert("rect",":first-child"),g.attr("class","divider").attr("x",d).attr("y",p).attr("width",l).attr("height",c).attr("data-look",t.look);const f=g.node().getBBox();return t.height=f.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return or(t,m)},{cluster:s,labelBBox:{}}},"divider"),Tc={rect:Io,squareRect:Io,roundedWithTitle:kc,noteGroup:Cc,divider:Sc,kanbanSection:wc},Po=new Map,Bn=u(async(e,t)=>{const r=t.shape||"rect",i=await Tc[r](e,t);return Po.set(t.id,i),i},"insertCluster"),Op=u(()=>{Po=new Map},"clear");function Bc(e,t){return e.intersect(t)}u(Bc,"intersectNode");var mf=Bc;function vc(e,t,r,i){var a=e.x,o=e.y,s=a-i.x,n=o-i.y,h=Math.sqrt(t*t*n*n+r*r*s*s),l=Math.abs(t*r*s/h);i.x<a&&(l=-l);var c=Math.abs(t*r*n/h);return i.y<o&&(c=-c),{x:a+l,y:o+c}}u(vc,"intersectEllipse");var Mc=vc;function Lc(e,t,r){return Mc(e,t,t,r)}u(Lc,"intersectCircle");var yf=Lc;function _c(e,t,r,i){var a,o,s,n,h,l,c,d,p,g,f,m,x;if(a=t.y-e.y,s=e.x-t.x,h=t.x*e.y-e.x*t.y,p=a*r.x+s*r.y+h,g=a*i.x+s*i.y+h,!(p!==0&&g!==0&&zo(p,g)||(o=i.y-r.y,n=r.x-i.x,l=i.x*r.y-r.x*i.y,c=o*e.x+n*e.y+l,d=o*t.x+n*t.y+l,c!==0&&d!==0&&zo(c,d)||(f=a*n-o*s)===0)))return m=Math.abs(f/2),{x:(x=s*l-n*h)<0?(x-m)/f:(x+m)/f,y:(x=o*h-a*l)<0?(x-m)/f:(x+m)/f}}function zo(e,t){return e*t>0}u(_c,"intersectLine"),u(zo,"sameSign");var xf=_c;function Fc(e,t,r){let i=e.x,a=e.y,o=[],s=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(c){s=Math.min(s,c.x),n=Math.min(n,c.y)}):(s=Math.min(s,t.x),n=Math.min(n,t.y));let h=i-e.width/2-s,l=a-e.height/2-n;for(let c=0;c<t.length;c++){let d=t[c],p=t[c<t.length-1?c+1:0],g=xf(e,r,{x:h+d.x,y:l+d.y},{x:h+p.x,y:l+p.y});g&&o.push(g)}return o.length?(o.length>1&&o.sort(function(c,d){let p=c.x-r.x,g=c.y-r.y,f=Math.sqrt(p*p+g*g),m=d.x-r.x,x=d.y-r.y,y=Math.sqrt(m*m+x*x);return f<y?-1:f===y?0:1}),o[0]):e}u(Fc,"intersectPolygon");var j={node:mf,circle:yf,ellipse:Mc,polygon:Fc,rect:or};function Ac(e,t){const{labelStyles:r}=G(t);t.labelStyle=r;const i=K(t);let a=i;i||(a="anchor");const o=e.insert("g").attr("class",a).attr("id",t.domId||t.id),{cssStyles:s}=t,n=H(o),h=U(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const l=n.circle(0,0,2,h),c=o.insert(()=>l,":first-child");return c.attr("class","anchor").attr("style",Pt(s)),V(t,c),t.intersect=function(d){return $.info("Circle intersect",t,1,d),j.circle(t,1,d)},o}function Ro(e,t,r,i,a,o,s){const n=(e+r)/2,h=(t+i)/2,l=Math.atan2(i-t,r-e),c=(r-e)/2/a,d=(i-t)/2/o,p=Math.sqrt(c**2+d**2);if(p>1)throw new Error("The given radii are too small to create an arc between the points.");const g=Math.sqrt(1-p**2),f=n+g*o*Math.sin(l)*(s?-1:1),m=h-g*a*Math.cos(l)*(s?-1:1),x=Math.atan2((t-m)/o,(e-f)/a);let y=Math.atan2((i-m)/o,(r-f)/a)-x;s&&y<0&&(y+=2*Math.PI),!s&&y>0&&(y-=2*Math.PI);const C=[];for(let w=0;w<20;w++){const L=x+w/19*y,B=f+a*Math.cos(L),b=m+o*Math.sin(L);C.push({x:B,y:b})}return C}async function Ec(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=o.width+t.padding+20,n=o.height+t.padding,h=n/2,l=h/(2.5+n/50),{cssStyles:c}=t,d=[{x:s/2,y:-n/2},{x:-s/2,y:-n/2},...Ro(-s/2,-n/2,-s/2,n/2,l,h,!1),{x:s/2,y:n/2},...Ro(s/2,n/2,s/2,-n/2,l,h,!0)],p=H(a),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=st(d),m=p.path(f,g),x=a.insert(()=>m,":first-child");return x.attr("class","basic label-container"),c&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",c),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(${l/2}, 0)`),V(t,x),t.intersect=function(y){return j.polygon(t,d,y)},a}function ue(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}async function $c(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=o.height+t.padding,n=o.width+t.padding+12,h=-s,l=[{x:12,y:h},{x:n,y:h},{x:n,y:0},{x:0,y:0},{x:0,y:h+12},{x:12,y:h}];let c;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=H(a),g=U(t,{}),f=st(l),m=p.path(f,g);c=a.insert(()=>m,":first-child").attr("transform",`translate(${-n/2}, ${s/2})`),d&&c.attr("style",d)}else c=ue(a,n,s,l);return i&&c.attr("style",i),V(t,c),t.intersect=function(p){return j.polygon(t,l,p)},a}function Oc(e,t){const{nodeStyles:r}=G(t);t.label="";const i=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(28,t.width??0),s=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],n=H(i),h=U(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const l=st(s),c=n.path(l,h),d=i.insert(()=>c,":first-child");return a&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return j.polygon(t,s,p)},i}async function Dc(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:s}=await et(e,t,K(t)),n=o.width/2+s;let h;const{cssStyles:l}=t;if(t.look==="handDrawn"){const c=H(a),d=U(t,{}),p=c.circle(0,0,2*n,d);h=a.insert(()=>p,":first-child"),h.attr("class","basic label-container").attr("style",Pt(l))}else h=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",n).attr("cx",0).attr("cy",0);return V(t,h),t.intersect=function(c){return $.info("Circle intersect",t,n,c),j.circle(t,n,c)},a}function Ic(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*e;return`M ${-i/2*t},${i/2*r} L ${i/2*t},${-i/2*r}
125
- M ${i/2*t},${i/2*r} L ${-i/2*t},${-i/2*r}`}function Pc(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),o=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:s}=t,n=H(a),h=U(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const l=n.circle(0,0,2*o,h),c=Ic(o),d=n.path(c,h),p=a.insert(()=>l,":first-child");return p.insert(()=>d),s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),V(t,p),t.intersect=function(g){return $.info("crossedCircle intersect",t,{radius:o,point:g}),j.circle(t,o,g)},a}function pe(e,t,r,i=100,a=0,o=180){const s=[],n=a*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let l=0;l<i;l++){const c=n+l*h,d=e+r*Math.cos(c),p=t+r*Math.sin(c);s.push({x:-d,y:-p})}return s}async function zc(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=o.width+(t.padding??0),h=o.height+(t.padding??0),l=Math.max(5,.1*h),{cssStyles:c}=t,d=[...pe(n/2,-h/2,l,30,-90,0),{x:-n/2-l,y:l},...pe(n/2+2*l,-l,l,20,-180,-270),...pe(n/2+2*l,l,l,20,-90,-180),{x:-n/2-l,y:-h/2},...pe(n/2,h/2,l,20,0,90)],p=[{x:n/2,y:-h/2-l},{x:-n/2,y:-h/2-l},...pe(n/2,-h/2,l,20,-90,0),{x:-n/2-l,y:-l},...pe(n/2+.1*n,-l,l,20,-180,-270),...pe(n/2+.1*n,l,l,20,-90,-180),{x:-n/2-l,y:h/2},...pe(n/2,h/2,l,20,0,90),{x:-n/2,y:h/2+l},{x:n/2,y:h/2+l}],g=H(a),f=U(t,{fill:"none"});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=st(d).replace("Z",""),x=g.path(m,f),y=st(p),C=g.path(y,{...f}),w=a.insert("g",":first-child");return w.insert(()=>C,":first-child").attr("stroke-opacity",0),w.insert(()=>x,":first-child"),w.attr("class","text"),c&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",c),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${l}, 0)`),s.attr("transform",`translate(${-n/2+l-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),V(t,w),t.intersect=function(L){return j.polygon(t,p,L)},a}function ge(e,t,r,i=100,a=0,o=180){const s=[],n=a*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let l=0;l<i;l++){const c=n+l*h,d=e+r*Math.cos(c),p=t+r*Math.sin(c);s.push({x:d,y:p})}return s}async function Rc(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=o.width+(t.padding??0),h=o.height+(t.padding??0),l=Math.max(5,.1*h),{cssStyles:c}=t,d=[...ge(n/2,-h/2,l,20,-90,0),{x:n/2+l,y:-l},...ge(n/2+2*l,-l,l,20,-180,-270),...ge(n/2+2*l,l,l,20,-90,-180),{x:n/2+l,y:h/2},...ge(n/2,h/2,l,20,0,90)],p=[{x:-n/2,y:-h/2-l},{x:n/2,y:-h/2-l},...ge(n/2,-h/2,l,20,-90,0),{x:n/2+l,y:-l},...ge(n/2+2*l,-l,l,20,-180,-270),...ge(n/2+2*l,l,l,20,-90,-180),{x:n/2+l,y:h/2},...ge(n/2,h/2,l,20,0,90),{x:n/2,y:h/2+l},{x:-n/2,y:h/2+l}],g=H(a),f=U(t,{fill:"none"});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=st(d).replace("Z",""),x=g.path(m,f),y=st(p),C=g.path(y,{...f}),w=a.insert("g",":first-child");return w.insert(()=>C,":first-child").attr("stroke-opacity",0),w.insert(()=>x,":first-child"),w.attr("class","text"),c&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",c),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-l}, 0)`),s.attr("transform",`translate(${-n/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),V(t,w),t.intersect=function(L){return j.polygon(t,p,L)},a}function Lt(e,t,r,i=100,a=0,o=180){const s=[],n=a*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let l=0;l<i;l++){const c=n+l*h,d=e+r*Math.cos(c),p=t+r*Math.sin(c);s.push({x:-d,y:-p})}return s}async function qc(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=o.width+(t.padding??0),h=o.height+(t.padding??0),l=Math.max(5,.1*h),{cssStyles:c}=t,d=[...Lt(n/2,-h/2,l,30,-90,0),{x:-n/2-l,y:l},...Lt(n/2+2*l,-l,l,20,-180,-270),...Lt(n/2+2*l,l,l,20,-90,-180),{x:-n/2-l,y:-h/2},...Lt(n/2,h/2,l,20,0,90)],p=[...Lt(-n/2+l+l/2,-h/2,l,20,-90,-180),{x:n/2-l/2,y:l},...Lt(-n/2-l/2,-l,l,20,0,90),...Lt(-n/2-l/2,l,l,20,-90,0),{x:n/2-l/2,y:-l},...Lt(-n/2+l+l/2,h/2,l,30,-180,-270)],g=[{x:n/2,y:-h/2-l},{x:-n/2,y:-h/2-l},...Lt(n/2,-h/2,l,20,-90,0),{x:-n/2-l,y:-l},...Lt(n/2+2*l,-l,l,20,-180,-270),...Lt(n/2+2*l,l,l,20,-90,-180),{x:-n/2-l,y:h/2},...Lt(n/2,h/2,l,20,0,90),{x:-n/2,y:h/2+l},{x:n/2-l-l/2,y:h/2+l},...Lt(-n/2+l+l/2,-h/2,l,20,-90,-180),{x:n/2-l/2,y:l},...Lt(-n/2-l/2,-l,l,20,0,90),...Lt(-n/2-l/2,l,l,20,-90,0),{x:n/2-l/2,y:-l},...Lt(-n/2+l+l/2,h/2,l,30,-180,-270)],f=H(a),m=U(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=st(d).replace("Z",""),y=f.path(x,m),C=st(p).replace("Z",""),w=f.path(C,m),L=st(g),B=f.path(L,{...m}),b=a.insert("g",":first-child");return b.insert(()=>B,":first-child").attr("stroke-opacity",0),b.insert(()=>y,":first-child"),b.insert(()=>w,":first-child"),b.attr("class","text"),c&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",c),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${l-l/4}, 0)`),s.attr("transform",`translate(${-n/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),V(t,b),t.intersect=function(S){return j.polygon(t,g,S)},a}async function Nc(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=Math.max(80,1.25*(o.width+2*(t.padding??0)),(t==null?void 0:t.width)??0),n=Math.max(20,o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),h=n/2,{cssStyles:l}=t,c=H(a),d=U(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=s-h,g=n/4,f=[{x:p,y:0},{x:g,y:0},{x:0,y:n/2},{x:g,y:n},{x:p,y:n},...Oo(-p,-n/2,h,50,270,90)],m=st(f),x=c.path(m,d),y=a.insert(()=>x,":first-child");return y.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),y.attr("transform",`translate(${-s/2}, ${-n/2})`),V(t,y),t.intersect=function(C){return j.polygon(t,f,C)},a}u(Ac,"anchor"),u(Ro,"generateArcPoints"),u(Ec,"bowTieRect"),u(ue,"insertPolygonShape"),u($c,"card"),u(Oc,"choice"),u(Dc,"circle"),u(Ic,"createLine"),u(Pc,"crossedCircle"),u(pe,"generateCirclePoints"),u(zc,"curlyBraceLeft"),u(ge,"generateCirclePoints"),u(Rc,"curlyBraceRight"),u(Lt,"generateCirclePoints"),u(qc,"curlyBraces"),u(Nc,"curvedTrapezoid");var bf=u((e,t,r,i,a,o)=>[`M${e},${t+o}`,`a${a},${o} 0,0,0 ${r},0`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${o} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),Cf=u((e,t,r,i,a,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${o} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),kf=u((e,t,r,i,a,o)=>[`M${e-r/2},${-i/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Wc(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=Math.max(o.width+t.padding,t.width??0),h=n/2,l=h/(2.5+n/50),c=Math.max(o.height+l+t.padding,t.height??0);let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const g=H(a),f=Cf(0,0,n,c,h,l),m=kf(0,l,n,c,h,l),x=g.path(f,U(t,{})),y=g.path(m,U(t,{fill:"none"}));d=a.insert(()=>y,":first-child"),d=a.insert(()=>x,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{const g=bf(0,0,n,c,h,l);d=a.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Pt(p)).attr("style",i)}return d.attr("label-offset-y",l),d.attr("transform",`translate(${-n/2}, ${-(c/2+l)})`),V(t,d),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-o.height/2+(t.padding??0)/1.5-(o.y-(o.top??0))})`),t.intersect=function(g){const f=j.rect(t,g),m=f.x-(t.x??0);if(h!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(f.y-(t.y??0))>(t.height??0)/2-l)){let x=l*l*(1-m*m/(h*h));x>0&&(x=Math.sqrt(x)),x=l-x,g.y-(t.y??0)>0&&(x=-x),f.y+=x}return f},a}async function jc(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=o.width+t.padding,h=o.height+t.padding,l=.2*h,c=-n/2,d=-h/2-l/2,{cssStyles:p}=t,g=H(a),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:c,y:d+l},{x:-c,y:d+l},{x:-c,y:-d},{x:c,y:-d},{x:c,y:d},{x:-c,y:d},{x:-c,y:d+l}],x=g.polygon(m.map(C=>[C.x,C.y]),f),y=a.insert(()=>x,":first-child");return y.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),s.attr("transform",`translate(${c+(t.padding??0)/2-(o.x-(o.left??0))}, ${d+l+(t.padding??0)/2-(o.y-(o.top??0))})`),V(t,y),t.intersect=function(C){return j.rect(t,C)},a}async function Hc(e,t){var d,p;const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:s}=await et(e,t,K(t)),n=o.width/2+s+5,h=o.width/2+s;let l;const{cssStyles:c}=t;if(t.look==="handDrawn"){const g=H(a),f=U(t,{roughness:.2,strokeWidth:2.5}),m=U(t,{roughness:.2,strokeWidth:1.5}),x=g.circle(0,0,2*n,f),y=g.circle(0,0,2*h,m);l=a.insert("g",":first-child"),l.attr("class",Pt(t.cssClasses)).attr("style",Pt(c)),(d=l.node())==null||d.appendChild(x),(p=l.node())==null||p.appendChild(y)}else{l=a.insert("g",":first-child");const g=l.insert("circle",":first-child"),f=l.insert("circle");l.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",n).attr("cx",0).attr("cy",0),f.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return V(t,l),t.intersect=function(g){return $.info("DoubleCircle intersect",t,n,g),j.circle(t,n,g)},a}function Yc(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=G(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,n=H(o),{nodeBorder:h}=r,l=U(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(l.roughness=0);const c=n.circle(0,0,14,l),d=o.insert(()=>c,":first-child");return d.selectAll("path").attr("style",`fill: ${h} !important;`),s&&s.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),a&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",a),V(t,d),t.intersect=function(p){return $.info("filledCircle intersect",t,{radius:7,point:p}),j.circle(t,7,p)},o}async function Uc(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=o.width+(t.padding??0),h=n+o.height,l=n+o.height,c=[{x:0,y:-h},{x:l,y:-h},{x:l/2,y:0}],{cssStyles:d}=t,p=H(a),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=st(c),m=p.path(f,g),x=a.insert(()=>m,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`);return d&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=n,t.height=h,V(t,x),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-h/2+(t.padding??0)/2+(o.y-(o.top??0))})`),t.intersect=function(y){return $.info("Triangle intersect",t,c,y),j.polygon(t,c,y)},a}function Vc(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:o}=G(t);t.label="";const s=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let h=Math.max(70,(t==null?void 0:t.width)??0),l=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(h=Math.max(10,(t==null?void 0:t.width)??0),l=Math.max(70,(t==null?void 0:t.height)??0));const c=-1*h/2,d=-1*l/2,p=H(s),g=U(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=p.rectangle(c,d,h,l,g),m=s.insert(()=>f,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),V(t,m);const x=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=x/2||0,t.height+=x/2||0),t.intersect=function(y){return j.rect(t,y)},s}async function Gc(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=Math.max(80,o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(50,o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),h=n/2,{cssStyles:l}=t,c=H(a),d=U(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=[{x:-s/2,y:-n/2},{x:s/2-h,y:-n/2},...Oo(-s/2+h,0,h,50,90,270),{x:s/2-h,y:n/2},{x:-s/2,y:n/2}],g=st(p),f=c.path(g,d),m=a.insert(()=>f,":first-child");return m.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),V(t,m),t.intersect=function(x){return $.info("Pill intersect",t,{radius:h,point:x}),j.polygon(t,p,x)},a}u(Wc,"cylinder"),u(jc,"dividedRectangle"),u(Hc,"doublecircle"),u(Yc,"filledCircle"),u(Uc,"flippedTriangle"),u(Vc,"forkJoin"),u(Gc,"halfRoundedRectangle");var wf=u((e,t,r,i,a)=>[`M${e+a},${t}`,`L${e+r-a},${t}`,`L${e+r},${t-i/2}`,`L${e+r-a},${t-i}`,`L${e+a},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Xc(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=o.height+t.padding,n=s/4,h=o.width+2*n+t.padding,l=[{x:n,y:0},{x:h-n,y:0},{x:h,y:-s/2},{x:h-n,y:-s},{x:n,y:-s},{x:0,y:-s/2}];let c;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=H(a),g=U(t,{}),f=wf(0,0,h,s,n),m=p.path(f,g);c=a.insert(()=>m,":first-child").attr("transform",`translate(${-h/2}, ${s/2})`),d&&c.attr("style",d)}else c=ue(a,h,s,l);return i&&c.attr("style",i),t.width=h,t.height=s,V(t,c),t.intersect=function(p){return j.polygon(t,l,p)},a}async function Zc(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await et(e,t,K(t)),o=Math.max(30,(t==null?void 0:t.width)??0),s=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,h=H(a),l=U(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],d=st(c),p=h.path(d,l),g=a.insert(()=>p,":first-child");return g.attr("class","basic label-container"),n&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",i),g.attr("transform",`translate(${-o/2}, ${-s/2})`),V(t,g),t.intersect=function(f){return $.info("Pill intersect",t,{points:c}),j.polygon(t,c,f)},a}async function Qc(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(t);t.labelStyle=a;const o=t.assetHeight??48,s=t.assetWidth??48,n=Math.max(o,s),h=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,h??0);const{shapeSvg:l,bbox:c,label:d}=await et(e,t,"icon-shape default"),p=t.pos==="t",g=n,f=n,{nodeBorder:m}=r,{stylesMap:x}=Ne(t),y=-f/2,C=-g/2,w=t.label?8:0,L=H(l),B=U(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const b=L.rectangle(y,C,f,g,B),S=Math.max(f,c.width),D=g+c.height+w,z=L.rectangle(-S/2,-D/2,S,D,{...B,fill:"transparent",stroke:"none"}),P=l.insert(()=>b,":first-child"),I=l.insert(()=>z);if(t.icon){const F=l.append("g");F.html(`<g>${await Lr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=F.node().getBBox(),M=v.width,A=v.height,_=v.x,O=v.y;F.attr("transform",`translate(${-M/2-_},${p?c.height/2+w/2-A/2-O:-c.height/2-w/2-A/2-O})`),F.attr("style",`color: ${x.get("stroke")??m};`)}return d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-D/2:D/2-c.height})`),P.attr("transform",`translate(0,${p?c.height/2+w/2:-c.height/2-w/2})`),V(t,I),t.intersect=function(F){if($.info("iconSquare intersect",t,F),!t.label)return j.rect(t,F);const v=t.x??0,M=t.y??0,A=t.height??0;let _=[];return _=p?[{x:v-c.width/2,y:M-A/2},{x:v+c.width/2,y:M-A/2},{x:v+c.width/2,y:M-A/2+c.height+w},{x:v+f/2,y:M-A/2+c.height+w},{x:v+f/2,y:M+A/2},{x:v-f/2,y:M+A/2},{x:v-f/2,y:M-A/2+c.height+w},{x:v-c.width/2,y:M-A/2+c.height+w}]:[{x:v-f/2,y:M-A/2},{x:v+f/2,y:M-A/2},{x:v+f/2,y:M-A/2+g},{x:v+c.width/2,y:M-A/2+g},{x:v+c.width/2/2,y:M+A/2},{x:v-c.width/2,y:M+A/2},{x:v-c.width/2,y:M-A/2+g},{x:v-f/2,y:M-A/2+g}],j.polygon(t,_,F)},l}async function Kc(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(t);t.labelStyle=a;const o=t.assetHeight??48,s=t.assetWidth??48,n=Math.max(o,s),h=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,h??0);const{shapeSvg:l,bbox:c,label:d}=await et(e,t,"icon-shape default"),p=t.label?8:0,g=t.pos==="t",{nodeBorder:f,mainBkg:m}=r,{stylesMap:x}=Ne(t),y=H(l),C=U(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=x.get("fill");C.stroke=w??m;const L=l.append("g");t.icon&&L.html(`<g>${await Lr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=L.node().getBBox(),b=B.width,S=B.height,D=B.x,z=B.y,P=Math.max(b,S)*Math.SQRT2+40,I=y.circle(0,0,P,C),F=Math.max(P,c.width),v=P+c.height+p,M=y.rectangle(-F/2,-v/2,F,v,{...C,fill:"transparent",stroke:"none"}),A=l.insert(()=>I,":first-child"),_=l.insert(()=>M);return L.attr("transform",`translate(${-b/2-D},${g?c.height/2+p/2-S/2-z:-c.height/2-p/2-S/2-z})`),L.attr("style",`color: ${x.get("stroke")??f};`),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${g?-v/2:v/2-c.height})`),A.attr("transform",`translate(0,${g?c.height/2+p/2:-c.height/2-p/2})`),V(t,_),t.intersect=function(O){return $.info("iconSquare intersect",t,O),j.rect(t,O)},l}async function Jc(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(t);t.labelStyle=a;const o=t.assetHeight??48,s=t.assetWidth??48,n=Math.max(o,s),h=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,h??0);const{shapeSvg:l,bbox:c,halfPadding:d,label:p}=await et(e,t,"icon-shape default"),g=t.pos==="t",f=n+2*d,m=n+2*d,{nodeBorder:x,mainBkg:y}=r,{stylesMap:C}=Ne(t),w=-m/2,L=-f/2,B=t.label?8:0,b=H(l),S=U(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const D=C.get("fill");S.stroke=D??y;const z=b.path(ae(w,L,m,f,5),S),P=Math.max(m,c.width),I=f+c.height+B,F=b.rectangle(-P/2,-I/2,P,I,{...S,fill:"transparent",stroke:"none"}),v=l.insert(()=>z,":first-child").attr("class","icon-shape2"),M=l.insert(()=>F);if(t.icon){const A=l.append("g");A.html(`<g>${await Lr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=A.node().getBBox(),O=_.width,E=_.height,Q=_.x,rt=_.y;A.attr("transform",`translate(${-O/2-Q},${g?c.height/2+B/2-E/2-rt:-c.height/2-B/2-E/2-rt})`),A.attr("style",`color: ${C.get("stroke")??x};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${g?-I/2:I/2-c.height})`),v.attr("transform",`translate(0,${g?c.height/2+B/2:-c.height/2-B/2})`),V(t,M),t.intersect=function(A){if($.info("iconSquare intersect",t,A),!t.label)return j.rect(t,A);const _=t.x??0,O=t.y??0,E=t.height??0;let Q=[];return Q=g?[{x:_-c.width/2,y:O-E/2},{x:_+c.width/2,y:O-E/2},{x:_+c.width/2,y:O-E/2+c.height+B},{x:_+m/2,y:O-E/2+c.height+B},{x:_+m/2,y:O+E/2},{x:_-m/2,y:O+E/2},{x:_-m/2,y:O-E/2+c.height+B},{x:_-c.width/2,y:O-E/2+c.height+B}]:[{x:_-m/2,y:O-E/2},{x:_+m/2,y:O-E/2},{x:_+m/2,y:O-E/2+f},{x:_+c.width/2,y:O-E/2+f},{x:_+c.width/2/2,y:O+E/2},{x:_-c.width/2,y:O+E/2},{x:_-c.width/2,y:O-E/2+f},{x:_-m/2,y:O-E/2+f}],j.polygon(t,Q,A)},l}async function td(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(t);t.labelStyle=a;const o=t.assetHeight??48,s=t.assetWidth??48,n=Math.max(o,s),h=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,h??0);const{shapeSvg:l,bbox:c,halfPadding:d,label:p}=await et(e,t,"icon-shape default"),g=t.pos==="t",f=n+2*d,m=n+2*d,{nodeBorder:x,mainBkg:y}=r,{stylesMap:C}=Ne(t),w=-m/2,L=-f/2,B=t.label?8:0,b=H(l),S=U(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const D=C.get("fill");S.stroke=D??y;const z=b.path(ae(w,L,m,f,.1),S),P=Math.max(m,c.width),I=f+c.height+B,F=b.rectangle(-P/2,-I/2,P,I,{...S,fill:"transparent",stroke:"none"}),v=l.insert(()=>z,":first-child"),M=l.insert(()=>F);if(t.icon){const A=l.append("g");A.html(`<g>${await Lr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=A.node().getBBox(),O=_.width,E=_.height,Q=_.x,rt=_.y;A.attr("transform",`translate(${-O/2-Q},${g?c.height/2+B/2-E/2-rt:-c.height/2-B/2-E/2-rt})`),A.attr("style",`color: ${C.get("stroke")??x};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${g?-I/2:I/2-c.height})`),v.attr("transform",`translate(0,${g?c.height/2+B/2:-c.height/2-B/2})`),V(t,M),t.intersect=function(A){if($.info("iconSquare intersect",t,A),!t.label)return j.rect(t,A);const _=t.x??0,O=t.y??0,E=t.height??0;let Q=[];return Q=g?[{x:_-c.width/2,y:O-E/2},{x:_+c.width/2,y:O-E/2},{x:_+c.width/2,y:O-E/2+c.height+B},{x:_+m/2,y:O-E/2+c.height+B},{x:_+m/2,y:O+E/2},{x:_-m/2,y:O+E/2},{x:_-m/2,y:O-E/2+c.height+B},{x:_-c.width/2,y:O-E/2+c.height+B}]:[{x:_-m/2,y:O-E/2},{x:_+m/2,y:O-E/2},{x:_+m/2,y:O-E/2+f},{x:_+c.width/2,y:O-E/2+f},{x:_+c.width/2/2,y:O+E/2},{x:_-c.width/2,y:O+E/2},{x:_-c.width/2,y:O-E/2+f},{x:_-m/2,y:O-E/2+f}],j.polygon(t,Q,A)},l}async function ed(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/o;const{labelStyles:s}=G(t);t.labelStyle=s;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const h=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??a),l=t.constraint==="on"&&(t!=null&&t.assetHeight)?t.assetHeight*t.imageAspectRatio:h,c=t.constraint==="on"?l/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??o;t.width=Math.max(l,n??0);const{shapeSvg:d,bbox:p,label:g}=await et(e,t,"image-shape default"),f=t.pos==="t",m=-l/2,x=-c/2,y=t.label?8:0,C=H(d),w=U(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const L=C.rectangle(m,x,l,c,w),B=Math.max(l,p.width),b=c+p.height+y,S=C.rectangle(-B/2,-b/2,B,b,{...w,fill:"none",stroke:"none"}),D=d.insert(()=>L,":first-child"),z=d.insert(()=>S);if(t.img){const P=d.append("image");P.attr("href",t.img),P.attr("width",l),P.attr("height",c),P.attr("preserveAspectRatio","none"),P.attr("transform",`translate(${-l/2},${f?b/2-c:-b/2})`)}return g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${f?-c/2-p.height/2-y/2:c/2-p.height/2+y/2})`),D.attr("transform",`translate(0,${f?p.height/2+y/2:-p.height/2-y/2})`),V(t,z),t.intersect=function(P){if($.info("iconSquare intersect",t,P),!t.label)return j.rect(t,P);const I=t.x??0,F=t.y??0,v=t.height??0;let M=[];return M=f?[{x:I-p.width/2,y:F-v/2},{x:I+p.width/2,y:F-v/2},{x:I+p.width/2,y:F-v/2+p.height+y},{x:I+l/2,y:F-v/2+p.height+y},{x:I+l/2,y:F+v/2},{x:I-l/2,y:F+v/2},{x:I-l/2,y:F-v/2+p.height+y},{x:I-p.width/2,y:F-v/2+p.height+y}]:[{x:I-l/2,y:F-v/2},{x:I+l/2,y:F-v/2},{x:I+l/2,y:F-v/2+c},{x:I+p.width/2,y:F-v/2+c},{x:I+p.width/2/2,y:F+v/2},{x:I-p.width/2,y:F+v/2},{x:I-p.width/2,y:F-v/2+c},{x:I-l/2,y:F-v/2+c}],j.polygon(t,M,P)},d}async function rd(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),h=[{x:0,y:0},{x:s,y:0},{x:s+3*n/6,y:-n},{x:-3*n/6,y:-n}];let l;const{cssStyles:c}=t;if(t.look==="handDrawn"){const d=H(a),p=U(t,{}),g=st(h),f=d.path(g,p);l=a.insert(()=>f,":first-child").attr("transform",`translate(${-s/2}, ${n/2})`),c&&l.attr("style",c)}else l=ue(a,s,n,h);return i&&l.attr("style",i),t.width=s,t.height=n,V(t,l),t.intersect=function(d){return j.polygon(t,h,d)},a}async function Qr(e,t,r){const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i;const{shapeSvg:o,bbox:s}=await et(e,t,K(t)),n=Math.max(s.width+2*r.labelPaddingX,(t==null?void 0:t.width)||0),h=Math.max(s.height+2*r.labelPaddingY,(t==null?void 0:t.height)||0),l=-n/2,c=-h/2;let d,{rx:p,ry:g}=t;const{cssStyles:f}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,g=r.ry),t.look==="handDrawn"){const m=H(o),x=U(t,{}),y=p||g?m.path(ae(l,c,n,h,p||0),x):m.rectangle(l,c,n,h,x);d=o.insert(()=>y,":first-child"),d.attr("class","basic label-container").attr("style",Pt(f))}else d=o.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",a).attr("rx",Pt(p)).attr("ry",Pt(g)).attr("x",l).attr("y",c).attr("width",n).attr("height",h);return V(t,d),t.intersect=function(m){return j.rect(t,m)},o}async function id(e,t){const{shapeSvg:r,bbox:i,label:a}=await et(e,t,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),V(t,o),t.intersect=function(s){return j.rect(t,s)},r}async function ad(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)??0),h=[{x:0,y:0},{x:s+3*n/6,y:0},{x:s,y:-n},{x:-3*n/6,y:-n}];let l;const{cssStyles:c}=t;if(t.look==="handDrawn"){const d=H(a),p=U(t,{}),g=st(h),f=d.path(g,p);l=a.insert(()=>f,":first-child").attr("transform",`translate(${-s/2}, ${n/2})`),c&&l.attr("style",c)}else l=ue(a,s,n,h);return i&&l.attr("style",i),t.width=s,t.height=n,V(t,l),t.intersect=function(d){return j.polygon(t,h,d)},a}async function od(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)??0),h=[{x:-3*n/6,y:0},{x:s,y:0},{x:s+3*n/6,y:-n},{x:0,y:-n}];let l;const{cssStyles:c}=t;if(t.look==="handDrawn"){const d=H(a),p=U(t,{}),g=st(h),f=d.path(g,p);l=a.insert(()=>f,":first-child").attr("transform",`translate(${-s/2}, ${n/2})`),c&&l.attr("style",c)}else l=ue(a,s,n,h);return i&&l.attr("style",i),t.width=s,t.height=n,V(t,l),t.intersect=function(d){return j.polygon(t,h,d)},a}function nd(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,s=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),h=[{x:s,y:0},{x:0,y:n+3.5},{x:s-14,y:n+3.5},{x:0,y:2*n},{x:s,y:n-3.5},{x:14,y:n-3.5}],l=H(a),c=U(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const d=st(h),p=l.path(d,c),g=a.insert(()=>p,":first-child");return o&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${s/2},${-n})`),V(t,g),t.intersect=function(f){return $.info("lightningBolt intersect",t,f),j.polygon(t,h,f)},a}u(Xc,"hexagon"),u(Zc,"hourglass"),u(Qc,"icon"),u(Kc,"iconCircle"),u(Jc,"iconRounded"),u(td,"iconSquare"),u(ed,"imageSquare"),u(rd,"inv_trapezoid"),u(Qr,"drawRect"),u(id,"labelRect"),u(ad,"lean_left"),u(od,"lean_right"),u(nd,"lightningBolt");var Sf=u((e,t,r,i,a,o,s)=>[`M${e},${t+o}`,`a${a},${o} 0,0,0 ${r},0`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${o} 0,0,0 ${r},0`,"l0,"+-i,`M${e},${t+o+s}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Tf=u((e,t,r,i,a,o,s)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${o} 0,0,0 ${r},0`,"l0,"+-i,`M${e},${t+o+s}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Bf=u((e,t,r,i,a,o)=>[`M${e-r/2},${-i/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function sd(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=Math.max(o.width+(t.padding??0),t.width??0),h=n/2,l=h/(2.5+n/50),c=Math.max(o.height+l+(t.padding??0),t.height??0),d=.1*c;let p;const{cssStyles:g}=t;if(t.look==="handDrawn"){const f=H(a),m=Tf(0,0,n,c,h,l,d),x=Bf(0,l,n,c,h,l),y=U(t,{}),C=f.path(m,y),w=f.path(x,y);a.insert(()=>w,":first-child").attr("class","line"),p=a.insert(()=>C,":first-child"),p.attr("class","basic label-container"),g&&p.attr("style",g)}else{const f=Sf(0,0,n,c,h,l,d);p=a.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",Pt(g)).attr("style",i)}return p.attr("label-offset-y",l),p.attr("transform",`translate(${-n/2}, ${-(c/2+l)})`),V(t,p),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-o.height/2+l-(o.y-(o.top??0))})`),t.intersect=function(f){const m=j.rect(t,f),x=m.x-(t.x??0);if(h!=0&&(Math.abs(x)<(t.width??0)/2||Math.abs(x)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-l)){let y=l*l*(1-x*x/(h*h));y>0&&(y=Math.sqrt(y)),y=l-y,f.y-(t.y??0)>0&&(y=-y),m.y+=y}return m},a}async function ld(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),h=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=h/4,c=h+l,{cssStyles:d}=t,p=H(a),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=[{x:-n/2-n/2*.1,y:-c/2},{x:-n/2-n/2*.1,y:c/2},...Be(-n/2-n/2*.1,c/2,n/2+n/2*.1,c/2,l,.8),{x:n/2+n/2*.1,y:-c/2},{x:-n/2-n/2*.1,y:-c/2},{x:-n/2,y:-c/2},{x:-n/2,y:c/2*1.1},{x:-n/2,y:-c/2}],m=p.polygon(f.map(y=>[y.x,y.y]),g),x=a.insert(()=>m,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(0,${-l/2})`),s.attr("transform",`translate(${-n/2+(t.padding??0)+n/2*.1/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)-l/2-(o.y-(o.top??0))})`),V(t,x),t.intersect=function(y){return j.polygon(t,f,y)},a}async function hd(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),h=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=-n/2,c=-h/2,{cssStyles:d}=t,p=H(a),g=U(t,{}),f=[{x:l-5,y:c+5},{x:l-5,y:c+h+5},{x:l+n-5,y:c+h+5},{x:l+n-5,y:c+h},{x:l+n,y:c+h},{x:l+n,y:c+h-5},{x:l+n+5,y:c+h-5},{x:l+n+5,y:c-5},{x:l+5,y:c-5},{x:l+5,y:c},{x:l,y:c},{x:l,y:c+5}],m=[{x:l,y:c+5},{x:l+n-5,y:c+5},{x:l+n-5,y:c+h},{x:l+n,y:c+h},{x:l+n,y:c},{x:l,y:c}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=st(f),y=p.path(x,g),C=st(m),w=p.path(C,{...g,fill:"none"}),L=a.insert(()=>w,":first-child");return L.insert(()=>y,":first-child"),L.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),s.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-(o.y-(o.top??0))})`),V(t,L),t.intersect=function(B){return j.polygon(t,f,B)},a}async function cd(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),h=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=h/4,c=h+l,d=-n/2,p=-c/2,{cssStyles:g}=t,f=Be(d-5,p+c+5,d+n-5,p+c+5,l,.8),m=f==null?void 0:f[f.length-1],x=[{x:d-5,y:p+5},{x:d-5,y:p+c+5},...f,{x:d+n-5,y:m.y-5},{x:d+n,y:m.y-5},{x:d+n,y:m.y-10},{x:d+n+5,y:m.y-10},{x:d+n+5,y:p-5},{x:d+5,y:p-5},{x:d+5,y:p},{x:d,y:p},{x:d,y:p+5}],y=[{x:d,y:p+5},{x:d+n-5,y:p+5},{x:d+n-5,y:m.y-5},{x:d+n,y:m.y-5},{x:d+n,y:p},{x:d,y:p}],C=H(a),w=U(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const L=st(x),B=C.path(L,w),b=st(y),S=C.path(b,w),D=a.insert(()=>B,":first-child");return D.insert(()=>S),D.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(0,${-l/2})`),s.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-l/2-(o.y-(o.top??0))})`),V(t,D),t.intersect=function(z){return j.polygon(t,x,z)},a}async function dd(e,t,{config:{themeVariables:r}}){var x;const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i,t.useHtmlLabels||((x=At().flowchart)==null?void 0:x.htmlLabels)!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:s}=await et(e,t,K(t)),n=Math.max(s.width+2*(t.padding??0),(t==null?void 0:t.width)??0),h=Math.max(s.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=-n/2,c=-h/2,{cssStyles:d}=t,p=H(o),g=U(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=p.rectangle(l,c,n,h,g),m=o.insert(()=>f,":first-child");return m.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",d),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),V(t,m),t.intersect=function(y){return j.rect(t,y)},o}u(sd,"linedCylinder"),u(ld,"linedWaveEdgedRect"),u(hd,"multiRect"),u(cd,"multiWaveEdgedRectangle"),u(dd,"note");var vf=u((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function ud(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=o.width+t.padding+(o.height+t.padding),n=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];let h;const{cssStyles:l}=t;if(t.look==="handDrawn"){const c=H(a),d=U(t,{}),p=vf(0,0,s),g=c.path(p,d);h=a.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${s/2})`),l&&h.attr("style",l)}else h=ue(a,s,s,n);return i&&h.attr("style",i),V(t,h),t.intersect=function(c){return $.debug(`APA12 Intersect called SPLIT
126
- point:`,c,`
127
- node:
128
- `,t,`
129
- res:`,j.polygon(t,n,c)),j.polygon(t,n,c)},a}async function pd(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=-Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)??0)/2,h=-Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)??0)/2,l=h/2,c=[{x:n+l,y:h},{x:n,y:0},{x:n+l,y:-h},{x:-n,y:-h},{x:-n,y:h}],{cssStyles:d}=t,p=H(a),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=st(c),m=p.path(f,g),x=a.insert(()=>m,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(${-l/2},0)`),s.attr("transform",`translate(${-l/2-o.width/2-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),V(t,x),t.intersect=function(y){return j.polygon(t,c,y)},a}async function gd(e,t){var D,z;const{labelStyles:r,nodeStyles:i}=G(t);let a;t.labelStyle=r,a=t.cssClasses?"node "+t.cssClasses:"node default";const o=e.insert("g").attr("class",a).attr("id",t.domId||t.id),s=o.insert("g"),n=o.insert("g").attr("class","label").attr("style",i),h=t.description,l=t.label,c=n.node().appendChild(await ve(l,t.labelStyle,!0,!0));let d={width:0,height:0};if(bt((z=(D=ct())==null?void 0:D.flowchart)==null?void 0:z.htmlLabels)){const P=c.children[0],I=lt(c);d=P.getBoundingClientRect(),I.attr("width",d.width),I.attr("height",d.height)}$.info("Text 2",h);const p=h||[],g=c.getBBox(),f=n.node().appendChild(await ve(p.join?p.join("<br/>"):p,t.labelStyle,!0,!0)),m=f.children[0],x=lt(f);d=m.getBoundingClientRect(),x.attr("width",d.width),x.attr("height",d.height);const y=(t.padding||0)/2;lt(f).attr("transform","translate( "+(d.width>g.width?0:(g.width-d.width)/2)+", "+(g.height+y+5)+")"),lt(c).attr("transform","translate( "+(d.width<g.width?0:-(g.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-y+3)+")");const C=d.width+(t.padding||0),w=d.height+(t.padding||0),L=-d.width/2-y,B=-d.height/2-y;let b,S;if(t.look==="handDrawn"){const P=H(o),I=U(t,{}),F=P.path(ae(L,B,C,w,t.rx||0),I),v=P.line(-d.width/2-y,-d.height/2-y+g.height+y,d.width/2+y,-d.height/2-y+g.height+y,I);S=o.insert(()=>($.debug("Rough node insert CXC",F),v),":first-child"),b=o.insert(()=>($.debug("Rough node insert CXC",F),F),":first-child")}else b=s.insert("rect",":first-child"),S=s.insert("line"),b.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-y).attr("y",-d.height/2-y).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),S.attr("class","divider").attr("x1",-d.width/2-y).attr("x2",d.width/2+y).attr("y1",-d.height/2-y+g.height+y).attr("y2",-d.height/2-y+g.height+y);return V(t,b),t.intersect=function(P){return j.rect(t,P)},o}async function fd(e,t){return Qr(e,t,{rx:5,ry:5,labelPaddingX:1*((t==null?void 0:t.padding)||0),labelPaddingY:1*((t==null?void 0:t.padding)||0)})}async function md(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=(t==null?void 0:t.padding)??0,h=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),l=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=-o.width/2-n,d=-o.height/2-n,{cssStyles:p}=t,g=H(a),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:c,y:d},{x:c+h+8,y:d},{x:c+h+8,y:d+l},{x:c-8,y:d+l},{x:c-8,y:d},{x:c,y:d},{x:c,y:d+l}],x=g.polygon(m.map(C=>[C.x,C.y]),f),y=a.insert(()=>x,":first-child");return y.attr("class","basic label-container").attr("style",Pt(p)),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),p&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),s.attr("transform",`translate(${-h/2+4+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-(o.y-(o.top??0))})`),V(t,y),t.intersect=function(C){return j.rect(t,C)},a}async function yd(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),h=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=-n/2,c=-h/2,{cssStyles:d}=t,p=H(a),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=[{x:l,y:c},{x:l,y:c+h},{x:l+n,y:c+h},{x:l+n,y:c-h/2}],m=st(f),x=p.path(m,g),y=a.insert(()=>x,":first-child");return y.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),y.attr("transform",`translate(0, ${h/4})`),s.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))}, ${-h/4+(t.padding??0)-(o.y-(o.top??0))})`),V(t,y),t.intersect=function(C){return j.polygon(t,f,C)},a}async function xd(e,t){return Qr(e,t,{rx:0,ry:0,labelPaddingX:2*((t==null?void 0:t.padding)||0),labelPaddingY:1*((t==null?void 0:t.padding)||0)})}async function bd(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=o.height+t.padding,n=o.width+s/4+t.padding;let h;const{cssStyles:l}=t;if(t.look==="handDrawn"){const c=H(a),d=U(t,{}),p=ae(-n/2,-s/2,n,s,s/2),g=c.path(p,d);h=a.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",Pt(l))}else h=a.insert("rect",":first-child"),h.attr("class","basic label-container").attr("style",i).attr("rx",s/2).attr("ry",s/2).attr("x",-n/2).attr("y",-s/2).attr("width",n).attr("height",s);return V(t,h),t.intersect=function(c){return j.rect(t,c)},a}async function Cd(e,t){return Qr(e,t,{rx:5,ry:5})}function kd(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:s,stateBorder:n,nodeBorder:h}=r,l=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),c=H(l),d=U(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=c.circle(0,0,14,{...d,stroke:s,strokeWidth:2}),g=n??h,f=c.circle(0,0,5,{...d,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),m=l.insert(()=>p,":first-child");return m.insert(()=>f),o&&m.selectAll("path").attr("style",o),a&&m.selectAll("path").attr("style",a),V(t,m),t.intersect=function(x){return j.circle(t,7,x)},l}function wd(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const s=H(a).circle(0,0,14,xc(i));o=a.insert(()=>s),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return V(t,o),t.intersect=function(s){return j.circle(t,7,s)},a}async function Sd(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=((t==null?void 0:t.padding)||0)/2,n=o.width+t.padding,h=o.height+t.padding,l=-o.width/2-s,c=-o.height/2-s,d=[{x:0,y:0},{x:n,y:0},{x:n,y:-h},{x:0,y:-h},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-h},{x:-8,y:-h},{x:-8,y:0}];if(t.look==="handDrawn"){const p=H(a),g=U(t,{}),f=p.rectangle(l-8,c,n+16,h,g),m=p.line(l,c,l,c+h,g),x=p.line(l+n,c,l+n,c+h,g);a.insert(()=>m,":first-child"),a.insert(()=>x,":first-child");const y=a.insert(()=>f,":first-child"),{cssStyles:C}=t;y.attr("class","basic label-container").attr("style",Pt(C)),V(t,y)}else{const p=ue(a,n,h,d);i&&p.attr("style",i),V(t,p)}return t.intersect=function(p){return j.polygon(t,d,p)},a}async function Td(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),h=-s/2,l=-n/2,c=.2*n,d=.2*n,{cssStyles:p}=t,g=H(a),f=U(t,{}),m=[{x:h-c/2,y:l},{x:h+s+c/2,y:l},{x:h+s+c/2,y:l+n},{x:h-c/2,y:l+n}],x=[{x:h+s-c/2,y:l+n},{x:h+s+c/2,y:l+n},{x:h+s+c/2,y:l+n-d}];t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=st(m),C=g.path(y,f),w=st(x),L=g.path(w,{...f,fillStyle:"solid"}),B=a.insert(()=>L,":first-child");return B.insert(()=>C,":first-child"),B.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),V(t,B),t.intersect=function(b){return j.polygon(t,m,b)},a}async function Bd(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),h=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=h/4,c=.2*n,d=.2*h,p=h+l,{cssStyles:g}=t,f=H(a),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=[{x:-n/2-n/2*.1,y:p/2},...Be(-n/2-n/2*.1,p/2,n/2+n/2*.1,p/2,l,.8),{x:n/2+n/2*.1,y:-p/2},{x:-n/2-n/2*.1,y:-p/2}],y=-n/2+n/2*.1,C=-p/2-.4*d,w=[{x:y+n-c,y:1.4*(C+h)},{x:y+n,y:C+h-d},{x:y+n,y:.9*(C+h)},...Be(y+n,1.3*(C+h),y+n-c,1.5*(C+h),.03*-h,.5)],L=st(x),B=f.path(L,m),b=st(w),S=f.path(b,{...m,fillStyle:"solid"}),D=a.insert(()=>S,":first-child");return D.insert(()=>B,":first-child"),D.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(0,${-l/2})`),s.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-h/2+(t.padding??0)-l/2-(o.y-(o.top??0))})`),V(t,D),t.intersect=function(z){return j.polygon(t,x,z)},a}async function vd(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=Math.max(o.width+t.padding,(t==null?void 0:t.width)||0),n=Math.max(o.height+t.padding,(t==null?void 0:t.height)||0),h=-s/2,l=-n/2,c=a.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",h).attr("y",l).attr("width",s).attr("height",n),V(t,c),t.intersect=function(d){return j.rect(t,d)},a}u(ud,"question"),u(pd,"rect_left_inv_arrow"),u(gd,"rectWithTitle"),u(fd,"roundedRect"),u(md,"shadedProcess"),u(yd,"slopedRect"),u(xd,"squareRect"),u(bd,"stadium"),u(Cd,"state"),u(kd,"stateEnd"),u(wd,"stateStart"),u(Sd,"subroutine"),u(Td,"taggedRect"),u(Bd,"taggedWaveEdgedRectangle"),u(vd,"text");var Mf=u((e,t,r,i,a,o)=>`M${e},${t}
130
- a${a},${o} 0,0,1 0,${-i}
131
- l${r},0
132
- a${a},${o} 0,0,1 0,${i}
133
- M${r},${-i}
134
- a${a},${o} 0,0,0 0,${i}
135
- l${-r},0`,"createCylinderPathD"),Lf=u((e,t,r,i,a,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${a},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),_f=u((e,t,r,i,a,o)=>[`M${e+r/2},${-i/2}`,`a${a},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Md(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s,halfPadding:n}=await et(e,t,K(t)),h=t.look==="neo"?2*n:n,l=o.height+h,c=l/2,d=c/(2.5+l/50),p=o.width+d+h,{cssStyles:g}=t;let f;if(t.look==="handDrawn"){const m=H(a),x=Lf(0,0,p,l,d,c),y=_f(0,0,p,l,d,c),C=m.path(x,U(t,{})),w=m.path(y,U(t,{fill:"none"}));f=a.insert(()=>w,":first-child"),f=a.insert(()=>C,":first-child"),f.attr("class","basic label-container"),g&&f.attr("style",g)}else{const m=Mf(0,0,p,l,d,c);f=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Pt(g)).attr("style",i),f.attr("class","basic label-container"),g&&f.selectAll("path").attr("style",g),i&&f.selectAll("path").attr("style",i)}return f.attr("label-offset-x",d),f.attr("transform",`translate(${-p/2}, ${l/2} )`),s.attr("transform",`translate(${-o.width/2-d-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),V(t,f),t.intersect=function(m){const x=j.rect(t,m),y=x.y-(t.y??0);if(c!=0&&(Math.abs(y)<(t.height??0)/2||Math.abs(y)==(t.height??0)/2&&Math.abs(x.x-(t.x??0))>(t.width??0)/2-d)){let C=d*d*(1-y*y/(c*c));C!=0&&(C=Math.sqrt(Math.abs(C))),C=d-C,m.x-(t.x??0)>0&&(C=-C),x.x+=C}return x},a}async function Ld(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=o.width+t.padding,n=o.height+t.padding,h=[{x:-3*n/6,y:0},{x:s+3*n/6,y:0},{x:s,y:-n},{x:0,y:-n}];let l;const{cssStyles:c}=t;if(t.look==="handDrawn"){const d=H(a),p=U(t,{}),g=st(h),f=d.path(g,p);l=a.insert(()=>f,":first-child").attr("transform",`translate(${-s/2}, ${n/2})`),c&&l.attr("style",c)}else l=ue(a,s,n,h);return i&&l.attr("style",i),t.width=s,t.height=n,V(t,l),t.intersect=function(d){return j.polygon(t,h,d)},a}async function _d(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=Math.max(60,o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(20,o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),{cssStyles:h}=t,l=H(a),c=U(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const d=[{x:-s/2*.8,y:-n/2},{x:s/2*.8,y:-n/2},{x:s/2,y:-n/2*.6},{x:s/2,y:n/2},{x:-s/2,y:n/2},{x:-s/2,y:-n/2*.6}],p=st(d),g=l.path(p,c),f=a.insert(()=>g,":first-child");return f.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),V(t,f),t.intersect=function(m){return j.polygon(t,d,m)},a}async function Fd(e,t){var C;const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=bt((C=ct().flowchart)==null?void 0:C.htmlLabels),h=o.width+(t.padding??0),l=h+o.height,c=h+o.height,d=[{x:0,y:0},{x:c,y:0},{x:c/2,y:-l}],{cssStyles:p}=t,g=H(a),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=st(d),x=g.path(m,f),y=a.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return p&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=h,t.height=l,V(t,y),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${l/2-(o.height+(t.padding??0)/(n?2:1)-(o.y-(o.top??0)))})`),t.intersect=function(w){return $.info("Triangle intersect",t,d,w),j.polygon(t,d,w)},a}async function Ad(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),h=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=h/8,c=h+l,{cssStyles:d}=t,p=70-n,g=p>0?p/2:0,f=H(a),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=[{x:-n/2-g,y:c/2},...Be(-n/2-g,c/2,n/2+g,c/2,l,.8),{x:n/2+g,y:-c/2},{x:-n/2-g,y:-c/2}],y=st(x),C=f.path(y,m),w=a.insert(()=>C,":first-child");return w.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(0,${-l/2})`),s.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-h/2+(t.padding??0)-l-(o.y-(o.top??0))})`),V(t,w),t.intersect=function(L){return j.polygon(t,x,L)},a}async function Ed(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),h=s/n;let l=s,c=n;l>c*h?c=l/h:l=c*h,l=Math.max(l,100),c=Math.max(c,50);const d=Math.min(.2*c,c/4),p=c+2*d,{cssStyles:g}=t,f=H(a),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=[{x:-l/2,y:p/2},...Be(-l/2,p/2,l/2,p/2,d,1),{x:l/2,y:-p/2},...Be(l/2,-p/2,-l/2,-p/2,d,-1)],y=st(x),C=f.path(y,m),w=a.insert(()=>C,":first-child");return w.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),V(t,w),t.intersect=function(L){return j.polygon(t,x,L)},a}async function $d(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),h=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=-n/2,c=-h/2,{cssStyles:d}=t,p=H(a),g=U(t,{}),f=[{x:l-5,y:c-5},{x:l-5,y:c+h},{x:l+n,y:c+h},{x:l+n,y:c-5}],m=`M${l-5},${c-5} L${l+n},${c-5} L${l+n},${c+h} L${l-5},${c+h} L${l-5},${c-5}
136
- M${l-5},${c} L${l+n},${c}
137
- M${l},${c-5} L${l},${c+h}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=p.path(m,g),y=a.insert(()=>x,":first-child");return y.attr("transform","translate(2.5, 2.5)"),y.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),s.attr("transform",`translate(${-o.width/2+2.5-(o.x-(o.left??0))}, ${-o.height/2+2.5-(o.y-(o.top??0))})`),V(t,y),t.intersect=function(C){return j.polygon(t,f,C)},a}async function qo(e,t){var Q,rt,ut;const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:W}=At(),{background:pt}=W,ot={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${pt}`]};await qo(e,ot)}const i=At();t.useHtmlLabels=i.htmlLabels;let a=((Q=i.er)==null?void 0:Q.diagramPadding)??10,o=((rt=i.er)==null?void 0:rt.entityPadding)??6;const{cssStyles:s}=t,{labelStyles:n}=G(t);if(r.attributes.length===0&&t.label){const W={rx:0,ry:0,labelPaddingX:a,labelPaddingY:1.5*a};Jt(t.label,i)+2*W.labelPaddingX<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const pt=await Qr(e,t,W);if(!bt(i.htmlLabels)){const ot=pt.select("text"),mt=(ut=ot.node())==null?void 0:ut.getBBox();ot.attr("transform",`translate(${-mt.width/2}, 0)`)}return pt}i.htmlLabels||(a*=1.25,o*=1.25);let h=K(t);h||(h="node default");const l=e.insert("g").attr("class",h).attr("id",t.domId||t.id),c=await nr(l,t.label??"",i,0,0,["name"],n);c.height+=o;let d=0;const p=[];let g=0,f=0,m=0,x=0,y=!0,C=!0;for(const W of r.attributes){const pt=await nr(l,W.type,i,0,d,["attribute-type"],n);g=Math.max(g,pt.width+a);const ot=await nr(l,W.name,i,0,d,["attribute-name"],n);f=Math.max(f,ot.width+a);const mt=await nr(l,W.keys.join(),i,0,d,["attribute-keys"],n);m=Math.max(m,mt.width+a);const ht=await nr(l,W.comment,i,0,d,["attribute-comment"],n);x=Math.max(x,ht.width+a),d+=Math.max(pt.height,ot.height,mt.height,ht.height)+o,p.push(d)}p.pop();let w=4;m<=a&&(y=!1,m=0,w--),x<=a&&(C=!1,x=0,w--);const L=l.node().getBBox();if(c.width+2*a-(g+f+m+x)>0){const W=c.width+2*a-(g+f+m+x);g+=W/w,f+=W/w,m>0&&(m+=W/w),x>0&&(x+=W/w)}const B=g+f+m+x,b=H(l),S=U(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const D=Math.max(L.width+2*a,(t==null?void 0:t.width)||0,B),z=Math.max(L.height+(p[0]||d)+o,(t==null?void 0:t.height)||0),P=-D/2,I=-z/2;l.selectAll("g:not(:first-child)").each((W,pt,ot)=>{const mt=lt(ot[pt]),ht=mt.attr("transform");let St=0,xt=0;if(ht){const zt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ht);zt&&(St=parseFloat(zt[1]),xt=parseFloat(zt[2]),mt.attr("class").includes("attribute-name")?St+=g:mt.attr("class").includes("attribute-keys")?St+=g+f:mt.attr("class").includes("attribute-comment")&&(St+=g+f+m))}mt.attr("transform",`translate(${P+a/2+St}, ${xt+I+c.height+o/2})`)}),l.select(".name").attr("transform","translate("+-c.width/2+", "+(I+o/2)+")");const F=b.rectangle(P,I,D,z,S),v=l.insert(()=>F,":first-child").attr("style",s.join("")),{themeVariables:M}=At(),{rowEven:A,rowOdd:_,nodeBorder:O}=M;p.push(0);for(const[W,pt]of p.entries()){if(W===0&&p.length>1)continue;const ot=W%2==0&&pt!==0,mt=b.rectangle(P,c.height+I+pt,D,c.height,{...S,fill:ot?A:_,stroke:O});l.insert(()=>mt,"g.label").attr("style",s.join("")).attr("class","row-rect-"+(W%2==0?"even":"odd"))}let E=b.line(P,c.height+I,D+P,c.height+I,S);l.insert(()=>E).attr("class","divider"),E=b.line(g+P,c.height+I,g+P,z+I,S),l.insert(()=>E).attr("class","divider"),y&&(E=b.line(g+f+P,c.height+I,g+f+P,z+I,S),l.insert(()=>E).attr("class","divider")),C&&(E=b.line(g+f+m+P,c.height+I,g+f+m+P,z+I,S),l.insert(()=>E).attr("class","divider"));for(const W of p)E=b.line(P,c.height+I+W,D+P,c.height+I+W,S),l.insert(()=>E).attr("class","divider");return V(t,v),t.intersect=function(W){return j.rect(t,W)},l}async function nr(e,t,r,i=0,a=0,o=[],s=""){const n=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",s);t!==ca(t)&&(t=(t=ca(t)).replaceAll("<","&lt;").replaceAll(">","&gt;"));const h=n.node().appendChild(await he(n,t,{width:Jt(t,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let c=h.children[0];for(c.textContent=c.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");c.childNodes[0];)c=c.childNodes[0],c.textContent=c.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let l=h.getBBox();if(bt(r.htmlLabels)){const c=h.children[0];c.style.textAlign="start";const d=lt(h);l=c.getBoundingClientRect(),d.attr("width",l.width),d.attr("height",l.height)}return l}async function Od(e,t,r,i,a=r.class.padding??12){const o=i?0:3,s=e.insert("g").attr("class",K(t)).attr("id",t.domId||t.id);let n=null,h=null,l=null,c=null,d=0,p=0,g=0;if(n=s.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const C=t.annotations[0];await Kr(n,{text:`\xAB${C}\xBB`},0),d=n.node().getBBox().height}h=s.insert("g").attr("class","label-group text"),await Kr(h,t,0,["font-weight: bolder"]);const f=h.node().getBBox();p=f.height,l=s.insert("g").attr("class","members-group text");let m=0;for(const C of t.members)m+=await Kr(l,C,m,[C.parseClassifier()])+o;g=l.node().getBBox().height,g<=0&&(g=a/2),c=s.insert("g").attr("class","methods-group text");let x=0;for(const C of t.methods)x+=await Kr(c,C,x,[C.parseClassifier()])+o;let y=s.node().getBBox();if(n!==null){const C=n.node().getBBox();n.attr("transform",`translate(${-C.width/2})`)}return h.attr("transform",`translate(${-f.width/2}, ${d})`),y=s.node().getBBox(),l.attr("transform",`translate(0, ${d+p+2*a})`),y=s.node().getBBox(),c.attr("transform",`translate(0, ${d+p+(g?g+4*a:2*a)})`),y=s.node().getBBox(),{shapeSvg:s,bbox:y}}async function Kr(e,t,r,i=[]){const a=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=At();let s="useHtmlLabels"in t?t.useHtmlLabels:bt(o.htmlLabels)??!0,n="";n="text"in t?t.text:t.label,!s&&n.startsWith("\\")&&(n=n.substring(1)),Le(n)&&(s=!0);const h=await he(a,bi(be(n)),{width:Jt(n,o)+50,classes:"markdown-node-label",useHtmlLabels:s},o);let l,c=1;if(s){const d=h.children[0],p=lt(h);c=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(c+=d.innerHTML.split("<mrow>").length-1);const g=d.getElementsByTagName("img");if(g){const f=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...g].map(m=>new Promise(x=>{function y(){var C;if(m.style.display="flex",m.style.flexDirection="column",f){const w=((C=o.fontSize)==null?void 0:C.toString())??window.getComputedStyle(document.body).fontSize,L=5,B=parseInt(w,10)*L+"px";m.style.minWidth=B,m.style.maxWidth=B}else m.style.width="100%";x(m)}u(y,"setupImage"),setTimeout(()=>{m.complete&&y()}),m.addEventListener("error",y),m.addEventListener("load",y)})))}l=d.getBoundingClientRect(),p.attr("width",l.width),p.attr("height",l.height)}else{i.includes("font-weight: bolder")&&lt(h).selectAll("tspan").attr("font-weight",""),c=h.children.length;const d=h.children[0];(h.textContent===""||h.textContent.includes("&gt"))&&(d.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),l=h.getBBox()}return a.attr("transform","translate(0,"+(-l.height/(2*c)+r)+")"),l.height}async function Dd(e,t){var z,P;const r=ct(),i=r.class.padding??12,a=i,o=t.useHtmlLabels??bt(r.htmlLabels)??!0,s=t;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];const{shapeSvg:n,bbox:h}=await Od(e,t,r,o,a),{labelStyles:l,nodeStyles:c}=G(t);t.labelStyle=l,t.cssStyles=s.styles||"";const d=((z=s.styles)==null?void 0:z.join(";"))||c||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const p=s.members.length===0&&s.methods.length===0&&!((P=r.class)!=null&&P.hideEmptyMembersBox),g=H(n),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=h.width;let x=h.height;s.members.length===0&&s.methods.length===0?x+=a:s.members.length>0&&s.methods.length===0&&(x+=2*a);const y=-m/2,C=-x/2,w=g.rectangle(y-i,C-i-(p?i:s.members.length===0&&s.methods.length===0?-i/2:0),m+2*i,x+2*i+(p?2*i:s.members.length===0&&s.methods.length===0?-i:0),f),L=n.insert(()=>w,":first-child");L.attr("class","basic label-container");const B=L.node().getBBox();n.selectAll(".text").each((I,F,v)=>{var Q;const M=lt(v[F]),A=M.attr("transform");let _=0;if(A){const rt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(A);rt&&(_=parseFloat(rt[2]))}let O=_+C+i-(p?i:s.members.length===0&&s.methods.length===0?-i/2:0);o||(O-=4);let E=y;(M.attr("class").includes("label-group")||M.attr("class").includes("annotation-group"))&&(E=-((Q=M.node())==null?void 0:Q.getBBox().width)/2||0,n.selectAll("text").each(function(rt,ut,W){window.getComputedStyle(W[ut]).textAnchor==="middle"&&(E=0)})),M.attr("transform",`translate(${E}, ${O})`)});const b=n.select(".annotation-group").node().getBBox().height-(p?i/2:0)||0,S=n.select(".label-group").node().getBBox().height-(p?i/2:0)||0,D=n.select(".members-group").node().getBBox().height-(p?i/2:0)||0;if(s.members.length>0||s.methods.length>0||p){const I=g.line(B.x,b+S+C+i,B.x+B.width,b+S+C+i,f);n.insert(()=>I).attr("class","divider").attr("style",d)}if(p||s.members.length>0||s.methods.length>0){const I=g.line(B.x,b+S+D+C+2*a+i,B.x+B.width,b+S+D+C+i+2*a,f);n.insert(()=>I).attr("class","divider").attr("style",d)}if(s.look!=="handDrawn"&&n.selectAll("path").attr("style",d),L.select(":nth-child(2)").attr("style",d),n.selectAll(".divider").select("path").attr("style",d),t.labelStyle?n.selectAll("span").attr("style",t.labelStyle):n.selectAll("span").attr("style",d),!o){const I=RegExp(/color\s*:\s*([^;]*)/),F=I.exec(d);if(F){const v=F[0].replace("color","fill");n.selectAll("tspan").attr("style",v)}else if(l){const v=I.exec(l);if(v){const M=v[0].replace("color","fill");n.selectAll("tspan").attr("style",M)}}}return V(t,L),t.intersect=function(I){return j.rect(t,I)},n}async function Id(e,t){var L,B;const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t,o=t,s="verifyMethod"in t,n=K(t),h=e.insert("g").attr("class",n).attr("id",t.domId??t.id);let l;l=s?await oe(h,`&lt;&lt;${a.type}&gt;&gt;`,0,t.labelStyle):await oe(h,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let c=l;const d=await oe(h,a.name,c,t.labelStyle+"; font-weight: bold;");c+=d+20,s?(c+=await oe(h,a.requirementId?`Id: ${a.requirementId}`:"",c,t.labelStyle),c+=await oe(h,a.text?`Text: ${a.text}`:"",c,t.labelStyle),c+=await oe(h,a.risk?`Risk: ${a.risk}`:"",c,t.labelStyle),await oe(h,a.verifyMethod?`Verification: ${a.verifyMethod}`:"",c,t.labelStyle)):(c+=await oe(h,o.type?`Type: ${o.type}`:"",c,t.labelStyle),await oe(h,o.docRef?`Doc Ref: ${o.docRef}`:"",c,t.labelStyle));const p=(((L=h.node())==null?void 0:L.getBBox().width)??200)+20,g=(((B=h.node())==null?void 0:B.getBBox().height)??200)+20,f=-p/2,m=-g/2,x=H(h),y=U(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=x.rectangle(f,m,p,g,y),w=h.insert(()=>C,":first-child");if(w.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((b,S,D)=>{const z=lt(D[S]),P=z.attr("transform");let I=0,F=0;if(P){const A=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(P);A&&(I=parseFloat(A[1]),F=parseFloat(A[2]))}const v=F-g/2;let M=f+10;S!==0&&S!==1||(M=I),z.attr("transform",`translate(${M}, ${v+20})`)}),c>l+d+20){const b=x.line(f,m+l+d+20,f+p,m+l+d+20,y);h.insert(()=>b).attr("style",i)}return V(t,w),t.intersect=function(b){return j.rect(t,b)},h}async function oe(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),o=ct(),s=o.htmlLabels??!0,n=await he(a,bi(be(t)),{width:Jt(t,o)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},o);let h;if(s){const l=n.children[0],c=lt(n);h=l.getBoundingClientRect(),c.attr("width",h.width),c.attr("height",h.height)}else{const l=n.children[0];for(const c of l.children)c.textContent=c.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),i&&c.setAttribute("style",i);h=n.getBBox(),h.height+=6}return a.attr("transform",`translate(${-h.width/2},${-h.height/2+r})`),h.height}u(Md,"tiltedCylinder"),u(Ld,"trapezoid"),u(_d,"trapezoidalPentagon"),u(Fd,"triangle"),u(Ad,"waveEdgedRectangle"),u(Ed,"waveRectangle"),u($d,"windowPane"),u(qo,"erBox"),u(nr,"addText"),u(Od,"textHelper"),u(Kr,"addText"),u(Dd,"classBox"),u(Id,"requirementBox"),u(oe,"addText");var Ff=u(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Pd(e,t,{config:r}){var P,I;const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i||"";const o=t.width;t.width=(t.width??200)-10;const{shapeSvg:s,bbox:n,label:h}=await et(e,t,K(t)),l=t.padding||10;let c,d="";"ticket"in t&&t.ticket&&((P=r==null?void 0:r.kanban)!=null&&P.ticketBaseUrl)&&(d=(I=r==null?void 0:r.kanban)==null?void 0:I.ticketBaseUrl.replace("#TICKET#",t.ticket),c=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const p={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,f;({label:g,bbox:f}=c?await ji(c,"ticket"in t&&t.ticket||"",p):await ji(s,"ticket"in t&&t.ticket||"",p));const{label:m,bbox:x}=await ji(s,"assigned"in t&&t.assigned||"",p);t.width=o;const y=(t==null?void 0:t.width)||0,C=Math.max(f.height,x.height)/2,w=Math.max(n.height+20,(t==null?void 0:t.height)||0)+C,L=-y/2,B=-w/2;let b;h.attr("transform","translate("+(l-y/2)+", "+(-C-n.height/2)+")"),g.attr("transform","translate("+(l-y/2)+", "+(-C+n.height/2)+")"),m.attr("transform","translate("+(l+y/2-x.width-20)+", "+(-C+n.height/2)+")");const{rx:S,ry:D}=t,{cssStyles:z}=t;if(t.look==="handDrawn"){const F=H(s),v=U(t,{}),M=S||D?F.path(ae(L,B,y,w,S||0),v):F.rectangle(L,B,y,w,v);b=s.insert(()=>M,":first-child"),b.attr("class","basic label-container").attr("style",z||null)}else{b=s.insert("rect",":first-child"),b.attr("class","basic label-container __APA__").attr("style",a).attr("rx",S??5).attr("ry",D??5).attr("x",L).attr("y",B).attr("width",y).attr("height",w);const F="priority"in t&&t.priority;if(F){const v=s.append("line"),M=L+2,A=B+Math.floor((S??0)/2),_=B+w-Math.floor((S??0)/2);v.attr("x1",M).attr("y1",A).attr("x2",M).attr("y2",_).attr("stroke-width","4").attr("stroke",Ff(F))}}return V(t,b),t.height=w,t.intersect=function(F){return j.rect(t,F)},s}u(Pd,"kanbanItem");var Af=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:xd},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:fd},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:bd},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Sd},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Wc},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Dc},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:ud},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Xc},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:od},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:ad},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Ld},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:rd},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Hc},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:vd},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:$c},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:md},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:wd},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:kd},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Vc},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Zc},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:zc},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Rc},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:qc},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:nd},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Ad},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Gc},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Md},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:sd},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Nc},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:jc},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Fd},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:$d},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Yc},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:_d},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Uc},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:yd},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:cd},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:hd},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Ec},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Pc},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Bd},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Td},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Ed},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:pd},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:ld}],Ef=u(()=>{const e={state:Cd,choice:Oc,note:dd,rectWithTitle:gd,labelRect:id,iconSquare:td,iconCircle:Kc,icon:Qc,iconRounded:Jc,imageSquare:ed,anchor:Ac,kanbanItem:Pd,classBox:Dd,erBox:qo,requirementBox:Id},t=[...Object.entries(e),...Af.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),zd=Ef();jn=function(e){return e in zd},u(jn,"isValidShape");var Hi=new Map;sa=async function(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?zd[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let s;r.config.securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s??null),a=await o(i,t,r)}else a=await o(e,t,r),i=a;return t.tooltip&&a.attr("title",t.tooltip),Hi.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i},u(sa,"insertNode");let Rd,qd,No,Jr,vt,sr;Dp=u((e,t)=>{Hi.set(t.id,e)},"setNodeElem"),Ep=u(()=>{Hi.clear()},"clear"),Ap=u(e=>{const t=Hi.get(e.id);$.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+r-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),r},"positionNode"),Rd=u((e,t,r,i,a,o)=>{t.arrowTypeStart&&No(e,"start",t.arrowTypeStart,r,i,a,o),t.arrowTypeEnd&&No(e,"end",t.arrowTypeEnd,r,i,a,o)},"addEdgeMarkers"),qd={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},No=u((e,t,r,i,a,o,s)=>{var l;const n=qd[r];if(!n)return void $.warn(`Unknown arrow type: ${r}`);const h=`${a}_${o}-${n.type}${t==="start"?"Start":"End"}`;if(s&&s.trim()!==""){const c=`${h}_${s.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(c)){const d=document.getElementById(h);if(d){const p=d.cloneNode(!0);p.id=c,p.querySelectorAll("path, circle, line").forEach(g=>{g.setAttribute("stroke",s),n.fill&&g.setAttribute("fill",s)}),(l=d.parentNode)==null||l.appendChild(p)}}e.attr(`marker-${t}`,`url(${i}#${c})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),Jr=new Map,vt=new Map,$p=u(()=>{Jr.clear(),vt.clear()},"clear"),sr=u(e=>e?e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),En=u(async(e,t)=>{let r=bt(ct().flowchart.htmlLabels);const i=await he(e,t.label,{style:sr(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});$.info("abc82",t,t.labelType);const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label");o.node().appendChild(i);let s,n=i.getBBox();if(r){const h=i.children[0],l=lt(i);n=h.getBoundingClientRect(),l.attr("width",n.width),l.attr("height",n.height)}if(o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),Jr.set(t.id,a),t.width=n.width,t.height=n.height,t.startLabelLeft){const h=await ve(t.startLabelLeft,sr(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),c=l.insert("g").attr("class","inner");s=c.node().appendChild(h);const d=h.getBBox();c.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),vt.get(t.id)||vt.set(t.id,{}),vt.get(t.id).startLeft=l,ti(s,t.startLabelLeft)}if(t.startLabelRight){const h=await ve(t.startLabelRight,sr(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),c=l.insert("g").attr("class","inner");s=l.node().appendChild(h),c.node().appendChild(h);const d=h.getBBox();c.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),vt.get(t.id)||vt.set(t.id,{}),vt.get(t.id).startRight=l,ti(s,t.startLabelRight)}if(t.endLabelLeft){const h=await ve(t.endLabelLeft,sr(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),c=l.insert("g").attr("class","inner");s=c.node().appendChild(h);const d=h.getBBox();c.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.node().appendChild(h),vt.get(t.id)||vt.set(t.id,{}),vt.get(t.id).endLeft=l,ti(s,t.endLabelLeft)}if(t.endLabelRight){const h=await ve(t.endLabelRight,sr(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),c=l.insert("g").attr("class","inner");s=c.node().appendChild(h);const d=h.getBBox();c.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.node().appendChild(h),vt.get(t.id)||vt.set(t.id,{}),vt.get(t.id).endRight=l,ti(s,t.endLabelRight)}return i},"insertEdgeLabel");function ti(e,t){ct().flowchart.htmlLabels&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}u(ti,"setTerminalWidth");let Nd,Wd,Wo;An=u((e,t)=>{$.debug("Moving label abc88 ",e.id,e.label,Jr.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ct(),{subGraphTitleTotalMargin:a}=ni(i);if(e.label){const o=Jr.get(e.id);let s=e.x,n=e.y;if(r){const h=Xt.calcLabelPosition(r);$.debug("Moving label "+e.label+" from (",s,",",n,") to (",h.x,",",h.y,") abc88"),t.updatedPath&&(s=h.x,n=h.y)}o.attr("transform",`translate(${s}, ${n+a/2})`)}if(e.startLabelLeft){const o=vt.get(e.id).startLeft;let s=e.x,n=e.y;if(r){const h=Xt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=h.x,n=h.y}o.attr("transform",`translate(${s}, ${n})`)}if(e.startLabelRight){const o=vt.get(e.id).startRight;let s=e.x,n=e.y;if(r){const h=Xt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=h.x,n=h.y}o.attr("transform",`translate(${s}, ${n})`)}if(e.endLabelLeft){const o=vt.get(e.id).endLeft;let s=e.x,n=e.y;if(r){const h=Xt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=h.x,n=h.y}o.attr("transform",`translate(${s}, ${n})`)}if(e.endLabelRight){const o=vt.get(e.id).endRight;let s=e.x,n=e.y;if(r){const h=Xt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=h.x,n=h.y}o.attr("transform",`translate(${s}, ${n})`)}},"positionEdgeLabel"),Nd=u((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),o=Math.abs(t.y-i),s=e.width/2,n=e.height/2;return a>=s||o>=n},"outsideNode"),Wd=u((e,t,r)=>{$.debug(`intersection calc abc89:
138
- outsidePoint: ${JSON.stringify(t)}
139
- insidePoint : ${JSON.stringify(r)}
140
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,a=e.y,o=Math.abs(i-r.x),s=e.width/2;let n=r.x<t.x?s-o:s+o;const h=e.height/2,l=Math.abs(t.y-r.y),c=Math.abs(t.x-r.x);if(Math.abs(a-t.y)*s>Math.abs(i-t.x)*h){let d=r.y<t.y?t.y-h-a:a-h-t.y;n=c*d/l;const p={x:r.x<t.x?r.x+n:r.x-c+n,y:r.y<t.y?r.y+l-d:r.y-l+d};return n===0&&(p.x=t.x,p.y=t.y),c===0&&(p.x=t.x),l===0&&(p.y=t.y),$.debug(`abc89 top/bottom calc, Q ${l}, q ${d}, R ${c}, r ${n}`,p),p}{n=r.x<t.x?t.x-s-i:i-s-t.x;let d=l*n/c,p=r.x<t.x?r.x+c-n:r.x-c+n,g=r.y<t.y?r.y+d:r.y-d;return $.debug(`sides calc abc89, Q ${l}, q ${d}, R ${c}, r ${n}`,{_x:p,_y:g}),n===0&&(p=t.x,g=t.y),c===0&&(p=t.x),l===0&&(g=t.y),{x:p,y:g}}},"intersection"),Wo=u((e,t)=>{$.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(o=>{if($.info("abc88 checking point",o,t),Nd(t,o)||a)$.warn("abc88 outside",o,i),i=o,a||r.push(o);else{const s=Wd(t,i,o);$.debug("abc88 inside",o,i,s),$.debug("abc88 intersection",s,t);let n=!1;r.forEach(h=>{n=n||h.x===s.x&&h.y===s.y}),r.some(h=>h.x===s.x&&h.y===s.y)?$.warn("abc88 no intersect",s,r):r.push(s),a=!0}}),$.debug("returning points",r),r},"cutPathAtIntersect");function jd(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],o=e[i],s=e[i+1];(a.x===o.x&&o.y===s.y&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-a.y)>5||a.y===o.y&&o.x===s.x&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-s.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}u(jd,"extractCornerPoints");let jo,Hd,Yd,Ud,Vd,Gd,Xd,Zd,Qd,Kd,Jd,tu,eu,ru,iu,au,ou,nu,su,lu,lr,Ho;jo=u(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,o=r/Math.sqrt(i*i+a*a);return{x:t.x-o*i,y:t.y-o*a}},"findAdjacentPoint"),Hd=u(function(e){const{cornerPointPositions:t}=jd(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],o=e[i+1],s=e[i],n=jo(a,s,5),h=jo(o,s,5),l=h.x-n.x,c=h.y-n.y;r.push(n);const d=2*Math.sqrt(2);let p={x:s.x,y:s.y};if(Math.abs(o.x-a.x)>10&&Math.abs(o.y-a.y)>=10){$.debug("Corner point fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));const g=5;p=s.x===n.x?{x:l<0?n.x-g+d:n.x+g-d,y:c<0?n.y-d:n.y+d}:{x:l<0?n.x-d:n.x+d,y:c<0?n.y-g+d:n.y+g-d}}else $.debug("Corner point skipping fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));r.push(p,h)}else r.push(e[i]);return r},"fixCorners"),Fn=u(function(e,t,r,i,a,o,s){var z;const{handDrawnSeed:n}=ct();let h=t.points,l=!1;const c=a;var d=o;const p=[];for(const P in t.cssCompiledStyles)Do(P)||p.push(t.cssCompiledStyles[P]);d.intersect&&c.intersect&&(h=h.slice(1,t.points.length-1),h.unshift(c.intersect(h[0])),$.debug("Last point APA12",t.start,"-->",t.end,h[h.length-1],d,d.intersect(h[h.length-1])),h.push(d.intersect(h[h.length-1]))),t.toCluster&&($.info("to cluster abc88",r.get(t.toCluster)),h=Wo(t.points,r.get(t.toCluster).node),l=!0),t.fromCluster&&($.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Wo(h.reverse(),r.get(t.fromCluster).node).reverse(),l=!0);let g=h.filter(P=>!Number.isNaN(P.y));g=Hd(g);let f=mn;switch(f=fn,t.curve){case"linear":f=fn;break;case"basis":default:f=mn;break;case"cardinal":f=Lp;break;case"bumpX":f=Vn;break;case"bumpY":f=Gn;break;case"catmullRom":f=Mp;break;case"monotoneX":f=vp;break;case"monotoneY":f=Bp;break;case"natural":f=Tp;break;case"step":f=Sp;break;case"stepAfter":f=wp;break;case"stepBefore":f=kp}const{x:m,y:x}=Mn(t),y=wy().x(m).y(x).curve(f);let C,w;switch(t.thickness){case"normal":default:C="edge-thickness-normal";break;case"thick":C="edge-thickness-thick";break;case"invisible":C="edge-thickness-invisible"}switch(t.pattern){case"solid":default:C+=" edge-pattern-solid";break;case"dotted":C+=" edge-pattern-dotted";break;case"dashed":C+=" edge-pattern-dashed"}let L=y(g);const B=Array.isArray(t.style)?t.style:[t.style];let b=B.find(P=>P==null?void 0:P.startsWith("stroke:"));if(t.look==="handDrawn"){const P=H(e);Object.assign([],g);const I=P.path(L,{roughness:.3,seed:n});C+=" transition",w=lt(I).select("path").attr("id",t.id).attr("class"," "+C+(t.classes?" "+t.classes:"")).attr("style",B?B.reduce((v,M)=>v+";"+M,""):"");let F=w.attr("d");w.attr("d",F),e.node().appendChild(w.node())}else{const P=p.join(";"),I=B?B.reduce((M,A)=>M+A+";",""):"";let F="";t.animate&&(F=" edge-animation-fast"),t.animation&&(F=" edge-animation-"+t.animation);const v=P?P+";"+I+";":I;w=e.append("path").attr("d",L).attr("id",t.id).attr("class"," "+C+(t.classes?" "+t.classes:"")+(F??"")).attr("style",v),b=(z=v.match(/stroke:([^;]+)/))==null?void 0:z[1]}let S="";(ct().flowchart.arrowMarkerAbsolute||ct().state.arrowMarkerAbsolute)&&(S=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,S=S.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),$.info("arrowTypeStart",t.arrowTypeStart),$.info("arrowTypeEnd",t.arrowTypeEnd),Rd(w,t,S,s,i,b);let D={};return l&&(D.updatedPath=h),D.originalPath=t.points,D},"insertEdge"),Yd=u((e,t,r,i)=>{t.forEach(a=>{su[a](e,r,i)})},"insertMarkers"),Ud=u((e,t,r)=>{$.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),Vd=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Gd=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Xd=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Zd=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Qd=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),Kd=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),Jd=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),tu=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),eu=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),ru=u((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),iu=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),au=u((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),ou=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
141
- L20,10
142
- M20,10
143
- L0,20`)},"requirement_arrow"),nu=u((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),su={extension:Ud,composition:Vd,aggregation:Gd,dependency:Xd,lollipop:Zd,point:Qd,circle:Kd,cross:Jd,barb:tu,only_one:eu,zero_or_one:ru,one_or_more:iu,zero_or_more:au,requirement_arrow:ou,requirement_contains:nu},_n=Yd,lu={common:_e,getConfig:At,insertCluster:Bn,insertEdge:Fn,insertEdgeLabel:En,insertMarkers:_n,insertNode:sa,interpolateToCurve:yo,labelHelper:et,log:$,positionEdgeLabel:An},lr={},Ho=u(e=>{for(const t of e)lr[t.name]=t},"registerLayoutLoaders"),u(()=>{Ho([{name:"dagre",loader:u(async()=>await gt(()=>import("./dagre-OKDRZEBW-NdY44hpH.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders")();let Yo,Uo,Vo,Go,Yi;Rp=u(async(e,t)=>{if(!(e.layoutAlgorithm in lr))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=lr[e.layoutAlgorithm];return(await r.loader()).render(e,t,lu,{algorithm:r.algorithm})},"render"),zp=u((e="",{fallback:t="dagre"}={})=>{if(e in lr)return e;if(t in lr)return $.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),ha={name:"mermaid",version:"11.6.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^2.1.33","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.4",katex:"^0.16.9",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",chokidar:"^4.0.3",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.0.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},Cn=u(e=>{var i;const{securityLevel:t}=ct();let r=lt("body");if(t==="sandbox"){const a=lt(`#i${e}`),o=((i=a.node())==null?void 0:i.contentDocument)??document;r=lt(o.body)}return r.select(`#${e}`)},"selectSvgElement"),Yo="comm",Uo="rule",Vo="decl",Go=Math.abs,Yi=String.fromCharCode;function hu(e){return e.trim()}function Ui(e,t,r){return e.replace(t,r)}function $f(e,t,r){return e.indexOf(t,r)}function hr(e,t){return 0|e.charCodeAt(t)}function cr(e,t,r){return e.slice(t,r)}function ne(e){return e.length}function Vi(e,t){return t.push(e),e}var Gi=1,dr=1,cu=0,Vt=0,Ct=0,ur="";function Xo(e,t,r,i,a,o,s,n){return{value:e,root:t,parent:r,type:i,props:a,children:o,line:Gi,column:dr,length:s,return:"",siblings:n}}function Of(){return Ct=Vt>0?hr(ur,--Vt):0,dr--,Ct===10&&(dr=1,Gi--),Ct}function Kt(){return Ct=Vt<cu?hr(ur,Vt++):0,dr++,Ct===10&&(dr=1,Gi++),Ct}function Me(){return hr(ur,Vt)}function Xi(){return Vt}function Zi(e,t){return cr(ur,e,t)}function ei(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Zo(e){return hu(Zi(Vt-1,Qo(e===91?e+2:e===40?e+1:e)))}function Df(e){for(;(Ct=Me())&&Ct<33;)Kt();return ei(e)>2||ei(Ct)>3?"":" "}function If(e,t){for(;--t&&Kt()&&!(Ct<48||Ct>102||Ct>57&&Ct<65||Ct>70&&Ct<97););return Zi(e,Xi()+(t<6&&Me()==32&&Kt()==32))}function Qo(e){for(;Kt();)switch(Ct){case e:return Vt;case 34:case 39:e!==34&&e!==39&&Qo(Ct);break;case 40:e===41&&Qo(e);break;case 92:Kt()}return Vt}function Pf(e,t){for(;Kt()&&e+Ct!==57&&(e+Ct!==84||Me()!==47););return"/*"+Zi(t,Vt-1)+"*"+Yi(e===47?e:Kt())}function zf(e){for(;!ei(Me());)Kt();return Zi(e,Vt)}function Rf(e){return function(t){return ur="",t}(Qi("",null,null,null,[""],e=function(t){return Gi=dr=1,cu=ne(ur=t),Vt=0,[]}(e),0,[0],e))}function Qi(e,t,r,i,a,o,s,n,h){for(var l=0,c=0,d=s,p=0,g=0,f=0,m=1,x=1,y=1,C=0,w="",L=a,B=o,b=i,S=w;x;)switch(f=C,C=Kt()){case 40:if(f!=108&&hr(S,d-1)==58){$f(S+=Ui(Zo(C),"&","&\f"),"&\f",Go(l?n[l-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:S+=Zo(C);break;case 9:case 10:case 13:case 32:S+=Df(f);break;case 92:S+=If(Xi()-1,7);continue;case 47:switch(Me()){case 42:case 47:Vi(qf(Pf(Kt(),Xi()),t,r,h),h),ei(f||1)!=5&&ei(Me()||1)!=5||!ne(S)||cr(S,-1,void 0)===" "||(S+=" ");break;default:S+="/"}break;case 123*m:n[l++]=ne(S)*y;case 125*m:case 59:case 0:switch(C){case 0:case 125:x=0;case 59+c:y==-1&&(S=Ui(S,/\f/g,"")),g>0&&(ne(S)-d||m===0&&f===47)&&Vi(g>32?uu(S+";",i,r,d-1,h):uu(Ui(S," ","")+";",i,r,d-2,h),h);break;case 59:S+=";";default:if(Vi(b=du(S,t,r,l,c,a,n,w,L=[],B=[],d,o),o),C===123)if(c===0)Qi(S,t,b,b,L,o,d,n,B);else{switch(p){case 99:if(hr(S,3)===110)break;case 108:if(hr(S,2)===97)break;default:c=0;case 100:case 109:case 115:}c?Qi(e,b,b,i&&Vi(du(e,b,b,0,0,a,n,w,a,L=[],d,B),B),a,B,d,n,i?L:B):Qi(S,b,b,b,[""],B,0,n,B)}}l=c=g=0,m=y=1,w=S="",d=s;break;case 58:d=1+ne(S),g=f;default:if(m<1){if(C==123)--m;else if(C==125&&m++==0&&Of()==125)continue}switch(S+=Yi(C),C*m){case 38:y=c>0?1:(S+="\f",-1);break;case 44:n[l++]=(ne(S)-1)*y,y=1;break;case 64:Me()===45&&(S+=Zo(Kt())),p=Me(),c=d=ne(w=S+=zf(Xi())),C++;break;case 45:f===45&&ne(S)==2&&(m=0)}}return o}function du(e,t,r,i,a,o,s,n,h,l,c,d){for(var p=a-1,g=a===0?o:[""],f=function(B){return B.length}(g),m=0,x=0,y=0;m<i;++m)for(var C=0,w=cr(e,p+1,p=Go(x=s[m])),L=e;C<f;++C)(L=hu(x>0?g[C]+" "+w:Ui(w,/&\f/g,g[C])))&&(h[y++]=L);return Xo(e,t,r,a===0?Uo:n,h,l,c,d)}function qf(e,t,r,i){return Xo(e,t,r,Yo,Yi(Ct),cr(e,2,-2),0,i)}function uu(e,t,r,i,a){return Xo(e,t,r,Vo,cr(e,0,i),cr(e,i+1,-1),i,a)}function Ko(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function Nf(e,t,r,i){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case Vo:return e.return=e.return||e.value;case Yo:return"";case"@keyframes":return e.return=e.value+"{"+Ko(e.children,i)+"}";case Uo:if(!ne(e.value=e.props.join(",")))return""}return ne(r=Ko(e.children,i))?e.return=e.value+"{"+r+"}":""}var Wf={id:"c4",detector:u(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./c4Diagram-VJAJSXHY-yQmPFHka.js");return{diagram:t}},__vite__mapDeps([14,15,11,12,2,3,13]),import.meta.url);return{id:"c4",diagram:e}},"loader")},pu="flowchart",jf=u((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)!=="dagre-wrapper"&&((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)!=="elk"&&/^\s*graph/.test(e)},"detector"),Hf={id:pu,detector:jf,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-4HSFHLVR-i5Ql-QiJ.js");return{diagram:t}},__vite__mapDeps([16,17,11,12,18,2,3,13]),import.meta.url);return{id:pu,diagram:e}},"loader")},gu="flowchart-v2",Yf=u((e,t)=>{var r,i,a;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)!=="dagre-d3"&&(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),!(!/^\s*graph/.test(e)||((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)!=="dagre-wrapper")||/^\s*flowchart/.test(e))},"detector"),Uf={id:gu,detector:Yf,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-4HSFHLVR-i5Ql-QiJ.js");return{diagram:t}},__vite__mapDeps([16,17,11,12,18,2,3,13]),import.meta.url);return{id:gu,diagram:e}},"loader")},Vf={id:"er",detector:u(e=>/^\s*erDiagram/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./erDiagram-Q7BY3M3F-Bdu1RFft.js");return{diagram:t}},__vite__mapDeps([19,17,11,12,18,2,3,13]),import.meta.url);return{id:"er",diagram:e}},"loader")},fu="gitGraph",Gf={id:fu,detector:u(e=>/^\s*gitGraph/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-7IBYFJ6S-DPM6GuRf.js");return{diagram:t}},__vite__mapDeps([20,21,22,23,2,3,5,4,7,8,10,24,11,12,13]),import.meta.url);return{id:fu,diagram:e}},"loader")},mu="gantt",Xf={id:mu,detector:u(e=>/^\s*gantt/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./ganttDiagram-APWFNJXF-Dmuf1Tpo.js");return{diagram:t}},__vite__mapDeps([25,2,3,11,12,26,27,28,13]),import.meta.url);return{id:mu,diagram:e}},"loader")},yu="info",Zf={id:yu,detector:u(e=>/^\s*info/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./infoDiagram-PH2N3AL5-LArKQ0VO.js");return{diagram:t}},__vite__mapDeps([29,23,2,3,5,4,7,8,10,24,11,12,13]),import.meta.url);return{id:yu,diagram:e}},"loader")},Qf={id:"pie",detector:u(e=>/^\s*pie/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./pieDiagram-IB7DONF6-CXSjueVW.js");return{diagram:t}},__vite__mapDeps([30,21,23,2,3,5,4,7,8,10,24,11,12,31,13,32,28]),import.meta.url);return{id:"pie",diagram:e}},"loader")},xu="quadrantChart",Kf={id:xu,detector:u(e=>/^\s*quadrantChart/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./quadrantDiagram-7GDLP6J5-BpFvASma.js");return{diagram:t}},__vite__mapDeps([33,11,12,27,2,3,28,13]),import.meta.url);return{id:xu,diagram:e}},"loader")},bu="xychart",Jf={id:bu,detector:u(e=>/^\s*xychart-beta/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./xychartDiagram-VJFVF3MP-CK-bnFkL.js");return{diagram:t}},__vite__mapDeps([34,11,12,28,32,35,27,2,3,13]),import.meta.url);return{id:bu,diagram:e}},"loader")},Cu="requirement",tm={id:Cu,detector:u(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./requirementDiagram-KVF5MWMF-unRzxNJE.js");return{diagram:t}},__vite__mapDeps([36,17,11,12,2,3,13]),import.meta.url);return{id:Cu,diagram:e}},"loader")},ku="sequence",em={id:ku,detector:u(e=>/^\s*sequenceDiagram/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sequenceDiagram-X6HHIX6F-CeDzabVO.js");return{diagram:t}},__vite__mapDeps([37,15,22,11,12,2,3,13]),import.meta.url);return{id:ku,diagram:e}},"loader")},wu="class",rm=u((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)!=="dagre-wrapper"&&/^\s*classDiagram/.test(e)},"detector"),im={id:wu,detector:rm,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-GIVACNV2-BO83RfZB.js");return{diagram:t}},__vite__mapDeps([38,39,17,11,12,2,3,13]),import.meta.url);return{id:wu,diagram:e}},"loader")},Su="classDiagram",am=u((e,t)=>{var r;return!(!/^\s*classDiagram/.test(e)||((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)!=="dagre-wrapper")||/^\s*classDiagram-v2/.test(e)},"detector"),om={id:Su,detector:am,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-v2-COTLJTTW-BO83RfZB.js");return{diagram:t}},__vite__mapDeps([40,39,17,11,12,2,3,13]),import.meta.url);return{id:Su,diagram:e}},"loader")},Tu="state",nm=u((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)!=="dagre-wrapper"&&/^\s*stateDiagram/.test(e)},"detector"),sm={id:Tu,detector:nm,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-DGXRK772-PGZIv6yW.js");return{diagram:t}},__vite__mapDeps([41,42,17,11,12,1,2,3,4,5,6,7,8,9,13]),import.meta.url);return{id:Tu,diagram:e}},"loader")},Bu="stateDiagram",lm=u((e,t)=>{var r;return!!/^\s*stateDiagram-v2/.test(e)||!(!/^\s*stateDiagram/.test(e)||((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)!=="dagre-wrapper")},"detector"),hm={id:Bu,detector:lm,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-YXO3MK2T-tCMN3u5q.js");return{diagram:t}},__vite__mapDeps([43,42,17,11,12,2,3,13]),import.meta.url);return{id:Bu,diagram:e}},"loader")},vu="journey",cm={id:vu,detector:u(e=>/^\s*journey/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./journeyDiagram-U35MCT3I-B3lHGKMN.js");return{diagram:t}},__vite__mapDeps([44,15,11,12,31,13,2,3]),import.meta.url);return{id:vu,diagram:e}},"loader")},dm=u((e,t,r)=>{$.debug(`rendering svg for syntax error
144
- `);const i=Cn(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),fa(i,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Mu={draw:dm},um=Mu,pm={db:{},renderer:Mu,parser:{parse:u(()=>{},"parse")}},Lu="flowchart-elk",gm=u((e,t={})=>{var r;return!!(/^\s*flowchart-elk/.test(e)||/^\s*flowchart|graph/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk")&&(t.layout="elk",!0)},"detector"),fm={id:Lu,detector:gm,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-4HSFHLVR-i5Ql-QiJ.js");return{diagram:t}},__vite__mapDeps([16,17,11,12,18,2,3,13]),import.meta.url);return{id:Lu,diagram:e}},"loader")},_u="timeline",mm={id:_u,detector:u(e=>/^\s*timeline/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./timeline-definition-BDJGKUSR-fax3GFbF.js");return{diagram:t}},__vite__mapDeps([45,11,12,31,13,2,3]),import.meta.url);return{id:_u,diagram:e}},"loader")},Fu="mindmap",ym={id:Fu,detector:u(e=>/^\s*mindmap/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./mindmap-definition-ALO5MXBD-BIL8Yk33.js");return{diagram:t}},__vite__mapDeps([46,47,2,3,11,12,13]),import.meta.url);return{id:Fu,diagram:e}},"loader")},Au="kanban",xm={id:Au,detector:u(e=>/^\s*kanban/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./kanban-definition-NDS4AKOZ-Q5EE_ssH.js");return{diagram:t}},__vite__mapDeps([48,2,3,11,12,13]),import.meta.url);return{id:Au,diagram:e}},"loader")},Eu="sankey",bm={id:Eu,detector:u(e=>/^\s*sankey-beta/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sankeyDiagram-QLVOVGJD-Cn-XfYiE.js");return{diagram:t}},__vite__mapDeps([49,11,12,32,28,50,2,3,13]),import.meta.url);return{id:Eu,diagram:e}},"loader")},$u="packet",Cm={id:$u,detector:u(e=>/^\s*packet-beta/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-VNBRO52H-Dbdog9oU.js");return{diagram:t}},__vite__mapDeps([51,21,23,2,3,5,4,7,8,10,24,11,12,13]),import.meta.url);return{id:$u,diagram:e}},"loader")},Ou="radar",km={id:Ou,detector:u(e=>/^\s*radar-beta/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-SSKATNLV-DF4qzt72.js");return{diagram:t}},__vite__mapDeps([52,21,23,2,3,5,4,7,8,10,24,11,12,13]),import.meta.url);return{id:Ou,diagram:e}},"loader")},Du="block",wm={id:Du,detector:u(e=>/^\s*block-beta/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./blockDiagram-JOT3LUYC-BEIjTgHI.js");return{diagram:t}},__vite__mapDeps([53,10,4,2,3,5,11,12,1,18,13]),import.meta.url);return{id:Du,diagram:e}},"loader")},Iu="architecture",Sm={id:Iu,detector:u(e=>/^\s*architecture/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./architectureDiagram-IEHRJDOE-Cjnv8Vq_.js");return{diagram:t}},__vite__mapDeps([54,21,22,23,2,3,5,4,7,8,10,24,47,11,12,13]),import.meta.url);return{id:Iu,diagram:e}},"loader")},Pu=!1,Ki=u(()=>{Pu||(Pu=!0,jr("error",pm,e=>e.toLowerCase().trim()==="error"),jr("---",{db:{clear:u(()=>{},"clear")},styles:{},renderer:{draw:u(()=>{},"draw")},parser:{parse:u(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:u(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Ea(Wf,xm,om,im,Vf,Xf,Zf,Qf,tm,em,fm,Uf,Hf,ym,mm,Gf,hm,sm,cm,Kf,bm,Cm,Jf,wm,Sm,km))},"addDiagrams"),Tm=u(async()=>{$.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(Oe).map(async([t,{detector:r,loader:i}])=>{if(i)try{Ci(t)}catch{try{const{diagram:a,id:o}=await i();jr(o,a,r)}catch(a){throw $.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Oe[t],a}}}))).filter(t=>t.status==="rejected");if(e.length>0){$.error(`Failed to load ${e.length} external diagrams`);for(const t of e)$.error(t);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams");function zu(e,t){e.attr("role","graphics-document document"),t!==""&&e.attr("aria-roledescription",t)}function Ru(e,t,r,i){if(e.insert!==void 0){if(r){const a=`chart-desc-${i}`;e.attr("aria-describedby",a),e.insert("desc",":first-child").attr("id",a).text(r)}if(t){const a=`chart-title-${i}`;e.attr("aria-labelledby",a),e.insert("title",":first-child").attr("id",a).text(t)}}}u(zu,"setA11yDiagramInfo"),u(Ru,"addSVGa11yTitleDescription");var Jo=(je=class{constructor(t,r,i,a,o){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=o}static async fromText(t,r={}){var l,c;const i=At(),a=di(t,i);t=Yh(t)+`
145
- `;try{Ci(a)}catch{const d=gs(a);if(!d)throw new Aa(`Diagram ${a} not found.`);const{id:p,diagram:g}=await d();jr(p,g)}const{db:o,parser:s,renderer:n,init:h}=Ci(a);return s.parser&&(s.parser.yy=o),(l=o.clear)==null||l.call(o),h==null||h(i),r.title&&((c=o.setDiagramTitle)==null||c.call(o,r.title)),await s.parse(t),new je(a,t,o,s,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},u(je,"Diagram"),je),qu=[],Bm=u(()=>{qu.forEach(e=>{e()}),qu=[]},"attachFunctions"),vm=u(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Nu(e){const t=e.match(Fa);if(!t)return{text:e,metadata:{}};let r=Wn(t[1],{schema:kn})??{};r=typeof r!="object"||Array.isArray(r)?{}:r;const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}u(Nu,"extractFrontMatter");var Mm=u(e=>e.replace(/\r\n?/g,`
146
- `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Lm=u(e=>{const{text:t,metadata:r}=Nu(e),{displayMode:i,title:a,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:a,config:o,text:t}},"processFrontmatter"),_m=u(e=>{const t=Xt.detectInit(e)??{},r=Xt.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:$h(e),directive:t}},"processDirectives");function tn(e){const t=Mm(e),r=Lm(t),i=_m(r.text),a=ai(r.config,i.directive);return{code:e=vm(i.text),title:r.title,config:a}}function Wu(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}u(tn,"preprocessDiagram"),u(Wu,"toBase64");var Fm=["foreignobject"],Am=["dominant-baseline"];function en(e){const t=tn(e);return qr(),Ls(t.config??{}),t}async function ju(e,t){Ki();try{const{code:r,config:i}=en(e);return{diagramType:(await Vu(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}u(en,"processAndSetConfigs"),u(ju,"parse");var Hu=u((e,t,r=[])=>`
147
- .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),Em=u((e,t=new Map)=>{var i;let r="";if(e.themeCSS!==void 0&&(r+=`
148
- ${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
149
- :root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
150
- :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const a=e.htmlLabels??((i=e.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(o=>{ga(o.styles)||a.forEach(s=>{r+=Hu(o.id,s,o.styles)}),ga(o.textStyles)||(r+=Hu(o.id,"tspan",((o==null?void 0:o.textStyles)||[]).map(s=>s.replace("color","fill"))))})}return r},"createCssStyles"),$m=u((e,t,r,i)=>{const a=Em(e,r);return Ko(Rf(`${i}{${Vs(t,a,e.themeVariables)}}`),Nf)},"createUserStyles"),Om=u((e="",t,r)=>{let i=e;return r||t||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=be(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),Dm=u((e="",t)=>{var r,i;return`<iframe style="width:100%;height:${(i=(r=t==null?void 0:t.viewBox)==null?void 0:r.baseVal)!=null&&i.height?t.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${Wu(`<body style="margin:0">${e}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">
151
- The "iframe" tag is not supported by your browser.
152
- </iframe>`},"putIntoIFrame"),Yu=u((e,t,r,i,a)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const s=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return a&&s.attr("xmlns:xlink",a),s.append("g"),e},"appendDivSvgG");function rn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}u(rn,"sandboxedIframe");var Im=u((e,t,r,i)=>{var a,o,s;(a=e.getElementById(t))==null||a.remove(),(o=e.getElementById(r))==null||o.remove(),(s=e.getElementById(i))==null||s.remove()},"removeExistingElements"),Pm=u(async function(e,t,r){var F,v,M,A,_,O;Ki();const i=en(t);t=i.code;const a=At();$.debug(a),t.length>((a==null?void 0:a.maxTextSize)??5e4)&&(t="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const o="#"+e,s="i"+e,n="#"+s,h="d"+e,l="#"+h,c=u(()=>{const E=lt(p?n:l).node();E&&"remove"in E&&E.remove()},"removeTempElements");let d=lt("body");const p=a.securityLevel==="sandbox",g=a.securityLevel==="loose",f=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const E=rn(lt(r),s);d=lt(E.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=lt(r);Yu(d,e,h,`font-family: ${f}`,"http://www.w3.org/1999/xlink")}else{if(Im(document,e,h,s),p){const E=rn(lt("body"),s);d=lt(E.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=lt("body");Yu(d,e,h)}let m,x;try{m=await Jo.fromText(t,{title:i.title})}catch(E){if(a.suppressErrorRendering)throw c(),E;m=await Jo.fromText("error"),x=E}const y=d.select(l).node(),C=m.type,w=y.firstChild,L=w.firstChild,B=(v=(F=m.renderer).getClasses)==null?void 0:v.call(F,t,m),b=$m(a,C,B,o),S=document.createElement("style");S.innerHTML=b,w.insertBefore(S,L);try{await m.renderer.draw(t,e,ha.version,m)}catch(E){throw a.suppressErrorRendering?c():um.draw(t,e,ha.version),E}const D=d.select(`${l} svg`),z=(A=(M=m.db).getAccTitle)==null?void 0:A.call(M),P=(O=(_=m.db).getAccDescription)==null?void 0:O.call(_);Gu(C,D,z,P),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let I=d.select(l).node().innerHTML;if($.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),I=Om(I,p,bt(a.arrowMarkerAbsolute)),p){const E=d.select(l+" svg").node();I=Dm(I,E)}else g||(I=$e.sanitize(I,{ADD_TAGS:Fm,ADD_ATTR:Am,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Bm(),x)throw x;return c(),{diagramType:C,svg:I,bindFunctions:m.db.bindFunctions}},"render");function Uu(e={}){var i;const t=Bt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),vs(t),t!=null&&t.theme&&t.theme in ee?t.themeVariables=ee[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ee.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Bs(t):Ia();ci(r.logLevel),Ki()}u(Uu,"initialize");var Vu=u((e,t={})=>{const{code:r}=tn(e);return Jo.fromText(r,t)},"getDiagramFromText");function Gu(e,t,r,i){zu(t,e),Ru(t,r,i,t.attr("id"))}u(Gu,"addA11yInfo");var We=Object.freeze({render:Pm,parse:ju,getDiagramFromText:Vu,initialize:Uu,getConfig:At,setConfig:Pa,getSiteConfig:Ia,updateSiteConfig:Ms,reset:u(()=>{qr()},"reset"),globalReset:u(()=>{qr(De)},"globalReset"),defaultConfig:De});ci(At().logLevel),qr(At());var zm=u((e,t,r)=>{$.warn(e),wo(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Xu=u(async function(e={querySelector:".mermaid"}){try{await Rm(e)}catch(t){if(wo(t)&&$.error(t.str),Yt.parseError&&Yt.parseError(t),!e.suppressErrors)throw $.error("Use the suppressErrors option to suppress these errors"),t}},"run"),Rm=u(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=We.getConfig();let a;if($.debug((e?"":"No ")+"Callback function found"),r)a=r;else{if(!t)throw new Error("Nodes and querySelector are both undefined");a=document.querySelectorAll(t)}$.debug(`Found ${a.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&($.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),We.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const o=new Xt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const n=[];for(const h of Array.from(a)){if($.info("Rendering diagram: "+h.id),h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const l=`mermaid-${o.next()}`;s=h.innerHTML,s=Uh(Xt.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=Xt.detectInit(s);c&&$.debug("Detected early reinit: ",c);try{const{svg:d,bindFunctions:p}=await Ju(l,s,h);h.innerHTML=d,e&&await e(l),p&&p(h)}catch(d){zm(d,n,Yt.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),Zu=u(function(e){We.initialize(e)},"initialize"),qm=u(async function(e,t,r){$.warn("mermaid.init is deprecated. Please use run instead."),e&&Zu(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Xu(i)},"init"),Nm=u(async(e,{lazyLoad:t=!0}={})=>{Ki(),Ea(...e),t===!1&&await Tm()},"registerExternalDiagrams"),Qu=u(function(){if(Yt.startOnLoad){const{startOnLoad:e}=We.getConfig();e&&Yt.run().catch(t=>$.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Qu,!1);var Wm=u(function(e){Yt.parseError=e},"setParseErrorHandler"),Ji=[],an=!1,Ku=u(async()=>{if(!an){for(an=!0;Ji.length>0;){const e=Ji.shift();if(e)try{await e()}catch(t){$.error("Error executing queue",t)}}an=!1}},"executeQueue"),jm=u(async(e,t)=>new Promise((r,i)=>{const a=u(()=>new Promise((o,s)=>{We.parse(e,t).then(n=>{o(n),r(n)},n=>{var h;$.error("Error parsing",n),(h=Yt.parseError)==null||h.call(Yt,n),s(n),i(n)})}),"performCall");Ji.push(a),Ku().catch(i)}),"parse"),Ju=u((e,t,r)=>new Promise((i,a)=>{const o=u(()=>new Promise((s,n)=>{We.render(e,t,r).then(h=>{s(h),i(h)},h=>{var l;$.error("Error parsing",h),(l=Yt.parseError)==null||l.call(Yt,h),n(h),a(h)})}),"performCall");Ji.push(o),Ku().catch(a)}),"render"),Yt={startOnLoad:!0,mermaidAPI:We,parse:jm,render:Ju,init:qm,run:Xu,registerExternalDiagrams:Nm,registerLayoutLoaders:Ho,initialize:Zu,parseError:void 0,contentLoaded:Qu,setParseErrorHandler:Wm,detectType:di,registerIconPacks:$n},tp=Yt;const Hm={startOnLoad:!0,theme:"forest",logLevel:"fatal",securityLevel:"strict",fontFamily:"var(--text-font)",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!0,curve:"linear"},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};function Ym(){return function(){const e="abcdefghijklmnopqrstuvwxyz";return Array.from({length:6},()=>e[Math.floor(26*Math.random())]).join("")}()}Ip=Object.freeze(Object.defineProperty({__proto__:null,default:e=>{const t=sy.c(9),{diagram:r}=e,[i]=ly.useState(Ym),a=hy().theme==="dark";let o,s;tp.initialize({...Hm,theme:a?"dark":"forest",darkMode:a}),t[0]!==r||t[1]!==i?(o=async()=>(await tp.render(i,r,void 0).catch(l=>{var c;throw(c=document.getElementById(i))==null||c.remove(),dy.warn("Failed to render mermaid diagram",l),l})).svg,t[0]=r,t[1]=i,t[2]=o):o=t[2],t[3]!==a||t[4]!==r||t[5]!==i?(s=[r,i,a],t[3]=a,t[4]=r,t[5]=i,t[6]=s):s=t[6];const{data:n}=cy(o,s);if(!n)return null;let h;return t[7]!==n?(h=uy.jsx("div",{dangerouslySetInnerHTML:{__html:n}}),t[7]=n,t[8]=h):h=t[8],h}},Symbol.toStringTag,{value:"Module"}))});export{sa as $,Ue as A,yn as B,Gt as C,xn as D,ai as E,At as F,la as G,bn as H,Cn as I,kn as J,ha as K,wn as L,Le as M,_p as N,Mr as O,oi as P,ca as Q,Sn as R,Tn as S,Ve as T,tt as U,N as V,Z as W,da as X,Bn as Y,Fp as Z,u as _,Sy as __tla,vn as a,Ap as a0,Mn as a1,bt as a2,he as a3,ni as a4,ua as a5,be as a6,pa as a7,Ln as a8,ga as a9,_n as aa,Ep as ab,$p as ac,Op as ad,V as ae,Dp as af,Fn as ag,An as ah,En as ai,Lr as aj,$n as ak,On as al,Dn as am,Ip as an,In as b,ct as c,fa as d,Bt as e,Jt as f,Pn as g,Ce as h,zn as i,_e as j,ma as k,$ as l,Ge as m,Pp as n,zp as o,Rn as p,qn as q,Rp as r,Nn as s,Wn as t,Xt as u,jn as v,Hn as w,qp as x,Yn as y,Np as z};