@langgraph-js/ui 5.6.0 → 5.7.0

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 (80) hide show
  1. package/dist/assets/arc-Cxpt6B73.js +1 -0
  2. package/dist/assets/architectureDiagram-VXUJARFQ-DEy8uu79.js +36 -0
  3. package/dist/assets/{blockDiagram-VD42YOAC-JpCtx8Fw.js → blockDiagram-VD42YOAC-yNezEuFm.js} +4 -4
  4. package/dist/assets/{c4Diagram-YG6GDRKO-Ct0YUG6f.js → c4Diagram-YG6GDRKO-CFr-QKSf.js} +1 -1
  5. package/dist/assets/channel-ohUHNNLS.js +1 -0
  6. package/dist/assets/{chunk-4BX2VUAB-O9tuPwJ2.js → chunk-4BX2VUAB-DKYgHx9z.js} +1 -1
  7. package/dist/assets/{chunk-55IACEB6-B1LOZAa5.js → chunk-55IACEB6-Dp0pEp1k.js} +1 -1
  8. package/dist/assets/{chunk-B4BG7PRW-CHB7g7y9.js → chunk-B4BG7PRW-B9ne889x.js} +1 -1
  9. package/dist/assets/{chunk-DI55MBZ5-BZe7PkXl.js → chunk-DI55MBZ5-nz3xKTAU.js} +1 -1
  10. package/dist/assets/{chunk-FMBD7UC4-IV4Fy30-.js → chunk-FMBD7UC4-BEqW4wjD.js} +1 -1
  11. package/dist/assets/{chunk-QN33PNHL-DCcmoYki.js → chunk-QN33PNHL-DdYfOS87.js} +1 -1
  12. package/dist/assets/{chunk-QZHKN3VN-BNYpxk7b.js → chunk-QZHKN3VN--fzHnGin.js} +1 -1
  13. package/dist/assets/{chunk-TZMSLE5B-BgP3duP5.js → chunk-TZMSLE5B-wYv5WbFJ.js} +1 -1
  14. package/dist/assets/classDiagram-2ON5EDUG-DD3S7Z_T.js +1 -0
  15. package/dist/assets/classDiagram-v2-WZHVMYZB-DD3S7Z_T.js +1 -0
  16. package/dist/assets/clone-BL1RNKEm.js +1 -0
  17. package/dist/assets/{cose-bilkent-S5V4N54A-B_7kmvVh.js → cose-bilkent-S5V4N54A-Do_6LUNg.js} +1 -1
  18. package/dist/assets/{dagre-6UL2VRFP-CAxkUiea.js → dagre-6UL2VRFP-1iQhW5EH.js} +2 -2
  19. package/dist/assets/diagram-PSM6KHXK-BzAvoA1a.js +24 -0
  20. package/dist/assets/diagram-QEK2KX5R-BruzodAN.js +43 -0
  21. package/dist/assets/{diagram-S2PKOQOG-CZOKfwOI.js → diagram-S2PKOQOG-DxCLvX73.js} +1 -1
  22. package/dist/assets/{erDiagram-Q2GNP2WA-D9v3M4EU.js → erDiagram-Q2GNP2WA-VZD44fiG.js} +1 -1
  23. package/dist/assets/{flowDiagram-NV44I4VS-B9qnS72A.js → flowDiagram-NV44I4VS-BW9G6Z5Y.js} +1 -1
  24. package/dist/assets/ganttDiagram-LVOFAZNH-BE5hhtQW.js +267 -0
  25. package/dist/assets/{gitGraphDiagram-NY62KEGX-Cm36kSO3.js → gitGraphDiagram-NY62KEGX-D2xrVqfs.js} +1 -1
  26. package/dist/assets/{graph-C2p3i6RT.js → graph-BOje8BQW.js} +1 -1
  27. package/dist/assets/index-DKzqRWAz.css +1 -0
  28. package/dist/assets/{index-Cf3jkaWJ.js → index-Dyga3lv6.js} +312 -173
  29. package/dist/assets/{infoDiagram-F6ZHWCRC-DkBxmgNt.js → infoDiagram-F6ZHWCRC-DuvG7CMo.js} +1 -1
  30. package/dist/assets/isUndefined-Jm66YXc7.js +1 -0
  31. package/dist/assets/{journeyDiagram-XKPGCS4Q-CVukoP-j.js → journeyDiagram-XKPGCS4Q-DppY-OqU.js} +1 -1
  32. package/dist/assets/{kanban-definition-3W4ZIXB7-0-SbO6tS.js → kanban-definition-3W4ZIXB7-DWFZ7d_a.js} +4 -4
  33. package/dist/assets/layout-BrYg1BPZ.js +1 -0
  34. package/dist/assets/mermaid.core-Brj2E_sv.js +197 -0
  35. package/dist/assets/min-OyaaRTus.js +1 -0
  36. package/dist/assets/{mindmap-definition-VGOIOE7T-CDGdm5yw.js → mindmap-definition-VGOIOE7T-Ys6gAj49.js} +5 -5
  37. package/dist/assets/pieDiagram-ADFJNKIX-CDawS5d5.js +30 -0
  38. package/dist/assets/{quadrantDiagram-AYHSOK5B-DY0NltyG.js → quadrantDiagram-AYHSOK5B-BwaRQW9j.js} +2 -2
  39. package/dist/assets/{requirementDiagram-UZGBJVZJ-DwhwO5lc.js → requirementDiagram-UZGBJVZJ-xZhlkqne.js} +1 -1
  40. package/dist/assets/sankeyDiagram-TZEHDZUN-CNXqnJNS.js +10 -0
  41. package/dist/assets/{sequenceDiagram-WL72ISMW-CpTIKJGg.js → sequenceDiagram-WL72ISMW-DuVqNtcK.js} +1 -1
  42. package/dist/assets/stateDiagram-FKZM4ZOC-kjDVpzFt.js +1 -0
  43. package/dist/assets/stateDiagram-v2-4FDKWEC3-Bt6o2Z8q.js +1 -0
  44. package/dist/assets/{timeline-definition-IT6M3QCI-1MkGCcpM.js → timeline-definition-IT6M3QCI-BrZan_9K.js} +3 -3
  45. package/dist/assets/{treemap-KMMF4GRG-pRPfKbhX.js → treemap-KMMF4GRG-Bc2NrK0Z.js} +1 -1
  46. package/dist/assets/xychartDiagram-PRI3JC2R-Dh5NbHlS.js +7 -0
  47. package/dist/index.html +2 -2
  48. package/package.json +2 -1
  49. package/src/chat/Chat.tsx +3 -4
  50. package/src/chat/components/ErrorBoundary.tsx +23 -10
  51. package/src/chat/tools/{show_form.tsx → ask_user_to_fill_form.tsx} +147 -69
  52. package/src/chat/tools/ask_user_with_options.tsx +174 -0
  53. package/src/chat/tools/display_information_card.tsx +131 -0
  54. package/src/chat/tools/image_generation.tsx +140 -0
  55. package/src/chat/tools/index.ts +18 -6
  56. package/src/chat/tools/visualize_data_with_chart.tsx +274 -0
  57. package/src/chat/tools/wait_for_user_to_upload_file.tsx +324 -0
  58. package/dist/assets/arc-BNOCe7pe.js +0 -1
  59. package/dist/assets/architectureDiagram-VXUJARFQ-yf1p-wI_.js +0 -36
  60. package/dist/assets/channel-CizfE02g.js +0 -1
  61. package/dist/assets/classDiagram-2ON5EDUG-CFe5Iz8b.js +0 -1
  62. package/dist/assets/classDiagram-v2-WZHVMYZB-CFe5Iz8b.js +0 -1
  63. package/dist/assets/clone-C4H89Tb1.js +0 -1
  64. package/dist/assets/defaultLocale-C4B-KCzX.js +0 -1
  65. package/dist/assets/diagram-PSM6KHXK-BeM-KUrT.js +0 -24
  66. package/dist/assets/diagram-QEK2KX5R-DDl_pKlU.js +0 -43
  67. package/dist/assets/ganttDiagram-LVOFAZNH-C1Hjglog.js +0 -267
  68. package/dist/assets/index-DLwWU25h.css +0 -1
  69. package/dist/assets/init-Gi6I4Gst.js +0 -1
  70. package/dist/assets/isUndefined-DhAvAp_K.js +0 -1
  71. package/dist/assets/layout-fJUHcXGp.js +0 -1
  72. package/dist/assets/linear-RxTDErCI.js +0 -1
  73. package/dist/assets/mermaid.core-Y2zCEMvG.js +0 -197
  74. package/dist/assets/min-BGYgWBoZ.js +0 -1
  75. package/dist/assets/ordinal-Cboi1Yqb.js +0 -1
  76. package/dist/assets/pieDiagram-ADFJNKIX-EEa08coZ.js +0 -30
  77. package/dist/assets/sankeyDiagram-TZEHDZUN-awXHtkWF.js +0 -10
  78. package/dist/assets/stateDiagram-FKZM4ZOC-vNzQUjNr.js +0 -1
  79. package/dist/assets/stateDiagram-v2-4FDKWEC3-D7uk1o7q.js +0 -1
  80. package/dist/assets/xychartDiagram-PRI3JC2R-DaoAFPdZ.js +0 -7
@@ -0,0 +1,197 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Dyga3lv6.js","assets/index-DKzqRWAz.css","assets/dagre-6UL2VRFP-1iQhW5EH.js","assets/graph-BOje8BQW.js","assets/isUndefined-Jm66YXc7.js","assets/layout-BrYg1BPZ.js","assets/min-OyaaRTus.js","assets/clone-BL1RNKEm.js","assets/cose-bilkent-S5V4N54A-Do_6LUNg.js","assets/cytoscape.esm-CyJtwmzi.js","assets/c4Diagram-YG6GDRKO-CFr-QKSf.js","assets/chunk-TZMSLE5B-wYv5WbFJ.js","assets/flowDiagram-NV44I4VS-BW9G6Z5Y.js","assets/chunk-FMBD7UC4-BEqW4wjD.js","assets/chunk-55IACEB6-Dp0pEp1k.js","assets/chunk-QN33PNHL-DdYfOS87.js","assets/channel-ohUHNNLS.js","assets/erDiagram-Q2GNP2WA-VZD44fiG.js","assets/gitGraphDiagram-NY62KEGX-D2xrVqfs.js","assets/chunk-4BX2VUAB-DKYgHx9z.js","assets/chunk-QZHKN3VN--fzHnGin.js","assets/treemap-KMMF4GRG-Bc2NrK0Z.js","assets/ganttDiagram-LVOFAZNH-BE5hhtQW.js","assets/infoDiagram-F6ZHWCRC-DuvG7CMo.js","assets/pieDiagram-ADFJNKIX-CDawS5d5.js","assets/arc-Cxpt6B73.js","assets/quadrantDiagram-AYHSOK5B-BwaRQW9j.js","assets/xychartDiagram-PRI3JC2R-Dh5NbHlS.js","assets/requirementDiagram-UZGBJVZJ-xZhlkqne.js","assets/sequenceDiagram-WL72ISMW-DuVqNtcK.js","assets/classDiagram-2ON5EDUG-DD3S7Z_T.js","assets/chunk-B4BG7PRW-B9ne889x.js","assets/classDiagram-v2-WZHVMYZB-DD3S7Z_T.js","assets/stateDiagram-FKZM4ZOC-kjDVpzFt.js","assets/chunk-DI55MBZ5-nz3xKTAU.js","assets/stateDiagram-v2-4FDKWEC3-Bt6o2Z8q.js","assets/journeyDiagram-XKPGCS4Q-DppY-OqU.js","assets/timeline-definition-IT6M3QCI-BrZan_9K.js","assets/mindmap-definition-VGOIOE7T-Ys6gAj49.js","assets/kanban-definition-3W4ZIXB7-DWFZ7d_a.js","assets/sankeyDiagram-TZEHDZUN-CNXqnJNS.js","assets/diagram-S2PKOQOG-DxCLvX73.js","assets/diagram-QEK2KX5R-BruzodAN.js","assets/blockDiagram-VD42YOAC-yNezEuFm.js","assets/architectureDiagram-VXUJARFQ-DEy8uu79.js","assets/diagram-PSM6KHXK-BzAvoA1a.js"])))=>i.map(i=>d[i]);
2
+ import{aw as no,ax as Ti,e as mn,J as Md,ay as ft,s as ht,az as gs,aA as oo,aB as lo,aC as co,aD as ho,aE as uo,aF as fo,aG as Ad,aH as Da,aI as po,aJ as go,aK as Ed,aL as Fd,r as pi,av as Dd,aM as mo,q as $d,B as yn}from"./index-Dyga3lv6.js";function yo(e,t){this._basis=new no(e),this._beta=t}yo.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],a=t[0],s=e[r]-i,o=t[r]-a,n=-1,c;++n<=r;)c=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+c*s),this._beta*t[n]+(1-this._beta)*(a+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Od=function e(t){function r(i){return t===1?new no(i):new yo(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function Bi(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function ms(e,t){this._context=e,this._k=(1-t)/6}ms.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Bi(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Bi(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const xo=function e(t){function r(i){return new ms(i,t)}return r.tension=function(i){return e(+i)},r}(0);function ys(e,t){this._context=e,this._k=(1-t)/6}ys.prototype={areaStart:Ti,areaEnd:Ti,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Bi(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Id=function e(t){function r(i){return new ys(i,t)}return r.tension=function(i){return e(+i)},r}(0);function xs(e,t){this._context=e,this._k=(1-t)/6}xs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Bi(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Rd=function e(t){function r(i){return new xs(i,t)}return r.tension=function(i){return e(+i)},r}(0);function bs(e,t,r){var i=e._x1,a=e._y1,s=e._x2,o=e._y2;if(e._l01_a>mn){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,a=(a*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>mn){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*l+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*l+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,a,s,o,e._x2,e._y2)}function bo(e,t){this._context=e,this._alpha=t}bo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:bs(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Co=function e(t){function r(i){return t?new bo(i,t):new ms(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function So(e,t){this._context=e,this._alpha=t}So.prototype={areaStart:Ti,areaEnd:Ti,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:bs(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Pd=function e(t){function r(i){return t?new So(i,t):new ys(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function ko(e,t){this._context=e,this._alpha=t}ko.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:bs(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Nd=function e(t){function r(i){return t?new ko(i,t):new xs(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);var xn={name:"mermaid",version:"11.12.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.1.1","@iconify/utils":"^3.0.1","@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.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@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",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},gi={exports:{}},Wd=gi.exports,bn;function zd(){return bn||(bn=1,function(e,t){(function(r,i){e.exports=i()})(Wd,function(){var r=1e3,i=6e4,a=36e5,s="millisecond",o="second",n="minute",c="hour",l="day",h="week",u="month",f="quarter",p="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|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,b={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(A){var L=["th","st","nd","rd"],B=A%100;return"["+A+(L[(B-20)%10]||L[B]||L[0])+"]"}},S=function(A,L,B){var F=String(A);return!F||F.length>=L?A:""+Array(L+1-F.length).join(B)+A},v={s:S,z:function(A){var L=-A.utcOffset(),B=Math.abs(L),F=Math.floor(B/60),M=B%60;return(L<=0?"+":"-")+S(F,2,"0")+":"+S(M,2,"0")},m:function A(L,B){if(L.date()<B.date())return-A(B,L);var F=12*(B.year()-L.year())+(B.month()-L.month()),M=L.clone().add(F,u),z=B-M<0,V=L.clone().add(F+(z?-1:1),u);return+(-(F+(B-M)/(z?M-V:V-M))||0)},a:function(A){return A<0?Math.ceil(A)||0:Math.floor(A)},p:function(A){return{M:u,y:p,w:h,d:l,D:g,h:c,m:n,s:o,ms:s,Q:f}[A]||String(A||"").toLowerCase().replace(/s$/,"")},u:function(A){return A===void 0}},w="en",C={};C[w]=b;var _="$isDayjsObject",$=function(A){return A instanceof W||!(!A||!A[_])},P=function A(L,B,F){var M;if(!L)return w;if(typeof L=="string"){var z=L.toLowerCase();C[z]&&(M=z),B&&(C[z]=B,M=z);var V=L.split("-");if(!M&&V.length>1)return A(V[0])}else{var H=L.name;C[H]=L,M=H}return!F&&M&&(w=M),M||!F&&w},I=function(A,L){if($(A))return A.clone();var B=typeof L=="object"?L:{};return B.date=A,B.args=arguments,new W(B)},E=v;E.l=P,E.i=$,E.w=function(A,L){return I(A,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var W=function(){function A(B){this.$L=P(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[_]=!0}var L=A.prototype;return L.parse=function(B){this.$d=function(F){var M=F.date,z=F.utc;if(M===null)return new Date(NaN);if(E.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var V=M.match(y);if(V){var H=V[2]-1||0,ut=(V[7]||"0").substring(0,3);return z?new Date(Date.UTC(V[1],H,V[3]||1,V[4]||0,V[5]||0,V[6]||0,ut)):new Date(V[1],H,V[3]||1,V[4]||0,V[5]||0,V[6]||0,ut)}}return new Date(M)}(B),this.init()},L.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},L.$utils=function(){return E},L.isValid=function(){return this.$d.toString()!==m},L.isSame=function(B,F){var M=I(B);return this.startOf(F)<=M&&M<=this.endOf(F)},L.isAfter=function(B,F){return I(B)<this.startOf(F)},L.isBefore=function(B,F){return this.endOf(F)<I(B)},L.$g=function(B,F,M){return E.u(B)?this[F]:this.set(M,B)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(B,F){var M=this,z=!!E.u(F)||F,V=E.p(B),H=function(yt,mt){var St=E.w(M.$u?Date.UTC(M.$y,mt,yt):new Date(M.$y,mt,yt),M);return z?St:St.endOf(l)},ut=function(yt,mt){return E.w(M.toDate()[yt].apply(M.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(mt)),M)},at=this.$W,pt=this.$M,nt=this.$D,st="set"+(this.$u?"UTC":"");switch(V){case p:return z?H(1,0):H(31,11);case u:return z?H(1,pt):H(0,pt+1);case h:var ct=this.$locale().weekStart||0,gt=(at<ct?at+7:at)-ct;return H(z?nt-gt:nt+(6-gt),pt);case l:case g:return ut(st+"Hours",0);case c:return ut(st+"Minutes",1);case n:return ut(st+"Seconds",2);case o:return ut(st+"Milliseconds",3);default:return this.clone()}},L.endOf=function(B){return this.startOf(B,!1)},L.$set=function(B,F){var M,z=E.p(B),V="set"+(this.$u?"UTC":""),H=(M={},M[l]=V+"Date",M[g]=V+"Date",M[u]=V+"Month",M[p]=V+"FullYear",M[c]=V+"Hours",M[n]=V+"Minutes",M[o]=V+"Seconds",M[s]=V+"Milliseconds",M)[z],ut=z===l?this.$D+(F-this.$W):F;if(z===u||z===p){var at=this.clone().set(g,1);at.$d[H](ut),at.init(),this.$d=at.set(g,Math.min(this.$D,at.daysInMonth())).$d}else H&&this.$d[H](ut);return this.init(),this},L.set=function(B,F){return this.clone().$set(B,F)},L.get=function(B){return this[E.p(B)]()},L.add=function(B,F){var M,z=this;B=Number(B);var V=E.p(F),H=function(pt){var nt=I(z);return E.w(nt.date(nt.date()+Math.round(pt*B)),z)};if(V===u)return this.set(u,this.$M+B);if(V===p)return this.set(p,this.$y+B);if(V===l)return H(1);if(V===h)return H(7);var ut=(M={},M[n]=i,M[c]=a,M[o]=r,M)[V]||1,at=this.$d.getTime()+B*ut;return E.w(at,this)},L.subtract=function(B,F){return this.add(-1*B,F)},L.format=function(B){var F=this,M=this.$locale();if(!this.isValid())return M.invalidDate||m;var z=B||"YYYY-MM-DDTHH:mm:ssZ",V=E.z(this),H=this.$H,ut=this.$m,at=this.$M,pt=M.weekdays,nt=M.months,st=M.meridiem,ct=function(mt,St,ee,Kt){return mt&&(mt[St]||mt(F,z))||ee[St].slice(0,Kt)},gt=function(mt){return E.s(H%12||12,mt,"0")},yt=st||function(mt,St,ee){var Kt=mt<12?"AM":"PM";return ee?Kt.toLowerCase():Kt};return z.replace(x,function(mt,St){return St||function(ee){switch(ee){case"YY":return String(F.$y).slice(-2);case"YYYY":return E.s(F.$y,4,"0");case"M":return at+1;case"MM":return E.s(at+1,2,"0");case"MMM":return ct(M.monthsShort,at,nt,3);case"MMMM":return ct(nt,at);case"D":return F.$D;case"DD":return E.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return ct(M.weekdaysMin,F.$W,pt,2);case"ddd":return ct(M.weekdaysShort,F.$W,pt,3);case"dddd":return pt[F.$W];case"H":return String(H);case"HH":return E.s(H,2,"0");case"h":return gt(1);case"hh":return gt(2);case"a":return yt(H,ut,!0);case"A":return yt(H,ut,!1);case"m":return String(ut);case"mm":return E.s(ut,2,"0");case"s":return String(F.$s);case"ss":return E.s(F.$s,2,"0");case"SSS":return E.s(F.$ms,3,"0");case"Z":return V}return null}(mt)||V.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(B,F,M){var z,V=this,H=E.p(F),ut=I(B),at=(ut.utcOffset()-this.utcOffset())*i,pt=this-ut,nt=function(){return E.m(V,ut)};switch(H){case p:z=nt()/12;break;case u:z=nt();break;case f:z=nt()/3;break;case h:z=(pt-at)/6048e5;break;case l:z=(pt-at)/864e5;break;case c:z=pt/a;break;case n:z=pt/i;break;case o:z=pt/r;break;default:z=pt}return M?z:E.a(z)},L.daysInMonth=function(){return this.endOf(u).$D},L.$locale=function(){return C[this.$L]},L.locale=function(B,F){if(!B)return this.$L;var M=this.clone(),z=P(B,F,!0);return z&&(M.$L=z),M},L.clone=function(){return E.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},A}(),O=W.prototype;return I.prototype=O,[["$ms",s],["$s",o],["$m",n],["$H",c],["$W",l],["$M",u],["$y",p],["$D",g]].forEach(function(A){O[A[1]]=function(L){return this.$g(L,A[0],A[1])}}),I.extend=function(A,L){return A.$i||(A(L,W,I),A.$i=!0),I},I.locale=P,I.isDayjs=$,I.unix=function(A){return I(1e3*A)},I.en=C[w],I.Ls=C,I.p={},I})}(gi)),gi.exports}var qd=zd();const Hd=Md(qd);var wo=Object.defineProperty,d=(e,t)=>wo(e,"name",{value:t,configurable:!0}),jd=(e,t)=>{for(var r in t)wo(e,r,{get:t[r],enumerable:!0})},ge={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},D={trace:d((...e)=>{},"trace"),debug:d((...e)=>{},"debug"),info:d((...e)=>{},"info"),warn:d((...e)=>{},"warn"),error:d((...e)=>{},"error"),fatal:d((...e)=>{},"fatal")},Cs=d(function(e="fatal"){let t=ge.fatal;typeof e=="string"?e.toLowerCase()in ge&&(t=ge[e]):typeof e=="number"&&(t=e),D.trace=()=>{},D.debug=()=>{},D.info=()=>{},D.warn=()=>{},D.error=()=>{},D.fatal=()=>{},t<=ge.fatal&&(D.fatal=console.error?console.error.bind(console,Zt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Zt("FATAL"))),t<=ge.error&&(D.error=console.error?console.error.bind(console,Zt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Zt("ERROR"))),t<=ge.warn&&(D.warn=console.warn?console.warn.bind(console,Zt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Zt("WARN"))),t<=ge.info&&(D.info=console.info?console.info.bind(console,Zt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Zt("INFO"))),t<=ge.debug&&(D.debug=console.debug?console.debug.bind(console,Zt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Zt("DEBUG"))),t<=ge.trace&&(D.trace=console.debug?console.debug.bind(console,Zt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Zt("TRACE")))},"setLogLevel"),Zt=d(e=>`%c${Hd().format("ss.SSS")} : ${e} : `,"format");const mi={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+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const a=r<.5?r*(1+t):r+t-r*t,s=2*r-a;switch(i){case"r":return mi.hue2rgb(s,a,e+1/3)*255;case"g":return mi.hue2rgb(s,a,e)*255;case"b":return mi.hue2rgb(s,a,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const a=Math.max(e,t,r),s=Math.min(e,t,r),o=(a+s)/2;if(i==="l")return o*100;if(a===s)return 0;const n=a-s,c=o>.5?n/(2-a-s):n/(a+s);if(i==="s")return c*100;switch(a){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},Yd={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Ud={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},it={channel:mi,lang:Yd,unit:Ud},we={};for(let e=0;e<=255;e++)we[e]=it.unit.dec2hex(e);const Dt={ALL:0,RGB:1,HSL:2};class Gd{constructor(){this.type=Dt.ALL}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=Dt.ALL}is(t){return this.type===t}}class Vd{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Gd}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Dt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:a}=t;r===void 0&&(t.h=it.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=it.channel.rgb2hsl(t,"s")),a===void 0&&(t.l=it.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:a}=t;r===void 0&&(t.r=it.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=it.channel.hsl2rgb(t,"g")),a===void 0&&(t.b=it.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Dt.HSL)&&r!==void 0?r:(this._ensureHSL(),it.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Dt.HSL)&&r!==void 0?r:(this._ensureHSL(),it.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Dt.HSL)&&r!==void 0?r:(this._ensureHSL(),it.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Dt.RGB)&&r!==void 0?r:(this._ensureRGB(),it.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Dt.RGB)&&r!==void 0?r:(this._ensureRGB(),it.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Dt.RGB)&&r!==void 0?r:(this._ensureRGB(),it.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Dt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Dt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Dt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Dt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Dt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Dt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Gi=new Vd({r:0,g:0,b:0,a:0},"transparent"),rr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(rr.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,s=a%4===0,o=a>4,n=o?1:17,c=o?8:4,l=s?0:-1,h=o?255:15;return Gi.set({r:(i>>c*(l+3)&h)*n,g:(i>>c*(l+2)&h)*n,b:(i>>c*(l+1)&h)*n,a:s?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${we[Math.round(t)]}${we[Math.round(r)]}${we[Math.round(i)]}${we[Math.round(a*255)]}`:`#${we[Math.round(t)]}${we[Math.round(r)]}${we[Math.round(i)]}`}},Ie={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(Ie.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return it.channel.clamp.h(parseFloat(r)*.9);case"rad":return it.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return it.channel.clamp.h(parseFloat(r)*360)}}return it.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Ie.re);if(!r)return;const[,i,a,s,o,n]=r;return Gi.set({h:Ie._hue2deg(i),s:it.channel.clamp.s(parseFloat(a)),l:it.channel.clamp.l(parseFloat(s)),a:o?it.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${it.lang.round(t)}, ${it.lang.round(r)}%, ${it.lang.round(i)}%, ${a})`:`hsl(${it.lang.round(t)}, ${it.lang.round(r)}%, ${it.lang.round(i)}%)`}},Pr={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=Pr.colors[e];if(t)return rr.parse(t)},stringify:e=>{const t=rr.stringify(e);for(const r in Pr.colors)if(Pr.colors[r]===t)return r}},Dr={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(Dr.re);if(!r)return;const[,i,a,s,o,n,c,l,h]=r;return Gi.set({r:it.channel.clamp.r(a?parseFloat(i)*2.55:parseFloat(i)),g:it.channel.clamp.g(o?parseFloat(s)*2.55:parseFloat(s)),b:it.channel.clamp.b(c?parseFloat(n)*2.55:parseFloat(n)),a:l?it.channel.clamp.a(h?parseFloat(l)/100:parseFloat(l)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`rgba(${it.lang.round(t)}, ${it.lang.round(r)}, ${it.lang.round(i)}, ${it.lang.round(a)})`:`rgb(${it.lang.round(t)}, ${it.lang.round(r)}, ${it.lang.round(i)})`}},he={format:{keyword:Pr,hex:rr,rgb:Dr,rgba:Dr,hsl:Ie,hsla:Ie},parse:e=>{if(typeof e!="string")return e;const t=rr.parse(e)||Dr.parse(e)||Ie.parse(e)||Pr.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Dt.HSL)||e.data.r===void 0?Ie.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Dr.stringify(e):rr.stringify(e)},vo=(e,t)=>{const r=he.parse(e);for(const i in t)r[i]=it.channel.clamp[i](t[i]);return he.stringify(r)},Nr=(e,t,r=0,i=1)=>{if(typeof e!="number")return vo(e,{a:t});const a=Gi.set({r:it.channel.clamp.r(e),g:it.channel.clamp.g(t),b:it.channel.clamp.b(r),a:it.channel.clamp.a(i)});return he.stringify(a)},Xd=e=>{const{r:t,g:r,b:i}=he.parse(e),a=.2126*it.channel.toLinear(t)+.7152*it.channel.toLinear(r)+.0722*it.channel.toLinear(i);return it.lang.round(a)},Kd=e=>Xd(e)>=.5,Xr=e=>!Kd(e),_o=(e,t,r)=>{const i=he.parse(e),a=i[t],s=it.channel.clamp[t](a+r);return a!==s&&(i[t]=s),he.stringify(i)},j=(e,t)=>_o(e,"l",t),J=(e,t)=>_o(e,"l",-t),T=(e,t)=>{const r=he.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return vo(e,i)},Zd=(e,t,r=50)=>{const{r:i,g:a,b:s,a:o}=he.parse(e),{r:n,g:c,b:l,a:h}=he.parse(t),u=r/100,f=u*2-1,p=o-h,m=((f*p===-1?f:(f+p)/(1+f*p))+1)/2,y=1-m,x=i*m+n*y,b=a*m+c*y,S=s*m+l*y,v=o*u+h*(1-u);return Nr(x,b,S,v)},N=(e,t=100)=>{const r=he.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Zd(r,e,t)};/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */const{entries:To,setPrototypeOf:Cn,isFrozen:Qd,getPrototypeOf:Jd,getOwnPropertyDescriptor:tf}=Object;let{freeze:qt,seal:Qt,create:$a}=Object,{apply:Oa,construct:Ia}=typeof Reflect<"u"&&Reflect;qt||(qt=function(t){return t});Qt||(Qt=function(t){return t});Oa||(Oa=function(t,r){for(var i=arguments.length,a=new Array(i>2?i-2:0),s=2;s<i;s++)a[s-2]=arguments[s];return t.apply(r,a)});Ia||(Ia=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 new t(...i)});const ni=Ht(Array.prototype.forEach),ef=Ht(Array.prototype.lastIndexOf),Sn=Ht(Array.prototype.pop),_r=Ht(Array.prototype.push),rf=Ht(Array.prototype.splice),yi=Ht(String.prototype.toLowerCase),ya=Ht(String.prototype.toString),xa=Ht(String.prototype.match),Tr=Ht(String.prototype.replace),af=Ht(String.prototype.indexOf),sf=Ht(String.prototype.trim),re=Ht(Object.prototype.hasOwnProperty),Nt=Ht(RegExp.prototype.test),Br=nf(TypeError);function Ht(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return Oa(e,t,i)}}function nf(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Ia(e,r)}}function ot(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yi;Cn&&Cn(e,null);let i=t.length;for(;i--;){let a=t[i];if(typeof a=="string"){const s=r(a);s!==a&&(Qd(t)||(t[i]=s),a=s)}e[a]=!0}return e}function of(e){for(let t=0;t<e.length;t++)re(e,t)||(e[t]=null);return e}function me(e){const t=$a(null);for(const[r,i]of To(e))re(e,r)&&(Array.isArray(i)?t[r]=of(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=me(i):t[r]=i);return t}function Lr(e,t){for(;e!==null;){const i=tf(e,t);if(i){if(i.get)return Ht(i.get);if(typeof i.value=="function")return Ht(i.value)}e=Jd(e)}function r(){return null}return r}const kn=qt(["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","search","section","select","shadow","slot","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=qt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ca=qt(["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"]),lf=qt(["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"]),Sa=qt(["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"]),cf=qt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),wn=qt(["#text"]),vn=qt(["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","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","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","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),ka=qt(["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","mask-type","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"]),_n=qt(["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"]),oi=qt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),hf=Qt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),uf=Qt(/<%[\w\W]*|[\w\W]*%>/gm),df=Qt(/\$\{[\w\W]*/gm),ff=Qt(/^data-[\-\w.\u00B7-\uFFFF]+$/),pf=Qt(/^aria-[\-\w]+$/),Bo=Qt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),gf=Qt(/^(?:\w+script|data):/i),mf=Qt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Lo=Qt(/^html$/i),yf=Qt(/^[a-z][.\w]*(-[.\w]+)+$/i);var Tn=Object.freeze({__proto__:null,ARIA_ATTR:pf,ATTR_WHITESPACE:mf,CUSTOM_ELEMENT:yf,DATA_ATTR:ff,DOCTYPE_NAME:Lo,ERB_EXPR:uf,IS_ALLOWED_URI:Bo,IS_SCRIPT_OR_DATA:gf,MUSTACHE_EXPR:hf,TMPLIT_EXPR:df});const Mr={element:1,text:3,progressingInstruction:7,comment:8,document:9},xf=function(){return typeof window>"u"?null:window},bf=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(i=r.getAttribute(a));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Bn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Mo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:xf();const t=Q=>Mo(Q);if(t.version="3.3.0",t.removed=[],!e||!e.document||e.document.nodeType!==Mr.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,a=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:n,Element:c,NodeFilter:l,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:p}=e,g=c.prototype,m=Lr(g,"cloneNode"),y=Lr(g,"remove"),x=Lr(g,"nextSibling"),b=Lr(g,"childNodes"),S=Lr(g,"parentNode");if(typeof o=="function"){const Q=r.createElement("template");Q.content&&Q.content.ownerDocument&&(r=Q.content.ownerDocument)}let v,w="";const{implementation:C,createNodeIterator:_,createDocumentFragment:$,getElementsByTagName:P}=r,{importNode:I}=i;let E=Bn();t.isSupported=typeof To=="function"&&typeof S=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:W,ERB_EXPR:O,TMPLIT_EXPR:A,DATA_ATTR:L,ARIA_ATTR:B,IS_SCRIPT_OR_DATA:F,ATTR_WHITESPACE:M,CUSTOM_ELEMENT:z}=Tn;let{IS_ALLOWED_URI:V}=Tn,H=null;const ut=ot({},[...kn,...ba,...Ca,...Sa,...wn]);let at=null;const pt=ot({},[...vn,...ka,..._n,...oi]);let nt=Object.seal($a(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,ct=null;const gt=Object.seal($a(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let yt=!0,mt=!0,St=!1,ee=!0,Kt=!1,ke=!0,Fe=!1,la=!1,ca=!1,Ue=!1,ti=!1,ei=!1,Zs=!0,Qs=!1;const Sd="user-content-";let ha=!0,wr=!1,Ge={},Ve=null;const Js=ot({},["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 tn=null;const en=ot({},["audio","video","img","source","image","track"]);let ua=null;const rn=ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ri="http://www.w3.org/1998/Math/MathML",ii="http://www.w3.org/2000/svg",de="http://www.w3.org/1999/xhtml";let Xe=de,da=!1,fa=null;const kd=ot({},[ri,ii,de],ya);let ai=ot({},["mi","mo","mn","ms","mtext"]),si=ot({},["annotation-xml"]);const wd=ot({},["title","style","font","a","script"]);let vr=null;const vd=["application/xhtml+xml","text/html"],_d="text/html";let Lt=null,Ke=null;const Td=r.createElement("form"),an=function(k){return k instanceof RegExp||k instanceof Function},pa=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ke&&Ke===k)){if((!k||typeof k!="object")&&(k={}),k=me(k),vr=vd.indexOf(k.PARSER_MEDIA_TYPE)===-1?_d:k.PARSER_MEDIA_TYPE,Lt=vr==="application/xhtml+xml"?ya:yi,H=re(k,"ALLOWED_TAGS")?ot({},k.ALLOWED_TAGS,Lt):ut,at=re(k,"ALLOWED_ATTR")?ot({},k.ALLOWED_ATTR,Lt):pt,fa=re(k,"ALLOWED_NAMESPACES")?ot({},k.ALLOWED_NAMESPACES,ya):kd,ua=re(k,"ADD_URI_SAFE_ATTR")?ot(me(rn),k.ADD_URI_SAFE_ATTR,Lt):rn,tn=re(k,"ADD_DATA_URI_TAGS")?ot(me(en),k.ADD_DATA_URI_TAGS,Lt):en,Ve=re(k,"FORBID_CONTENTS")?ot({},k.FORBID_CONTENTS,Lt):Js,st=re(k,"FORBID_TAGS")?ot({},k.FORBID_TAGS,Lt):me({}),ct=re(k,"FORBID_ATTR")?ot({},k.FORBID_ATTR,Lt):me({}),Ge=re(k,"USE_PROFILES")?k.USE_PROFILES:!1,yt=k.ALLOW_ARIA_ATTR!==!1,mt=k.ALLOW_DATA_ATTR!==!1,St=k.ALLOW_UNKNOWN_PROTOCOLS||!1,ee=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Kt=k.SAFE_FOR_TEMPLATES||!1,ke=k.SAFE_FOR_XML!==!1,Fe=k.WHOLE_DOCUMENT||!1,Ue=k.RETURN_DOM||!1,ti=k.RETURN_DOM_FRAGMENT||!1,ei=k.RETURN_TRUSTED_TYPE||!1,ca=k.FORCE_BODY||!1,Zs=k.SANITIZE_DOM!==!1,Qs=k.SANITIZE_NAMED_PROPS||!1,ha=k.KEEP_CONTENT!==!1,wr=k.IN_PLACE||!1,V=k.ALLOWED_URI_REGEXP||Bo,Xe=k.NAMESPACE||de,ai=k.MATHML_TEXT_INTEGRATION_POINTS||ai,si=k.HTML_INTEGRATION_POINTS||si,nt=k.CUSTOM_ELEMENT_HANDLING||{},k.CUSTOM_ELEMENT_HANDLING&&an(k.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(nt.tagNameCheck=k.CUSTOM_ELEMENT_HANDLING.tagNameCheck),k.CUSTOM_ELEMENT_HANDLING&&an(k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(nt.attributeNameCheck=k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(nt.allowCustomizedBuiltInElements=k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Kt&&(mt=!1),ti&&(Ue=!0),Ge&&(H=ot({},wn),at=[],Ge.html===!0&&(ot(H,kn),ot(at,vn)),Ge.svg===!0&&(ot(H,ba),ot(at,ka),ot(at,oi)),Ge.svgFilters===!0&&(ot(H,Ca),ot(at,ka),ot(at,oi)),Ge.mathMl===!0&&(ot(H,Sa),ot(at,_n),ot(at,oi))),k.ADD_TAGS&&(typeof k.ADD_TAGS=="function"?gt.tagCheck=k.ADD_TAGS:(H===ut&&(H=me(H)),ot(H,k.ADD_TAGS,Lt))),k.ADD_ATTR&&(typeof k.ADD_ATTR=="function"?gt.attributeCheck=k.ADD_ATTR:(at===pt&&(at=me(at)),ot(at,k.ADD_ATTR,Lt))),k.ADD_URI_SAFE_ATTR&&ot(ua,k.ADD_URI_SAFE_ATTR,Lt),k.FORBID_CONTENTS&&(Ve===Js&&(Ve=me(Ve)),ot(Ve,k.FORBID_CONTENTS,Lt)),ha&&(H["#text"]=!0),Fe&&ot(H,["html","head","body"]),H.table&&(ot(H,["tbody"]),delete st.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw Br('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Br('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=k.TRUSTED_TYPES_POLICY,w=v.createHTML("")}else v===void 0&&(v=bf(p,a)),v!==null&&typeof w=="string"&&(w=v.createHTML(""));qt&&qt(k),Ke=k}},sn=ot({},[...ba,...Ca,...lf]),nn=ot({},[...Sa,...cf]),Bd=function(k){let R=S(k);(!R||!R.tagName)&&(R={namespaceURI:Xe,tagName:"template"});const K=yi(k.tagName),xt=yi(R.tagName);return fa[k.namespaceURI]?k.namespaceURI===ii?R.namespaceURI===de?K==="svg":R.namespaceURI===ri?K==="svg"&&(xt==="annotation-xml"||ai[xt]):!!sn[K]:k.namespaceURI===ri?R.namespaceURI===de?K==="math":R.namespaceURI===ii?K==="math"&&si[xt]:!!nn[K]:k.namespaceURI===de?R.namespaceURI===ii&&!si[xt]||R.namespaceURI===ri&&!ai[xt]?!1:!nn[K]&&(wd[K]||!sn[K]):!!(vr==="application/xhtml+xml"&&fa[k.namespaceURI]):!1},ne=function(k){_r(t.removed,{element:k});try{S(k).removeChild(k)}catch{y(k)}},De=function(k,R){try{_r(t.removed,{attribute:R.getAttributeNode(k),from:R})}catch{_r(t.removed,{attribute:null,from:R})}if(R.removeAttribute(k),k==="is")if(Ue||ti)try{ne(R)}catch{}else try{R.setAttribute(k,"")}catch{}},on=function(k){let R=null,K=null;if(ca)k="<remove></remove>"+k;else{const kt=xa(k,/^[\r\n\t ]+/);K=kt&&kt[0]}vr==="application/xhtml+xml"&&Xe===de&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const xt=v?v.createHTML(k):k;if(Xe===de)try{R=new f().parseFromString(xt,vr)}catch{}if(!R||!R.documentElement){R=C.createDocument(Xe,"template",null);try{R.documentElement.innerHTML=da?w:xt}catch{}}const Ft=R.body||R.documentElement;return k&&K&&Ft.insertBefore(r.createTextNode(K),Ft.childNodes[0]||null),Xe===de?P.call(R,Fe?"html":"body")[0]:Fe?R.documentElement:Ft},ln=function(k){return _.call(k.ownerDocument||k,k,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},ga=function(k){return k instanceof u&&(typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||!(k.attributes instanceof h)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function")},cn=function(k){return typeof n=="function"&&k instanceof n};function fe(Q,k,R){ni(Q,K=>{K.call(t,k,R,Ke)})}const hn=function(k){let R=null;if(fe(E.beforeSanitizeElements,k,null),ga(k))return ne(k),!0;const K=Lt(k.nodeName);if(fe(E.uponSanitizeElement,k,{tagName:K,allowedTags:H}),ke&&k.hasChildNodes()&&!cn(k.firstElementChild)&&Nt(/<[/\w!]/g,k.innerHTML)&&Nt(/<[/\w!]/g,k.textContent)||k.nodeType===Mr.progressingInstruction||ke&&k.nodeType===Mr.comment&&Nt(/<[/\w]/g,k.data))return ne(k),!0;if(!(gt.tagCheck instanceof Function&&gt.tagCheck(K))&&(!H[K]||st[K])){if(!st[K]&&dn(K)&&(nt.tagNameCheck instanceof RegExp&&Nt(nt.tagNameCheck,K)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(K)))return!1;if(ha&&!Ve[K]){const xt=S(k)||k.parentNode,Ft=b(k)||k.childNodes;if(Ft&&xt){const kt=Ft.length;for(let jt=kt-1;jt>=0;--jt){const pe=m(Ft[jt],!0);pe.__removalCount=(k.__removalCount||0)+1,xt.insertBefore(pe,x(k))}}}return ne(k),!0}return k instanceof c&&!Bd(k)||(K==="noscript"||K==="noembed"||K==="noframes")&&Nt(/<\/no(script|embed|frames)/i,k.innerHTML)?(ne(k),!0):(Kt&&k.nodeType===Mr.text&&(R=k.textContent,ni([W,O,A],xt=>{R=Tr(R,xt," ")}),k.textContent!==R&&(_r(t.removed,{element:k.cloneNode()}),k.textContent=R)),fe(E.afterSanitizeElements,k,null),!1)},un=function(k,R,K){if(Zs&&(R==="id"||R==="name")&&(K in r||K in Td))return!1;if(!(mt&&!ct[R]&&Nt(L,R))){if(!(yt&&Nt(B,R))){if(!(gt.attributeCheck instanceof Function&&gt.attributeCheck(R,k))){if(!at[R]||ct[R]){if(!(dn(k)&&(nt.tagNameCheck instanceof RegExp&&Nt(nt.tagNameCheck,k)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(k))&&(nt.attributeNameCheck instanceof RegExp&&Nt(nt.attributeNameCheck,R)||nt.attributeNameCheck instanceof Function&&nt.attributeNameCheck(R,k))||R==="is"&&nt.allowCustomizedBuiltInElements&&(nt.tagNameCheck instanceof RegExp&&Nt(nt.tagNameCheck,K)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(K))))return!1}else if(!ua[R]){if(!Nt(V,Tr(K,M,""))){if(!((R==="src"||R==="xlink:href"||R==="href")&&k!=="script"&&af(K,"data:")===0&&tn[k])){if(!(St&&!Nt(F,Tr(K,M,"")))){if(K)return!1}}}}}}}return!0},dn=function(k){return k!=="annotation-xml"&&xa(k,z)},fn=function(k){fe(E.beforeSanitizeAttributes,k,null);const{attributes:R}=k;if(!R||ga(k))return;const K={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:at,forceKeepAttr:void 0};let xt=R.length;for(;xt--;){const Ft=R[xt],{name:kt,namespaceURI:jt,value:pe}=Ft,Ze=Lt(kt),ma=pe;let Mt=kt==="value"?ma:sf(ma);if(K.attrName=Ze,K.attrValue=Mt,K.keepAttr=!0,K.forceKeepAttr=void 0,fe(E.uponSanitizeAttribute,k,K),Mt=K.attrValue,Qs&&(Ze==="id"||Ze==="name")&&(De(kt,k),Mt=Sd+Mt),ke&&Nt(/((--!?|])>)|<\/(style|title|textarea)/i,Mt)){De(kt,k);continue}if(Ze==="attributename"&&xa(Mt,"href")){De(kt,k);continue}if(K.forceKeepAttr)continue;if(!K.keepAttr){De(kt,k);continue}if(!ee&&Nt(/\/>/i,Mt)){De(kt,k);continue}Kt&&ni([W,O,A],gn=>{Mt=Tr(Mt,gn," ")});const pn=Lt(k.nodeName);if(!un(pn,Ze,Mt)){De(kt,k);continue}if(v&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!jt)switch(p.getAttributeType(pn,Ze)){case"TrustedHTML":{Mt=v.createHTML(Mt);break}case"TrustedScriptURL":{Mt=v.createScriptURL(Mt);break}}if(Mt!==ma)try{jt?k.setAttributeNS(jt,kt,Mt):k.setAttribute(kt,Mt),ga(k)?ne(k):Sn(t.removed)}catch{De(kt,k)}}fe(E.afterSanitizeAttributes,k,null)},Ld=function Q(k){let R=null;const K=ln(k);for(fe(E.beforeSanitizeShadowDOM,k,null);R=K.nextNode();)fe(E.uponSanitizeShadowNode,R,null),hn(R),fn(R),R.content instanceof s&&Q(R.content);fe(E.afterSanitizeShadowDOM,k,null)};return t.sanitize=function(Q){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=null,K=null,xt=null,Ft=null;if(da=!Q,da&&(Q="<!-->"),typeof Q!="string"&&!cn(Q))if(typeof Q.toString=="function"){if(Q=Q.toString(),typeof Q!="string")throw Br("dirty is not a string, aborting")}else throw Br("toString is not a function");if(!t.isSupported)return Q;if(la||pa(k),t.removed=[],typeof Q=="string"&&(wr=!1),wr){if(Q.nodeName){const pe=Lt(Q.nodeName);if(!H[pe]||st[pe])throw Br("root node is forbidden and cannot be sanitized in-place")}}else if(Q instanceof n)R=on("<!---->"),K=R.ownerDocument.importNode(Q,!0),K.nodeType===Mr.element&&K.nodeName==="BODY"||K.nodeName==="HTML"?R=K:R.appendChild(K);else{if(!Ue&&!Kt&&!Fe&&Q.indexOf("<")===-1)return v&&ei?v.createHTML(Q):Q;if(R=on(Q),!R)return Ue?null:ei?w:""}R&&ca&&ne(R.firstChild);const kt=ln(wr?Q:R);for(;xt=kt.nextNode();)hn(xt),fn(xt),xt.content instanceof s&&Ld(xt.content);if(wr)return Q;if(Ue){if(ti)for(Ft=$.call(R.ownerDocument);R.firstChild;)Ft.appendChild(R.firstChild);else Ft=R;return(at.shadowroot||at.shadowrootmode)&&(Ft=I.call(i,Ft,!0)),Ft}let jt=Fe?R.outerHTML:R.innerHTML;return Fe&&H["!doctype"]&&R.ownerDocument&&R.ownerDocument.doctype&&R.ownerDocument.doctype.name&&Nt(Lo,R.ownerDocument.doctype.name)&&(jt="<!DOCTYPE "+R.ownerDocument.doctype.name+`>
3
+ `+jt),Kt&&ni([W,O,A],pe=>{jt=Tr(jt,pe," ")}),v&&ei?v.createHTML(jt):jt},t.setConfig=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};pa(Q),la=!0},t.clearConfig=function(){Ke=null,la=!1},t.isValidAttribute=function(Q,k,R){Ke||pa({});const K=Lt(Q),xt=Lt(k);return un(K,xt,R)},t.addHook=function(Q,k){typeof k=="function"&&_r(E[Q],k)},t.removeHook=function(Q,k){if(k!==void 0){const R=ef(E[Q],k);return R===-1?void 0:rf(E[Q],R,1)[0]}return Sn(E[Q])},t.removeHooks=function(Q){E[Q]=[]},t.removeAllHooks=function(){E=Bn()},t}var dr=Mo(),Ao=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Wr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Cf=/\s*%%.*\n/gm,ar,Eo=(ar=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},d(ar,"UnknownDiagramError"),ar),ze={},Ss=d(function(e,t){e=e.replace(Ao,"").replace(Wr,"").replace(Cf,`
4
+ `);for(const[r,{detector:i}]of Object.entries(ze))if(i(e,t))return r;throw new Eo(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ra=d((...e)=>{for(const{id:t,detector:r,loader:i}of e)Fo(t,r,i)},"registerLazyLoadedDiagrams"),Fo=d((e,t,r)=>{ze[e]&&D.warn(`Detector with key ${e} already exists. Overwriting.`),ze[e]={detector:t,loader:r},D.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Sf=d(e=>ze[e].loader,"getDiagramLoader"),Pa=d((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>Pa(e,s,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),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(s=>{typeof t[s]=="object"&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=Pa(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),_t=Pa,Vi="#ffffff",Xi="#f2f2f2",Wt=d((e,t)=>t?T(e,{s:-40,l:10}):T(e,{s:-40,l:-10}),"mkBorder"),sr,kf=(sr=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,s,o,n,c,l,h,u,f,p,g,m,y,x,b,S,v,w,C;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||Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(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?J(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||J(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(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||j(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.vertLineColor=this.vertLineColor||"navy",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||J(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||J(this.mainBkg,10)):(this.rowOdd=this.rowOdd||j(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||j(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 _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=J(this["cScale"+_],75);else for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=J(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||N(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||j(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||J(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||T(this.mainBkg,{h:180,s:-15,l:t*(5+_*3)}),this["surfacePeer"+_]=this["surfacePeer"+_]||T(this.mainBkg,{h:180,s:-15,l:t*(8+_*3)});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:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((c=this.radar)==null?void 0:c.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((u=this.radar)==null?void 0:u.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||Xr(this.quadrant1Fill)?j(this.quadrant1Fill):J(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:((f=this.xyChart)==null?void 0:f.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:((m=this.xyChart)==null?void 0:m.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((y=this.xyChart)==null?void 0:y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((x=this.xyChart)==null?void 0:x.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((b=this.xyChart)==null?void 0:b.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((S=this.xyChart)==null?void 0:S.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((v=this.xyChart)==null?void 0:v.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((w=this.xyChart)==null?void 0:w.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.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?J(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=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)):(this.git0=J(this.git0,25),this.git1=J(this.git1,25),this.git2=J(this.git2,25),this.git3=J(this.git3,25),this.git4=J(this.git4,25),this.git5=J(this.git5,25),this.git6=J(this.git6,25),this.git7=J(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(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||Vi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xi}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(sr,"Theme"),sr),wf=d(e=>{const t=new kf;return t.calculate(e),t},"getThemeVariables"),nr,vf=(nr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=j(this.primaryColor,16),this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.background),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=j(N("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Nr(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=J("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=J(this.sectionBkgColor,10),this.taskBorderColor=Nr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Nr(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.vertLineColor="#00BFFF",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||j(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||J(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,r,i,a,s,o,n,c,l,h,u,f,p,g,m,y,x,b,S,v,w;this.secondBkg=j(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=j(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=j(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 C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||N(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScalePeer"+C]=this["cScalePeer"+C]||j(this["cScale"+C],10);for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||T(this.mainBkg,{h:30,s:-30,l:-(-10+C*4)}),this["surfacePeer"+C]=this["surfacePeer"+C]||T(this.mainBkg,{h:30,s:-30,l:-(-7+C*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+C]=this["cScale"+C];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||Xr(this.quadrant1Fill)?j(this.quadrant1Fill):J(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:((s=this.xyChart)==null?void 0:s.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.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:((f=this.radar)==null?void 0:f.axisColor)||this.lineColor,axisStrokeWidth:((p=this.radar)==null?void 0:p.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((y=this.radar)==null?void 0:y.curveStrokeWidth)||2,graticuleColor:((x=this.radar)==null?void 0:x.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((S=this.radar)==null?void 0:S.graticuleOpacity)||.3,legendBoxSize:((v=this.radar)==null?void 0:v.legendBoxSize)||12,legendFontSize:((w=this.radar)==null?void 0:w.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?J(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=j(this.secondaryColor,20),this.git1=j(this.pie2||this.secondaryColor,20),this.git2=j(this.pie3||this.tertiaryColor,20),this.git3=j(this.pie4||T(this.primaryColor,{h:-30}),20),this.git4=j(this.pie5||T(this.primaryColor,{h:-60}),20),this.git5=j(this.pie6||T(this.primaryColor,{h:-90}),10),this.git6=j(this.pie7||T(this.primaryColor,{h:60}),10),this.git7=j(this.pie8||T(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(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||j(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||j(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(nr,"Theme"),nr),_f=d(e=>{const t=new vf;return t.calculate(e),t},"getThemeVariables"),or,Tf=(or=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=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(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.vertLineColor="calculated",this.sectionBkgColor=Nr(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.vertLineColor="navy",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,s,o,n,c,l,h,u,f,p,g,m,y,x,b,S,v,w;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||J(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||J(this.tertiaryColor,40);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=J(this["cScale"+C],10),this["cScalePeer"+C]=this["cScalePeer"+C]||J(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||T(this["cScale"+C],{h:180});for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||T(this.mainBkg,{h:30,l:-(5+C*5)}),this["surfacePeer"+C]=this["surfacePeer"+C]||T(this.mainBkg,{h:30,l:-(7+C*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||N(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||N(this.labelTextColor);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||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=j(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||j(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||j(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||Xr(this.quadrant1Fill)?j(this.quadrant1Fill):J(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:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((l=this.radar)==null?void 0:l.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,xAxisTitleColor:((p=this.xyChart)==null?void 0:p.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((g=this.xyChart)==null?void 0:g.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((x=this.xyChart)==null?void 0:x.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((S=this.xyChart)==null?void 0:S.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((w=this.xyChart)==null?void 0:w.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=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)):(this.git0=J(this.git0,25),this.git1=J(this.git1,25),this.git2=J(this.git2,25),this.git3=J(this.git3,25),this.git4=J(this.git4,25),this.git5=J(this.git5,25),this.git6=J(this.git6,25),this.git7=J(this.git7,25)),this.gitInv0=this.gitInv0||J(N(this.git0),25),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(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||Vi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xi}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(or,"Theme"),or),Bf=d(e=>{const t=new Tf;return t.calculate(e),t},"getThemeVariables"),lr,Lf=(lr=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=j("#cde498",10),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.primaryColor),this.lineColor=N(this.background),this.textColor=N(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.vertLineColor="#00BFFF",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,s,o,n,c,l,h,u,f,p,g,m,y,x,b,S,v,w;this.actorBorder=J(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||J(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||J(this.tertiaryColor,40);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=J(this["cScale"+C],10),this["cScalePeer"+C]=this["cScalePeer"+C]||J(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||T(this["cScale"+C],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||T(this.mainBkg,{h:30,s:-30,l:-(5+C*5)}),this["surfacePeer"+C]=this["surfacePeer"+C]||T(this.mainBkg,{h:30,s:-30,l:-(8+C*5)});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||j(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||j(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||Xr(this.quadrant1Fill)?j(this.quadrant1Fill):J(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:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((l=this.radar)==null?void 0:l.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,xAxisTitleColor:((p=this.xyChart)==null?void 0:p.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((g=this.xyChart)==null?void 0:g.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((x=this.xyChart)==null?void 0:x.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((S=this.xyChart)==null?void 0:S.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((w=this.xyChart)==null?void 0:w.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=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)):(this.git0=J(this.git0,25),this.git1=J(this.git1,25),this.git2=J(this.git2,25),this.git3=J(this.git3,25),this.git4=J(this.git4,25),this.git5=J(this.git5,25),this.git6=J(this.git6,25),this.git7=J(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(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||Vi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xi}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(lr,"Theme"),lr),Mf=d(e=>{const t=new Lf;return t.calculate(e),t},"getThemeVariables"),cr,Af=(cr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=j(this.contrast,55),this.background="#ffffff",this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(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.vertLineColor="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||j(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,a,s,o,n,c,l,h,u,f,p,g,m,y,x,b,S,v,w;this.secondBkg=j(this.contrast,55),this.border2=this.contrast,this.actorBorder=j(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 C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||N(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||j(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||J(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||T(this.mainBkg,{l:-(5+C*5)}),this["surfacePeer"+C]=this["surfacePeer"+C]||T(this.mainBkg,{l:-(8+C*5)});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=j(this.contrast,30),this.sectionBkgColor2=j(this.contrast,30),this.taskBorderColor=J(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=j(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=J(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=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 C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+C]=this["cScale"+C];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||Xr(this.quadrant1Fill)?j(this.quadrant1Fill):J(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:((s=this.xyChart)==null?void 0:s.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((f=this.radar)==null?void 0:f.axisColor)||this.lineColor,axisStrokeWidth:((p=this.radar)==null?void 0:p.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((y=this.radar)==null?void 0:y.curveStrokeWidth)||2,graticuleColor:((x=this.radar)==null?void 0:x.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((S=this.radar)==null?void 0:S.graticuleOpacity)||.3,legendBoxSize:((v=this.radar)==null?void 0:v.legendBoxSize)||12,legendFontSize:((w=this.radar)==null?void 0:w.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=J(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||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(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||Vi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xi}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(cr,"Theme"),cr),Ef=d(e=>{const t=new Af;return t.calculate(e),t},"getThemeVariables"),be={base:{getThemeVariables:wf},dark:{getThemeVariables:_f},default:{getThemeVariables:Bf},forest:{getThemeVariables:Mf},neutral:{getThemeVariables:Ef}},oe={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,inheritDir:!1},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,maxLabelWidth:360,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"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},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,showDataLabel:!1,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,layoutAlgorithm:"cose-bilkent"},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},Do={...oe,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:be.default.getThemeVariables(),sequence:{...oe.sequence,messageFont:d(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:d(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:d(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...oe.gantt,tickInterval:void 0,useWidth:void 0},c4:{...oe.c4,useWidth:void 0,personFont:d(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...oe.flowchart,inheritDir:!1},external_personFont:d(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:d(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:d(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:d(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:d(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:d(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:d(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:d(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:d(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:d(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:d(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:d(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:d(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:d(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:d(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:d(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:d(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:d(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:d(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:d(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:d(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...oe.pie,useWidth:984},xyChart:{...oe.xyChart,useWidth:void 0},requirement:{...oe.requirement,useWidth:void 0},packet:{...oe.packet},radar:{...oe.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},$o=d((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...$o(e[i],"")]:[...r,t+i],[]),"keyify"),Ff=new Set($o(Do,"")),Oo=Do,Li=d(e=>{if(D.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Li(t));return}for(const t of Object.keys(e)){if(D.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Ff.has(t)||e[t]==null){D.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){D.debug("sanitizing object",t),Li(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(D.debug("sanitizing css option",t),e[t]=Df(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]="")}D.debug("After sanitization",e)}},"sanitizeDirective"),Df=d(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"),fr=Object.freeze(Oo),Ut=_t({},fr),Mi,qe=[],zr=_t({},fr),Ki=d((e,t)=>{let r=_t({},e),i={};for(const a of t)Po(a),i=_t(i,a);if(r=_t(r,i),i.theme&&i.theme in be){const a=_t({},Mi),s=_t(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in be&&(r.themeVariables=be[r.theme].getThemeVariables(s))}return zr=r,No(zr),zr},"updateCurrentConfig"),$f=d(e=>(Ut=_t({},fr),Ut=_t(Ut,e),e.theme&&be[e.theme]&&(Ut.themeVariables=be[e.theme].getThemeVariables(e.themeVariables)),Ki(Ut,qe),Ut),"setSiteConfig"),Of=d(e=>{Mi=_t({},e)},"saveConfigFromInitialize"),If=d(e=>(Ut=_t(Ut,e),Ki(Ut,qe),Ut),"updateSiteConfig"),Io=d(()=>_t({},Ut),"getSiteConfig"),Ro=d(e=>(No(e),_t(zr,e),Ot()),"setConfig"),Ot=d(()=>_t({},zr),"getConfig"),Po=d(e=>{e&&(["secure",...Ut.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(D.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"&&Po(e[t])}))},"sanitize"),Rf=d(e=>{var t;Li(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),qe.push(e),Ki(Ut,qe)},"addDirective"),Ai=d((e=Ut)=>{qe=[],Ki(e,qe)},"reset"),Pf={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Ln={},Nf=d(e=>{Ln[e]||(D.warn(Pf[e]),Ln[e]=!0)},"issueWarning"),No=d(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Nf("LAZY_LOAD_DEPRECATED")},"checkConfig"),Ob=d(()=>{let e={};Mi&&(e=_t(e,Mi));for(const t of qe)e=_t(e,t);return e},"getUserDefinedConfig"),Kr=/<br\s*\/?>/gi,Wf=d(e=>e?qo(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),zf=(()=>{let e=!1;return()=>{e||(Wo(),e=!0)}})();function Wo(){const e="data-temp-href-target";dr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),dr.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}d(Wo,"setupDompurifyHooks");var zo=d(e=>(zf(),dr.sanitize(e)),"removeScript"),Mn=d((e,t)=>{var r;if(((r=t.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=t.securityLevel;i==="antiscript"||i==="strict"?e=zo(e):i!=="loose"&&(e=qo(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=Yf(e))}return e},"sanitizeMore"),Jt=d((e,t)=>e&&(t.dompurifyConfig?e=dr.sanitize(Mn(e,t),t.dompurifyConfig).toString():e=dr.sanitize(Mn(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),qf=d((e,t)=>typeof e=="string"?Jt(e,t):e.flat().map(r=>Jt(r,t)),"sanitizeTextOrArray"),Hf=d(e=>Kr.test(e),"hasBreaks"),jf=d(e=>e.split(Kr),"splitBreaks"),Yf=d(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),qo=d(e=>e.replace(Kr,"#br#"),"breakToPlaceholder"),Uf=d(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Bt=d(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Gf=d(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Vf=d(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),An=d(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 s=t[i-1],o=t[i+1];Xf(s,o)&&(a=s+","+o,i++,r.pop())}r.push(Kf(a))}return r.join("")},"parseGenericTypes"),Na=d((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Xf=d((e,t)=>{const r=Na(e,"~"),i=Na(t,"~");return r===1&&i===1},"shouldCombineSets"),Kf=d(e=>{const t=Na(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("~"),s=i.lastIndexOf("~");for(;a!==-1&&s!==-1&&a!==s;)i[a]="<",i[s]=">",a=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),En=d(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Wa=/\$\$(.*)\$\$/g,pr=d(e=>{var t;return(((t=e.match(Wa))==null?void 0:t.length)??0)>0},"hasKatex"),Ib=d(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await ks(e,t),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"),Zf=d(async(e,t)=>{if(!pr(e))return e;if(!(En()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Wa,"MathML is unsupported in this environment.");{const{default:r}=await ft(async()=>{const{default:a}=await import("./index-Dyga3lv6.js").then(s=>s.b1);return{default:a}},__vite__mapDeps([0,1])),i=t.forceLegacyMathML||!En()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Kr).map(a=>pr(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(Wa,(a,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),ks=d(async(e,t)=>Jt(await Zf(e,t),t),"renderKatexSanitized"),br={getRows:Wf,sanitizeText:Jt,sanitizeTextOrArray:qf,hasBreaks:Hf,splitBreaks:jf,lineBreakRegex:Kr,removeScript:zo,getUrl:Uf,evaluate:Bt,getMax:Gf,getMin:Vf},Qf=d(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Jf=d(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"),Ho=d(function(e,t,r,i){const a=Jf(t,r,i);Qf(e,a)},"configureSvgSize"),tp=d(function(e,t,r,i){const a=t.node().getBBox(),s=a.width,o=a.height;D.info(`SVG bounds: ${s}x${o}`,a);let n=0,c=0;D.info(`Graph bounds: ${n}x${c}`,e),n=s+r*2,c=o+r*2,D.info(`Calculated bounds: ${n}x${c}`),Ho(t,c,n,i);const l=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",l)},"setupGraphViewbox"),xi={},ep=d((e,t,r)=>{let i="";return e in xi&&xi[e]?i=xi[e](r):D.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"),rp=d((e,t)=>{t!==void 0&&(xi[e]=t)},"addStylesForDiagram"),ip=ep,jo={};jd(jo,{clear:()=>ap,getAccDescription:()=>lp,getAccTitle:()=>np,getDiagramTitle:()=>hp,setAccDescription:()=>op,setAccTitle:()=>sp,setDiagramTitle:()=>cp});var ws="",vs="",_s="",Ts=d(e=>Jt(e,Ot()),"sanitizeText"),ap=d(()=>{ws="",_s="",vs=""},"clear"),sp=d(e=>{ws=Ts(e).replace(/^\s+/g,"")},"setAccTitle"),np=d(()=>ws,"getAccTitle"),op=d(e=>{_s=Ts(e).replace(/\n\s+/g,`
81
+ `)},"setAccDescription"),lp=d(()=>_s,"getAccDescription"),cp=d(e=>{vs=Ts(e)},"setDiagramTitle"),hp=d(()=>vs,"getDiagramTitle"),Fn=D,up=Cs,dt=Ot,Rb=Ro,Pb=fr,Bs=d(e=>Jt(e,dt()),"sanitizeText"),dp=tp,fp=d(()=>jo,"getCommonDb"),Ei={},Fi=d((e,t,r)=>{var i;Ei[e]&&Fn.warn(`Diagram with id ${e} already registered. Overwriting.`),Ei[e]=t,r&&Fo(e,r),rp(e,t.styles),(i=t.injectUtils)==null||i.call(t,Fn,up,dt,Bs,dp,fp(),()=>{})},"registerDiagram"),za=d(e=>{if(e in Ei)return Ei[e];throw new pp(e)},"getDiagram"),hr,pp=(hr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},d(hr,"DiagramNotFoundError"),hr),gp=d(e=>{var a;const{securityLevel:t}=dt();let r=ht("body");if(t==="sandbox"){const o=((a=ht(`#i${e}`).node())==null?void 0:a.contentDocument)??document;r=ht(o.body)}return r.select(`#${e}`)},"selectSvgElement");function Ls(e){return typeof e>"u"||e===null}d(Ls,"isNothing");function Yo(e){return typeof e=="object"&&e!==null}d(Yo,"isObject");function Uo(e){return Array.isArray(e)?e:Ls(e)?[]:[e]}d(Uo,"toArray");function Go(e,t){var r,i,a,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)a=s[r],e[a]=t[a];return e}d(Go,"extend");function Vo(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}d(Vo,"repeat");function Xo(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}d(Xo,"isNegativeZero");var mp=Ls,yp=Yo,xp=Uo,bp=Vo,Cp=Xo,Sp=Go,Tt={isNothing:mp,isObject:yp,toArray:xp,repeat:bp,isNegativeZero:Cp,extend:Sp};function Ms(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}d(Ms,"formatError");function gr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Ms(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}d(gr,"YAMLException$1");gr.prototype=Object.create(Error.prototype);gr.prototype.constructor=gr;gr.prototype.toString=d(function(t){return this.name+": "+Ms(this,t)},"toString");var Gt=gr;function bi(e,t,r,i,a){var s="",o="",n=Math.floor(a/2)-1;return i-t>n&&(s=" ... ",t=i-n+s.length),r-i>n&&(o=" ...",r=i+n-o.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+s.length}}d(bi,"getLine");function Ci(e,t){return Tt.repeat(" ",t-e.length)+e}d(Ci,"padStart");function Ko(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=/\r?\n|\r|\0/g,i=[0],a=[],s,o=-1;s=r.exec(e.buffer);)a.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var n="",c,l,h=Math.min(e.line+t.linesAfter,a.length).toString().length,u=t.maxLength-(t.indent+h+3);for(c=1;c<=t.linesBefore&&!(o-c<0);c++)l=bi(e.buffer,i[o-c],a[o-c],e.position-(i[o]-i[o-c]),u),n=Tt.repeat(" ",t.indent)+Ci((e.line-c+1).toString(),h)+" | "+l.str+`
84
+ `+n;for(l=bi(e.buffer,i[o],a[o],e.position,u),n+=Tt.repeat(" ",t.indent)+Ci((e.line+1).toString(),h)+" | "+l.str+`
85
+ `,n+=Tt.repeat("-",t.indent+h+3+l.pos)+`^
86
+ `,c=1;c<=t.linesAfter&&!(o+c>=a.length);c++)l=bi(e.buffer,i[o+c],a[o+c],e.position-(i[o]-i[o+c]),u),n+=Tt.repeat(" ",t.indent)+Ci((e.line+c+1).toString(),h)+" | "+l.str+`
87
+ `;return n.replace(/\n$/,"")}d(Ko,"makeSnippet");var kp=Ko,wp=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],vp=["scalar","sequence","mapping"];function Zo(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}d(Zo,"compileStyleAliases");function Qo(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(wp.indexOf(r)===-1)throw new Gt('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=Zo(t.styleAliases||null),vp.indexOf(this.kind)===-1)throw new Gt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}d(Qo,"Type$1");var It=Qo;function qa(e,t){var r=[];return e[t].forEach(function(i){var a=r.length;r.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(a=o)}),r[a]=i}),r}d(qa,"compileList");function Jo(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(a){a.multi?(e.multi[a.kind].push(a),e.multi.fallback.push(a)):e[a.kind][a.tag]=e.fallback[a.tag]=a}for(d(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}d(Jo,"compileMap");function Di(e){return this.extend(e)}d(Di,"Schema$1");Di.prototype.extend=d(function(t){var r=[],i=[];if(t instanceof It)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new Gt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof It))throw new Gt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new Gt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new Gt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof It))throw new Gt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(Di.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(i),a.compiledImplicit=qa(a,"implicit"),a.compiledExplicit=qa(a,"explicit"),a.compiledTypeMap=Jo(a.compiledImplicit,a.compiledExplicit),a},"extend");var _p=Di,Tp=new It("tag:yaml.org,2002:str",{kind:"scalar",construct:d(function(e){return e!==null?e:""},"construct")}),Bp=new It("tag:yaml.org,2002:seq",{kind:"sequence",construct:d(function(e){return e!==null?e:[]},"construct")}),Lp=new It("tag:yaml.org,2002:map",{kind:"mapping",construct:d(function(e){return e!==null?e:{}},"construct")}),Mp=new _p({explicit:[Tp,Bp,Lp]});function tl(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}d(tl,"resolveYamlNull");function el(){return null}d(el,"constructYamlNull");function rl(e){return e===null}d(rl,"isNull");var Ap=new It("tag:yaml.org,2002:null",{kind:"scalar",resolve:tl,construct:el,predicate:rl,represent:{canonical:d(function(){return"~"},"canonical"),lowercase:d(function(){return"null"},"lowercase"),uppercase:d(function(){return"NULL"},"uppercase"),camelcase:d(function(){return"Null"},"camelcase"),empty:d(function(){return""},"empty")},defaultStyle:"lowercase"});function il(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")}d(il,"resolveYamlBoolean");function al(e){return e==="true"||e==="True"||e==="TRUE"}d(al,"constructYamlBoolean");function sl(e){return Object.prototype.toString.call(e)==="[object Boolean]"}d(sl,"isBoolean");var Ep=new It("tag:yaml.org,2002:bool",{kind:"scalar",resolve:il,construct:al,predicate:sl,represent:{lowercase:d(function(e){return e?"true":"false"},"lowercase"),uppercase:d(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:d(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function nl(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}d(nl,"isHexCode");function ol(e){return 48<=e&&e<=55}d(ol,"isOctCode");function ll(e){return 48<=e&&e<=57}d(ll,"isDecCode");function cl(e){if(e===null)return!1;var t=e.length,r=0,i=!1,a;if(!t)return!1;if(a=e[r],(a==="-"||a==="+")&&(a=e[++r]),a==="0"){if(r+1===t)return!0;if(a=e[++r],a==="b"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;i=!0}return i&&a!=="_"}if(a==="x"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!nl(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}if(a==="o"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!ol(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}}if(a==="_")return!1;for(;r<t;r++)if(a=e[r],a!=="_"){if(!ll(e.charCodeAt(r)))return!1;i=!0}return!(!i||a==="_")}d(cl,"resolveYamlInteger");function hl(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}d(hl,"constructYamlInteger");function ul(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Tt.isNegativeZero(e)}d(ul,"isInteger");var Fp=new It("tag:yaml.org,2002:int",{kind:"scalar",resolve:cl,construct:hl,predicate:ul,represent:{binary:d(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:d(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:d(function(e){return e.toString(10)},"decimal"),hexadecimal:d(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"]}}),Dp=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function dl(e){return!(e===null||!Dp.test(e)||e[e.length-1]==="_")}d(dl,"resolveYamlFloat");function fl(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[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)}d(fl,"constructYamlFloat");var $p=/^[-+]?[0-9]+e/;function pl(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(Tt.isNegativeZero(e))return"-0.0";return r=e.toString(10),$p.test(r)?r.replace("e",".e"):r}d(pl,"representYamlFloat");function gl(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Tt.isNegativeZero(e))}d(gl,"isFloat");var Op=new It("tag:yaml.org,2002:float",{kind:"scalar",resolve:dl,construct:fl,predicate:gl,represent:pl,defaultStyle:"lowercase"}),ml=Mp.extend({implicit:[Ap,Ep,Fp,Op]}),Ip=ml,yl=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),xl=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?!1:yl.exec(e)!==null||xl.exec(e)!==null}d(bl,"resolveYamlTimestamp");function Cl(e){var t,r,i,a,s,o,n,c=0,l=null,h,u,f;if(t=yl.exec(e),t===null&&(t=xl.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(s=+t[4],o=+t[5],n=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(h=+t[10],u=+(t[11]||0),l=(h*60+u)*6e4,t[9]==="-"&&(l=-l)),f=new Date(Date.UTC(r,i,a,s,o,n,c)),l&&f.setTime(f.getTime()-l),f}d(Cl,"constructYamlTimestamp");function Sl(e){return e.toISOString()}d(Sl,"representYamlTimestamp");var Rp=new It("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:bl,construct:Cl,instanceOf:Date,represent:Sl});function kl(e){return e==="<<"||e===null}d(kl,"resolveYamlMerge");var Pp=new It("tag:yaml.org,2002:merge",{kind:"scalar",resolve:kl}),As=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
88
+ \r`;function wl(e){if(e===null)return!1;var t,r,i=0,a=e.length,s=As;for(r=0;r<a;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}d(wl,"resolveYamlBinary");function vl(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,s=As,o=0,n=[];for(t=0;t<a;t++)t%4===0&&t&&(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)),o=o<<6|s.indexOf(i.charAt(t));return r=a%4*6,r===0?(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)):r===18?(n.push(o>>10&255),n.push(o>>2&255)):r===12&&n.push(o>>4&255),new Uint8Array(n)}d(vl,"constructYamlBinary");function _l(e){var t="",r=0,i,a,s=e.length,o=As;for(i=0;i<s;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return a=s%3,a===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):a===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):a===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}d(_l,"representYamlBinary");function Tl(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}d(Tl,"isBinary");var Np=new It("tag:yaml.org,2002:binary",{kind:"scalar",resolve:wl,construct:vl,predicate:Tl,represent:_l}),Wp=Object.prototype.hasOwnProperty,zp=Object.prototype.toString;function Bl(e){if(e===null)return!0;var t=[],r,i,a,s,o,n=e;for(r=0,i=n.length;r<i;r+=1){if(a=n[r],o=!1,zp.call(a)!=="[object Object]")return!1;for(s in a)if(Wp.call(a,s))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}d(Bl,"resolveYamlOmap");function Ll(e){return e!==null?e:[]}d(Ll,"constructYamlOmap");var qp=new It("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Bl,construct:Ll}),Hp=Object.prototype.toString;function Ml(e){if(e===null)return!0;var t,r,i,a,s,o=e;for(s=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],Hp.call(i)!=="[object Object]"||(a=Object.keys(i),a.length!==1))return!1;s[t]=[a[0],i[a[0]]]}return!0}d(Ml,"resolveYamlPairs");function Al(e){if(e===null)return[];var t,r,i,a,s,o=e;for(s=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],a=Object.keys(i),s[t]=[a[0],i[a[0]]];return s}d(Al,"constructYamlPairs");var jp=new It("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ml,construct:Al}),Yp=Object.prototype.hasOwnProperty;function El(e){if(e===null)return!0;var t,r=e;for(t in r)if(Yp.call(r,t)&&r[t]!==null)return!1;return!0}d(El,"resolveYamlSet");function Fl(e){return e!==null?e:{}}d(Fl,"constructYamlSet");var Up=new It("tag:yaml.org,2002:set",{kind:"mapping",resolve:El,construct:Fl}),Dl=Ip.extend({implicit:[Rp,Pp],explicit:[Np,qp,jp,Up]}),Te=Object.prototype.hasOwnProperty,$i=1,$l=2,Ol=3,Oi=4,wa=1,Gp=2,Dn=3,Vp=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Xp=/[\x85\u2028\u2029]/,Kp=/[,\[\]\{\}]/,Il=/^(?:!|!!|![a-z\-]+!)$/i,Rl=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ha(e){return Object.prototype.toString.call(e)}d(Ha,"_class");function ae(e){return e===10||e===13}d(ae,"is_EOL");function _e(e){return e===9||e===32}d(_e,"is_WHITE_SPACE");function zt(e){return e===9||e===32||e===10||e===13}d(zt,"is_WS_OR_EOL");function Re(e){return e===44||e===91||e===93||e===123||e===125}d(Re,"is_FLOW_INDICATOR");function Pl(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}d(Pl,"fromHexCode");function Nl(e){return e===120?2:e===117?4:e===85?8:0}d(Nl,"escapedHexLen");function Wl(e){return 48<=e&&e<=57?e-48:-1}d(Wl,"fromDecimalCode");function ja(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?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}d(ja,"simpleEscapeSequence");function zl(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}d(zl,"charFromCodepoint");var ql=new Array(256),Hl=new Array(256);for($e=0;$e<256;$e++)ql[$e]=ja($e)?1:0,Hl[$e]=ja($e);var $e;function jl(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Dl,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=[]}d(jl,"State$1");function Es(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=kp(r),new Gt(t,r)}d(Es,"generateError");function Z(e,t){throw Es(e,t)}d(Z,"throwError");function qr(e,t){e.onWarning&&e.onWarning.call(null,Es(e,t))}d(qr,"throwWarning");var $n={YAML:d(function(t,r,i){var a,s,o;t.version!==null&&Z(t,"duplication of %YAML directive"),i.length!==1&&Z(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),a===null&&Z(t,"ill-formed argument of the YAML directive"),s=parseInt(a[1],10),o=parseInt(a[2],10),s!==1&&Z(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&qr(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:d(function(t,r,i){var a,s;i.length!==2&&Z(t,"TAG directive accepts exactly two arguments"),a=i[0],s=i[1],Il.test(a)||Z(t,"ill-formed tag handle (first argument) of the TAG directive"),Te.call(t.tagMap,a)&&Z(t,'there is a previously declared suffix for "'+a+'" tag handle'),Rl.test(s)||Z(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Z(t,"tag prefix is malformed: "+s)}t.tagMap[a]=s},"handleTagDirective")};function Ce(e,t,r,i){var a,s,o,n;if(t<r){if(n=e.input.slice(t,r),i)for(a=0,s=n.length;a<s;a+=1)o=n.charCodeAt(a),o===9||32<=o&&o<=1114111||Z(e,"expected valid JSON character");else Vp.test(n)&&Z(e,"the stream contains non-printable characters");e.result+=n}}d(Ce,"captureSegment");function Ya(e,t,r,i){var a,s,o,n;for(Tt.isObject(r)||Z(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),o=0,n=a.length;o<n;o+=1)s=a[o],Te.call(t,s)||(t[s]=r[s],i[s]=!0)}d(Ya,"mergeMappings");function Pe(e,t,r,i,a,s,o,n,c){var l,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),l=0,h=a.length;l<h;l+=1)Array.isArray(a[l])&&Z(e,"nested arrays are not supported inside keys"),typeof a=="object"&&Ha(a[l])==="[object Object]"&&(a[l]="[object Object]");if(typeof a=="object"&&Ha(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(l=0,h=s.length;l<h;l+=1)Ya(e,t,s[l],r);else Ya(e,t,s,r);else!e.json&&!Te.call(r,a)&&Te.call(t,a)&&(e.line=o||e.line,e.lineStart=n||e.lineStart,e.position=c||e.position,Z(e,"duplicated mapping key")),a==="__proto__"?Object.defineProperty(t,a,{configurable:!0,enumerable:!0,writable:!0,value:s}):t[a]=s,delete r[a];return t}d(Pe,"storeMappingPair");function Zi(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Z(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}d(Zi,"readLineBreak");function Ct(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;_e(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(ae(a))for(Zi(e),a=e.input.charCodeAt(e.position),i++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&qr(e,"deficient indentation"),i}d(Ct,"skipSeparationSpace");function Zr(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||zt(r)))}d(Zr,"testDocumentSeparator");function Qi(e,t){t===1?e.result+=" ":t>1&&(e.result+=Tt.repeat(`
90
+ `,t-1))}d(Qi,"writeFoldedLines");function Yl(e,t,r){var i,a,s,o,n,c,l,h,u=e.kind,f=e.result,p;if(p=e.input.charCodeAt(e.position),zt(p)||Re(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(a=e.input.charCodeAt(e.position+1),zt(a)||r&&Re(a)))return!1;for(e.kind="scalar",e.result="",s=o=e.position,n=!1;p!==0;){if(p===58){if(a=e.input.charCodeAt(e.position+1),zt(a)||r&&Re(a))break}else if(p===35){if(i=e.input.charCodeAt(e.position-1),zt(i))break}else{if(e.position===e.lineStart&&Zr(e)||r&&Re(p))break;if(ae(p))if(c=e.line,l=e.lineStart,h=e.lineIndent,Ct(e,!1,-1),e.lineIndent>=t){n=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=c,e.lineStart=l,e.lineIndent=h;break}}n&&(Ce(e,s,o,!1),Qi(e,e.line-c),s=o=e.position,n=!1),_e(p)||(o=e.position+1),p=e.input.charCodeAt(++e.position)}return Ce(e,s,o,!1),e.result?!0:(e.kind=u,e.result=f,!1)}d(Yl,"readPlainScalar");function Ul(e,t){var r,i,a;if(r=e.input.charCodeAt(e.position),r!==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(Ce(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,a=e.position;else return!0;else ae(r)?(Ce(e,i,a,!0),Qi(e,Ct(e,!1,t)),i=a=e.position):e.position===e.lineStart&&Zr(e)?Z(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);Z(e,"unexpected end of the stream within a single quoted scalar")}d(Ul,"readSingleQuotedScalar");function Gl(e,t){var r,i,a,s,o,n;if(n=e.input.charCodeAt(e.position),n!==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 Ce(e,r,e.position,!0),e.position++,!0;if(n===92){if(Ce(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),ae(n))Ct(e,!1,t);else if(n<256&&ql[n])e.result+=Hl[n],e.position++;else if((o=Nl(n))>0){for(a=o,s=0;a>0;a--)n=e.input.charCodeAt(++e.position),(o=Pl(n))>=0?s=(s<<4)+o:Z(e,"expected hexadecimal character");e.result+=zl(s),e.position++}else Z(e,"unknown escape sequence");r=i=e.position}else ae(n)?(Ce(e,r,i,!0),Qi(e,Ct(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Zr(e)?Z(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}Z(e,"unexpected end of the stream within a double quoted scalar")}d(Gl,"readDoubleQuotedScalar");function Vl(e,t){var r=!0,i,a,s,o=e.tag,n,c=e.anchor,l,h,u,f,p,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,p=!1,n=[];else if(b===123)h=125,p=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(Ct(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=o,e.anchor=c,e.kind=p?"mapping":"sequence",e.result=n,!0;r?b===44&&Z(e,"expected the node content, but found ','"):Z(e,"missed comma between flow collection entries"),y=m=x=null,u=f=!1,b===63&&(l=e.input.charCodeAt(e.position+1),zt(l)&&(u=f=!0,e.position++,Ct(e,!0,t))),i=e.line,a=e.lineStart,s=e.position,He(e,t,$i,!1,!0),y=e.tag,m=e.result,Ct(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),Ct(e,!0,t),He(e,t,$i,!1,!0),x=e.result),p?Pe(e,n,g,y,m,x,i,a,s):u?n.push(Pe(e,null,g,y,m,x,i,a,s)):n.push(m),Ct(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}Z(e,"unexpected end of the stream within a flow collection")}d(Vl,"readFlowCollection");function Xl(e,t){var r,i,a=wa,s=!1,o=!1,n=t,c=0,l=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)wa===a?a=u===43?Dn:Gp:Z(e,"repeat of a chomping mode identifier");else if((h=Wl(u))>=0)h===0?Z(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?Z(e,"repeat of an indentation width identifier"):(n=t+h-1,o=!0);else break;if(_e(u)){do u=e.input.charCodeAt(++e.position);while(_e(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!ae(u)&&u!==0)}for(;u!==0;){for(Zi(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<n)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>n&&(n=e.lineIndent),ae(u)){c++;continue}if(e.lineIndent<n){a===Dn?e.result+=Tt.repeat(`
91
+ `,s?1+c:c):a===wa&&s&&(e.result+=`
92
+ `);break}for(i?_e(u)?(l=!0,e.result+=Tt.repeat(`
93
+ `,s?1+c:c)):l?(l=!1,e.result+=Tt.repeat(`
94
+ `,c+1)):c===0?s&&(e.result+=" "):e.result+=Tt.repeat(`
95
+ `,c):e.result+=Tt.repeat(`
96
+ `,s?1+c:c),s=!0,o=!0,c=0,r=e.position;!ae(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Ce(e,r,e.position,!1)}return!0}d(Xl,"readBlockScalar");function Ua(e,t){var r,i=e.tag,a=e.anchor,s=[],o,n=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Z(e,"tab characters must not be used in indentation")),!(c!==45||(o=e.input.charCodeAt(e.position+1),!zt(o))));){if(n=!0,e.position++,Ct(e,!0,-1)&&e.lineIndent<=t){s.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,He(e,t,Ol,!1,!0),s.push(e.result),Ct(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)Z(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=a,e.kind="sequence",e.result=s,!0):!1}d(Ua,"readBlockSequence");function Kl(e,t,r){var i,a,s,o,n,c,l=e.tag,h=e.anchor,u={},f=Object.create(null),p=null,g=null,m=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Z(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(b===63||b===58)&&zt(i))b===63?(y&&(Pe(e,u,f,p,g,null,o,n,c),p=g=m=null),x=!0,y=!0,a=!0):y?(y=!1,a=!0):Z(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,n=e.lineStart,c=e.position,!He(e,r,$l,!1,!0))break;if(e.line===s){for(b=e.input.charCodeAt(e.position);_e(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),zt(b)||Z(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Pe(e,u,f,p,g,null,o,n,c),p=g=m=null),x=!0,y=!1,a=!1,p=e.tag,g=e.result;else if(x)Z(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=l,e.anchor=h,!0}else if(x)Z(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=l,e.anchor=h,!0}if((e.line===s||e.lineIndent>t)&&(y&&(o=e.line,n=e.lineStart,c=e.position),He(e,t,Oi,!0,a)&&(y?g=e.result:m=e.result),y||(Pe(e,u,f,p,g,m,o,n,c),p=g=m=null),Ct(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&b!==0)Z(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Pe(e,u,f,p,g,null,o,n,c),x&&(e.tag=l,e.anchor=h,e.kind="mapping",e.result=u),x}d(Kl,"readBlockMapping");function Zl(e){var t,r=!1,i=!1,a,s,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&Z(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,a="!!",o=e.input.charCodeAt(++e.position)):a="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(s=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):Z(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!zt(o);)o===33&&(i?Z(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),Il.test(a)||Z(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),Kp.test(s)&&Z(e,"tag suffix cannot contain flow indicator characters")}s&&!Rl.test(s)&&Z(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{Z(e,"tag name is malformed: "+s)}return r?e.tag=s:Te.call(e.tagMap,a)?e.tag=e.tagMap[a]+s:a==="!"?e.tag="!"+s:a==="!!"?e.tag="tag:yaml.org,2002:"+s:Z(e,'undeclared tag handle "'+a+'"'),!0}d(Zl,"readTagProperty");function Ql(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&Z(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!zt(r)&&!Re(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Z(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}d(Ql,"readAnchorProperty");function Jl(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!zt(i)&&!Re(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&Z(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Te.call(e.anchorMap,r)||Z(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Ct(e,!0,-1),!0}d(Jl,"readAlias");function He(e,t,r,i,a){var s,o,n,c=1,l=!1,h=!1,u,f,p,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=o=n=Oi===r||Ol===r,i&&Ct(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;Zl(e)||Ql(e);)Ct(e,!0,-1)?(l=!0,n=s,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):n=!1;if(n&&(n=l||a),(c===1||Oi===r)&&($i===r||$l===r?m=t:m=t+1,y=e.position-e.lineStart,c===1?n&&(Ua(e,y)||Kl(e,y,m))||Vl(e,m)?h=!0:(o&&Xl(e,m)||Ul(e,m)||Gl(e,m)?h=!0:Jl(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&Z(e,"alias node should not have any properties")):Yl(e,m,$i===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(h=n&&Ua(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Z(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(g=e.implicitTypes[u],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Te.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,p=e.typeMap.multi[e.kind||"fallback"],u=0,f=p.length;u<f;u+=1)if(e.tag.slice(0,p[u].tag.length)===p[u].tag){g=p[u];break}g||Z(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&Z(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Z(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}d(He,"composeNode");function tc(e){var t=e.position,r,i,a,s=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(Ct(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(s=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!zt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),a=[],i.length<1&&Z(e,"directive name must not be less than one character in length");o!==0;){for(;_e(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!ae(o));break}if(ae(o))break;for(r=e.position;o!==0&&!zt(o);)o=e.input.charCodeAt(++e.position);a.push(e.input.slice(r,e.position))}o!==0&&Zi(e),Te.call($n,i)?$n[i](e,i,a):qr(e,'unknown document directive "'+i+'"')}if(Ct(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,Ct(e,!0,-1)):s&&Z(e,"directives end mark is expected"),He(e,e.lineIndent-1,Oi,!1,!0),Ct(e,!0,-1),e.checkLineBreaks&&Xp.test(e.input.slice(t,e.position))&&qr(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Zr(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Ct(e,!0,-1));return}if(e.position<e.length-1)Z(e,"end of the stream or a document separator is expected");else return}d(tc,"readDocument");function Fs(e,t){e=String(e),t=t||{},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 jl(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,Z(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;)tc(r);return r.documents}d(Fs,"loadDocuments");function Zp(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Fs(e,r);if(typeof t!="function")return i;for(var a=0,s=i.length;a<s;a+=1)t(i[a])}d(Zp,"loadAll$1");function ec(e,t){var r=Fs(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Gt("expected a single document in the stream, but found more")}}d(ec,"load$1");var Qp=ec,Jp={load:Qp},rc=Object.prototype.toString,ic=Object.prototype.hasOwnProperty,Ds=65279,tg=9,Hr=10,eg=13,rg=32,ig=33,ag=34,Ga=35,sg=37,ng=38,og=39,lg=42,ac=44,cg=45,Ii=58,hg=61,ug=62,dg=63,fg=64,sc=91,nc=93,pg=96,oc=123,gg=124,lc=125,Pt={};Pt[0]="\\0";Pt[7]="\\a";Pt[8]="\\b";Pt[9]="\\t";Pt[10]="\\n";Pt[11]="\\v";Pt[12]="\\f";Pt[13]="\\r";Pt[27]="\\e";Pt[34]='\\"';Pt[92]="\\\\";Pt[133]="\\N";Pt[160]="\\_";Pt[8232]="\\L";Pt[8233]="\\P";var mg=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],yg=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function cc(e,t){var r,i,a,s,o,n,c;if(t===null)return{};for(r={},i=Object.keys(t),a=0,s=i.length;a<s;a+=1)o=i[a],n=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),c=e.compiledTypeMap.fallback[o],c&&ic.call(c.styleAliases,n)&&(n=c.styleAliases[n]),r[o]=n;return r}d(cc,"compileStyleMap");function hc(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)r="U",i=8;else throw new Gt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Tt.repeat("0",i-t.length)+t}d(hc,"encodeHex");var xg=1,jr=2;function uc(e){this.schema=e.schema||Dl,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Tt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=cc(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==='"'?jr:xg,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}d(uc,"State");function Va(e,t){for(var r=Tt.repeat(" ",t),i=0,a=-1,s="",o,n=e.length;i<n;)a=e.indexOf(`
98
+ `,i),a===-1?(o=e.slice(i),i=n):(o=e.slice(i,a+1),i=a+1),o.length&&o!==`
99
+ `&&(s+=r),s+=o;return s}d(Va,"indentString");function Ri(e,t){return`
100
+ `+Tt.repeat(" ",e.indent*t)}d(Ri,"generateNextLine");function dc(e,t){var r,i,a;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(a=e.implicitTypes[r],a.resolve(t))return!0;return!1}d(dc,"testImplicitResolving");function Yr(e){return e===rg||e===tg}d(Yr,"isWhitespace");function mr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Ds||65536<=e&&e<=1114111}d(mr,"isPrintable");function Xa(e){return mr(e)&&e!==Ds&&e!==eg&&e!==Hr}d(Xa,"isNsCharOrWhitespace");function Ka(e,t,r){var i=Xa(e),a=i&&!Yr(e);return(r?i:i&&e!==ac&&e!==sc&&e!==nc&&e!==oc&&e!==lc)&&e!==Ga&&!(t===Ii&&!a)||Xa(t)&&!Yr(t)&&e===Ga||t===Ii&&a}d(Ka,"isPlainSafe");function fc(e){return mr(e)&&e!==Ds&&!Yr(e)&&e!==cg&&e!==dg&&e!==Ii&&e!==ac&&e!==sc&&e!==nc&&e!==oc&&e!==lc&&e!==Ga&&e!==ng&&e!==lg&&e!==ig&&e!==gg&&e!==hg&&e!==ug&&e!==og&&e!==ag&&e!==sg&&e!==fg&&e!==pg}d(fc,"isPlainSafeFirst");function pc(e){return!Yr(e)&&e!==Ii}d(pc,"isPlainSafeLast");function er(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}d(er,"codePointAt");function $s(e){var t=/^\n* /;return t.test(e)}d($s,"needIndentIndicator");var gc=1,Za=2,mc=3,yc=4,Je=5;function xc(e,t,r,i,a,s,o,n){var c,l=0,h=null,u=!1,f=!1,p=i!==-1,g=-1,m=fc(er(e,0))&&pc(er(e,e.length-1));if(t||o)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=er(e,c),!mr(l))return Je;m=m&&Ka(l,h,n),h=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=er(e,c),l===Hr)u=!0,p&&(f=f||c-g-1>i&&e[g+1]!==" ",g=c);else if(!mr(l))return Je;m=m&&Ka(l,h,n),h=l}f=f||p&&c-g-1>i&&e[g+1]!==" "}return!u&&!f?m&&!o&&!a(e)?gc:s===jr?Je:Za:r>9&&$s(e)?Je:o?s===jr?Je:Za:f?yc:mc}d(xc,"chooseScalarStyle");function bc(e,t,r,i,a){e.dump=function(){if(t.length===0)return e.quotingType===jr?'""':"''";if(!e.noCompatMode&&(mg.indexOf(t)!==-1||yg.test(t)))return e.quotingType===jr?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),n=i||e.flowLevel>-1&&r>=e.flowLevel;function c(l){return dc(e,l)}switch(d(c,"testAmbiguity"),xc(t,n,e.indent,o,c,e.quotingType,e.forceQuotes&&!i,a)){case gc:return t;case Za:return"'"+t.replace(/'/g,"''")+"'";case mc:return"|"+Qa(t,e.indent)+Ja(Va(t,s));case yc:return">"+Qa(t,e.indent)+Ja(Va(Cc(t,o),s));case Je:return'"'+Sc(t)+'"';default:throw new Gt("impossible error: invalid scalar style")}}()}d(bc,"writeScalar");function Qa(e,t){var r=$s(e)?String(t):"",i=e[e.length-1]===`
101
+ `,a=i&&(e[e.length-2]===`
102
+ `||e===`
103
+ `),s=a?"+":i?"":"-";return r+s+`
104
+ `}d(Qa,"blockHeader");function Ja(e){return e[e.length-1]===`
105
+ `?e.slice(0,-1):e}d(Ja,"dropEndingNewline");function Cc(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var l=e.indexOf(`
106
+ `);return l=l!==-1?l:e.length,r.lastIndex=l,ts(e.slice(0,l),t)}(),a=e[0]===`
107
+ `||e[0]===" ",s,o;o=r.exec(e);){var n=o[1],c=o[2];s=c[0]===" ",i+=n+(!a&&!s&&c!==""?`
108
+ `:"")+ts(c,t),a=s}return i}d(Cc,"foldString");function ts(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,a=0,s,o=0,n=0,c="";i=r.exec(e);)n=i.index,n-a>t&&(s=o>a?o:n,c+=`
109
+ `+e.slice(a,s),a=s+1),o=n;return c+=`
110
+ `,e.length-a>t&&o>a?c+=e.slice(a,o)+`
111
+ `+e.slice(o+1):c+=e.slice(a),c.slice(1)}d(ts,"foldLine");function Sc(e){for(var t="",r=0,i,a=0;a<e.length;r>=65536?a+=2:a++)r=er(e,a),i=Pt[r],!i&&mr(r)?(t+=e[a],r>=65536&&(t+=e[a+1])):t+=i||hc(r);return t}d(Sc,"escapeString");function kc(e,t,r){var i="",a=e.tag,s,o,n;for(s=0,o=r.length;s<o;s+=1)n=r[s],e.replacer&&(n=e.replacer.call(r,String(s),n)),(ue(e,t,n,!1,!1)||typeof n>"u"&&ue(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}d(kc,"writeFlowSequence");function es(e,t,r,i){var a="",s=e.tag,o,n,c;for(o=0,n=r.length;o<n;o+=1)c=r[o],e.replacer&&(c=e.replacer.call(r,String(o),c)),(ue(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&ue(e,t+1,null,!0,!0,!1,!0))&&((!i||a!=="")&&(a+=Ri(e,t)),e.dump&&Hr===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}d(es,"writeBlockSequence");function wc(e,t,r){var i="",a=e.tag,s=Object.keys(r),o,n,c,l,h;for(o=0,n=s.length;o<n;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),c=s[o],l=r[c],e.replacer&&(l=e.replacer.call(r,c,l)),ue(e,t,c,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ue(e,t,l,!1,!1)&&(h+=e.dump,i+=h));e.tag=a,e.dump="{"+i+"}"}d(wc,"writeFlowMapping");function vc(e,t,r,i){var a="",s=e.tag,o=Object.keys(r),n,c,l,h,u,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new Gt("sortKeys must be a boolean or a function");for(n=0,c=o.length;n<c;n+=1)f="",(!i||a!=="")&&(f+=Ri(e,t)),l=o[n],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),ue(e,t+1,l,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&Hr===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=Ri(e,t)),ue(e,t+1,h,!0,u)&&(e.dump&&Hr===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,a+=f));e.tag=s,e.dump=a||"{}"}d(vc,"writeBlockMapping");function rs(e,t,r){var i,a,s,o,n,c;for(a=r?e.explicitTypes:e.implicitTypes,s=0,o=a.length;s<o;s+=1)if(n=a[s],(n.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(c=e.styleMap[n.tag]||n.defaultStyle,rc.call(n.represent)==="[object Function]")i=n.represent(t,c);else if(ic.call(n.represent,c))i=n.represent[c](t,c);else throw new Gt("!<"+n.tag+'> tag resolver accepts not "'+c+'" style');e.dump=i}return!0}return!1}d(rs,"detectType");function ue(e,t,r,i,a,s,o){e.tag=null,e.dump=r,rs(e,r,!1)||rs(e,r,!0);var n=rc.call(e.dump),c=i,l;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=n==="[object Object]"||n==="[object Array]",u,f;if(h&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(a=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(vc(e,t,e.dump,a),f&&(e.dump="&ref_"+u+e.dump)):(wc(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?es(e,t-1,e.dump,a):es(e,t,e.dump,a),f&&(e.dump="&ref_"+u+e.dump)):(kc(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&bc(e,e.dump,t,s,c);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Gt("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(l=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?l="!"+l:l.slice(0,18)==="tag:yaml.org,2002:"?l="!!"+l.slice(18):l="!<"+l+">",e.dump=l+" "+e.dump)}return!0}d(ue,"writeNode");function _c(e,t){var r=[],i=[],a,s;for(Pi(e,r,i),a=0,s=i.length;a<s;a+=1)t.duplicates.push(r[i[a]]);t.usedDuplicates=new Array(s)}d(_c,"getDuplicateReferences");function Pi(e,t,r){var i,a,s;if(e!==null&&typeof e=="object")if(a=t.indexOf(e),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(t.push(e),Array.isArray(e))for(a=0,s=e.length;a<s;a+=1)Pi(e[a],t,r);else for(i=Object.keys(e),a=0,s=i.length;a<s;a+=1)Pi(e[i[a]],t,r)}d(Pi,"inspectNode");function bg(e,t){t=t||{};var r=new uc(t);r.noRefs||_c(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),ue(r,0,i,!0,!0)?r.dump+`
112
+ `:""}d(bg,"dump$1");function Cg(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.")}}d(Cg,"renamed");var Sg=ml,kg=Jp.load;/*! Bundled license information:
113
+
114
+ js-yaml/dist/js-yaml.mjs:
115
+ (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
116
+ */var $t={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},On={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function $r(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=bt(e),t=bt(t);const[r,i]=[e.x,e.y],[a,s]=[t.x,t.y],o=a-r,n=s-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}d($r,"calculateDeltaAndAngle");var bt=d(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),wg=d(e=>({x:d(function(t,r,i){let a=0;const s=bt(i[0]).x<bt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn($t,e.arrowTypeStart)){const{angle:p,deltaX:g}=$r(i[0],i[1]);a=$t[e.arrowTypeStart]*Math.cos(p)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn($t,e.arrowTypeEnd)){const{angle:p,deltaX:g}=$r(i[i.length-1],i[i.length-2]);a=$t[e.arrowTypeEnd]*Math.cos(p)*(g>=0?1:-1)}const o=Math.abs(bt(t).x-bt(i[i.length-1]).x),n=Math.abs(bt(t).y-bt(i[i.length-1]).y),c=Math.abs(bt(t).x-bt(i[0]).x),l=Math.abs(bt(t).y-bt(i[0]).y),h=$t[e.arrowTypeStart],u=$t[e.arrowTypeEnd],f=1;if(o<u&&o>0&&n<u){let p=u+f-o;p*=s==="right"?-1:1,a-=p}if(c<h&&c>0&&l<h){let p=h+f-c;p*=s==="right"?-1:1,a+=p}return bt(t).x+a},"x"),y:d(function(t,r,i){let a=0;const s=bt(i[0]).y<bt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn($t,e.arrowTypeStart)){const{angle:p,deltaY:g}=$r(i[0],i[1]);a=$t[e.arrowTypeStart]*Math.abs(Math.sin(p))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn($t,e.arrowTypeEnd)){const{angle:p,deltaY:g}=$r(i[i.length-1],i[i.length-2]);a=$t[e.arrowTypeEnd]*Math.abs(Math.sin(p))*(g>=0?1:-1)}const o=Math.abs(bt(t).y-bt(i[i.length-1]).y),n=Math.abs(bt(t).x-bt(i[i.length-1]).x),c=Math.abs(bt(t).y-bt(i[0]).y),l=Math.abs(bt(t).x-bt(i[0]).x),h=$t[e.arrowTypeStart],u=$t[e.arrowTypeEnd],f=1;if(o<u&&o>0&&n<u){let p=u+f-o;p*=s==="up"?-1:1,a-=p}if(c<h&&c>0&&l<h){let p=h+f-c;p*=s==="up"?-1:1,a+=p}return bt(t).y+a},"y")}),"getLineFunctionsWithOffset"),Os=d(({flowchart:e})=>{var a,s;const t=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.top)??0,r=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),vg=d(e=>{const{handDrawnSeed:t}=dt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Cr=d(e=>{const t=_g([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),_g=d(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"),Tc=d(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=d(e=>{const{stylesArray:t}=Cr(e),r=[],i=[],a=[],s=[];return t.forEach(o=>{const n=o[0];Tc(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&a.push(o.join(":")+" !important"),n==="fill"&&s.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:s}},"styles2String"),U=d((e,t)=>{var c;const{themeVariables:r,handDrawnSeed:i}=dt(),{nodeBorder:a,mainBkg:s}=r,{stylesMap:o}=Cr(e);return Object.assign({roughness:.7,fill:o.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||a,seed:i,strokeWidth:((c=o.get("stroke-width"))==null?void 0:c.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:Tg(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),Tg=d(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const a=isNaN(t[0])?0:t[0];return[a,a]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),Ar={},vt={},In;function Bg(){return In||(In=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.BLANK_URL=vt.relativeFirstCharacters=vt.whitespaceEscapeCharsRegex=vt.urlSchemeRegex=vt.ctrlCharactersRegex=vt.htmlCtrlEntityRegex=vt.htmlEntitiesRegex=vt.invalidProtocolRegex=void 0,vt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,vt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,vt.htmlCtrlEntityRegex=/&(newline|tab);/gi,vt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,vt.urlSchemeRegex=/^.+(:|&colon;)/gim,vt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,vt.relativeFirstCharacters=[".","/"],vt.BLANK_URL="about:blank"),vt}var Rn;function Lg(){if(Rn)return Ar;Rn=1,Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.sanitizeUrl=void 0;var e=Bg();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var n=o.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(c,l){return String.fromCharCode(l)})}function i(o){return URL.canParse(o)}function a(o){try{return decodeURIComponent(o)}catch{return o}}function s(o){if(!o)return e.BLANK_URL;var n,c=a(o.trim());do c=r(c).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),c=a(c),n=c.match(e.ctrlCharactersRegex)||c.match(e.htmlEntitiesRegex)||c.match(e.htmlCtrlEntityRegex)||c.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var l=c;if(!l)return e.BLANK_URL;if(t(l))return l;var h=l.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return l;var f=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var p=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return p;if(f==="http:"||f==="https:"){if(!i(p))return e.BLANK_URL;var g=new URL(p);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return p}return Ar.sanitizeUrl=s,Ar}var Mg=Lg(),Ag="​",Eg={curveBasis:pi,curveBasisClosed:Fd,curveBasisOpen:Ed,curveBumpX:go,curveBumpY:po,curveBundle:Od,curveCardinalClosed:Id,curveCardinalOpen:Rd,curveCardinal:xo,curveCatmullRomClosed:Pd,curveCatmullRomOpen:Nd,curveCatmullRom:Co,curveLinear:Da,curveLinearClosed:Ad,curveMonotoneX:fo,curveMonotoneY:uo,curveNatural:ho,curveStep:co,curveStepAfter:lo,curveStepBefore:oo},Fg=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Dg=d(function(e,t){const r=Bc(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);Li(o),i=_t(i,[...o])}else i=r.args;if(!i)return;let a=Ss(e,t);const s="config";return i[s]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[s],delete i[s]),i},"detectInit"),Bc=d(function(e,t=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${Fg.source})(?=[}][%]{2}).*
117
+ `,"ig");e=e.trim().replace(a,"").replace(/'/gm,'"'),D.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let s;const o=[];for(;(s=Wr.exec(e))!==null;)if(s.index===Wr.lastIndex&&Wr.lastIndex++,s&&!t||t&&((r=s[1])!=null&&r.match(t))||t&&((i=s[2])!=null&&i.match(t))){const n=s[1]?s[1]:s[2],c=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:n,args:c})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(a){return D.error(`ERROR: ${a.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),$g=d(function(e){return e.replace(Wr,"")},"removeDirectives"),Og=d(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Is(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Eg[r]??t}d(Is,"interpolateToCurve");function Lc(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Mg.sanitizeUrl(r):r}d(Lc,"formatUrl");var Ig=d((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let s=window;for(let o=0;o<i;o++)if(s=s[r[o]],!s){D.error(`Function name: ${e} not found in window`);return}s[a](...t)},"runFunc");function Rs(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}d(Rs,"distance");function Mc(e){let t,r=0;e.forEach(a=>{r+=Rs(a,t),t=a});const i=r/2;return Ps(e,i)}d(Mc,"traverseEdge");function Ac(e){return e.length===1?e[0]:Mc(e)}d(Ac,"calcLabelPosition");var Pn=d((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Ps=d((e,t)=>{let r,i=t;for(const a of e){if(r){const s=Rs(a,r);if(s===0)return r;if(s<i)i-=s;else{const o=i/s;if(o<=0)return r;if(o>=1)return{x:a.x,y:a.y};if(o>0&&o<1)return{x:Pn((1-o)*r.x+o*a.x,5),y:Pn((1-o)*r.y+o*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Rg=d((e,t,r)=>{D.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const a=Ps(t,25),s=e?10:5,o=Math.atan2(t[0].y-a.y,t[0].x-a.x),n={x:0,y:0};return n.x=Math.sin(o)*s+(t[0].x+a.x)/2,n.y=-Math.cos(o)*s+(t[0].y+a.y)/2,n},"calcCardinalityPosition");function Ec(e,t,r){const i=structuredClone(r);D.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=25+e,s=Ps(i,a),o=10+e*.5,n=Math.atan2(i[0].y-s.y,i[0].x-s.x),c={x:0,y:0};return t==="start_left"?(c.x=Math.sin(n+Math.PI)*o+(i[0].x+s.x)/2,c.y=-Math.cos(n+Math.PI)*o+(i[0].y+s.y)/2):t==="end_right"?(c.x=Math.sin(n-Math.PI)*o+(i[0].x+s.x)/2-5,c.y=-Math.cos(n-Math.PI)*o+(i[0].y+s.y)/2-5):t==="end_left"?(c.x=Math.sin(n)*o+(i[0].x+s.x)/2-5,c.y=-Math.cos(n)*o+(i[0].y+s.y)/2-5):(c.x=Math.sin(n)*o+(i[0].x+s.x)/2,c.y=-Math.cos(n)*o+(i[0].y+s.y)/2),c}d(Ec,"calcTerminalLabelPosition");function Fc(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}}d(Fc,"getStylesFromArray");var Nn=0,Pg=d(()=>(Nn++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Nn),"generateId");function Dc(e){let t="";const r="0123456789abcdef",i=r.length;for(let a=0;a<e;a++)t+=r.charAt(Math.floor(Math.random()*i));return t}d(Dc,"makeRandomHex");var Ng=d(e=>Dc(e.length),"random"),Wg=d(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"),zg=d(function(e,t){const r=t.text.replace(br.lineBreakRegex," "),[,i]=Ji(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 s=a.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),a},"drawSimpleText"),qg=gs((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),br.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let s="";return i.forEach((o,n)=>{const c=Se(`${o} `,r),l=Se(s,r);if(c>t){const{hyphenatedStrings:f,remainingWord:p}=Hg(o,t,"-",r);a.push(s,...f),s=p}else l+c>=t?(a.push(s),s=o):s=[s,o].filter(Boolean).join(" ");n+1===i.length&&a.push(s)}),a.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Hg=gs((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],s=[];let o="";return a.forEach((n,c)=>{const l=`${o}${n}`;if(Se(l,i)>=t){const u=c+1,f=a.length===u,p=`${l}${r}`;s.push(f?l:p),o=""}else o=l}),{hyphenatedStrings:s,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function $c(e,t){return Ns(e,t).height}d($c,"calculateTextHeight");function Se(e,t){return Ns(e,t).width}d(Se,"calculateTextWidth");var Ns=gs((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,s]=Ji(r),o=["sans-serif",i],n=e.split(br.lineBreakRegex),c=[],l=ht("body");if(!l.remove)return{width:0,height:0,lineHeight:0};const h=l.append("svg");for(const f of o){let p=0;const g={width:0,height:0,lineHeight:0};for(const m of n){const y=Wg();y.text=m||Ag;const x=zg(h,y).style("font-size",s).style("font-weight",a).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),p=Math.round(b.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}c.push(g)}h.remove();const u=isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1;return c[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),ur,jg=(ur=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},d(ur,"InitIDGenerator"),ur),li,Yg=d(function(e){return li=li||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),li.innerHTML=e,unescape(li.textContent)},"entityDecode");function Ws(e){return"str"in e}d(Ws,"isDetailedError");var Ug=d((e,t,r,i)=>{var s;if(!i)return;const a=(s=e.node())==null?void 0:s.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"),Ji=d(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");function zs(e,t){return Dd({},e,t)}d(zs,"cleanAndMerge");var ie={assignWithDepth:_t,wrapLabel:qg,calculateTextHeight:$c,calculateTextWidth:Se,calculateTextDimensions:Ns,cleanAndMerge:zs,detectInit:Dg,detectDirective:Bc,isSubstringInArray:Og,interpolateToCurve:Is,calcLabelPosition:Ac,calcCardinalityPosition:Rg,calcTerminalLabelPosition:Ec,formatUrl:Lc,getStylesFromArray:Fc,generateId:Pg,random:Ng,runFunc:Ig,entityDecode:Yg,insertTitle:Ug,isLabelCoordinateInPath:Oc,parseFontSize:Ji,InitIDGenerator:jg},Gg=d(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)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Ye=d(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Nb=d((e,t,{counter:r=0,prefix:i,suffix:a},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function Rt(e){return e??null}d(Rt,"handleUndefinedAttr");function Oc(e,t){const r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return a.includes(r.toString())||a.includes(i.toString())}d(Oc,"isLabelCoordinateInPath");const Vg=Object.freeze({left:0,top:0,width:16,height:16}),Ni=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ic=Object.freeze({...Vg,...Ni}),Xg=Object.freeze({...Ic,body:"",hidden:!1}),Kg=Object.freeze({width:null,height:null}),Zg=Object.freeze({...Kg,...Ni}),Qg=(e,t,r,i="")=>{const a=e.split(":");if(e.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const n=a.pop(),c=a.pop(),l={provider:a.length>0?a[0]:i,prefix:c,name:n};return va(l)?l:null}const s=a[0],o=s.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return va(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:s};return va(n,r)?n:null}return null},va=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Jg(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Wn(e,t){const r=Jg(e,t);for(const i in Xg)i in Ni?i in e&&!(i in r)&&(r[i]=Ni[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function tm(e,t){const r=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function s(o){if(r[o])return a[o]=[];if(!(o in a)){a[o]=null;const n=i[o]&&i[o].parent,c=n&&s(n);c&&(a[o]=[n].concat(c))}return a[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),a}function zn(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let s={};function o(n){s=Wn(i[n]||a[n],s)}return o(t),r.forEach(o),Wn(e,s)}function em(e,t){if(e.icons[t])return zn(e,t,[]);const r=tm(e,[t])[t];return r?zn(e,t,r):null}const rm=/(-?[0-9.]*[0-9]+[0-9.]*)/g,im=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function qn(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(rm);if(i===null||!i.length)return e;const a=[];let s=i.shift(),o=im.test(s);for(;;){if(o){const n=parseFloat(s);isNaN(n)?a.push(s):a.push(Math.ceil(n*t*r)/r)}else a.push(s);if(s=i.shift(),s===void 0)return a.join("");o=!o}}function am(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const a=e.indexOf(">",i),s=e.indexOf("</"+t);if(a===-1||s===-1)break;const o=e.indexOf(">",s);if(o===-1)break;r+=e.slice(a+1,s).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function sm(e,t){return e?"<defs>"+e+"</defs>"+t:t}function nm(e,t,r){const i=am(e);return sm(i.defs,t+i.content+r)}const om=e=>e==="unset"||e==="undefined"||e==="none";function lm(e,t){const r={...Ic,...e},i={...Zg,...t},a={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let S=m.rotate;x?b?S+=2:(y.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),y.push("scale(-1 1)"),a.top=a.left=0):b&&(y.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),y.push("scale(1 -1)"),a.top=a.left=0);let v;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:v=a.height/2+a.top,y.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:y.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:v=a.width/2+a.left,y.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}S%2===1&&(a.left!==a.top&&(v=a.left,a.left=a.top,a.top=v),a.width!==a.height&&(v=a.width,a.width=a.height,a.height=v)),y.length&&(s=nm(s,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,c=a.width,l=a.height;let h,u;o===null?(u=n===null?"1em":n==="auto"?l:n,h=qn(u,c/l)):(h=o==="auto"?c:o,u=n===null?qn(h,l/c):n==="auto"?l:n);const f={},p=(m,y)=>{om(y)||(f[m]=y.toString())};p("width",h),p("height",u);const g=[a.left,a.top,c,l];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:s}}const cm=/\sid="(\S+)"/g,hm="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let um=0;function dm(e,t=hm){const r=[];let i;for(;i=cm.exec(e);)r.push(i[1]);if(!r.length)return e;const a="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(s=>{const o=typeof t=="function"?t(s):t+(um++).toString(),n=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+o+a+"$3")}),e=e.replace(new RegExp(a,"g"),""),e}function fm(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function Rc(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,c){var l=c.match(/\n([\t ]+|(?!\s).)/g);return l?n.concat(l.map(function(h){var u,f;return(f=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):n},[]);if(a.length){var s=new RegExp(`
118
+ [ ]{`+Math.min.apply(Math,a)+"}","g");i=i.map(function(n){return n.replace(s,`
119
+ `)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(n,c){var l=o.match(/(?:^|\n)( *)$/),h=l?l[1]:"",u=n;typeof n=="string"&&n.includes(`
120
+ `)&&(u=String(n).split(`
121
+ `).map(function(f,p){return p===0?f:""+h+f}).join(`
122
+ `)),o+=u+i[c+1]}),o}var pm={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},is=new Map,Pc=new Map,gm=d(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(D.debug("Registering icon pack:",t.name),"loader"in t)Pc.set(t.name,t.loader);else if("icons"in t)is.set(t.name,t.icons);else throw D.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Nc=d(async(e,t)=>{const r=Qg(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=is.get(i);if(!a){const o=Pc.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await o(),prefix:i},is.set(i,a)}catch(n){throw D.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=em(a,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),mm=d(async e=>{try{return await Nc(e),!0}catch{return!1}},"isIconAvailable"),Qr=d(async(e,t,r)=>{let i;try{i=await Nc(e,t==null?void 0:t.fallbackPrefix)}catch(o){D.error(o),i=pm}const a=lm(i,t),s=fm(dm(a.body),{...a.attributes,...r});return Jt(s,Ot())},"getIconSVG");function Wc(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
123
+ `).replace(/\n{2,}/g,`
124
+ `),a=Rc(i);return t===!1?a.replace(/ /g,"&nbsp;"):a}d(Wc,"preprocessMarkdown");function zc(e,t={}){const r=Wc(e,t),i=mo.lexer(r),a=[[]];let s=0;function o(n,c="normal"){n.type==="text"?n.text.split(`
125
+ `).forEach((h,u)=>{u!==0&&(s++,a.push([])),h.split(" ").forEach(f=>{f=f.replace(/&#39;/g,"'"),f&&a[s].push({content:f,type:c})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(l=>{o(l,n.type)}):n.type==="html"&&a[s].push({content:n.text,type:"normal"})}return d(o,"processNode"),i.forEach(n=>{var c;n.type==="paragraph"?(c=n.tokens)==null||c.forEach(l=>{o(l)}):n.type==="html"?a[s].push({content:n.text,type:"normal"}):a[s].push({content:n.raw,type:"normal"})}),a}d(zc,"markdownToLines");function qc(e,{markdownAutoWrap:t}={}){const r=mo.lexer(e);function i(a){var s,o,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>${(s=a.tokens)==null?void 0:s.map(i).join("")}</strong>`:a.type==="em"?`<em>${(o=a.tokens)==null?void 0:o.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:(D.warn(`Unsupported markdown: ${a.type}`),a.raw)}return d(i,"output"),r.map(i).join("")}d(qc,"markdownToHTML");function Hc(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}d(Hc,"splitTextToChars");function jc(e,t){const r=Hc(t.content);return qs(e,[],r,t.type)}d(jc,"splitWordToFitWidth");function qs(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...s]=r,o=[...t,a];return e([{content:o.join(""),type:i}])?qs(e,o,s,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}d(qs,"splitWordToFitWidthRecursion");function Yc(e,t){if(e.some(({content:r})=>r.includes(`
126
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Wi(e,t)}d(Yc,"splitLineToFitWidth");function Wi(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 s=e.shift()??{content:" ",type:"normal"},o=[...i];if(a!==""&&o.push({content:a,type:"normal"}),o.push(s),t(o))return Wi(e,t,r,o);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[n,c]=jc(t,s);r.push([n]),c.content&&e.unshift(c)}return Wi(e,t,r)}d(Wi,"splitLineToFitWidthRecursion");function as(e,t){t&&e.attr("style",t)}d(as,"applyStyle");async function Uc(e,t,r,i,a=!1,s=Ot()){const o=e.append("foreignObject");o.attr("width",`${10*r}px`),o.attr("height",`${10*r}px`);const n=o.append("xhtml:div"),c=pr(t.label)?await ks(t.label.replace(br.lineBreakRegex,`
127
+ `),s):Jt(t.label,s),l=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(c),as(h,t.labelStyle),h.attr("class",`${l} ${i}`),as(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),n.style("max-width",r+"px"),n.style("text-align","center"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&n.attr("class","labelBkg");let u=n.node().getBoundingClientRect();return u.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),u=n.node().getBoundingClientRect()),o.node()}d(Uc,"addHtmlSpan");function ta(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")}d(ta,"createTspan");function Gc(e,t,r){const i=e.append("text"),a=ta(i,1,t);ea(a,r);const s=a.node().getComputedTextLength();return i.remove(),s}d(Gc,"computeWidthOfText");function ym(e,t,r){var o;const i=e.append("text"),a=ta(i,1,t);ea(a,[{content:r,type:"normal"}]);const s=(o=a.node())==null?void 0:o.getBoundingClientRect();return s&&i.remove(),s}d(ym,"computeDimensionOfText");function Vc(e,t,r,i=!1){const s=t.append("g"),o=s.insert("rect").attr("class","background").attr("style","stroke: none"),n=s.append("text").attr("y","-10.1");let c=0;for(const l of r){const h=d(f=>Gc(s,1.1,f)<=e,"checkWidth"),u=h(l)?[l]:Yc(l,h);for(const f of u){const p=ta(n,c,1.1);ea(p,f),c++}}if(i){const l=n.node().getBBox(),h=2;return o.attr("x",l.x-h).attr("y",l.y-h).attr("width",l.width+2*h).attr("height",l.height+2*h),s.node()}else return n.node()}d(Vc,"createFormattedText");function ea(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)})}d(ea,"updateTextContentAndStyles");async function Xc(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,s,o)=>(r.push((async()=>{const n=`${s}:${o}`;return await mm(n)?await Qr(n,void 0,{class:"label-icon"}):`<i class='${Jt(a,t).replace(":"," ")}'></i>`})()),a));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}d(Xc,"replaceIconSubstring");var Me=d(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:s=!0,isNode:o=!0,width:n=200,addSvgBackground:c=!1}={},l)=>{if(D.debug("XYZ createText",t,r,i,a,s,o,"addSvgBackground: ",c),s){const h=qc(t,l),u=await Xc(Ye(h),l),f=t.replace(/\\\\/g,"\\"),p={isNode:o,label:pr(t)?f:u,labelStyle:r.replace("fill:","color:")};return await Uc(e,p,n,a,c,l)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=zc(h.replace("<br>","<br/>"),l),f=Vc(n,e,u,t?c:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(f).attr("style",p)}else{const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ht(f).select("rect").attr("style",p.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(f).select("text").attr("style",g)}return f}},"createText");function _a(e,t,r){if(e&&e.length){const[i,a]=t,s=Math.PI/180*r,o=Math.cos(s),n=Math.sin(s);for(const c of e){const[l,h]=c;c[0]=(l-i)*o-(h-a)*n+i,c[1]=(l-i)*n+(h-a)*o+a}}}function xm(e,t){return e[0]===t[0]&&e[1]===t[1]}function bm(e,t,r,i=1){const a=r,s=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(a)for(const l of o)_a(l,n,a);const c=function(l,h,u){const f=[];for(const b of l){const S=[...b];xm(S[0],S[S.length-1])||S.push([S[0][0],S[0][1]]),S.length>2&&f.push(S)}const p=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let S=0;S<b.length-1;S++){const v=b[S],w=b[S+1];if(v[1]!==w[1]){const C=Math.min(v[1],w[1]);g.push({ymin:C,ymax:Math.max(v[1],w[1]),x:C===v[1]?v[0]:w[0],islope:(w[0]-v[0])/(w[1]-v[1])})}}if(g.sort((b,S)=>b.ymin<S.ymin?-1:b.ymin>S.ymin?1:b.x<S.x?-1:b.x>S.x?1:b.ymax===S.ymax?0:(b.ymax-S.ymax)/Math.abs(b.ymax-S.ymax)),!g.length)return p;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let S=0;S<g.length&&!(g[S].ymin>y);S++)b=S;g.splice(0,b+1).forEach(S=>{m.push({s:y,edge:S})})}if(m=m.filter(b=>!(b.edge.ymax<=y)),m.sort((b,S)=>b.edge.x===S.edge.x?0:(b.edge.x-S.edge.x)/Math.abs(b.edge.x-S.edge.x)),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const S=b+1;if(S>=m.length)break;const v=m[b].edge,w=m[S].edge;p.push([[Math.round(v.x),y],[Math.round(w.x),y]])}y+=u,m.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),x++}return p}(o,s,i);if(a){for(const l of o)_a(l,n,-a);(function(l,h,u){const f=[];l.forEach(p=>f.push(...p)),_a(f,h,u)})(c,n,-a)}return c}function Jr(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 s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=a),bm(e,a,i,s||1)}class Hs{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Jr(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 ra(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 Cm extends Hs{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=Jr(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(s),c=.5*i*Math.sin(s);for(const[l,h]of a)ra([l,h])&&o.push([[l[0]-n,l[1]+c],[...h]],[[l[0]+n,l[1]-c],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class Sm extends Hs{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,a);return i.ops=i.ops.concat(s.ops),i}}class km{constructor(t){this.helper=t}fillPolygons(t,r){const i=Jr(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 s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const o=a/4;for(const n of t){const c=ra(n),l=c/a,h=Math.ceil(l)-1,u=c-h*a,f=(n[0][0]+n[1][0])/2-a/4,p=Math.min(n[0][1],n[1][1]);for(let g=0;g<h;g++){const m=p+u+g*a,y=f-o+2*Math.random()*o,x=m-o+2*Math.random()*o,b=this.helper.ellipse(y,x,s,s,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class wm{constructor(t){this.helper=t}fillPolygons(t,r){const i=Jr(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,s=[];return t.forEach(o=>{const n=ra(o),c=Math.floor(n/(i+a)),l=(n+a-c*(i+a))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let p=0;p<c;p++){const g=p*(i+a),m=g+i,y=[h[0]+g*Math.cos(f)+l*Math.cos(f),h[1]+g*Math.sin(f)+l*Math.sin(f)],x=[h[0]+m*Math.cos(f)+l*Math.cos(f),h[1]+m*Math.sin(f)+l*Math.sin(f)];s.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}}),s}}class vm{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,s=Jr(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(s,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach(s=>{const o=ra(s),n=Math.round(o/(2*r));let c=s[0],l=s[1];c[0]>l[0]&&(c=s[1],l=s[0]);const h=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let u=0;u<n;u++){const f=2*u*r,p=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[c[0]+f*Math.cos(h),c[1]+f*Math.sin(h)],y=[c[0]+p*Math.cos(h),c[1]+p*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];a.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}}),a}}const Yt={};class _m{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Tm=0,Ta=1,Hn=2,ci={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 Ba(e,t){return e.type===t}function js(e){const t=[],r=function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Tm,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Ta,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:Hn,text:""},n}(e);let i="BOD",a=0,s=r[a];for(;!Ba(s,Hn);){let o=0;const n=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return js("M0,0"+e);a++,o=ci[s.text],i=s.text}else Ba(s,Ta)?o=ci[i]:(a++,o=ci[s.text],i=s.text);if(!(a+o<r.length))throw new Error("Path data ended short");for(let c=a;c<a+o;c++){const l=r[c];if(!Ba(l,Ta))throw new Error("Param not a number: "+i+","+l.text);n[n.length]=+l.text}if(typeof ci[i]!="number")throw new Error("Bad segment: "+i);{const c={key:i,data:n};t.push(c),a+=o,s=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Kc(e){let t=0,r=0,i=0,a=0;const s=[];for(const{key:o,data:n}of e)switch(o){case"M":s.push({key:"M",data:[...n]}),[t,r]=n,[i,a]=n;break;case"m":t+=n[0],r+=n[1],s.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":s.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const c=n.map((l,h)=>h%2?l+r:l+t);s.push({key:"C",data:c}),t=c[4],r=c[5];break}case"Q":s.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const c=n.map((l,h)=>h%2?l+r:l+t);s.push({key:"Q",data:c}),t=c[2],r=c[3];break}case"A":s.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],s.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":s.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const c=n.map((l,h)=>h%2?l+r:l+t);s.push({key:"S",data:c}),t=c[2],r=c[3];break}case"T":s.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=a}return s}function Zc(e){const t=[];let r="",i=0,a=0,s=0,o=0,n=0,c=0;for(const{key:l,data:h}of e){switch(l){case"M":t.push({key:"M",data:[...h]}),[i,a]=h,[s,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],a=h[5],n=h[2],c=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,a]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,a]});break;case"V":a=h[0],t.push({key:"L",data:[i,a]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-n),f=a+(a-c)):(u=i,f=a),t.push({key:"C",data:[u,f,...h]}),n=h[0],c=h[1],i=h[2],a=h[3];break}case"T":{const[u,f]=h;let p=0,g=0;r==="Q"||r==="T"?(p=i+(i-n),g=a+(a-c)):(p=i,g=a);const m=i+2*(p-i)/3,y=a+2*(g-a)/3,x=u+2*(p-u)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[m,y,x,b,u,f]}),n=p,c=g,i=u,a=f;break}case"Q":{const[u,f,p,g]=h,m=i+2*(u-i)/3,y=a+2*(f-a)/3,x=p+2*(u-p)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[m,y,x,b,p,g]}),n=u,c=f,i=p,a=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),p=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||f===0?(t.push({key:"C",data:[i,a,y,x,y,x]}),i=y,a=x):(i!==y||a!==x)&&(Qc(i,a,y,x,u,f,p,g,m).forEach(function(b){t.push({key:"C",data:b})}),i=y,a=x);break}case"Z":t.push({key:"Z",data:[]}),i=s,a=o}r=l}return t}function Er(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Qc(e,t,r,i,a,s,o,n,c,l){const h=(u=o,Math.PI*u/180);var u;let f=[],p=0,g=0,m=0,y=0;if(l)[p,g,m,y]=l;else{[e,t]=Er(e,t,-h),[r,i]=Er(r,i,-h);const O=(e-r)/2,A=(t-i)/2;let L=O*O/(a*a)+A*A/(s*s);L>1&&(L=Math.sqrt(L),a*=L,s*=L);const B=a*a,F=s*s,M=B*F-B*A*A-F*O*O,z=B*A*A+F*O*O,V=(n===c?-1:1)*Math.sqrt(Math.abs(M/z));m=V*a*A/s+(e+r)/2,y=V*-s*O/a+(t+i)/2,p=Math.asin(parseFloat(((t-y)/s).toFixed(9))),g=Math.asin(parseFloat(((i-y)/s).toFixed(9))),e<m&&(p=Math.PI-p),r<m&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),c&&p>g&&(p-=2*Math.PI),!c&&g>p&&(g-=2*Math.PI)}let x=g-p;if(Math.abs(x)>120*Math.PI/180){const O=g,A=r,L=i;g=c&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=Qc(r=m+a*Math.cos(g),i=y+s*Math.sin(g),A,L,a,s,o,0,c,[g,O,m,y])}x=g-p;const b=Math.cos(p),S=Math.sin(p),v=Math.cos(g),w=Math.sin(g),C=Math.tan(x/4),_=4/3*a*C,$=4/3*s*C,P=[e,t],I=[e+_*S,t-$*b],E=[r+_*w,i-$*v],W=[r,i];if(I[0]=2*P[0]-I[0],I[1]=2*P[1]-I[1],l)return[I,E,W].concat(f);{f=[I,E,W].concat(f);const O=[];for(let A=0;A<f.length;A+=3){const L=Er(f[A][0],f[A][1],h),B=Er(f[A+1][0],f[A+1][1],h),F=Er(f[A+2][0],f[A+2][1],h);O.push([L[0],L[1],B[0],B[1],F[0],F[1]])}return O}}const Bm={randOffset:function(e,t){return rt(e,t)},randOffsetWithRange:function(e,t,r){return zi(e,t,r)},ellipse:function(e,t,r,i,a){const s=th(r,i,a);return ss(e,t,a,s).opset},doubleLineOps:function(e,t,r,i,a){return Be(e,t,r,i,a,!0)}};function Jc(e,t,r,i,a){return{type:"path",ops:Be(e,t,r,i,a)}}function Si(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let s=0;s<i-1;s++)a.push(...Be(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&a.push(...Be(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?Jc(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function Lm(e,t,r,i,a){return function(s,o){return Si(s,!0,o)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],a)}function jn(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=hi(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:hi(r[0],1.5*(1+.22*t.roughness),Gn(t));for(let s=1;s<r.length;s++){const o=r[s];if(o.length){const n=hi(o,1*(1+.2*t.roughness),t),c=t.disableMultiStroke?[]:hi(o,1.5*(1+.22*t.roughness),Gn(t));for(const l of n)l.op!=="move"&&i.push(l);for(const l of c)l.op!=="move"&&a.push(l)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function th(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)),s=2*Math.PI/a;let o=Math.abs(e/2),n=Math.abs(t/2);const c=1-r.curveFitting;return o+=rt(o*c,r),n+=rt(n*c,r),{increment:s,rx:o,ry:n}}function ss(e,t,r,i){const[a,s]=Vn(i.increment,e,t,i.rx,i.ry,1,i.increment*zi(.1,zi(.4,1,r),r),r);let o=qi(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Vn(i.increment,e,t,i.rx,i.ry,1.5,0,r),c=qi(n,null,r);o=o.concat(c)}return{estimatedPoints:s,opset:{type:"path",ops:o}}}function Yn(e,t,r,i,a,s,o,n,c){const l=e,h=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=rt(.01*u,c),f+=rt(.01*f,c);let p=a,g=s;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const m=2*Math.PI/c.curveStepCount,y=Math.min(m/2,(g-p)/2),x=Xn(y,l,h,u,f,p,g,1,c);if(!c.disableMultiStroke){const b=Xn(y,l,h,u,f,p,g,1.5,c);x.push(...b)}return o&&(n?x.push(...Be(l,h,l+u*Math.cos(p),h+f*Math.sin(p),c),...Be(l,h,l+u*Math.cos(g),h+f*Math.sin(g),c)):x.push({op:"lineTo",data:[l,h]},{op:"lineTo",data:[l+u*Math.cos(p),h+f*Math.sin(p)]})),{type:"path",ops:x}}function Un(e,t){const r=Zc(Kc(js(e))),i=[];let a=[0,0],s=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":s=[n[0],n[1]],a=[n[0],n[1]];break;case"L":i.push(...Be(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]];break;case"C":{const[c,l,h,u,f,p]=n;i.push(...Mm(c,l,h,u,f,p,s,t)),s=[f,p];break}case"Z":i.push(...Be(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]]}return{type:"path",ops:i}}function La(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+rt(a,t),i[0][1]+rt(a,t)]});for(let o=1;o<s;o++)r.push({op:"lineTo",data:[i[o][0]+rt(a,t),i[o][1]+rt(a,t)]})}}return{type:"fillPath",ops:r}}function Qe(e,t){return function(r,i){let a=r.fillStyle||"hachure";if(!Yt[a])switch(a){case"zigzag":Yt[a]||(Yt[a]=new Cm(i));break;case"cross-hatch":Yt[a]||(Yt[a]=new Sm(i));break;case"dots":Yt[a]||(Yt[a]=new km(i));break;case"dashed":Yt[a]||(Yt[a]=new wm(i));break;case"zigzag-line":Yt[a]||(Yt[a]=new vm(i));break;default:a="hachure",Yt[a]||(Yt[a]=new Hs(i))}return Yt[a]}(t,Bm).fillPolygons(e,t)}function Gn(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function eh(e){return e.randomizer||(e.randomizer=new _m(e.seed||0)),e.randomizer.next()}function zi(e,t,r,i=1){return r.roughness*i*(eh(r)*(t-e)+e)}function rt(e,t,r=1){return zi(-e,e,t,r)}function Be(e,t,r,i,a,s=!1){const o=s?a.disableMultiStrokeFill:a.disableMultiStroke,n=ns(e,t,r,i,a,!0,!1);if(o)return n;const c=ns(e,t,r,i,a,!0,!0);return n.concat(c)}function ns(e,t,r,i,a,s,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),c=Math.sqrt(n);let l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let h=a.maxRandomnessOffset||0;h*h*100>n&&(h=c/10);const u=h/2,f=.2+.2*eh(a);let p=a.bowing*a.maxRandomnessOffset*(i-t)/200,g=a.bowing*a.maxRandomnessOffset*(e-r)/200;p=rt(p,a,l),g=rt(g,a,l);const m=[],y=()=>rt(u,a,l),x=()=>rt(h,a,l),b=a.preserveVertices;return o?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:rt(h,a,l)),t+(b?0:rt(h,a,l))]}),o?m.push({op:"bcurveTo",data:[p+e+(r-e)*f+y(),g+t+(i-t)*f+y(),p+e+2*(r-e)*f+y(),g+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[p+e+(r-e)*f+x(),g+t+(i-t)*f+x(),p+e+2*(r-e)*f+x(),g+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function hi(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+rt(t,r),e[0][1]+rt(t,r)]),i.push([e[0][0]+rt(t,r),e[0][1]+rt(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+rt(t,r),e[a][1]+rt(t,r)]),a===e.length-1&&i.push([e[a][0]+rt(t,r),e[a][1]+rt(t,r)]);return qi(i,null,r)}function qi(e,t,r){const i=e.length,a=[];if(i>3){const s=[],o=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const c=e[n];s[0]=[c[0],c[1]],s[1]=[c[0]+(o*e[n+1][0]-o*e[n-1][0])/6,c[1]+(o*e[n+1][1]-o*e[n-1][1])/6],s[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],s[3]=[e[n+1][0],e[n+1][1]],a.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[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(...ns(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return a}function Vn(e,t,r,i,a,s,o,n){const c=[],l=[];if(n.roughness===0){e/=4,l.push([t+i*Math.cos(-e),r+a*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+a*Math.sin(h)];c.push(u),l.push(u)}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 h=rt(.5,n)-Math.PI/2;l.push([rt(s,n)+t+.9*i*Math.cos(h-e),rt(s,n)+r+.9*a*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const p=[rt(s,n)+t+i*Math.cos(f),rt(s,n)+r+a*Math.sin(f)];c.push(p),l.push(p)}l.push([rt(s,n)+t+i*Math.cos(h+2*Math.PI+.5*o),rt(s,n)+r+a*Math.sin(h+2*Math.PI+.5*o)]),l.push([rt(s,n)+t+.98*i*Math.cos(h+o),rt(s,n)+r+.98*a*Math.sin(h+o)]),l.push([rt(s,n)+t+.9*i*Math.cos(h+.5*o),rt(s,n)+r+.9*a*Math.sin(h+.5*o)])}return[l,c]}function Xn(e,t,r,i,a,s,o,n,c){const l=s+rt(.1,c),h=[];h.push([rt(n,c)+t+.9*i*Math.cos(l-e),rt(n,c)+r+.9*a*Math.sin(l-e)]);for(let u=l;u<=o;u+=e)h.push([rt(n,c)+t+i*Math.cos(u),rt(n,c)+r+a*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),qi(h,null,c)}function Mm(e,t,r,i,a,s,o,n){const c=[],l=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const u=n.disableMultiStroke?1:2,f=n.preserveVertices;for(let p=0;p<u;p++)p===0?c.push({op:"move",data:[o[0],o[1]]}):c.push({op:"move",data:[o[0]+(f?0:rt(l[0],n)),o[1]+(f?0:rt(l[0],n))]}),h=f?[a,s]:[a+rt(l[p],n),s+rt(l[p],n)],c.push({op:"bcurveTo",data:[e+rt(l[p],n),t+rt(l[p],n),r+rt(l[p],n),i+rt(l[p],n),h[0],h[1]]});return c}function Fr(e){return[...e]}function Kn(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(Fr(e[0]),Fr(e[1]),Fr(e[2]),Fr(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 s=[],o=1-t;i.push(Fr(a[0]));for(let n=1;n+2<a.length;n++){const c=a[n];s[0]=[c[0],c[1]],s[1]=[c[0]+(o*a[n+1][0]-o*a[n-1][0])/6,c[1]+(o*a[n+1][1]-o*a[n-1][1])/6],s[2]=[a[n+1][0]+(o*a[n][0]-o*a[n+2][0])/6,a[n+1][1]+(o*a[n][1]-o*a[n+2][1])/6],s[3]=[a[n+1][0],a[n+1][1]],i.push(s[1],s[2],s[3])}}return i}function ki(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Am(e,t,r){const i=ki(t,r);if(i===0)return ki(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)),ki(e,Oe(t,r,a))}function Oe(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function os(e,t,r,i){const a=i||[];if(function(n,c){const l=n[c+0],h=n[c+1],u=n[c+2],f=n[c+3];let p=3*h[0]-2*l[0]-f[0];p*=p;let g=3*h[1]-2*l[1]-f[1];g*=g;let m=3*u[0]-2*f[0]-l[0];m*=m;let y=3*u[1]-2*f[1]-l[1];return y*=y,p<m&&(p=m),g<y&&(g=y),p+g}(e,t)<r){const n=e[t+0];a.length?(s=a[a.length-1],o=n,Math.sqrt(ki(s,o))>1&&a.push(n)):a.push(n),a.push(e[t+3])}else{const c=e[t+0],l=e[t+1],h=e[t+2],u=e[t+3],f=Oe(c,l,.5),p=Oe(l,h,.5),g=Oe(h,u,.5),m=Oe(f,p,.5),y=Oe(p,g,.5),x=Oe(m,y,.5);os([c,f,m,x],0,r,a),os([x,y,g,u],0,r,a)}var s,o;return a}function Em(e,t){return Hi(e,0,e.length,t)}function Hi(e,t,r,i,a){const s=a||[],o=e[t],n=e[r-1];let c=0,l=1;for(let h=t+1;h<r-1;++h){const u=Am(e[h],o,n);u>c&&(c=u,l=h)}return Math.sqrt(c)>i?(Hi(e,t,l+1,i,s),Hi(e,l,r,i,s)):(s.length||s.push(o),s.push(n)),s}function Ma(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let s=0;s<a;s++)os(e,3*s,t,i);return r&&r>0?Hi(i,0,i.length,r):i}const Vt="none";class ji{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,s){const o=this._o(s);return this._d("line",[Jc(t,r,i,a,o)],o)}rectangle(t,r,i,a,s){const o=this._o(s),n=[],c=Lm(t,r,i,a,o);if(o.fill){const l=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];o.fillStyle==="solid"?n.push(La([l],o)):n.push(Qe([l],o))}return o.stroke!==Vt&&n.push(c),this._d("rectangle",n,o)}ellipse(t,r,i,a,s){const o=this._o(s),n=[],c=th(i,a,o),l=ss(t,r,o,c);if(o.fill)if(o.fillStyle==="solid"){const h=ss(t,r,o,c).opset;h.type="fillPath",n.push(h)}else n.push(Qe([l.estimatedPoints],o));return o.stroke!==Vt&&n.push(l.opset),this._d("ellipse",n,o)}circle(t,r,i,a){const s=this.ellipse(t,r,i,i,a);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Si(t,!1,i)],i)}arc(t,r,i,a,s,o,n=!1,c){const l=this._o(c),h=[],u=Yn(t,r,i,a,s,o,n,!0,l);if(n&&l.fill)if(l.fillStyle==="solid"){const f=Object.assign({},l);f.disableMultiStroke=!0;const p=Yn(t,r,i,a,s,o,!0,!1,f);p.type="fillPath",h.push(p)}else h.push(function(f,p,g,m,y,x,b){const S=f,v=p;let w=Math.abs(g/2),C=Math.abs(m/2);w+=rt(.01*w,b),C+=rt(.01*C,b);let _=y,$=x;for(;_<0;)_+=2*Math.PI,$+=2*Math.PI;$-_>2*Math.PI&&(_=0,$=2*Math.PI);const P=($-_)/b.curveStepCount,I=[];for(let E=_;E<=$;E+=P)I.push([S+w*Math.cos(E),v+C*Math.sin(E)]);return I.push([S+w*Math.cos($),v+C*Math.sin($)]),I.push([S,v]),Qe([I],b)}(t,r,i,a,s,o,l));return l.stroke!==Vt&&h.push(u),this._d("arc",h,l)}curve(t,r){const i=this._o(r),a=[],s=jn(t,i);if(i.fill&&i.fill!==Vt)if(i.fillStyle==="solid"){const o=jn(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const c=typeof n[0][0]=="number"?[n]:n;for(const l of c)l.length<3?o.push(...l):l.length===3?o.push(...Ma(Kn([l[0],l[0],l[1],l[2]]),10,(1+i.roughness)/2)):o.push(...Ma(Kn(l),10,(1+i.roughness)/2))}o.length&&a.push(Qe([o],i))}return i.stroke!==Vt&&a.push(s),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],s=Si(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(La([t],i)):a.push(Qe([t],i))),i.stroke!==Vt&&a.push(s),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 s=i.fill&&i.fill!=="transparent"&&i.fill!==Vt,o=i.stroke!==Vt,n=!!(i.simplification&&i.simplification<1),c=function(h,u,f){const p=Zc(Kc(js(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Ma(x,u)),x=[]},S=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:w,data:C}of p)switch(w){case"M":S(),y=[C[0],C[1]],m.push(y);break;case"L":b(),m.push([C[0],C[1]]);break;case"C":if(!x.length){const _=m.length?m[m.length-1]:y;x.push([_[0],_[1]])}x.push([C[0],C[1]]),x.push([C[2],C[3]]),x.push([C[4],C[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(S(),!f)return g;const v=[];for(const w of g){const C=Em(w,f);C.length&&v.push(C)}return v}(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),l=Un(t,i);if(s)if(i.fillStyle==="solid")if(c.length===1){const h=Un(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else a.push(La(c,i));else a.push(Qe(c,i));return o&&(n?c.forEach(h=>{a.push(Si(h,!1,i))}):a.push(l)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const s=typeof r=="number"&&r>=0?a.data.map(o=>+o.toFixed(r)):a.data;switch(a.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const s of r){let o=null;switch(s.type){case"path":o={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Vt};break;case"fillPath":o={d:this.opsToPath(s),stroke:Vt,strokeWidth:0,fill:i.fill||Vt};break;case"fillSketch":o=this.fillSketch(s,i)}o&&a.push(o)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Vt,strokeWidth:i,fill:Vt}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class Fm{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new ji(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":a.save(),a.strokeStyle=i.stroke==="none"?"transparent":i.stroke,a.lineWidth=i.strokeWidth,i.strokeLineDash&&a.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(a.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(a,o,s),a.restore();break;case"fillPath":{a.save(),a.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,o,s,n),a.restore();break}case"fillSketch":this.fillSketch(a,o,i)}}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=a,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,a="nonzero"){t.beginPath();for(const s of r.ops){const o=typeof i=="number"&&i>=0?s.data.map(n=>+n.toFixed(i)):s.data;switch(s.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(a):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,a,s){const o=this.gen.line(t,r,i,a,s);return this.draw(o),o}rectangle(t,r,i,a,s){const o=this.gen.rectangle(t,r,i,a,s);return this.draw(o),o}ellipse(t,r,i,a,s){const o=this.gen.ellipse(t,r,i,a,s);return this.draw(o),o}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s),s}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,a,s,o,n=!1,c){const l=this.gen.arc(t,r,i,a,s,o,n,c);return this.draw(l),l}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const ui="http://www.w3.org/2000/svg";class Dm{constructor(t,r){this.svg=t,this.gen=new ji(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,s=a.createElementNS(ui,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let c=null;switch(n.type){case"path":c=a.createElementNS(ui,"path"),c.setAttribute("d",this.opsToPath(n,o)),c.setAttribute("stroke",i.stroke),c.setAttribute("stroke-width",i.strokeWidth+""),c.setAttribute("fill","none"),i.strokeLineDash&&c.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&c.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":c=a.createElementNS(ui,"path"),c.setAttribute("d",this.opsToPath(n,o)),c.setAttribute("stroke","none"),c.setAttribute("stroke-width","0"),c.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||c.setAttribute("fill-rule","evenodd");break;case"fillSketch":c=this.fillSketch(a,n,i)}c&&s.appendChild(c)}return s}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const s=t.createElementNS(ui,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",a+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,s){const o=this.gen.line(t,r,i,a,s);return this.draw(o)}rectangle(t,r,i,a,s){const o=this.gen.rectangle(t,r,i,a,s);return this.draw(o)}ellipse(t,r,i,a,s){const o=this.gen.ellipse(t,r,i,a,s);return this.draw(o)}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s)}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,s,o,n=!1,c){const l=this.gen.arc(t,r,i,a,s,o,n,c);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)}}var Y={canvas:(e,t)=>new Fm(e,t),svg:(e,t)=>new Dm(e,t),generator:e=>new ji(e),newSeed:()=>ji.newSeed()},et=d(async(e,t,r)=>{var u,f;let i;const a=t.useHtmlLabels||Bt((u=dt())==null?void 0:u.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",Rt(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const c=await Me(o,Jt(Ye(n),dt()),{useHtmlLabels:a,width:t.width||((f=dt().flowchart)==null?void 0:f.wrappingWidth),cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let l=c.getBBox();const h=((t==null?void 0:t.padding)??0)/2;if(a){const p=c.children[0],g=ht(c),m=p.getElementsByTagName("img");if(m){const y=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(x=>new Promise(b=>{function S(){if(x.style.display="flex",x.style.flexDirection="column",y){const v=dt().fontSize?dt().fontSize:window.getComputedStyle(document.body).fontSize,w=5,[C=Oo.fontSize]=Ji(v),_=C*w+"px";x.style.minWidth=_,x.style.maxWidth=_}else x.style.width="100%";b(x)}d(S,"setupImage"),setTimeout(()=>{x.complete&&S()}),x.addEventListener("error",S),x.addEventListener("load",S)})))}l=p.getBoundingClientRect(),g.attr("width",l.width),g.attr("height",l.height)}return a?o.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"):o.attr("transform","translate(0, "+-l.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:s,bbox:l,halfPadding:h,label:o}},"labelHelper"),Aa=d(async(e,t,r)=>{var c,l,h,u,f,p;const i=r.useHtmlLabels||Bt((l=(c=dt())==null?void 0:c.flowchart)==null?void 0:l.htmlLabels),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await Me(a,Jt(Ye(t),dt()),{useHtmlLabels:i,width:r.width||((u=(h=dt())==null?void 0:h.flowchart)==null?void 0:u.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=s.getBBox();const n=r.padding/2;if(Bt((p=(f=dt())==null?void 0:f.flowchart)==null?void 0:p.htmlLabels)){const g=s.children[0],m=ht(s);o=g.getBoundingClientRect(),m.attr("width",o.width),m.attr("height",o.height)}return i?a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):a.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:a}},"insertLabel"),X=d((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),tt=d((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function lt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}d(lt,"createPathFromPoints");function Le(e,t,r,i,a,s){const o=[],c=r-e,l=i-t,h=c/s,u=2*Math.PI/h,f=t+l/2;for(let p=0;p<=50;p++){const g=p/50,m=e+g*c,y=f+a*Math.sin(u*(m-e));o.push({x:m,y})}return o}d(Le,"generateFullSineWavePoints");function Ur(e,t,r,i,a,s){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,p=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-p,y:-g})}return o}d(Ur,"generateCirclePoints");var $m=d((e,t)=>{var r=e.x,i=e.y,a=t.x-r,s=t.y-i,o=e.width/2,n=e.height/2,c,l;return Math.abs(s)*o>Math.abs(a)*n?(s<0&&(n=-n),c=s===0?0:n*a/s,l=n):(a<0&&(o=-o),c=o,l=a===0?0:o*s/a),{x:r+c,y:i+l}},"intersectRect"),Sr=$m;function rh(e,t){t&&e.attr("style",t)}d(rh,"applyStyle");async function ih(e){const t=ht(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=dt();let a=e.label;e.label&&pr(e.label)&&(a=await ks(e.label.replace(br.lineBreakRegex,`
128
+ `),i));const o='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+a+"</span>";return r.html(Jt(o,i)),rh(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()}d(ih,"addHtmlLabel");var Om=d(async(e,t,r,i)=>{let a=e||"";if(typeof a=="object"&&(a=a[0]),Bt(dt().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"<br />"),D.info("vertexText"+a);const s={isNode:i,label:Ye(a).replace(/fa[blrs]?:fa-[\w-]+/g,n=>`<i class='${n.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await ih(s)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof a=="string"?o=a.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(a)?o=a:o=[];for(const n of o){const c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),r?c.setAttribute("class","title-row"):c.setAttribute("class","row"),c.textContent=n.trim(),s.appendChild(c)}return s}},"createLabel"),Ne=Om,Ae=d((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"),ah=d(async(e,t)=>{D.info("Creating subgraph rect for ",t.id,t);const r=dt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:n,nodeStyles:c,borderStyles:l,backgroundStyles:h}=G(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Bt(r.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await Me(p,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0});let m=g.getBBox();if(Bt(r.flowchart.htmlLabels)){const _=g.children[0],$=ht(g);m=_.getBoundingClientRect(),$.attr("width",m.width),$.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,S=t.y-x/2;D.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const _=Y.svg(u),$=U(t,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),P=_.path(Ae(b,S,y,x,0),$);v=u.insert(()=>(D.debug("Rough node insert CXC",P),P),":first-child"),v.select("path:nth-child(2)").attr("style",l.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",S).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:w}=Os(r);if(p.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),n){const _=p.select("span");_&&_.attr("style",n)}const C=v.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=m.height-t.padding/2,t.intersect=function(_){return Sr(t,_)},{cluster:u,labelBBox:m}},"rect"),Im=d((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,s=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return Sr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Rm=d(async(e,t)=>{const r=dt(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:s,compositeBackground:o,compositeTitleBackground:n,nodeBorder:c}=i,l=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=l.insert("g",":first-child"),u=l.insert("g").attr("class","cluster-label");let f=l.append("rect");const p=u.node().appendChild(await Ne(t.label,t.labelStyle,void 0,!0));let g=p.getBBox();if(Bt(r.flowchart.htmlLabels)){const P=p.children[0],I=ht(p);g=P.getBoundingClientRect(),I.attr("width",g.width),I.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,S=t.height+m-g.height-6,v=t.x-x/2,w=t.y-b/2;t.width=x;const C=t.y-t.height/2-y+g.height+2;let _;if(t.look==="handDrawn"){const P=t.cssClasses.includes("statediagram-cluster-alt"),I=Y.svg(l),E=t.rx||t.ry?I.path(Ae(v,w,x,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:c,seed:a}):I.rectangle(v,w,x,b,{seed:a});_=l.insert(()=>E,":first-child");const W=I.rectangle(v,C,x,S,{fill:P?s:o,fillStyle:P?"hachure":"solid",stroke:c,seed:a});_=l.insert(()=>E,":first-child"),f=l.insert(()=>W)}else _=h.insert("rect",":first-child"),_.attr("class","outer").attr("x",v).attr("y",w).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",v).attr("y",C).attr("width",x).attr("height",S);u.attr("transform",`translate(${t.x-g.width/2}, ${w+1-(Bt(r.flowchart.htmlLabels)?0:3)})`);const $=_.node().getBBox();return t.height=$.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(P){return Sr(t,P)},{cluster:l,labelBBox:g}},"roundedWithTitle"),Pm=d(async(e,t)=>{D.info("Creating subgraph rect for ",t.id,t);const r=dt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:n,nodeStyles:c,borderStyles:l,backgroundStyles:h}=G(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Bt(r.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await Me(p,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=g.getBBox();if(Bt(r.flowchart.htmlLabels)){const _=g.children[0],$=ht(g);m=_.getBoundingClientRect(),$.attr("width",m.width),$.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,S=t.y-x/2;D.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const _=Y.svg(u),$=U(t,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),P=_.path(Ae(b,S,y,x,t.rx),$);v=u.insert(()=>(D.debug("Rough node insert CXC",P),P),":first-child"),v.select("path:nth-child(2)").attr("style",l.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",S).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:w}=Os(r);if(p.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),n){const _=p.select("span");_&&_.attr("style",n)}const C=v.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=m.height-t.padding/2,t.intersect=function(_){return Sr(t,_)},{cluster:u,labelBBox:m}},"kanbanSection"),Nm=d((e,t)=>{const r=dt(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:s}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),n=o.insert("g",":first-child"),c=0*t.padding,l=t.width+c;t.diff=-t.padding;const h=t.height+c,u=t.x-l/2,f=t.y-h/2;t.width=l;let p;if(t.look==="handDrawn"){const y=Y.svg(o).rectangle(u,f,l,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:a});p=o.insert(()=>y,":first-child")}else p=n.insert("rect",":first-child"),p.attr("class","divider").attr("x",u).attr("y",f).attr("width",l).attr("height",h).attr("data-look",t.look);const g=p.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return Sr(t,m)},{cluster:o,labelBBox:{}}},"divider"),Wm=ah,zm={rect:ah,squareRect:Wm,roundedWithTitle:Rm,noteGroup:Im,divider:Nm,kanbanSection:Pm},sh=new Map,qm=d(async(e,t)=>{const r=t.shape||"rect",i=await zm[r](e,t);return sh.set(t.id,i),i},"insertCluster"),Wb=d(()=>{sh=new Map},"clear");function nh(e,t){return e.intersect(t)}d(nh,"intersectNode");var Hm=nh;function oh(e,t,r,i){var a=e.x,s=e.y,o=a-i.x,n=s-i.y,c=Math.sqrt(t*t*n*n+r*r*o*o),l=Math.abs(t*r*o/c);i.x<a&&(l=-l);var h=Math.abs(t*r*n/c);return i.y<s&&(h=-h),{x:a+l,y:s+h}}d(oh,"intersectEllipse");var lh=oh;function ch(e,t,r){return lh(e,t,t,r)}d(ch,"intersectCircle");var jm=ch;function hh(e,t,r,i){{const a=t.y-e.y,s=e.x-t.x,o=t.x*e.y-e.x*t.y,n=a*r.x+s*r.y+o,c=a*i.x+s*i.y+o,l=1e-6;if(n!==0&&c!==0&&ls(n,c))return;const h=i.y-r.y,u=r.x-i.x,f=i.x*r.y-r.x*i.y,p=h*e.x+u*e.y+f,g=h*t.x+u*t.y+f;if(Math.abs(p)<l&&Math.abs(g)<l&&ls(p,g))return;const m=a*u-h*s;if(m===0)return;const y=Math.abs(m/2);let x=s*f-u*o;const b=x<0?(x-y)/m:(x+y)/m;x=h*o-a*f;const S=x<0?(x-y)/m:(x+y)/m;return{x:b,y:S}}}d(hh,"intersectLine");function ls(e,t){return e*t>0}d(ls,"sameSign");var Ym=hh;function uh(e,t,r){let i=e.x,a=e.y,s=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),n=Math.min(n,h.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let c=i-e.width/2-o,l=a-e.height/2-n;for(let h=0;h<t.length;h++){let u=t[h],f=t[h<t.length-1?h+1:0],p=Ym(e,r,{x:c+u.x,y:l+u.y},{x:c+f.x,y:l+f.y});p&&s.push(p)}return s.length?(s.length>1&&s.sort(function(h,u){let f=h.x-r.x,p=h.y-r.y,g=Math.sqrt(f*f+p*p),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return g<x?-1:g===x?0:1}),s[0]):e}d(uh,"intersectPolygon");var Um=uh,q={node:Hm,circle:jm,ellipse:lh,polygon:Um,rect:Sr};function dh(e,t){const{labelStyles:r}=G(t);t.labelStyle=r;const i=tt(t);let a=i;i||(a="anchor");const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,c=Y.svg(s),l=U(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(l.roughness=0);const h=c.circle(0,0,o*2,l),u=s.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",Rt(n)),X(t,u),t.intersect=function(f){return D.info("Circle intersect",t,o,f),q.circle(t,o,f)},s}d(dh,"anchor");function cs(e,t,r,i,a,s,o){const c=(e+r)/2,l=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,p=u/a,g=f/s,m=Math.sqrt(p**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=c+y*s*Math.sin(h)*(o?-1:1),b=l-y*a*Math.cos(h)*(o?-1:1),S=Math.atan2((t-b)/s,(e-x)/a);let w=Math.atan2((i-b)/s,(r-x)/a)-S;o&&w<0&&(w+=2*Math.PI),!o&&w>0&&(w-=2*Math.PI);const C=[];for(let _=0;_<20;_++){const $=_/19,P=S+$*w,I=x+a*Math.cos(P),E=b+s*Math.sin(P);C.push({x:I,y:E})}return C}d(cs,"generateArcPoints");async function fh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=s.width+t.padding+20,n=s.height+t.padding,c=n/2,l=c/(2.5+n/50),{cssStyles:h}=t,u=[{x:o/2,y:-n/2},{x:-o/2,y:-n/2},...cs(-o/2,-n/2,-o/2,n/2,l,c,!1),{x:o/2,y:n/2},...cs(o/2,n/2,o/2,-n/2,l,c,!0)],f=Y.svg(a),p=U(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=lt(u),m=f.path(g,p),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${l/2}, 0)`),X(t,y),t.intersect=function(x){return q.polygon(t,u,x)},a}d(fh,"bowTieRect");function Ee(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+")")}d(Ee,"insertPolygonShape");async function ph(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=s.height+t.padding,n=12,c=s.width+t.padding+n,l=0,h=c,u=-o,f=0,p=[{x:l+n,y:u},{x:h,y:u},{x:h,y:f},{x:l,y:f},{x:l,y:u+n},{x:l+n,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=Y.svg(a),x=U(t,{}),b=lt(p),S=y.path(b,x);g=a.insert(()=>S,":first-child").attr("transform",`translate(${-c/2}, ${o/2})`),m&&g.attr("style",m)}else g=Ee(a,c,o,p);return i&&g.attr("style",i),X(t,g),t.intersect=function(y){return q.polygon(t,p,y)},a}d(ph,"card");function gh(e,t){const{nodeStyles:r}=G(t);t.label="";const i=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(28,t.width??0),o=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],n=Y.svg(i),c=U(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=lt(o),h=n.path(l,c),u=i.insert(()=>h,":first-child");return a&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return q.polygon(t,o,f)},i}d(gh,"choice");async function Ys(e,t,r){const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i;const{shapeSvg:s,bbox:o,halfPadding:n}=await et(e,t,tt(t)),c=(r==null?void 0:r.padding)??n,l=o.width/2+c;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=Y.svg(s),p=U(t,{}),g=f.circle(0,0,l*2,p);h=s.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",Rt(u))}else h=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",l).attr("cx",0).attr("cy",0);return X(t,h),t.calcIntersect=function(f,p){const g=f.width/2;return q.circle(f,g,p)},t.intersect=function(f){return D.info("Circle intersect",t,l,f),q.circle(t,l,f)},s}d(Ys,"circle");function mh(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,a={x:i/2*t,y:i/2*r},s={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${n.x},${n.y}
129
+ M ${a.x},${a.y} L ${o.x},${o.y}`}d(mh,"createLine");function yh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),s=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=Y.svg(a),c=U(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=n.circle(0,0,s*2,c),h=mh(s),u=n.path(h,c),f=a.insert(()=>l,":first-child");return f.insert(()=>u),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),X(t,f),t.intersect=function(p){return D.info("crossedCircle intersect",t,{radius:s,point:p}),q.circle(t,s,p)},a}d(yh,"crossedCircle");function ye(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,p=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-p,y:-g})}return o}d(ye,"generateCirclePoints");async function xh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=s.width+(t.padding??0),c=s.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=t,u=[...ye(n/2,-c/2,l,30,-90,0),{x:-n/2-l,y:l},...ye(n/2+l*2,-l,l,20,-180,-270),...ye(n/2+l*2,l,l,20,-90,-180),{x:-n/2-l,y:-c/2},...ye(n/2,c/2,l,20,0,90)],f=[{x:n/2,y:-c/2-l},{x:-n/2,y:-c/2-l},...ye(n/2,-c/2,l,20,-90,0),{x:-n/2-l,y:-l},...ye(n/2+n*.1,-l,l,20,-180,-270),...ye(n/2+n*.1,l,l,20,-90,-180),{x:-n/2-l,y:c/2},...ye(n/2,c/2,l,20,0,90),{x:-n/2,y:c/2+l},{x:n/2,y:c/2+l}],p=Y.svg(a),g=U(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=lt(u).replace("Z",""),x=p.path(y,g),b=lt(f),S=p.path(b,{...g}),v=a.insert("g",":first-child");return v.insert(()=>S,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.attr("class","text"),h&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${l}, 0)`),o.attr("transform",`translate(${-n/2+l-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),X(t,v),t.intersect=function(w){return q.polygon(t,f,w)},a}d(xh,"curlyBraceLeft");function xe(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,p=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:p,y:g})}return o}d(xe,"generateCirclePoints");async function bh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=s.width+(t.padding??0),c=s.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=t,u=[...xe(n/2,-c/2,l,20,-90,0),{x:n/2+l,y:-l},...xe(n/2+l*2,-l,l,20,-180,-270),...xe(n/2+l*2,l,l,20,-90,-180),{x:n/2+l,y:c/2},...xe(n/2,c/2,l,20,0,90)],f=[{x:-n/2,y:-c/2-l},{x:n/2,y:-c/2-l},...xe(n/2,-c/2,l,20,-90,0),{x:n/2+l,y:-l},...xe(n/2+l*2,-l,l,20,-180,-270),...xe(n/2+l*2,l,l,20,-90,-180),{x:n/2+l,y:c/2},...xe(n/2,c/2,l,20,0,90),{x:n/2,y:c/2+l},{x:-n/2,y:c/2+l}],p=Y.svg(a),g=U(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=lt(u).replace("Z",""),x=p.path(y,g),b=lt(f),S=p.path(b,{...g}),v=a.insert("g",":first-child");return v.insert(()=>S,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.attr("class","text"),h&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-l}, 0)`),o.attr("transform",`translate(${-n/2+(t.padding??0)/2-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),X(t,v),t.intersect=function(w){return q.polygon(t,f,w)},a}d(bh,"curlyBraceRight");function At(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,p=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-p,y:-g})}return o}d(At,"generateCirclePoints");async function Ch(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=s.width+(t.padding??0),c=s.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=t,u=[...At(n/2,-c/2,l,30,-90,0),{x:-n/2-l,y:l},...At(n/2+l*2,-l,l,20,-180,-270),...At(n/2+l*2,l,l,20,-90,-180),{x:-n/2-l,y:-c/2},...At(n/2,c/2,l,20,0,90)],f=[...At(-n/2+l+l/2,-c/2,l,20,-90,-180),{x:n/2-l/2,y:l},...At(-n/2-l/2,-l,l,20,0,90),...At(-n/2-l/2,l,l,20,-90,0),{x:n/2-l/2,y:-l},...At(-n/2+l+l/2,c/2,l,30,-180,-270)],p=[{x:n/2,y:-c/2-l},{x:-n/2,y:-c/2-l},...At(n/2,-c/2,l,20,-90,0),{x:-n/2-l,y:-l},...At(n/2+l*2,-l,l,20,-180,-270),...At(n/2+l*2,l,l,20,-90,-180),{x:-n/2-l,y:c/2},...At(n/2,c/2,l,20,0,90),{x:-n/2,y:c/2+l},{x:n/2-l-l/2,y:c/2+l},...At(-n/2+l+l/2,-c/2,l,20,-90,-180),{x:n/2-l/2,y:l},...At(-n/2-l/2,-l,l,20,0,90),...At(-n/2-l/2,l,l,20,-90,0),{x:n/2-l/2,y:-l},...At(-n/2+l+l/2,c/2,l,30,-180,-270)],g=Y.svg(a),m=U(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=lt(u).replace("Z",""),b=g.path(x,m),v=lt(f).replace("Z",""),w=g.path(v,m),C=lt(p),_=g.path(C,{...m}),$=a.insert("g",":first-child");return $.insert(()=>_,":first-child").attr("stroke-opacity",0),$.insert(()=>b,":first-child"),$.insert(()=>w,":first-child"),$.attr("class","text"),h&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),$.attr("transform",`translate(${l-l/4}, 0)`),o.attr("transform",`translate(${-n/2+(t.padding??0)/2-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),X(t,$),t.intersect=function(P){return q.polygon(t,p,P)},a}d(Ch,"curlyBraces");async function Sh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=80,n=20,c=Math.max(o,(s.width+(t.padding??0)*2)*1.25,(t==null?void 0:t.width)??0),l=Math.max(n,s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/2,{cssStyles:u}=t,f=Y.svg(a),p=U(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=c,m=l,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...Ur(-y,-m/2,h,50,270,90)],S=lt(b),v=f.path(S,p),w=a.insert(()=>v,":first-child");return w.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),w.attr("transform",`translate(${-c/2}, ${-l/2})`),X(t,w),t.intersect=function(C){return q.polygon(t,b,C)},a}d(Sh,"curvedTrapezoid");var Gm=d((e,t,r,i,a,s)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Vm=d((e,t,r,i,a,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),Xm=d((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function kh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+t.padding,t.width??0),c=n/2,l=c/(2.5+n/50),h=Math.max(s.height+l+t.padding,t.height??0);let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const p=Y.svg(a),g=Vm(0,0,n,h,c,l),m=Xm(0,l,n,h,c,l),y=p.path(g,U(t,{})),x=p.path(m,U(t,{fill:"none"}));u=a.insert(()=>x,":first-child"),u=a.insert(()=>y,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const p=Gm(0,0,n,h,c,l);u=a.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",Rt(f)).attr("style",i)}return u.attr("label-offset-y",l),u.attr("transform",`translate(${-n/2}, ${-(h/2+l)})`),X(t,u),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+(t.padding??0)/1.5-(s.y-(s.top??0))})`),t.intersect=function(p){const g=q.rect(t,p),m=g.x-(t.x??0);if(c!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-l)){let y=l*l*(1-m*m/(c*c));y>0&&(y=Math.sqrt(y)),y=l-y,p.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},a}d(kh,"cylinder");async function wh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=s.width+t.padding,c=s.height+t.padding,l=c*.2,h=-n/2,u=-c/2-l/2,{cssStyles:f}=t,p=Y.svg(a),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+l},{x:-h,y:u+l},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+l}],y=p.polygon(m.map(b=>[b.x,b.y]),g),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(t.padding??0)/2-(s.x-(s.left??0))}, ${u+l+(t.padding??0)/2-(s.y-(s.top??0))})`),X(t,x),t.intersect=function(b){return q.rect(t,b)},a}d(wh,"dividedRectangle");async function vh(e,t){var f,p;const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o}=await et(e,t,tt(t)),c=s.width/2+o+5,l=s.width/2+o;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=Y.svg(a),m=U(t,{roughness:.2,strokeWidth:2.5}),y=U(t,{roughness:.2,strokeWidth:1.5}),x=g.circle(0,0,c*2,m),b=g.circle(0,0,l*2,y);h=a.insert("g",":first-child"),h.attr("class",Rt(t.cssClasses)).attr("style",Rt(u)),(f=h.node())==null||f.appendChild(x),(p=h.node())==null||p.appendChild(b)}else{h=a.insert("g",":first-child");const g=h.insert("circle",":first-child"),m=h.insert("circle");h.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0)}return X(t,h),t.intersect=function(g){return D.info("DoubleCircle intersect",t,c,g),q.circle(t,c,g)},a}d(vh,"doublecircle");function _h(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=G(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,c=Y.svg(s),{nodeBorder:l}=r,h=U(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=c.circle(0,0,o*2,h),f=s.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${l} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),X(t,f),t.intersect=function(p){return D.info("filledCircle intersect",t,{radius:o,point:p}),q.circle(t,o,p)},s}d(_h,"filledCircle");async function Th(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=s.width+(t.padding??0),c=n+s.height,l=n+s.height,h=[{x:0,y:-c},{x:l,y:-c},{x:l/2,y:0}],{cssStyles:u}=t,f=Y.svg(a),p=U(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=lt(h),m=f.path(g,p),y=a.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=n,t.height=c,X(t,y),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-c/2+(t.padding??0)/2+(s.y-(s.top??0))})`),t.intersect=function(x){return D.info("Triangle intersect",t,h,x),q.polygon(t,h,x)},a}d(Th,"flippedTriangle");function Bh(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:s}=G(t);t.label="";const o=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let c=Math.max(70,(t==null?void 0:t.width)??0),l=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(c=Math.max(10,(t==null?void 0:t.width)??0),l=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*c/2,u=-1*l/2,f=Y.svg(o),p=U(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=f.rectangle(h,u,c,l,p),m=o.insert(()=>g,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),X(t,m);const y=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return q.rect(t,x)},o}d(Bh,"forkJoin");async function Lh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=80,s=50,{shapeSvg:o,bbox:n}=await et(e,t,tt(t)),c=Math.max(a,n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s,n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/2,{cssStyles:u}=t,f=Y.svg(o),p=U(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-c/2,y:-l/2},{x:c/2-h,y:-l/2},...Ur(-c/2+h,0,h,50,90,270),{x:c/2-h,y:l/2},{x:-c/2,y:l/2}],m=lt(g),y=f.path(m,p),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),X(t,x),t.intersect=function(b){return D.info("Pill intersect",t,{radius:h,point:b}),q.polygon(t,g,b)},o}d(Lh,"halfRoundedRectangle");async function Mh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=s.height+(t.padding??0),n=s.width+(t.padding??0)*2.5,{cssStyles:c}=t,l=Y.svg(a),h=U(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=n/2;const f=u/6;u=u+f;const p=o/2,g=p/2,m=u-g,y=[{x:-m,y:-p},{x:0,y:-p},{x:m,y:-p},{x:u,y:0},{x:m,y:p},{x:0,y:p},{x:-m,y:p},{x:-u,y:0}],x=lt(y),b=l.path(x,h),S=a.insert(()=>b,":first-child");return S.attr("class","basic label-container"),c&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),t.width=n,t.height=o,X(t,S),t.intersect=function(v){return q.polygon(t,y,v)},a}d(Mh,"hexagon");async function Ah(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await et(e,t,tt(t)),s=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,c=Y.svg(a),l=U(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=[{x:0,y:0},{x:s,y:0},{x:0,y:o},{x:s,y:o}],u=lt(h),f=c.path(u,l),p=a.insert(()=>f,":first-child");return p.attr("class","basic label-container"),n&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",i),p.attr("transform",`translate(${-s/2}, ${-o/2})`),X(t,p),t.intersect=function(g){return D.info("Pill intersect",t,{points:h}),q.polygon(t,h,g)},a}d(Ah,"hourglass");async function Eh(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:l,bbox:h,label:u}=await et(e,t,"icon-shape default"),f=t.pos==="t",p=n,g=n,{nodeBorder:m}=r,{stylesMap:y}=Cr(t),x=-g/2,b=-p/2,S=t.label?8:0,v=Y.svg(l),w=U(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const C=v.rectangle(x,b,g,p,w),_=Math.max(g,h.width),$=p+h.height+S,P=v.rectangle(-_/2,-$/2,_,$,{...w,fill:"transparent",stroke:"none"}),I=l.insert(()=>C,":first-child"),E=l.insert(()=>P);if(t.icon){const W=l.append("g");W.html(`<g>${await Qr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const O=W.node().getBBox(),A=O.width,L=O.height,B=O.x,F=O.y;W.attr("transform",`translate(${-A/2-B},${f?h.height/2+S/2-L/2-F:-h.height/2-S/2-L/2-F})`),W.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-$/2:$/2-h.height})`),I.attr("transform",`translate(0,${f?h.height/2+S/2:-h.height/2-S/2})`),X(t,E),t.intersect=function(W){if(D.info("iconSquare intersect",t,W),!t.label)return q.rect(t,W);const O=t.x??0,A=t.y??0,L=t.height??0;let B=[];return f?B=[{x:O-h.width/2,y:A-L/2},{x:O+h.width/2,y:A-L/2},{x:O+h.width/2,y:A-L/2+h.height+S},{x:O+g/2,y:A-L/2+h.height+S},{x:O+g/2,y:A+L/2},{x:O-g/2,y:A+L/2},{x:O-g/2,y:A-L/2+h.height+S},{x:O-h.width/2,y:A-L/2+h.height+S}]:B=[{x:O-g/2,y:A-L/2},{x:O+g/2,y:A-L/2},{x:O+g/2,y:A-L/2+p},{x:O+h.width/2,y:A-L/2+p},{x:O+h.width/2/2,y:A+L/2},{x:O-h.width/2,y:A+L/2},{x:O-h.width/2,y:A-L/2+p},{x:O-g/2,y:A-L/2+p}],q.polygon(t,B,W)},l}d(Eh,"icon");async function Fh(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:l,bbox:h,label:u}=await et(e,t,"icon-shape default"),f=20,p=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Cr(t),b=Y.svg(l),S=U(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const v=x.get("fill");S.stroke=v??y;const w=l.append("g");t.icon&&w.html(`<g>${await Qr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const C=w.node().getBBox(),_=C.width,$=C.height,P=C.x,I=C.y,E=Math.max(_,$)*Math.SQRT2+f*2,W=b.circle(0,0,E,S),O=Math.max(E,h.width),A=E+h.height+p,L=b.rectangle(-O/2,-A/2,O,A,{...S,fill:"transparent",stroke:"none"}),B=l.insert(()=>W,":first-child"),F=l.insert(()=>L);return w.attr("transform",`translate(${-_/2-P},${g?h.height/2+p/2-$/2-I:-h.height/2-p/2-$/2-I})`),w.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-A/2:A/2-h.height})`),B.attr("transform",`translate(0,${g?h.height/2+p/2:-h.height/2-p/2})`),X(t,F),t.intersect=function(M){return D.info("iconSquare intersect",t,M),q.rect(t,M)},l}d(Fh,"iconCircle");async function Dh(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:l,bbox:h,halfPadding:u,label:f}=await et(e,t,"icon-shape default"),p=t.pos==="t",g=n+u*2,m=n+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Cr(t),S=-m/2,v=-g/2,w=t.label?8:0,C=Y.svg(l),_=U(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const $=b.get("fill");_.stroke=$??x;const P=C.path(Ae(S,v,m,g,5),_),I=Math.max(m,h.width),E=g+h.height+w,W=C.rectangle(-I/2,-E/2,I,E,{..._,fill:"transparent",stroke:"none"}),O=l.insert(()=>P,":first-child").attr("class","icon-shape2"),A=l.insert(()=>W);if(t.icon){const L=l.append("g");L.html(`<g>${await Qr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=L.node().getBBox(),F=B.width,M=B.height,z=B.x,V=B.y;L.attr("transform",`translate(${-F/2-z},${p?h.height/2+w/2-M/2-V:-h.height/2-w/2-M/2-V})`),L.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-E/2:E/2-h.height})`),O.attr("transform",`translate(0,${p?h.height/2+w/2:-h.height/2-w/2})`),X(t,A),t.intersect=function(L){if(D.info("iconSquare intersect",t,L),!t.label)return q.rect(t,L);const B=t.x??0,F=t.y??0,M=t.height??0;let z=[];return p?z=[{x:B-h.width/2,y:F-M/2},{x:B+h.width/2,y:F-M/2},{x:B+h.width/2,y:F-M/2+h.height+w},{x:B+m/2,y:F-M/2+h.height+w},{x:B+m/2,y:F+M/2},{x:B-m/2,y:F+M/2},{x:B-m/2,y:F-M/2+h.height+w},{x:B-h.width/2,y:F-M/2+h.height+w}]:z=[{x:B-m/2,y:F-M/2},{x:B+m/2,y:F-M/2},{x:B+m/2,y:F-M/2+g},{x:B+h.width/2,y:F-M/2+g},{x:B+h.width/2/2,y:F+M/2},{x:B-h.width/2,y:F+M/2},{x:B-h.width/2,y:F-M/2+g},{x:B-m/2,y:F-M/2+g}],q.polygon(t,z,L)},l}d(Dh,"iconRounded");async function $h(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:l,bbox:h,halfPadding:u,label:f}=await et(e,t,"icon-shape default"),p=t.pos==="t",g=n+u*2,m=n+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Cr(t),S=-m/2,v=-g/2,w=t.label?8:0,C=Y.svg(l),_=U(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const $=b.get("fill");_.stroke=$??x;const P=C.path(Ae(S,v,m,g,.1),_),I=Math.max(m,h.width),E=g+h.height+w,W=C.rectangle(-I/2,-E/2,I,E,{..._,fill:"transparent",stroke:"none"}),O=l.insert(()=>P,":first-child"),A=l.insert(()=>W);if(t.icon){const L=l.append("g");L.html(`<g>${await Qr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=L.node().getBBox(),F=B.width,M=B.height,z=B.x,V=B.y;L.attr("transform",`translate(${-F/2-z},${p?h.height/2+w/2-M/2-V:-h.height/2-w/2-M/2-V})`),L.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-E/2:E/2-h.height})`),O.attr("transform",`translate(0,${p?h.height/2+w/2:-h.height/2-w/2})`),X(t,A),t.intersect=function(L){if(D.info("iconSquare intersect",t,L),!t.label)return q.rect(t,L);const B=t.x??0,F=t.y??0,M=t.height??0;let z=[];return p?z=[{x:B-h.width/2,y:F-M/2},{x:B+h.width/2,y:F-M/2},{x:B+h.width/2,y:F-M/2+h.height+w},{x:B+m/2,y:F-M/2+h.height+w},{x:B+m/2,y:F+M/2},{x:B-m/2,y:F+M/2},{x:B-m/2,y:F-M/2+h.height+w},{x:B-h.width/2,y:F-M/2+h.height+w}]:z=[{x:B-m/2,y:F-M/2},{x:B+m/2,y:F-M/2},{x:B+m/2,y:F-M/2+g},{x:B+h.width/2,y:F-M/2+g},{x:B+h.width/2/2,y:F+M/2},{x:B-h.width/2,y:F+M/2},{x:B-h.width/2,y:F-M/2+g},{x:B-m/2,y:F-M/2+g}],q.polygon(t,z,L)},l}d($h,"iconSquare");async function Oh(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","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/s;const{labelStyles:o}=G(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const c=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:c,h=t.constraint==="on"?l/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??s;t.width=Math.max(l,n??0);const{shapeSvg:u,bbox:f,label:p}=await et(e,t,"image-shape default"),g=t.pos==="t",m=-l/2,y=-h/2,x=t.label?8:0,b=Y.svg(u),S=U(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const v=b.rectangle(m,y,l,h,S),w=Math.max(l,f.width),C=h+f.height+x,_=b.rectangle(-w/2,-C/2,w,C,{...S,fill:"none",stroke:"none"}),$=u.insert(()=>v,":first-child"),P=u.insert(()=>_);if(t.img){const I=u.append("image");I.attr("href",t.img),I.attr("width",l),I.attr("height",h),I.attr("preserveAspectRatio","none"),I.attr("transform",`translate(${-l/2},${g?C/2-h:-C/2})`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),$.attr("transform",`translate(0,${g?f.height/2+x/2:-f.height/2-x/2})`),X(t,P),t.intersect=function(I){if(D.info("iconSquare intersect",t,I),!t.label)return q.rect(t,I);const E=t.x??0,W=t.y??0,O=t.height??0;let A=[];return g?A=[{x:E-f.width/2,y:W-O/2},{x:E+f.width/2,y:W-O/2},{x:E+f.width/2,y:W-O/2+f.height+x},{x:E+l/2,y:W-O/2+f.height+x},{x:E+l/2,y:W+O/2},{x:E-l/2,y:W+O/2},{x:E-l/2,y:W-O/2+f.height+x},{x:E-f.width/2,y:W-O/2+f.height+x}]:A=[{x:E-l/2,y:W-O/2},{x:E+l/2,y:W-O/2},{x:E+l/2,y:W-O/2+h},{x:E+f.width/2,y:W-O/2+h},{x:E+f.width/2/2,y:W+O/2},{x:E-f.width/2,y:W+O/2},{x:E-f.width/2,y:W-O/2+h},{x:E-l/2,y:W-O/2+h}],q.polygon(t,A,I)},u}d(Oh,"imageSquare");async function Ih(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),n=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=[{x:0,y:0},{x:o,y:0},{x:o+3*n/6,y:-n},{x:-3*n/6,y:-n}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Y.svg(a),f=U(t,{}),p=lt(c),g=u.path(p,f);l=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${n/2})`),h&&l.attr("style",h)}else l=Ee(a,o,n,c);return i&&l.attr("style",i),t.width=o,t.height=n,X(t,l),t.intersect=function(u){return q.polygon(t,c,u)},a}d(Ih,"inv_trapezoid");async function ia(e,t,r){const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i;const{shapeSvg:s,bbox:o}=await et(e,t,tt(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),c=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),l=-n/2,h=-c/2;let u,{rx:f,ry:p}=t;const{cssStyles:g}=t;if(r!=null&&r.rx&&r.ry&&(f=r.rx,p=r.ry),t.look==="handDrawn"){const m=Y.svg(s),y=U(t,{}),x=f||p?m.path(Ae(l,h,n,c,f||0),y):m.rectangle(l,h,n,c,y);u=s.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",Rt(g))}else u=s.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",a).attr("rx",Rt(f)).attr("ry",Rt(p)).attr("x",l).attr("y",h).attr("width",n).attr("height",c);return X(t,u),t.calcIntersect=function(m,y){return q.rect(m,y)},t.intersect=function(m){return q.rect(t,m)},s}d(ia,"drawRect");async function Rh(e,t){const{shapeSvg:r,bbox:i,label:a}=await et(e,t,"label"),s=r.insert("rect",":first-child");return s.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))})`),X(t,s),t.intersect=function(c){return q.rect(t,c)},r}d(Rh,"labelRect");async function Ph(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=Math.max(s.width+(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(s.height+(t.padding??0),(t==null?void 0:t.height)??0),c=[{x:0,y:0},{x:o+3*n/6,y:0},{x:o,y:-n},{x:-(3*n)/6,y:-n}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Y.svg(a),f=U(t,{}),p=lt(c),g=u.path(p,f);l=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${n/2})`),h&&l.attr("style",h)}else l=Ee(a,o,n,c);return i&&l.attr("style",i),t.width=o,t.height=n,X(t,l),t.intersect=function(u){return q.polygon(t,c,u)},a}d(Ph,"lean_left");async function Nh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=Math.max(s.width+(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(s.height+(t.padding??0),(t==null?void 0:t.height)??0),c=[{x:-3*n/6,y:0},{x:o,y:0},{x:o+3*n/6,y:-n},{x:0,y:-n}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Y.svg(a),f=U(t,{}),p=lt(c),g=u.path(p,f);l=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${n/2})`),h&&l.attr("style",h)}else l=Ee(a,o,n,c);return i&&l.attr("style",i),t.width=o,t.height=n,X(t,l),t.intersect=function(u){return q.polygon(t,c,u)},a}d(Nh,"lean_right");function Wh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),c=7,l=[{x:o,y:0},{x:0,y:n+c/2},{x:o-2*c,y:n+c/2},{x:0,y:2*n},{x:o,y:n-c/2},{x:2*c,y:n-c/2}],h=Y.svg(a),u=U(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=lt(l),p=h.path(f,u),g=a.insert(()=>p,":first-child");return s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-n})`),X(t,g),t.intersect=function(m){return D.info("lightningBolt intersect",t,m),q.polygon(t,l,m)},a}d(Wh,"lightningBolt");var Km=d((e,t,r,i,a,s,o)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+o}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Zm=d((e,t,r,i,a,s,o)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+o}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Qm=d((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function zh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0),t.width??0),c=n/2,l=c/(2.5+n/50),h=Math.max(s.height+l+(t.padding??0),t.height??0),u=h*.1;let f;const{cssStyles:p}=t;if(t.look==="handDrawn"){const g=Y.svg(a),m=Zm(0,0,n,h,c,l,u),y=Qm(0,l,n,h,c,l),x=U(t,{}),b=g.path(m,x),S=g.path(y,x);a.insert(()=>S,":first-child").attr("class","line"),f=a.insert(()=>b,":first-child"),f.attr("class","basic label-container"),p&&f.attr("style",p)}else{const g=Km(0,0,n,h,c,l,u);f=a.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Rt(p)).attr("style",i)}return f.attr("label-offset-y",l),f.attr("transform",`translate(${-n/2}, ${-(h/2+l)})`),X(t,f),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+l-(s.y-(s.top??0))})`),t.intersect=function(g){const m=q.rect(t,g),y=m.x-(t.x??0);if(c!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-l)){let x=l*l*(1-y*y/(c*c));x>0&&(x=Math.sqrt(x)),x=l-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},a}d(zh,"linedCylinder");async function qh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=c/4,h=c+l,{cssStyles:u}=t,f=Y.svg(a),p=U(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-n/2-n/2*.1,y:-h/2},{x:-n/2-n/2*.1,y:h/2},...Le(-n/2-n/2*.1,h/2,n/2+n/2*.1,h/2,l,.8),{x:n/2+n/2*.1,y:-h/2},{x:-n/2-n/2*.1,y:-h/2},{x:-n/2,y:-h/2},{x:-n/2,y:h/2*1.1},{x:-n/2,y:-h/2}],m=f.polygon(g.map(x=>[x.x,x.y]),p),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)+n/2*.1/2-(s.x-(s.left??0))},${-c/2+(t.padding??0)-l/2-(s.y-(s.top??0))})`),X(t,y),t.intersect=function(x){return q.polygon(t,g,x)},a}d(qh,"linedWaveEdgedRect");async function Hh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=5,h=-n/2,u=-c/2,{cssStyles:f}=t,p=Y.svg(a),g=U(t,{}),m=[{x:h-l,y:u+l},{x:h-l,y:u+c+l},{x:h+n-l,y:u+c+l},{x:h+n-l,y:u+c},{x:h+n,y:u+c},{x:h+n,y:u+c-l},{x:h+n+l,y:u+c-l},{x:h+n+l,y:u-l},{x:h+l,y:u-l},{x:h+l,y:u},{x:h,y:u},{x:h,y:u+l}],y=[{x:h,y:u+l},{x:h+n-l,y:u+l},{x:h+n-l,y:u+c},{x:h+n,y:u+c},{x:h+n,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=lt(m),b=p.path(x,g),S=lt(y),v=p.path(S,{...g,fill:"none"}),w=a.insert(()=>v,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(s.width/2)-l-(s.x-(s.left??0))}, ${-(s.height/2)+l-(s.y-(s.top??0))})`),X(t,w),t.intersect=function(C){return q.polygon(t,m,C)},a}d(Hh,"multiRect");async function jh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=c/4,h=c+l,u=-n/2,f=-h/2,p=5,{cssStyles:g}=t,m=Le(u-p,f+h+p,u+n-p,f+h+p,l,.8),y=m==null?void 0:m[m.length-1],x=[{x:u-p,y:f+p},{x:u-p,y:f+h+p},...m,{x:u+n-p,y:y.y-p},{x:u+n,y:y.y-p},{x:u+n,y:y.y-2*p},{x:u+n+p,y:y.y-2*p},{x:u+n+p,y:f-p},{x:u+p,y:f-p},{x:u+p,y:f},{x:u,y:f},{x:u,y:f+p}],b=[{x:u,y:f+p},{x:u+n-p,y:f+p},{x:u+n-p,y:y.y-p},{x:u+n,y:y.y-p},{x:u+n,y:f},{x:u,y:f}],S=Y.svg(a),v=U(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const w=lt(x),C=S.path(w,v),_=lt(b),$=S.path(_,v),P=a.insert(()=>C,":first-child");return P.insert(()=>$),P.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-(s.width/2)-p-(s.x-(s.left??0))}, ${-(s.height/2)+p-l/2-(s.y-(s.top??0))})`),X(t,P),t.intersect=function(I){return q.polygon(t,x,I)},a}d(jh,"multiWaveEdgedRectangle");async function Yh(e,t,{config:{themeVariables:r}}){var b;const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i,t.useHtmlLabels||((b=Ot().flowchart)==null?void 0:b.htmlLabels)!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:c}=await et(e,t,tt(t)),l=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-l/2,f=-h/2,{cssStyles:p}=t,g=Y.svg(o),m=U(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,f,l,h,m),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",p),a&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",a),c.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),X(t,x),t.intersect=function(S){return q.rect(t,S)},o}d(Yh,"note");var Jm=d((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 Uh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=s.width+t.padding,n=s.height+t.padding,c=o+n,l=.5,h=[{x:c/2,y:0},{x:c,y:-c/2},{x:c/2,y:-c},{x:0,y:-c/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const p=Y.svg(a),g=U(t,{}),m=Jm(0,0,c),y=p.path(m,g);u=a.insert(()=>y,":first-child").attr("transform",`translate(${-c/2+l}, ${c/2})`),f&&u.attr("style",f)}else u=Ee(a,c,c,h),u.attr("transform",`translate(${-c/2+l}, ${c/2})`);return i&&u.attr("style",i),X(t,u),t.calcIntersect=function(p,g){const m=p.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=q.polygon(p,y,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(p){return this.calcIntersect(t,p)},a}d(Uh,"question");async function Gh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(s.height+(t.padding??0),(t==null?void 0:t.height)??0),l=-n/2,h=-c/2,u=h/2,f=[{x:l+u,y:h},{x:l,y:0},{x:l+u,y:-h},{x:-l,y:-h},{x:-l,y:h}],{cssStyles:p}=t,g=Y.svg(a),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=lt(f),x=g.path(y,m),b=a.insert(()=>x,":first-child");return 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),b.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),X(t,b),t.intersect=function(S){return q.polygon(t,f,S)},a}d(Gh,"rect_left_inv_arrow");async function Vh(e,t){var $,P;const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;let a;t.cssClasses?a="node "+t.cssClasses:a="node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=s.insert("g"),n=s.insert("g").attr("class","label").attr("style",i),c=t.description,l=t.label,h=n.node().appendChild(await Ne(l,t.labelStyle,!0,!0));let u={width:0,height:0};if(Bt((P=($=dt())==null?void 0:$.flowchart)==null?void 0:P.htmlLabels)){const I=h.children[0],E=ht(h);u=I.getBoundingClientRect(),E.attr("width",u.width),E.attr("height",u.height)}D.info("Text 2",c);const f=c||[],p=h.getBBox(),g=n.node().appendChild(await Ne(f.join?f.join("<br/>"):f,t.labelStyle,!0,!0)),m=g.children[0],y=ht(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;ht(g).attr("transform","translate( "+(u.width>p.width?0:(p.width-u.width)/2)+", "+(p.height+x+5)+")"),ht(h).attr("transform","translate( "+(u.width<p.width?0:-(p.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),S=u.height+(t.padding||0),v=-u.width/2-x,w=-u.height/2-x;let C,_;if(t.look==="handDrawn"){const I=Y.svg(s),E=U(t,{}),W=I.path(Ae(v,w,b,S,t.rx||0),E),O=I.line(-u.width/2-x,-u.height/2-x+p.height+x,u.width/2+x,-u.height/2-x+p.height+x,E);_=s.insert(()=>(D.debug("Rough node insert CXC",W),O),":first-child"),C=s.insert(()=>(D.debug("Rough node insert CXC",W),W),":first-child")}else C=o.insert("rect",":first-child"),_=o.insert("line"),C.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),_.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+p.height+x).attr("y2",-u.height/2-x+p.height+x);return X(t,C),t.intersect=function(I){return q.rect(t,I)},s}d(Vh,"rectWithTitle");function Or(e,t,r,i,a,s,o){const c=(e+r)/2,l=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,p=u/a,g=f/s,m=Math.sqrt(p**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=c+y*s*Math.sin(h)*(o?-1:1),b=l-y*a*Math.cos(h)*(o?-1:1),S=Math.atan2((t-b)/s,(e-x)/a);let w=Math.atan2((i-b)/s,(r-x)/a)-S;o&&w<0&&(w+=2*Math.PI),!o&&w>0&&(w-=2*Math.PI);const C=[];for(let _=0;_<20;_++){const $=_/19,P=S+$*w,I=x+a*Math.cos(P),E=b+s*Math.sin(P);C.push({x:I,y:E})}return C}d(Or,"generateArcPoints");async function Xh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=(t==null?void 0:t.padding)??0,n=(t==null?void 0:t.padding)??0,c=(t!=null&&t.width?t==null?void 0:t.width:s.width)+o*2,l=(t!=null&&t.height?t==null?void 0:t.height:s.height)+n*2,h=t.radius||5,u=t.taper||5,{cssStyles:f}=t,p=Y.svg(a),g=U(t,{});t.stroke&&(g.stroke=t.stroke),t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-c/2+u,y:-l/2},{x:c/2-u,y:-l/2},...Or(c/2-u,-l/2,c/2,-l/2+u,h,h,!0),{x:c/2,y:-l/2+u},{x:c/2,y:l/2-u},...Or(c/2,l/2-u,c/2-u,l/2,h,h,!0),{x:c/2-u,y:l/2},{x:-c/2+u,y:l/2},...Or(-c/2+u,l/2,-c/2,l/2-u,h,h,!0),{x:-c/2,y:l/2-u},{x:-c/2,y:-l/2+u},...Or(-c/2,-l/2+u,-c/2+u,-l/2,h,h,!0)],y=lt(m),x=p.path(y,g),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),X(t,b),t.intersect=function(S){return q.polygon(t,m,S)},a}d(Xh,"roundedRect");async function Kh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=(t==null?void 0:t.padding)??0,c=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=-s.width/2-n,u=-s.height/2-n,{cssStyles:f}=t,p=Y.svg(a),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+c+8,y:u},{x:h+c+8,y:u+l},{x:h-8,y:u+l},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+l}],y=p.polygon(m.map(b=>[b.x,b.y]),g),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",Rt(f)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-c/2+4+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-(s.y-(s.top??0))})`),X(t,x),t.intersect=function(b){return q.rect(t,b)},a}d(Kh,"shadedProcess");async function Zh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=-n/2,h=-c/2,{cssStyles:u}=t,f=Y.svg(a),p=U(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:l,y:h},{x:l,y:h+c},{x:l+n,y:h+c},{x:l+n,y:h-c/2}],m=lt(g),y=f.path(m,p),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${c/4})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))}, ${-c/4+(t.padding??0)-(s.y-(s.top??0))})`),X(t,x),t.intersect=function(b){return q.polygon(t,g,b)},a}d(Zh,"slopedRect");async function Qh(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??((t==null?void 0:t.padding)||0)*2,labelPaddingY:((t==null?void 0:t.padding)||0)*1};return ia(e,t,r)}d(Qh,"squareRect");async function Jh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=s.height+t.padding,n=s.width+o/4+t.padding,c=o/2,{cssStyles:l}=t,h=Y.svg(a),u=U(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=[{x:-n/2+c,y:-o/2},{x:n/2-c,y:-o/2},...Ur(-n/2+c,0,c,50,90,270),{x:n/2-c,y:o/2},...Ur(n/2-c,0,c,50,270,450)],p=lt(f),g=h.path(p,u),m=a.insert(()=>g,":first-child");return m.attr("class","basic label-container outer-path"),l&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),X(t,m),t.intersect=function(y){return q.polygon(t,f,y)},a}d(Jh,"stadium");async function tu(e,t){return ia(e,t,{rx:5,ry:5})}d(tu,"state");function eu(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:o,stateBorder:n,nodeBorder:c}=r,l=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=Y.svg(l),u=U(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),p=n??c,g=h.circle(0,0,5,{...u,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),m=l.insert(()=>f,":first-child");return m.insert(()=>g),s&&m.selectAll("path").attr("style",s),a&&m.selectAll("path").attr("style",a),X(t,m),t.intersect=function(y){return q.circle(t,7,y)},l}d(eu,"stateEnd");function ru(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let s;if(t.look==="handDrawn"){const n=Y.svg(a).circle(0,0,14,vg(i));s=a.insert(()=>n),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else s=a.insert("circle",":first-child"),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return X(t,s),t.intersect=function(o){return q.circle(t,7,o)},a}d(ru,"stateStart");async function iu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=((t==null?void 0:t.padding)||0)/2,n=s.width+t.padding,c=s.height+t.padding,l=-s.width/2-o,h=-s.height/2-o,u=[{x:0,y:0},{x:n,y:0},{x:n,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-c},{x:-8,y:-c},{x:-8,y:0}];if(t.look==="handDrawn"){const f=Y.svg(a),p=U(t,{}),g=f.rectangle(l-8,h,n+16,c,p),m=f.line(l,h,l,h+c,p),y=f.line(l+n,h,l+n,h+c,p);a.insert(()=>m,":first-child"),a.insert(()=>y,":first-child");const x=a.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",Rt(b)),X(t,x)}else{const f=Ee(a,n,c,u);i&&f.attr("style",i),X(t,f)}return t.intersect=function(f){return q.polygon(t,u,f)},a}d(iu,"subroutine");async function au(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),n=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=-o/2,l=-n/2,h=.2*n,u=.2*n,{cssStyles:f}=t,p=Y.svg(a),g=U(t,{}),m=[{x:c-h/2,y:l},{x:c+o+h/2,y:l},{x:c+o+h/2,y:l+n},{x:c-h/2,y:l+n}],y=[{x:c+o-h/2,y:l+n},{x:c+o+h/2,y:l+n},{x:c+o+h/2,y:l+n-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=lt(m),b=p.path(x,g),S=lt(y),v=p.path(S,{...g,fillStyle:"solid"}),w=a.insert(()=>v,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),X(t,w),t.intersect=function(C){return q.polygon(t,m,C)},a}d(au,"taggedRect");async function su(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=c/4,h=.2*n,u=.2*c,f=c+l,{cssStyles:p}=t,g=Y.svg(a),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:f/2},...Le(-n/2-n/2*.1,f/2,n/2+n/2*.1,f/2,l,.8),{x:n/2+n/2*.1,y:-f/2},{x:-n/2-n/2*.1,y:-f/2}],x=-n/2+n/2*.1,b=-f/2-u*.4,S=[{x:x+n-h,y:(b+c)*1.4},{x:x+n,y:b+c-u},{x:x+n,y:(b+c)*.9},...Le(x+n,(b+c)*1.3,x+n-h,(b+c)*1.5,-c*.03,.5)],v=lt(y),w=g.path(v,m),C=lt(S),_=g.path(C,{...m,fillStyle:"solid"}),$=a.insert(()=>_,":first-child");return $.insert(()=>w,":first-child"),$.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),$.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))},${-c/2+(t.padding??0)-l/2-(s.y-(s.top??0))})`),X(t,$),t.intersect=function(P){return q.polygon(t,y,P)},a}d(su,"taggedWaveEdgedRectangle");async function nu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=Math.max(s.width+t.padding,(t==null?void 0:t.width)||0),n=Math.max(s.height+t.padding,(t==null?void 0:t.height)||0),c=-o/2,l=-n/2,h=a.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",c).attr("y",l).attr("width",o).attr("height",n),X(t,h),t.intersect=function(u){return q.rect(t,u)},a}d(nu,"text");var ty=d((e,t,r,i,a,s)=>`M${e},${t}
130
+ a${a},${s} 0,0,1 0,${-i}
131
+ l${r},0
132
+ a${a},${s} 0,0,1 0,${i}
133
+ M${r},${-i}
134
+ a${a},${s} 0,0,0 0,${i}
135
+ l${-r},0`,"createCylinderPathD"),ey=d((e,t,r,i,a,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${a},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),ry=d((e,t,r,i,a,s)=>[`M${e+r/2},${-i/2}`,`a${a},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function ou(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o,halfPadding:n}=await et(e,t,tt(t)),c=t.look==="neo"?n*2:n,l=s.height+c,h=l/2,u=h/(2.5+l/50),f=s.width+u+c,{cssStyles:p}=t;let g;if(t.look==="handDrawn"){const m=Y.svg(a),y=ey(0,0,f,l,u,h),x=ry(0,0,f,l,u,h),b=m.path(y,U(t,{})),S=m.path(x,U(t,{fill:"none"}));g=a.insert(()=>S,":first-child"),g=a.insert(()=>b,":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const m=ty(0,0,f,l,u,h);g=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Rt(p)).attr("style",i),g.attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-f/2}, ${l/2} )`),o.attr("transform",`translate(${-(s.width/2)-u-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),X(t,g),t.intersect=function(m){const y=q.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},a}d(ou,"tiltedCylinder");async function lu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=s.width+t.padding,n=s.height+t.padding,c=[{x:-3*n/6,y:0},{x:o+3*n/6,y:0},{x:o,y:-n},{x:0,y:-n}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Y.svg(a),f=U(t,{}),p=lt(c),g=u.path(p,f);l=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${n/2})`),h&&l.attr("style",h)}else l=Ee(a,o,n,c);return i&&l.attr("style",i),t.width=o,t.height=n,X(t,l),t.intersect=function(u){return q.polygon(t,c,u)},a}d(lu,"trapezoid");async function cu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=60,n=20,c=Math.max(o,s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(n,s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),{cssStyles:h}=t,u=Y.svg(a),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{x:-c/2*.8,y:-l/2},{x:c/2*.8,y:-l/2},{x:c/2,y:-l/2*.6},{x:c/2,y:l/2},{x:-c/2,y:l/2},{x:-c/2,y:-l/2*.6}],g=lt(p),m=u.path(g,f),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),X(t,y),t.intersect=function(x){return q.polygon(t,p,x)},a}d(cu,"trapezoidalPentagon");async function hu(e,t){var b;const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Bt((b=dt().flowchart)==null?void 0:b.htmlLabels),c=s.width+(t.padding??0),l=c+s.height,h=c+s.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-l}],{cssStyles:f}=t,p=Y.svg(a),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=lt(u),y=p.path(m,g),x=a.insert(()=>y,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return f&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=c,t.height=l,X(t,x),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${l/2-(s.height+(t.padding??0)/(n?2:1)-(s.y-(s.top??0)))})`),t.intersect=function(S){return D.info("Triangle intersect",t,u,S),q.polygon(t,u,S)},a}d(hu,"triangle");async function uu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=c/8,h=c+l,{cssStyles:u}=t,p=70-n,g=p>0?p/2:0,m=Y.svg(a),y=U(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-n/2-g,y:h/2},...Le(-n/2-g,h/2,n/2+g,h/2,l,.8),{x:n/2+g,y:-h/2},{x:-n/2-g,y:-h/2}],b=lt(x),S=m.path(b,y),v=a.insert(()=>S,":first-child");return v.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))},${-c/2+(t.padding??0)-l-(s.y-(s.top??0))})`),X(t,v),t.intersect=function(w){return q.polygon(t,x,w)},a}d(uu,"waveEdgedRectangle");async function du(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=100,n=50,c=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=c/l;let u=c,f=l;u>f*h?f=u/h:u=f*h,u=Math.max(u,o),f=Math.max(f,n);const p=Math.min(f*.2,f/4),g=f+p*2,{cssStyles:m}=t,y=Y.svg(a),x=U(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...Le(-u/2,g/2,u/2,g/2,p,1),{x:u/2,y:-g/2},...Le(u/2,-g/2,-u/2,-g/2,p,-1)],S=lt(b),v=y.path(S,x),w=a.insert(()=>v,":first-child");return w.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),X(t,w),t.intersect=function(C){return q.polygon(t,b,C)},a}d(du,"waveRectangle");async function fu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=5,h=-n/2,u=-c/2,{cssStyles:f}=t,p=Y.svg(a),g=U(t,{}),m=[{x:h-l,y:u-l},{x:h-l,y:u+c},{x:h+n,y:u+c},{x:h+n,y:u-l}],y=`M${h-l},${u-l} L${h+n},${u-l} L${h+n},${u+c} L${h-l},${u+c} L${h-l},${u-l}
136
+ M${h-l},${u} L${h+n},${u}
137
+ M${h},${u-l} L${h},${u+c}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=p.path(y,g),b=a.insert(()=>x,":first-child");return b.attr("transform",`translate(${l/2}, ${l/2})`),b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(s.width/2)+l/2-(s.x-(s.left??0))}, ${-(s.height/2)+l/2-(s.y-(s.top??0))})`),X(t,b),t.intersect=function(S){return q.polygon(t,m,S)},a}d(fu,"windowPane");async function Us(e,t){var ut,at,pt,nt;const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:st}=Ot(),{background:ct}=st,gt={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ct}`]};await Us(e,gt)}const i=Ot();t.useHtmlLabels=i.htmlLabels;let a=((ut=i.er)==null?void 0:ut.diagramPadding)??10,s=((at=i.er)==null?void 0:at.entityPadding)??6;const{cssStyles:o}=t,{labelStyles:n,nodeStyles:c}=G(t);if(r.attributes.length===0&&t.label){const st={rx:0,ry:0,labelPaddingX:a,labelPaddingY:a*1.5};Se(t.label,i)+st.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const ct=await ia(e,t,st);if(!Bt(i.htmlLabels)){const gt=ct.select("text"),yt=(pt=gt.node())==null?void 0:pt.getBBox();gt.attr("transform",`translate(${-yt.width/2}, 0)`)}return ct}i.htmlLabels||(a*=1.25,s*=1.25);let l=tt(t);l||(l="node default");const h=e.insert("g").attr("class",l).attr("id",t.domId||t.id),u=await tr(h,t.label??"",i,0,0,["name"],n);u.height+=s;let f=0;const p=[],g=[];let m=0,y=0,x=0,b=0,S=!0,v=!0;for(const st of r.attributes){const ct=await tr(h,st.type,i,0,f,["attribute-type"],n);m=Math.max(m,ct.width+a);const gt=await tr(h,st.name,i,0,f,["attribute-name"],n);y=Math.max(y,gt.width+a);const yt=await tr(h,st.keys.join(),i,0,f,["attribute-keys"],n);x=Math.max(x,yt.width+a);const mt=await tr(h,st.comment,i,0,f,["attribute-comment"],n);b=Math.max(b,mt.width+a);const St=Math.max(ct.height,gt.height,yt.height,mt.height)+s;g.push({yOffset:f,rowHeight:St}),f+=St}let w=4;x<=a&&(S=!1,x=0,w--),b<=a&&(v=!1,b=0,w--);const C=h.node().getBBox();if(u.width+a*2-(m+y+x+b)>0){const st=u.width+a*2-(m+y+x+b);m+=st/w,y+=st/w,x>0&&(x+=st/w),b>0&&(b+=st/w)}const _=m+y+x+b,$=Y.svg(h),P=U(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid");let I=0;g.length>0&&(I=g.reduce((st,ct)=>st+((ct==null?void 0:ct.rowHeight)??0),0));const E=Math.max(C.width+a*2,(t==null?void 0:t.width)||0,_),W=Math.max((I??0)+u.height,(t==null?void 0:t.height)||0),O=-E/2,A=-W/2;h.selectAll("g:not(:first-child)").each((st,ct,gt)=>{const yt=ht(gt[ct]),mt=yt.attr("transform");let St=0,ee=0;if(mt){const ke=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(mt);ke&&(St=parseFloat(ke[1]),ee=parseFloat(ke[2]),yt.attr("class").includes("attribute-name")?St+=m:yt.attr("class").includes("attribute-keys")?St+=m+y:yt.attr("class").includes("attribute-comment")&&(St+=m+y+x))}yt.attr("transform",`translate(${O+a/2+St}, ${ee+A+u.height+s/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(A+s/2)+")");const L=$.rectangle(O,A,E,W,P),B=h.insert(()=>L,":first-child").attr("style",o.join("")),{themeVariables:F}=Ot(),{rowEven:M,rowOdd:z,nodeBorder:V}=F;p.push(0);for(const[st,ct]of g.entries()){const yt=(st+1)%2===0&&ct.yOffset!==0,mt=$.rectangle(O,u.height+A+(ct==null?void 0:ct.yOffset),E,ct==null?void 0:ct.rowHeight,{...P,fill:yt?M:z,stroke:V});h.insert(()=>mt,"g.label").attr("style",o.join("")).attr("class",`row-rect-${yt?"even":"odd"}`)}let H=$.line(O,u.height+A,E+O,u.height+A,P);h.insert(()=>H).attr("class","divider"),H=$.line(m+O,u.height+A,m+O,W+A,P),h.insert(()=>H).attr("class","divider"),S&&(H=$.line(m+y+O,u.height+A,m+y+O,W+A,P),h.insert(()=>H).attr("class","divider")),v&&(H=$.line(m+y+x+O,u.height+A,m+y+x+O,W+A,P),h.insert(()=>H).attr("class","divider"));for(const st of p)H=$.line(O,u.height+A+st,E+O,u.height+A+st,P),h.insert(()=>H).attr("class","divider");if(X(t,B),c&&t.look!=="handDrawn"){const st=c.split(";"),ct=(nt=st==null?void 0:st.filter(gt=>gt.includes("stroke")))==null?void 0:nt.map(gt=>`${gt}`).join("; ");h.selectAll("path").attr("style",ct??""),h.selectAll(".row-rect-even path").attr("style",c)}return t.intersect=function(st){return q.rect(t,st)},h}d(Us,"erBox");async function tr(e,t,r,i=0,a=0,s=[],o=""){const n=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",o);t!==An(t)&&(t=An(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const c=n.node().appendChild(await Me(n,t,{width:Se(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=c.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let l=c.getBBox();if(Bt(r.htmlLabels)){const h=c.children[0];h.style.textAlign="start";const u=ht(c);l=h.getBoundingClientRect(),u.attr("width",l.width),u.attr("height",l.height)}return l}d(tr,"addText");async function pu(e,t,r,i,a=r.class.padding??12){const s=i?0:3,o=e.insert("g").attr("class",tt(t)).attr("id",t.domId||t.id);let n=null,c=null,l=null,h=null,u=0,f=0,p=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Ir(n,{text:`«${b}»`},0),u=n.node().getBBox().height}c=o.insert("g").attr("class","label-group text"),await Ir(c,t,0,["font-weight: bolder"]);const g=c.node().getBBox();f=g.height,l=o.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const S=await Ir(l,b,m,[b.parseClassifier()]);m+=S+s}p=l.node().getBBox().height,p<=0&&(p=a/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const S=await Ir(h,b,y,[b.parseClassifier()]);y+=S+s}let x=o.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return c.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),l.attr("transform",`translate(0, ${u+f+a*2})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(p?p+a*4:a*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}d(pu,"textHelper");async function Ir(e,t,r,i=[]){const a=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=Ot();let o="useHtmlLabels"in t?t.useHtmlLabels:Bt(s.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),pr(n)&&(o=!0);const c=await Me(a,Bs(Ye(n)),{width:Se(n,s)+50,classes:"markdown-node-label",useHtmlLabels:o},s);let l,h=1;if(o){const u=c.children[0],f=ht(c);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const p=u.getElementsByTagName("img");if(p){const g=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(y=>{function x(){var b;if(m.style.display="flex",m.style.flexDirection="column",g){const S=((b=s.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,w=parseInt(S,10)*5+"px";m.style.minWidth=w,m.style.maxWidth=w}else m.style.width="100%";y(m)}d(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}l=u.getBoundingClientRect(),f.attr("width",l.width),f.attr("height",l.height)}else{i.includes("font-weight: bolder")&&ht(c).selectAll("tspan").attr("font-weight",""),h=c.children.length;const u=c.children[0];(c.textContent===""||c.textContent.includes("&gt"))&&(u.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),l=c.getBBox()}return a.attr("transform","translate(0,"+(-l.height/(2*h)+r)+")"),l.height}d(Ir,"addText");async function gu(e,t){var P,I;const r=dt(),i=r.class.padding??12,a=i,s=t.useHtmlLabels??Bt(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:n,bbox:c}=await pu(e,t,r,s,a),{labelStyles:l,nodeStyles:h}=G(t);t.labelStyle=l,t.cssStyles=o.styles||"";const u=((P=o.styles)==null?void 0:P.join(";"))||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const f=o.members.length===0&&o.methods.length===0&&!((I=r.class)!=null&&I.hideEmptyMembersBox),p=Y.svg(n),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=c.width;let y=c.height;o.members.length===0&&o.methods.length===0?y+=a:o.members.length>0&&o.methods.length===0&&(y+=a*2);const x=-m/2,b=-y/2,S=p.rectangle(x-i,b-i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0),m+2*i,y+2*i+(f?i*2:o.members.length===0&&o.methods.length===0?-i:0),g),v=n.insert(()=>S,":first-child");v.attr("class","basic label-container");const w=v.node().getBBox();n.selectAll(".text").each((E,W,O)=>{var z;const A=ht(O[W]),L=A.attr("transform");let B=0;if(L){const H=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(L);H&&(B=parseFloat(H[2]))}let F=B+b+i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0);s||(F-=4);let M=x;(A.attr("class").includes("label-group")||A.attr("class").includes("annotation-group"))&&(M=-((z=A.node())==null?void 0:z.getBBox().width)/2||0,n.selectAll("text").each(function(V,H,ut){window.getComputedStyle(ut[H]).textAnchor==="middle"&&(M=0)})),A.attr("transform",`translate(${M}, ${F})`)});const C=n.select(".annotation-group").node().getBBox().height-(f?i/2:0)||0,_=n.select(".label-group").node().getBBox().height-(f?i/2:0)||0,$=n.select(".members-group").node().getBBox().height-(f?i/2:0)||0;if(o.members.length>0||o.methods.length>0||f){const E=p.line(w.x,C+_+b+i,w.x+w.width,C+_+b+i,g);n.insert(()=>E).attr("class","divider").attr("style",u)}if(f||o.members.length>0||o.methods.length>0){const E=p.line(w.x,C+_+$+b+a*2+i,w.x+w.width,C+_+$+b+i+a*2,g);n.insert(()=>E).attr("class","divider").attr("style",u)}if(o.look!=="handDrawn"&&n.selectAll("path").attr("style",u),v.select(":nth-child(2)").attr("style",u),n.selectAll(".divider").select("path").attr("style",u),t.labelStyle?n.selectAll("span").attr("style",t.labelStyle):n.selectAll("span").attr("style",u),!s){const E=RegExp(/color\s*:\s*([^;]*)/),W=E.exec(u);if(W){const O=W[0].replace("color","fill");n.selectAll("tspan").attr("style",O)}else if(l){const O=E.exec(l);if(O){const A=O[0].replace("color","fill");n.selectAll("tspan").attr("style",A)}}}return X(t,v),t.intersect=function(E){return q.rect(t,E)},n}d(gu,"classBox");async function mu(e,t){var C,_;const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t,s=t,o=20,n=20,c="verifyMethod"in t,l=tt(t),h=e.insert("g").attr("class",l).attr("id",t.domId??t.id);let u;c?u=await le(h,`&lt;&lt;${a.type}&gt;&gt;`,0,t.labelStyle):u=await le(h,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let f=u;const p=await le(h,a.name,f,t.labelStyle+"; font-weight: bold;");if(f+=p+n,c){const $=await le(h,`${a.requirementId?`ID: ${a.requirementId}`:""}`,f,t.labelStyle);f+=$;const P=await le(h,`${a.text?`Text: ${a.text}`:""}`,f,t.labelStyle);f+=P;const I=await le(h,`${a.risk?`Risk: ${a.risk}`:""}`,f,t.labelStyle);f+=I,await le(h,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,f,t.labelStyle)}else{const $=await le(h,`${s.type?`Type: ${s.type}`:""}`,f,t.labelStyle);f+=$,await le(h,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,f,t.labelStyle)}const g=(((C=h.node())==null?void 0:C.getBBox().width)??200)+o,m=(((_=h.node())==null?void 0:_.getBBox().height)??200)+o,y=-g/2,x=-m/2,b=Y.svg(h),S=U(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const v=b.rectangle(y,x,g,m,S),w=h.insert(()=>v,":first-child");if(w.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each(($,P,I)=>{const E=ht(I[P]),W=E.attr("transform");let O=0,A=0;if(W){const M=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(W);M&&(O=parseFloat(M[1]),A=parseFloat(M[2]))}const L=A-m/2;let B=y+o/2;(P===0||P===1)&&(B=O),E.attr("transform",`translate(${B}, ${L+o})`)}),f>u+p+n){const $=b.line(y,x+u+p+n,y+g,x+u+p+n,S);h.insert(()=>$).attr("style",i)}return X(t,w),t.intersect=function($){return q.rect(t,$)},h}d(mu,"requirementBox");async function le(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),s=dt(),o=s.htmlLabels??!0,n=await Me(a,Bs(Ye(t)),{width:Se(t,s)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},s);let c;if(o){const l=n.children[0],h=ht(n);c=l.getBoundingClientRect(),h.attr("width",c.width),h.attr("height",c.height)}else{const l=n.children[0];for(const h of l.children)h.textContent=h.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),i&&h.setAttribute("style",i);c=n.getBBox(),c.height+=6}return a.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}d(le,"addText");var iy=d(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 yu(e,t,{config:r}){var W,O;const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i||"";const s=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:c,label:l}=await et(e,t,tt(t)),h=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&((W=r==null?void 0:r.kanban)!=null&&W.ticketBaseUrl)&&(u=(O=r==null?void 0:r.kanban)==null?void 0:O.ticketBaseUrl.replace("#TICKET#",t.ticket),f=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).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,m;f?{label:g,bbox:m}=await Aa(f,"ticket"in t&&t.ticket||"",p):{label:g,bbox:m}=await Aa(n,"ticket"in t&&t.ticket||"",p);const{label:y,bbox:x}=await Aa(n,"assigned"in t&&t.assigned||"",p);t.width=o;const b=10,S=(t==null?void 0:t.width)||0,v=Math.max(m.height,x.height)/2,w=Math.max(c.height+b*2,(t==null?void 0:t.height)||0)+v,C=-S/2,_=-w/2;l.attr("transform","translate("+(h-S/2)+", "+(-v-c.height/2)+")"),g.attr("transform","translate("+(h-S/2)+", "+(-v+c.height/2)+")"),y.attr("transform","translate("+(h+S/2-x.width-2*s)+", "+(-v+c.height/2)+")");let $;const{rx:P,ry:I}=t,{cssStyles:E}=t;if(t.look==="handDrawn"){const A=Y.svg(n),L=U(t,{}),B=P||I?A.path(Ae(C,_,S,w,P||0),L):A.rectangle(C,_,S,w,L);$=n.insert(()=>B,":first-child"),$.attr("class","basic label-container").attr("style",E||null)}else{$=n.insert("rect",":first-child"),$.attr("class","basic label-container __APA__").attr("style",a).attr("rx",P??5).attr("ry",I??5).attr("x",C).attr("y",_).attr("width",S).attr("height",w);const A="priority"in t&&t.priority;if(A){const L=n.append("line"),B=C+2,F=_+Math.floor((P??0)/2),M=_+w-Math.floor((P??0)/2);L.attr("x1",B).attr("y1",F).attr("x2",B).attr("y2",M).attr("stroke-width","4").attr("stroke",iy(A))}}return X(t,$),t.height=w,t.intersect=function(A){return q.rect(t,A)},n}d(yu,"kanbanItem");async function xu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await et(e,t,tt(t)),c=s.width+10*o,l=s.height+8*o,h=.15*c,{cssStyles:u}=t,f=s.width+20,p=s.height+20,g=Math.max(c,f),m=Math.max(l,p);n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let y;const x=`M0 0
138
+ a${h},${h} 1 0,0 ${g*.25},${-1*m*.1}
139
+ a${h},${h} 1 0,0 ${g*.25},0
140
+ a${h},${h} 1 0,0 ${g*.25},0
141
+ a${h},${h} 1 0,0 ${g*.25},${m*.1}
142
+
143
+ a${h},${h} 1 0,0 ${g*.15},${m*.33}
144
+ a${h*.8},${h*.8} 1 0,0 0,${m*.34}
145
+ a${h},${h} 1 0,0 ${-1*g*.15},${m*.33}
146
+
147
+ a${h},${h} 1 0,0 ${-1*g*.25},${m*.15}
148
+ a${h},${h} 1 0,0 ${-1*g*.25},0
149
+ a${h},${h} 1 0,0 ${-1*g*.25},0
150
+ a${h},${h} 1 0,0 ${-1*g*.25},${-1*m*.15}
151
+
152
+ a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33}
153
+ a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
154
+ a${h},${h} 1 0,0 ${g*.1},${-1*m*.33}
155
+ H0 V0 Z`;if(t.look==="handDrawn"){const b=Y.svg(a),S=U(t,{}),v=b.path(x,S);y=a.insert(()=>v,":first-child"),y.attr("class","basic label-container").attr("style",Rt(u))}else y=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),X(t,y),t.calcIntersect=function(b,S){return q.rect(b,S)},t.intersect=function(b){return D.info("Bang intersect",t,b),q.rect(t,b)},a}d(xu,"bang");async function bu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await et(e,t,tt(t)),c=s.width+2*o,l=s.height+2*o,h=.15*c,u=.25*c,f=.35*c,p=.2*c,{cssStyles:g}=t;let m;const y=`M0 0
156
+ a${h},${h} 0 0,1 ${c*.25},${-1*c*.1}
157
+ a${f},${f} 1 0,1 ${c*.4},${-1*c*.1}
158
+ a${u},${u} 1 0,1 ${c*.35},${c*.2}
159
+
160
+ a${h},${h} 1 0,1 ${c*.15},${l*.35}
161
+ a${p},${p} 1 0,1 ${-1*c*.15},${l*.65}
162
+
163
+ a${u},${h} 1 0,1 ${-1*c*.25},${c*.15}
164
+ a${f},${f} 1 0,1 ${-1*c*.5},0
165
+ a${h},${h} 1 0,1 ${-1*c*.25},${-1*c*.15}
166
+
167
+ a${h},${h} 1 0,1 ${-1*c*.1},${-1*l*.35}
168
+ a${p},${p} 1 0,1 ${c*.1},${-1*l*.65}
169
+ H0 V0 Z`;if(t.look==="handDrawn"){const x=Y.svg(a),b=U(t,{}),S=x.path(y,b);m=a.insert(()=>S,":first-child"),m.attr("class","basic label-container").attr("style",Rt(g))}else m=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),m.attr("transform",`translate(${-c/2}, ${-l/2})`),X(t,m),t.calcIntersect=function(x,b){return q.rect(x,b)},t.intersect=function(x){return D.info("Cloud intersect",t,x),q.rect(t,x)},a}d(bu,"cloud");async function Cu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await et(e,t,tt(t)),c=s.width+8*o,l=s.height+2*o,h=5,u=`
170
+ M${-c/2} ${l/2-h}
171
+ v${-l+2*h}
172
+ q0,-${h} ${h},-${h}
173
+ h${c-2*h}
174
+ q${h},0 ${h},${h}
175
+ v${l-2*h}
176
+ q0,${h} -${h},${h}
177
+ h${-c+2*h}
178
+ q-${h},0 -${h},-${h}
179
+ Z
180
+ `,f=a.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return a.append("line").attr("class","node-line-").attr("x1",-c/2).attr("y1",l/2).attr("x2",c/2).attr("y2",l/2),n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),a.append(()=>n.node()),X(t,f),t.calcIntersect=function(p,g){return q.rect(p,g)},t.intersect=function(p){return q.rect(t,p)},a}d(Cu,"defaultMindmapNode");async function Su(e,t){const r={padding:t.padding??0};return Ys(e,t,r)}d(Su,"mindmapCircle");var ay=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Qh},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Xh},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Jh},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:iu},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:kh},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Ys},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:xu},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:bu},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Uh},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Mh},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Nh},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Ph},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:lu},{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:Ih},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:vh},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:nu},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:ph},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Kh},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:ru},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:eu},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Bh},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Ah},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:xh},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:bh},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Ch},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Wh},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:uu},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Lh},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ou},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:zh},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Sh},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:wh},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:hu},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:fu},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:_h},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:cu},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Th},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Zh},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:jh},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Hh},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:fh},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:yh},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:su},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:au},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:du},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Gh},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:qh}],sy=d(()=>{const t=[...Object.entries({state:tu,choice:gh,note:Yh,rectWithTitle:Vh,labelRect:Rh,iconSquare:$h,iconCircle:Fh,icon:Eh,iconRounded:Dh,imageSquare:Oh,anchor:dh,kanbanItem:yu,mindmapCircle:Su,defaultMindmapNode:Cu,classBox:gu,erBox:Us,requirementBox:mu}),...ay.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),ku=sy();function ny(e){return e in ku}d(ny,"isValidShape");var aa=new Map;async function wu(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?ku[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),a=await s(i,t,r)}else a=await s(e,t,r),i=a;return t.tooltip&&a.attr("title",t.tooltip),aa.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}d(wu,"insertNode");var zb=d((e,t)=>{aa.set(t.id,e)},"setNodeElem"),qb=d(()=>{aa.clear()},"clear"),Hb=d(e=>{const t=aa.get(e.id);D.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),oy=d((e,t,r,i,a,s)=>{t.arrowTypeStart&&Zn(e,"start",t.arrowTypeStart,r,i,a,s),t.arrowTypeEnd&&Zn(e,"end",t.arrowTypeEnd,r,i,a,s)},"addEdgeMarkers"),ly={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}},Zn=d((e,t,r,i,a,s,o)=>{var u;const n=ly[r];if(!n){D.warn(`Unknown arrow type: ${r}`);return}const c=n.type,h=`${a}_${s}-${c}${t==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const f=o.replace(/[^\dA-Za-z]/g,"_"),p=`${h}_${f}`;if(!document.getElementById(p)){const g=document.getElementById(h);if(g){const m=g.cloneNode(!0);m.id=p,m.querySelectorAll("path, circle, line").forEach(x=>{x.setAttribute("stroke",o),n.fill&&x.setAttribute("fill",o)}),(u=g.parentNode)==null||u.appendChild(m)}}e.attr(`marker-${t}`,`url(${i}#${p})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),Yi=new Map,Et=new Map,jb=d(()=>{Yi.clear(),Et.clear()},"clear"),di=d(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),cy=d(async(e,t)=>{let r=Bt(dt().flowchart.htmlLabels);const{labelStyles:i}=G(t);t.labelStyle=i;const a=await Me(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});D.info("abc82",t,t.labelType);const s=e.insert("g").attr("class","edgeLabel"),o=s.insert("g").attr("class","label").attr("data-id",t.id);o.node().appendChild(a);let n=a.getBBox();if(r){const l=a.children[0],h=ht(a);n=l.getBoundingClientRect(),h.attr("width",n.width),h.attr("height",n.height)}o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),Yi.set(t.id,s),t.width=n.width,t.height=n.height;let c;if(t.startLabelLeft){const l=await Ne(t.startLabelLeft,di(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");c=u.node().appendChild(l);const f=l.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).startLeft=h,Rr(c,t.startLabelLeft)}if(t.startLabelRight){const l=await Ne(t.startLabelRight,di(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");c=h.node().appendChild(l),u.node().appendChild(l);const f=l.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).startRight=h,Rr(c,t.startLabelRight)}if(t.endLabelLeft){const l=await Ne(t.endLabelLeft,di(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");c=u.node().appendChild(l);const f=l.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(l),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).endLeft=h,Rr(c,t.endLabelLeft)}if(t.endLabelRight){const l=await Ne(t.endLabelRight,di(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");c=u.node().appendChild(l);const f=l.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(l),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).endRight=h,Rr(c,t.endLabelRight)}return a},"insertEdgeLabel");function Rr(e,t){dt().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}d(Rr,"setTerminalWidth");var hy=d((e,t)=>{D.debug("Moving label abc88 ",e.id,e.label,Yi.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=dt(),{subGraphTitleTotalMargin:a}=Os(i);if(e.label){const s=Yi.get(e.id);let o=e.x,n=e.y;if(r){const c=ie.calcLabelPosition(r);D.debug("Moving label "+e.label+" from (",o,",",n,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(o=c.x,n=c.y)}s.attr("transform",`translate(${o}, ${n+a/2})`)}if(e.startLabelLeft){const s=Et.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const c=ie.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=c.x,n=c.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const s=Et.get(e.id).startRight;let o=e.x,n=e.y;if(r){const c=ie.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=c.x,n=c.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const s=Et.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const c=ie.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=c.x,n=c.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const s=Et.get(e.id).endRight;let o=e.x,n=e.y;if(r){const c=ie.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=c.x,n=c.y}s.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),uy=d((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),s=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return a>=o||s>=n},"outsideNode"),dy=d((e,t,r)=>{D.debug(`intersection calc abc89:
181
+ outsidePoint: ${JSON.stringify(t)}
182
+ insidePoint : ${JSON.stringify(r)}
183
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,a=e.y,s=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-s:o+s;const c=e.height/2,l=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(a-t.y)*o>Math.abs(i-t.x)*c){let u=r.y<t.y?t.y-c-a:a-c-t.y;n=h*u/l;const f={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+l-u:r.y-l+u};return n===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),l===0&&(f.y=t.y),D.debug(`abc89 top/bottom calc, Q ${l}, q ${u}, R ${h}, r ${n}`,f),f}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let u=l*n/h,f=r.x<t.x?r.x+h-n:r.x-h+n,p=r.y<t.y?r.y+u:r.y-u;return D.debug(`sides calc abc89, Q ${l}, q ${u}, R ${h}, r ${n}`,{_x:f,_y:p}),n===0&&(f=t.x,p=t.y),h===0&&(f=t.x),l===0&&(p=t.y),{x:f,y:p}}},"intersection"),Qn=d((e,t)=>{D.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(s=>{if(D.info("abc88 checking point",s,t),!uy(t,s)&&!a){const o=dy(t,i,s);D.debug("abc88 inside",s,i,o),D.debug("abc88 intersection",o,t);let n=!1;r.forEach(c=>{n=n||c.x===o.x&&c.y===o.y}),r.some(c=>c.x===o.x&&c.y===o.y)?D.warn("abc88 no intersect",o,r):r.push(o),a=!0}else D.warn("abc88 outside",s,i),i=s,a||r.push(s)}),D.debug("returning points",r),r},"cutPathAtIntersect");function vu(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],s=e[i],o=e[i+1];(a.x===s.x&&s.y===o.y&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-a.y)>5||a.y===s.y&&s.x===o.x&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-o.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}d(vu,"extractCornerPoints");var Jn=d(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,s=Math.sqrt(i*i+a*a),o=r/s;return{x:t.x-o*i,y:t.y-o*a}},"findAdjacentPoint"),fy=d(function(e){const{cornerPointPositions:t}=vu(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],s=e[i+1],o=e[i],n=Jn(a,o,5),c=Jn(s,o,5),l=c.x-n.x,h=c.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let f={x:o.x,y:o.y};if(Math.abs(s.x-a.x)>10&&Math.abs(s.y-a.y)>=10){D.debug("Corner point fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));const p=5;o.x===n.x?f={x:l<0?n.x-p+u:n.x+p-u,y:h<0?n.y-u:n.y+u}:f={x:l<0?n.x-u:n.x+u,y:h<0?n.y-p+u:n.y+p-u}}else D.debug("Corner point skipping fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));r.push(f,c)}else r.push(e[i]);return r},"fixCorners"),py=d((e,t,r)=>{const i=e-t-r,a=2,s=2,o=a+s,n=Math.floor(i/o),c=Array(n).fill(`${a} ${s}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),gy=d(function(e,t,r,i,a,s,o,n=!1){var A;const{handDrawnSeed:c}=dt();let l=t.points,h=!1;const u=a;var f=s;const p=[];for(const L in t.cssCompiledStyles)Tc(L)||p.push(t.cssCompiledStyles[L]);D.debug("UIO intersect check",t.points,f.x,u.x),f.intersect&&u.intersect&&!n&&(l=l.slice(1,t.points.length-1),l.unshift(u.intersect(l[0])),D.debug("Last point UIO",t.start,"-->",t.end,l[l.length-1],f,f.intersect(l[l.length-1])),l.push(f.intersect(l[l.length-1])));const g=btoa(JSON.stringify(l));t.toCluster&&(D.info("to cluster abc88",r.get(t.toCluster)),l=Qn(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(D.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(l,null,2)),l=Qn(l.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=l.filter(L=>!Number.isNaN(L.y));m=fy(m);let y=pi;switch(y=Da,t.curve){case"linear":y=Da;break;case"basis":y=pi;break;case"cardinal":y=xo;break;case"bumpX":y=go;break;case"bumpY":y=po;break;case"catmullRom":y=Co;break;case"monotoneX":y=fo;break;case"monotoneY":y=uo;break;case"natural":y=ho;break;case"step":y=co;break;case"stepAfter":y=lo;break;case"stepBefore":y=oo;break;default:y=pi}const{x,y:b}=wg(t),S=$d().x(x).y(b).curve(y);let v;switch(t.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-invisible";break;default:v="edge-thickness-normal"}switch(t.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break;default:v+=" edge-pattern-solid"}let w,C=t.curve==="rounded"?_u(Tu(m,t),5):S(m);const _=Array.isArray(t.style)?t.style:[t.style];let $=_.find(L=>L==null?void 0:L.startsWith("stroke:")),P=!1;if(t.look==="handDrawn"){const L=Y.svg(e);Object.assign([],m);const B=L.path(C,{roughness:.3,seed:c});v+=" transition",w=ht(B).select("path").attr("id",t.id).attr("class"," "+v+(t.classes?" "+t.classes:"")).attr("style",_?_.reduce((M,z)=>M+";"+z,""):"");let F=w.attr("d");w.attr("d",F),e.node().appendChild(w.node())}else{const L=p.join(";"),B=_?_.reduce((at,pt)=>at+pt+";",""):"";let F="";t.animate&&(F=" edge-animation-fast"),t.animation&&(F=" edge-animation-"+t.animation);const M=(L?L+";"+B+";":B)+";"+(_?_.reduce((at,pt)=>at+";"+pt,""):"");w=e.append("path").attr("d",C).attr("id",t.id).attr("class"," "+v+(t.classes?" "+t.classes:"")+(F??"")).attr("style",M),$=(A=M.match(/stroke:([^;]+)/))==null?void 0:A[1],P=t.animate===!0||!!t.animation||L.includes("animation");const z=w.node(),V=typeof z.getTotalLength=="function"?z.getTotalLength():0,H=On[t.arrowTypeStart]||0,ut=On[t.arrowTypeEnd]||0;if(t.look==="neo"&&!P){const pt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?py(V,H,ut):`0 ${H} ${V-H-ut} ${ut}`}; stroke-dashoffset: 0;`;w.attr("style",pt+w.attr("style"))}}w.attr("data-edge",!0),w.attr("data-et","edge"),w.attr("data-id",t.id),w.attr("data-points",g),t.showPoints&&m.forEach(L=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",L.x).attr("cy",L.y)});let I="";(dt().flowchart.arrowMarkerAbsolute||dt().state.arrowMarkerAbsolute)&&(I=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,I=I.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),D.info("arrowTypeStart",t.arrowTypeStart),D.info("arrowTypeEnd",t.arrowTypeEnd),oy(w,t,I,o,i,$);const E=Math.floor(l.length/2),W=l[E];ie.isLabelCoordinateInPath(W,w.attr("d"))||(h=!0);let O={};return h&&(O.updatedPath=l),O.originalPath=t.points,O},"insertEdge");function _u(e,t){if(e.length<2)return"";let r="";const i=e.length,a=1e-5;for(let s=0;s<i;s++){const o=e[s],n=e[s-1],c=e[s+1];if(s===0)r+=`M${o.x},${o.y}`;else if(s===i-1)r+=`L${o.x},${o.y}`;else{const l=o.x-n.x,h=o.y-n.y,u=c.x-o.x,f=c.y-o.y,p=Math.hypot(l,h),g=Math.hypot(u,f);if(p<a||g<a){r+=`L${o.x},${o.y}`;continue}const m=l/p,y=h/p,x=u/g,b=f/g,S=m*x+y*b,v=Math.max(-1,Math.min(1,S)),w=Math.acos(v);if(w<a||Math.abs(Math.PI-w)<a){r+=`L${o.x},${o.y}`;continue}const C=Math.min(t/Math.sin(w/2),p/2,g/2),_=o.x-m*C,$=o.y-y*C,P=o.x+x*C,I=o.y+b*C;r+=`L${_},${$}`,r+=`Q${o.x},${o.y} ${P},${I}`}}return r}d(_u,"generateRoundedPath");function hs(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}d(hs,"calculateDeltaAndAngle");function Tu(e,t){const r=e.map(a=>({...a}));if(e.length>=2&&$t[t.arrowTypeStart]){const a=$t[t.arrowTypeStart],s=e[0],o=e[1],{angle:n}=hs(s,o),c=a*Math.cos(n),l=a*Math.sin(n);r[0].x=s.x+c,r[0].y=s.y+l}const i=e.length;if(i>=2&&$t[t.arrowTypeEnd]){const a=$t[t.arrowTypeEnd],s=e[i-1],o=e[i-2],{angle:n}=hs(o,s),c=a*Math.cos(n),l=a*Math.sin(n);r[i-1].x=s.x-c,r[i-1].y=s.y-l}return r}d(Tu,"applyMarkerOffsetsToPoints");var my=d((e,t,r,i)=>{t.forEach(a=>{Fy[a](e,r,i)})},"insertMarkers"),yy=d((e,t,r)=>{D.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"),xy=d((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"),by=d((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"),Cy=d((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"),Sy=d((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"),ky=d((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"),wy=d((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"),vy=d((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"),_y=d((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"),Ty=d((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"),By=d((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"),Ly=d((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"),My=d((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"),Ay=d((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
184
+ L20,10
185
+ M20,10
186
+ L0,20`)},"requirement_arrow"),Ey=d((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"),Fy={extension:yy,composition:xy,aggregation:by,dependency:Cy,lollipop:Sy,point:ky,circle:wy,cross:vy,barb:_y,only_one:Ty,zero_or_one:By,one_or_more:Ly,zero_or_more:My,requirement_arrow:Ay,requirement_contains:Ey},Dy=my,$y={common:br,getConfig:Ot,insertCluster:qm,insertEdge:gy,insertEdgeLabel:cy,insertMarkers:Dy,insertNode:wu,interpolateToCurve:Is,labelHelper:et,log:D,positionEdgeLabel:hy},Gr={},Bu=d(e=>{for(const t of e)Gr[t.name]=t},"registerLayoutLoaders"),Oy=d(()=>{Bu([{name:"dagre",loader:d(async()=>await ft(()=>import("./dagre-6UL2VRFP-1iQhW5EH.js"),__vite__mapDeps([2,3,0,1,4,5,6,7])),"loader")},{name:"cose-bilkent",loader:d(async()=>await ft(()=>import("./cose-bilkent-S5V4N54A-Do_6LUNg.js"),__vite__mapDeps([8,9,0,1])),"loader")}])},"registerDefaultLayoutLoaders");Oy();var Yb=d(async(e,t)=>{if(!(e.layoutAlgorithm in Gr))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=Gr[e.layoutAlgorithm];return(await r.loader()).render(e,t,$y,{algorithm:r.algorithm})},"render"),Ub=d((e="",{fallback:t="dagre"}={})=>{if(e in Gr)return e;if(t in Gr)return D.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"),Lu="comm",Mu="rule",Au="decl",Iy="@import",Ry="@namespace",Py="@keyframes",Ny="@layer",Eu=Math.abs,Gs=String.fromCharCode;function Fu(e){return e.trim()}function wi(e,t,r){return e.replace(t,r)}function Wy(e,t,r){return e.indexOf(t,r)}function ir(e,t){return e.charCodeAt(t)|0}function yr(e,t,r){return e.slice(t,r)}function ce(e){return e.length}function zy(e){return e.length}function fi(e,t){return t.push(e),e}var sa=1,xr=1,Du=0,te=0,wt=0,kr="";function Vs(e,t,r,i,a,s,o,n){return{value:e,root:t,parent:r,type:i,props:a,children:s,line:sa,column:xr,length:o,return:"",siblings:n}}function qy(){return wt}function Hy(){return wt=te>0?ir(kr,--te):0,xr--,wt===10&&(xr=1,sa--),wt}function se(){return wt=te<Du?ir(kr,te++):0,xr++,wt===10&&(xr=1,sa++),wt}function ve(){return ir(kr,te)}function vi(){return te}function na(e,t){return yr(kr,e,t)}function Vr(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 jy(e){return sa=xr=1,Du=ce(kr=e),te=0,[]}function Yy(e){return kr="",e}function Ea(e){return Fu(na(te-1,us(e===91?e+2:e===40?e+1:e)))}function Uy(e){for(;(wt=ve())&&wt<33;)se();return Vr(e)>2||Vr(wt)>3?"":" "}function Gy(e,t){for(;--t&&se()&&!(wt<48||wt>102||wt>57&&wt<65||wt>70&&wt<97););return na(e,vi()+(t<6&&ve()==32&&se()==32))}function us(e){for(;se();)switch(wt){case e:return te;case 34:case 39:e!==34&&e!==39&&us(wt);break;case 40:e===41&&us(e);break;case 92:se();break}return te}function Vy(e,t){for(;se()&&e+wt!==57;)if(e+wt===84&&ve()===47)break;return"/*"+na(t,te-1)+"*"+Gs(e===47?e:se())}function Xy(e){for(;!Vr(ve());)se();return na(e,te)}function Ky(e){return Yy(_i("",null,null,null,[""],e=jy(e),0,[0],e))}function _i(e,t,r,i,a,s,o,n,c){for(var l=0,h=0,u=o,f=0,p=0,g=0,m=1,y=1,x=1,b=0,S="",v=a,w=s,C=i,_=S;y;)switch(g=b,b=se()){case 40:if(g!=108&&ir(_,u-1)==58){Wy(_+=wi(Ea(b),"&","&\f"),"&\f",Eu(l?n[l-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:_+=Ea(b);break;case 9:case 10:case 13:case 32:_+=Uy(g);break;case 92:_+=Gy(vi()-1,7);continue;case 47:switch(ve()){case 42:case 47:fi(Zy(Vy(se(),vi()),t,r,c),c),(Vr(g||1)==5||Vr(ve()||1)==5)&&ce(_)&&yr(_,-1,void 0)!==" "&&(_+=" ");break;default:_+="/"}break;case 123*m:n[l++]=ce(_)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(_=wi(_,/\f/g,"")),p>0&&(ce(_)-u||m===0&&g===47)&&fi(p>32?eo(_+";",i,r,u-1,c):eo(wi(_," ","")+";",i,r,u-2,c),c);break;case 59:_+=";";default:if(fi(C=to(_,t,r,l,h,a,n,S,v=[],w=[],u,s),s),b===123)if(h===0)_i(_,t,C,C,v,s,u,n,w);else{switch(f){case 99:if(ir(_,3)===110)break;case 108:if(ir(_,2)===97)break;default:h=0;case 100:case 109:case 115:}h?_i(e,C,C,i&&fi(to(e,C,C,0,0,a,n,S,a,v=[],u,w),w),a,w,u,n,i?v:w):_i(_,C,C,C,[""],w,0,n,w)}}l=h=p=0,m=x=1,S=_="",u=o;break;case 58:u=1+ce(_),p=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&Hy()==125)continue}switch(_+=Gs(b),b*m){case 38:x=h>0?1:(_+="\f",-1);break;case 44:n[l++]=(ce(_)-1)*x,x=1;break;case 64:ve()===45&&(_+=Ea(se())),f=ve(),h=u=ce(S=_+=Xy(vi())),b++;break;case 45:g===45&&ce(_)==2&&(m=0)}}return s}function to(e,t,r,i,a,s,o,n,c,l,h,u){for(var f=a-1,p=a===0?s:[""],g=zy(p),m=0,y=0,x=0;m<i;++m)for(var b=0,S=yr(e,f+1,f=Eu(y=o[m])),v=e;b<g;++b)(v=Fu(y>0?p[b]+" "+S:wi(S,/&\f/g,p[b])))&&(c[x++]=v);return Vs(e,t,r,a===0?Mu:n,c,l,h,u)}function Zy(e,t,r,i){return Vs(e,t,r,Lu,Gs(qy()),yr(e,2,-2),0,i)}function eo(e,t,r,i,a){return Vs(e,t,r,Au,yr(e,0,i),yr(e,i+1,-1),i,a)}function ds(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function Qy(e,t,r,i){switch(e.type){case Ny:if(e.children.length)break;case Iy:case Ry:case Au:return e.return=e.return||e.value;case Lu:return"";case Py:return e.return=e.value+"{"+ds(e.children,i)+"}";case Mu:if(!ce(e.value=e.props.join(",")))return""}return ce(r=ds(e.children,i))?e.return=e.value+"{"+r+"}":""}var $u="c4",Jy=d(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),t0=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./c4Diagram-YG6GDRKO-CFr-QKSf.js");return{diagram:t}},__vite__mapDeps([10,11,0,1]));return{id:$u,diagram:e}},"loader"),e0={id:$u,detector:Jy,loader:t0},r0=e0,Ou="flowchart",i0=d((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"?!1:/^\s*graph/.test(e)},"detector"),a0=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-BW9G6Z5Y.js");return{diagram:t}},__vite__mapDeps([12,13,14,0,1,15,16]));return{id:Ou,diagram:e}},"loader"),s0={id:Ou,detector:i0,loader:a0},n0=s0,Iu="flowchart-v2",o0=d((e,t)=>{var r,i,a;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((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"?!0:/^\s*flowchart/.test(e))},"detector"),l0=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-BW9G6Z5Y.js");return{diagram:t}},__vite__mapDeps([12,13,14,0,1,15,16]));return{id:Iu,diagram:e}},"loader"),c0={id:Iu,detector:o0,loader:l0},h0=c0,Ru="er",u0=d(e=>/^\s*erDiagram/.test(e),"detector"),d0=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./erDiagram-Q2GNP2WA-VZD44fiG.js");return{diagram:t}},__vite__mapDeps([17,14,0,1,15,16]));return{id:Ru,diagram:e}},"loader"),f0={id:Ru,detector:u0,loader:d0},p0=f0,Pu="gitGraph",g0=d(e=>/^\s*gitGraph/.test(e),"detector"),m0=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./gitGraphDiagram-NY62KEGX-D2xrVqfs.js");return{diagram:t}},__vite__mapDeps([18,19,20,21,0,1,6,4,7]));return{id:Pu,diagram:e}},"loader"),y0={id:Pu,detector:g0,loader:m0},x0=y0,Nu="gantt",b0=d(e=>/^\s*gantt/.test(e),"detector"),C0=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./ganttDiagram-LVOFAZNH-BE5hhtQW.js");return{diagram:t}},__vite__mapDeps([22,0,1]));return{id:Nu,diagram:e}},"loader"),S0={id:Nu,detector:b0,loader:C0},k0=S0,Wu="info",w0=d(e=>/^\s*info/.test(e),"detector"),v0=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./infoDiagram-F6ZHWCRC-DuvG7CMo.js");return{diagram:t}},__vite__mapDeps([23,21,0,1,6,4,7]));return{id:Wu,diagram:e}},"loader"),_0={id:Wu,detector:w0,loader:v0},zu="pie",T0=d(e=>/^\s*pie/.test(e),"detector"),B0=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./pieDiagram-ADFJNKIX-CDawS5d5.js");return{diagram:t}},__vite__mapDeps([24,19,21,0,1,6,4,7,25]));return{id:zu,diagram:e}},"loader"),L0={id:zu,detector:T0,loader:B0},qu="quadrantChart",M0=d(e=>/^\s*quadrantChart/.test(e),"detector"),A0=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./quadrantDiagram-AYHSOK5B-BwaRQW9j.js");return{diagram:t}},__vite__mapDeps([26,0,1]));return{id:qu,diagram:e}},"loader"),E0={id:qu,detector:M0,loader:A0},F0=E0,Hu="xychart",D0=d(e=>/^\s*xychart(-beta)?/.test(e),"detector"),$0=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./xychartDiagram-PRI3JC2R-Dh5NbHlS.js");return{diagram:t}},__vite__mapDeps([27,0,1]));return{id:Hu,diagram:e}},"loader"),O0={id:Hu,detector:D0,loader:$0},I0=O0,ju="requirement",R0=d(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),P0=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./requirementDiagram-UZGBJVZJ-xZhlkqne.js");return{diagram:t}},__vite__mapDeps([28,14,0,1,15]));return{id:ju,diagram:e}},"loader"),N0={id:ju,detector:R0,loader:P0},W0=N0,Yu="sequence",z0=d(e=>/^\s*sequenceDiagram/.test(e),"detector"),q0=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./sequenceDiagram-WL72ISMW-DuVqNtcK.js");return{diagram:t}},__vite__mapDeps([29,11,20,0,1]));return{id:Yu,diagram:e}},"loader"),H0={id:Yu,detector:z0,loader:q0},j0=H0,Uu="class",Y0=d((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),U0=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./classDiagram-2ON5EDUG-DD3S7Z_T.js");return{diagram:t}},__vite__mapDeps([30,31,13,14,0,1,15]));return{id:Uu,diagram:e}},"loader"),G0={id:Uu,detector:Y0,loader:U0},V0=G0,Gu="classDiagram",X0=d((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),K0=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./classDiagram-v2-WZHVMYZB-DD3S7Z_T.js");return{diagram:t}},__vite__mapDeps([32,31,13,14,0,1,15]));return{id:Gu,diagram:e}},"loader"),Z0={id:Gu,detector:X0,loader:K0},Q0=Z0,Vu="state",J0=d((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),tx=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./stateDiagram-FKZM4ZOC-kjDVpzFt.js");return{diagram:t}},__vite__mapDeps([33,34,14,0,1,15,3,4,5,6]));return{id:Vu,diagram:e}},"loader"),ex={id:Vu,detector:J0,loader:tx},rx=ex,Xu="stateDiagram",ix=d((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"),ax=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./stateDiagram-v2-4FDKWEC3-Bt6o2Z8q.js");return{diagram:t}},__vite__mapDeps([35,34,14,0,1,15]));return{id:Xu,diagram:e}},"loader"),sx={id:Xu,detector:ix,loader:ax},nx=sx,Ku="journey",ox=d(e=>/^\s*journey/.test(e),"detector"),lx=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./journeyDiagram-XKPGCS4Q-DppY-OqU.js");return{diagram:t}},__vite__mapDeps([36,11,13,0,1,25]));return{id:Ku,diagram:e}},"loader"),cx={id:Ku,detector:ox,loader:lx},hx=cx,ux=d((e,t,r)=>{D.debug(`rendering svg for syntax error
187
+ `);const i=gp(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),Ho(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"),Zu={draw:ux},dx=Zu,fx={db:{},renderer:Zu,parser:{parse:d(()=>{},"parse")}},px=fx,Qu="flowchart-elk",gx=d((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):!1},"detector"),mx=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-BW9G6Z5Y.js");return{diagram:t}},__vite__mapDeps([12,13,14,0,1,15,16]));return{id:Qu,diagram:e}},"loader"),yx={id:Qu,detector:gx,loader:mx},xx=yx,Ju="timeline",bx=d(e=>/^\s*timeline/.test(e),"detector"),Cx=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./timeline-definition-IT6M3QCI-BrZan_9K.js");return{diagram:t}},__vite__mapDeps([37,0,1,25]));return{id:Ju,diagram:e}},"loader"),Sx={id:Ju,detector:bx,loader:Cx},kx=Sx,td="mindmap",wx=d(e=>/^\s*mindmap/.test(e),"detector"),vx=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./mindmap-definition-VGOIOE7T-Ys6gAj49.js");return{diagram:t}},__vite__mapDeps([38,14,0,1,15]));return{id:td,diagram:e}},"loader"),_x={id:td,detector:wx,loader:vx},Tx=_x,ed="kanban",Bx=d(e=>/^\s*kanban/.test(e),"detector"),Lx=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./kanban-definition-3W4ZIXB7-DWFZ7d_a.js");return{diagram:t}},__vite__mapDeps([39,13,0,1]));return{id:ed,diagram:e}},"loader"),Mx={id:ed,detector:Bx,loader:Lx},Ax=Mx,rd="sankey",Ex=d(e=>/^\s*sankey(-beta)?/.test(e),"detector"),Fx=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./sankeyDiagram-TZEHDZUN-CNXqnJNS.js");return{diagram:t}},__vite__mapDeps([40,0,1]));return{id:rd,diagram:e}},"loader"),Dx={id:rd,detector:Ex,loader:Fx},$x=Dx,id="packet",Ox=d(e=>/^\s*packet(-beta)?/.test(e),"detector"),Ix=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-S2PKOQOG-DxCLvX73.js");return{diagram:t}},__vite__mapDeps([41,19,21,0,1,6,4,7]));return{id,diagram:e}},"loader"),Rx={id,detector:Ox,loader:Ix},ad="radar",Px=d(e=>/^\s*radar-beta/.test(e),"detector"),Nx=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-QEK2KX5R-BruzodAN.js");return{diagram:t}},__vite__mapDeps([42,19,21,0,1,6,4,7]));return{id:ad,diagram:e}},"loader"),Wx={id:ad,detector:Px,loader:Nx},sd="block",zx=d(e=>/^\s*block(-beta)?/.test(e),"detector"),qx=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./blockDiagram-VD42YOAC-yNezEuFm.js");return{diagram:t}},__vite__mapDeps([43,13,7,0,1,3,4,16]));return{id:sd,diagram:e}},"loader"),Hx={id:sd,detector:zx,loader:qx},jx=Hx,nd="architecture",Yx=d(e=>/^\s*architecture/.test(e),"detector"),Ux=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./architectureDiagram-VXUJARFQ-DEy8uu79.js");return{diagram:t}},__vite__mapDeps([44,19,21,0,1,6,4,7,9]));return{id:nd,diagram:e}},"loader"),Gx={id:nd,detector:Yx,loader:Ux},Vx=Gx,od="treemap",Xx=d(e=>/^\s*treemap/.test(e),"detector"),Kx=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-PSM6KHXK-BzAvoA1a.js");return{diagram:t}},__vite__mapDeps([45,15,19,21,0,1,6,4,7]));return{id:od,diagram:e}},"loader"),Zx={id:od,detector:Xx,loader:Kx},ro=!1,oa=d(()=>{ro||(ro=!0,Fi("error",px,e=>e.toLowerCase().trim()==="error"),Fi("---",{db:{clear:d(()=>{},"clear")},styles:{},renderer:{draw:d(()=>{},"draw")},parser:{parse:d(()=>{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:d(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Ra(xx,Tx,Vx),Ra(r0,Ax,Q0,V0,p0,k0,_0,L0,W0,j0,h0,n0,kx,x0,nx,rx,hx,F0,$x,Rx,I0,jx,Wx,Zx))},"addDiagrams"),Qx=d(async()=>{D.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(ze).map(async([r,{detector:i,loader:a}])=>{if(a)try{za(r)}catch{try{const{diagram:s,id:o}=await a();Fi(o,s,i)}catch(s){throw D.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete ze[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){D.error(`Failed to load ${t.length} external diagrams`);for(const r of t)D.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Jx="graphics-document document";function ld(e,t){e.attr("role",Jx),t!==""&&e.attr("aria-roledescription",t)}d(ld,"setA11yDiagramInfo");function cd(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)}}}d(cd,"addSVGa11yTitleDescription");var We,fs=(We=class{constructor(t,r,i,a,s){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=s}static async fromText(t,r={}){var l,h;const i=Ot(),a=Ss(t,i);t=Gg(t)+`
188
+ `;try{za(a)}catch{const u=Sf(a);if(!u)throw new Eo(`Diagram ${a} not found.`);const{id:f,diagram:p}=await u();Fi(f,p)}const{db:s,parser:o,renderer:n,init:c}=za(a);return o.parser&&(o.parser.yy=s),(l=s.clear)==null||l.call(s),c==null||c(i),r.title&&((h=s.setDiagramTitle)==null||h.call(s,r.title)),await o.parse(t),new We(a,t,s,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},d(We,"Diagram"),We),io=[],tb=d(()=>{io.forEach(e=>{e()}),io=[]},"attachFunctions"),eb=d(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function hd(e){const t=e.match(Ao);if(!t)return{text:e,metadata:{}};let r=kg(t[1],{schema:Sg})??{};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}}d(hd,"extractFrontMatter");var rb=d(e=>e.replace(/\r\n?/g,`
189
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),ib=d(e=>{const{text:t,metadata:r}=hd(e),{displayMode:i,title:a,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:a,config:s,text:t}},"processFrontmatter"),ab=d(e=>{const t=ie.detectInit(e)??{},r=ie.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:$g(e),directive:t}},"processDirectives");function Xs(e){const t=rb(e),r=ib(t),i=ab(r.text),a=zs(r.config,i.directive);return e=eb(i.text),{code:e,title:r.title,config:a}}d(Xs,"preprocessDiagram");function ud(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}d(ud,"toBase64");var sb=5e4,nb="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",ob="sandbox",lb="loose",cb="http://www.w3.org/2000/svg",hb="http://www.w3.org/1999/xlink",ub="http://www.w3.org/1999/xhtml",db="100%",fb="100%",pb="border:0;margin:0;",gb="margin:0",mb="allow-top-navigation-by-user-activation allow-popups",yb='The "iframe" tag is not supported by your browser.',xb=["foreignobject"],bb=["dominant-baseline"];function Ks(e){const t=Xs(e);return Ai(),Rf(t.config??{}),t}d(Ks,"processAndSetConfigs");async function dd(e,t){oa();try{const{code:r,config:i}=Ks(e);return{diagramType:(await pd(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}d(dd,"parse");var ao=d((e,t,r=[])=>`
190
+ .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),Cb=d((e,t=new Map)=>{var i;let r="";if(e.themeCSS!==void 0&&(r+=`
191
+ ${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
192
+ :root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
193
+ :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const n=e.htmlLabels??((i=e.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(c=>{yn(c.styles)||n.forEach(l=>{r+=ao(c.id,l,c.styles)}),yn(c.textStyles)||(r+=ao(c.id,"tspan",((c==null?void 0:c.textStyles)||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),Sb=d((e,t,r,i)=>{const a=Cb(e,r),s=ip(t,a,e.themeVariables);return ds(Ky(`${i}{${s}}`),Qy)},"createUserStyles"),kb=d((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Ye(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),wb=d((e="",t)=>{var a,s;const r=(s=(a=t==null?void 0:t.viewBox)==null?void 0:a.baseVal)!=null&&s.height?t.viewBox.baseVal.height+"px":fb,i=ud(`<body style="${gb}">${e}</body>`);return`<iframe style="width:${db};height:${r};${pb}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${mb}">
194
+ ${yb}
195
+ </iframe>`},"putIntoIFrame"),so=d((e,t,r,i,a)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const o=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",cb);return a&&o.attr("xmlns:xlink",a),o.append("g"),e},"appendDivSvgG");function ps(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}d(ps,"sandboxedIframe");var vb=d((e,t,r,i)=>{var a,s,o;(a=e.getElementById(t))==null||a.remove(),(s=e.getElementById(r))==null||s.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),_b=d(async function(e,t,r){var W,O,A,L,B,F;oa();const i=Ks(t);t=i.code;const a=Ot();D.debug(a),t.length>((a==null?void 0:a.maxTextSize)??sb)&&(t=nb);const s="#"+e,o="i"+e,n="#"+o,c="d"+e,l="#"+c,h=d(()=>{const z=ht(f?n:l).node();z&&"remove"in z&&z.remove()},"removeTempElements");let u=ht("body");const f=a.securityLevel===ob,p=a.securityLevel===lb,g=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const M=ps(ht(r),o);u=ht(M.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ht(r);so(u,e,c,`font-family: ${g}`,hb)}else{if(vb(document,e,c,o),f){const M=ps(ht("body"),o);u=ht(M.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ht("body");so(u,e,c)}let m,y;try{m=await fs.fromText(t,{title:i.title})}catch(M){if(a.suppressErrorRendering)throw h(),M;m=await fs.fromText("error"),y=M}const x=u.select(l).node(),b=m.type,S=x.firstChild,v=S.firstChild,w=(O=(W=m.renderer).getClasses)==null?void 0:O.call(W,t,m),C=Sb(a,b,w,s),_=document.createElement("style");_.innerHTML=C,S.insertBefore(_,v);try{await m.renderer.draw(t,e,xn.version,m)}catch(M){throw a.suppressErrorRendering?h():dx.draw(t,e,xn.version),M}const $=u.select(`${l} svg`),P=(L=(A=m.db).getAccTitle)==null?void 0:L.call(A),I=(F=(B=m.db).getAccDescription)==null?void 0:F.call(B);gd(b,$,P,I),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",ub);let E=u.select(l).node().innerHTML;if(D.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),E=kb(E,f,Bt(a.arrowMarkerAbsolute)),f){const M=u.select(l+" svg").node();E=wb(E,M)}else p||(E=dr.sanitize(E,{ADD_TAGS:xb,ADD_ATTR:bb,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(tb(),y)throw y;return h(),{diagramType:b,svg:E,bindFunctions:m.db.bindFunctions}},"render");function fd(e={}){var i;const t=_t({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Of(t),t!=null&&t.theme&&t.theme in be?t.themeVariables=be[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=be.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?$f(t):Io();Cs(r.logLevel),oa()}d(fd,"initialize");var pd=d((e,t={})=>{const{code:r}=Xs(e);return fs.fromText(r,t)},"getDiagramFromText");function gd(e,t,r,i){ld(t,e),cd(t,r,i,t.attr("id"))}d(gd,"addA11yInfo");var je=Object.freeze({render:_b,parse:dd,getDiagramFromText:pd,initialize:fd,getConfig:Ot,setConfig:Ro,getSiteConfig:Io,updateSiteConfig:If,reset:d(()=>{Ai()},"reset"),globalReset:d(()=>{Ai(fr)},"globalReset"),defaultConfig:fr});Cs(Ot().logLevel);Ai(Ot());var Tb=d((e,t,r)=>{D.warn(e),Ws(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"),md=d(async function(e={querySelector:".mermaid"}){try{await Bb(e)}catch(t){if(Ws(t)&&D.error(t.str),Xt.parseError&&Xt.parseError(t),!e.suppressErrors)throw D.error("Use the suppressErrors option to suppress these errors"),t}},"run"),Bb=d(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=je.getConfig();D.debug(`${e?"":"No "}Callback function found`);let a;if(r)a=r;else if(t)a=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");D.debug(`Found ${a.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(D.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),je.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const s=new ie.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const c of Array.from(a)){if(D.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const l=`mermaid-${s.next()}`;o=c.innerHTML,o=Rc(ie.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ie.detectInit(o);h&&D.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await Cd(l,o,c);c.innerHTML=u,e&&await e(l),f&&f(c)}catch(u){Tb(u,n,Xt.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),yd=d(function(e){je.initialize(e)},"initialize"),Lb=d(async function(e,t,r){D.warn("mermaid.init is deprecated. Please use run instead."),e&&yd(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await md(i)},"init"),Mb=d(async(e,{lazyLoad:t=!0}={})=>{oa(),Ra(...e),t===!1&&await Qx()},"registerExternalDiagrams"),xd=d(function(){if(Xt.startOnLoad){const{startOnLoad:e}=je.getConfig();e&&Xt.run().catch(t=>D.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",xd,!1);var Ab=d(function(e){Xt.parseError=e},"setParseErrorHandler"),Ui=[],Fa=!1,bd=d(async()=>{if(!Fa){for(Fa=!0;Ui.length>0;){const e=Ui.shift();if(e)try{await e()}catch(t){D.error("Error executing queue",t)}}Fa=!1}},"executeQueue"),Eb=d(async(e,t)=>new Promise((r,i)=>{const a=d(()=>new Promise((s,o)=>{je.parse(e,t).then(n=>{s(n),r(n)},n=>{var c;D.error("Error parsing",n),(c=Xt.parseError)==null||c.call(Xt,n),o(n),i(n)})}),"performCall");Ui.push(a),bd().catch(i)}),"parse"),Cd=d((e,t,r)=>new Promise((i,a)=>{const s=d(()=>new Promise((o,n)=>{je.render(e,t,r).then(c=>{o(c),i(c)},c=>{var l;D.error("Error parsing",c),(l=Xt.parseError)==null||l.call(Xt,c),n(c),a(c)})}),"performCall");Ui.push(s),bd().catch(a)}),"render"),Fb=d(()=>Object.keys(ze).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Xt={startOnLoad:!0,mermaidAPI:je,parse:Eb,render:Cd,init:Lb,run:md,registerExternalDiagrams:Mb,registerLayoutLoaders:Bu,initialize:yd,parseError:void 0,contentLoaded:xd,setParseErrorHandler:Ab,detectType:Ss,registerIconPacks:gm,getRegisteredDiagramsMetadata:Fb},Db=Xt;/*! Check if previously processed *//*!
196
+ * Wait for document loaded before starting the execution
197
+ */const Gb=Object.freeze(Object.defineProperty({__proto__:null,default:Db},Symbol.toStringTag,{value:"Module"}));export{jo as $,Nr as A,jd as B,he as C,dp as D,zs as E,Ot as F,Oo as G,Ng as H,gp as I,Sg as J,xn as K,Bf as L,ym as M,pr as N,Ib as O,Ji as P,Uf as Q,ks as R,An as S,Pg as T,it as U,tp as V,Xr as W,j as X,J as Y,Ag as Z,d as _,np as a,qm as a0,wu as a1,Hb as a2,wg as a3,Bt as a4,Me as a5,Os as a6,Xc as a7,Ye as a8,Fc as a9,Dy as aa,qb as ab,jb as ac,Wb as ad,X as ae,zb as af,gy as ag,hy as ah,cy as ai,Ob as aj,Qr as ak,gm as al,pm as am,Hd as an,G as ao,Tc as ap,Gb as aq,sp as b,dt as c,Ho as d,_t as e,Se as f,lp as g,Jt as h,Mg as i,br as j,$c as k,D as l,Kr as m,Rb as n,Ub as o,cp as p,hp as q,Yb as r,op as s,kg as t,ie as u,ny as v,qg as w,Nb as x,ap as y,Pb as z};