@aggroot-team/aggroot 1.8.7 → 1.8.9

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 (138) hide show
  1. package/dist/index.cjs +666 -660
  2. package/package.json +1 -1
  3. package/share/web/dist/assets/arc-CS_Kjpll.js +1 -0
  4. package/share/web/dist/assets/arc-D1-xmnmt.js +1 -0
  5. package/share/web/dist/assets/arc-lB0tm96X.js +1 -0
  6. package/share/web/dist/assets/architectureDiagram-3BPJPVTR-5x1c3saA.js +36 -0
  7. package/share/web/dist/assets/architectureDiagram-3BPJPVTR-AnqeshCf.js +36 -0
  8. package/share/web/dist/assets/architectureDiagram-3BPJPVTR-DMBx-2Be.js +36 -0
  9. package/share/web/dist/assets/blockDiagram-GPEHLZMM-BCL5dg7K.js +132 -0
  10. package/share/web/dist/assets/blockDiagram-GPEHLZMM-BGvAyQtt.js +132 -0
  11. package/share/web/dist/assets/blockDiagram-GPEHLZMM-BYo0zmDr.js +132 -0
  12. package/share/web/dist/assets/c4Diagram-AAUBKEIU-DlS4uT1_.js +10 -0
  13. package/share/web/dist/assets/c4Diagram-AAUBKEIU-U4nXEZ3l.js +10 -0
  14. package/share/web/dist/assets/c4Diagram-AAUBKEIU-XfiixDyc.js +10 -0
  15. package/share/web/dist/assets/channel-B3Bm5XZk.js +1 -0
  16. package/share/web/dist/assets/channel-BA5eGuYn.js +1 -0
  17. package/share/web/dist/assets/channel-BwnkgWV4.js +1 -0
  18. package/share/web/dist/assets/chunk-2J33WTMH-DV_eyAG5.js +1 -0
  19. package/share/web/dist/assets/chunk-2J33WTMH-cdZ9jzPc.js +1 -0
  20. package/share/web/dist/assets/chunk-2J33WTMH-eVY-aT34.js +1 -0
  21. package/share/web/dist/assets/chunk-4BX2VUAB-BkSAovoh.js +1 -0
  22. package/share/web/dist/assets/chunk-4BX2VUAB-C8Cn-5pC.js +1 -0
  23. package/share/web/dist/assets/chunk-4BX2VUAB-wPqPwSJz.js +1 -0
  24. package/share/web/dist/assets/chunk-55IACEB6-BNAs0JFy.js +1 -0
  25. package/share/web/dist/assets/chunk-55IACEB6-C3RQmN-K.js +1 -0
  26. package/share/web/dist/assets/chunk-55IACEB6-CNgdotn1.js +1 -0
  27. package/share/web/dist/assets/chunk-727SXJPM--kUckukx.js +206 -0
  28. package/share/web/dist/assets/chunk-727SXJPM-BZV4neR_.js +206 -0
  29. package/share/web/dist/assets/chunk-727SXJPM-CtLXL4eI.js +206 -0
  30. package/share/web/dist/assets/chunk-AQP2D5EJ-BNz2j229.js +231 -0
  31. package/share/web/dist/assets/chunk-AQP2D5EJ-DqVrkfaW.js +231 -0
  32. package/share/web/dist/assets/chunk-AQP2D5EJ-X43awX0X.js +231 -0
  33. package/share/web/dist/assets/chunk-FMBD7UC4-BLMuIKd-.js +15 -0
  34. package/share/web/dist/assets/chunk-FMBD7UC4-C2O3Bngt.js +15 -0
  35. package/share/web/dist/assets/chunk-FMBD7UC4-DvtGDPYe.js +15 -0
  36. package/share/web/dist/assets/chunk-ND2GUHAM-B8qCem0k.js +1 -0
  37. package/share/web/dist/assets/chunk-ND2GUHAM-C8iqLBQO.js +1 -0
  38. package/share/web/dist/assets/chunk-ND2GUHAM-qGV17DoW.js +1 -0
  39. package/share/web/dist/assets/chunk-QZHKN3VN-Bgj3z-LO.js +1 -0
  40. package/share/web/dist/assets/chunk-QZHKN3VN-CDpxoAzy.js +1 -0
  41. package/share/web/dist/assets/chunk-QZHKN3VN-Cz30ZMa-.js +1 -0
  42. package/share/web/dist/assets/classDiagram-4FO5ZUOK-C3w2Tu2D.js +1 -0
  43. package/share/web/dist/assets/classDiagram-4FO5ZUOK-DVYUx4xg.js +1 -0
  44. package/share/web/dist/assets/classDiagram-4FO5ZUOK-DphUz-_B.js +1 -0
  45. package/share/web/dist/assets/classDiagram-v2-Q7XG4LA2-C3w2Tu2D.js +1 -0
  46. package/share/web/dist/assets/classDiagram-v2-Q7XG4LA2-DVYUx4xg.js +1 -0
  47. package/share/web/dist/assets/classDiagram-v2-Q7XG4LA2-DphUz-_B.js +1 -0
  48. package/share/web/dist/assets/cose-bilkent-S5V4N54A-B7oR3DyP.js +1 -0
  49. package/share/web/dist/assets/cose-bilkent-S5V4N54A-ByytJvz1.js +1 -0
  50. package/share/web/dist/assets/cose-bilkent-S5V4N54A-WWwvrGFW.js +1 -0
  51. package/share/web/dist/assets/dagre-BM42HDAG-5YKBUOPT.js +4 -0
  52. package/share/web/dist/assets/dagre-BM42HDAG-C2MUVJvo.js +4 -0
  53. package/share/web/dist/assets/dagre-BM42HDAG-C9SDvHaG.js +4 -0
  54. package/share/web/dist/assets/diagram-2AECGRRQ-BfysOZsZ.js +43 -0
  55. package/share/web/dist/assets/diagram-2AECGRRQ-DJs4CZTQ.js +43 -0
  56. package/share/web/dist/assets/diagram-2AECGRRQ-DfNzoPmb.js +43 -0
  57. package/share/web/dist/assets/diagram-5GNKFQAL-BkzSh7ps.js +10 -0
  58. package/share/web/dist/assets/diagram-5GNKFQAL-Bu-FwUCF.js +10 -0
  59. package/share/web/dist/assets/diagram-5GNKFQAL-iGwAHf9j.js +10 -0
  60. package/share/web/dist/assets/diagram-KO2AKTUF-Co760L_W.js +3 -0
  61. package/share/web/dist/assets/diagram-KO2AKTUF-D1bl1fOo.js +3 -0
  62. package/share/web/dist/assets/diagram-KO2AKTUF-D8egQ8Yg.js +3 -0
  63. package/share/web/dist/assets/diagram-LMA3HP47-CfQVFz42.js +24 -0
  64. package/share/web/dist/assets/diagram-LMA3HP47-CjFFWCPD.js +24 -0
  65. package/share/web/dist/assets/diagram-LMA3HP47-DsqAP__t.js +24 -0
  66. package/share/web/dist/assets/diagram-OG6HWLK6-CIswB7UK.js +24 -0
  67. package/share/web/dist/assets/diagram-OG6HWLK6-CmTD0mQR.js +24 -0
  68. package/share/web/dist/assets/diagram-OG6HWLK6-D0YeWj_0.js +24 -0
  69. package/share/web/dist/assets/erDiagram-TEJ5UH35-C8E_aGnu.js +85 -0
  70. package/share/web/dist/assets/erDiagram-TEJ5UH35-CQw0Y8z4.js +85 -0
  71. package/share/web/dist/assets/erDiagram-TEJ5UH35-CsgA00X1.js +85 -0
  72. package/share/web/dist/assets/flowDiagram-I6XJVG4X-C0fNZZPv.js +162 -0
  73. package/share/web/dist/assets/flowDiagram-I6XJVG4X-DrEzlHME.js +162 -0
  74. package/share/web/dist/assets/flowDiagram-I6XJVG4X-veDKCmdm.js +162 -0
  75. package/share/web/dist/assets/ganttDiagram-6RSMTGT7-CEWKD2PP.js +292 -0
  76. package/share/web/dist/assets/ganttDiagram-6RSMTGT7-CWXBp3Nv.js +292 -0
  77. package/share/web/dist/assets/ganttDiagram-6RSMTGT7-ritdFwn_.js +292 -0
  78. package/share/web/dist/assets/gitGraphDiagram-PVQCEYII-BvrAMgme.js +106 -0
  79. package/share/web/dist/assets/gitGraphDiagram-PVQCEYII-CgwIjgQp.js +106 -0
  80. package/share/web/dist/assets/gitGraphDiagram-PVQCEYII-JZ_vZk6r.js +106 -0
  81. package/share/web/dist/assets/index-BwBZUobi.js +407 -0
  82. package/share/web/dist/assets/index-CUO5Op8Z.js +407 -0
  83. package/share/web/dist/assets/index-CfZi-_-W.js +407 -0
  84. package/share/web/dist/assets/infoDiagram-5YYISTIA-CLX2p5sa.js +2 -0
  85. package/share/web/dist/assets/infoDiagram-5YYISTIA-DGo9iAf1.js +2 -0
  86. package/share/web/dist/assets/infoDiagram-5YYISTIA-iPXYbEHR.js +2 -0
  87. package/share/web/dist/assets/ishikawaDiagram-YF4QCWOH-CC4E2SaA.js +70 -0
  88. package/share/web/dist/assets/ishikawaDiagram-YF4QCWOH-Dn5q76gw.js +70 -0
  89. package/share/web/dist/assets/ishikawaDiagram-YF4QCWOH-DrSVzjbw.js +70 -0
  90. package/share/web/dist/assets/journeyDiagram-JHISSGLW-BSOeJkGp.js +139 -0
  91. package/share/web/dist/assets/journeyDiagram-JHISSGLW-CfDkxnhu.js +139 -0
  92. package/share/web/dist/assets/journeyDiagram-JHISSGLW-DBA2RX4C.js +139 -0
  93. package/share/web/dist/assets/kanban-definition-UN3LZRKU-B5GxlR-1.js +89 -0
  94. package/share/web/dist/assets/kanban-definition-UN3LZRKU-Bf10Hgev.js +89 -0
  95. package/share/web/dist/assets/kanban-definition-UN3LZRKU-DVCgdsup.js +89 -0
  96. package/share/web/dist/assets/linear-Cl0xue9D.js +1 -0
  97. package/share/web/dist/assets/linear-DA-PRFNX.js +1 -0
  98. package/share/web/dist/assets/linear-Sc8-3Wjq.js +1 -0
  99. package/share/web/dist/assets/mindmap-definition-RKZ34NQL-BT-xg-Vd.js +96 -0
  100. package/share/web/dist/assets/mindmap-definition-RKZ34NQL-C7mBQtCS.js +96 -0
  101. package/share/web/dist/assets/mindmap-definition-RKZ34NQL-DPETRY9W.js +96 -0
  102. package/share/web/dist/assets/pieDiagram-4H26LBE5-D0SfOcBp.js +30 -0
  103. package/share/web/dist/assets/pieDiagram-4H26LBE5-DWsr77WB.js +30 -0
  104. package/share/web/dist/assets/pieDiagram-4H26LBE5-LJC7tux2.js +30 -0
  105. package/share/web/dist/assets/quadrantDiagram-W4KKPZXB-CPeinLEK.js +7 -0
  106. package/share/web/dist/assets/quadrantDiagram-W4KKPZXB-DbWrqYvW.js +7 -0
  107. package/share/web/dist/assets/quadrantDiagram-W4KKPZXB-ma2mZhGO.js +7 -0
  108. package/share/web/dist/assets/requirementDiagram-4Y6WPE33-BaQWRwJt.js +84 -0
  109. package/share/web/dist/assets/requirementDiagram-4Y6WPE33-CIZXNZTm.js +84 -0
  110. package/share/web/dist/assets/requirementDiagram-4Y6WPE33-DDTvpJUZ.js +84 -0
  111. package/share/web/dist/assets/sankeyDiagram-5OEKKPKP-DKUJqbyk.js +40 -0
  112. package/share/web/dist/assets/sankeyDiagram-5OEKKPKP-O34VGoeQ.js +40 -0
  113. package/share/web/dist/assets/sankeyDiagram-5OEKKPKP-ejOS7WnA.js +40 -0
  114. package/share/web/dist/assets/sequenceDiagram-3UESZ5HK-B_ejwxM2.js +162 -0
  115. package/share/web/dist/assets/sequenceDiagram-3UESZ5HK-Cc52z9EG.js +162 -0
  116. package/share/web/dist/assets/sequenceDiagram-3UESZ5HK-w-6ftIn5.js +162 -0
  117. package/share/web/dist/assets/stateDiagram-AJRCARHV-CjeYQQJE.js +1 -0
  118. package/share/web/dist/assets/stateDiagram-AJRCARHV-DMVqBR-k.js +1 -0
  119. package/share/web/dist/assets/stateDiagram-AJRCARHV-bk2slbvF.js +1 -0
  120. package/share/web/dist/assets/stateDiagram-v2-BHNVJYJU-BP-EscdR.js +1 -0
  121. package/share/web/dist/assets/stateDiagram-v2-BHNVJYJU-CmaVLj5D.js +1 -0
  122. package/share/web/dist/assets/stateDiagram-v2-BHNVJYJU-DuTeNjhj.js +1 -0
  123. package/share/web/dist/assets/timeline-definition-PNZ67QCA-Be2E3Uyb.js +120 -0
  124. package/share/web/dist/assets/timeline-definition-PNZ67QCA-Bs_476xO.js +120 -0
  125. package/share/web/dist/assets/timeline-definition-PNZ67QCA-YAAjhimL.js +120 -0
  126. package/share/web/dist/assets/vennDiagram-CIIHVFJN-4DBut7gE.js +34 -0
  127. package/share/web/dist/assets/vennDiagram-CIIHVFJN-BD9aC-Oh.js +34 -0
  128. package/share/web/dist/assets/vennDiagram-CIIHVFJN-BE0CqvR2.js +34 -0
  129. package/share/web/dist/assets/wardley-L42UT6IY-CcZCe59P.js +161 -0
  130. package/share/web/dist/assets/wardley-L42UT6IY-USJaAMFC.js +161 -0
  131. package/share/web/dist/assets/wardley-L42UT6IY-wgG6Zqzh.js +161 -0
  132. package/share/web/dist/assets/wardleyDiagram-YWT4CUSO-B9AmK9SN.js +78 -0
  133. package/share/web/dist/assets/wardleyDiagram-YWT4CUSO-BKldCrWN.js +78 -0
  134. package/share/web/dist/assets/wardleyDiagram-YWT4CUSO-CQwbXcsV.js +78 -0
  135. package/share/web/dist/assets/xychartDiagram-2RQKCTM6-D3gg8SrG.js +7 -0
  136. package/share/web/dist/assets/xychartDiagram-2RQKCTM6-Dsl9_fgE.js +7 -0
  137. package/share/web/dist/assets/xychartDiagram-2RQKCTM6-HNsiPfKd.js +7 -0
  138. package/share/web/dist/index.html +1 -1
@@ -0,0 +1,407 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-BM42HDAG-C9SDvHaG.js","assets/graph-D2o_JWn5.js","assets/layout-UJbxhwF7.js","assets/cose-bilkent-S5V4N54A-B7oR3DyP.js","assets/cytoscape.esm-CkSuTymj.js","assets/c4Diagram-AAUBKEIU-DlS4uT1_.js","assets/chunk-ND2GUHAM-qGV17DoW.js","assets/flowDiagram-I6XJVG4X-DrEzlHME.js","assets/chunk-FMBD7UC4-C2O3Bngt.js","assets/chunk-55IACEB6-CNgdotn1.js","assets/chunk-2J33WTMH-cdZ9jzPc.js","assets/channel-BA5eGuYn.js","assets/erDiagram-TEJ5UH35-C8E_aGnu.js","assets/gitGraphDiagram-PVQCEYII-BvrAMgme.js","assets/chunk-4BX2VUAB-C8Cn-5pC.js","assets/chunk-QZHKN3VN-Bgj3z-LO.js","assets/wardley-L42UT6IY-USJaAMFC.js","assets/ganttDiagram-6RSMTGT7-ritdFwn_.js","assets/linear-DA-PRFNX.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-CrowFXzY.js","assets/infoDiagram-5YYISTIA-DGo9iAf1.js","assets/pieDiagram-4H26LBE5-LJC7tux2.js","assets/arc-lB0tm96X.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-W4KKPZXB-ma2mZhGO.js","assets/xychartDiagram-2RQKCTM6-Dsl9_fgE.js","assets/requirementDiagram-4Y6WPE33-BaQWRwJt.js","assets/sequenceDiagram-3UESZ5HK-w-6ftIn5.js","assets/classDiagram-4FO5ZUOK-DphUz-_B.js","assets/chunk-727SXJPM--kUckukx.js","assets/classDiagram-v2-Q7XG4LA2-DphUz-_B.js","assets/stateDiagram-AJRCARHV-bk2slbvF.js","assets/chunk-AQP2D5EJ-DqVrkfaW.js","assets/stateDiagram-v2-BHNVJYJU-CmaVLj5D.js","assets/journeyDiagram-JHISSGLW-CfDkxnhu.js","assets/timeline-definition-PNZ67QCA-Bs_476xO.js","assets/mindmap-definition-RKZ34NQL-C7mBQtCS.js","assets/kanban-definition-UN3LZRKU-Bf10Hgev.js","assets/sankeyDiagram-5OEKKPKP-ejOS7WnA.js","assets/diagram-LMA3HP47-DsqAP__t.js","assets/diagram-2AECGRRQ-DfNzoPmb.js","assets/blockDiagram-GPEHLZMM-BCL5dg7K.js","assets/diagram-5GNKFQAL-BkzSh7ps.js","assets/architectureDiagram-3BPJPVTR-DMBx-2Be.js","assets/diagram-KO2AKTUF-Co760L_W.js","assets/diagram-OG6HWLK6-CIswB7UK.js","assets/wardleyDiagram-YWT4CUSO-CQwbXcsV.js"])))=>i.map(i=>d[i]);
2
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function i(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(s){if(s.ep)return;s.ep=!0;const l=i(s);fetch(s.href,l)}})();function Lm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wp={exports:{}},zo={};var FC;function ZL(){if(FC)return zo;FC=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(a,s,l){var c=null;if(l!==void 0&&(c=""+l),s.key!==void 0&&(c=""+s.key),"key"in s){l={};for(var h in s)h!=="key"&&(l[h]=s[h])}else l=s;return s=l.ref,{$$typeof:e,type:a,key:c,ref:s!==void 0?s:null,props:l}}return zo.Fragment=t,zo.jsx=i,zo.jsxs=i,zo}var DC;function QL(){return DC||(DC=1,Wp.exports=ZL()),Wp.exports}var z=QL(),Yp={exports:{}},Nt={};var $C;function KL(){if($C)return Nt;$C=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),x=Symbol.iterator;function y(R){return R===null||typeof R!="object"?null:(R=x&&R[x]||R["@@iterator"],typeof R=="function"?R:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,S={};function T(R,J,ct){this.props=R,this.context=J,this.refs=S,this.updater=ct||C}T.prototype.isReactComponent={},T.prototype.setState=function(R,J){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,J,"setState")},T.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function _(){}_.prototype=T.prototype;function E(R,J,ct){this.props=R,this.context=J,this.refs=S,this.updater=ct||C}var M=E.prototype=new _;M.constructor=E,k(M,T.prototype),M.isPureReactComponent=!0;var O=Array.isArray;function N(){}var H={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function lt(R,J,ct){var ft=ct.ref;return{$$typeof:e,type:R,key:J,ref:ft!==void 0?ft:null,props:ct}}function G(R,J){return lt(R.type,J,R.props)}function D(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function Z(R){var J={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(ct){return J[ct]})}var tt=/\/+/g;function W(R,J){return typeof R=="object"&&R!==null&&R.key!=null?Z(""+R.key):J.toString(36)}function P(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(N,N):(R.status="pending",R.then(function(J){R.status==="pending"&&(R.status="fulfilled",R.value=J)},function(J){R.status==="pending"&&(R.status="rejected",R.reason=J)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function A(R,J,ct,ft,xt){var mt=typeof R;(mt==="undefined"||mt==="boolean")&&(R=null);var Ct=!1;if(R===null)Ct=!0;else switch(mt){case"bigint":case"string":case"number":Ct=!0;break;case"object":switch(R.$$typeof){case e:case t:Ct=!0;break;case p:return Ct=R._init,A(Ct(R._payload),J,ct,ft,xt)}}if(Ct)return xt=xt(R),Ct=ft===""?"."+W(R,0):ft,O(xt)?(ct="",Ct!=null&&(ct=Ct.replace(tt,"$&/")+"/"),A(xt,J,ct,"",function(Ot){return Ot})):xt!=null&&(D(xt)&&(xt=G(xt,ct+(xt.key==null||R&&R.key===xt.key?"":(""+xt.key).replace(tt,"$&/")+"/")+Ct)),J.push(xt)),1;Ct=0;var ot=ft===""?".":ft+":";if(O(R))for(var bt=0;bt<R.length;bt++)ft=R[bt],mt=ot+W(ft,bt),Ct+=A(ft,J,ct,mt,xt);else if(bt=y(R),typeof bt=="function")for(R=bt.call(R),bt=0;!(ft=R.next()).done;)ft=ft.value,mt=ot+W(ft,bt++),Ct+=A(ft,J,ct,mt,xt);else if(mt==="object"){if(typeof R.then=="function")return A(P(R),J,ct,ft,xt);throw J=String(R),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.")}return Ct}function $(R,J,ct){if(R==null)return R;var ft=[],xt=0;return A(R,ft,"","",function(mt){return J.call(ct,mt,xt++)}),ft}function U(R){if(R._status===-1){var J=R._result;J=J(),J.then(function(ct){(R._status===0||R._status===-1)&&(R._status=1,R._result=ct)},function(ct){(R._status===0||R._status===-1)&&(R._status=2,R._result=ct)}),R._status===-1&&(R._status=0,R._result=J)}if(R._status===1)return R._result.default;throw R._result}var it=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var J=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(J))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},nt={map:$,forEach:function(R,J,ct){$(R,function(){J.apply(this,arguments)},ct)},count:function(R){var J=0;return $(R,function(){J++}),J},toArray:function(R){return $(R,function(J){return J})||[]},only:function(R){if(!D(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return Nt.Activity=g,Nt.Children=nt,Nt.Component=T,Nt.Fragment=i,Nt.Profiler=s,Nt.PureComponent=E,Nt.StrictMode=a,Nt.Suspense=d,Nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,Nt.__COMPILER_RUNTIME={__proto__:null,c:function(R){return H.H.useMemoCache(R)}},Nt.cache=function(R){return function(){return R.apply(null,arguments)}},Nt.cacheSignal=function(){return null},Nt.cloneElement=function(R,J,ct){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var ft=k({},R.props),xt=R.key;if(J!=null)for(mt in J.key!==void 0&&(xt=""+J.key),J)!j.call(J,mt)||mt==="key"||mt==="__self"||mt==="__source"||mt==="ref"&&J.ref===void 0||(ft[mt]=J[mt]);var mt=arguments.length-2;if(mt===1)ft.children=ct;else if(1<mt){for(var Ct=Array(mt),ot=0;ot<mt;ot++)Ct[ot]=arguments[ot+2];ft.children=Ct}return lt(R.type,xt,ft)},Nt.createContext=function(R){return R={$$typeof:c,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:l,_context:R},R},Nt.createElement=function(R,J,ct){var ft,xt={},mt=null;if(J!=null)for(ft in J.key!==void 0&&(mt=""+J.key),J)j.call(J,ft)&&ft!=="key"&&ft!=="__self"&&ft!=="__source"&&(xt[ft]=J[ft]);var Ct=arguments.length-2;if(Ct===1)xt.children=ct;else if(1<Ct){for(var ot=Array(Ct),bt=0;bt<Ct;bt++)ot[bt]=arguments[bt+2];xt.children=ot}if(R&&R.defaultProps)for(ft in Ct=R.defaultProps,Ct)xt[ft]===void 0&&(xt[ft]=Ct[ft]);return lt(R,mt,xt)},Nt.createRef=function(){return{current:null}},Nt.forwardRef=function(R){return{$$typeof:h,render:R}},Nt.isValidElement=D,Nt.lazy=function(R){return{$$typeof:p,_payload:{_status:-1,_result:R},_init:U}},Nt.memo=function(R,J){return{$$typeof:f,type:R,compare:J===void 0?null:J}},Nt.startTransition=function(R){var J=H.T,ct={};H.T=ct;try{var ft=R(),xt=H.S;xt!==null&&xt(ct,ft),typeof ft=="object"&&ft!==null&&typeof ft.then=="function"&&ft.then(N,it)}catch(mt){it(mt)}finally{J!==null&&ct.types!==null&&(J.types=ct.types),H.T=J}},Nt.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},Nt.use=function(R){return H.H.use(R)},Nt.useActionState=function(R,J,ct){return H.H.useActionState(R,J,ct)},Nt.useCallback=function(R,J){return H.H.useCallback(R,J)},Nt.useContext=function(R){return H.H.useContext(R)},Nt.useDebugValue=function(){},Nt.useDeferredValue=function(R,J){return H.H.useDeferredValue(R,J)},Nt.useEffect=function(R,J){return H.H.useEffect(R,J)},Nt.useEffectEvent=function(R){return H.H.useEffectEvent(R)},Nt.useId=function(){return H.H.useId()},Nt.useImperativeHandle=function(R,J,ct){return H.H.useImperativeHandle(R,J,ct)},Nt.useInsertionEffect=function(R,J){return H.H.useInsertionEffect(R,J)},Nt.useLayoutEffect=function(R,J){return H.H.useLayoutEffect(R,J)},Nt.useMemo=function(R,J){return H.H.useMemo(R,J)},Nt.useOptimistic=function(R,J){return H.H.useOptimistic(R,J)},Nt.useReducer=function(R,J,ct){return H.H.useReducer(R,J,ct)},Nt.useRef=function(R){return H.H.useRef(R)},Nt.useState=function(R){return H.H.useState(R)},Nt.useSyncExternalStore=function(R,J,ct){return H.H.useSyncExternalStore(R,J,ct)},Nt.useTransition=function(){return H.H.useTransition()},Nt.version="19.2.6",Nt}var zC;function Am(){return zC||(zC=1,Yp.exports=KL()),Yp.exports}var I=Am();const JL=Lm(I);var Gp={exports:{}},No={},Xp={exports:{}},Vp={};var NC;function tA(){return NC||(NC=1,(function(e){function t(A,$){var U=A.length;A.push($);t:for(;0<U;){var it=U-1>>>1,nt=A[it];if(0<s(nt,$))A[it]=$,A[U]=nt,U=it;else break t}}function i(A){return A.length===0?null:A[0]}function a(A){if(A.length===0)return null;var $=A[0],U=A.pop();if(U!==$){A[0]=U;t:for(var it=0,nt=A.length,R=nt>>>1;it<R;){var J=2*(it+1)-1,ct=A[J],ft=J+1,xt=A[ft];if(0>s(ct,U))ft<nt&&0>s(xt,ct)?(A[it]=xt,A[ft]=U,it=ft):(A[it]=ct,A[J]=U,it=J);else if(ft<nt&&0>s(xt,U))A[it]=xt,A[ft]=U,it=ft;else break t}}return $}function s(A,$){var U=A.sortIndex-$.sortIndex;return U!==0?U:A.id-$.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,h=c.now();e.unstable_now=function(){return c.now()-h}}var d=[],f=[],p=1,g=null,x=3,y=!1,C=!1,k=!1,S=!1,T=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function M(A){for(var $=i(f);$!==null;){if($.callback===null)a(f);else if($.startTime<=A)a(f),$.sortIndex=$.expirationTime,t(d,$);else break;$=i(f)}}function O(A){if(k=!1,M(A),!C)if(i(d)!==null)C=!0,N||(N=!0,Z());else{var $=i(f);$!==null&&P(O,$.startTime-A)}}var N=!1,H=-1,j=5,lt=-1;function G(){return S?!0:!(e.unstable_now()-lt<j)}function D(){if(S=!1,N){var A=e.unstable_now();lt=A;var $=!0;try{t:{C=!1,k&&(k=!1,_(H),H=-1),y=!0;var U=x;try{e:{for(M(A),g=i(d);g!==null&&!(g.expirationTime>A&&G());){var it=g.callback;if(typeof it=="function"){g.callback=null,x=g.priorityLevel;var nt=it(g.expirationTime<=A);if(A=e.unstable_now(),typeof nt=="function"){g.callback=nt,M(A),$=!0;break e}g===i(d)&&a(d),M(A)}else a(d);g=i(d)}if(g!==null)$=!0;else{var R=i(f);R!==null&&P(O,R.startTime-A),$=!1}}break t}finally{g=null,x=U,y=!1}$=void 0}}finally{$?Z():N=!1}}}var Z;if(typeof E=="function")Z=function(){E(D)};else if(typeof MessageChannel<"u"){var tt=new MessageChannel,W=tt.port2;tt.port1.onmessage=D,Z=function(){W.postMessage(null)}}else Z=function(){T(D,0)};function P(A,$){H=T(function(){A(e.unstable_now())},$)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(A){A.callback=null},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(A){switch(x){case 1:case 2:case 3:var $=3;break;default:$=x}var U=x;x=$;try{return A()}finally{x=U}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(A,$){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var U=x;x=A;try{return $()}finally{x=U}},e.unstable_scheduleCallback=function(A,$,U){var it=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?it+U:it):U=it,A){case 1:var nt=-1;break;case 2:nt=250;break;case 5:nt=1073741823;break;case 4:nt=1e4;break;default:nt=5e3}return nt=U+nt,A={id:p++,callback:$,priorityLevel:A,startTime:U,expirationTime:nt,sortIndex:-1},U>it?(A.sortIndex=U,t(f,A),i(d)===null&&A===i(f)&&(k?(_(H),H=-1):k=!0,P(O,U-it))):(A.sortIndex=nt,t(d,A),C||y||(C=!0,N||(N=!0,Z()))),A},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(A){var $=x;return function(){var U=x;x=$;try{return A.apply(this,arguments)}finally{x=U}}}})(Vp)),Vp}var qC;function eA(){return qC||(qC=1,Xp.exports=tA()),Xp.exports}var Zp={exports:{}},si={};var IC;function iA(){if(IC)return si;IC=1;var e=Am();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var a={d:{f:i,r:function(){throw Error(t(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(d,f,p){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:d,containerInfo:f,implementation:p}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return si.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,si.createPortal=function(d,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return l(d,f,null,p)},si.flushSync=function(d){var f=c.T,p=a.p;try{if(c.T=null,a.p=2,d)return d()}finally{c.T=f,a.p=p,a.d.f()}},si.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,a.d.C(d,f))},si.prefetchDNS=function(d){typeof d=="string"&&a.d.D(d)},si.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var p=f.as,g=h(p,f.crossOrigin),x=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?a.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:g,integrity:x,fetchPriority:y}):p==="script"&&a.d.X(d,{crossOrigin:g,integrity:x,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},si.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=h(f.as,f.crossOrigin);a.d.M(d,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&a.d.M(d)},si.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,g=h(p,f.crossOrigin);a.d.L(d,p,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},si.preloadModule=function(d,f){if(typeof d=="string")if(f){var p=h(f.as,f.crossOrigin);a.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else a.d.m(d)},si.requestFormReset=function(d){a.d.r(d)},si.unstable_batchedUpdates=function(d,f){return d(f)},si.useFormState=function(d,f,p){return c.H.useFormState(d,f,p)},si.useFormStatus=function(){return c.H.useHostTransitionStatus()},si.version="19.2.6",si}var HC;function rA(){if(HC)return Zp.exports;HC=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Zp.exports=iA(),Zp.exports}var UC;function aA(){if(UC)return No;UC=1;var e=eA(),t=Am(),i=rA();function a(r){var n="https://react.dev/errors/"+r;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+r+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var n=r,o=r;if(r.alternate)for(;n.return;)n=n.return;else{r=n;do n=r,(n.flags&4098)!==0&&(o=n.return),r=n.return;while(r)}return n.tag===3?o:null}function c(r){if(r.tag===13){var n=r.memoizedState;if(n===null&&(r=r.alternate,r!==null&&(n=r.memoizedState)),n!==null)return n.dehydrated}return null}function h(r){if(r.tag===31){var n=r.memoizedState;if(n===null&&(r=r.alternate,r!==null&&(n=r.memoizedState)),n!==null)return n.dehydrated}return null}function d(r){if(l(r)!==r)throw Error(a(188))}function f(r){var n=r.alternate;if(!n){if(n=l(r),n===null)throw Error(a(188));return n!==r?null:r}for(var o=r,u=n;;){var m=o.return;if(m===null)break;var b=m.alternate;if(b===null){if(u=m.return,u!==null){o=u;continue}break}if(m.child===b.child){for(b=m.child;b;){if(b===o)return d(m),r;if(b===u)return d(m),n;b=b.sibling}throw Error(a(188))}if(o.return!==u.return)o=m,u=b;else{for(var w=!1,L=m.child;L;){if(L===o){w=!0,o=m,u=b;break}if(L===u){w=!0,u=m,o=b;break}L=L.sibling}if(!w){for(L=b.child;L;){if(L===o){w=!0,o=b,u=m;break}if(L===u){w=!0,u=b,o=m;break}L=L.sibling}if(!w)throw Error(a(189))}}if(o.alternate!==u)throw Error(a(190))}if(o.tag!==3)throw Error(a(188));return o.stateNode.current===o?r:n}function p(r){var n=r.tag;if(n===5||n===26||n===27||n===6)return r;for(r=r.child;r!==null;){if(n=p(r),n!==null)return n;r=r.sibling}return null}var g=Object.assign,x=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),E=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),lt=Symbol.for("react.activity"),G=Symbol.for("react.memo_cache_sentinel"),D=Symbol.iterator;function Z(r){return r===null||typeof r!="object"?null:(r=D&&r[D]||r["@@iterator"],typeof r=="function"?r:null)}var tt=Symbol.for("react.client.reference");function W(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===tt?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case k:return"Fragment";case T:return"Profiler";case S:return"StrictMode";case O:return"Suspense";case N:return"SuspenseList";case lt:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case C:return"Portal";case E:return r.displayName||"Context";case _:return(r._context.displayName||"Context")+".Consumer";case M:var n=r.render;return r=r.displayName,r||(r=n.displayName||n.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case H:return n=r.displayName||null,n!==null?n:W(r.type)||"Memo";case j:n=r._payload,r=r._init;try{return W(r(n))}catch{}}return null}var P=Array.isArray,A=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U={pending:!1,data:null,method:null,action:null},it=[],nt=-1;function R(r){return{current:r}}function J(r){0>nt||(r.current=it[nt],it[nt]=null,nt--)}function ct(r,n){nt++,it[nt]=r.current,r.current=n}var ft=R(null),xt=R(null),mt=R(null),Ct=R(null);function ot(r,n){switch(ct(mt,n),ct(xt,r),ct(ft,null),n.nodeType){case 9:case 11:r=(r=n.documentElement)&&(r=r.namespaceURI)?rC(r):0;break;default:if(r=n.tagName,n=n.namespaceURI)n=rC(n),r=aC(n,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}J(ft),ct(ft,r)}function bt(){J(ft),J(xt),J(mt)}function Ot(r){r.memoizedState!==null&&ct(Ct,r);var n=ft.current,o=aC(n,r.type);n!==o&&(ct(xt,r),ct(ft,o))}function jt(r){xt.current===r&&(J(ft),J(xt)),Ct.current===r&&(J(Ct),Oo._currentValue=U)}var pe,Re;function Oe(r){if(pe===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);pe=n&&n[1]||"",Re=-1<o.stack.indexOf(`
3
+ at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
4
+ `+pe+r+Re}var Di=!1;function ki(r,n){if(!r||Di)return"";Di=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(n){var pt=function(){throw Error()};if(Object.defineProperty(pt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(pt,[])}catch(st){var et=st}Reflect.construct(r,[],pt)}else{try{pt.call()}catch(st){et=st}r.call(pt.prototype)}}else{try{throw Error()}catch(st){et=st}(pt=r())&&typeof pt.catch=="function"&&pt.catch(function(){})}}catch(st){if(st&&et&&typeof st.stack=="string")return[st.stack,et.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=u.DetermineComponentFrameRoot(),w=b[0],L=b[1];if(w&&L){var q=w.split(`
5
+ `),K=L.split(`
6
+ `);for(m=u=0;u<q.length&&!q[u].includes("DetermineComponentFrameRoot");)u++;for(;m<K.length&&!K[m].includes("DetermineComponentFrameRoot");)m++;if(u===q.length||m===K.length)for(u=q.length-1,m=K.length-1;1<=u&&0<=m&&q[u]!==K[m];)m--;for(;1<=u&&0<=m;u--,m--)if(q[u]!==K[m]){if(u!==1||m!==1)do if(u--,m--,0>m||q[u]!==K[m]){var ht=`
7
+ `+q[u].replace(" at new "," at ");return r.displayName&&ht.includes("<anonymous>")&&(ht=ht.replace("<anonymous>",r.displayName)),ht}while(1<=u&&0<=m);break}}}finally{Di=!1,Error.prepareStackTrace=o}return(o=r?r.displayName||r.name:"")?Oe(o):""}function Gr(r,n){switch(r.tag){case 26:case 27:case 5:return Oe(r.type);case 16:return Oe("Lazy");case 13:return r.child!==n&&n!==null?Oe("Suspense Fallback"):Oe("Suspense");case 19:return Oe("SuspenseList");case 0:case 15:return ki(r.type,!1);case 11:return ki(r.type.render,!1);case 1:return ki(r.type,!0);case 31:return Oe("Activity");default:return""}}function di(r){try{var n="",o=null;do n+=Gr(r,o),o=r,r=r.return;while(r);return n}catch(u){return`
8
+ Error generating stack: `+u.message+`
9
+ `+u.stack}}var Cn=Object.prototype.hasOwnProperty,kn=e.unstable_scheduleCallback,Lr=e.unstable_cancelCallback,os=e.unstable_shouldYield,cs=e.unstable_requestPaint,ri=e.unstable_now,Nc=e.unstable_getCurrentPriorityLevel,jl=e.unstable_ImmediatePriority,hs=e.unstable_UserBlockingPriority,Ar=e.unstable_NormalPriority,_a=e.unstable_LowPriority,$i=e.unstable_IdlePriority,Pl=e.log,qc=e.unstable_setDisableYieldValue,Ba=null,Xe=null;function cr(r){if(typeof Pl=="function"&&qc(r),Xe&&typeof Xe.setStrictMode=="function")try{Xe.setStrictMode(Ba,r)}catch{}}var We=Math.clz32?Math.clz32:Ea,us=Math.log,Xi=Math.LN2;function Ea(r){return r>>>=0,r===0?32:31-(us(r)/Xi|0)|0}var La=256,Aa=262144,ds=4194304;function hr(r){var n=r&42;if(n!==0)return n;switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Ma(r,n,o){var u=r.pendingLanes;if(u===0)return 0;var m=0,b=r.suspendedLanes,w=r.pingedLanes;r=r.warmLanes;var L=u&134217727;return L!==0?(u=L&~b,u!==0?m=hr(u):(w&=L,w!==0?m=hr(w):o||(o=L&~r,o!==0&&(m=hr(o))))):(L=u&~b,L!==0?m=hr(L):w!==0?m=hr(w):o||(o=u&~r,o!==0&&(m=hr(o)))),m===0?0:n!==0&&n!==m&&(n&b)===0&&(b=m&-m,o=n&-n,b>=o||b===32&&(o&4194048)!==0)?n:m}function vn(r,n){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&n)===0}function Sn(r,n){switch(r){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ic(){var r=ds;return ds<<=1,(ds&62914560)===0&&(ds=4194304),r}function Wl(r){for(var n=[],o=0;31>o;o++)n.push(r);return n}function ge(r,n){r.pendingLanes|=n,n!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Ra(r,n,o,u,m,b){var w=r.pendingLanes;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=o,r.entangledLanes&=o,r.errorRecoveryDisabledLanes&=o,r.shellSuspendCounter=0;var L=r.entanglements,q=r.expirationTimes,K=r.hiddenUpdates;for(o=w&~o;0<o;){var ht=31-We(o),pt=1<<ht;L[ht]=0,q[ht]=-1;var et=K[ht];if(et!==null)for(K[ht]=null,ht=0;ht<et.length;ht++){var st=et[ht];st!==null&&(st.lane&=-536870913)}o&=~pt}u!==0&&Hc(r,u,0),b!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=b&~(w&~n))}function Hc(r,n,o){r.pendingLanes|=n,r.suspendedLanes&=~n;var u=31-We(n);r.entangledLanes|=n,r.entanglements[u]=r.entanglements[u]|1073741824|o&261930}function Yl(r,n){var o=r.entangledLanes|=n;for(r=r.entanglements;o;){var u=31-We(o),m=1<<u;m&n|r[u]&n&&(r[u]|=n),o&=~m}}function fs(r,n){var o=n&-n;return o=(o&42)!==0?1:ps(o),(o&(r.suspendedLanes|n))!==0?0:o}function ps(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function gs(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Uc(){var r=$.p;return r!==0?r:(r=window.event,r===void 0?32:BC(r.type))}function vi(r,n){var o=$.p;try{return $.p=r,n()}finally{$.p=o}}var ai=Math.random().toString(36).slice(2),Fe="__reactFiber$"+ai,Ve="__reactProps$"+ai,Xr="__reactContainer$"+ai,Oa="__reactEvents$"+ai,Gl="__reactListeners$"+ai,ms="__reactHandles$"+ai,Vi="__reactResources$"+ai,Fa="__reactMarker$"+ai;function ys(r){delete r[Fe],delete r[Ve],delete r[Oa],delete r[Gl],delete r[ms]}function Da(r){var n=r[Fe];if(n)return n;for(var o=r.parentNode;o;){if(n=o[Xr]||o[Fe]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(r=uC(r);r!==null;){if(o=r[Fe])return o;r=uC(r)}return n}r=o,o=r.parentNode}return null}function Vr(r){if(r=r[Fe]||r[Xr]){var n=r.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return r}return null}function $a(r){var n=r.tag;if(n===5||n===26||n===27||n===6)return r.stateNode;throw Error(a(33))}function Mr(r){var n=r[Vi];return n||(n=r[Vi]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Se(r){r[Fa]=!0}var wt=new Set,F={};function ut(r,n){yt(r,n),yt(r+"Capture",n)}function yt(r,n){for(F[r]=n,r=0;r<n.length;r++)wt.add(n[r])}var re=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Kt={},ye={};function Si(r){return Cn.call(ye,r)?!0:Cn.call(Kt,r)?!1:re.test(r)?ye[r]=!0:(Kt[r]=!0,!1)}function fi(r,n,o){if(Si(n))if(o===null)r.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":r.removeAttribute(n);return;case"boolean":var u=n.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){r.removeAttribute(n);return}}r.setAttribute(n,""+o)}}function ni(r,n,o){if(o===null)r.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(n);return}r.setAttribute(n,""+o)}}function zi(r,n,o,u){if(u===null)r.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(o);return}r.setAttributeNS(n,o,""+u)}}function ae(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Xl(r){var n=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function jc(r,n,o){var u=Object.getOwnPropertyDescriptor(r.constructor.prototype,n);if(!r.hasOwnProperty(n)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var m=u.get,b=u.set;return Object.defineProperty(r,n,{configurable:!0,get:function(){return m.call(this)},set:function(w){o=""+w,b.call(this,w)}}),Object.defineProperty(r,n,{enumerable:u.enumerable}),{getValue:function(){return o},setValue:function(w){o=""+w},stopTracking:function(){r._valueTracker=null,delete r[n]}}}}function zd(r){if(!r._valueTracker){var n=Xl(r)?"checked":"value";r._valueTracker=jc(r,n,""+r[n])}}function Zy(r){if(!r)return!1;var n=r._valueTracker;if(!n)return!0;var o=n.getValue(),u="";return r&&(u=Xl(r)?r.checked?"true":"false":r.value),r=u,r!==o?(n.setValue(r),!0):!1}function Pc(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var PB=/[\n"\\]/g;function Zi(r){return r.replace(PB,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Nd(r,n,o,u,m,b,w,L){r.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?r.type=w:r.removeAttribute("type"),n!=null?w==="number"?(n===0&&r.value===""||r.value!=n)&&(r.value=""+ae(n)):r.value!==""+ae(n)&&(r.value=""+ae(n)):w!=="submit"&&w!=="reset"||r.removeAttribute("value"),n!=null?qd(r,w,ae(n)):o!=null?qd(r,w,ae(o)):u!=null&&r.removeAttribute("value"),m==null&&b!=null&&(r.defaultChecked=!!b),m!=null&&(r.checked=m&&typeof m!="function"&&typeof m!="symbol"),L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?r.name=""+ae(L):r.removeAttribute("name")}function Qy(r,n,o,u,m,b,w,L){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(r.type=b),n!=null||o!=null){if(!(b!=="submit"&&b!=="reset"||n!=null)){zd(r);return}o=o!=null?""+ae(o):"",n=n!=null?""+ae(n):o,L||n===r.value||(r.value=n),r.defaultValue=n}u=u??m,u=typeof u!="function"&&typeof u!="symbol"&&!!u,r.checked=L?r.checked:!!u,r.defaultChecked=!!u,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(r.name=w),zd(r)}function qd(r,n,o){n==="number"&&Pc(r.ownerDocument)===r||r.defaultValue===""+o||(r.defaultValue=""+o)}function xs(r,n,o,u){if(r=r.options,n){n={};for(var m=0;m<o.length;m++)n["$"+o[m]]=!0;for(o=0;o<r.length;o++)m=n.hasOwnProperty("$"+r[o].value),r[o].selected!==m&&(r[o].selected=m),m&&u&&(r[o].defaultSelected=!0)}else{for(o=""+ae(o),n=null,m=0;m<r.length;m++){if(r[m].value===o){r[m].selected=!0,u&&(r[m].defaultSelected=!0);return}n!==null||r[m].disabled||(n=r[m])}n!==null&&(n.selected=!0)}}function Ky(r,n,o){if(n!=null&&(n=""+ae(n),n!==r.value&&(r.value=n),o==null)){r.defaultValue!==n&&(r.defaultValue=n);return}r.defaultValue=o!=null?""+ae(o):""}function Jy(r,n,o,u){if(n==null){if(u!=null){if(o!=null)throw Error(a(92));if(P(u)){if(1<u.length)throw Error(a(93));u=u[0]}o=u}o==null&&(o=""),n=o}o=ae(n),r.defaultValue=o,u=r.textContent,u===o&&u!==""&&u!==null&&(r.value=u),zd(r)}function bs(r,n){if(n){var o=r.firstChild;if(o&&o===r.lastChild&&o.nodeType===3){o.nodeValue=n;return}}r.textContent=n}var WB=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function t0(r,n,o){var u=n.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?u?r.setProperty(n,""):n==="float"?r.cssFloat="":r[n]="":u?r.setProperty(n,o):typeof o!="number"||o===0||WB.has(n)?n==="float"?r.cssFloat=o:r[n]=(""+o).trim():r[n]=o+"px"}function e0(r,n,o){if(n!=null&&typeof n!="object")throw Error(a(62));if(r=r.style,o!=null){for(var u in o)!o.hasOwnProperty(u)||n!=null&&n.hasOwnProperty(u)||(u.indexOf("--")===0?r.setProperty(u,""):u==="float"?r.cssFloat="":r[u]="");for(var m in n)u=n[m],n.hasOwnProperty(m)&&o[m]!==u&&t0(r,m,u)}else for(var b in n)n.hasOwnProperty(b)&&t0(r,b,n[b])}function Id(r){if(r.indexOf("-")===-1)return!1;switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var YB=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),GB=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Wc(r){return GB.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Zr(){}var Hd=null;function Ud(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Cs=null,ks=null;function i0(r){var n=Vr(r);if(n&&(r=n.stateNode)){var o=r[Ve]||null;t:switch(r=n.stateNode,n.type){case"input":if(Nd(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),n=o.name,o.type==="radio"&&n!=null){for(o=r;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Zi(""+n)+'"][type="radio"]'),n=0;n<o.length;n++){var u=o[n];if(u!==r&&u.form===r.form){var m=u[Ve]||null;if(!m)throw Error(a(90));Nd(u,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(n=0;n<o.length;n++)u=o[n],u.form===r.form&&Zy(u)}break t;case"textarea":Ky(r,o.value,o.defaultValue);break t;case"select":n=o.value,n!=null&&xs(r,!!o.multiple,n,!1)}}}var jd=!1;function r0(r,n,o){if(jd)return r(n,o);jd=!0;try{var u=r(n);return u}finally{if(jd=!1,(Cs!==null||ks!==null)&&(Rh(),Cs&&(n=Cs,r=ks,ks=Cs=null,i0(n),r)))for(n=0;n<r.length;n++)i0(r[n])}}function Vl(r,n){var o=r.stateNode;if(o===null)return null;var u=o[Ve]||null;if(u===null)return null;o=u[n];t:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(r=r.type,u=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!u;break t;default:r=!1}if(r)return null;if(o&&typeof o!="function")throw Error(a(231,n,typeof o));return o}var Qr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pd=!1;if(Qr)try{var Zl={};Object.defineProperty(Zl,"passive",{get:function(){Pd=!0}}),window.addEventListener("test",Zl,Zl),window.removeEventListener("test",Zl,Zl)}catch{Pd=!1}var za=null,Wd=null,Yc=null;function a0(){if(Yc)return Yc;var r,n=Wd,o=n.length,u,m="value"in za?za.value:za.textContent,b=m.length;for(r=0;r<o&&n[r]===m[r];r++);var w=o-r;for(u=1;u<=w&&n[o-u]===m[b-u];u++);return Yc=m.slice(r,1<u?1-u:void 0)}function Gc(r){var n=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&n===13&&(r=13)):r=n,r===10&&(r=13),32<=r||r===13?r:0}function Xc(){return!0}function n0(){return!1}function Ti(r){function n(o,u,m,b,w){this._reactName=o,this._targetInst=m,this.type=u,this.nativeEvent=b,this.target=w,this.currentTarget=null;for(var L in r)r.hasOwnProperty(L)&&(o=r[L],this[L]=o?o(b):b[L]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Xc:n0,this.isPropagationStopped=n0,this}return g(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Xc)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Xc)},persist:function(){},isPersistent:Xc}),n}var Tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vc=Ti(Tn),Ql=g({},Tn,{view:0,detail:0}),XB=Ti(Ql),Yd,Gd,Kl,Zc=g({},Ql,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vd,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Kl&&(Kl&&r.type==="mousemove"?(Yd=r.screenX-Kl.screenX,Gd=r.screenY-Kl.screenY):Gd=Yd=0,Kl=r),Yd)},movementY:function(r){return"movementY"in r?r.movementY:Gd}}),s0=Ti(Zc),VB=g({},Zc,{dataTransfer:0}),ZB=Ti(VB),QB=g({},Ql,{relatedTarget:0}),Xd=Ti(QB),KB=g({},Tn,{animationName:0,elapsedTime:0,pseudoElement:0}),JB=Ti(KB),tE=g({},Tn,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),eE=Ti(tE),iE=g({},Tn,{data:0}),l0=Ti(iE),rE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},aE={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},nE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sE(r){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(r):(r=nE[r])?!!n[r]:!1}function Vd(){return sE}var lE=g({},Ql,{key:function(r){if(r.key){var n=rE[r.key]||r.key;if(n!=="Unidentified")return n}return r.type==="keypress"?(r=Gc(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?aE[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vd,charCode:function(r){return r.type==="keypress"?Gc(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Gc(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),oE=Ti(lE),cE=g({},Zc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),o0=Ti(cE),hE=g({},Ql,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vd}),uE=Ti(hE),dE=g({},Tn,{propertyName:0,elapsedTime:0,pseudoElement:0}),fE=Ti(dE),pE=g({},Zc,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),gE=Ti(pE),mE=g({},Tn,{newState:0,oldState:0}),yE=Ti(mE),xE=[9,13,27,32],Zd=Qr&&"CompositionEvent"in window,Jl=null;Qr&&"documentMode"in document&&(Jl=document.documentMode);var bE=Qr&&"TextEvent"in window&&!Jl,c0=Qr&&(!Zd||Jl&&8<Jl&&11>=Jl),h0=" ",u0=!1;function d0(r,n){switch(r){case"keyup":return xE.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function f0(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var vs=!1;function CE(r,n){switch(r){case"compositionend":return f0(n);case"keypress":return n.which!==32?null:(u0=!0,h0);case"textInput":return r=n.data,r===h0&&u0?null:r;default:return null}}function kE(r,n){if(vs)return r==="compositionend"||!Zd&&d0(r,n)?(r=a0(),Yc=Wd=za=null,vs=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return c0&&n.locale!=="ko"?null:n.data;default:return null}}var vE={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function p0(r){var n=r&&r.nodeName&&r.nodeName.toLowerCase();return n==="input"?!!vE[r.type]:n==="textarea"}function g0(r,n,o,u){Cs?ks?ks.push(u):ks=[u]:Cs=u,n=qh(n,"onChange"),0<n.length&&(o=new Vc("onChange","change",null,o,u),r.push({event:o,listeners:n}))}var to=null,eo=null;function SE(r){Qb(r,0)}function Qc(r){var n=$a(r);if(Zy(n))return r}function m0(r,n){if(r==="change")return n}var y0=!1;if(Qr){var Qd;if(Qr){var Kd="oninput"in document;if(!Kd){var x0=document.createElement("div");x0.setAttribute("oninput","return;"),Kd=typeof x0.oninput=="function"}Qd=Kd}else Qd=!1;y0=Qd&&(!document.documentMode||9<document.documentMode)}function b0(){to&&(to.detachEvent("onpropertychange",C0),eo=to=null)}function C0(r){if(r.propertyName==="value"&&Qc(eo)){var n=[];g0(n,eo,r,Ud(r)),r0(SE,n)}}function TE(r,n,o){r==="focusin"?(b0(),to=n,eo=o,to.attachEvent("onpropertychange",C0)):r==="focusout"&&b0()}function wE(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Qc(eo)}function _E(r,n){if(r==="click")return Qc(n)}function BE(r,n){if(r==="input"||r==="change")return Qc(n)}function EE(r,n){return r===n&&(r!==0||1/r===1/n)||r!==r&&n!==n}var Ni=typeof Object.is=="function"?Object.is:EE;function io(r,n){if(Ni(r,n))return!0;if(typeof r!="object"||r===null||typeof n!="object"||n===null)return!1;var o=Object.keys(r),u=Object.keys(n);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var m=o[u];if(!Cn.call(n,m)||!Ni(r[m],n[m]))return!1}return!0}function k0(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function v0(r,n){var o=k0(r);r=0;for(var u;o;){if(o.nodeType===3){if(u=r+o.textContent.length,r<=n&&u>=n)return{node:o,offset:n-r};r=u}t:{for(;o;){if(o.nextSibling){o=o.nextSibling;break t}o=o.parentNode}o=void 0}o=k0(o)}}function S0(r,n){return r&&n?r===n?!0:r&&r.nodeType===3?!1:n&&n.nodeType===3?S0(r,n.parentNode):"contains"in r?r.contains(n):r.compareDocumentPosition?!!(r.compareDocumentPosition(n)&16):!1:!1}function T0(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var n=Pc(r.document);n instanceof r.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)r=n.contentWindow;else break;n=Pc(r.document)}return n}function Jd(r){var n=r&&r.nodeName&&r.nodeName.toLowerCase();return n&&(n==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||n==="textarea"||r.contentEditable==="true")}var LE=Qr&&"documentMode"in document&&11>=document.documentMode,Ss=null,tf=null,ro=null,ef=!1;function w0(r,n,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;ef||Ss==null||Ss!==Pc(u)||(u=Ss,"selectionStart"in u&&Jd(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),ro&&io(ro,u)||(ro=u,u=qh(tf,"onSelect"),0<u.length&&(n=new Vc("onSelect","select",null,n,o),r.push({event:n,listeners:u}),n.target=Ss)))}function wn(r,n){var o={};return o[r.toLowerCase()]=n.toLowerCase(),o["Webkit"+r]="webkit"+n,o["Moz"+r]="moz"+n,o}var Ts={animationend:wn("Animation","AnimationEnd"),animationiteration:wn("Animation","AnimationIteration"),animationstart:wn("Animation","AnimationStart"),transitionrun:wn("Transition","TransitionRun"),transitionstart:wn("Transition","TransitionStart"),transitioncancel:wn("Transition","TransitionCancel"),transitionend:wn("Transition","TransitionEnd")},rf={},_0={};Qr&&(_0=document.createElement("div").style,"AnimationEvent"in window||(delete Ts.animationend.animation,delete Ts.animationiteration.animation,delete Ts.animationstart.animation),"TransitionEvent"in window||delete Ts.transitionend.transition);function _n(r){if(rf[r])return rf[r];if(!Ts[r])return r;var n=Ts[r],o;for(o in n)if(n.hasOwnProperty(o)&&o in _0)return rf[r]=n[o];return r}var B0=_n("animationend"),E0=_n("animationiteration"),L0=_n("animationstart"),AE=_n("transitionrun"),ME=_n("transitionstart"),RE=_n("transitioncancel"),A0=_n("transitionend"),M0=new Map,af="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");af.push("scrollEnd");function ur(r,n){M0.set(r,n),ut(n,[r])}var Kc=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Qi=[],ws=0,nf=0;function Jc(){for(var r=ws,n=nf=ws=0;n<r;){var o=Qi[n];Qi[n++]=null;var u=Qi[n];Qi[n++]=null;var m=Qi[n];Qi[n++]=null;var b=Qi[n];if(Qi[n++]=null,u!==null&&m!==null){var w=u.pending;w===null?m.next=m:(m.next=w.next,w.next=m),u.pending=m}b!==0&&R0(o,m,b)}}function th(r,n,o,u){Qi[ws++]=r,Qi[ws++]=n,Qi[ws++]=o,Qi[ws++]=u,nf|=u,r.lanes|=u,r=r.alternate,r!==null&&(r.lanes|=u)}function sf(r,n,o,u){return th(r,n,o,u),eh(r)}function Bn(r,n){return th(r,null,null,n),eh(r)}function R0(r,n,o){r.lanes|=o;var u=r.alternate;u!==null&&(u.lanes|=o);for(var m=!1,b=r.return;b!==null;)b.childLanes|=o,u=b.alternate,u!==null&&(u.childLanes|=o),b.tag===22&&(r=b.stateNode,r===null||r._visibility&1||(m=!0)),r=b,b=b.return;return r.tag===3?(b=r.stateNode,m&&n!==null&&(m=31-We(o),r=b.hiddenUpdates,u=r[m],u===null?r[m]=[n]:u.push(n),n.lane=o|536870912),b):null}function eh(r){if(50<_o)throw _o=0,gp=null,Error(a(185));for(var n=r.return;n!==null;)r=n,n=r.return;return r.tag===3?r.stateNode:null}var _s={};function OE(r,n,o,u){this.tag=r,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qi(r,n,o,u){return new OE(r,n,o,u)}function lf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Kr(r,n){var o=r.alternate;return o===null?(o=qi(r.tag,n,r.key,r.mode),o.elementType=r.elementType,o.type=r.type,o.stateNode=r.stateNode,o.alternate=r,r.alternate=o):(o.pendingProps=n,o.type=r.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=r.flags&65011712,o.childLanes=r.childLanes,o.lanes=r.lanes,o.child=r.child,o.memoizedProps=r.memoizedProps,o.memoizedState=r.memoizedState,o.updateQueue=r.updateQueue,n=r.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=r.sibling,o.index=r.index,o.ref=r.ref,o.refCleanup=r.refCleanup,o}function O0(r,n){r.flags&=65011714;var o=r.alternate;return o===null?(r.childLanes=0,r.lanes=n,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=o.childLanes,r.lanes=o.lanes,r.child=o.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=o.memoizedProps,r.memoizedState=o.memoizedState,r.updateQueue=o.updateQueue,r.type=o.type,n=o.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),r}function ih(r,n,o,u,m,b){var w=0;if(u=r,typeof r=="function")lf(r)&&(w=1);else if(typeof r=="string")w=NL(r,o,ft.current)?26:r==="html"||r==="head"||r==="body"?27:5;else t:switch(r){case lt:return r=qi(31,o,n,m),r.elementType=lt,r.lanes=b,r;case k:return En(o.children,m,b,n);case S:w=8,m|=24;break;case T:return r=qi(12,o,n,m|2),r.elementType=T,r.lanes=b,r;case O:return r=qi(13,o,n,m),r.elementType=O,r.lanes=b,r;case N:return r=qi(19,o,n,m),r.elementType=N,r.lanes=b,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case E:w=10;break t;case _:w=9;break t;case M:w=11;break t;case H:w=14;break t;case j:w=16,u=null;break t}w=29,o=Error(a(130,r===null?"null":typeof r,"")),u=null}return n=qi(w,o,n,m),n.elementType=r,n.type=u,n.lanes=b,n}function En(r,n,o,u){return r=qi(7,r,u,n),r.lanes=o,r}function of(r,n,o){return r=qi(6,r,null,n),r.lanes=o,r}function F0(r){var n=qi(18,null,null,0);return n.stateNode=r,n}function cf(r,n,o){return n=qi(4,r.children!==null?r.children:[],r.key,n),n.lanes=o,n.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},n}var D0=new WeakMap;function Ki(r,n){if(typeof r=="object"&&r!==null){var o=D0.get(r);return o!==void 0?o:(n={value:r,source:n,stack:di(n)},D0.set(r,n),n)}return{value:r,source:n,stack:di(n)}}var Bs=[],Es=0,rh=null,ao=0,Ji=[],tr=0,Na=null,Rr=1,Or="";function Jr(r,n){Bs[Es++]=ao,Bs[Es++]=rh,rh=r,ao=n}function $0(r,n,o){Ji[tr++]=Rr,Ji[tr++]=Or,Ji[tr++]=Na,Na=r;var u=Rr;r=Or;var m=32-We(u)-1;u&=~(1<<m),o+=1;var b=32-We(n)+m;if(30<b){var w=m-m%5;b=(u&(1<<w)-1).toString(32),u>>=w,m-=w,Rr=1<<32-We(n)+m|o<<m|u,Or=b+r}else Rr=1<<b|o<<m|u,Or=r}function hf(r){r.return!==null&&(Jr(r,1),$0(r,1,0))}function uf(r){for(;r===rh;)rh=Bs[--Es],Bs[Es]=null,ao=Bs[--Es],Bs[Es]=null;for(;r===Na;)Na=Ji[--tr],Ji[tr]=null,Or=Ji[--tr],Ji[tr]=null,Rr=Ji[--tr],Ji[tr]=null}function z0(r,n){Ji[tr++]=Rr,Ji[tr++]=Or,Ji[tr++]=Na,Rr=n.id,Or=n.overflow,Na=r}var Ze=null,xe=null,Xt=!1,qa=null,er=!1,df=Error(a(519));function Ia(r){var n=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw no(Ki(n,r)),df}function N0(r){var n=r.stateNode,o=r.type,u=r.memoizedProps;switch(n[Fe]=r,n[Ve]=u,o){case"dialog":Wt("cancel",n),Wt("close",n);break;case"iframe":case"object":case"embed":Wt("load",n);break;case"video":case"audio":for(o=0;o<Eo.length;o++)Wt(Eo[o],n);break;case"source":Wt("error",n);break;case"img":case"image":case"link":Wt("error",n),Wt("load",n);break;case"details":Wt("toggle",n);break;case"input":Wt("invalid",n),Qy(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Wt("invalid",n);break;case"textarea":Wt("invalid",n),Jy(n,u.value,u.defaultValue,u.children)}o=u.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||n.textContent===""+o||u.suppressHydrationWarning===!0||eC(n.textContent,o)?(u.popover!=null&&(Wt("beforetoggle",n),Wt("toggle",n)),u.onScroll!=null&&Wt("scroll",n),u.onScrollEnd!=null&&Wt("scrollend",n),u.onClick!=null&&(n.onclick=Zr),n=!0):n=!1,n||Ia(r,!0)}function q0(r){for(Ze=r.return;Ze;)switch(Ze.tag){case 5:case 31:case 13:er=!1;return;case 27:case 3:er=!0;return;default:Ze=Ze.return}}function Ls(r){if(r!==Ze)return!1;if(!Xt)return q0(r),Xt=!0,!1;var n=r.tag,o;if((o=n!==3&&n!==27)&&((o=n===5)&&(o=r.type,o=!(o!=="form"&&o!=="button")||Ap(r.type,r.memoizedProps)),o=!o),o&&xe&&Ia(r),q0(r),n===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));xe=hC(r)}else if(n===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));xe=hC(r)}else n===27?(n=xe,tn(r.type)?(r=Dp,Dp=null,xe=r):xe=n):xe=Ze?rr(r.stateNode.nextSibling):null;return!0}function Ln(){xe=Ze=null,Xt=!1}function ff(){var r=qa;return r!==null&&(Ei===null?Ei=r:Ei.push.apply(Ei,r),qa=null),r}function no(r){qa===null?qa=[r]:qa.push(r)}var pf=R(null),An=null,ta=null;function Ha(r,n,o){ct(pf,n._currentValue),n._currentValue=o}function ea(r){r._currentValue=pf.current,J(pf)}function gf(r,n,o){for(;r!==null;){var u=r.alternate;if((r.childLanes&n)!==n?(r.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),r===o)break;r=r.return}}function mf(r,n,o,u){var m=r.child;for(m!==null&&(m.return=r);m!==null;){var b=m.dependencies;if(b!==null){var w=m.child;b=b.firstContext;t:for(;b!==null;){var L=b;b=m;for(var q=0;q<n.length;q++)if(L.context===n[q]){b.lanes|=o,L=b.alternate,L!==null&&(L.lanes|=o),gf(b.return,o,r),u||(w=null);break t}b=L.next}}else if(m.tag===18){if(w=m.return,w===null)throw Error(a(341));w.lanes|=o,b=w.alternate,b!==null&&(b.lanes|=o),gf(w,o,r),w=null}else w=m.child;if(w!==null)w.return=m;else for(w=m;w!==null;){if(w===r){w=null;break}if(m=w.sibling,m!==null){m.return=w.return,w=m;break}w=w.return}m=w}}function As(r,n,o,u){r=null;for(var m=n,b=!1;m!==null;){if(!b){if((m.flags&524288)!==0)b=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var w=m.alternate;if(w===null)throw Error(a(387));if(w=w.memoizedProps,w!==null){var L=m.type;Ni(m.pendingProps.value,w.value)||(r!==null?r.push(L):r=[L])}}else if(m===Ct.current){if(w=m.alternate,w===null)throw Error(a(387));w.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(r!==null?r.push(Oo):r=[Oo])}m=m.return}r!==null&&mf(n,r,o,u),n.flags|=262144}function ah(r){for(r=r.firstContext;r!==null;){if(!Ni(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Mn(r){An=r,ta=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Qe(r){return I0(An,r)}function nh(r,n){return An===null&&Mn(r),I0(r,n)}function I0(r,n){var o=n._currentValue;if(n={context:n,memoizedValue:o,next:null},ta===null){if(r===null)throw Error(a(308));ta=n,r.dependencies={lanes:0,firstContext:n},r.flags|=524288}else ta=ta.next=n;return o}var FE=typeof AbortController<"u"?AbortController:function(){var r=[],n=this.signal={aborted:!1,addEventListener:function(o,u){r.push(u)}};this.abort=function(){n.aborted=!0,r.forEach(function(o){return o()})}},DE=e.unstable_scheduleCallback,$E=e.unstable_NormalPriority,De={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function yf(){return{controller:new FE,data:new Map,refCount:0}}function so(r){r.refCount--,r.refCount===0&&DE($E,function(){r.controller.abort()})}var lo=null,xf=0,Ms=0,Rs=null;function zE(r,n){if(lo===null){var o=lo=[];xf=0,Ms=kp(),Rs={status:"pending",value:void 0,then:function(u){o.push(u)}}}return xf++,n.then(H0,H0),n}function H0(){if(--xf===0&&lo!==null){Rs!==null&&(Rs.status="fulfilled");var r=lo;lo=null,Ms=0,Rs=null;for(var n=0;n<r.length;n++)(0,r[n])()}}function NE(r,n){var o=[],u={status:"pending",value:null,reason:null,then:function(m){o.push(m)}};return r.then(function(){u.status="fulfilled",u.value=n;for(var m=0;m<o.length;m++)(0,o[m])(n)},function(m){for(u.status="rejected",u.reason=m,m=0;m<o.length;m++)(0,o[m])(void 0)}),u}var U0=A.S;A.S=function(r,n){wb=ri(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&zE(r,n),U0!==null&&U0(r,n)};var Rn=R(null);function bf(){var r=Rn.current;return r!==null?r:fe.pooledCache}function sh(r,n){n===null?ct(Rn,Rn.current):ct(Rn,n.pool)}function j0(){var r=bf();return r===null?null:{parent:De._currentValue,pool:r}}var Os=Error(a(460)),Cf=Error(a(474)),lh=Error(a(542)),oh={then:function(){}};function P0(r){return r=r.status,r==="fulfilled"||r==="rejected"}function W0(r,n,o){switch(o=r[o],o===void 0?r.push(n):o!==n&&(n.then(Zr,Zr),n=o),n.status){case"fulfilled":return n.value;case"rejected":throw r=n.reason,G0(r),r;default:if(typeof n.status=="string")n.then(Zr,Zr);else{if(r=fe,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=n,r.status="pending",r.then(function(u){if(n.status==="pending"){var m=n;m.status="fulfilled",m.value=u}},function(u){if(n.status==="pending"){var m=n;m.status="rejected",m.reason=u}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw r=n.reason,G0(r),r}throw Fn=n,Os}}function On(r){try{var n=r._init;return n(r._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Fn=o,Os):o}}var Fn=null;function Y0(){if(Fn===null)throw Error(a(459));var r=Fn;return Fn=null,r}function G0(r){if(r===Os||r===lh)throw Error(a(483))}var Fs=null,oo=0;function ch(r){var n=oo;return oo+=1,Fs===null&&(Fs=[]),W0(Fs,r,n)}function co(r,n){n=n.props.ref,r.ref=n!==void 0?n:null}function hh(r,n){throw n.$$typeof===x?Error(a(525)):(r=Object.prototype.toString.call(n),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":r)))}function X0(r){function n(V,Y){if(r){var Q=V.deletions;Q===null?(V.deletions=[Y],V.flags|=16):Q.push(Y)}}function o(V,Y){if(!r)return null;for(;Y!==null;)n(V,Y),Y=Y.sibling;return null}function u(V){for(var Y=new Map;V!==null;)V.key!==null?Y.set(V.key,V):Y.set(V.index,V),V=V.sibling;return Y}function m(V,Y){return V=Kr(V,Y),V.index=0,V.sibling=null,V}function b(V,Y,Q){return V.index=Q,r?(Q=V.alternate,Q!==null?(Q=Q.index,Q<Y?(V.flags|=67108866,Y):Q):(V.flags|=67108866,Y)):(V.flags|=1048576,Y)}function w(V){return r&&V.alternate===null&&(V.flags|=67108866),V}function L(V,Y,Q,dt){return Y===null||Y.tag!==6?(Y=of(Q,V.mode,dt),Y.return=V,Y):(Y=m(Y,Q),Y.return=V,Y)}function q(V,Y,Q,dt){var At=Q.type;return At===k?ht(V,Y,Q.props.children,dt,Q.key):Y!==null&&(Y.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===j&&On(At)===Y.type)?(Y=m(Y,Q.props),co(Y,Q),Y.return=V,Y):(Y=ih(Q.type,Q.key,Q.props,null,V.mode,dt),co(Y,Q),Y.return=V,Y)}function K(V,Y,Q,dt){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==Q.containerInfo||Y.stateNode.implementation!==Q.implementation?(Y=cf(Q,V.mode,dt),Y.return=V,Y):(Y=m(Y,Q.children||[]),Y.return=V,Y)}function ht(V,Y,Q,dt,At){return Y===null||Y.tag!==7?(Y=En(Q,V.mode,dt,At),Y.return=V,Y):(Y=m(Y,Q),Y.return=V,Y)}function pt(V,Y,Q){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Y=of(""+Y,V.mode,Q),Y.return=V,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case y:return Q=ih(Y.type,Y.key,Y.props,null,V.mode,Q),co(Q,Y),Q.return=V,Q;case C:return Y=cf(Y,V.mode,Q),Y.return=V,Y;case j:return Y=On(Y),pt(V,Y,Q)}if(P(Y)||Z(Y))return Y=En(Y,V.mode,Q,null),Y.return=V,Y;if(typeof Y.then=="function")return pt(V,ch(Y),Q);if(Y.$$typeof===E)return pt(V,nh(V,Y),Q);hh(V,Y)}return null}function et(V,Y,Q,dt){var At=Y!==null?Y.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return At!==null?null:L(V,Y,""+Q,dt);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case y:return Q.key===At?q(V,Y,Q,dt):null;case C:return Q.key===At?K(V,Y,Q,dt):null;case j:return Q=On(Q),et(V,Y,Q,dt)}if(P(Q)||Z(Q))return At!==null?null:ht(V,Y,Q,dt,null);if(typeof Q.then=="function")return et(V,Y,ch(Q),dt);if(Q.$$typeof===E)return et(V,Y,nh(V,Q),dt);hh(V,Q)}return null}function st(V,Y,Q,dt,At){if(typeof dt=="string"&&dt!==""||typeof dt=="number"||typeof dt=="bigint")return V=V.get(Q)||null,L(Y,V,""+dt,At);if(typeof dt=="object"&&dt!==null){switch(dt.$$typeof){case y:return V=V.get(dt.key===null?Q:dt.key)||null,q(Y,V,dt,At);case C:return V=V.get(dt.key===null?Q:dt.key)||null,K(Y,V,dt,At);case j:return dt=On(dt),st(V,Y,Q,dt,At)}if(P(dt)||Z(dt))return V=V.get(Q)||null,ht(Y,V,dt,At,null);if(typeof dt.then=="function")return st(V,Y,Q,ch(dt),At);if(dt.$$typeof===E)return st(V,Y,Q,nh(Y,dt),At);hh(Y,dt)}return null}function vt(V,Y,Q,dt){for(var At=null,Jt=null,Bt=Y,It=Y=0,Gt=null;Bt!==null&&It<Q.length;It++){Bt.index>It?(Gt=Bt,Bt=null):Gt=Bt.sibling;var te=et(V,Bt,Q[It],dt);if(te===null){Bt===null&&(Bt=Gt);break}r&&Bt&&te.alternate===null&&n(V,Bt),Y=b(te,Y,It),Jt===null?At=te:Jt.sibling=te,Jt=te,Bt=Gt}if(It===Q.length)return o(V,Bt),Xt&&Jr(V,It),At;if(Bt===null){for(;It<Q.length;It++)Bt=pt(V,Q[It],dt),Bt!==null&&(Y=b(Bt,Y,It),Jt===null?At=Bt:Jt.sibling=Bt,Jt=Bt);return Xt&&Jr(V,It),At}for(Bt=u(Bt);It<Q.length;It++)Gt=st(Bt,V,It,Q[It],dt),Gt!==null&&(r&&Gt.alternate!==null&&Bt.delete(Gt.key===null?It:Gt.key),Y=b(Gt,Y,It),Jt===null?At=Gt:Jt.sibling=Gt,Jt=Gt);return r&&Bt.forEach(function(sn){return n(V,sn)}),Xt&&Jr(V,It),At}function Rt(V,Y,Q,dt){if(Q==null)throw Error(a(151));for(var At=null,Jt=null,Bt=Y,It=Y=0,Gt=null,te=Q.next();Bt!==null&&!te.done;It++,te=Q.next()){Bt.index>It?(Gt=Bt,Bt=null):Gt=Bt.sibling;var sn=et(V,Bt,te.value,dt);if(sn===null){Bt===null&&(Bt=Gt);break}r&&Bt&&sn.alternate===null&&n(V,Bt),Y=b(sn,Y,It),Jt===null?At=sn:Jt.sibling=sn,Jt=sn,Bt=Gt}if(te.done)return o(V,Bt),Xt&&Jr(V,It),At;if(Bt===null){for(;!te.done;It++,te=Q.next())te=pt(V,te.value,dt),te!==null&&(Y=b(te,Y,It),Jt===null?At=te:Jt.sibling=te,Jt=te);return Xt&&Jr(V,It),At}for(Bt=u(Bt);!te.done;It++,te=Q.next())te=st(Bt,V,It,te.value,dt),te!==null&&(r&&te.alternate!==null&&Bt.delete(te.key===null?It:te.key),Y=b(te,Y,It),Jt===null?At=te:Jt.sibling=te,Jt=te);return r&&Bt.forEach(function(VL){return n(V,VL)}),Xt&&Jr(V,It),At}function de(V,Y,Q,dt){if(typeof Q=="object"&&Q!==null&&Q.type===k&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case y:t:{for(var At=Q.key;Y!==null;){if(Y.key===At){if(At=Q.type,At===k){if(Y.tag===7){o(V,Y.sibling),dt=m(Y,Q.props.children),dt.return=V,V=dt;break t}}else if(Y.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===j&&On(At)===Y.type){o(V,Y.sibling),dt=m(Y,Q.props),co(dt,Q),dt.return=V,V=dt;break t}o(V,Y);break}else n(V,Y);Y=Y.sibling}Q.type===k?(dt=En(Q.props.children,V.mode,dt,Q.key),dt.return=V,V=dt):(dt=ih(Q.type,Q.key,Q.props,null,V.mode,dt),co(dt,Q),dt.return=V,V=dt)}return w(V);case C:t:{for(At=Q.key;Y!==null;){if(Y.key===At)if(Y.tag===4&&Y.stateNode.containerInfo===Q.containerInfo&&Y.stateNode.implementation===Q.implementation){o(V,Y.sibling),dt=m(Y,Q.children||[]),dt.return=V,V=dt;break t}else{o(V,Y);break}else n(V,Y);Y=Y.sibling}dt=cf(Q,V.mode,dt),dt.return=V,V=dt}return w(V);case j:return Q=On(Q),de(V,Y,Q,dt)}if(P(Q))return vt(V,Y,Q,dt);if(Z(Q)){if(At=Z(Q),typeof At!="function")throw Error(a(150));return Q=At.call(Q),Rt(V,Y,Q,dt)}if(typeof Q.then=="function")return de(V,Y,ch(Q),dt);if(Q.$$typeof===E)return de(V,Y,nh(V,Q),dt);hh(V,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,Y!==null&&Y.tag===6?(o(V,Y.sibling),dt=m(Y,Q),dt.return=V,V=dt):(o(V,Y),dt=of(Q,V.mode,dt),dt.return=V,V=dt),w(V)):o(V,Y)}return function(V,Y,Q,dt){try{oo=0;var At=de(V,Y,Q,dt);return Fs=null,At}catch(Bt){if(Bt===Os||Bt===lh)throw Bt;var Jt=qi(29,Bt,null,V.mode);return Jt.lanes=dt,Jt.return=V,Jt}}}var Dn=X0(!0),V0=X0(!1),Ua=!1;function kf(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vf(r,n){r=r.updateQueue,n.updateQueue===r&&(n.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function ja(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function Pa(r,n,o){var u=r.updateQueue;if(u===null)return null;if(u=u.shared,(ne&2)!==0){var m=u.pending;return m===null?n.next=n:(n.next=m.next,m.next=n),u.pending=n,n=eh(r),R0(r,null,o),n}return th(r,u,n,o),eh(r)}function ho(r,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194048)!==0)){var u=n.lanes;u&=r.pendingLanes,o|=u,n.lanes=o,Yl(r,o)}}function Sf(r,n){var o=r.updateQueue,u=r.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var m=null,b=null;if(o=o.firstBaseUpdate,o!==null){do{var w={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};b===null?m=b=w:b=b.next=w,o=o.next}while(o!==null);b===null?m=b=n:b=b.next=n}else m=b=n;o={baseState:u.baseState,firstBaseUpdate:m,lastBaseUpdate:b,shared:u.shared,callbacks:u.callbacks},r.updateQueue=o;return}r=o.lastBaseUpdate,r===null?o.firstBaseUpdate=n:r.next=n,o.lastBaseUpdate=n}var Tf=!1;function uo(){if(Tf){var r=Rs;if(r!==null)throw r}}function fo(r,n,o,u){Tf=!1;var m=r.updateQueue;Ua=!1;var b=m.firstBaseUpdate,w=m.lastBaseUpdate,L=m.shared.pending;if(L!==null){m.shared.pending=null;var q=L,K=q.next;q.next=null,w===null?b=K:w.next=K,w=q;var ht=r.alternate;ht!==null&&(ht=ht.updateQueue,L=ht.lastBaseUpdate,L!==w&&(L===null?ht.firstBaseUpdate=K:L.next=K,ht.lastBaseUpdate=q))}if(b!==null){var pt=m.baseState;w=0,ht=K=q=null,L=b;do{var et=L.lane&-536870913,st=et!==L.lane;if(st?(Yt&et)===et:(u&et)===et){et!==0&&et===Ms&&(Tf=!0),ht!==null&&(ht=ht.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});t:{var vt=r,Rt=L;et=n;var de=o;switch(Rt.tag){case 1:if(vt=Rt.payload,typeof vt=="function"){pt=vt.call(de,pt,et);break t}pt=vt;break t;case 3:vt.flags=vt.flags&-65537|128;case 0:if(vt=Rt.payload,et=typeof vt=="function"?vt.call(de,pt,et):vt,et==null)break t;pt=g({},pt,et);break t;case 2:Ua=!0}}et=L.callback,et!==null&&(r.flags|=64,st&&(r.flags|=8192),st=m.callbacks,st===null?m.callbacks=[et]:st.push(et))}else st={lane:et,tag:L.tag,payload:L.payload,callback:L.callback,next:null},ht===null?(K=ht=st,q=pt):ht=ht.next=st,w|=et;if(L=L.next,L===null){if(L=m.shared.pending,L===null)break;st=L,L=st.next,st.next=null,m.lastBaseUpdate=st,m.shared.pending=null}}while(!0);ht===null&&(q=pt),m.baseState=q,m.firstBaseUpdate=K,m.lastBaseUpdate=ht,b===null&&(m.shared.lanes=0),Va|=w,r.lanes=w,r.memoizedState=pt}}function Z0(r,n){if(typeof r!="function")throw Error(a(191,r));r.call(n)}function Q0(r,n){var o=r.callbacks;if(o!==null)for(r.callbacks=null,r=0;r<o.length;r++)Z0(o[r],n)}var Ds=R(null),uh=R(0);function K0(r,n){r=ha,ct(uh,r),ct(Ds,n),ha=r|n.baseLanes}function wf(){ct(uh,ha),ct(Ds,Ds.current)}function _f(){ha=uh.current,J(Ds),J(uh)}var Ii=R(null),ir=null;function Wa(r){var n=r.alternate;ct(Le,Le.current&1),ct(Ii,r),ir===null&&(n===null||Ds.current!==null||n.memoizedState!==null)&&(ir=r)}function Bf(r){ct(Le,Le.current),ct(Ii,r),ir===null&&(ir=r)}function J0(r){r.tag===22?(ct(Le,Le.current),ct(Ii,r),ir===null&&(ir=r)):Ya()}function Ya(){ct(Le,Le.current),ct(Ii,Ii.current)}function Hi(r){J(Ii),ir===r&&(ir=null),J(Le)}var Le=R(0);function dh(r){for(var n=r;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||Op(o)||Fp(o)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break;for(;n.sibling===null;){if(n.return===null||n.return===r)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var ia=0,qt=null,he=null,$e=null,fh=!1,$s=!1,$n=!1,ph=0,po=0,zs=null,qE=0;function we(){throw Error(a(321))}function Ef(r,n){if(n===null)return!1;for(var o=0;o<n.length&&o<r.length;o++)if(!Ni(r[o],n[o]))return!1;return!0}function Lf(r,n,o,u,m,b){return ia=b,qt=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,A.H=r===null||r.memoizedState===null?$x:Pf,$n=!1,b=o(u,m),$n=!1,$s&&(b=ex(n,o,u,m)),tx(r),b}function tx(r){A.H=yo;var n=he!==null&&he.next!==null;if(ia=0,$e=he=qt=null,fh=!1,po=0,zs=null,n)throw Error(a(300));r===null||ze||(r=r.dependencies,r!==null&&ah(r)&&(ze=!0))}function ex(r,n,o,u){qt=r;var m=0;do{if($s&&(zs=null),po=0,$s=!1,25<=m)throw Error(a(301));if(m+=1,$e=he=null,r.updateQueue!=null){var b=r.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}A.H=zx,b=n(o,u)}while($s);return b}function IE(){var r=A.H,n=r.useState()[0];return n=typeof n.then=="function"?go(n):n,r=r.useState()[0],(he!==null?he.memoizedState:null)!==r&&(qt.flags|=1024),n}function Af(){var r=ph!==0;return ph=0,r}function Mf(r,n,o){n.updateQueue=r.updateQueue,n.flags&=-2053,r.lanes&=~o}function Rf(r){if(fh){for(r=r.memoizedState;r!==null;){var n=r.queue;n!==null&&(n.pending=null),r=r.next}fh=!1}ia=0,$e=he=qt=null,$s=!1,po=ph=0,zs=null}function pi(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $e===null?qt.memoizedState=$e=r:$e=$e.next=r,$e}function Ae(){if(he===null){var r=qt.alternate;r=r!==null?r.memoizedState:null}else r=he.next;var n=$e===null?qt.memoizedState:$e.next;if(n!==null)$e=n,he=r;else{if(r===null)throw qt.alternate===null?Error(a(467)):Error(a(310));he=r,r={memoizedState:he.memoizedState,baseState:he.baseState,baseQueue:he.baseQueue,queue:he.queue,next:null},$e===null?qt.memoizedState=$e=r:$e=$e.next=r}return $e}function gh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function go(r){var n=po;return po+=1,zs===null&&(zs=[]),r=W0(zs,r,n),n=qt,($e===null?n.memoizedState:$e.next)===null&&(n=n.alternate,A.H=n===null||n.memoizedState===null?$x:Pf),r}function mh(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return go(r);if(r.$$typeof===E)return Qe(r)}throw Error(a(438,String(r)))}function Of(r){var n=null,o=qt.updateQueue;if(o!==null&&(n=o.memoCache),n==null){var u=qt.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(m){return m.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),o===null&&(o=gh(),qt.updateQueue=o),o.memoCache=n,o=n.data[n.index],o===void 0)for(o=n.data[n.index]=Array(r),u=0;u<r;u++)o[u]=G;return n.index++,o}function ra(r,n){return typeof n=="function"?n(r):n}function yh(r){var n=Ae();return Ff(n,he,r)}function Ff(r,n,o){var u=r.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=o;var m=r.baseQueue,b=u.pending;if(b!==null){if(m!==null){var w=m.next;m.next=b.next,b.next=w}n.baseQueue=m=b,u.pending=null}if(b=r.baseState,m===null)r.memoizedState=b;else{n=m.next;var L=w=null,q=null,K=n,ht=!1;do{var pt=K.lane&-536870913;if(pt!==K.lane?(Yt&pt)===pt:(ia&pt)===pt){var et=K.revertLane;if(et===0)q!==null&&(q=q.next={lane:0,revertLane:0,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),pt===Ms&&(ht=!0);else if((ia&et)===et){K=K.next,et===Ms&&(ht=!0);continue}else pt={lane:0,revertLane:K.revertLane,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},q===null?(L=q=pt,w=b):q=q.next=pt,qt.lanes|=et,Va|=et;pt=K.action,$n&&o(b,pt),b=K.hasEagerState?K.eagerState:o(b,pt)}else et={lane:pt,revertLane:K.revertLane,gesture:K.gesture,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},q===null?(L=q=et,w=b):q=q.next=et,qt.lanes|=pt,Va|=pt;K=K.next}while(K!==null&&K!==n);if(q===null?w=b:q.next=L,!Ni(b,r.memoizedState)&&(ze=!0,ht&&(o=Rs,o!==null)))throw o;r.memoizedState=b,r.baseState=w,r.baseQueue=q,u.lastRenderedState=b}return m===null&&(u.lanes=0),[r.memoizedState,u.dispatch]}function Df(r){var n=Ae(),o=n.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=r;var u=o.dispatch,m=o.pending,b=n.memoizedState;if(m!==null){o.pending=null;var w=m=m.next;do b=r(b,w.action),w=w.next;while(w!==m);Ni(b,n.memoizedState)||(ze=!0),n.memoizedState=b,n.baseQueue===null&&(n.baseState=b),o.lastRenderedState=b}return[b,u]}function ix(r,n,o){var u=qt,m=Ae(),b=Xt;if(b){if(o===void 0)throw Error(a(407));o=o()}else o=n();var w=!Ni((he||m).memoizedState,o);if(w&&(m.memoizedState=o,ze=!0),m=m.queue,Nf(nx.bind(null,u,m,r),[r]),m.getSnapshot!==n||w||$e!==null&&$e.memoizedState.tag&1){if(u.flags|=2048,Ns(9,{destroy:void 0},ax.bind(null,u,m,o,n),null),fe===null)throw Error(a(349));b||(ia&127)!==0||rx(u,n,o)}return o}function rx(r,n,o){r.flags|=16384,r={getSnapshot:n,value:o},n=qt.updateQueue,n===null?(n=gh(),qt.updateQueue=n,n.stores=[r]):(o=n.stores,o===null?n.stores=[r]:o.push(r))}function ax(r,n,o,u){n.value=o,n.getSnapshot=u,sx(n)&&lx(r)}function nx(r,n,o){return o(function(){sx(n)&&lx(r)})}function sx(r){var n=r.getSnapshot;r=r.value;try{var o=n();return!Ni(r,o)}catch{return!0}}function lx(r){var n=Bn(r,2);n!==null&&Li(n,r,2)}function $f(r){var n=pi();if(typeof r=="function"){var o=r;if(r=o(),$n){cr(!0);try{o()}finally{cr(!1)}}}return n.memoizedState=n.baseState=r,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:r},n}function ox(r,n,o,u){return r.baseState=o,Ff(r,he,typeof u=="function"?u:ra)}function HE(r,n,o,u,m){if(Ch(r))throw Error(a(485));if(r=n.action,r!==null){var b={payload:m,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){b.listeners.push(w)}};A.T!==null?o(!0):b.isTransition=!1,u(b),o=n.pending,o===null?(b.next=n.pending=b,cx(n,b)):(b.next=o.next,n.pending=o.next=b)}}function cx(r,n){var o=n.action,u=n.payload,m=r.state;if(n.isTransition){var b=A.T,w={};A.T=w;try{var L=o(m,u),q=A.S;q!==null&&q(w,L),hx(r,n,L)}catch(K){zf(r,n,K)}finally{b!==null&&w.types!==null&&(b.types=w.types),A.T=b}}else try{b=o(m,u),hx(r,n,b)}catch(K){zf(r,n,K)}}function hx(r,n,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(u){ux(r,n,u)},function(u){return zf(r,n,u)}):ux(r,n,o)}function ux(r,n,o){n.status="fulfilled",n.value=o,dx(n),r.state=o,n=r.pending,n!==null&&(o=n.next,o===n?r.pending=null:(o=o.next,n.next=o,cx(r,o)))}function zf(r,n,o){var u=r.pending;if(r.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=o,dx(n),n=n.next;while(n!==u)}r.action=null}function dx(r){r=r.listeners;for(var n=0;n<r.length;n++)(0,r[n])()}function fx(r,n){return n}function px(r,n){if(Xt){var o=fe.formState;if(o!==null){t:{var u=qt;if(Xt){if(xe){e:{for(var m=xe,b=er;m.nodeType!==8;){if(!b){m=null;break e}if(m=rr(m.nextSibling),m===null){m=null;break e}}b=m.data,m=b==="F!"||b==="F"?m:null}if(m){xe=rr(m.nextSibling),u=m.data==="F!";break t}}Ia(u)}u=!1}u&&(n=o[0])}}return o=pi(),o.memoizedState=o.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fx,lastRenderedState:n},o.queue=u,o=Ox.bind(null,qt,u),u.dispatch=o,u=$f(!1),b=jf.bind(null,qt,!1,u.queue),u=pi(),m={state:n,dispatch:null,action:r,pending:null},u.queue=m,o=HE.bind(null,qt,m,b,o),m.dispatch=o,u.memoizedState=r,[n,o,!1]}function gx(r){var n=Ae();return mx(n,he,r)}function mx(r,n,o){if(n=Ff(r,n,fx)[0],r=yh(ra)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=go(n)}catch(w){throw w===Os?lh:w}else u=n;n=Ae();var m=n.queue,b=m.dispatch;return o!==n.memoizedState&&(qt.flags|=2048,Ns(9,{destroy:void 0},UE.bind(null,m,o),null)),[u,b,r]}function UE(r,n){r.action=n}function yx(r){var n=Ae(),o=he;if(o!==null)return mx(n,o,r);Ae(),n=n.memoizedState,o=Ae();var u=o.queue.dispatch;return o.memoizedState=r,[n,u,!1]}function Ns(r,n,o,u){return r={tag:r,create:o,deps:u,inst:n,next:null},n=qt.updateQueue,n===null&&(n=gh(),qt.updateQueue=n),o=n.lastEffect,o===null?n.lastEffect=r.next=r:(u=o.next,o.next=r,r.next=u,n.lastEffect=r),r}function xx(){return Ae().memoizedState}function xh(r,n,o,u){var m=pi();qt.flags|=r,m.memoizedState=Ns(1|n,{destroy:void 0},o,u===void 0?null:u)}function bh(r,n,o,u){var m=Ae();u=u===void 0?null:u;var b=m.memoizedState.inst;he!==null&&u!==null&&Ef(u,he.memoizedState.deps)?m.memoizedState=Ns(n,b,o,u):(qt.flags|=r,m.memoizedState=Ns(1|n,b,o,u))}function bx(r,n){xh(8390656,8,r,n)}function Nf(r,n){bh(2048,8,r,n)}function jE(r){qt.flags|=4;var n=qt.updateQueue;if(n===null)n=gh(),qt.updateQueue=n,n.events=[r];else{var o=n.events;o===null?n.events=[r]:o.push(r)}}function Cx(r){var n=Ae().memoizedState;return jE({ref:n,nextImpl:r}),function(){if((ne&2)!==0)throw Error(a(440));return n.impl.apply(void 0,arguments)}}function kx(r,n){return bh(4,2,r,n)}function vx(r,n){return bh(4,4,r,n)}function Sx(r,n){if(typeof n=="function"){r=r();var o=n(r);return function(){typeof o=="function"?o():n(null)}}if(n!=null)return r=r(),n.current=r,function(){n.current=null}}function Tx(r,n,o){o=o!=null?o.concat([r]):null,bh(4,4,Sx.bind(null,n,r),o)}function qf(){}function wx(r,n){var o=Ae();n=n===void 0?null:n;var u=o.memoizedState;return n!==null&&Ef(n,u[1])?u[0]:(o.memoizedState=[r,n],r)}function _x(r,n){var o=Ae();n=n===void 0?null:n;var u=o.memoizedState;if(n!==null&&Ef(n,u[1]))return u[0];if(u=r(),$n){cr(!0);try{r()}finally{cr(!1)}}return o.memoizedState=[u,n],u}function If(r,n,o){return o===void 0||(ia&1073741824)!==0&&(Yt&261930)===0?r.memoizedState=n:(r.memoizedState=o,r=Bb(),qt.lanes|=r,Va|=r,o)}function Bx(r,n,o,u){return Ni(o,n)?o:Ds.current!==null?(r=If(r,o,u),Ni(r,n)||(ze=!0),r):(ia&42)===0||(ia&1073741824)!==0&&(Yt&261930)===0?(ze=!0,r.memoizedState=o):(r=Bb(),qt.lanes|=r,Va|=r,n)}function Ex(r,n,o,u,m){var b=$.p;$.p=b!==0&&8>b?b:8;var w=A.T,L={};A.T=L,jf(r,!1,n,o);try{var q=m(),K=A.S;if(K!==null&&K(L,q),q!==null&&typeof q=="object"&&typeof q.then=="function"){var ht=NE(q,u);mo(r,n,ht,Pi(r))}else mo(r,n,u,Pi(r))}catch(pt){mo(r,n,{then:function(){},status:"rejected",reason:pt},Pi())}finally{$.p=b,w!==null&&L.types!==null&&(w.types=L.types),A.T=w}}function PE(){}function Hf(r,n,o,u){if(r.tag!==5)throw Error(a(476));var m=Lx(r).queue;Ex(r,m,n,U,o===null?PE:function(){return Ax(r),o(u)})}function Lx(r){var n=r.memoizedState;if(n!==null)return n;n={memoizedState:U,baseState:U,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:U},next:null};var o={};return n.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:o},next:null},r.memoizedState=n,r=r.alternate,r!==null&&(r.memoizedState=n),n}function Ax(r){var n=Lx(r);n.next===null&&(n=r.alternate.memoizedState),mo(r,n.next.queue,{},Pi())}function Uf(){return Qe(Oo)}function Mx(){return Ae().memoizedState}function Rx(){return Ae().memoizedState}function WE(r){for(var n=r.return;n!==null;){switch(n.tag){case 24:case 3:var o=Pi();r=ja(o);var u=Pa(n,r,o);u!==null&&(Li(u,n,o),ho(u,n,o)),n={cache:yf()},r.payload=n;return}n=n.return}}function YE(r,n,o){var u=Pi();o={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Ch(r)?Fx(n,o):(o=sf(r,n,o,u),o!==null&&(Li(o,r,u),Dx(o,n,u)))}function Ox(r,n,o){var u=Pi();mo(r,n,o,u)}function mo(r,n,o,u){var m={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(Ch(r))Fx(n,m);else{var b=r.alternate;if(r.lanes===0&&(b===null||b.lanes===0)&&(b=n.lastRenderedReducer,b!==null))try{var w=n.lastRenderedState,L=b(w,o);if(m.hasEagerState=!0,m.eagerState=L,Ni(L,w))return th(r,n,m,0),fe===null&&Jc(),!1}catch{}if(o=sf(r,n,m,u),o!==null)return Li(o,r,u),Dx(o,n,u),!0}return!1}function jf(r,n,o,u){if(u={lane:2,revertLane:kp(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Ch(r)){if(n)throw Error(a(479))}else n=sf(r,o,u,2),n!==null&&Li(n,r,2)}function Ch(r){var n=r.alternate;return r===qt||n!==null&&n===qt}function Fx(r,n){$s=fh=!0;var o=r.pending;o===null?n.next=n:(n.next=o.next,o.next=n),r.pending=n}function Dx(r,n,o){if((o&4194048)!==0){var u=n.lanes;u&=r.pendingLanes,o|=u,n.lanes=o,Yl(r,o)}}var yo={readContext:Qe,use:mh,useCallback:we,useContext:we,useEffect:we,useImperativeHandle:we,useLayoutEffect:we,useInsertionEffect:we,useMemo:we,useReducer:we,useRef:we,useState:we,useDebugValue:we,useDeferredValue:we,useTransition:we,useSyncExternalStore:we,useId:we,useHostTransitionStatus:we,useFormState:we,useActionState:we,useOptimistic:we,useMemoCache:we,useCacheRefresh:we};yo.useEffectEvent=we;var $x={readContext:Qe,use:mh,useCallback:function(r,n){return pi().memoizedState=[r,n===void 0?null:n],r},useContext:Qe,useEffect:bx,useImperativeHandle:function(r,n,o){o=o!=null?o.concat([r]):null,xh(4194308,4,Sx.bind(null,n,r),o)},useLayoutEffect:function(r,n){return xh(4194308,4,r,n)},useInsertionEffect:function(r,n){xh(4,2,r,n)},useMemo:function(r,n){var o=pi();n=n===void 0?null:n;var u=r();if($n){cr(!0);try{r()}finally{cr(!1)}}return o.memoizedState=[u,n],u},useReducer:function(r,n,o){var u=pi();if(o!==void 0){var m=o(n);if($n){cr(!0);try{o(n)}finally{cr(!1)}}}else m=n;return u.memoizedState=u.baseState=m,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:m},u.queue=r,r=r.dispatch=YE.bind(null,qt,r),[u.memoizedState,r]},useRef:function(r){var n=pi();return r={current:r},n.memoizedState=r},useState:function(r){r=$f(r);var n=r.queue,o=Ox.bind(null,qt,n);return n.dispatch=o,[r.memoizedState,o]},useDebugValue:qf,useDeferredValue:function(r,n){var o=pi();return If(o,r,n)},useTransition:function(){var r=$f(!1);return r=Ex.bind(null,qt,r.queue,!0,!1),pi().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,n,o){var u=qt,m=pi();if(Xt){if(o===void 0)throw Error(a(407));o=o()}else{if(o=n(),fe===null)throw Error(a(349));(Yt&127)!==0||rx(u,n,o)}m.memoizedState=o;var b={value:o,getSnapshot:n};return m.queue=b,bx(nx.bind(null,u,b,r),[r]),u.flags|=2048,Ns(9,{destroy:void 0},ax.bind(null,u,b,o,n),null),o},useId:function(){var r=pi(),n=fe.identifierPrefix;if(Xt){var o=Or,u=Rr;o=(u&~(1<<32-We(u)-1)).toString(32)+o,n="_"+n+"R_"+o,o=ph++,0<o&&(n+="H"+o.toString(32)),n+="_"}else o=qE++,n="_"+n+"r_"+o.toString(32)+"_";return r.memoizedState=n},useHostTransitionStatus:Uf,useFormState:px,useActionState:px,useOptimistic:function(r){var n=pi();n.memoizedState=n.baseState=r;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=o,n=jf.bind(null,qt,!0,o),o.dispatch=n,[r,n]},useMemoCache:Of,useCacheRefresh:function(){return pi().memoizedState=WE.bind(null,qt)},useEffectEvent:function(r){var n=pi(),o={impl:r};return n.memoizedState=o,function(){if((ne&2)!==0)throw Error(a(440));return o.impl.apply(void 0,arguments)}}},Pf={readContext:Qe,use:mh,useCallback:wx,useContext:Qe,useEffect:Nf,useImperativeHandle:Tx,useInsertionEffect:kx,useLayoutEffect:vx,useMemo:_x,useReducer:yh,useRef:xx,useState:function(){return yh(ra)},useDebugValue:qf,useDeferredValue:function(r,n){var o=Ae();return Bx(o,he.memoizedState,r,n)},useTransition:function(){var r=yh(ra)[0],n=Ae().memoizedState;return[typeof r=="boolean"?r:go(r),n]},useSyncExternalStore:ix,useId:Mx,useHostTransitionStatus:Uf,useFormState:gx,useActionState:gx,useOptimistic:function(r,n){var o=Ae();return ox(o,he,r,n)},useMemoCache:Of,useCacheRefresh:Rx};Pf.useEffectEvent=Cx;var zx={readContext:Qe,use:mh,useCallback:wx,useContext:Qe,useEffect:Nf,useImperativeHandle:Tx,useInsertionEffect:kx,useLayoutEffect:vx,useMemo:_x,useReducer:Df,useRef:xx,useState:function(){return Df(ra)},useDebugValue:qf,useDeferredValue:function(r,n){var o=Ae();return he===null?If(o,r,n):Bx(o,he.memoizedState,r,n)},useTransition:function(){var r=Df(ra)[0],n=Ae().memoizedState;return[typeof r=="boolean"?r:go(r),n]},useSyncExternalStore:ix,useId:Mx,useHostTransitionStatus:Uf,useFormState:yx,useActionState:yx,useOptimistic:function(r,n){var o=Ae();return he!==null?ox(o,he,r,n):(o.baseState=r,[r,o.queue.dispatch])},useMemoCache:Of,useCacheRefresh:Rx};zx.useEffectEvent=Cx;function Wf(r,n,o,u){n=r.memoizedState,o=o(u,n),o=o==null?n:g({},n,o),r.memoizedState=o,r.lanes===0&&(r.updateQueue.baseState=o)}var Yf={enqueueSetState:function(r,n,o){r=r._reactInternals;var u=Pi(),m=ja(u);m.payload=n,o!=null&&(m.callback=o),n=Pa(r,m,u),n!==null&&(Li(n,r,u),ho(n,r,u))},enqueueReplaceState:function(r,n,o){r=r._reactInternals;var u=Pi(),m=ja(u);m.tag=1,m.payload=n,o!=null&&(m.callback=o),n=Pa(r,m,u),n!==null&&(Li(n,r,u),ho(n,r,u))},enqueueForceUpdate:function(r,n){r=r._reactInternals;var o=Pi(),u=ja(o);u.tag=2,n!=null&&(u.callback=n),n=Pa(r,u,o),n!==null&&(Li(n,r,o),ho(n,r,o))}};function Nx(r,n,o,u,m,b,w){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(u,b,w):n.prototype&&n.prototype.isPureReactComponent?!io(o,u)||!io(m,b):!0}function qx(r,n,o,u){r=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,u),n.state!==r&&Yf.enqueueReplaceState(n,n.state,null)}function zn(r,n){var o=n;if("ref"in n){o={};for(var u in n)u!=="ref"&&(o[u]=n[u])}if(r=r.defaultProps){o===n&&(o=g({},o));for(var m in r)o[m]===void 0&&(o[m]=r[m])}return o}function Ix(r){Kc(r)}function Hx(r){console.error(r)}function Ux(r){Kc(r)}function kh(r,n){try{var o=r.onUncaughtError;o(n.value,{componentStack:n.stack})}catch(u){setTimeout(function(){throw u})}}function jx(r,n,o){try{var u=r.onCaughtError;u(o.value,{componentStack:o.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function Gf(r,n,o){return o=ja(o),o.tag=3,o.payload={element:null},o.callback=function(){kh(r,n)},o}function Px(r){return r=ja(r),r.tag=3,r}function Wx(r,n,o,u){var m=o.type.getDerivedStateFromError;if(typeof m=="function"){var b=u.value;r.payload=function(){return m(b)},r.callback=function(){jx(n,o,u)}}var w=o.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(r.callback=function(){jx(n,o,u),typeof m!="function"&&(Za===null?Za=new Set([this]):Za.add(this));var L=u.stack;this.componentDidCatch(u.value,{componentStack:L!==null?L:""})})}function GE(r,n,o,u,m){if(o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=o.alternate,n!==null&&As(n,o,m,!0),o=Ii.current,o!==null){switch(o.tag){case 31:case 13:return ir===null?Oh():o.alternate===null&&_e===0&&(_e=3),o.flags&=-257,o.flags|=65536,o.lanes=m,u===oh?o.flags|=16384:(n=o.updateQueue,n===null?o.updateQueue=new Set([u]):n.add(u),xp(r,u,m)),!1;case 22:return o.flags|=65536,u===oh?o.flags|=16384:(n=o.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([u])},o.updateQueue=n):(o=n.retryQueue,o===null?n.retryQueue=new Set([u]):o.add(u)),xp(r,u,m)),!1}throw Error(a(435,o.tag))}return xp(r,u,m),Oh(),!1}if(Xt)return n=Ii.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=m,u!==df&&(r=Error(a(422),{cause:u}),no(Ki(r,o)))):(u!==df&&(n=Error(a(423),{cause:u}),no(Ki(n,o))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,u=Ki(u,o),m=Gf(r.stateNode,u,m),Sf(r,m),_e!==4&&(_e=2)),!1;var b=Error(a(520),{cause:u});if(b=Ki(b,o),wo===null?wo=[b]:wo.push(b),_e!==4&&(_e=2),n===null)return!0;u=Ki(u,o),o=n;do{switch(o.tag){case 3:return o.flags|=65536,r=m&-m,o.lanes|=r,r=Gf(o.stateNode,u,r),Sf(o,r),!1;case 1:if(n=o.type,b=o.stateNode,(o.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Za===null||!Za.has(b))))return o.flags|=65536,m&=-m,o.lanes|=m,m=Px(m),Wx(m,r,o,u),Sf(o,m),!1}o=o.return}while(o!==null);return!1}var Xf=Error(a(461)),ze=!1;function Ke(r,n,o,u){n.child=r===null?V0(n,null,o,u):Dn(n,r.child,o,u)}function Yx(r,n,o,u,m){o=o.render;var b=n.ref;if("ref"in u){var w={};for(var L in u)L!=="ref"&&(w[L]=u[L])}else w=u;return Mn(n),u=Lf(r,n,o,w,b,m),L=Af(),r!==null&&!ze?(Mf(r,n,m),aa(r,n,m)):(Xt&&L&&hf(n),n.flags|=1,Ke(r,n,u,m),n.child)}function Gx(r,n,o,u,m){if(r===null){var b=o.type;return typeof b=="function"&&!lf(b)&&b.defaultProps===void 0&&o.compare===null?(n.tag=15,n.type=b,Xx(r,n,b,u,m)):(r=ih(o.type,null,u,n,n.mode,m),r.ref=n.ref,r.return=n,n.child=r)}if(b=r.child,!ip(r,m)){var w=b.memoizedProps;if(o=o.compare,o=o!==null?o:io,o(w,u)&&r.ref===n.ref)return aa(r,n,m)}return n.flags|=1,r=Kr(b,u),r.ref=n.ref,r.return=n,n.child=r}function Xx(r,n,o,u,m){if(r!==null){var b=r.memoizedProps;if(io(b,u)&&r.ref===n.ref)if(ze=!1,n.pendingProps=u=b,ip(r,m))(r.flags&131072)!==0&&(ze=!0);else return n.lanes=r.lanes,aa(r,n,m)}return Vf(r,n,o,u,m)}function Vx(r,n,o,u){var m=u.children,b=r!==null?r.memoizedState:null;if(r===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((n.flags&128)!==0){if(b=b!==null?b.baseLanes|o:o,r!==null){for(u=n.child=r.child,m=0;u!==null;)m=m|u.lanes|u.childLanes,u=u.sibling;u=m&~b}else u=0,n.child=null;return Zx(r,n,b,o,u)}if((o&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},r!==null&&sh(n,b!==null?b.cachePool:null),b!==null?K0(n,b):wf(),J0(n);else return u=n.lanes=536870912,Zx(r,n,b!==null?b.baseLanes|o:o,o,u)}else b!==null?(sh(n,b.cachePool),K0(n,b),Ya(),n.memoizedState=null):(r!==null&&sh(n,null),wf(),Ya());return Ke(r,n,m,o),n.child}function xo(r,n){return r!==null&&r.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Zx(r,n,o,u,m){var b=bf();return b=b===null?null:{parent:De._currentValue,pool:b},n.memoizedState={baseLanes:o,cachePool:b},r!==null&&sh(n,null),wf(),J0(n),r!==null&&As(r,n,u,!0),n.childLanes=m,null}function vh(r,n){return n=Th({mode:n.mode,children:n.children},r.mode),n.ref=r.ref,r.child=n,n.return=r,n}function Qx(r,n,o){return Dn(n,r.child,null,o),r=vh(n,n.pendingProps),r.flags|=2,Hi(n),n.memoizedState=null,r}function XE(r,n,o){var u=n.pendingProps,m=(n.flags&128)!==0;if(n.flags&=-129,r===null){if(Xt){if(u.mode==="hidden")return r=vh(n,u),n.lanes=536870912,xo(null,r);if(Bf(n),(r=xe)?(r=cC(r,er),r=r!==null&&r.data==="&"?r:null,r!==null&&(n.memoizedState={dehydrated:r,treeContext:Na!==null?{id:Rr,overflow:Or}:null,retryLane:536870912,hydrationErrors:null},o=F0(r),o.return=n,n.child=o,Ze=n,xe=null)):r=null,r===null)throw Ia(n);return n.lanes=536870912,null}return vh(n,u)}var b=r.memoizedState;if(b!==null){var w=b.dehydrated;if(Bf(n),m)if(n.flags&256)n.flags&=-257,n=Qx(r,n,o);else if(n.memoizedState!==null)n.child=r.child,n.flags|=128,n=null;else throw Error(a(558));else if(ze||As(r,n,o,!1),m=(o&r.childLanes)!==0,ze||m){if(u=fe,u!==null&&(w=fs(u,o),w!==0&&w!==b.retryLane))throw b.retryLane=w,Bn(r,w),Li(u,r,w),Xf;Oh(),n=Qx(r,n,o)}else r=b.treeContext,xe=rr(w.nextSibling),Ze=n,Xt=!0,qa=null,er=!1,r!==null&&z0(n,r),n=vh(n,u),n.flags|=4096;return n}return r=Kr(r.child,{mode:u.mode,children:u.children}),r.ref=n.ref,n.child=r,r.return=n,r}function Sh(r,n){var o=n.ref;if(o===null)r!==null&&r.ref!==null&&(n.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(a(284));(r===null||r.ref!==o)&&(n.flags|=4194816)}}function Vf(r,n,o,u,m){return Mn(n),o=Lf(r,n,o,u,void 0,m),u=Af(),r!==null&&!ze?(Mf(r,n,m),aa(r,n,m)):(Xt&&u&&hf(n),n.flags|=1,Ke(r,n,o,m),n.child)}function Kx(r,n,o,u,m,b){return Mn(n),n.updateQueue=null,o=ex(n,u,o,m),tx(r),u=Af(),r!==null&&!ze?(Mf(r,n,b),aa(r,n,b)):(Xt&&u&&hf(n),n.flags|=1,Ke(r,n,o,b),n.child)}function Jx(r,n,o,u,m){if(Mn(n),n.stateNode===null){var b=_s,w=o.contextType;typeof w=="object"&&w!==null&&(b=Qe(w)),b=new o(u,b),n.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Yf,n.stateNode=b,b._reactInternals=n,b=n.stateNode,b.props=u,b.state=n.memoizedState,b.refs={},kf(n),w=o.contextType,b.context=typeof w=="object"&&w!==null?Qe(w):_s,b.state=n.memoizedState,w=o.getDerivedStateFromProps,typeof w=="function"&&(Wf(n,o,w,u),b.state=n.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(w=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),w!==b.state&&Yf.enqueueReplaceState(b,b.state,null),fo(n,u,b,m),uo(),b.state=n.memoizedState),typeof b.componentDidMount=="function"&&(n.flags|=4194308),u=!0}else if(r===null){b=n.stateNode;var L=n.memoizedProps,q=zn(o,L);b.props=q;var K=b.context,ht=o.contextType;w=_s,typeof ht=="object"&&ht!==null&&(w=Qe(ht));var pt=o.getDerivedStateFromProps;ht=typeof pt=="function"||typeof b.getSnapshotBeforeUpdate=="function",L=n.pendingProps!==L,ht||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(L||K!==w)&&qx(n,b,u,w),Ua=!1;var et=n.memoizedState;b.state=et,fo(n,u,b,m),uo(),K=n.memoizedState,L||et!==K||Ua?(typeof pt=="function"&&(Wf(n,o,pt,u),K=n.memoizedState),(q=Ua||Nx(n,o,q,u,et,K,w))?(ht||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(n.flags|=4194308)):(typeof b.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=u,n.memoizedState=K),b.props=u,b.state=K,b.context=w,u=q):(typeof b.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{b=n.stateNode,vf(r,n),w=n.memoizedProps,ht=zn(o,w),b.props=ht,pt=n.pendingProps,et=b.context,K=o.contextType,q=_s,typeof K=="object"&&K!==null&&(q=Qe(K)),L=o.getDerivedStateFromProps,(K=typeof L=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(w!==pt||et!==q)&&qx(n,b,u,q),Ua=!1,et=n.memoizedState,b.state=et,fo(n,u,b,m),uo();var st=n.memoizedState;w!==pt||et!==st||Ua||r!==null&&r.dependencies!==null&&ah(r.dependencies)?(typeof L=="function"&&(Wf(n,o,L,u),st=n.memoizedState),(ht=Ua||Nx(n,o,ht,u,et,st,q)||r!==null&&r.dependencies!==null&&ah(r.dependencies))?(K||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(u,st,q),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(u,st,q)),typeof b.componentDidUpdate=="function"&&(n.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof b.componentDidUpdate!="function"||w===r.memoizedProps&&et===r.memoizedState||(n.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||w===r.memoizedProps&&et===r.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=st),b.props=u,b.state=st,b.context=q,u=ht):(typeof b.componentDidUpdate!="function"||w===r.memoizedProps&&et===r.memoizedState||(n.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||w===r.memoizedProps&&et===r.memoizedState||(n.flags|=1024),u=!1)}return b=u,Sh(r,n),u=(n.flags&128)!==0,b||u?(b=n.stateNode,o=u&&typeof o.getDerivedStateFromError!="function"?null:b.render(),n.flags|=1,r!==null&&u?(n.child=Dn(n,r.child,null,m),n.child=Dn(n,null,o,m)):Ke(r,n,o,m),n.memoizedState=b.state,r=n.child):r=aa(r,n,m),r}function tb(r,n,o,u){return Ln(),n.flags|=256,Ke(r,n,o,u),n.child}var Zf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qf(r){return{baseLanes:r,cachePool:j0()}}function Kf(r,n,o){return r=r!==null?r.childLanes&~o:0,n&&(r|=ji),r}function eb(r,n,o){var u=n.pendingProps,m=!1,b=(n.flags&128)!==0,w;if((w=b)||(w=r!==null&&r.memoizedState===null?!1:(Le.current&2)!==0),w&&(m=!0,n.flags&=-129),w=(n.flags&32)!==0,n.flags&=-33,r===null){if(Xt){if(m?Wa(n):Ya(),(r=xe)?(r=cC(r,er),r=r!==null&&r.data!=="&"?r:null,r!==null&&(n.memoizedState={dehydrated:r,treeContext:Na!==null?{id:Rr,overflow:Or}:null,retryLane:536870912,hydrationErrors:null},o=F0(r),o.return=n,n.child=o,Ze=n,xe=null)):r=null,r===null)throw Ia(n);return Fp(r)?n.lanes=32:n.lanes=536870912,null}var L=u.children;return u=u.fallback,m?(Ya(),m=n.mode,L=Th({mode:"hidden",children:L},m),u=En(u,m,o,null),L.return=n,u.return=n,L.sibling=u,n.child=L,u=n.child,u.memoizedState=Qf(o),u.childLanes=Kf(r,w,o),n.memoizedState=Zf,xo(null,u)):(Wa(n),Jf(n,L))}var q=r.memoizedState;if(q!==null&&(L=q.dehydrated,L!==null)){if(b)n.flags&256?(Wa(n),n.flags&=-257,n=tp(r,n,o)):n.memoizedState!==null?(Ya(),n.child=r.child,n.flags|=128,n=null):(Ya(),L=u.fallback,m=n.mode,u=Th({mode:"visible",children:u.children},m),L=En(L,m,o,null),L.flags|=2,u.return=n,L.return=n,u.sibling=L,n.child=u,Dn(n,r.child,null,o),u=n.child,u.memoizedState=Qf(o),u.childLanes=Kf(r,w,o),n.memoizedState=Zf,n=xo(null,u));else if(Wa(n),Fp(L)){if(w=L.nextSibling&&L.nextSibling.dataset,w)var K=w.dgst;w=K,u=Error(a(419)),u.stack="",u.digest=w,no({value:u,source:null,stack:null}),n=tp(r,n,o)}else if(ze||As(r,n,o,!1),w=(o&r.childLanes)!==0,ze||w){if(w=fe,w!==null&&(u=fs(w,o),u!==0&&u!==q.retryLane))throw q.retryLane=u,Bn(r,u),Li(w,r,u),Xf;Op(L)||Oh(),n=tp(r,n,o)}else Op(L)?(n.flags|=192,n.child=r.child,n=null):(r=q.treeContext,xe=rr(L.nextSibling),Ze=n,Xt=!0,qa=null,er=!1,r!==null&&z0(n,r),n=Jf(n,u.children),n.flags|=4096);return n}return m?(Ya(),L=u.fallback,m=n.mode,q=r.child,K=q.sibling,u=Kr(q,{mode:"hidden",children:u.children}),u.subtreeFlags=q.subtreeFlags&65011712,K!==null?L=Kr(K,L):(L=En(L,m,o,null),L.flags|=2),L.return=n,u.return=n,u.sibling=L,n.child=u,xo(null,u),u=n.child,L=r.child.memoizedState,L===null?L=Qf(o):(m=L.cachePool,m!==null?(q=De._currentValue,m=m.parent!==q?{parent:q,pool:q}:m):m=j0(),L={baseLanes:L.baseLanes|o,cachePool:m}),u.memoizedState=L,u.childLanes=Kf(r,w,o),n.memoizedState=Zf,xo(r.child,u)):(Wa(n),o=r.child,r=o.sibling,o=Kr(o,{mode:"visible",children:u.children}),o.return=n,o.sibling=null,r!==null&&(w=n.deletions,w===null?(n.deletions=[r],n.flags|=16):w.push(r)),n.child=o,n.memoizedState=null,o)}function Jf(r,n){return n=Th({mode:"visible",children:n},r.mode),n.return=r,r.child=n}function Th(r,n){return r=qi(22,r,null,n),r.lanes=0,r}function tp(r,n,o){return Dn(n,r.child,null,o),r=Jf(n,n.pendingProps.children),r.flags|=2,n.memoizedState=null,r}function ib(r,n,o){r.lanes|=n;var u=r.alternate;u!==null&&(u.lanes|=n),gf(r.return,n,o)}function ep(r,n,o,u,m,b){var w=r.memoizedState;w===null?r.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:m,treeForkCount:b}:(w.isBackwards=n,w.rendering=null,w.renderingStartTime=0,w.last=u,w.tail=o,w.tailMode=m,w.treeForkCount=b)}function rb(r,n,o){var u=n.pendingProps,m=u.revealOrder,b=u.tail;u=u.children;var w=Le.current,L=(w&2)!==0;if(L?(w=w&1|2,n.flags|=128):w&=1,ct(Le,w),Ke(r,n,u,o),u=Xt?ao:0,!L&&r!==null&&(r.flags&128)!==0)t:for(r=n.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&ib(r,o,n);else if(r.tag===19)ib(r,o,n);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break t;for(;r.sibling===null;){if(r.return===null||r.return===n)break t;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(m){case"forwards":for(o=n.child,m=null;o!==null;)r=o.alternate,r!==null&&dh(r)===null&&(m=o),o=o.sibling;o=m,o===null?(m=n.child,n.child=null):(m=o.sibling,o.sibling=null),ep(n,!1,m,o,b,u);break;case"backwards":case"unstable_legacy-backwards":for(o=null,m=n.child,n.child=null;m!==null;){if(r=m.alternate,r!==null&&dh(r)===null){n.child=m;break}r=m.sibling,m.sibling=o,o=m,m=r}ep(n,!0,o,null,b,u);break;case"together":ep(n,!1,null,null,void 0,u);break;default:n.memoizedState=null}return n.child}function aa(r,n,o){if(r!==null&&(n.dependencies=r.dependencies),Va|=n.lanes,(o&n.childLanes)===0)if(r!==null){if(As(r,n,o,!1),(o&n.childLanes)===0)return null}else return null;if(r!==null&&n.child!==r.child)throw Error(a(153));if(n.child!==null){for(r=n.child,o=Kr(r,r.pendingProps),n.child=o,o.return=n;r.sibling!==null;)r=r.sibling,o=o.sibling=Kr(r,r.pendingProps),o.return=n;o.sibling=null}return n.child}function ip(r,n){return(r.lanes&n)!==0?!0:(r=r.dependencies,!!(r!==null&&ah(r)))}function VE(r,n,o){switch(n.tag){case 3:ot(n,n.stateNode.containerInfo),Ha(n,De,r.memoizedState.cache),Ln();break;case 27:case 5:Ot(n);break;case 4:ot(n,n.stateNode.containerInfo);break;case 10:Ha(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Bf(n),null;break;case 13:var u=n.memoizedState;if(u!==null)return u.dehydrated!==null?(Wa(n),n.flags|=128,null):(o&n.child.childLanes)!==0?eb(r,n,o):(Wa(n),r=aa(r,n,o),r!==null?r.sibling:null);Wa(n);break;case 19:var m=(r.flags&128)!==0;if(u=(o&n.childLanes)!==0,u||(As(r,n,o,!1),u=(o&n.childLanes)!==0),m){if(u)return rb(r,n,o);n.flags|=128}if(m=n.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),ct(Le,Le.current),u)break;return null;case 22:return n.lanes=0,Vx(r,n,o,n.pendingProps);case 24:Ha(n,De,r.memoizedState.cache)}return aa(r,n,o)}function ab(r,n,o){if(r!==null)if(r.memoizedProps!==n.pendingProps)ze=!0;else{if(!ip(r,o)&&(n.flags&128)===0)return ze=!1,VE(r,n,o);ze=(r.flags&131072)!==0}else ze=!1,Xt&&(n.flags&1048576)!==0&&$0(n,ao,n.index);switch(n.lanes=0,n.tag){case 16:t:{var u=n.pendingProps;if(r=On(n.elementType),n.type=r,typeof r=="function")lf(r)?(u=zn(r,u),n.tag=1,n=Jx(null,n,r,u,o)):(n.tag=0,n=Vf(null,n,r,u,o));else{if(r!=null){var m=r.$$typeof;if(m===M){n.tag=11,n=Yx(null,n,r,u,o);break t}else if(m===H){n.tag=14,n=Gx(null,n,r,u,o);break t}}throw n=W(r)||r,Error(a(306,n,""))}}return n;case 0:return Vf(r,n,n.type,n.pendingProps,o);case 1:return u=n.type,m=zn(u,n.pendingProps),Jx(r,n,u,m,o);case 3:t:{if(ot(n,n.stateNode.containerInfo),r===null)throw Error(a(387));u=n.pendingProps;var b=n.memoizedState;m=b.element,vf(r,n),fo(n,u,null,o);var w=n.memoizedState;if(u=w.cache,Ha(n,De,u),u!==b.cache&&mf(n,[De],o,!0),uo(),u=w.element,b.isDehydrated)if(b={element:u,isDehydrated:!1,cache:w.cache},n.updateQueue.baseState=b,n.memoizedState=b,n.flags&256){n=tb(r,n,u,o);break t}else if(u!==m){m=Ki(Error(a(424)),n),no(m),n=tb(r,n,u,o);break t}else for(r=n.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,xe=rr(r.firstChild),Ze=n,Xt=!0,qa=null,er=!0,o=V0(n,null,u,o),n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Ln(),u===m){n=aa(r,n,o);break t}Ke(r,n,u,o)}n=n.child}return n;case 26:return Sh(r,n),r===null?(o=gC(n.type,null,n.pendingProps,null))?n.memoizedState=o:Xt||(o=n.type,r=n.pendingProps,u=Ih(mt.current).createElement(o),u[Fe]=n,u[Ve]=r,Je(u,o,r),Se(u),n.stateNode=u):n.memoizedState=gC(n.type,r.memoizedProps,n.pendingProps,r.memoizedState),null;case 27:return Ot(n),r===null&&Xt&&(u=n.stateNode=dC(n.type,n.pendingProps,mt.current),Ze=n,er=!0,m=xe,tn(n.type)?(Dp=m,xe=rr(u.firstChild)):xe=m),Ke(r,n,n.pendingProps.children,o),Sh(r,n),r===null&&(n.flags|=4194304),n.child;case 5:return r===null&&Xt&&((m=u=xe)&&(u=wL(u,n.type,n.pendingProps,er),u!==null?(n.stateNode=u,Ze=n,xe=rr(u.firstChild),er=!1,m=!0):m=!1),m||Ia(n)),Ot(n),m=n.type,b=n.pendingProps,w=r!==null?r.memoizedProps:null,u=b.children,Ap(m,b)?u=null:w!==null&&Ap(m,w)&&(n.flags|=32),n.memoizedState!==null&&(m=Lf(r,n,IE,null,null,o),Oo._currentValue=m),Sh(r,n),Ke(r,n,u,o),n.child;case 6:return r===null&&Xt&&((r=o=xe)&&(o=_L(o,n.pendingProps,er),o!==null?(n.stateNode=o,Ze=n,xe=null,r=!0):r=!1),r||Ia(n)),null;case 13:return eb(r,n,o);case 4:return ot(n,n.stateNode.containerInfo),u=n.pendingProps,r===null?n.child=Dn(n,null,u,o):Ke(r,n,u,o),n.child;case 11:return Yx(r,n,n.type,n.pendingProps,o);case 7:return Ke(r,n,n.pendingProps,o),n.child;case 8:return Ke(r,n,n.pendingProps.children,o),n.child;case 12:return Ke(r,n,n.pendingProps.children,o),n.child;case 10:return u=n.pendingProps,Ha(n,n.type,u.value),Ke(r,n,u.children,o),n.child;case 9:return m=n.type._context,u=n.pendingProps.children,Mn(n),m=Qe(m),u=u(m),n.flags|=1,Ke(r,n,u,o),n.child;case 14:return Gx(r,n,n.type,n.pendingProps,o);case 15:return Xx(r,n,n.type,n.pendingProps,o);case 19:return rb(r,n,o);case 31:return XE(r,n,o);case 22:return Vx(r,n,o,n.pendingProps);case 24:return Mn(n),u=Qe(De),r===null?(m=bf(),m===null&&(m=fe,b=yf(),m.pooledCache=b,b.refCount++,b!==null&&(m.pooledCacheLanes|=o),m=b),n.memoizedState={parent:u,cache:m},kf(n),Ha(n,De,m)):((r.lanes&o)!==0&&(vf(r,n),fo(n,null,null,o),uo()),m=r.memoizedState,b=n.memoizedState,m.parent!==u?(m={parent:u,cache:u},n.memoizedState=m,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=m),Ha(n,De,u)):(u=b.cache,Ha(n,De,u),u!==m.cache&&mf(n,[De],o,!0))),Ke(r,n,n.pendingProps.children,o),n.child;case 29:throw n.pendingProps}throw Error(a(156,n.tag))}function na(r){r.flags|=4}function rp(r,n,o,u,m){if((n=(r.mode&32)!==0)&&(n=!1),n){if(r.flags|=16777216,(m&335544128)===m)if(r.stateNode.complete)r.flags|=8192;else if(Mb())r.flags|=8192;else throw Fn=oh,Cf}else r.flags&=-16777217}function nb(r,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!CC(n))if(Mb())r.flags|=8192;else throw Fn=oh,Cf}function wh(r,n){n!==null&&(r.flags|=4),r.flags&16384&&(n=r.tag!==22?Ic():536870912,r.lanes|=n,Us|=n)}function bo(r,n){if(!Xt)switch(r.tailMode){case"hidden":n=r.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?r.tail=null:o.sibling=null;break;case"collapsed":o=r.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?n||r.tail===null?r.tail=null:r.tail.sibling=null:u.sibling=null}}function be(r){var n=r.alternate!==null&&r.alternate.child===r.child,o=0,u=0;if(n)for(var m=r.child;m!==null;)o|=m.lanes|m.childLanes,u|=m.subtreeFlags&65011712,u|=m.flags&65011712,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)o|=m.lanes|m.childLanes,u|=m.subtreeFlags,u|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=u,r.childLanes=o,n}function ZE(r,n,o){var u=n.pendingProps;switch(uf(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return be(n),null;case 1:return be(n),null;case 3:return o=n.stateNode,u=null,r!==null&&(u=r.memoizedState.cache),n.memoizedState.cache!==u&&(n.flags|=2048),ea(De),bt(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(r===null||r.child===null)&&(Ls(n)?na(n):r===null||r.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,ff())),be(n),null;case 26:var m=n.type,b=n.memoizedState;return r===null?(na(n),b!==null?(be(n),nb(n,b)):(be(n),rp(n,m,null,u,o))):b?b!==r.memoizedState?(na(n),be(n),nb(n,b)):(be(n),n.flags&=-16777217):(r=r.memoizedProps,r!==u&&na(n),be(n),rp(n,m,r,u,o)),null;case 27:if(jt(n),o=mt.current,m=n.type,r!==null&&n.stateNode!=null)r.memoizedProps!==u&&na(n);else{if(!u){if(n.stateNode===null)throw Error(a(166));return be(n),null}r=ft.current,Ls(n)?N0(n):(r=dC(m,u,o),n.stateNode=r,na(n))}return be(n),null;case 5:if(jt(n),m=n.type,r!==null&&n.stateNode!=null)r.memoizedProps!==u&&na(n);else{if(!u){if(n.stateNode===null)throw Error(a(166));return be(n),null}if(b=ft.current,Ls(n))N0(n);else{var w=Ih(mt.current);switch(b){case 1:b=w.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:b=w.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":b=w.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":b=w.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":b=w.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof u.is=="string"?w.createElement("select",{is:u.is}):w.createElement("select"),u.multiple?b.multiple=!0:u.size&&(b.size=u.size);break;default:b=typeof u.is=="string"?w.createElement(m,{is:u.is}):w.createElement(m)}}b[Fe]=n,b[Ve]=u;t:for(w=n.child;w!==null;){if(w.tag===5||w.tag===6)b.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===n)break t;for(;w.sibling===null;){if(w.return===null||w.return===n)break t;w=w.return}w.sibling.return=w.return,w=w.sibling}n.stateNode=b;t:switch(Je(b,m,u),m){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break t;case"img":u=!0;break t;default:u=!1}u&&na(n)}}return be(n),rp(n,n.type,r===null?null:r.memoizedProps,n.pendingProps,o),null;case 6:if(r&&n.stateNode!=null)r.memoizedProps!==u&&na(n);else{if(typeof u!="string"&&n.stateNode===null)throw Error(a(166));if(r=mt.current,Ls(n)){if(r=n.stateNode,o=n.memoizedProps,u=null,m=Ze,m!==null)switch(m.tag){case 27:case 5:u=m.memoizedProps}r[Fe]=n,r=!!(r.nodeValue===o||u!==null&&u.suppressHydrationWarning===!0||eC(r.nodeValue,o)),r||Ia(n,!0)}else r=Ih(r).createTextNode(u),r[Fe]=n,n.stateNode=r}return be(n),null;case 31:if(o=n.memoizedState,r===null||r.memoizedState!==null){if(u=Ls(n),o!==null){if(r===null){if(!u)throw Error(a(318));if(r=n.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[Fe]=n}else Ln(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;be(n),r=!1}else o=ff(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=o),r=!0;if(!r)return n.flags&256?(Hi(n),n):(Hi(n),null);if((n.flags&128)!==0)throw Error(a(558))}return be(n),null;case 13:if(u=n.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(m=Ls(n),u!==null&&u.dehydrated!==null){if(r===null){if(!m)throw Error(a(318));if(m=n.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(a(317));m[Fe]=n}else Ln(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;be(n),m=!1}else m=ff(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return n.flags&256?(Hi(n),n):(Hi(n),null)}return Hi(n),(n.flags&128)!==0?(n.lanes=o,n):(o=u!==null,r=r!==null&&r.memoizedState!==null,o&&(u=n.child,m=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(m=u.alternate.memoizedState.cachePool.pool),b=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(b=u.memoizedState.cachePool.pool),b!==m&&(u.flags|=2048)),o!==r&&o&&(n.child.flags|=8192),wh(n,n.updateQueue),be(n),null);case 4:return bt(),r===null&&wp(n.stateNode.containerInfo),be(n),null;case 10:return ea(n.type),be(n),null;case 19:if(J(Le),u=n.memoizedState,u===null)return be(n),null;if(m=(n.flags&128)!==0,b=u.rendering,b===null)if(m)bo(u,!1);else{if(_e!==0||r!==null&&(r.flags&128)!==0)for(r=n.child;r!==null;){if(b=dh(r),b!==null){for(n.flags|=128,bo(u,!1),r=b.updateQueue,n.updateQueue=r,wh(n,r),n.subtreeFlags=0,r=o,o=n.child;o!==null;)O0(o,r),o=o.sibling;return ct(Le,Le.current&1|2),Xt&&Jr(n,u.treeForkCount),n.child}r=r.sibling}u.tail!==null&&ri()>Ah&&(n.flags|=128,m=!0,bo(u,!1),n.lanes=4194304)}else{if(!m)if(r=dh(b),r!==null){if(n.flags|=128,m=!0,r=r.updateQueue,n.updateQueue=r,wh(n,r),bo(u,!0),u.tail===null&&u.tailMode==="hidden"&&!b.alternate&&!Xt)return be(n),null}else 2*ri()-u.renderingStartTime>Ah&&o!==536870912&&(n.flags|=128,m=!0,bo(u,!1),n.lanes=4194304);u.isBackwards?(b.sibling=n.child,n.child=b):(r=u.last,r!==null?r.sibling=b:n.child=b,u.last=b)}return u.tail!==null?(r=u.tail,u.rendering=r,u.tail=r.sibling,u.renderingStartTime=ri(),r.sibling=null,o=Le.current,ct(Le,m?o&1|2:o&1),Xt&&Jr(n,u.treeForkCount),r):(be(n),null);case 22:case 23:return Hi(n),_f(),u=n.memoizedState!==null,r!==null?r.memoizedState!==null!==u&&(n.flags|=8192):u&&(n.flags|=8192),u?(o&536870912)!==0&&(n.flags&128)===0&&(be(n),n.subtreeFlags&6&&(n.flags|=8192)):be(n),o=n.updateQueue,o!==null&&wh(n,o.retryQueue),o=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==o&&(n.flags|=2048),r!==null&&J(Rn),null;case 24:return o=null,r!==null&&(o=r.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),ea(De),be(n),null;case 25:return null;case 30:return null}throw Error(a(156,n.tag))}function QE(r,n){switch(uf(n),n.tag){case 1:return r=n.flags,r&65536?(n.flags=r&-65537|128,n):null;case 3:return ea(De),bt(),r=n.flags,(r&65536)!==0&&(r&128)===0?(n.flags=r&-65537|128,n):null;case 26:case 27:case 5:return jt(n),null;case 31:if(n.memoizedState!==null){if(Hi(n),n.alternate===null)throw Error(a(340));Ln()}return r=n.flags,r&65536?(n.flags=r&-65537|128,n):null;case 13:if(Hi(n),r=n.memoizedState,r!==null&&r.dehydrated!==null){if(n.alternate===null)throw Error(a(340));Ln()}return r=n.flags,r&65536?(n.flags=r&-65537|128,n):null;case 19:return J(Le),null;case 4:return bt(),null;case 10:return ea(n.type),null;case 22:case 23:return Hi(n),_f(),r!==null&&J(Rn),r=n.flags,r&65536?(n.flags=r&-65537|128,n):null;case 24:return ea(De),null;case 25:return null;default:return null}}function sb(r,n){switch(uf(n),n.tag){case 3:ea(De),bt();break;case 26:case 27:case 5:jt(n);break;case 4:bt();break;case 31:n.memoizedState!==null&&Hi(n);break;case 13:Hi(n);break;case 19:J(Le);break;case 10:ea(n.type);break;case 22:case 23:Hi(n),_f(),r!==null&&J(Rn);break;case 24:ea(De)}}function Co(r,n){try{var o=n.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var m=u.next;o=m;do{if((o.tag&r)===r){u=void 0;var b=o.create,w=o.inst;u=b(),w.destroy=u}o=o.next}while(o!==m)}}catch(L){ce(n,n.return,L)}}function Ga(r,n,o){try{var u=n.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var b=m.next;u=b;do{if((u.tag&r)===r){var w=u.inst,L=w.destroy;if(L!==void 0){w.destroy=void 0,m=n;var q=o,K=L;try{K()}catch(ht){ce(m,q,ht)}}}u=u.next}while(u!==b)}}catch(ht){ce(n,n.return,ht)}}function lb(r){var n=r.updateQueue;if(n!==null){var o=r.stateNode;try{Q0(n,o)}catch(u){ce(r,r.return,u)}}}function ob(r,n,o){o.props=zn(r.type,r.memoizedProps),o.state=r.memoizedState;try{o.componentWillUnmount()}catch(u){ce(r,n,u)}}function ko(r,n){try{var o=r.ref;if(o!==null){switch(r.tag){case 26:case 27:case 5:var u=r.stateNode;break;case 30:u=r.stateNode;break;default:u=r.stateNode}typeof o=="function"?r.refCleanup=o(u):o.current=u}}catch(m){ce(r,n,m)}}function Fr(r,n){var o=r.ref,u=r.refCleanup;if(o!==null)if(typeof u=="function")try{u()}catch(m){ce(r,n,m)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(m){ce(r,n,m)}else o.current=null}function cb(r){var n=r.type,o=r.memoizedProps,u=r.stateNode;try{t:switch(n){case"button":case"input":case"select":case"textarea":o.autoFocus&&u.focus();break t;case"img":o.src?u.src=o.src:o.srcSet&&(u.srcset=o.srcSet)}}catch(m){ce(r,r.return,m)}}function ap(r,n,o){try{var u=r.stateNode;bL(u,r.type,o,n),u[Ve]=n}catch(m){ce(r,r.return,m)}}function hb(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&tn(r.type)||r.tag===4}function np(r){t:for(;;){for(;r.sibling===null;){if(r.return===null||hb(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&tn(r.type)||r.flags&2||r.child===null||r.tag===4)continue t;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function sp(r,n,o){var u=r.tag;if(u===5||u===6)r=r.stateNode,n?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(r,n):(n=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,n.appendChild(r),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=Zr));else if(u!==4&&(u===27&&tn(r.type)&&(o=r.stateNode,n=null),r=r.child,r!==null))for(sp(r,n,o),r=r.sibling;r!==null;)sp(r,n,o),r=r.sibling}function _h(r,n,o){var u=r.tag;if(u===5||u===6)r=r.stateNode,n?o.insertBefore(r,n):o.appendChild(r);else if(u!==4&&(u===27&&tn(r.type)&&(o=r.stateNode),r=r.child,r!==null))for(_h(r,n,o),r=r.sibling;r!==null;)_h(r,n,o),r=r.sibling}function ub(r){var n=r.stateNode,o=r.memoizedProps;try{for(var u=r.type,m=n.attributes;m.length;)n.removeAttributeNode(m[0]);Je(n,u,o),n[Fe]=r,n[Ve]=o}catch(b){ce(r,r.return,b)}}var sa=!1,Ne=!1,lp=!1,db=typeof WeakSet=="function"?WeakSet:Set,Ye=null;function KE(r,n){if(r=r.containerInfo,Ep=Gh,r=T0(r),Jd(r)){if("selectionStart"in r)var o={start:r.selectionStart,end:r.selectionEnd};else t:{o=(o=r.ownerDocument)&&o.defaultView||window;var u=o.getSelection&&o.getSelection();if(u&&u.rangeCount!==0){o=u.anchorNode;var m=u.anchorOffset,b=u.focusNode;u=u.focusOffset;try{o.nodeType,b.nodeType}catch{o=null;break t}var w=0,L=-1,q=-1,K=0,ht=0,pt=r,et=null;e:for(;;){for(var st;pt!==o||m!==0&&pt.nodeType!==3||(L=w+m),pt!==b||u!==0&&pt.nodeType!==3||(q=w+u),pt.nodeType===3&&(w+=pt.nodeValue.length),(st=pt.firstChild)!==null;)et=pt,pt=st;for(;;){if(pt===r)break e;if(et===o&&++K===m&&(L=w),et===b&&++ht===u&&(q=w),(st=pt.nextSibling)!==null)break;pt=et,et=pt.parentNode}pt=st}o=L===-1||q===-1?null:{start:L,end:q}}else o=null}o=o||{start:0,end:0}}else o=null;for(Lp={focusedElem:r,selectionRange:o},Gh=!1,Ye=n;Ye!==null;)if(n=Ye,r=n.child,(n.subtreeFlags&1028)!==0&&r!==null)r.return=n,Ye=r;else for(;Ye!==null;){switch(n=Ye,b=n.alternate,r=n.flags,n.tag){case 0:if((r&4)!==0&&(r=n.updateQueue,r=r!==null?r.events:null,r!==null))for(o=0;o<r.length;o++)m=r[o],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&b!==null){r=void 0,o=n,m=b.memoizedProps,b=b.memoizedState,u=o.stateNode;try{var vt=zn(o.type,m);r=u.getSnapshotBeforeUpdate(vt,b),u.__reactInternalSnapshotBeforeUpdate=r}catch(Rt){ce(o,o.return,Rt)}}break;case 3:if((r&1024)!==0){if(r=n.stateNode.containerInfo,o=r.nodeType,o===9)Rp(r);else if(o===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":Rp(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=n.sibling,r!==null){r.return=n.return,Ye=r;break}Ye=n.return}}function fb(r,n,o){var u=o.flags;switch(o.tag){case 0:case 11:case 15:oa(r,o),u&4&&Co(5,o);break;case 1:if(oa(r,o),u&4)if(r=o.stateNode,n===null)try{r.componentDidMount()}catch(w){ce(o,o.return,w)}else{var m=zn(o.type,n.memoizedProps);n=n.memoizedState;try{r.componentDidUpdate(m,n,r.__reactInternalSnapshotBeforeUpdate)}catch(w){ce(o,o.return,w)}}u&64&&lb(o),u&512&&ko(o,o.return);break;case 3:if(oa(r,o),u&64&&(r=o.updateQueue,r!==null)){if(n=null,o.child!==null)switch(o.child.tag){case 27:case 5:n=o.child.stateNode;break;case 1:n=o.child.stateNode}try{Q0(r,n)}catch(w){ce(o,o.return,w)}}break;case 27:n===null&&u&4&&ub(o);case 26:case 5:oa(r,o),n===null&&u&4&&cb(o),u&512&&ko(o,o.return);break;case 12:oa(r,o);break;case 31:oa(r,o),u&4&&mb(r,o);break;case 13:oa(r,o),u&4&&yb(r,o),u&64&&(r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(o=lL.bind(null,o),BL(r,o))));break;case 22:if(u=o.memoizedState!==null||sa,!u){n=n!==null&&n.memoizedState!==null||Ne,m=sa;var b=Ne;sa=u,(Ne=n)&&!b?ca(r,o,(o.subtreeFlags&8772)!==0):oa(r,o),sa=m,Ne=b}break;case 30:break;default:oa(r,o)}}function pb(r){var n=r.alternate;n!==null&&(r.alternate=null,pb(n)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(n=r.stateNode,n!==null&&ys(n)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var Ce=null,wi=!1;function la(r,n,o){for(o=o.child;o!==null;)gb(r,n,o),o=o.sibling}function gb(r,n,o){if(Xe&&typeof Xe.onCommitFiberUnmount=="function")try{Xe.onCommitFiberUnmount(Ba,o)}catch{}switch(o.tag){case 26:Ne||Fr(o,n),la(r,n,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Ne||Fr(o,n);var u=Ce,m=wi;tn(o.type)&&(Ce=o.stateNode,wi=!1),la(r,n,o),Ao(o.stateNode),Ce=u,wi=m;break;case 5:Ne||Fr(o,n);case 6:if(u=Ce,m=wi,Ce=null,la(r,n,o),Ce=u,wi=m,Ce!==null)if(wi)try{(Ce.nodeType===9?Ce.body:Ce.nodeName==="HTML"?Ce.ownerDocument.body:Ce).removeChild(o.stateNode)}catch(b){ce(o,n,b)}else try{Ce.removeChild(o.stateNode)}catch(b){ce(o,n,b)}break;case 18:Ce!==null&&(wi?(r=Ce,lC(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,o.stateNode),Zs(r)):lC(Ce,o.stateNode));break;case 4:u=Ce,m=wi,Ce=o.stateNode.containerInfo,wi=!0,la(r,n,o),Ce=u,wi=m;break;case 0:case 11:case 14:case 15:Ga(2,o,n),Ne||Ga(4,o,n),la(r,n,o);break;case 1:Ne||(Fr(o,n),u=o.stateNode,typeof u.componentWillUnmount=="function"&&ob(o,n,u)),la(r,n,o);break;case 21:la(r,n,o);break;case 22:Ne=(u=Ne)||o.memoizedState!==null,la(r,n,o),Ne=u;break;default:la(r,n,o)}}function mb(r,n){if(n.memoizedState===null&&(r=n.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Zs(r)}catch(o){ce(n,n.return,o)}}}function yb(r,n){if(n.memoizedState===null&&(r=n.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Zs(r)}catch(o){ce(n,n.return,o)}}function JE(r){switch(r.tag){case 31:case 13:case 19:var n=r.stateNode;return n===null&&(n=r.stateNode=new db),n;case 22:return r=r.stateNode,n=r._retryCache,n===null&&(n=r._retryCache=new db),n;default:throw Error(a(435,r.tag))}}function Bh(r,n){var o=JE(r);n.forEach(function(u){if(!o.has(u)){o.add(u);var m=oL.bind(null,r,u);u.then(m,m)}})}function _i(r,n){var o=n.deletions;if(o!==null)for(var u=0;u<o.length;u++){var m=o[u],b=r,w=n,L=w;t:for(;L!==null;){switch(L.tag){case 27:if(tn(L.type)){Ce=L.stateNode,wi=!1;break t}break;case 5:Ce=L.stateNode,wi=!1;break t;case 3:case 4:Ce=L.stateNode.containerInfo,wi=!0;break t}L=L.return}if(Ce===null)throw Error(a(160));gb(b,w,m),Ce=null,wi=!1,b=m.alternate,b!==null&&(b.return=null),m.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)xb(n,r),n=n.sibling}var dr=null;function xb(r,n){var o=r.alternate,u=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:_i(n,r),Bi(r),u&4&&(Ga(3,r,r.return),Co(3,r),Ga(5,r,r.return));break;case 1:_i(n,r),Bi(r),u&512&&(Ne||o===null||Fr(o,o.return)),u&64&&sa&&(r=r.updateQueue,r!==null&&(u=r.callbacks,u!==null&&(o=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=o===null?u:o.concat(u))));break;case 26:var m=dr;if(_i(n,r),Bi(r),u&512&&(Ne||o===null||Fr(o,o.return)),u&4){var b=o!==null?o.memoizedState:null;if(u=r.memoizedState,o===null)if(u===null)if(r.stateNode===null){t:{u=r.type,o=r.memoizedProps,m=m.ownerDocument||m;e:switch(u){case"title":b=m.getElementsByTagName("title")[0],(!b||b[Fa]||b[Fe]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=m.createElement(u),m.head.insertBefore(b,m.querySelector("head > title"))),Je(b,u,o),b[Fe]=r,Se(b),u=b;break t;case"link":var w=xC("link","href",m).get(u+(o.href||""));if(w){for(var L=0;L<w.length;L++)if(b=w[L],b.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&b.getAttribute("rel")===(o.rel==null?null:o.rel)&&b.getAttribute("title")===(o.title==null?null:o.title)&&b.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){w.splice(L,1);break e}}b=m.createElement(u),Je(b,u,o),m.head.appendChild(b);break;case"meta":if(w=xC("meta","content",m).get(u+(o.content||""))){for(L=0;L<w.length;L++)if(b=w[L],b.getAttribute("content")===(o.content==null?null:""+o.content)&&b.getAttribute("name")===(o.name==null?null:o.name)&&b.getAttribute("property")===(o.property==null?null:o.property)&&b.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&b.getAttribute("charset")===(o.charSet==null?null:o.charSet)){w.splice(L,1);break e}}b=m.createElement(u),Je(b,u,o),m.head.appendChild(b);break;default:throw Error(a(468,u))}b[Fe]=r,Se(b),u=b}r.stateNode=u}else bC(m,r.type,r.stateNode);else r.stateNode=yC(m,u,r.memoizedProps);else b!==u?(b===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):b.count--,u===null?bC(m,r.type,r.stateNode):yC(m,u,r.memoizedProps)):u===null&&r.stateNode!==null&&ap(r,r.memoizedProps,o.memoizedProps)}break;case 27:_i(n,r),Bi(r),u&512&&(Ne||o===null||Fr(o,o.return)),o!==null&&u&4&&ap(r,r.memoizedProps,o.memoizedProps);break;case 5:if(_i(n,r),Bi(r),u&512&&(Ne||o===null||Fr(o,o.return)),r.flags&32){m=r.stateNode;try{bs(m,"")}catch(vt){ce(r,r.return,vt)}}u&4&&r.stateNode!=null&&(m=r.memoizedProps,ap(r,m,o!==null?o.memoizedProps:m)),u&1024&&(lp=!0);break;case 6:if(_i(n,r),Bi(r),u&4){if(r.stateNode===null)throw Error(a(162));u=r.memoizedProps,o=r.stateNode;try{o.nodeValue=u}catch(vt){ce(r,r.return,vt)}}break;case 3:if(jh=null,m=dr,dr=Hh(n.containerInfo),_i(n,r),dr=m,Bi(r),u&4&&o!==null&&o.memoizedState.isDehydrated)try{Zs(n.containerInfo)}catch(vt){ce(r,r.return,vt)}lp&&(lp=!1,bb(r));break;case 4:u=dr,dr=Hh(r.stateNode.containerInfo),_i(n,r),Bi(r),dr=u;break;case 12:_i(n,r),Bi(r);break;case 31:_i(n,r),Bi(r),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,Bh(r,u)));break;case 13:_i(n,r),Bi(r),r.child.flags&8192&&r.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Lh=ri()),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,Bh(r,u)));break;case 22:m=r.memoizedState!==null;var q=o!==null&&o.memoizedState!==null,K=sa,ht=Ne;if(sa=K||m,Ne=ht||q,_i(n,r),Ne=ht,sa=K,Bi(r),u&8192)t:for(n=r.stateNode,n._visibility=m?n._visibility&-2:n._visibility|1,m&&(o===null||q||sa||Ne||Nn(r)),o=null,n=r;;){if(n.tag===5||n.tag===26){if(o===null){q=o=n;try{if(b=q.stateNode,m)w=b.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{L=q.stateNode;var pt=q.memoizedProps.style,et=pt!=null&&pt.hasOwnProperty("display")?pt.display:null;L.style.display=et==null||typeof et=="boolean"?"":(""+et).trim()}}catch(vt){ce(q,q.return,vt)}}}else if(n.tag===6){if(o===null){q=n;try{q.stateNode.nodeValue=m?"":q.memoizedProps}catch(vt){ce(q,q.return,vt)}}}else if(n.tag===18){if(o===null){q=n;try{var st=q.stateNode;m?oC(st,!0):oC(q.stateNode,!1)}catch(vt){ce(q,q.return,vt)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===r)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break t;for(;n.sibling===null;){if(n.return===null||n.return===r)break t;o===n&&(o=null),n=n.return}o===n&&(o=null),n.sibling.return=n.return,n=n.sibling}u&4&&(u=r.updateQueue,u!==null&&(o=u.retryQueue,o!==null&&(u.retryQueue=null,Bh(r,o))));break;case 19:_i(n,r),Bi(r),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,Bh(r,u)));break;case 30:break;case 21:break;default:_i(n,r),Bi(r)}}function Bi(r){var n=r.flags;if(n&2){try{for(var o,u=r.return;u!==null;){if(hb(u)){o=u;break}u=u.return}if(o==null)throw Error(a(160));switch(o.tag){case 27:var m=o.stateNode,b=np(r);_h(r,b,m);break;case 5:var w=o.stateNode;o.flags&32&&(bs(w,""),o.flags&=-33);var L=np(r);_h(r,L,w);break;case 3:case 4:var q=o.stateNode.containerInfo,K=np(r);sp(r,K,q);break;default:throw Error(a(161))}}catch(ht){ce(r,r.return,ht)}r.flags&=-3}n&4096&&(r.flags&=-4097)}function bb(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var n=r;bb(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),r=r.sibling}}function oa(r,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)fb(r,n.alternate,n),n=n.sibling}function Nn(r){for(r=r.child;r!==null;){var n=r;switch(n.tag){case 0:case 11:case 14:case 15:Ga(4,n,n.return),Nn(n);break;case 1:Fr(n,n.return);var o=n.stateNode;typeof o.componentWillUnmount=="function"&&ob(n,n.return,o),Nn(n);break;case 27:Ao(n.stateNode);case 26:case 5:Fr(n,n.return),Nn(n);break;case 22:n.memoizedState===null&&Nn(n);break;case 30:Nn(n);break;default:Nn(n)}r=r.sibling}}function ca(r,n,o){for(o=o&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var u=n.alternate,m=r,b=n,w=b.flags;switch(b.tag){case 0:case 11:case 15:ca(m,b,o),Co(4,b);break;case 1:if(ca(m,b,o),u=b,m=u.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(K){ce(u,u.return,K)}if(u=b,m=u.updateQueue,m!==null){var L=u.stateNode;try{var q=m.shared.hiddenCallbacks;if(q!==null)for(m.shared.hiddenCallbacks=null,m=0;m<q.length;m++)Z0(q[m],L)}catch(K){ce(u,u.return,K)}}o&&w&64&&lb(b),ko(b,b.return);break;case 27:ub(b);case 26:case 5:ca(m,b,o),o&&u===null&&w&4&&cb(b),ko(b,b.return);break;case 12:ca(m,b,o);break;case 31:ca(m,b,o),o&&w&4&&mb(m,b);break;case 13:ca(m,b,o),o&&w&4&&yb(m,b);break;case 22:b.memoizedState===null&&ca(m,b,o),ko(b,b.return);break;case 30:break;default:ca(m,b,o)}n=n.sibling}}function op(r,n){var o=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),r=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==o&&(r!=null&&r.refCount++,o!=null&&so(o))}function cp(r,n){r=null,n.alternate!==null&&(r=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==r&&(n.refCount++,r!=null&&so(r))}function fr(r,n,o,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Cb(r,n,o,u),n=n.sibling}function Cb(r,n,o,u){var m=n.flags;switch(n.tag){case 0:case 11:case 15:fr(r,n,o,u),m&2048&&Co(9,n);break;case 1:fr(r,n,o,u);break;case 3:fr(r,n,o,u),m&2048&&(r=null,n.alternate!==null&&(r=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==r&&(n.refCount++,r!=null&&so(r)));break;case 12:if(m&2048){fr(r,n,o,u),r=n.stateNode;try{var b=n.memoizedProps,w=b.id,L=b.onPostCommit;typeof L=="function"&&L(w,n.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(q){ce(n,n.return,q)}}else fr(r,n,o,u);break;case 31:fr(r,n,o,u);break;case 13:fr(r,n,o,u);break;case 23:break;case 22:b=n.stateNode,w=n.alternate,n.memoizedState!==null?b._visibility&2?fr(r,n,o,u):vo(r,n):b._visibility&2?fr(r,n,o,u):(b._visibility|=2,qs(r,n,o,u,(n.subtreeFlags&10256)!==0||!1)),m&2048&&op(w,n);break;case 24:fr(r,n,o,u),m&2048&&cp(n.alternate,n);break;default:fr(r,n,o,u)}}function qs(r,n,o,u,m){for(m=m&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var b=r,w=n,L=o,q=u,K=w.flags;switch(w.tag){case 0:case 11:case 15:qs(b,w,L,q,m),Co(8,w);break;case 23:break;case 22:var ht=w.stateNode;w.memoizedState!==null?ht._visibility&2?qs(b,w,L,q,m):vo(b,w):(ht._visibility|=2,qs(b,w,L,q,m)),m&&K&2048&&op(w.alternate,w);break;case 24:qs(b,w,L,q,m),m&&K&2048&&cp(w.alternate,w);break;default:qs(b,w,L,q,m)}n=n.sibling}}function vo(r,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var o=r,u=n,m=u.flags;switch(u.tag){case 22:vo(o,u),m&2048&&op(u.alternate,u);break;case 24:vo(o,u),m&2048&&cp(u.alternate,u);break;default:vo(o,u)}n=n.sibling}}var So=8192;function Is(r,n,o){if(r.subtreeFlags&So)for(r=r.child;r!==null;)kb(r,n,o),r=r.sibling}function kb(r,n,o){switch(r.tag){case 26:Is(r,n,o),r.flags&So&&r.memoizedState!==null&&qL(o,dr,r.memoizedState,r.memoizedProps);break;case 5:Is(r,n,o);break;case 3:case 4:var u=dr;dr=Hh(r.stateNode.containerInfo),Is(r,n,o),dr=u;break;case 22:r.memoizedState===null&&(u=r.alternate,u!==null&&u.memoizedState!==null?(u=So,So=16777216,Is(r,n,o),So=u):Is(r,n,o));break;default:Is(r,n,o)}}function vb(r){var n=r.alternate;if(n!==null&&(r=n.child,r!==null)){n.child=null;do n=r.sibling,r.sibling=null,r=n;while(r!==null)}}function To(r){var n=r.deletions;if((r.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var u=n[o];Ye=u,Tb(u,r)}vb(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Sb(r),r=r.sibling}function Sb(r){switch(r.tag){case 0:case 11:case 15:To(r),r.flags&2048&&Ga(9,r,r.return);break;case 3:To(r);break;case 12:To(r);break;case 22:var n=r.stateNode;r.memoizedState!==null&&n._visibility&2&&(r.return===null||r.return.tag!==13)?(n._visibility&=-3,Eh(r)):To(r);break;default:To(r)}}function Eh(r){var n=r.deletions;if((r.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var u=n[o];Ye=u,Tb(u,r)}vb(r)}for(r=r.child;r!==null;){switch(n=r,n.tag){case 0:case 11:case 15:Ga(8,n,n.return),Eh(n);break;case 22:o=n.stateNode,o._visibility&2&&(o._visibility&=-3,Eh(n));break;default:Eh(n)}r=r.sibling}}function Tb(r,n){for(;Ye!==null;){var o=Ye;switch(o.tag){case 0:case 11:case 15:Ga(8,o,n);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var u=o.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:so(o.memoizedState.cache)}if(u=o.child,u!==null)u.return=o,Ye=u;else t:for(o=r;Ye!==null;){u=Ye;var m=u.sibling,b=u.return;if(pb(u),u===o){Ye=null;break t}if(m!==null){m.return=b,Ye=m;break t}Ye=b}}}var tL={getCacheForType:function(r){var n=Qe(De),o=n.data.get(r);return o===void 0&&(o=r(),n.data.set(r,o)),o},cacheSignal:function(){return Qe(De).controller.signal}},eL=typeof WeakMap=="function"?WeakMap:Map,ne=0,fe=null,Pt=null,Yt=0,oe=0,Ui=null,Xa=!1,Hs=!1,hp=!1,ha=0,_e=0,Va=0,qn=0,up=0,ji=0,Us=0,wo=null,Ei=null,dp=!1,Lh=0,wb=0,Ah=1/0,Mh=null,Za=null,He=0,Qa=null,js=null,ua=0,fp=0,pp=null,_b=null,_o=0,gp=null;function Pi(){return(ne&2)!==0&&Yt!==0?Yt&-Yt:A.T!==null?kp():Uc()}function Bb(){if(ji===0)if((Yt&536870912)===0||Xt){var r=Aa;Aa<<=1,(Aa&3932160)===0&&(Aa=262144),ji=r}else ji=536870912;return r=Ii.current,r!==null&&(r.flags|=32),ji}function Li(r,n,o){(r===fe&&(oe===2||oe===9)||r.cancelPendingCommit!==null)&&(Ps(r,0),Ka(r,Yt,ji,!1)),ge(r,o),((ne&2)===0||r!==fe)&&(r===fe&&((ne&2)===0&&(qn|=o),_e===4&&Ka(r,Yt,ji,!1)),Dr(r))}function Eb(r,n,o){if((ne&6)!==0)throw Error(a(327));var u=!o&&(n&127)===0&&(n&r.expiredLanes)===0||vn(r,n),m=u?aL(r,n):yp(r,n,!0),b=u;do{if(m===0){Hs&&!u&&Ka(r,n,0,!1);break}else{if(o=r.current.alternate,b&&!iL(o)){m=yp(r,n,!1),b=!1;continue}if(m===2){if(b=n,r.errorRecoveryDisabledLanes&b)var w=0;else w=r.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){n=w;t:{var L=r;m=wo;var q=L.current.memoizedState.isDehydrated;if(q&&(Ps(L,w).flags|=256),w=yp(L,w,!1),w!==2){if(hp&&!q){L.errorRecoveryDisabledLanes|=b,qn|=b,m=4;break t}b=Ei,Ei=m,b!==null&&(Ei===null?Ei=b:Ei.push.apply(Ei,b))}m=w}if(b=!1,m!==2)continue}}if(m===1){Ps(r,0),Ka(r,n,0,!0);break}t:{switch(u=r,b=m,b){case 0:case 1:throw Error(a(345));case 4:if((n&4194048)!==n)break;case 6:Ka(u,n,ji,!Xa);break t;case 2:Ei=null;break;case 3:case 5:break;default:throw Error(a(329))}if((n&62914560)===n&&(m=Lh+300-ri(),10<m)){if(Ka(u,n,ji,!Xa),Ma(u,0,!0)!==0)break t;ua=n,u.timeoutHandle=nC(Lb.bind(null,u,o,Ei,Mh,dp,n,ji,qn,Us,Xa,b,"Throttled",-0,0),m);break t}Lb(u,o,Ei,Mh,dp,n,ji,qn,Us,Xa,b,null,-0,0)}}break}while(!0);Dr(r)}function Lb(r,n,o,u,m,b,w,L,q,K,ht,pt,et,st){if(r.timeoutHandle=-1,pt=n.subtreeFlags,pt&8192||(pt&16785408)===16785408){pt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zr},kb(n,b,pt);var vt=(b&62914560)===b?Lh-ri():(b&4194048)===b?wb-ri():0;if(vt=IL(pt,vt),vt!==null){ua=b,r.cancelPendingCommit=vt(zb.bind(null,r,n,b,o,u,m,w,L,q,ht,pt,null,et,st)),Ka(r,b,w,!K);return}}zb(r,n,b,o,u,m,w,L,q)}function iL(r){for(var n=r;;){var o=n.tag;if((o===0||o===11||o===15)&&n.flags&16384&&(o=n.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var u=0;u<o.length;u++){var m=o[u],b=m.getSnapshot;m=m.value;try{if(!Ni(b(),m))return!1}catch{return!1}}if(o=n.child,n.subtreeFlags&16384&&o!==null)o.return=n,n=o;else{if(n===r)break;for(;n.sibling===null;){if(n.return===null||n.return===r)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Ka(r,n,o,u){n&=~up,n&=~qn,r.suspendedLanes|=n,r.pingedLanes&=~n,u&&(r.warmLanes|=n),u=r.expirationTimes;for(var m=n;0<m;){var b=31-We(m),w=1<<b;u[b]=-1,m&=~w}o!==0&&Hc(r,o,n)}function Rh(){return(ne&6)===0?(Bo(0),!1):!0}function mp(){if(Pt!==null){if(oe===0)var r=Pt.return;else r=Pt,ta=An=null,Rf(r),Fs=null,oo=0,r=Pt;for(;r!==null;)sb(r.alternate,r),r=r.return;Pt=null}}function Ps(r,n){var o=r.timeoutHandle;o!==-1&&(r.timeoutHandle=-1,vL(o)),o=r.cancelPendingCommit,o!==null&&(r.cancelPendingCommit=null,o()),ua=0,mp(),fe=r,Pt=o=Kr(r.current,null),Yt=n,oe=0,Ui=null,Xa=!1,Hs=vn(r,n),hp=!1,Us=ji=up=qn=Va=_e=0,Ei=wo=null,dp=!1,(n&8)!==0&&(n|=n&32);var u=r.entangledLanes;if(u!==0)for(r=r.entanglements,u&=n;0<u;){var m=31-We(u),b=1<<m;n|=r[m],u&=~b}return ha=n,Jc(),o}function Ab(r,n){qt=null,A.H=yo,n===Os||n===lh?(n=Y0(),oe=3):n===Cf?(n=Y0(),oe=4):oe=n===Xf?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Ui=n,Pt===null&&(_e=1,kh(r,Ki(n,r.current)))}function Mb(){var r=Ii.current;return r===null?!0:(Yt&4194048)===Yt?ir===null:(Yt&62914560)===Yt||(Yt&536870912)!==0?r===ir:!1}function Rb(){var r=A.H;return A.H=yo,r===null?yo:r}function Ob(){var r=A.A;return A.A=tL,r}function Oh(){_e=4,Xa||(Yt&4194048)!==Yt&&Ii.current!==null||(Hs=!0),(Va&134217727)===0&&(qn&134217727)===0||fe===null||Ka(fe,Yt,ji,!1)}function yp(r,n,o){var u=ne;ne|=2;var m=Rb(),b=Ob();(fe!==r||Yt!==n)&&(Mh=null,Ps(r,n)),n=!1;var w=_e;t:do try{if(oe!==0&&Pt!==null){var L=Pt,q=Ui;switch(oe){case 8:mp(),w=6;break t;case 3:case 2:case 9:case 6:Ii.current===null&&(n=!0);var K=oe;if(oe=0,Ui=null,Ws(r,L,q,K),o&&Hs){w=0;break t}break;default:K=oe,oe=0,Ui=null,Ws(r,L,q,K)}}rL(),w=_e;break}catch(ht){Ab(r,ht)}while(!0);return n&&r.shellSuspendCounter++,ta=An=null,ne=u,A.H=m,A.A=b,Pt===null&&(fe=null,Yt=0,Jc()),w}function rL(){for(;Pt!==null;)Fb(Pt)}function aL(r,n){var o=ne;ne|=2;var u=Rb(),m=Ob();fe!==r||Yt!==n?(Mh=null,Ah=ri()+500,Ps(r,n)):Hs=vn(r,n);t:do try{if(oe!==0&&Pt!==null){n=Pt;var b=Ui;e:switch(oe){case 1:oe=0,Ui=null,Ws(r,n,b,1);break;case 2:case 9:if(P0(b)){oe=0,Ui=null,Db(n);break}n=function(){oe!==2&&oe!==9||fe!==r||(oe=7),Dr(r)},b.then(n,n);break t;case 3:oe=7;break t;case 4:oe=5;break t;case 7:P0(b)?(oe=0,Ui=null,Db(n)):(oe=0,Ui=null,Ws(r,n,b,7));break;case 5:var w=null;switch(Pt.tag){case 26:w=Pt.memoizedState;case 5:case 27:var L=Pt;if(w?CC(w):L.stateNode.complete){oe=0,Ui=null;var q=L.sibling;if(q!==null)Pt=q;else{var K=L.return;K!==null?(Pt=K,Fh(K)):Pt=null}break e}}oe=0,Ui=null,Ws(r,n,b,5);break;case 6:oe=0,Ui=null,Ws(r,n,b,6);break;case 8:mp(),_e=6;break t;default:throw Error(a(462))}}nL();break}catch(ht){Ab(r,ht)}while(!0);return ta=An=null,A.H=u,A.A=m,ne=o,Pt!==null?0:(fe=null,Yt=0,Jc(),_e)}function nL(){for(;Pt!==null&&!os();)Fb(Pt)}function Fb(r){var n=ab(r.alternate,r,ha);r.memoizedProps=r.pendingProps,n===null?Fh(r):Pt=n}function Db(r){var n=r,o=n.alternate;switch(n.tag){case 15:case 0:n=Kx(o,n,n.pendingProps,n.type,void 0,Yt);break;case 11:n=Kx(o,n,n.pendingProps,n.type.render,n.ref,Yt);break;case 5:Rf(n);default:sb(o,n),n=Pt=O0(n,ha),n=ab(o,n,ha)}r.memoizedProps=r.pendingProps,n===null?Fh(r):Pt=n}function Ws(r,n,o,u){ta=An=null,Rf(n),Fs=null,oo=0;var m=n.return;try{if(GE(r,m,n,o,Yt)){_e=1,kh(r,Ki(o,r.current)),Pt=null;return}}catch(b){if(m!==null)throw Pt=m,b;_e=1,kh(r,Ki(o,r.current)),Pt=null;return}n.flags&32768?(Xt||u===1?r=!0:Hs||(Yt&536870912)!==0?r=!1:(Xa=r=!0,(u===2||u===9||u===3||u===6)&&(u=Ii.current,u!==null&&u.tag===13&&(u.flags|=16384))),$b(n,r)):Fh(n)}function Fh(r){var n=r;do{if((n.flags&32768)!==0){$b(n,Xa);return}r=n.return;var o=ZE(n.alternate,n,ha);if(o!==null){Pt=o;return}if(n=n.sibling,n!==null){Pt=n;return}Pt=n=r}while(n!==null);_e===0&&(_e=5)}function $b(r,n){do{var o=QE(r.alternate,r);if(o!==null){o.flags&=32767,Pt=o;return}if(o=r.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!n&&(r=r.sibling,r!==null)){Pt=r;return}Pt=r=o}while(r!==null);_e=6,Pt=null}function zb(r,n,o,u,m,b,w,L,q){r.cancelPendingCommit=null;do Dh();while(He!==0);if((ne&6)!==0)throw Error(a(327));if(n!==null){if(n===r.current)throw Error(a(177));if(b=n.lanes|n.childLanes,b|=nf,Ra(r,o,b,w,L,q),r===fe&&(Pt=fe=null,Yt=0),js=n,Qa=r,ua=o,fp=b,pp=m,_b=u,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,cL(Ar,function(){return Ub(),null})):(r.callbackNode=null,r.callbackPriority=0),u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=A.T,A.T=null,m=$.p,$.p=2,w=ne,ne|=4;try{KE(r,n,o)}finally{ne=w,$.p=m,A.T=u}}He=1,Nb(),qb(),Ib()}}function Nb(){if(He===1){He=0;var r=Qa,n=js,o=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||o){o=A.T,A.T=null;var u=$.p;$.p=2;var m=ne;ne|=4;try{xb(n,r);var b=Lp,w=T0(r.containerInfo),L=b.focusedElem,q=b.selectionRange;if(w!==L&&L&&L.ownerDocument&&S0(L.ownerDocument.documentElement,L)){if(q!==null&&Jd(L)){var K=q.start,ht=q.end;if(ht===void 0&&(ht=K),"selectionStart"in L)L.selectionStart=K,L.selectionEnd=Math.min(ht,L.value.length);else{var pt=L.ownerDocument||document,et=pt&&pt.defaultView||window;if(et.getSelection){var st=et.getSelection(),vt=L.textContent.length,Rt=Math.min(q.start,vt),de=q.end===void 0?Rt:Math.min(q.end,vt);!st.extend&&Rt>de&&(w=de,de=Rt,Rt=w);var V=v0(L,Rt),Y=v0(L,de);if(V&&Y&&(st.rangeCount!==1||st.anchorNode!==V.node||st.anchorOffset!==V.offset||st.focusNode!==Y.node||st.focusOffset!==Y.offset)){var Q=pt.createRange();Q.setStart(V.node,V.offset),st.removeAllRanges(),Rt>de?(st.addRange(Q),st.extend(Y.node,Y.offset)):(Q.setEnd(Y.node,Y.offset),st.addRange(Q))}}}}for(pt=[],st=L;st=st.parentNode;)st.nodeType===1&&pt.push({element:st,left:st.scrollLeft,top:st.scrollTop});for(typeof L.focus=="function"&&L.focus(),L=0;L<pt.length;L++){var dt=pt[L];dt.element.scrollLeft=dt.left,dt.element.scrollTop=dt.top}}Gh=!!Ep,Lp=Ep=null}finally{ne=m,$.p=u,A.T=o}}r.current=n,He=2}}function qb(){if(He===2){He=0;var r=Qa,n=js,o=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||o){o=A.T,A.T=null;var u=$.p;$.p=2;var m=ne;ne|=4;try{fb(r,n.alternate,n)}finally{ne=m,$.p=u,A.T=o}}He=3}}function Ib(){if(He===4||He===3){He=0,cs();var r=Qa,n=js,o=ua,u=_b;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?He=5:(He=0,js=Qa=null,Hb(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(Za=null),gs(o),n=n.stateNode,Xe&&typeof Xe.onCommitFiberRoot=="function")try{Xe.onCommitFiberRoot(Ba,n,void 0,(n.current.flags&128)===128)}catch{}if(u!==null){n=A.T,m=$.p,$.p=2,A.T=null;try{for(var b=r.onRecoverableError,w=0;w<u.length;w++){var L=u[w];b(L.value,{componentStack:L.stack})}}finally{A.T=n,$.p=m}}(ua&3)!==0&&Dh(),Dr(r),m=r.pendingLanes,(o&261930)!==0&&(m&42)!==0?r===gp?_o++:(_o=0,gp=r):_o=0,Bo(0)}}function Hb(r,n){(r.pooledCacheLanes&=n)===0&&(n=r.pooledCache,n!=null&&(r.pooledCache=null,so(n)))}function Dh(){return Nb(),qb(),Ib(),Ub()}function Ub(){if(He!==5)return!1;var r=Qa,n=fp;fp=0;var o=gs(ua),u=A.T,m=$.p;try{$.p=32>o?32:o,A.T=null,o=pp,pp=null;var b=Qa,w=ua;if(He=0,js=Qa=null,ua=0,(ne&6)!==0)throw Error(a(331));var L=ne;if(ne|=4,Sb(b.current),Cb(b,b.current,w,o),ne=L,Bo(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot=="function")try{Xe.onPostCommitFiberRoot(Ba,b)}catch{}return!0}finally{$.p=m,A.T=u,Hb(r,n)}}function jb(r,n,o){n=Ki(o,n),n=Gf(r.stateNode,n,2),r=Pa(r,n,2),r!==null&&(ge(r,2),Dr(r))}function ce(r,n,o){if(r.tag===3)jb(r,r,o);else for(;n!==null;){if(n.tag===3){jb(n,r,o);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Za===null||!Za.has(u))){r=Ki(o,r),o=Px(2),u=Pa(n,o,2),u!==null&&(Wx(o,u,n,r),ge(u,2),Dr(u));break}}n=n.return}}function xp(r,n,o){var u=r.pingCache;if(u===null){u=r.pingCache=new eL;var m=new Set;u.set(n,m)}else m=u.get(n),m===void 0&&(m=new Set,u.set(n,m));m.has(o)||(hp=!0,m.add(o),r=sL.bind(null,r,n,o),n.then(r,r))}function sL(r,n,o){var u=r.pingCache;u!==null&&u.delete(n),r.pingedLanes|=r.suspendedLanes&o,r.warmLanes&=~o,fe===r&&(Yt&o)===o&&(_e===4||_e===3&&(Yt&62914560)===Yt&&300>ri()-Lh?(ne&2)===0&&Ps(r,0):up|=o,Us===Yt&&(Us=0)),Dr(r)}function Pb(r,n){n===0&&(n=Ic()),r=Bn(r,n),r!==null&&(ge(r,n),Dr(r))}function lL(r){var n=r.memoizedState,o=0;n!==null&&(o=n.retryLane),Pb(r,o)}function oL(r,n){var o=0;switch(r.tag){case 31:case 13:var u=r.stateNode,m=r.memoizedState;m!==null&&(o=m.retryLane);break;case 19:u=r.stateNode;break;case 22:u=r.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(n),Pb(r,o)}function cL(r,n){return kn(r,n)}var $h=null,Ys=null,bp=!1,zh=!1,Cp=!1,Ja=0;function Dr(r){r!==Ys&&r.next===null&&(Ys===null?$h=Ys=r:Ys=Ys.next=r),zh=!0,bp||(bp=!0,uL())}function Bo(r,n){if(!Cp&&zh){Cp=!0;do for(var o=!1,u=$h;u!==null;){if(r!==0){var m=u.pendingLanes;if(m===0)var b=0;else{var w=u.suspendedLanes,L=u.pingedLanes;b=(1<<31-We(42|r)+1)-1,b&=m&~(w&~L),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(o=!0,Xb(u,b))}else b=Yt,b=Ma(u,u===fe?b:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(b&3)===0||vn(u,b)||(o=!0,Xb(u,b));u=u.next}while(o);Cp=!1}}function hL(){Wb()}function Wb(){zh=bp=!1;var r=0;Ja!==0&&kL()&&(r=Ja);for(var n=ri(),o=null,u=$h;u!==null;){var m=u.next,b=Yb(u,n);b===0?(u.next=null,o===null?$h=m:o.next=m,m===null&&(Ys=o)):(o=u,(r!==0||(b&3)!==0)&&(zh=!0)),u=m}He!==0&&He!==5||Bo(r),Ja!==0&&(Ja=0)}function Yb(r,n){for(var o=r.suspendedLanes,u=r.pingedLanes,m=r.expirationTimes,b=r.pendingLanes&-62914561;0<b;){var w=31-We(b),L=1<<w,q=m[w];q===-1?((L&o)===0||(L&u)!==0)&&(m[w]=Sn(L,n)):q<=n&&(r.expiredLanes|=L),b&=~L}if(n=fe,o=Yt,o=Ma(r,r===n?o:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),u=r.callbackNode,o===0||r===n&&(oe===2||oe===9)||r.cancelPendingCommit!==null)return u!==null&&u!==null&&Lr(u),r.callbackNode=null,r.callbackPriority=0;if((o&3)===0||vn(r,o)){if(n=o&-o,n===r.callbackPriority)return n;switch(u!==null&&Lr(u),gs(o)){case 2:case 8:o=hs;break;case 32:o=Ar;break;case 268435456:o=$i;break;default:o=Ar}return u=Gb.bind(null,r),o=kn(o,u),r.callbackPriority=n,r.callbackNode=o,n}return u!==null&&u!==null&&Lr(u),r.callbackPriority=2,r.callbackNode=null,2}function Gb(r,n){if(He!==0&&He!==5)return r.callbackNode=null,r.callbackPriority=0,null;var o=r.callbackNode;if(Dh()&&r.callbackNode!==o)return null;var u=Yt;return u=Ma(r,r===fe?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),u===0?null:(Eb(r,u,n),Yb(r,ri()),r.callbackNode!=null&&r.callbackNode===o?Gb.bind(null,r):null)}function Xb(r,n){if(Dh())return null;Eb(r,n,!0)}function uL(){SL(function(){(ne&6)!==0?kn(jl,hL):Wb()})}function kp(){if(Ja===0){var r=Ms;r===0&&(r=La,La<<=1,(La&261888)===0&&(La=256)),Ja=r}return Ja}function Vb(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Wc(""+r)}function Zb(r,n){var o=n.ownerDocument.createElement("input");return o.name=n.name,o.value=n.value,r.id&&o.setAttribute("form",r.id),n.parentNode.insertBefore(o,n),r=new FormData(r),o.parentNode.removeChild(o),r}function dL(r,n,o,u,m){if(n==="submit"&&o&&o.stateNode===m){var b=Vb((m[Ve]||null).action),w=u.submitter;w&&(n=(n=w[Ve]||null)?Vb(n.formAction):w.getAttribute("formAction"),n!==null&&(b=n,w=null));var L=new Vc("action","action",null,u,m);r.push({event:L,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Ja!==0){var q=w?Zb(m,w):new FormData(m);Hf(o,{pending:!0,data:q,method:m.method,action:b},null,q)}}else typeof b=="function"&&(L.preventDefault(),q=w?Zb(m,w):new FormData(m),Hf(o,{pending:!0,data:q,method:m.method,action:b},b,q))},currentTarget:m}]})}}for(var vp=0;vp<af.length;vp++){var Sp=af[vp],fL=Sp.toLowerCase(),pL=Sp[0].toUpperCase()+Sp.slice(1);ur(fL,"on"+pL)}ur(B0,"onAnimationEnd"),ur(E0,"onAnimationIteration"),ur(L0,"onAnimationStart"),ur("dblclick","onDoubleClick"),ur("focusin","onFocus"),ur("focusout","onBlur"),ur(AE,"onTransitionRun"),ur(ME,"onTransitionStart"),ur(RE,"onTransitionCancel"),ur(A0,"onTransitionEnd"),yt("onMouseEnter",["mouseout","mouseover"]),yt("onMouseLeave",["mouseout","mouseover"]),yt("onPointerEnter",["pointerout","pointerover"]),yt("onPointerLeave",["pointerout","pointerover"]),ut("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ut("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ut("onBeforeInput",["compositionend","keypress","textInput","paste"]),ut("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ut("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ut("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Eo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),gL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Eo));function Qb(r,n){n=(n&4)!==0;for(var o=0;o<r.length;o++){var u=r[o],m=u.event;u=u.listeners;t:{var b=void 0;if(n)for(var w=u.length-1;0<=w;w--){var L=u[w],q=L.instance,K=L.currentTarget;if(L=L.listener,q!==b&&m.isPropagationStopped())break t;b=L,m.currentTarget=K;try{b(m)}catch(ht){Kc(ht)}m.currentTarget=null,b=q}else for(w=0;w<u.length;w++){if(L=u[w],q=L.instance,K=L.currentTarget,L=L.listener,q!==b&&m.isPropagationStopped())break t;b=L,m.currentTarget=K;try{b(m)}catch(ht){Kc(ht)}m.currentTarget=null,b=q}}}}function Wt(r,n){var o=n[Oa];o===void 0&&(o=n[Oa]=new Set);var u=r+"__bubble";o.has(u)||(Kb(n,r,2,!1),o.add(u))}function Tp(r,n,o){var u=0;n&&(u|=4),Kb(o,r,u,n)}var Nh="_reactListening"+Math.random().toString(36).slice(2);function wp(r){if(!r[Nh]){r[Nh]=!0,wt.forEach(function(o){o!=="selectionchange"&&(gL.has(o)||Tp(o,!1,r),Tp(o,!0,r))});var n=r.nodeType===9?r:r.ownerDocument;n===null||n[Nh]||(n[Nh]=!0,Tp("selectionchange",!1,n))}}function Kb(r,n,o,u){switch(BC(n)){case 2:var m=jL;break;case 8:m=PL;break;default:m=Ip}o=m.bind(null,n,o,r),m=void 0,!Pd||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(m=!0),u?m!==void 0?r.addEventListener(n,o,{capture:!0,passive:m}):r.addEventListener(n,o,!0):m!==void 0?r.addEventListener(n,o,{passive:m}):r.addEventListener(n,o,!1)}function _p(r,n,o,u,m){var b=u;if((n&1)===0&&(n&2)===0&&u!==null)t:for(;;){if(u===null)return;var w=u.tag;if(w===3||w===4){var L=u.stateNode.containerInfo;if(L===m)break;if(w===4)for(w=u.return;w!==null;){var q=w.tag;if((q===3||q===4)&&w.stateNode.containerInfo===m)return;w=w.return}for(;L!==null;){if(w=Da(L),w===null)return;if(q=w.tag,q===5||q===6||q===26||q===27){u=b=w;continue t}L=L.parentNode}}u=u.return}r0(function(){var K=b,ht=Ud(o),pt=[];t:{var et=M0.get(r);if(et!==void 0){var st=Vc,vt=r;switch(r){case"keypress":if(Gc(o)===0)break t;case"keydown":case"keyup":st=oE;break;case"focusin":vt="focus",st=Xd;break;case"focusout":vt="blur",st=Xd;break;case"beforeblur":case"afterblur":st=Xd;break;case"click":if(o.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":st=s0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":st=ZB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":st=uE;break;case B0:case E0:case L0:st=JB;break;case A0:st=fE;break;case"scroll":case"scrollend":st=XB;break;case"wheel":st=gE;break;case"copy":case"cut":case"paste":st=eE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":st=o0;break;case"toggle":case"beforetoggle":st=yE}var Rt=(n&4)!==0,de=!Rt&&(r==="scroll"||r==="scrollend"),V=Rt?et!==null?et+"Capture":null:et;Rt=[];for(var Y=K,Q;Y!==null;){var dt=Y;if(Q=dt.stateNode,dt=dt.tag,dt!==5&&dt!==26&&dt!==27||Q===null||V===null||(dt=Vl(Y,V),dt!=null&&Rt.push(Lo(Y,dt,Q))),de)break;Y=Y.return}0<Rt.length&&(et=new st(et,vt,null,o,ht),pt.push({event:et,listeners:Rt}))}}if((n&7)===0){t:{if(et=r==="mouseover"||r==="pointerover",st=r==="mouseout"||r==="pointerout",et&&o!==Hd&&(vt=o.relatedTarget||o.fromElement)&&(Da(vt)||vt[Xr]))break t;if((st||et)&&(et=ht.window===ht?ht:(et=ht.ownerDocument)?et.defaultView||et.parentWindow:window,st?(vt=o.relatedTarget||o.toElement,st=K,vt=vt?Da(vt):null,vt!==null&&(de=l(vt),Rt=vt.tag,vt!==de||Rt!==5&&Rt!==27&&Rt!==6)&&(vt=null)):(st=null,vt=K),st!==vt)){if(Rt=s0,dt="onMouseLeave",V="onMouseEnter",Y="mouse",(r==="pointerout"||r==="pointerover")&&(Rt=o0,dt="onPointerLeave",V="onPointerEnter",Y="pointer"),de=st==null?et:$a(st),Q=vt==null?et:$a(vt),et=new Rt(dt,Y+"leave",st,o,ht),et.target=de,et.relatedTarget=Q,dt=null,Da(ht)===K&&(Rt=new Rt(V,Y+"enter",vt,o,ht),Rt.target=Q,Rt.relatedTarget=de,dt=Rt),de=dt,st&&vt)e:{for(Rt=mL,V=st,Y=vt,Q=0,dt=V;dt;dt=Rt(dt))Q++;dt=0;for(var At=Y;At;At=Rt(At))dt++;for(;0<Q-dt;)V=Rt(V),Q--;for(;0<dt-Q;)Y=Rt(Y),dt--;for(;Q--;){if(V===Y||Y!==null&&V===Y.alternate){Rt=V;break e}V=Rt(V),Y=Rt(Y)}Rt=null}else Rt=null;st!==null&&Jb(pt,et,st,Rt,!1),vt!==null&&de!==null&&Jb(pt,de,vt,Rt,!0)}}t:{if(et=K?$a(K):window,st=et.nodeName&&et.nodeName.toLowerCase(),st==="select"||st==="input"&&et.type==="file")var Jt=m0;else if(p0(et))if(y0)Jt=BE;else{Jt=wE;var Bt=TE}else st=et.nodeName,!st||st.toLowerCase()!=="input"||et.type!=="checkbox"&&et.type!=="radio"?K&&Id(K.elementType)&&(Jt=m0):Jt=_E;if(Jt&&(Jt=Jt(r,K))){g0(pt,Jt,o,ht);break t}Bt&&Bt(r,et,K),r==="focusout"&&K&&et.type==="number"&&K.memoizedProps.value!=null&&qd(et,"number",et.value)}switch(Bt=K?$a(K):window,r){case"focusin":(p0(Bt)||Bt.contentEditable==="true")&&(Ss=Bt,tf=K,ro=null);break;case"focusout":ro=tf=Ss=null;break;case"mousedown":ef=!0;break;case"contextmenu":case"mouseup":case"dragend":ef=!1,w0(pt,o,ht);break;case"selectionchange":if(LE)break;case"keydown":case"keyup":w0(pt,o,ht)}var It;if(Zd)t:{switch(r){case"compositionstart":var Gt="onCompositionStart";break t;case"compositionend":Gt="onCompositionEnd";break t;case"compositionupdate":Gt="onCompositionUpdate";break t}Gt=void 0}else vs?d0(r,o)&&(Gt="onCompositionEnd"):r==="keydown"&&o.keyCode===229&&(Gt="onCompositionStart");Gt&&(c0&&o.locale!=="ko"&&(vs||Gt!=="onCompositionStart"?Gt==="onCompositionEnd"&&vs&&(It=a0()):(za=ht,Wd="value"in za?za.value:za.textContent,vs=!0)),Bt=qh(K,Gt),0<Bt.length&&(Gt=new l0(Gt,r,null,o,ht),pt.push({event:Gt,listeners:Bt}),It?Gt.data=It:(It=f0(o),It!==null&&(Gt.data=It)))),(It=bE?CE(r,o):kE(r,o))&&(Gt=qh(K,"onBeforeInput"),0<Gt.length&&(Bt=new l0("onBeforeInput","beforeinput",null,o,ht),pt.push({event:Bt,listeners:Gt}),Bt.data=It)),dL(pt,r,K,o,ht)}Qb(pt,n)})}function Lo(r,n,o){return{instance:r,listener:n,currentTarget:o}}function qh(r,n){for(var o=n+"Capture",u=[];r!==null;){var m=r,b=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||b===null||(m=Vl(r,o),m!=null&&u.unshift(Lo(r,m,b)),m=Vl(r,n),m!=null&&u.push(Lo(r,m,b))),r.tag===3)return u;r=r.return}return[]}function mL(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function Jb(r,n,o,u,m){for(var b=n._reactName,w=[];o!==null&&o!==u;){var L=o,q=L.alternate,K=L.stateNode;if(L=L.tag,q!==null&&q===u)break;L!==5&&L!==26&&L!==27||K===null||(q=K,m?(K=Vl(o,b),K!=null&&w.unshift(Lo(o,K,q))):m||(K=Vl(o,b),K!=null&&w.push(Lo(o,K,q)))),o=o.return}w.length!==0&&r.push({event:n,listeners:w})}var yL=/\r\n?/g,xL=/\u0000|\uFFFD/g;function tC(r){return(typeof r=="string"?r:""+r).replace(yL,`
10
+ `).replace(xL,"")}function eC(r,n){return n=tC(n),tC(r)===n}function ue(r,n,o,u,m,b){switch(o){case"children":typeof u=="string"?n==="body"||n==="textarea"&&u===""||bs(r,u):(typeof u=="number"||typeof u=="bigint")&&n!=="body"&&bs(r,""+u);break;case"className":ni(r,"class",u);break;case"tabIndex":ni(r,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":ni(r,o,u);break;case"style":e0(r,u,b);break;case"data":if(n!=="object"){ni(r,"data",u);break}case"src":case"href":if(u===""&&(n!=="a"||o!=="href")){r.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){r.removeAttribute(o);break}u=Wc(""+u),r.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){r.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(o==="formAction"?(n!=="input"&&ue(r,n,"name",m.name,m,null),ue(r,n,"formEncType",m.formEncType,m,null),ue(r,n,"formMethod",m.formMethod,m,null),ue(r,n,"formTarget",m.formTarget,m,null)):(ue(r,n,"encType",m.encType,m,null),ue(r,n,"method",m.method,m,null),ue(r,n,"target",m.target,m,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){r.removeAttribute(o);break}u=Wc(""+u),r.setAttribute(o,u);break;case"onClick":u!=null&&(r.onclick=Zr);break;case"onScroll":u!=null&&Wt("scroll",r);break;case"onScrollEnd":u!=null&&Wt("scrollend",r);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(o=u.__html,o!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=o}}break;case"multiple":r.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":r.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){r.removeAttribute("xlink:href");break}o=Wc(""+u),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(o,""+u):r.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(o,""):r.removeAttribute(o);break;case"capture":case"download":u===!0?r.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(o,u):r.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?r.setAttribute(o,u):r.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?r.removeAttribute(o):r.setAttribute(o,u);break;case"popover":Wt("beforetoggle",r),Wt("toggle",r),fi(r,"popover",u);break;case"xlinkActuate":zi(r,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":zi(r,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":zi(r,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":zi(r,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":zi(r,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":zi(r,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":zi(r,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":zi(r,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":zi(r,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":fi(r,"is",u);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=YB.get(o)||o,fi(r,o,u))}}function Bp(r,n,o,u,m,b){switch(o){case"style":e0(r,u,b);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(o=u.__html,o!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=o}}break;case"children":typeof u=="string"?bs(r,u):(typeof u=="number"||typeof u=="bigint")&&bs(r,""+u);break;case"onScroll":u!=null&&Wt("scroll",r);break;case"onScrollEnd":u!=null&&Wt("scrollend",r);break;case"onClick":u!=null&&(r.onclick=Zr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!F.hasOwnProperty(o))t:{if(o[0]==="o"&&o[1]==="n"&&(m=o.endsWith("Capture"),n=o.slice(2,m?o.length-7:void 0),b=r[Ve]||null,b=b!=null?b[o]:null,typeof b=="function"&&r.removeEventListener(n,b,m),typeof u=="function")){typeof b!="function"&&b!==null&&(o in r?r[o]=null:r.hasAttribute(o)&&r.removeAttribute(o)),r.addEventListener(n,u,m);break t}o in r?r[o]=u:u===!0?r.setAttribute(o,""):fi(r,o,u)}}}function Je(r,n,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Wt("error",r),Wt("load",r);var u=!1,m=!1,b;for(b in o)if(o.hasOwnProperty(b)){var w=o[b];if(w!=null)switch(b){case"src":u=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:ue(r,n,b,w,o,null)}}m&&ue(r,n,"srcSet",o.srcSet,o,null),u&&ue(r,n,"src",o.src,o,null);return;case"input":Wt("invalid",r);var L=b=w=m=null,q=null,K=null;for(u in o)if(o.hasOwnProperty(u)){var ht=o[u];if(ht!=null)switch(u){case"name":m=ht;break;case"type":w=ht;break;case"checked":q=ht;break;case"defaultChecked":K=ht;break;case"value":b=ht;break;case"defaultValue":L=ht;break;case"children":case"dangerouslySetInnerHTML":if(ht!=null)throw Error(a(137,n));break;default:ue(r,n,u,ht,o,null)}}Qy(r,b,L,q,K,w,m,!1);return;case"select":Wt("invalid",r),u=w=b=null;for(m in o)if(o.hasOwnProperty(m)&&(L=o[m],L!=null))switch(m){case"value":b=L;break;case"defaultValue":w=L;break;case"multiple":u=L;default:ue(r,n,m,L,o,null)}n=b,o=w,r.multiple=!!u,n!=null?xs(r,!!u,n,!1):o!=null&&xs(r,!!u,o,!0);return;case"textarea":Wt("invalid",r),b=m=u=null;for(w in o)if(o.hasOwnProperty(w)&&(L=o[w],L!=null))switch(w){case"value":u=L;break;case"defaultValue":m=L;break;case"children":b=L;break;case"dangerouslySetInnerHTML":if(L!=null)throw Error(a(91));break;default:ue(r,n,w,L,o,null)}Jy(r,u,m,b);return;case"option":for(q in o)o.hasOwnProperty(q)&&(u=o[q],u!=null)&&(q==="selected"?r.selected=u&&typeof u!="function"&&typeof u!="symbol":ue(r,n,q,u,o,null));return;case"dialog":Wt("beforetoggle",r),Wt("toggle",r),Wt("cancel",r),Wt("close",r);break;case"iframe":case"object":Wt("load",r);break;case"video":case"audio":for(u=0;u<Eo.length;u++)Wt(Eo[u],r);break;case"image":Wt("error",r),Wt("load",r);break;case"details":Wt("toggle",r);break;case"embed":case"source":case"link":Wt("error",r),Wt("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(K in o)if(o.hasOwnProperty(K)&&(u=o[K],u!=null))switch(K){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:ue(r,n,K,u,o,null)}return;default:if(Id(n)){for(ht in o)o.hasOwnProperty(ht)&&(u=o[ht],u!==void 0&&Bp(r,n,ht,u,o,void 0));return}}for(L in o)o.hasOwnProperty(L)&&(u=o[L],u!=null&&ue(r,n,L,u,o,null))}function bL(r,n,o,u){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,b=null,w=null,L=null,q=null,K=null,ht=null;for(st in o){var pt=o[st];if(o.hasOwnProperty(st)&&pt!=null)switch(st){case"checked":break;case"value":break;case"defaultValue":q=pt;default:u.hasOwnProperty(st)||ue(r,n,st,null,u,pt)}}for(var et in u){var st=u[et];if(pt=o[et],u.hasOwnProperty(et)&&(st!=null||pt!=null))switch(et){case"type":b=st;break;case"name":m=st;break;case"checked":K=st;break;case"defaultChecked":ht=st;break;case"value":w=st;break;case"defaultValue":L=st;break;case"children":case"dangerouslySetInnerHTML":if(st!=null)throw Error(a(137,n));break;default:st!==pt&&ue(r,n,et,st,u,pt)}}Nd(r,w,L,q,K,ht,b,m);return;case"select":st=w=L=et=null;for(b in o)if(q=o[b],o.hasOwnProperty(b)&&q!=null)switch(b){case"value":break;case"multiple":st=q;default:u.hasOwnProperty(b)||ue(r,n,b,null,u,q)}for(m in u)if(b=u[m],q=o[m],u.hasOwnProperty(m)&&(b!=null||q!=null))switch(m){case"value":et=b;break;case"defaultValue":L=b;break;case"multiple":w=b;default:b!==q&&ue(r,n,m,b,u,q)}n=L,o=w,u=st,et!=null?xs(r,!!o,et,!1):!!u!=!!o&&(n!=null?xs(r,!!o,n,!0):xs(r,!!o,o?[]:"",!1));return;case"textarea":st=et=null;for(L in o)if(m=o[L],o.hasOwnProperty(L)&&m!=null&&!u.hasOwnProperty(L))switch(L){case"value":break;case"children":break;default:ue(r,n,L,null,u,m)}for(w in u)if(m=u[w],b=o[w],u.hasOwnProperty(w)&&(m!=null||b!=null))switch(w){case"value":et=m;break;case"defaultValue":st=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(a(91));break;default:m!==b&&ue(r,n,w,m,u,b)}Ky(r,et,st);return;case"option":for(var vt in o)et=o[vt],o.hasOwnProperty(vt)&&et!=null&&!u.hasOwnProperty(vt)&&(vt==="selected"?r.selected=!1:ue(r,n,vt,null,u,et));for(q in u)et=u[q],st=o[q],u.hasOwnProperty(q)&&et!==st&&(et!=null||st!=null)&&(q==="selected"?r.selected=et&&typeof et!="function"&&typeof et!="symbol":ue(r,n,q,et,u,st));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Rt in o)et=o[Rt],o.hasOwnProperty(Rt)&&et!=null&&!u.hasOwnProperty(Rt)&&ue(r,n,Rt,null,u,et);for(K in u)if(et=u[K],st=o[K],u.hasOwnProperty(K)&&et!==st&&(et!=null||st!=null))switch(K){case"children":case"dangerouslySetInnerHTML":if(et!=null)throw Error(a(137,n));break;default:ue(r,n,K,et,u,st)}return;default:if(Id(n)){for(var de in o)et=o[de],o.hasOwnProperty(de)&&et!==void 0&&!u.hasOwnProperty(de)&&Bp(r,n,de,void 0,u,et);for(ht in u)et=u[ht],st=o[ht],!u.hasOwnProperty(ht)||et===st||et===void 0&&st===void 0||Bp(r,n,ht,et,u,st);return}}for(var V in o)et=o[V],o.hasOwnProperty(V)&&et!=null&&!u.hasOwnProperty(V)&&ue(r,n,V,null,u,et);for(pt in u)et=u[pt],st=o[pt],!u.hasOwnProperty(pt)||et===st||et==null&&st==null||ue(r,n,pt,et,u,st)}function iC(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function CL(){if(typeof performance.getEntriesByType=="function"){for(var r=0,n=0,o=performance.getEntriesByType("resource"),u=0;u<o.length;u++){var m=o[u],b=m.transferSize,w=m.initiatorType,L=m.duration;if(b&&L&&iC(w)){for(w=0,L=m.responseEnd,u+=1;u<o.length;u++){var q=o[u],K=q.startTime;if(K>L)break;var ht=q.transferSize,pt=q.initiatorType;ht&&iC(pt)&&(q=q.responseEnd,w+=ht*(q<L?1:(L-K)/(q-K)))}if(--u,n+=8*(b+w)/(m.duration/1e3),r++,10<r)break}}if(0<r)return n/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Ep=null,Lp=null;function Ih(r){return r.nodeType===9?r:r.ownerDocument}function rC(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function aC(r,n){if(r===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&n==="foreignObject"?0:r}function Ap(r,n){return r==="textarea"||r==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Mp=null;function kL(){var r=window.event;return r&&r.type==="popstate"?r===Mp?!1:(Mp=r,!0):(Mp=null,!1)}var nC=typeof setTimeout=="function"?setTimeout:void 0,vL=typeof clearTimeout=="function"?clearTimeout:void 0,sC=typeof Promise=="function"?Promise:void 0,SL=typeof queueMicrotask=="function"?queueMicrotask:typeof sC<"u"?function(r){return sC.resolve(null).then(r).catch(TL)}:nC;function TL(r){setTimeout(function(){throw r})}function tn(r){return r==="head"}function lC(r,n){var o=n,u=0;do{var m=o.nextSibling;if(r.removeChild(o),m&&m.nodeType===8)if(o=m.data,o==="/$"||o==="/&"){if(u===0){r.removeChild(m),Zs(n);return}u--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")u++;else if(o==="html")Ao(r.ownerDocument.documentElement);else if(o==="head"){o=r.ownerDocument.head,Ao(o);for(var b=o.firstChild;b;){var w=b.nextSibling,L=b.nodeName;b[Fa]||L==="SCRIPT"||L==="STYLE"||L==="LINK"&&b.rel.toLowerCase()==="stylesheet"||o.removeChild(b),b=w}}else o==="body"&&Ao(r.ownerDocument.body);o=m}while(o);Zs(n)}function oC(r,n){var o=r;r=0;do{var u=o.nextSibling;if(o.nodeType===1?n?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(n?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),u&&u.nodeType===8)if(o=u.data,o==="/$"){if(r===0)break;r--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||r++;o=u}while(o)}function Rp(r){var n=r.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var o=n;switch(n=n.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Rp(o),ys(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}r.removeChild(o)}}function wL(r,n,o,u){for(;r.nodeType===1;){var m=o;if(r.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(u){if(!r[Fa])switch(n){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(b=r.getAttribute("rel"),b==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(b!==m.rel||r.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||r.getAttribute("title")!==(m.title==null?null:m.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(b=r.getAttribute("src"),(b!==(m.src==null?null:m.src)||r.getAttribute("type")!==(m.type==null?null:m.type)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&b&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(n==="input"&&r.type==="hidden"){var b=m.name==null?null:""+m.name;if(m.type==="hidden"&&r.getAttribute("name")===b)return r}else return r;if(r=rr(r.nextSibling),r===null)break}return null}function _L(r,n,o){if(n==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!o||(r=rr(r.nextSibling),r===null))return null;return r}function cC(r,n){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!n||(r=rr(r.nextSibling),r===null))return null;return r}function Op(r){return r.data==="$?"||r.data==="$~"}function Fp(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function BL(r,n){var o=r.ownerDocument;if(r.data==="$~")r._reactRetry=n;else if(r.data!=="$?"||o.readyState!=="loading")n();else{var u=function(){n(),o.removeEventListener("DOMContentLoaded",u)};o.addEventListener("DOMContentLoaded",u),r._reactRetry=u}}function rr(r){for(;r!=null;r=r.nextSibling){var n=r.nodeType;if(n===1||n===3)break;if(n===8){if(n=r.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return r}var Dp=null;function hC(r){r=r.nextSibling;for(var n=0;r;){if(r.nodeType===8){var o=r.data;if(o==="/$"||o==="/&"){if(n===0)return rr(r.nextSibling);n--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||n++}r=r.nextSibling}return null}function uC(r){r=r.previousSibling;for(var n=0;r;){if(r.nodeType===8){var o=r.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(n===0)return r;n--}else o!=="/$"&&o!=="/&"||n++}r=r.previousSibling}return null}function dC(r,n,o){switch(n=Ih(o),r){case"html":if(r=n.documentElement,!r)throw Error(a(452));return r;case"head":if(r=n.head,!r)throw Error(a(453));return r;case"body":if(r=n.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function Ao(r){for(var n=r.attributes;n.length;)r.removeAttributeNode(n[0]);ys(r)}var ar=new Map,fC=new Set;function Hh(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var da=$.d;$.d={f:EL,r:LL,D:AL,C:ML,L:RL,m:OL,X:DL,S:FL,M:$L};function EL(){var r=da.f(),n=Rh();return r||n}function LL(r){var n=Vr(r);n!==null&&n.tag===5&&n.type==="form"?Ax(n):da.r(r)}var Gs=typeof document>"u"?null:document;function pC(r,n,o){var u=Gs;if(u&&typeof n=="string"&&n){var m=Zi(n);m='link[rel="'+r+'"][href="'+m+'"]',typeof o=="string"&&(m+='[crossorigin="'+o+'"]'),fC.has(m)||(fC.add(m),r={rel:r,crossOrigin:o,href:n},u.querySelector(m)===null&&(n=u.createElement("link"),Je(n,"link",r),Se(n),u.head.appendChild(n)))}}function AL(r){da.D(r),pC("dns-prefetch",r,null)}function ML(r,n){da.C(r,n),pC("preconnect",r,n)}function RL(r,n,o){da.L(r,n,o);var u=Gs;if(u&&r&&n){var m='link[rel="preload"][as="'+Zi(n)+'"]';n==="image"&&o&&o.imageSrcSet?(m+='[imagesrcset="'+Zi(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(m+='[imagesizes="'+Zi(o.imageSizes)+'"]')):m+='[href="'+Zi(r)+'"]';var b=m;switch(n){case"style":b=Xs(r);break;case"script":b=Vs(r)}ar.has(b)||(r=g({rel:"preload",href:n==="image"&&o&&o.imageSrcSet?void 0:r,as:n},o),ar.set(b,r),u.querySelector(m)!==null||n==="style"&&u.querySelector(Mo(b))||n==="script"&&u.querySelector(Ro(b))||(n=u.createElement("link"),Je(n,"link",r),Se(n),u.head.appendChild(n)))}}function OL(r,n){da.m(r,n);var o=Gs;if(o&&r){var u=n&&typeof n.as=="string"?n.as:"script",m='link[rel="modulepreload"][as="'+Zi(u)+'"][href="'+Zi(r)+'"]',b=m;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Vs(r)}if(!ar.has(b)&&(r=g({rel:"modulepreload",href:r},n),ar.set(b,r),o.querySelector(m)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(Ro(b)))return}u=o.createElement("link"),Je(u,"link",r),Se(u),o.head.appendChild(u)}}}function FL(r,n,o){da.S(r,n,o);var u=Gs;if(u&&r){var m=Mr(u).hoistableStyles,b=Xs(r);n=n||"default";var w=m.get(b);if(!w){var L={loading:0,preload:null};if(w=u.querySelector(Mo(b)))L.loading=5;else{r=g({rel:"stylesheet",href:r,"data-precedence":n},o),(o=ar.get(b))&&$p(r,o);var q=w=u.createElement("link");Se(q),Je(q,"link",r),q._p=new Promise(function(K,ht){q.onload=K,q.onerror=ht}),q.addEventListener("load",function(){L.loading|=1}),q.addEventListener("error",function(){L.loading|=2}),L.loading|=4,Uh(w,n,u)}w={type:"stylesheet",instance:w,count:1,state:L},m.set(b,w)}}}function DL(r,n){da.X(r,n);var o=Gs;if(o&&r){var u=Mr(o).hoistableScripts,m=Vs(r),b=u.get(m);b||(b=o.querySelector(Ro(m)),b||(r=g({src:r,async:!0},n),(n=ar.get(m))&&zp(r,n),b=o.createElement("script"),Se(b),Je(b,"link",r),o.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(m,b))}}function $L(r,n){da.M(r,n);var o=Gs;if(o&&r){var u=Mr(o).hoistableScripts,m=Vs(r),b=u.get(m);b||(b=o.querySelector(Ro(m)),b||(r=g({src:r,async:!0,type:"module"},n),(n=ar.get(m))&&zp(r,n),b=o.createElement("script"),Se(b),Je(b,"link",r),o.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(m,b))}}function gC(r,n,o,u){var m=(m=mt.current)?Hh(m):null;if(!m)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(n=Xs(o.href),o=Mr(m).hoistableStyles,u=o.get(n),u||(u={type:"style",instance:null,count:0,state:null},o.set(n,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){r=Xs(o.href);var b=Mr(m).hoistableStyles,w=b.get(r);if(w||(m=m.ownerDocument||m,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(r,w),(b=m.querySelector(Mo(r)))&&!b._p&&(w.instance=b,w.state.loading=5),ar.has(r)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},ar.set(r,o),b||zL(m,r,o,w.state))),n&&u===null)throw Error(a(528,""));return w}if(n&&u!==null)throw Error(a(529,""));return null;case"script":return n=o.async,o=o.src,typeof o=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Vs(o),o=Mr(m).hoistableScripts,u=o.get(n),u||(u={type:"script",instance:null,count:0,state:null},o.set(n,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function Xs(r){return'href="'+Zi(r)+'"'}function Mo(r){return'link[rel="stylesheet"]['+r+"]"}function mC(r){return g({},r,{"data-precedence":r.precedence,precedence:null})}function zL(r,n,o,u){r.querySelector('link[rel="preload"][as="style"]['+n+"]")?u.loading=1:(n=r.createElement("link"),u.preload=n,n.addEventListener("load",function(){return u.loading|=1}),n.addEventListener("error",function(){return u.loading|=2}),Je(n,"link",o),Se(n),r.head.appendChild(n))}function Vs(r){return'[src="'+Zi(r)+'"]'}function Ro(r){return"script[async]"+r}function yC(r,n,o){if(n.count++,n.instance===null)switch(n.type){case"style":var u=r.querySelector('style[data-href~="'+Zi(o.href)+'"]');if(u)return n.instance=u,Se(u),u;var m=g({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return u=(r.ownerDocument||r).createElement("style"),Se(u),Je(u,"style",m),Uh(u,o.precedence,r),n.instance=u;case"stylesheet":m=Xs(o.href);var b=r.querySelector(Mo(m));if(b)return n.state.loading|=4,n.instance=b,Se(b),b;u=mC(o),(m=ar.get(m))&&$p(u,m),b=(r.ownerDocument||r).createElement("link"),Se(b);var w=b;return w._p=new Promise(function(L,q){w.onload=L,w.onerror=q}),Je(b,"link",u),n.state.loading|=4,Uh(b,o.precedence,r),n.instance=b;case"script":return b=Vs(o.src),(m=r.querySelector(Ro(b)))?(n.instance=m,Se(m),m):(u=o,(m=ar.get(b))&&(u=g({},o),zp(u,m)),r=r.ownerDocument||r,m=r.createElement("script"),Se(m),Je(m,"link",u),r.head.appendChild(m),n.instance=m);case"void":return null;default:throw Error(a(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(u=n.instance,n.state.loading|=4,Uh(u,o.precedence,r));return n.instance}function Uh(r,n,o){for(var u=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=u.length?u[u.length-1]:null,b=m,w=0;w<u.length;w++){var L=u[w];if(L.dataset.precedence===n)b=L;else if(b!==m)break}b?b.parentNode.insertBefore(r,b.nextSibling):(n=o.nodeType===9?o.head:o,n.insertBefore(r,n.firstChild))}function $p(r,n){r.crossOrigin==null&&(r.crossOrigin=n.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=n.referrerPolicy),r.title==null&&(r.title=n.title)}function zp(r,n){r.crossOrigin==null&&(r.crossOrigin=n.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=n.referrerPolicy),r.integrity==null&&(r.integrity=n.integrity)}var jh=null;function xC(r,n,o){if(jh===null){var u=new Map,m=jh=new Map;m.set(o,u)}else m=jh,u=m.get(o),u||(u=new Map,m.set(o,u));if(u.has(r))return u;for(u.set(r,null),o=o.getElementsByTagName(r),m=0;m<o.length;m++){var b=o[m];if(!(b[Fa]||b[Fe]||r==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var w=b.getAttribute(n)||"";w=r+w;var L=u.get(w);L?L.push(b):u.set(w,[b])}}return u}function bC(r,n,o){r=r.ownerDocument||r,r.head.insertBefore(o,n==="title"?r.querySelector("head > title"):null)}function NL(r,n,o){if(o===1||n.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(r=n.disabled,typeof n.precedence=="string"&&r==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function CC(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function qL(r,n,o,u){if(o.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var m=Xs(u.href),b=n.querySelector(Mo(m));if(b){n=b._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(r.count++,r=Ph.bind(r),n.then(r,r)),o.state.loading|=4,o.instance=b,Se(b);return}b=n.ownerDocument||n,u=mC(u),(m=ar.get(m))&&$p(u,m),b=b.createElement("link"),Se(b);var w=b;w._p=new Promise(function(L,q){w.onload=L,w.onerror=q}),Je(b,"link",u),o.instance=b}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(o,n),(n=o.state.preload)&&(o.state.loading&3)===0&&(r.count++,o=Ph.bind(r),n.addEventListener("load",o),n.addEventListener("error",o))}}var Np=0;function IL(r,n){return r.stylesheets&&r.count===0&&Yh(r,r.stylesheets),0<r.count||0<r.imgCount?function(o){var u=setTimeout(function(){if(r.stylesheets&&Yh(r,r.stylesheets),r.unsuspend){var b=r.unsuspend;r.unsuspend=null,b()}},6e4+n);0<r.imgBytes&&Np===0&&(Np=62500*CL());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Yh(r,r.stylesheets),r.unsuspend)){var b=r.unsuspend;r.unsuspend=null,b()}},(r.imgBytes>Np?50:800)+n);return r.unsuspend=o,function(){r.unsuspend=null,clearTimeout(u),clearTimeout(m)}}:null}function Ph(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Yh(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Wh=null;function Yh(r,n){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Wh=new Map,n.forEach(HL,r),Wh=null,Ph.call(r))}function HL(r,n){if(!(n.state.loading&4)){var o=Wh.get(r);if(o)var u=o.get(null);else{o=new Map,Wh.set(r,o);for(var m=r.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<m.length;b++){var w=m[b];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(o.set(w.dataset.precedence,w),u=w)}u&&o.set(null,u)}m=n.instance,w=m.getAttribute("data-precedence"),b=o.get(w)||u,b===u&&o.set(null,m),o.set(w,m),this.count++,u=Ph.bind(this),m.addEventListener("load",u),m.addEventListener("error",u),b?b.parentNode.insertBefore(m,b.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),n.state.loading|=4}}var Oo={$$typeof:E,Provider:null,Consumer:null,_currentValue:U,_currentValue2:U,_threadCount:0};function UL(r,n,o,u,m,b,w,L,q){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Wl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wl(0),this.hiddenUpdates=Wl(null),this.identifierPrefix=u,this.onUncaughtError=m,this.onCaughtError=b,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=q,this.incompleteTransitions=new Map}function kC(r,n,o,u,m,b,w,L,q,K,ht,pt){return r=new UL(r,n,o,w,q,K,ht,pt,L),n=1,b===!0&&(n|=24),b=qi(3,null,null,n),r.current=b,b.stateNode=r,n=yf(),n.refCount++,r.pooledCache=n,n.refCount++,b.memoizedState={element:u,isDehydrated:o,cache:n},kf(b),r}function vC(r){return r?(r=_s,r):_s}function SC(r,n,o,u,m,b){m=vC(m),u.context===null?u.context=m:u.pendingContext=m,u=ja(n),u.payload={element:o},b=b===void 0?null:b,b!==null&&(u.callback=b),o=Pa(r,u,n),o!==null&&(Li(o,r,n),ho(o,r,n))}function TC(r,n){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var o=r.retryLane;r.retryLane=o!==0&&o<n?o:n}}function qp(r,n){TC(r,n),(r=r.alternate)&&TC(r,n)}function wC(r){if(r.tag===13||r.tag===31){var n=Bn(r,67108864);n!==null&&Li(n,r,67108864),qp(r,67108864)}}function _C(r){if(r.tag===13||r.tag===31){var n=Pi();n=ps(n);var o=Bn(r,n);o!==null&&Li(o,r,n),qp(r,n)}}var Gh=!0;function jL(r,n,o,u){var m=A.T;A.T=null;var b=$.p;try{$.p=2,Ip(r,n,o,u)}finally{$.p=b,A.T=m}}function PL(r,n,o,u){var m=A.T;A.T=null;var b=$.p;try{$.p=8,Ip(r,n,o,u)}finally{$.p=b,A.T=m}}function Ip(r,n,o,u){if(Gh){var m=Hp(u);if(m===null)_p(r,n,u,Xh,o),EC(r,u);else if(YL(m,r,n,o,u))u.stopPropagation();else if(EC(r,u),n&4&&-1<WL.indexOf(r)){for(;m!==null;){var b=Vr(m);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var w=hr(b.pendingLanes);if(w!==0){var L=b;for(L.pendingLanes|=2,L.entangledLanes|=2;w;){var q=1<<31-We(w);L.entanglements[1]|=q,w&=~q}Dr(b),(ne&6)===0&&(Ah=ri()+500,Bo(0))}}break;case 31:case 13:L=Bn(b,2),L!==null&&Li(L,b,2),Rh(),qp(b,2)}if(b=Hp(u),b===null&&_p(r,n,u,Xh,o),b===m)break;m=b}m!==null&&u.stopPropagation()}else _p(r,n,u,null,o)}}function Hp(r){return r=Ud(r),Up(r)}var Xh=null;function Up(r){if(Xh=null,r=Da(r),r!==null){var n=l(r);if(n===null)r=null;else{var o=n.tag;if(o===13){if(r=c(n),r!==null)return r;r=null}else if(o===31){if(r=h(n),r!==null)return r;r=null}else if(o===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;r=null}else n!==r&&(r=null)}}return Xh=r,null}function BC(r){switch(r){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Nc()){case jl:return 2;case hs:return 8;case Ar:case _a:return 32;case $i:return 268435456;default:return 32}default:return 32}}var jp=!1,en=null,rn=null,an=null,Fo=new Map,Do=new Map,nn=[],WL="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function EC(r,n){switch(r){case"focusin":case"focusout":en=null;break;case"dragenter":case"dragleave":rn=null;break;case"mouseover":case"mouseout":an=null;break;case"pointerover":case"pointerout":Fo.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Do.delete(n.pointerId)}}function $o(r,n,o,u,m,b){return r===null||r.nativeEvent!==b?(r={blockedOn:n,domEventName:o,eventSystemFlags:u,nativeEvent:b,targetContainers:[m]},n!==null&&(n=Vr(n),n!==null&&wC(n)),r):(r.eventSystemFlags|=u,n=r.targetContainers,m!==null&&n.indexOf(m)===-1&&n.push(m),r)}function YL(r,n,o,u,m){switch(n){case"focusin":return en=$o(en,r,n,o,u,m),!0;case"dragenter":return rn=$o(rn,r,n,o,u,m),!0;case"mouseover":return an=$o(an,r,n,o,u,m),!0;case"pointerover":var b=m.pointerId;return Fo.set(b,$o(Fo.get(b)||null,r,n,o,u,m)),!0;case"gotpointercapture":return b=m.pointerId,Do.set(b,$o(Do.get(b)||null,r,n,o,u,m)),!0}return!1}function LC(r){var n=Da(r.target);if(n!==null){var o=l(n);if(o!==null){if(n=o.tag,n===13){if(n=c(o),n!==null){r.blockedOn=n,vi(r.priority,function(){_C(o)});return}}else if(n===31){if(n=h(o),n!==null){r.blockedOn=n,vi(r.priority,function(){_C(o)});return}}else if(n===3&&o.stateNode.current.memoizedState.isDehydrated){r.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Vh(r){if(r.blockedOn!==null)return!1;for(var n=r.targetContainers;0<n.length;){var o=Hp(r.nativeEvent);if(o===null){o=r.nativeEvent;var u=new o.constructor(o.type,o);Hd=u,o.target.dispatchEvent(u),Hd=null}else return n=Vr(o),n!==null&&wC(n),r.blockedOn=o,!1;n.shift()}return!0}function AC(r,n,o){Vh(r)&&o.delete(n)}function GL(){jp=!1,en!==null&&Vh(en)&&(en=null),rn!==null&&Vh(rn)&&(rn=null),an!==null&&Vh(an)&&(an=null),Fo.forEach(AC),Do.forEach(AC)}function Zh(r,n){r.blockedOn===n&&(r.blockedOn=null,jp||(jp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,GL)))}var Qh=null;function MC(r){Qh!==r&&(Qh=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Qh===r&&(Qh=null);for(var n=0;n<r.length;n+=3){var o=r[n],u=r[n+1],m=r[n+2];if(typeof u!="function"){if(Up(u||o)===null)continue;break}var b=Vr(o);b!==null&&(r.splice(n,3),n-=3,Hf(b,{pending:!0,data:m,method:o.method,action:u},u,m))}}))}function Zs(r){function n(q){return Zh(q,r)}en!==null&&Zh(en,r),rn!==null&&Zh(rn,r),an!==null&&Zh(an,r),Fo.forEach(n),Do.forEach(n);for(var o=0;o<nn.length;o++){var u=nn[o];u.blockedOn===r&&(u.blockedOn=null)}for(;0<nn.length&&(o=nn[0],o.blockedOn===null);)LC(o),o.blockedOn===null&&nn.shift();if(o=(r.ownerDocument||r).$$reactFormReplay,o!=null)for(u=0;u<o.length;u+=3){var m=o[u],b=o[u+1],w=m[Ve]||null;if(typeof b=="function")w||MC(o);else if(w){var L=null;if(b&&b.hasAttribute("formAction")){if(m=b,w=b[Ve]||null)L=w.formAction;else if(Up(m)!==null)continue}else L=w.action;typeof L=="function"?o[u+1]=L:(o.splice(u,3),u-=3),MC(o)}}}function RC(){function r(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(w){return m=w})},focusReset:"manual",scroll:"manual"})}function n(){m!==null&&(m(),m=null),u||setTimeout(o,20)}function o(){if(!u&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,m=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(o,100),function(){u=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),m!==null&&(m(),m=null)}}}function Pp(r){this._internalRoot=r}Kh.prototype.render=Pp.prototype.render=function(r){var n=this._internalRoot;if(n===null)throw Error(a(409));var o=n.current,u=Pi();SC(o,u,r,n,null,null)},Kh.prototype.unmount=Pp.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var n=r.containerInfo;SC(r.current,2,null,r,null,null),Rh(),n[Xr]=null}};function Kh(r){this._internalRoot=r}Kh.prototype.unstable_scheduleHydration=function(r){if(r){var n=Uc();r={blockedOn:null,target:r,priority:n};for(var o=0;o<nn.length&&n!==0&&n<nn[o].priority;o++);nn.splice(o,0,r),o===0&&LC(r)}};var OC=t.version;if(OC!=="19.2.6")throw Error(a(527,OC,"19.2.6"));$.findDOMNode=function(r){var n=r._reactInternals;if(n===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=f(n),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var XL={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{Ba=Jh.inject(XL),Xe=Jh}catch{}}return No.createRoot=function(r,n){if(!s(r))throw Error(a(299));var o=!1,u="",m=Ix,b=Hx,w=Ux;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(m=n.onUncaughtError),n.onCaughtError!==void 0&&(b=n.onCaughtError),n.onRecoverableError!==void 0&&(w=n.onRecoverableError)),n=kC(r,1,!1,null,null,o,u,null,m,b,w,RC),r[Xr]=n.current,wp(r),new Pp(n)},No.hydrateRoot=function(r,n,o){if(!s(r))throw Error(a(299));var u=!1,m="",b=Ix,w=Hx,L=Ux,q=null;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(m=o.identifierPrefix),o.onUncaughtError!==void 0&&(b=o.onUncaughtError),o.onCaughtError!==void 0&&(w=o.onCaughtError),o.onRecoverableError!==void 0&&(L=o.onRecoverableError),o.formState!==void 0&&(q=o.formState)),n=kC(r,1,!0,n,o??null,u,m,q,b,w,L,RC),n.context=vC(null),o=n.current,u=Pi(),u=ps(u),m=ja(u),m.callback=null,Pa(o,m,u),o=u,n.current.lanes=o,ge(n,o),Dr(n),r[Xr]=n.current,wp(r),new Kh(n)},No.version="19.2.6",No}var jC;function nA(){if(jC)return Gp.exports;jC=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Gp.exports=aA(),Gp.exports}var sA=nA();const lA=Lm(sA);var PC="popstate";function WC(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function oA(e={}){function t(a,s){let l=s.state?.masked,{pathname:c,search:h,hash:d}=l||a.location;return Sg("",{pathname:c,search:h,hash:d},s.state&&s.state.usr||null,s.state&&s.state.key||"default",l?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function i(a,s){return typeof s=="string"?s:dc(s)}return hA(t,i,null,e)}function ve(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Tr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function cA(){return Math.random().toString(36).substring(2,10)}function YC(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Sg(e,t,i=null,a,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Dl(t):t,state:i,key:t&&t.key||a||cA(),mask:s}}function dc({pathname:e="/",search:t="",hash:i=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function Dl(e){let t={};if(e){let i=e.indexOf("#");i>=0&&(t.hash=e.substring(i),e=e.substring(0,i));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function hA(e,t,i,a={}){let{window:s=document.defaultView,v5Compat:l=!1}=a,c=s.history,h="POP",d=null,f=p();f==null&&(f=0,c.replaceState({...c.state,idx:f},""));function p(){return(c.state||{idx:null}).idx}function g(){h="POP";let S=p(),T=S==null?null:S-f;f=S,d&&d({action:h,location:k.location,delta:T})}function x(S,T){h="PUSH";let _=WC(S)?S:Sg(k.location,S,T);f=p()+1;let E=YC(_,f),M=k.createHref(_.mask||_);try{c.pushState(E,"",M)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;s.location.assign(M)}l&&d&&d({action:h,location:k.location,delta:1})}function y(S,T){h="REPLACE";let _=WC(S)?S:Sg(k.location,S,T);f=p();let E=YC(_,f),M=k.createHref(_.mask||_);c.replaceState(E,"",M),l&&d&&d({action:h,location:k.location,delta:0})}function C(S){return uA(S)}let k={get action(){return h},get location(){return e(s,c)},listen(S){if(d)throw new Error("A history only accepts one active listener");return s.addEventListener(PC,g),d=S,()=>{s.removeEventListener(PC,g),d=null}},createHref(S){return t(s,S)},createURL:C,encodeLocation(S){let T=C(S);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:x,replace:y,go(S){return c.go(S)}};return k}function uA(e,t=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),ve(i,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:dc(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=i+a),new URL(a,i)}function P2(e,t,i="/"){return dA(e,t,i,!1)}function dA(e,t,i,a,s){let l=typeof t=="string"?Dl(t):t,c=ba(l.pathname||"/",i);if(c==null)return null;let h=fA(e),d=null,f=wA(c);for(let p=0;d==null&&p<h.length;++p)d=SA(h[p],f,a);return d}function fA(e){let t=W2(e);return pA(t),t}function W2(e,t=[],i=[],a="",s=!1){let l=(c,h,d=s,f)=>{let p={relativePath:f===void 0?c.path||"":f,caseSensitive:c.caseSensitive===!0,childrenIndex:h,route:c};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(a)&&d)return;ve(p.relativePath.startsWith(a),`Absolute route path "${p.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(a.length)}let g=kr([a,p.relativePath]),x=i.concat(p);c.children&&c.children.length>0&&(ve(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),W2(c.children,t,x,g,d)),!(c.path==null&&!c.index)&&t.push({path:g,score:kA(g,c.index),routesMeta:x})};return e.forEach((c,h)=>{if(c.path===""||!c.path?.includes("?"))l(c,h);else for(let d of Y2(c.path))l(c,h,!0,d)}),t}function Y2(e){let t=e.split("/");if(t.length===0)return[];let[i,...a]=t,s=i.endsWith("?"),l=i.replace(/\?$/,"");if(a.length===0)return s?[l,""]:[l];let c=Y2(a.join("/")),h=[];return h.push(...c.map(d=>d===""?l:[l,d].join("/"))),s&&h.push(...c),h.map(d=>e.startsWith("/")&&d===""?"/":d)}function pA(e){e.sort((t,i)=>t.score!==i.score?i.score-t.score:vA(t.routesMeta.map(a=>a.childrenIndex),i.routesMeta.map(a=>a.childrenIndex)))}var gA=/^:[\w-]+$/,mA=3,yA=2,xA=1,bA=10,CA=-2,GC=e=>e==="*";function kA(e,t){let i=e.split("/"),a=i.length;return i.some(GC)&&(a+=CA),t&&(a+=yA),i.filter(s=>!GC(s)).reduce((s,l)=>s+(gA.test(l)?mA:l===""?xA:bA),a)}function vA(e,t){return e.length===t.length&&e.slice(0,-1).every((a,s)=>a===t[s])?e[e.length-1]-t[t.length-1]:0}function SA(e,t,i=!1){let{routesMeta:a}=e,s={},l="/",c=[];for(let h=0;h<a.length;++h){let d=a[h],f=h===a.length-1,p=l==="/"?t:t.slice(l.length)||"/",g=Au({path:d.relativePath,caseSensitive:d.caseSensitive,end:f},p),x=d.route;if(!g&&f&&i&&!a[a.length-1].route.index&&(g=Au({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},p)),!g)return null;Object.assign(s,g.params),c.push({params:s,pathname:kr([l,g.pathname]),pathnameBase:LA(kr([l,g.pathnameBase])),route:x}),g.pathnameBase!=="/"&&(l=kr([l,g.pathnameBase]))}return c}function Au(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[i,a]=TA(e.path,e.caseSensitive,e.end),s=t.match(i);if(!s)return null;let l=s[0],c=l.replace(/(.)\/+$/,"$1"),h=s.slice(1);return{params:a.reduce((f,{paramName:p,isOptional:g},x)=>{if(p==="*"){let C=h[x]||"";c=l.slice(0,l.length-C.length).replace(/(.)\/+$/,"$1")}const y=h[x];return g&&!y?f[p]=void 0:f[p]=(y||"").replace(/%2F/g,"/"),f},{}),pathname:l,pathnameBase:c,pattern:e}}function TA(e,t=!1,i=!0){Tr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,h,d,f,p)=>{if(a.push({paramName:h,isOptional:d!=null}),d){let g=p.charAt(f+c.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),a]}function wA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Tr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ba(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let i=t.endsWith("/")?t.length-1:t.length,a=e.charAt(i);return a&&a!=="/"?null:e.slice(i)||"/"}var _A=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function BA(e,t="/"){let{pathname:i,search:a="",hash:s=""}=typeof e=="string"?Dl(e):e,l;return i?(i=G2(i),i.startsWith("/")?l=XC(i.substring(1),"/"):l=XC(i,t)):l=t,{pathname:l,search:AA(a),hash:MA(s)}}function XC(e,t){let i=Mu(t).split("/");return e.split("/").forEach(s=>{s===".."?i.length>1&&i.pop():s!=="."&&i.push(s)}),i.length>1?i.join("/"):"/"}function Qp(e,t,i,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function EA(e){return e.filter((t,i)=>i===0||t.route.path&&t.route.path.length>0)}function Mm(e){let t=EA(e);return t.map((i,a)=>a===t.length-1?i.pathname:i.pathnameBase)}function dd(e,t,i,a=!1){let s;typeof e=="string"?s=Dl(e):(s={...e},ve(!s.pathname||!s.pathname.includes("?"),Qp("?","pathname","search",s)),ve(!s.pathname||!s.pathname.includes("#"),Qp("#","pathname","hash",s)),ve(!s.search||!s.search.includes("#"),Qp("#","search","hash",s)));let l=e===""||s.pathname==="",c=l?"/":s.pathname,h;if(c==null)h=i;else{let g=t.length-1;if(!a&&c.startsWith("..")){let x=c.split("/");for(;x[0]==="..";)x.shift(),g-=1;s.pathname=x.join("/")}h=g>=0?t[g]:"/"}let d=BA(s,h),f=c&&c!=="/"&&c.endsWith("/"),p=(l||c===".")&&i.endsWith("/");return!d.pathname.endsWith("/")&&(f||p)&&(d.pathname+="/"),d}var G2=e=>e.replace(/\/\/+/g,"/"),kr=e=>G2(e.join("/")),Mu=e=>e.replace(/\/+$/,""),LA=e=>Mu(e).replace(/^\/*/,"/"),AA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,MA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,RA=class{constructor(e,t,i,a=!1){this.status=e,this.statusText=t||"",this.internal=a,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function OA(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function FA(e){let t=e.map(i=>i.route.path).filter(Boolean);return kr(t)||"/"}var X2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function V2(e,t){let i=e;if(typeof i!="string"||!_A.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let a=i,s=!1;if(X2)try{let l=new URL(window.location.href),c=i.startsWith("//")?new URL(l.protocol+i):new URL(i),h=ba(c.pathname,t);c.origin===l.origin&&h!=null?i=h+c.search+c.hash:s=!0}catch{Tr(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:s,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Z2=["POST","PUT","PATCH","DELETE"];new Set(Z2);var DA=["GET",...Z2];new Set(DA);var $l=I.createContext(null);$l.displayName="DataRouter";var fd=I.createContext(null);fd.displayName="DataRouterState";var Q2=I.createContext(!1);function $A(){return I.useContext(Q2)}var K2=I.createContext({isTransitioning:!1});K2.displayName="ViewTransition";var zA=I.createContext(new Map);zA.displayName="Fetchers";var NA=I.createContext(null);NA.displayName="Await";var Gi=I.createContext(null);Gi.displayName="Navigation";var wc=I.createContext(null);wc.displayName="Location";var or=I.createContext({outlet:null,matches:[],isDataRoute:!1});or.displayName="Route";var Rm=I.createContext(null);Rm.displayName="RouteError";var J2="REACT_ROUTER_ERROR",qA="REDIRECT",IA="ROUTE_ERROR_RESPONSE";function HA(e){if(e.startsWith(`${J2}:${qA}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function UA(e){if(e.startsWith(`${J2}:${IA}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new RA(t.status,t.statusText,t.data)}catch{}}function jA(e,{relative:t}={}){ve(zl(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:a}=I.useContext(Gi),{hash:s,pathname:l,search:c}=Bc(e,{relative:t}),h=l;return i!=="/"&&(h=l==="/"?i:kr([i,l])),a.createHref({pathname:h,search:c,hash:s})}function zl(){return I.useContext(wc)!=null}function _r(){return ve(zl(),"useLocation() may be used only in the context of a <Router> component."),I.useContext(wc).location}var tk="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ek(e){I.useContext(Gi).static||I.useLayoutEffect(e)}function _c(){let{isDataRoute:e}=I.useContext(or);return e?n3():PA()}function PA(){ve(zl(),"useNavigate() may be used only in the context of a <Router> component.");let e=I.useContext($l),{basename:t,navigator:i}=I.useContext(Gi),{matches:a}=I.useContext(or),{pathname:s}=_r(),l=JSON.stringify(Mm(a)),c=I.useRef(!1);return ek(()=>{c.current=!0}),I.useCallback((d,f={})=>{if(Tr(c.current,tk),!c.current)return;if(typeof d=="number"){i.go(d);return}let p=dd(d,JSON.parse(l),s,f.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:kr([t,p.pathname])),(f.replace?i.replace:i.push)(p,f.state,f)},[t,i,l,s,e])}var WA=I.createContext(null);function YA(e){let t=I.useContext(or).outlet;return I.useMemo(()=>t&&I.createElement(WA.Provider,{value:e},t),[t,e])}function GA(){let{matches:e}=I.useContext(or);return e[e.length-1]?.params??{}}function Bc(e,{relative:t}={}){let{matches:i}=I.useContext(or),{pathname:a}=_r(),s=JSON.stringify(Mm(i));return I.useMemo(()=>dd(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function XA(e,t){return ik(e,t)}function ik(e,t,i){ve(zl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=I.useContext(Gi),{matches:s}=I.useContext(or),l=s[s.length-1],c=l?l.params:{},h=l?l.pathname:"/",d=l?l.pathnameBase:"/",f=l&&l.route;{let S=f&&f.path||"";ak(h,!f||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${S}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
11
+
12
+ Please change the parent <Route path="${S}"> to <Route path="${S==="/"?"*":`${S}/*`}">.`)}let p=_r(),g;if(t){let S=typeof t=="string"?Dl(t):t;ve(d==="/"||S.pathname?.startsWith(d),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${S.pathname}" was given in the \`location\` prop.`),g=S}else g=p;let x=g.pathname||"/",y=x;if(d!=="/"){let S=d.replace(/^\//,"").split("/");y="/"+x.replace(/^\//,"").split("/").slice(S.length).join("/")}let C=i&&i.state.matches.length?i.state.matches.map(S=>Object.assign(S,{route:i.manifest[S.route.id]||S.route})):P2(e,{pathname:y});Tr(f||C!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Tr(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let k=JA(C&&C.map(S=>Object.assign({},S,{params:Object.assign({},c,S.params),pathname:kr([d,a.encodeLocation?a.encodeLocation(S.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?d:kr([d,a.encodeLocation?a.encodeLocation(S.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),s,i);return t&&k?I.createElement(wc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...g},navigationType:"POP"}},k):k}function VA(){let e=a3(),t=OA(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},l={padding:"2px 4px",backgroundColor:a},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=I.createElement(I.Fragment,null,I.createElement("p",null,"💿 Hey developer 👋"),I.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",I.createElement("code",{style:l},"ErrorBoundary")," or"," ",I.createElement("code",{style:l},"errorElement")," prop on your route.")),I.createElement(I.Fragment,null,I.createElement("h2",null,"Unexpected Application Error!"),I.createElement("h3",{style:{fontStyle:"italic"}},t),i?I.createElement("pre",{style:s},i):null,c)}var ZA=I.createElement(VA,null),rk=class extends I.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const i=UA(e.digest);i&&(e=i)}let t=e!==void 0?I.createElement(or.Provider,{value:this.props.routeContext},I.createElement(Rm.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?I.createElement(QA,{error:e},t):t}};rk.contextType=Q2;var Kp=new WeakMap;function QA({children:e,error:t}){let{basename:i}=I.useContext(Gi);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=HA(t.digest);if(a){let s=Kp.get(t);if(s)throw s;let l=V2(a.location,i);if(X2&&!Kp.get(t))if(l.isExternal||a.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:a.replace}));throw Kp.set(t,c),c}return I.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return e}function KA({routeContext:e,match:t,children:i}){let a=I.useContext($l);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),I.createElement(or.Provider,{value:e},i)}function JA(e,t=[],i){let a=i?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let s=e,l=a?.errors;if(l!=null){let p=s.findIndex(g=>g.route.id&&l?.[g.route.id]!==void 0);ve(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),s=s.slice(0,Math.min(s.length,p+1))}let c=!1,h=-1;if(i&&a){c=a.renderFallback;for(let p=0;p<s.length;p++){let g=s[p];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(h=p),g.route.id){let{loaderData:x,errors:y}=a,C=g.route.loader&&!x.hasOwnProperty(g.route.id)&&(!y||y[g.route.id]===void 0);if(g.route.lazy||C){i.isStatic&&(c=!0),h>=0?s=s.slice(0,h+1):s=[s[0]];break}}}}let d=i?.onError,f=a&&d?(p,g)=>{d(p,{location:a.location,params:a.matches?.[0]?.params??{},pattern:FA(a.matches),errorInfo:g})}:void 0;return s.reduceRight((p,g,x)=>{let y,C=!1,k=null,S=null;a&&(y=l&&g.route.id?l[g.route.id]:void 0,k=g.route.errorElement||ZA,c&&(h<0&&x===0?(ak("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,S=null):h===x&&(C=!0,S=g.route.hydrateFallbackElement||null)));let T=t.concat(s.slice(0,x+1)),_=()=>{let E;return y?E=k:C?E=S:g.route.Component?E=I.createElement(g.route.Component,null):g.route.element?E=g.route.element:E=p,I.createElement(KA,{match:g,routeContext:{outlet:p,matches:T,isDataRoute:a!=null},children:E})};return a&&(g.route.ErrorBoundary||g.route.errorElement||x===0)?I.createElement(rk,{location:a.location,revalidation:a.revalidation,component:k,error:y,children:_(),routeContext:{outlet:null,matches:T,isDataRoute:!0},onError:f}):_()},null)}function Om(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function t3(e){let t=I.useContext($l);return ve(t,Om(e)),t}function e3(e){let t=I.useContext(fd);return ve(t,Om(e)),t}function i3(e){let t=I.useContext(or);return ve(t,Om(e)),t}function Fm(e){let t=i3(e),i=t.matches[t.matches.length-1];return ve(i.route.id,`${e} can only be used on routes that contain a unique "id"`),i.route.id}function r3(){return Fm("useRouteId")}function a3(){let e=I.useContext(Rm),t=e3("useRouteError"),i=Fm("useRouteError");return e!==void 0?e:t.errors?.[i]}function n3(){let{router:e}=t3("useNavigate"),t=Fm("useNavigate"),i=I.useRef(!1);return ek(()=>{i.current=!0}),I.useCallback(async(s,l={})=>{Tr(i.current,tk),i.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...l}))},[e,t])}var VC={};function ak(e,t,i){!t&&!VC[e]&&(VC[e]=!0,Tr(!1,i))}I.memo(s3);function s3({routes:e,manifest:t,future:i,state:a,isStatic:s,onError:l}){return ik(e,void 0,{manifest:t,state:a,isStatic:s,onError:l})}function l3({to:e,replace:t,state:i,relative:a}){ve(zl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=I.useContext(Gi);Tr(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:l}=I.useContext(or),{pathname:c}=_r(),h=_c(),d=dd(e,Mm(l),c,a==="path"),f=JSON.stringify(d);return I.useEffect(()=>{h(JSON.parse(f),{replace:t,state:i,relative:a})},[h,f,a,t,i]),null}function o3(e){return YA(e.context)}function Un(e){ve(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function c3({basename:e="/",children:t=null,location:i,navigationType:a="POP",navigator:s,static:l=!1,useTransitions:c}){ve(!zl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=e.replace(/^\/*/,"/"),d=I.useMemo(()=>({basename:h,navigator:s,static:l,useTransitions:c,future:{}}),[h,s,l,c]);typeof i=="string"&&(i=Dl(i));let{pathname:f="/",search:p="",hash:g="",state:x=null,key:y="default",mask:C}=i,k=I.useMemo(()=>{let S=ba(f,h);return S==null?null:{location:{pathname:S,search:p,hash:g,state:x,key:y,mask:C},navigationType:a}},[h,f,p,g,x,y,a,C]);return Tr(k!=null,`<Router basename="${h}"> is not able to match the URL "${f}${p}${g}" because it does not start with the basename, so the <Router> won't render anything.`),k==null?null:I.createElement(Gi.Provider,{value:d},I.createElement(wc.Provider,{children:t,value:k}))}function h3({children:e,location:t}){return XA(Tg(e),t)}function Tg(e,t=[]){let i=[];return I.Children.forEach(e,(a,s)=>{if(!I.isValidElement(a))return;let l=[...t,s];if(a.type===I.Fragment){i.push.apply(i,Tg(a.props.children,l));return}ve(a.type===Un,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ve(!a.props.index||!a.props.children,"An index route cannot have child routes.");let c={id:a.props.id||l.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(c.children=Tg(a.props.children,l)),i.push(c)}),i}var pu="get",gu="application/x-www-form-urlencoded";function pd(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function u3(e){return pd(e)&&e.tagName.toLowerCase()==="button"}function d3(e){return pd(e)&&e.tagName.toLowerCase()==="form"}function f3(e){return pd(e)&&e.tagName.toLowerCase()==="input"}function p3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function g3(e,t){return e.button===0&&(!t||t==="_self")&&!p3(e)}var tu=null;function m3(){if(tu===null)try{new FormData(document.createElement("form"),0),tu=!1}catch{tu=!0}return tu}var y3=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Jp(e){return e!=null&&!y3.has(e)?(Tr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${gu}"`),null):e}function x3(e,t){let i,a,s,l,c;if(d3(e)){let h=e.getAttribute("action");a=h?ba(h,t):null,i=e.getAttribute("method")||pu,s=Jp(e.getAttribute("enctype"))||gu,l=new FormData(e)}else if(u3(e)||f3(e)&&(e.type==="submit"||e.type==="image")){let h=e.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||h.getAttribute("action");if(a=d?ba(d,t):null,i=e.getAttribute("formmethod")||h.getAttribute("method")||pu,s=Jp(e.getAttribute("formenctype"))||Jp(h.getAttribute("enctype"))||gu,l=new FormData(h,e),!m3()){let{name:f,type:p,value:g}=e;if(p==="image"){let x=f?`${f}.`:"";l.append(`${x}x`,"0"),l.append(`${x}y`,"0")}else f&&l.append(f,g)}}else{if(pd(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=pu,a=null,s=gu,c=e}return l&&s==="text/plain"&&(c=l,l=void 0),{action:a,method:i.toLowerCase(),encType:s,formData:l,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Dm(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function nk(e,t,i,a){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return i?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${a}`:s.pathname=`${s.pathname}.${a}`:s.pathname==="/"?s.pathname=`_root.${a}`:t&&ba(s.pathname,t)==="/"?s.pathname=`${Mu(t)}/_root.${a}`:s.pathname=`${Mu(s.pathname)}.${a}`,s}async function b3(e,t){if(e.id in t)return t[e.id];try{let i=await import(e.module);return t[e.id]=i,i}catch(i){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function C3(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function k3(e,t,i){let a=await Promise.all(e.map(async s=>{let l=t.routes[s.route.id];if(l){let c=await b3(l,i);return c.links?c.links():[]}return[]}));return w3(a.flat(1).filter(C3).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function ZC(e,t,i,a,s,l){let c=(d,f)=>i[f]?d.route.id!==i[f].route.id:!0,h=(d,f)=>i[f].pathname!==d.pathname||i[f].route.path?.endsWith("*")&&i[f].params["*"]!==d.params["*"];return l==="assets"?t.filter((d,f)=>c(d,f)||h(d,f)):l==="data"?t.filter((d,f)=>{let p=a.routes[d.route.id];if(!p||!p.hasLoader)return!1;if(c(d,f)||h(d,f))return!0;if(d.route.shouldRevalidate){let g=d.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:i[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function v3(e,t,{includeHydrateFallback:i}={}){return S3(e.map(a=>{let s=t.routes[a.route.id];if(!s)return[];let l=[s.module];return s.clientActionModule&&(l=l.concat(s.clientActionModule)),s.clientLoaderModule&&(l=l.concat(s.clientLoaderModule)),i&&s.hydrateFallbackModule&&(l=l.concat(s.hydrateFallbackModule)),s.imports&&(l=l.concat(s.imports)),l}).flat(1))}function S3(e){return[...new Set(e)]}function T3(e){let t={},i=Object.keys(e).sort();for(let a of i)t[a]=e[a];return t}function w3(e,t){let i=new Set;return new Set(t),e.reduce((a,s)=>{let l=JSON.stringify(T3(s));return i.has(l)||(i.add(l),a.push({key:l,link:s})),a},[])}function $m(){let e=I.useContext($l);return Dm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function _3(){let e=I.useContext(fd);return Dm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var zm=I.createContext(void 0);zm.displayName="FrameworkContext";function Nm(){let e=I.useContext(zm);return Dm(e,"You must render this element inside a <HydratedRouter> element"),e}function B3(e,t){let i=I.useContext(zm),[a,s]=I.useState(!1),[l,c]=I.useState(!1),{onFocus:h,onBlur:d,onMouseEnter:f,onMouseLeave:p,onTouchStart:g}=t,x=I.useRef(null);I.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let k=T=>{T.forEach(_=>{c(_.isIntersecting)})},S=new IntersectionObserver(k,{threshold:.5});return x.current&&S.observe(x.current),()=>{S.disconnect()}}},[e]),I.useEffect(()=>{if(a){let k=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(k)}}},[a]);let y=()=>{s(!0)},C=()=>{s(!1),c(!1)};return i?e!=="intent"?[l,x,{}]:[l,x,{onFocus:qo(h,y),onBlur:qo(d,C),onMouseEnter:qo(f,y),onMouseLeave:qo(p,C),onTouchStart:qo(g,y)}]:[!1,x,{}]}function qo(e,t){return i=>{e&&e(i),i.defaultPrevented||t(i)}}function E3({page:e,...t}){let i=$A(),{router:a}=$m(),s=I.useMemo(()=>P2(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?i?I.createElement(A3,{page:e,matches:s,...t}):I.createElement(M3,{page:e,matches:s,...t}):null}function L3(e){let{manifest:t,routeModules:i}=Nm(),[a,s]=I.useState([]);return I.useEffect(()=>{let l=!1;return k3(e,t,i).then(c=>{l||s(c)}),()=>{l=!0}},[e,t,i]),a}function A3({page:e,matches:t,...i}){let a=_r(),{future:s}=Nm(),{basename:l}=$m(),c=I.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let h=nk(e,l,s.unstable_trailingSlashAwareDataRequests,"rsc"),d=!1,f=[];for(let p of t)typeof p.route.shouldRevalidate=="function"?d=!0:f.push(p.route.id);return d&&f.length>0&&h.searchParams.set("_routes",f.join(",")),[h.pathname+h.search]},[l,s.unstable_trailingSlashAwareDataRequests,e,a,t]);return I.createElement(I.Fragment,null,c.map(h=>I.createElement("link",{key:h,rel:"prefetch",as:"fetch",href:h,...i})))}function M3({page:e,matches:t,...i}){let a=_r(),{future:s,manifest:l,routeModules:c}=Nm(),{basename:h}=$m(),{loaderData:d,matches:f}=_3(),p=I.useMemo(()=>ZC(e,t,f,l,a,"data"),[e,t,f,l,a]),g=I.useMemo(()=>ZC(e,t,f,l,a,"assets"),[e,t,f,l,a]),x=I.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let k=new Set,S=!1;if(t.forEach(_=>{let E=l.routes[_.route.id];!E||!E.hasLoader||(!p.some(M=>M.route.id===_.route.id)&&_.route.id in d&&c[_.route.id]?.shouldRevalidate||E.hasClientLoader?S=!0:k.add(_.route.id))}),k.size===0)return[];let T=nk(e,h,s.unstable_trailingSlashAwareDataRequests,"data");return S&&k.size>0&&T.searchParams.set("_routes",t.filter(_=>k.has(_.route.id)).map(_=>_.route.id).join(",")),[T.pathname+T.search]},[h,s.unstable_trailingSlashAwareDataRequests,d,a,l,p,t,e,c]),y=I.useMemo(()=>v3(g,l),[g,l]),C=L3(g);return I.createElement(I.Fragment,null,x.map(k=>I.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...i})),y.map(k=>I.createElement("link",{key:k,rel:"modulepreload",href:k,...i})),C.map(({key:k,link:S})=>I.createElement("link",{key:k,nonce:i.nonce,...S,crossOrigin:S.crossOrigin??i.crossOrigin})))}function R3(...e){return t=>{e.forEach(i=>{typeof i=="function"?i(t):i!=null&&(i.current=t)})}}var O3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{O3&&(window.__reactRouterVersion="7.15.1")}catch{}function F3({basename:e,children:t,useTransitions:i,window:a}){let s=I.useRef();s.current==null&&(s.current=oA({window:a,v5Compat:!0}));let l=s.current,[c,h]=I.useState({action:l.action,location:l.location}),d=I.useCallback(f=>{i===!1?h(f):I.startTransition(()=>h(f))},[i]);return I.useLayoutEffect(()=>l.listen(d),[l,d]),I.createElement(c3,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:l,useTransitions:i})}var sk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,lk=I.forwardRef(function({onClick:t,discover:i="render",prefetch:a="none",relative:s,reloadDocument:l,replace:c,mask:h,state:d,target:f,to:p,preventScrollReset:g,viewTransition:x,defaultShouldRevalidate:y,...C},k){let{basename:S,navigator:T,useTransitions:_}=I.useContext(Gi),E=typeof p=="string"&&sk.test(p),M=V2(p,S);p=M.to;let O=jA(p,{relative:s}),N=_r(),H=null;if(h){let P=dd(h,[],N.mask?N.mask.pathname:"/",!0);S!=="/"&&(P.pathname=P.pathname==="/"?S:kr([S,P.pathname])),H=T.createHref(P)}let[j,lt,G]=B3(a,C),D=z3(p,{replace:c,mask:h,state:d,target:f,preventScrollReset:g,relative:s,viewTransition:x,defaultShouldRevalidate:y,useTransitions:_});function Z(P){t&&t(P),P.defaultPrevented||D(P)}let tt=!(M.isExternal||l),W=I.createElement("a",{...C,...G,href:(tt?H:void 0)||M.absoluteURL||O,onClick:tt?Z:t,ref:R3(k,lt),target:f,"data-discover":!E&&i==="render"?"true":void 0});return j&&!E?I.createElement(I.Fragment,null,W,I.createElement(E3,{page:O})):W});lk.displayName="Link";var ok=I.forwardRef(function({"aria-current":t="page",caseSensitive:i=!1,className:a="",end:s=!1,style:l,to:c,viewTransition:h,children:d,...f},p){let g=Bc(c,{relative:f.relative}),x=_r(),y=I.useContext(fd),{navigator:C,basename:k}=I.useContext(Gi),S=y!=null&&U3(g)&&h===!0,T=C.encodeLocation?C.encodeLocation(g).pathname:g.pathname,_=x.pathname,E=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;i||(_=_.toLowerCase(),E=E?E.toLowerCase():null,T=T.toLowerCase()),E&&k&&(E=ba(E,k)||E);const M=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let O=_===T||!s&&_.startsWith(T)&&_.charAt(M)==="/",N=E!=null&&(E===T||!s&&E.startsWith(T)&&E.charAt(T.length)==="/"),H={isActive:O,isPending:N,isTransitioning:S},j=O?t:void 0,lt;typeof a=="function"?lt=a(H):lt=[a,O?"active":null,N?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let G=typeof l=="function"?l(H):l;return I.createElement(lk,{...f,"aria-current":j,className:lt,ref:p,style:G,to:c,viewTransition:h},typeof d=="function"?d(H):d)});ok.displayName="NavLink";var D3=I.forwardRef(({discover:e="render",fetcherKey:t,navigate:i,reloadDocument:a,replace:s,state:l,method:c=pu,action:h,onSubmit:d,relative:f,preventScrollReset:p,viewTransition:g,defaultShouldRevalidate:x,...y},C)=>{let{useTransitions:k}=I.useContext(Gi),S=I3(),T=H3(h,{relative:f}),_=c.toLowerCase()==="get"?"get":"post",E=typeof h=="string"&&sk.test(h),M=O=>{if(d&&d(O),O.defaultPrevented)return;O.preventDefault();let N=O.nativeEvent.submitter,H=N?.getAttribute("formmethod")||c,j=()=>S(N||O.currentTarget,{fetcherKey:t,method:H,navigate:i,replace:s,state:l,relative:f,preventScrollReset:p,viewTransition:g,defaultShouldRevalidate:x});k&&i!==!1?I.startTransition(()=>j()):j()};return I.createElement("form",{ref:C,method:_,action:T,onSubmit:a?d:M,...y,"data-discover":!E&&e==="render"?"true":void 0})});D3.displayName="Form";function $3(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ck(e){let t=I.useContext($l);return ve(t,$3(e)),t}function z3(e,{target:t,replace:i,mask:a,state:s,preventScrollReset:l,relative:c,viewTransition:h,defaultShouldRevalidate:d,useTransitions:f}={}){let p=_c(),g=_r(),x=Bc(e,{relative:c});return I.useCallback(y=>{if(g3(y,t)){y.preventDefault();let C=i!==void 0?i:dc(g)===dc(x),k=()=>p(e,{replace:C,mask:a,state:s,preventScrollReset:l,relative:c,viewTransition:h,defaultShouldRevalidate:d});f?I.startTransition(()=>k()):k()}},[g,p,x,i,a,s,t,e,l,c,h,d,f])}var N3=0,q3=()=>`__${String(++N3)}__`;function I3(){let{router:e}=ck("useSubmit"),{basename:t}=I.useContext(Gi),i=r3(),a=e.fetch,s=e.navigate;return I.useCallback(async(l,c={})=>{let{action:h,method:d,encType:f,formData:p,body:g}=x3(l,t);if(c.navigate===!1){let x=c.fetcherKey||q3();await a(x,i,c.action||h,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:p,body:g,formMethod:c.method||d,formEncType:c.encType||f,flushSync:c.flushSync})}else await s(c.action||h,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:p,body:g,formMethod:c.method||d,formEncType:c.encType||f,replace:c.replace,state:c.state,fromRouteId:i,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,s,t,i])}function H3(e,{relative:t}={}){let{basename:i}=I.useContext(Gi),a=I.useContext(or);ve(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),l={...Bc(e||".",{relative:t})},c=_r();if(e==null){l.search=c.search;let h=new URLSearchParams(l.search),d=h.getAll("index");if(d.some(p=>p==="")){h.delete("index"),d.filter(g=>g).forEach(g=>h.append("index",g));let p=h.toString();l.search=p?`?${p}`:""}}return(!e||e===".")&&s.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(l.pathname=l.pathname==="/"?i:kr([i,l.pathname])),dc(l)}function U3(e,{relative:t}={}){let i=I.useContext(K2);ve(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=ck("useViewTransitionState"),s=Bc(e,{relative:t});if(!i.isTransitioning)return!1;let l=ba(i.currentLocation.pathname,a)||i.currentLocation.pathname,c=ba(i.nextLocation.pathname,a)||i.nextLocation.pathname;return Au(s.pathname,c)!=null||Au(s.pathname,l)!=null}const j3="",P3=`ws://${window.location.host}`;class W3{baseUrl;wsBaseUrl;apiKey;ws=null;wsHandlers=new Map;constructor(t=j3,i=P3){this.baseUrl=t,this.wsBaseUrl=i,this.apiKey=""}setApiKey(t){this.apiKey=t}headers(){const t={"Content-Type":"application/json"};return this.apiKey&&(t.Authorization=`Bearer ${this.apiKey}`),t}authHeaders(){const t={};return this.apiKey&&(t.Authorization=`Bearer ${this.apiKey}`),t}async health(){return(await fetch(`${this.baseUrl}/health`)).json()}async chatCompletions(t){if(t.stream)return this.chatCompletionsSSE(t);const i=await fetch(`${this.baseUrl}/v1/chat/completions`,{method:"POST",headers:this.headers(),body:JSON.stringify({model:t.model??"aggroot",messages:t.messages,stream:!1,chatId:t.chatId}),signal:t.signal});if(!i.ok){const l=await i.json().catch(()=>({error:{message:i.statusText}}));t.onError?.(l.error?.message??"Request failed");return}const a=await i.json(),s={v:1,id:a.id,type:"stream.content",payload:{content:a.choices?.[0]?.message?.content??"",messageId:a.id},ts:Date.now(),sessionId:t.chatId??""};t.onChunk?.(s),t.onDone?.()}async chatCompletionsSSE(t){const i=await fetch(`${this.baseUrl}/v1/chat/completions`,{method:"POST",headers:this.headers(),body:JSON.stringify({model:t.model??"aggroot",messages:t.messages,stream:!0,chatId:t.chatId}),signal:t.signal});if(!i.ok){const h=await i.json().catch(()=>({error:{message:i.statusText}}));t.onError?.(h.error?.message??"Request failed");return}const a=i.body?.getReader();if(!a){t.onError?.("No response body");return}const s=new TextDecoder;let l="",c="";for(;;){const{done:h,value:d}=await a.read();if(h)break;l+=s.decode(d,{stream:!0});const f=l.split(`
13
+ `);l=f.pop()??"";for(const p of f)if(p.startsWith("event: "))c=p.slice(7).trim();else if(p.startsWith("data: ")){const g=p.slice(6).trim();if(g==="[DONE]"){t.onDone?.();return}try{const x=JSON.parse(g);if(c==="tool_result")t.onToolResult?.(x);else if(c==="status")t.onStatus?.(x);else if(c==="subagent")t.onSubagent?.(x);else if(c==="tool_use")t.onToolUse?.(x);else{const y=x.choices?.[0]?.delta;if(y){if(y.content){const C={v:1,id:x.id,type:"stream.content",payload:{content:y.content,messageId:x.id},ts:(x.created??0)*1e3,sessionId:t.chatId??""};t.onChunk?.(C)}if(y.reasoning_content){const C={v:1,id:x.id,type:"stream.reasoning",payload:{content:y.reasoning_content,messageId:x.id},ts:(x.created??0)*1e3,sessionId:t.chatId??""};t.onChunk?.(C)}if(y.tool_calls)for(const C of y.tool_calls){const k={v:1,id:x.id,type:"stream.tool_call",payload:{toolCallId:C.id,toolName:C.function?.name,argsPreview:C.function?.arguments,riskLevel:"safe"},ts:(x.created??0)*1e3,sessionId:t.chatId??""};t.onChunk?.(k)}}}}catch{}c=""}else p.trim()===""&&(c="")}t.onDone?.()}async listSessions(){return((await(await fetch(`${this.baseUrl}/api/sessions`,{headers:this.authHeaders()})).json()).sessions??[]).map(s=>({id:s.id??s.sessionId,name:s.name,agentName:s.agentName??s.agentType,agentType:s.agentType??s.agentName,messageCount:s.messageCount??0,createdAt:s.createdAt}))}async createSession(t,i){const s=await(await fetch(`${this.baseUrl}/api/sessions`,{method:"POST",headers:this.headers(),body:JSON.stringify({name:t,agentType:i})})).json();return{id:s.id??s.sessionId,name:s.name,agentName:s.agentName??s.agentType,agentType:s.agentType??s.agentName,createdAt:s.createdAt}}async listModels(){return(await(await fetch(`${this.baseUrl}/v1/models`,{headers:this.authHeaders()})).json()).data??[]}async switchModel(t){return(await fetch(`${this.baseUrl}/api/models/switch`,{method:"POST",headers:this.headers(),body:JSON.stringify({modelId:t})})).json()}async getStatus(){return(await fetch(`${this.baseUrl}/api/status`,{headers:this.authHeaders()})).json()}async deleteSession(t){const i=await fetch(`${this.baseUrl}/api/sessions/${t}`,{method:"DELETE",headers:this.authHeaders()});if(!i.ok){const a=await i.json().catch(()=>({error:{message:i.statusText}}));throw new Error(a.error?.message??`Delete failed: ${i.status}`)}return i.json()}async deleteAllSessions(){const t=await fetch(`${this.baseUrl}/api/sessions`,{method:"DELETE",headers:this.authHeaders()});if(!t.ok){const i=await t.json().catch(()=>({error:{message:t.statusText}}));throw new Error(i.error?.message??`Delete all failed: ${t.status}`)}return t.json()}async clearSession(t){const i=await fetch(`${this.baseUrl}/api/sessions/${t}/clear`,{method:"POST",headers:this.authHeaders()});if(!i.ok){const a=await i.json().catch(()=>({error:{message:i.statusText}}));throw new Error(a.error?.message??`Clear failed: ${i.status}`)}return i.json()}async renameSession(t,i){return(await fetch(`${this.baseUrl}/api/sessions/${t}`,{method:"PATCH",headers:this.headers(),body:JSON.stringify({name:i})})).json()}async activateSession(t){return(await fetch(`${this.baseUrl}/api/sessions/${t}/activate`,{method:"POST",headers:this.authHeaders()})).json()}async fetchMessages(t){return(await(await fetch(`${this.baseUrl}/api/sessions/${t}/messages`,{headers:this.authHeaders()})).json()).messages??[]}async listAgents(){return(await fetch(`${this.baseUrl}/api/agents`,{headers:this.authHeaders()})).json()}async switchAgent(t){return(await fetch(`${this.baseUrl}/api/agents/switch`,{method:"POST",headers:this.headers(),body:JSON.stringify({agentName:t})})).json()}async getSettings(){return(await fetch(`${this.baseUrl}/api/settings`,{headers:this.authHeaders()})).json()}async updateSettings(t){return(await fetch(`${this.baseUrl}/api/settings`,{method:"PATCH",headers:this.headers(),body:JSON.stringify(t)})).json()}async addCustomModel(t){return(await fetch(`${this.baseUrl}/api/custom-models`,{method:"POST",headers:this.headers(),body:JSON.stringify(t)})).json()}async removeCustomModel(t){return(await fetch(`${this.baseUrl}/api/custom-models/${encodeURIComponent(t)}`,{method:"DELETE",headers:this.authHeaders()})).json()}async abort(){return(await fetch(`${this.baseUrl}/api/abort`,{method:"POST",headers:this.authHeaders()})).json()}async respondApproval(t,i){await fetch(`${this.baseUrl}/api/approval/respond`,{method:"POST",headers:this.headers(),body:JSON.stringify({requestId:t,approved:i})})}connectWebSocket(t,i){const a=`${this.wsBaseUrl}/ws`,s=new WebSocket(a);return this.ws=s,s.onopen=()=>{this.wsHandlers.set(t,i)},s.onmessage=l=>{try{const c=JSON.parse(l.data);i(c)}catch{}},s.onclose=()=>{this.wsHandlers.delete(t),this.ws=null},()=>{s.close()}}sendWebSocketMessage(t,i){if(!this.ws||this.ws.readyState!==WebSocket.OPEN)return;const a={v:1,id:`msg_${Date.now()}`,type:"chat.send",payload:{message:i},ts:Date.now(),sessionId:t};this.ws.send(JSON.stringify(a))}}const me=new W3,hk=I.createContext({currentSession:null,contextPercentage:0,status:null,setCurrentSession:()=>{},refreshStatus:async()=>{},getMessageCache:()=>[],setMessageCache:()=>{},clearMessageCache:()=>{}});function gd(){return I.useContext(hk)}function Y3({children:e}){const[t,i]=I.useState(null),[a,s]=I.useState(null),[l,c]=I.useState(0),h=_c(),d=_r(),f=I.useRef(!1),p=I.useRef(new Map),g=I.useCallback(k=>p.current.get(k)??[],[]),x=I.useCallback((k,S)=>{p.current.set(k,S)},[]),y=I.useCallback(k=>{p.current.delete(k)},[]),C=I.useCallback(async()=>{try{const k=await me.getStatus();i(k),c(k.contextPercentage??0),k.currentSession?(s({id:k.currentSession.id,name:k.currentSession.name,messageCount:k.currentSession.messageCount}),f.current||(f.current=!0,d.pathname==="/chat"&&h(`/chat/${k.currentSession.id}`,{replace:!0}))):f.current=!0}catch{}},[h,d.pathname]);return I.useEffect(()=>{C();const k=setInterval(C,3e3);return()=>clearInterval(k)},[C]),z.jsx(hk.Provider,{value:{currentSession:a,contextPercentage:l,status:t,setCurrentSession:s,refreshStatus:C,getMessageCache:g,setMessageCache:x,clearMessageCache:y},children:e})}const G3=[{to:"/chat",label:"Chat",icon:"💬"},{to:"/sessions",label:"Sessions",icon:"📋"},{to:"/settings",label:"Settings",icon:"⚙️"}];function X3(){const{currentSession:e,contextPercentage:t,status:i,setCurrentSession:a,refreshStatus:s}=gd(),l=_c(),c=t??0,h=c>50?"var(--safe)":c>20?"var(--moderate)":"var(--dangerous)";return z.jsxs("div",{style:{display:"flex",height:"100vh"},children:[z.jsxs("nav",{style:{width:220,minWidth:220,background:"var(--bg-secondary)",borderRight:"1px solid var(--border)",display:"flex",flexDirection:"column",padding:"12px 0"},children:[z.jsxs("div",{style:{padding:"12px 16px",fontSize:18,fontWeight:700,borderBottom:"1px solid var(--border)",marginBottom:8},children:[z.jsx("span",{className:"gradient-text",children:"AggRoot"}),z.jsxs("span",{style:{fontSize:11,fontWeight:400,color:"var(--text-tertiary)",marginLeft:6},children:["v","1.8.9"]})]}),G3.map(d=>z.jsxs(ok,{to:d.to,style:({isActive:f})=>({display:"flex",alignItems:"center",gap:10,padding:"10px 16px",color:f?"var(--text-primary)":"var(--text-secondary)",background:f?"var(--bg-hover)":"transparent",textDecoration:"none",fontSize:14,borderLeft:f?"2px solid var(--accent)":"2px solid transparent",transition:"all 0.15s"}),children:[z.jsx("span",{children:d.icon}),z.jsx("span",{children:d.label})]},d.to)),z.jsx("div",{style:{flex:1}}),z.jsxs("div",{style:{padding:"12px 16px",borderTop:"1px solid var(--border)",fontSize:12,color:"var(--text-muted)"},children:[z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:10},children:[z.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:i?"var(--emerald)":"var(--text-muted)",boxShadow:i?"0 0 6px var(--emerald)":"none"}}),i?"Connected":"Disconnected"]}),e?z.jsxs("div",{onClick:()=>l(`/chat/${e.id}`),style:{padding:"8px 10px",background:"var(--accent-soft)",borderRadius:"var(--radius)",cursor:"pointer",transition:"background 0.15s",marginBottom:8,border:"1px solid rgba(99, 102, 241, 0.15)"},onMouseEnter:d=>d.currentTarget.style.background="var(--bg-hover)",onMouseLeave:d=>d.currentTarget.style.background="var(--accent-soft)",children:[z.jsx("div",{style:{fontSize:10,color:"var(--accent)",marginBottom:2,fontWeight:600},children:"Current Session"}),z.jsx("div",{style:{color:"var(--text-secondary)",fontSize:12,fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),z.jsxs("div",{style:{fontSize:10,color:"var(--text-muted)",marginTop:2},children:[e.messageCount," messages"]})]}):z.jsx("div",{style:{padding:"8px 10px",background:"var(--bg-tertiary)",borderRadius:"var(--radius)",marginBottom:8,fontSize:12,color:"var(--text-muted)"},children:"No active session"}),i?.model&&z.jsxs("div",{style:{marginBottom:8},children:[z.jsx("div",{style:{height:4,background:"rgba(255,255,255,0.05)",borderRadius:2,overflow:"hidden"},children:z.jsx("div",{style:{height:"100%",width:`${c}%`,background:"linear-gradient(90deg, var(--emerald), var(--amber), var(--rose))",borderRadius:2,transition:"width 0.3s",boxShadow:`0 0 8px ${c>50?"var(--emerald)":c>20?"var(--amber)":"var(--rose)"}`}})}),z.jsxs("div",{style:{fontSize:10,marginTop:2,color:h,fontWeight:500},children:["Context: ",c,"%"]})]})]})]}),z.jsx("main",{style:{flex:1,overflow:"auto",background:"var(--bg-primary)"},children:z.jsx(o3,{})})]})}function V3(e){const{getMessageCache:t,setMessageCache:i,clearMessageCache:a,refreshStatus:s}=gd(),l=e??"__default__",[c,h]=I.useState(()=>t(l)),[d,f]=I.useState(!1),[p,g]=I.useState(!1),[x,y]=I.useState(null),[C,k]=I.useState([]),[S,T]=I.useState(null),_=I.useRef(null),E=I.useRef(null),M=I.useRef(l),O=I.useRef(new Set),N=D=>{if(D.includes(`
14
+ `))return D;let Z=D;return Z=Z.replace(/(#{1,6})([^\s#\n\u{2700}-\u{27BF}\u{1F300}-\u{1F9FF}\u{2600}-\u{26FF}])/gu,"$1 $2"),Z=Z.replace(/(-)(?=[^\s\-])/g,"$1 "),Z=Z.replace(/([^\n])(#{1,6}\s)/g,`$1
15
+
16
+ $2`),Z=Z.replace(/(#{1,6}\s[\u4e00-\u9fffa-zA-Z0-9\s]{1,30}?)(?=[^\u4e00-\u9fffa-zA-Z0-9\s\n#])/g,`$1
17
+ `),Z=Z.replace(/([^\n])(- (?!-))/g,`$1
18
+ $2`),Z=Z.replace(/([^\n])(\d+\.\s)/g,`$1
19
+ $2`),Z=Z.replace(/([^\n])(```|~~~)/g,`$1
20
+ $2`),Z=Z.replace(/([\u4e00-\u9fffa-zA-Z0-9])([\u{2700}-\u{27BF}\u{1F300}-\u{1F9FF}\u{2600}-\u{26FF}])/gu,`$1
21
+ $2`),Z},H=D=>{const Z=[];let tt=null;for(const W of D)if(W.role!=="system"){if(W.role==="user")tt&&(Z.push(tt),tt=null),Z.push({id:W.id,role:"user",content:W.content??"",timestamp:W.timestamp});else if(W.role==="assistant")tt&&Z.push(tt),tt={id:W.id,role:"assistant",content:N(W.content??""),reasoning:void 0,toolCalls:W.toolCalls?.map(P=>({id:P.id??"",name:P.function?.name??P.name??"",argsPreview:typeof P.function?.arguments=="string"?P.function.arguments:JSON.stringify(P.function?.arguments??P.args??""),riskLevel:"safe"}))??[],timestamp:W.timestamp};else if(W.role==="tool"&&tt){const P=W.toolCallId;if(P&&tt.toolCalls){const A=tt.toolCalls.find($=>$.id===P);A&&(A.result=W.content??void 0,A.success=!0)}}}return tt&&Z.push(tt),Z};I.useEffect(()=>{if(!e)return;(async()=>{const Z=t(l);if(Z.length>0){l!==M.current&&(M.current=l,h(Z),y(null),k([]),T(null));return}if(!O.current.has(e)){O.current.add(e),g(!0);try{const tt=await me.fetchMessages(e);if(tt.length>0){const W=H(tt);h(W),i(l,W)}}catch{}g(!1)}})()},[l,e,t,i]),I.useEffect(()=>{if(l!==M.current){M.current=l;const D=t(l);h(D),y(null),k([]),T(null)}},[l,t]),I.useEffect(()=>{i(l,c)},[c,l,i]);const j=I.useCallback(async D=>{if(!D.trim()||d)return;y(null),k([]),T({phase:"thinking",text:"Thinking...",startTime:Date.now()});const Z=new AbortController;E.current=Z;const tt={id:`user_${Date.now()}`,role:"user",content:D,timestamp:Date.now()};h($=>[...$,tt]);const W=`asst_${Date.now()}`;_.current=W;const P={id:W,role:"assistant",content:"",isStreaming:!0,timestamp:Date.now()};h($=>[...$,P]),f(!0);const A=()=>{f(!1),T(null),k([]),E.current=null};try{const $=[...c,tt].map(U=>({role:U.role,content:U.content}));await me.chatCompletions({messages:$,stream:!0,chatId:e,signal:Z.signal,onChunk:U=>{if(U.type==="stream.content"){const it=U.payload.content??"";h(nt=>nt.map(R=>R.id===W?{...R,content:R.content+it}:R)),T({phase:"generating",text:"Generating...",startTime:Date.now()})}else if(U.type==="stream.reasoning"){const it=U.payload.content??"";h(nt=>nt.map(R=>R.id===W?{...R,reasoning:(R.reasoning??"")+it}:R)),T(nt=>nt?.phase!=="tool_calling"?{phase:"thinking",text:"Thinking...",startTime:nt?.startTime??Date.now()}:nt)}else if(U.type==="stream.tool_call"){const it=U.payload;h(nt=>nt.map(R=>R.id===W?{...R,toolCalls:[...R.toolCalls??[],{id:it.toolCallId,name:it.toolName,argsPreview:it.argsPreview,riskLevel:it.riskLevel}]}:R)),T({phase:"tool_calling",text:`Calling ${it.toolName}...`,startTime:Date.now()})}else if(U.type==="stream.error"){const it=U.payload.content??"Error";y(it)}},onToolResult:U=>{h(it=>it.map(nt=>nt.id===W?{...nt,toolCalls:nt.toolCalls?.map(R=>R.id===U.toolCallId||R.name===U.toolName?{...R,result:U.stdout||U.result||U.stderr||"",stdout:U.stdout??void 0,stderr:U.stderr??void 0,success:U.success,duration:U.duration}:R)}:nt))},onStatus:U=>{U.toolName?T({phase:"tool_calling",text:`${U.toolName}: ${U.content}`,startTime:Date.now()}):T({phase:"thinking",text:U.content,startTime:Date.now()})},onSubagent:U=>{const it=U,nt=it.type,R=it.subAgentId;nt==="started"?(k(J=>[...J,{id:R,name:it.subAgentName??it.name??"SubAgent",task:it.task??"",status:"running",toolCount:0,lines:[],startTime:Date.now()}]),T({phase:"tool_calling",text:`SubAgent: ${it.subAgentName??it.name??"running"}...`,startTime:Date.now()})):nt==="tool_use"?k(J=>J.map(ct=>ct.id===R?{...ct,toolCount:ct.toolCount+1,lines:[...ct.lines,`🔧 ${it.toolName??"tool"}`]}:ct)):nt==="tool_result"?k(J=>J.map(ct=>ct.id===R?{...ct,lines:[...ct.lines,`✓ ${it.toolName??"tool"} (${it.duration??0}ms)`]}:ct)):nt==="completed"&&k([])},onDone:()=>{h(U=>U.map(it=>it.id===W?{...it,isStreaming:!1}:it)),A(),s()},onError:U=>{y(U),h(it=>it.map(nt=>nt.id===W?{...nt,isStreaming:!1,content:`Error: ${U}`}:nt)),A()}})}catch($){if($ instanceof Error&&$.name==="AbortError"){h(it=>it.map(nt=>nt.id===W?{...nt,isStreaming:!1}:nt)),A();return}const U=$ instanceof Error?$.message:String($);y(U),A()}},[c,d,e]),lt=I.useCallback(()=>{h([]),a(l),y(null),k([]),T(null)},[l,a]),G=I.useCallback(async()=>{E.current&&E.current.abort();try{await me.abort()}catch{}},[]);return{messages:c,isLoading:d,isHistoryLoading:p,error:x,sendMessage:j,clearMessages:lt,abortChat:G,subAgents:C,thinkingStatus:S}}function Z3(){const[e,t]=I.useState([]),[i,a]=I.useState(!1),s=I.useCallback(async()=>{a(!0);try{const g=await me.listSessions();t(g)}catch{}a(!1)},[]),l=I.useCallback(async(g,x)=>{const y=await me.createSession(g,x);return t(C=>[...C,y]),await s(),y},[s]),c=I.useCallback(async g=>{t(x=>x.filter(y=>y.id!==g));try{await me.deleteSession(g)}catch(x){const y=await me.listSessions();throw t(y),x}},[]),h=I.useCallback(async()=>{t([]);try{return(await me.deleteAllSessions()).deletedCount}catch(g){const x=await me.listSessions();throw t(x),g}},[]),d=I.useCallback(async g=>{await me.clearSession(g)},[]),f=I.useCallback(async(g,x)=>{await me.renameSession(g,x),t(y=>y.map(C=>C.id===g?{...C,name:x}:C))},[]),p=I.useCallback(async g=>{await me.activateSession(g)},[]);return{sessions:e,isLoading:i,fetchSessions:s,createSession:l,deleteSession:c,deleteAllSessions:h,clearSession:d,renameSession:f,activateSession:p}}function qm(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ss=qm();function uk(e){ss=e}var Wn={exec:()=>null};function Qs(e){let t=[];return i=>{let a=Math.max(0,Math.min(3,i-1)),s=t[a];return s||(s=e(a),t[a]=s),s}}function Qt(e,t=""){let i=typeof e=="string"?e:e.source,a={replace:(s,l)=>{let c=typeof l=="string"?l:l.source;return c=c.replace(ci.caret,"$1"),i=i.replace(s,c),a},getRegex:()=>new RegExp(i,t)};return a}var Q3=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),ci={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Qs(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Qs(e=>new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Qs(e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Qs(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Qs(e=>new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Qs(e=>new RegExp(`^ {0,${e}}>`))},K3=/^(?:[ \t]*(?:\n|$))+/,J3=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,tM=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ec=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,eM=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Im=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,dk=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,fk=Qt(dk).replace(/bull/g,Im).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),iM=Qt(dk).replace(/bull/g,Im).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Hm=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rM=/^[^\n]+/,Um=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,aM=Qt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Um).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),nM=Qt(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Im).getRegex(),md="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",jm=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,sM=Qt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",jm).replace("tag",md).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pk=Qt(Hm).replace("hr",Ec).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",md).getRegex(),lM=Qt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",pk).getRegex(),Pm={blockquote:lM,code:J3,def:aM,fences:tM,heading:eM,hr:Ec,html:sM,lheading:fk,list:nM,newline:K3,paragraph:pk,table:Wn,text:rM},QC=Qt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ec).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",md).getRegex(),oM={...Pm,lheading:iM,table:QC,paragraph:Qt(Hm).replace("hr",Ec).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",QC).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",md).getRegex()},cM={...Pm,html:Qt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",jm).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Wn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Qt(Hm).replace("hr",Ec).replace("heading",` *#{1,6} *[^
22
+ ]`).replace("lheading",fk).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},hM=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,uM=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,gk=/^( {2,}|\\)\n(?!\s*$)/,dM=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Nl=/[\p{P}\p{S}]/u,yd=/[\s\p{P}\p{S}]/u,Wm=/[^\s\p{P}\p{S}]/u,fM=Qt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,yd).getRegex(),mk=/(?!~)[\p{P}\p{S}]/u,pM=/(?!~)[\s\p{P}\p{S}]/u,gM=/(?:[^\s\p{P}\p{S}]|~)/u,mM=Qt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Q3?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),yk=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,yM=Qt(yk,"u").replace(/punct/g,Nl).getRegex(),xM=Qt(yk,"u").replace(/punct/g,mk).getRegex(),xk="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",bM=Qt(xk,"gu").replace(/notPunctSpace/g,Wm).replace(/punctSpace/g,yd).replace(/punct/g,Nl).getRegex(),CM=Qt(xk,"gu").replace(/notPunctSpace/g,gM).replace(/punctSpace/g,pM).replace(/punct/g,mk).getRegex(),kM=Qt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Wm).replace(/punctSpace/g,yd).replace(/punct/g,Nl).getRegex(),vM=Qt(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Nl).getRegex(),SM="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",TM=Qt(SM,"gu").replace(/notPunctSpace/g,Wm).replace(/punctSpace/g,yd).replace(/punct/g,Nl).getRegex(),wM=Qt(/\\(punct)/,"gu").replace(/punct/g,Nl).getRegex(),_M=Qt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),BM=Qt(jm).replace("(?:-->|$)","-->").getRegex(),EM=Qt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",BM).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ru=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,LM=Qt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Ru).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),bk=Qt(/^!?\[(label)\]\[(ref)\]/).replace("label",Ru).replace("ref",Um).getRegex(),Ck=Qt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Um).getRegex(),AM=Qt("reflink|nolink(?!\\()","g").replace("reflink",bk).replace("nolink",Ck).getRegex(),KC=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ym={_backpedal:Wn,anyPunctuation:wM,autolink:_M,blockSkip:mM,br:gk,code:uM,del:Wn,delLDelim:Wn,delRDelim:Wn,emStrongLDelim:yM,emStrongRDelimAst:bM,emStrongRDelimUnd:kM,escape:hM,link:LM,nolink:Ck,punctuation:fM,reflink:bk,reflinkSearch:AM,tag:EM,text:dM,url:Wn},MM={...Ym,link:Qt(/^!?\[(label)\]\((.*?)\)/).replace("label",Ru).getRegex(),reflink:Qt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ru).getRegex()},wg={...Ym,emStrongRDelimAst:CM,emStrongLDelim:xM,delLDelim:vM,delRDelim:TM,url:Qt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",KC).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Qt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",KC).getRegex()},RM={...wg,br:Qt(gk).replace("{2,}","*").getRegex(),text:Qt(wg.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},eu={normal:Pm,gfm:oM,pedantic:cM},Io={normal:Ym,gfm:wg,breaks:RM,pedantic:MM},OM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},JC=e=>OM[e];function $r(e,t){if(t){if(ci.escapeTest.test(e))return e.replace(ci.escapeReplace,JC)}else if(ci.escapeTestNoEncode.test(e))return e.replace(ci.escapeReplaceNoEncode,JC);return e}function t1(e){try{e=encodeURI(e).replace(ci.percentDecode,"%")}catch{return null}return e}function e1(e,t){let i=e.replace(ci.findPipe,(l,c,h)=>{let d=!1,f=c;for(;--f>=0&&h[f]==="\\";)d=!d;return d?"|":" |"}),a=i.split(ci.splitPipe),s=0;if(a[0].trim()||a.shift(),a.length>0&&!a.at(-1)?.trim()&&a.pop(),t)if(a.length>t)a.splice(t);else for(;a.length<t;)a.push("");for(;s<a.length;s++)a[s]=a[s].trim().replace(ci.slashPipe,"|");return a}function ln(e,t,i){let a=e.length;if(a===0)return"";let s=0;for(;s<a&&e.charAt(a-s-1)===t;)s++;return e.slice(0,a-s)}function i1(e){let t=e.split(`
23
+ `),i=t.length-1;for(;i>=0&&ci.blankLine.test(t[i]);)i--;return t.length-i<=2?e:t.slice(0,i+1).join(`
24
+ `)}function FM(e,t){if(e.indexOf(t[1])===-1)return-1;let i=0;for(let a=0;a<e.length;a++)if(e[a]==="\\")a++;else if(e[a]===t[0])i++;else if(e[a]===t[1]&&(i--,i<0))return a;return i>0?-2:-1}function DM(e,t=0){let i=t,a="";for(let s of e)if(s===" "){let l=4-i%4;a+=" ".repeat(l),i+=l}else a+=s,i++;return a}function r1(e,t,i,a,s){let l=t.href,c=t.title||null,h=e[1].replace(s.other.outputLinkReplace,"$1");a.state.inLink=!0;let d={type:e[0].charAt(0)==="!"?"image":"link",raw:i,href:l,title:c,text:h,tokens:a.inlineTokens(h)};return a.state.inLink=!1,d}function $M(e,t,i){let a=e.match(i.other.indentCodeCompensation);if(a===null)return t;let s=a[1];return t.split(`
25
+ `).map(l=>{let c=l.match(i.other.beginningSpace);if(c===null)return l;let[h]=c;return h.length>=s.length?l.slice(s.length):l}).join(`
26
+ `)}var Ou=class{options;rules;lexer;constructor(t){this.options=t||ss}space(t){let i=this.rules.block.newline.exec(t);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(t){let i=this.rules.block.code.exec(t);if(i){let a=this.options.pedantic?i[0]:i1(i[0]),s=a.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:a,codeBlockStyle:"indented",text:s}}}fences(t){let i=this.rules.block.fences.exec(t);if(i){let a=i[0],s=$M(a,i[3]||"",this.rules);return{type:"code",raw:a,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:s}}}heading(t){let i=this.rules.block.heading.exec(t);if(i){let a=i[2].trim();if(this.rules.other.endingHash.test(a)){let s=ln(a,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(a=s.trim())}return{type:"heading",raw:ln(i[0],`
27
+ `),depth:i[1].length,text:a,tokens:this.lexer.inline(a)}}}hr(t){let i=this.rules.block.hr.exec(t);if(i)return{type:"hr",raw:ln(i[0],`
28
+ `)}}blockquote(t){let i=this.rules.block.blockquote.exec(t);if(i){let a=ln(i[0],`
29
+ `).split(`
30
+ `),s="",l="",c=[];for(;a.length>0;){let h=!1,d=[],f;for(f=0;f<a.length;f++)if(this.rules.other.blockquoteStart.test(a[f]))d.push(a[f]),h=!0;else if(!h)d.push(a[f]);else break;a=a.slice(f);let p=d.join(`
31
+ `),g=p.replace(this.rules.other.blockquoteSetextReplace,`
32
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
33
+ ${p}`:p,l=l?`${l}
34
+ ${g}`:g;let x=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(g,c,!0),this.lexer.state.top=x,a.length===0)break;let y=c.at(-1);if(y?.type==="code")break;if(y?.type==="blockquote"){let C=y,k=C.raw+`
35
+ `+a.join(`
36
+ `),S=this.blockquote(k);c[c.length-1]=S,s=s.substring(0,s.length-C.raw.length)+S.raw,l=l.substring(0,l.length-C.text.length)+S.text;break}else if(y?.type==="list"){let C=y,k=C.raw+`
37
+ `+a.join(`
38
+ `),S=this.list(k);c[c.length-1]=S,s=s.substring(0,s.length-y.raw.length)+S.raw,l=l.substring(0,l.length-C.raw.length)+S.raw,a=k.substring(c.at(-1).raw.length).split(`
39
+ `);continue}}return{type:"blockquote",raw:s,tokens:c,text:l}}}list(t){let i=this.rules.block.list.exec(t);if(i){let a=i[1].trim(),s=a.length>1,l={type:"list",raw:"",ordered:s,start:s?+a.slice(0,-1):"",loose:!1,items:[]};a=s?`\\d{1,9}\\${a.slice(-1)}`:`\\${a}`,this.options.pedantic&&(a=s?a:"[*+-]");let c=this.rules.other.listItemRegex(a),h=!1;for(;t;){let f=!1,p="",g="";if(!(i=c.exec(t))||this.rules.block.hr.test(t))break;p=i[0],t=t.substring(p.length);let x=DM(i[2].split(`
40
+ `,1)[0],i[1].length),y=t.split(`
41
+ `,1)[0],C=!x.trim(),k=0;if(this.options.pedantic?(k=2,g=x.trimStart()):C?k=i[1].length+1:(k=x.search(this.rules.other.nonSpaceChar),k=k>4?1:k,g=x.slice(k),k+=i[1].length),C&&this.rules.other.blankLine.test(y)&&(p+=y+`
42
+ `,t=t.substring(y.length+1),f=!0),!f){let S=this.rules.other.nextBulletRegex(k),T=this.rules.other.hrRegex(k),_=this.rules.other.fencesBeginRegex(k),E=this.rules.other.headingBeginRegex(k),M=this.rules.other.htmlBeginRegex(k),O=this.rules.other.blockquoteBeginRegex(k);for(;t;){let N=t.split(`
43
+ `,1)[0],H;if(y=N,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting," "),H=y):H=y.replace(this.rules.other.tabCharGlobal," "),_.test(y)||E.test(y)||M.test(y)||O.test(y)||S.test(y)||T.test(y))break;if(H.search(this.rules.other.nonSpaceChar)>=k||!y.trim())g+=`
44
+ `+H.slice(k);else{if(C||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(x)||E.test(x)||T.test(x))break;g+=`
45
+ `+y}C=!y.trim(),p+=N+`
46
+ `,t=t.substring(N.length+1),x=H.slice(k)}}l.loose||(h?l.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(h=!0)),l.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(g),loose:!1,text:g,tokens:[]}),l.raw+=p}let d=l.items.at(-1);if(d)d.raw=d.raw.trimEnd(),d.text=d.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let f of l.items){this.lexer.state.top=!1,f.tokens=this.lexer.blockTokens(f.text,[]);let p=f.tokens[0];if(f.task&&(p?.type==="text"||p?.type==="paragraph")){f.text=f.text.replace(this.rules.other.listReplaceTask,""),p.raw=p.raw.replace(this.rules.other.listReplaceTask,""),p.text=p.text.replace(this.rules.other.listReplaceTask,"");for(let x=this.lexer.inlineQueue.length-1;x>=0;x--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[x].src)){this.lexer.inlineQueue[x].src=this.lexer.inlineQueue[x].src.replace(this.rules.other.listReplaceTask,"");break}let g=this.rules.other.listTaskCheckbox.exec(f.raw);if(g){let x={type:"checkbox",raw:g[0]+" ",checked:g[0]!=="[ ]"};f.checked=x.checked,l.loose?f.tokens[0]&&["paragraph","text"].includes(f.tokens[0].type)&&"tokens"in f.tokens[0]&&f.tokens[0].tokens?(f.tokens[0].raw=x.raw+f.tokens[0].raw,f.tokens[0].text=x.raw+f.tokens[0].text,f.tokens[0].tokens.unshift(x)):f.tokens.unshift({type:"paragraph",raw:x.raw,text:x.raw,tokens:[x]}):f.tokens.unshift(x)}}else f.task&&(f.task=!1);if(!l.loose){let g=f.tokens.filter(y=>y.type==="space"),x=g.length>0&&g.some(y=>this.rules.other.anyLine.test(y.raw));l.loose=x}}if(l.loose)for(let f of l.items){f.loose=!0;for(let p of f.tokens)p.type==="text"&&(p.type="paragraph")}return l}}html(t){let i=this.rules.block.html.exec(t);if(i){let a=i1(i[0]);return{type:"html",block:!0,raw:a,pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:a}}}def(t){let i=this.rules.block.def.exec(t);if(i){let a=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",l=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:a,raw:ln(i[0],`
47
+ `),href:s,title:l}}}table(t){let i=this.rules.block.table.exec(t);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let a=e1(i[1]),s=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=i[3]?.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
48
+ `):[],c={type:"table",raw:ln(i[0],`
49
+ `),header:[],align:[],rows:[]};if(a.length===s.length){for(let h of s)this.rules.other.tableAlignRight.test(h)?c.align.push("right"):this.rules.other.tableAlignCenter.test(h)?c.align.push("center"):this.rules.other.tableAlignLeft.test(h)?c.align.push("left"):c.align.push(null);for(let h=0;h<a.length;h++)c.header.push({text:a[h],tokens:this.lexer.inline(a[h]),header:!0,align:c.align[h]});for(let h of l)c.rows.push(e1(h,c.header.length).map((d,f)=>({text:d,tokens:this.lexer.inline(d),header:!1,align:c.align[f]})));return c}}lheading(t){let i=this.rules.block.lheading.exec(t);if(i){let a=i[1].trim();return{type:"heading",raw:ln(i[0],`
50
+ `),depth:i[2].charAt(0)==="="?1:2,text:a,tokens:this.lexer.inline(a)}}}paragraph(t){let i=this.rules.block.paragraph.exec(t);if(i){let a=i[1].charAt(i[1].length-1)===`
51
+ `?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:a,tokens:this.lexer.inline(a)}}}text(t){let i=this.rules.block.text.exec(t);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(t){let i=this.rules.inline.escape.exec(t);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(t){let i=this.rules.inline.tag.exec(t);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(t){let i=this.rules.inline.link.exec(t);if(i){let a=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(a)){if(!this.rules.other.endAngleBracket.test(a))return;let c=ln(a.slice(0,-1),"\\");if((a.length-c.length)%2===0)return}else{let c=FM(i[2],"()");if(c===-2)return;if(c>-1){let h=(i[0].indexOf("!")===0?5:4)+i[1].length+c;i[2]=i[2].substring(0,c),i[0]=i[0].substring(0,h).trim(),i[3]=""}}let s=i[2],l="";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(s);c&&(s=c[1],l=c[3])}else l=i[3]?i[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(a)?s=s.slice(1):s=s.slice(1,-1)),r1(i,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:l&&l.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(t,i){let a;if((a=this.rules.inline.reflink.exec(t))||(a=this.rules.inline.nolink.exec(t))){let s=(a[2]||a[1]).replace(this.rules.other.multipleSpaceGlobal," "),l=i[s.toLowerCase()];if(!l){let c=a[0].charAt(0);return{type:"text",raw:c,text:c}}return r1(a,l,a[0],this.lexer,this.rules)}}emStrong(t,i,a=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&a.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!a||this.rules.inline.punctuation.exec(a))){let l=[...s[0]].length-1,c,h,d=l,f=0,p=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,i=i.slice(-1*t.length+l);(s=p.exec(i))!==null;){if(c=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!c)continue;if(h=[...c].length,s[3]||s[4]){d+=h;continue}else if((s[5]||s[6])&&l%3&&!((l+h)%3)){f+=h;continue}if(d-=h,d>0)continue;h=Math.min(h,h+d+f);let g=[...s[0]][0].length,x=t.slice(0,l+s.index+g+h);if(Math.min(l,h)%2){let C=x.slice(1,-1);return{type:"em",raw:x,text:C,tokens:this.lexer.inlineTokens(C)}}let y=x.slice(2,-2);return{type:"strong",raw:x,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(t){let i=this.rules.inline.code.exec(t);if(i){let a=i[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(a),l=this.rules.other.startingSpaceChar.test(a)&&this.rules.other.endingSpaceChar.test(a);return s&&l&&(a=a.substring(1,a.length-1)),{type:"codespan",raw:i[0],text:a}}}br(t){let i=this.rules.inline.br.exec(t);if(i)return{type:"br",raw:i[0]}}del(t,i,a=""){let s=this.rules.inline.delLDelim.exec(t);if(s&&(!s[1]||!a||this.rules.inline.punctuation.exec(a))){let l=[...s[0]].length-1,c,h,d=l,f=this.rules.inline.delRDelim;for(f.lastIndex=0,i=i.slice(-1*t.length+l);(s=f.exec(i))!==null;){if(c=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!c||(h=[...c].length,h!==l))continue;if(s[3]||s[4]){d+=h;continue}if(d-=h,d>0)continue;h=Math.min(h,h+d);let p=[...s[0]][0].length,g=t.slice(0,l+s.index+p+h),x=g.slice(l,-l);return{type:"del",raw:g,text:x,tokens:this.lexer.inlineTokens(x)}}}}autolink(t){let i=this.rules.inline.autolink.exec(t);if(i){let a,s;return i[2]==="@"?(a=i[1],s="mailto:"+a):(a=i[1],s=a),{type:"link",raw:i[0],text:a,href:s,tokens:[{type:"text",raw:a,text:a}]}}}url(t){let i;if(i=this.rules.inline.url.exec(t)){let a,s;if(i[2]==="@")a=i[0],s="mailto:"+a;else{let l;do l=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])?.[0]??"";while(l!==i[0]);a=i[0],i[1]==="www."?s="http://"+i[0]:s=i[0]}return{type:"link",raw:i[0],text:a,href:s,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(t){let i=this.rules.inline.text.exec(t);if(i){let a=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:a}}}},gr=class _g{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ss,this.options.tokenizer=this.options.tokenizer||new Ou,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let i={other:ci,block:eu.normal,inline:Io.normal};this.options.pedantic?(i.block=eu.pedantic,i.inline=Io.pedantic):this.options.gfm&&(i.block=eu.gfm,this.options.breaks?i.inline=Io.breaks:i.inline=Io.gfm),this.tokenizer.rules=i}static get rules(){return{block:eu,inline:Io}}static lex(t,i){return new _g(i).lex(t)}static lexInline(t,i){return new _g(i).inlineTokens(t)}lex(t){t=t.replace(ci.carriageReturn,`
52
+ `),this.blockTokens(t,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let a=this.inlineQueue[i];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,i=[],a=!1){this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(ci.tabCharGlobal," ").replace(ci.spaceLine,""));let s=1/0;for(;t;){if(t.length<s)s=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let l;if(this.options.extensions?.block?.some(h=>(l=h.call({lexer:this},t,i))?(t=t.substring(l.raw.length),i.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);let h=i.at(-1);l.raw.length===1&&h!==void 0?h.raw+=`
53
+ `:i.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);let h=i.at(-1);h?.type==="paragraph"||h?.type==="text"?(h.raw+=(h.raw.endsWith(`
54
+ `)?"":`
55
+ `)+l.raw,h.text+=`
56
+ `+l.text,this.inlineQueue.at(-1).src=h.text):i.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),i.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),i.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),i.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),i.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),i.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),i.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);let h=i.at(-1);h?.type==="paragraph"||h?.type==="text"?(h.raw+=(h.raw.endsWith(`
57
+ `)?"":`
58
+ `)+l.raw,h.text+=`
59
+ `+l.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},i.push(l));continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),i.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),i.push(l);continue}let c=t;if(this.options.extensions?.startBlock){let h=1/0,d=t.slice(1),f;this.options.extensions.startBlock.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(this.state.top&&(l=this.tokenizer.paragraph(c))){let h=i.at(-1);a&&h?.type==="paragraph"?(h.raw+=(h.raw.endsWith(`
60
+ `)?"":`
61
+ `)+l.raw,h.text+=`
62
+ `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):i.push(l),a=c.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);let h=i.at(-1);h?.type==="text"?(h.raw+=(h.raw.endsWith(`
63
+ `)?"":`
64
+ `)+l.raw,h.text+=`
65
+ `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):i.push(l);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,i}inline(t,i=[]){return this.inlineQueue.push({src:t,tokens:i}),i}inlineTokens(t,i=[]){this.tokenizer.lexer=this;let a=t,s=null;if(this.tokens.links){let f=Object.keys(this.tokens.links);if(f.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(a))!==null;)f.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(a))!==null;)a=a.slice(0,s.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let l;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(a))!==null;)l=s[2]?s[2].length:0,a=a.slice(0,s.index+l)+"["+"a".repeat(s[0].length-l-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);a=this.options.hooks?.emStrongMask?.call({lexer:this},a)??a;let c=!1,h="",d=1/0;for(;t;){if(t.length<d)d=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}c||(h=""),c=!1;let f;if(this.options.extensions?.inline?.some(g=>(f=g.call({lexer:this},t,i))?(t=t.substring(f.raw.length),i.push(f),!0):!1))continue;if(f=this.tokenizer.escape(t)){t=t.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.tag(t)){t=t.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.link(t)){t=t.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(f.raw.length);let g=i.at(-1);f.type==="text"&&g?.type==="text"?(g.raw+=f.raw,g.text+=f.text):i.push(f);continue}if(f=this.tokenizer.emStrong(t,a,h)){t=t.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.codespan(t)){t=t.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.br(t)){t=t.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.del(t,a,h)){t=t.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.autolink(t)){t=t.substring(f.raw.length),i.push(f);continue}if(!this.state.inLink&&(f=this.tokenizer.url(t))){t=t.substring(f.raw.length),i.push(f);continue}let p=t;if(this.options.extensions?.startInline){let g=1/0,x=t.slice(1),y;this.options.extensions.startInline.forEach(C=>{y=C.call({lexer:this},x),typeof y=="number"&&y>=0&&(g=Math.min(g,y))}),g<1/0&&g>=0&&(p=t.substring(0,g+1))}if(f=this.tokenizer.inlineText(p)){t=t.substring(f.raw.length),f.raw.slice(-1)!=="_"&&(h=f.raw.slice(-1)),c=!0;let g=i.at(-1);g?.type==="text"?(g.raw+=f.raw,g.text+=f.text):i.push(f);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return i}infiniteLoopError(t){let i="Infinite loop on byte: "+t;if(this.options.silent)console.error(i);else throw new Error(i)}},Fu=class{options;parser;constructor(t){this.options=t||ss}space(t){return""}code({text:t,lang:i,escaped:a}){let s=(i||"").match(ci.notSpaceStart)?.[0],l=t.replace(ci.endingNewline,"")+`
66
+ `;return s?'<pre><code class="language-'+$r(s)+'">'+(a?l:$r(l,!0))+`</code></pre>
67
+ `:"<pre><code>"+(a?l:$r(l,!0))+`</code></pre>
68
+ `}blockquote({tokens:t}){return`<blockquote>
69
+ ${this.parser.parse(t)}</blockquote>
70
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:i}){return`<h${i}>${this.parser.parseInline(t)}</h${i}>
71
+ `}hr(t){return`<hr>
72
+ `}list(t){let i=t.ordered,a=t.start,s="";for(let h=0;h<t.items.length;h++){let d=t.items[h];s+=this.listitem(d)}let l=i?"ol":"ul",c=i&&a!==1?' start="'+a+'"':"";return"<"+l+c+`>
73
+ `+s+"</"+l+`>
74
+ `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
75
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
76
+ `}table(t){let i="",a="";for(let l=0;l<t.header.length;l++)a+=this.tablecell(t.header[l]);i+=this.tablerow({text:a});let s="";for(let l=0;l<t.rows.length;l++){let c=t.rows[l];a="";for(let h=0;h<c.length;h++)a+=this.tablecell(c[h]);s+=this.tablerow({text:a})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
77
+ <thead>
78
+ `+i+`</thead>
79
+ `+s+`</table>
80
+ `}tablerow({text:t}){return`<tr>
81
+ ${t}</tr>
82
+ `}tablecell(t){let i=this.parser.parseInline(t.tokens),a=t.header?"th":"td";return(t.align?`<${a} align="${t.align}">`:`<${a}>`)+i+`</${a}>
83
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${$r(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:i,tokens:a}){let s=this.parser.parseInline(a),l=t1(t);if(l===null)return s;t=l;let c='<a href="'+t+'"';return i&&(c+=' title="'+$r(i)+'"'),c+=">"+s+"</a>",c}image({href:t,title:i,text:a,tokens:s}){s&&(a=this.parser.parseInline(s,this.parser.textRenderer));let l=t1(t);if(l===null)return $r(a);t=l;let c=`<img src="${t}" alt="${$r(a)}"`;return i&&(c+=` title="${$r(i)}"`),c+=">",c}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:$r(t.text)}},Gm=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},mr=class Bg{options;renderer;textRenderer;constructor(t){this.options=t||ss,this.options.renderer=this.options.renderer||new Fu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Gm}static parse(t,i){return new Bg(i).parse(t)}static parseInline(t,i){return new Bg(i).parseInline(t)}parse(t){this.renderer.parser=this;let i="";for(let a=0;a<t.length;a++){let s=t[a];if(this.options.extensions?.renderers?.[s.type]){let c=s,h=this.options.extensions.renderers[c.type].call({parser:this},c);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){i+=h||"";continue}}let l=s;switch(l.type){case"space":{i+=this.renderer.space(l);break}case"hr":{i+=this.renderer.hr(l);break}case"heading":{i+=this.renderer.heading(l);break}case"code":{i+=this.renderer.code(l);break}case"table":{i+=this.renderer.table(l);break}case"blockquote":{i+=this.renderer.blockquote(l);break}case"list":{i+=this.renderer.list(l);break}case"checkbox":{i+=this.renderer.checkbox(l);break}case"html":{i+=this.renderer.html(l);break}case"def":{i+=this.renderer.def(l);break}case"paragraph":{i+=this.renderer.paragraph(l);break}case"text":{i+=this.renderer.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}parseInline(t,i=this.renderer){this.renderer.parser=this;let a="";for(let s=0;s<t.length;s++){let l=t[s];if(this.options.extensions?.renderers?.[l.type]){let h=this.options.extensions.renderers[l.type].call({parser:this},l);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){a+=h||"";continue}}let c=l;switch(c.type){case"escape":{a+=i.text(c);break}case"html":{a+=i.html(c);break}case"link":{a+=i.link(c);break}case"image":{a+=i.image(c);break}case"checkbox":{a+=i.checkbox(c);break}case"strong":{a+=i.strong(c);break}case"em":{a+=i.em(c);break}case"codespan":{a+=i.codespan(c);break}case"br":{a+=i.br(c);break}case"del":{a+=i.del(c);break}case"text":{a+=i.text(c);break}default:{let h='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return a}},Zo=class{options;block;constructor(t){this.options=t||ss}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?gr.lex:gr.lexInline}provideParser(t=this.block){return t?mr.parse:mr.parseInline}},zM=class{defaults=qm();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=mr;Renderer=Fu;TextRenderer=Gm;Lexer=gr;Tokenizer=Ou;Hooks=Zo;constructor(...t){this.use(...t)}walkTokens(t,i){let a=[];for(let s of t)switch(a=a.concat(i.call(this,s)),s.type){case"table":{let l=s;for(let c of l.header)a=a.concat(this.walkTokens(c.tokens,i));for(let c of l.rows)for(let h of c)a=a.concat(this.walkTokens(h.tokens,i));break}case"list":{let l=s;a=a.concat(this.walkTokens(l.items,i));break}default:{let l=s;this.defaults.extensions?.childTokens?.[l.type]?this.defaults.extensions.childTokens[l.type].forEach(c=>{let h=l[c].flat(1/0);a=a.concat(this.walkTokens(h,i))}):l.tokens&&(a=a.concat(this.walkTokens(l.tokens,i)))}}return a}use(...t){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(a=>{let s={...a};if(s.async=this.defaults.async||s.async||!1,a.extensions&&(a.extensions.forEach(l=>{if(!l.name)throw new Error("extension name required");if("renderer"in l){let c=i.renderers[l.name];c?i.renderers[l.name]=function(...h){let d=l.renderer.apply(this,h);return d===!1&&(d=c.apply(this,h)),d}:i.renderers[l.name]=l.renderer}if("tokenizer"in l){if(!l.level||l.level!=="block"&&l.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let c=i[l.level];c?c.unshift(l.tokenizer):i[l.level]=[l.tokenizer],l.start&&(l.level==="block"?i.startBlock?i.startBlock.push(l.start):i.startBlock=[l.start]:l.level==="inline"&&(i.startInline?i.startInline.push(l.start):i.startInline=[l.start]))}"childTokens"in l&&l.childTokens&&(i.childTokens[l.name]=l.childTokens)}),s.extensions=i),a.renderer){let l=this.defaults.renderer||new Fu(this.defaults);for(let c in a.renderer){if(!(c in l))throw new Error(`renderer '${c}' does not exist`);if(["options","parser"].includes(c))continue;let h=c,d=a.renderer[h],f=l[h];l[h]=(...p)=>{let g=d.apply(l,p);return g===!1&&(g=f.apply(l,p)),g||""}}s.renderer=l}if(a.tokenizer){let l=this.defaults.tokenizer||new Ou(this.defaults);for(let c in a.tokenizer){if(!(c in l))throw new Error(`tokenizer '${c}' does not exist`);if(["options","rules","lexer"].includes(c))continue;let h=c,d=a.tokenizer[h],f=l[h];l[h]=(...p)=>{let g=d.apply(l,p);return g===!1&&(g=f.apply(l,p)),g}}s.tokenizer=l}if(a.hooks){let l=this.defaults.hooks||new Zo;for(let c in a.hooks){if(!(c in l))throw new Error(`hook '${c}' does not exist`);if(["options","block"].includes(c))continue;let h=c,d=a.hooks[h],f=l[h];Zo.passThroughHooks.has(c)?l[h]=p=>{if(this.defaults.async&&Zo.passThroughHooksRespectAsync.has(c))return(async()=>{let x=await d.call(l,p);return f.call(l,x)})();let g=d.call(l,p);return f.call(l,g)}:l[h]=(...p)=>{if(this.defaults.async)return(async()=>{let x=await d.apply(l,p);return x===!1&&(x=await f.apply(l,p)),x})();let g=d.apply(l,p);return g===!1&&(g=f.apply(l,p)),g}}s.hooks=l}if(a.walkTokens){let l=this.defaults.walkTokens,c=a.walkTokens;s.walkTokens=function(h){let d=[];return d.push(c.call(this,h)),l&&(d=d.concat(l.call(this,h))),d}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,i){return gr.lex(t,i??this.defaults)}parser(t,i){return mr.parse(t,i??this.defaults)}parseMarkdown(t){return(i,a)=>{let s={...a},l={...this.defaults,...s},c=this.onError(!!l.silent,!!l.async);if(this.defaults.async===!0&&s.async===!1)return c(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(l.hooks&&(l.hooks.options=l,l.hooks.block=t),l.async)return(async()=>{let h=l.hooks?await l.hooks.preprocess(i):i,d=await(l.hooks?await l.hooks.provideLexer(t):t?gr.lex:gr.lexInline)(h,l),f=l.hooks?await l.hooks.processAllTokens(d):d;l.walkTokens&&await Promise.all(this.walkTokens(f,l.walkTokens));let p=await(l.hooks?await l.hooks.provideParser(t):t?mr.parse:mr.parseInline)(f,l);return l.hooks?await l.hooks.postprocess(p):p})().catch(c);try{l.hooks&&(i=l.hooks.preprocess(i));let h=(l.hooks?l.hooks.provideLexer(t):t?gr.lex:gr.lexInline)(i,l);l.hooks&&(h=l.hooks.processAllTokens(h)),l.walkTokens&&this.walkTokens(h,l.walkTokens);let d=(l.hooks?l.hooks.provideParser(t):t?mr.parse:mr.parseInline)(h,l);return l.hooks&&(d=l.hooks.postprocess(d)),d}catch(h){return c(h)}}}onError(t,i){return a=>{if(a.message+=`
84
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+$r(a.message+"",!0)+"</pre>";return i?Promise.resolve(s):s}if(i)return Promise.reject(a);throw a}}},Kn=new zM;function se(e,t){return Kn.parse(e,t)}se.options=se.setOptions=function(e){return Kn.setOptions(e),se.defaults=Kn.defaults,uk(se.defaults),se};se.getDefaults=qm;se.defaults=ss;se.use=function(...e){return Kn.use(...e),se.defaults=Kn.defaults,uk(se.defaults),se};se.walkTokens=function(e,t){return Kn.walkTokens(e,t)};se.parseInline=Kn.parseInline;se.Parser=mr;se.parser=mr.parse;se.Renderer=Fu;se.TextRenderer=Gm;se.Lexer=gr;se.lexer=gr.lex;se.Tokenizer=Ou;se.Hooks=Zo;se.parse=se;se.options;se.setOptions;se.use;se.walkTokens;se.parseInline;mr.parse;gr.lex;const NM="modulepreload",qM=function(e){return"/"+e},a1={},Zt=function(t,i,a){let s=Promise.resolve();if(i&&i.length>0){let d=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),h=c?.nonce||c?.getAttribute("nonce");s=d(i.map(f=>{if(f=qM(f),f in a1)return;a1[f]=!0;const p=f.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const x=document.createElement("link");if(x.rel=p?"stylesheet":NM,p||(x.as="script"),x.crossOrigin="",x.href=f,h&&x.setAttribute("nonce",h),document.head.appendChild(x),p)return new Promise((y,C)=>{x.addEventListener("load",y),x.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${f}`)))})}))}function l(c){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=c,window.dispatchEvent(h),!h.defaultPrevented)throw c}return s.then(c=>{for(const h of c||[])h.status==="rejected"&&l(h.reason);return t().catch(l)})};var mu={exports:{}},IM=mu.exports,n1;function HM(){return n1||(n1=1,(function(e,t){(function(i,a){e.exports=a()})(IM,(function(){var i=1e3,a=6e4,s=36e5,l="millisecond",c="second",h="minute",d="hour",f="day",p="week",g="month",x="quarter",y="year",C="date",k="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|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,_={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(W){var P=["th","st","nd","rd"],A=W%100;return"["+W+(P[(A-20)%10]||P[A]||P[0])+"]"}},E=function(W,P,A){var $=String(W);return!$||$.length>=P?W:""+Array(P+1-$.length).join(A)+W},M={s:E,z:function(W){var P=-W.utcOffset(),A=Math.abs(P),$=Math.floor(A/60),U=A%60;return(P<=0?"+":"-")+E($,2,"0")+":"+E(U,2,"0")},m:function W(P,A){if(P.date()<A.date())return-W(A,P);var $=12*(A.year()-P.year())+(A.month()-P.month()),U=P.clone().add($,g),it=A-U<0,nt=P.clone().add($+(it?-1:1),g);return+(-($+(A-U)/(it?U-nt:nt-U))||0)},a:function(W){return W<0?Math.ceil(W)||0:Math.floor(W)},p:function(W){return{M:g,y,w:p,d:f,D:C,h:d,m:h,s:c,ms:l,Q:x}[W]||String(W||"").toLowerCase().replace(/s$/,"")},u:function(W){return W===void 0}},O="en",N={};N[O]=_;var H="$isDayjsObject",j=function(W){return W instanceof Z||!(!W||!W[H])},lt=function W(P,A,$){var U;if(!P)return O;if(typeof P=="string"){var it=P.toLowerCase();N[it]&&(U=it),A&&(N[it]=A,U=it);var nt=P.split("-");if(!U&&nt.length>1)return W(nt[0])}else{var R=P.name;N[R]=P,U=R}return!$&&U&&(O=U),U||!$&&O},G=function(W,P){if(j(W))return W.clone();var A=typeof P=="object"?P:{};return A.date=W,A.args=arguments,new Z(A)},D=M;D.l=lt,D.i=j,D.w=function(W,P){return G(W,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var Z=(function(){function W(A){this.$L=lt(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[H]=!0}var P=W.prototype;return P.parse=function(A){this.$d=(function($){var U=$.date,it=$.utc;if(U===null)return new Date(NaN);if(D.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var nt=U.match(S);if(nt){var R=nt[2]-1||0,J=(nt[7]||"0").substring(0,3);return it?new Date(Date.UTC(nt[1],R,nt[3]||1,nt[4]||0,nt[5]||0,nt[6]||0,J)):new Date(nt[1],R,nt[3]||1,nt[4]||0,nt[5]||0,nt[6]||0,J)}}return new Date(U)})(A),this.init()},P.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},P.$utils=function(){return D},P.isValid=function(){return this.$d.toString()!==k},P.isSame=function(A,$){var U=G(A);return this.startOf($)<=U&&U<=this.endOf($)},P.isAfter=function(A,$){return G(A)<this.startOf($)},P.isBefore=function(A,$){return this.endOf($)<G(A)},P.$g=function(A,$,U){return D.u(A)?this[$]:this.set(U,A)},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(A,$){var U=this,it=!!D.u($)||$,nt=D.p(A),R=function(bt,Ot){var jt=D.w(U.$u?Date.UTC(U.$y,Ot,bt):new Date(U.$y,Ot,bt),U);return it?jt:jt.endOf(f)},J=function(bt,Ot){return D.w(U.toDate()[bt].apply(U.toDate("s"),(it?[0,0,0,0]:[23,59,59,999]).slice(Ot)),U)},ct=this.$W,ft=this.$M,xt=this.$D,mt="set"+(this.$u?"UTC":"");switch(nt){case y:return it?R(1,0):R(31,11);case g:return it?R(1,ft):R(0,ft+1);case p:var Ct=this.$locale().weekStart||0,ot=(ct<Ct?ct+7:ct)-Ct;return R(it?xt-ot:xt+(6-ot),ft);case f:case C:return J(mt+"Hours",0);case d:return J(mt+"Minutes",1);case h:return J(mt+"Seconds",2);case c:return J(mt+"Milliseconds",3);default:return this.clone()}},P.endOf=function(A){return this.startOf(A,!1)},P.$set=function(A,$){var U,it=D.p(A),nt="set"+(this.$u?"UTC":""),R=(U={},U[f]=nt+"Date",U[C]=nt+"Date",U[g]=nt+"Month",U[y]=nt+"FullYear",U[d]=nt+"Hours",U[h]=nt+"Minutes",U[c]=nt+"Seconds",U[l]=nt+"Milliseconds",U)[it],J=it===f?this.$D+($-this.$W):$;if(it===g||it===y){var ct=this.clone().set(C,1);ct.$d[R](J),ct.init(),this.$d=ct.set(C,Math.min(this.$D,ct.daysInMonth())).$d}else R&&this.$d[R](J);return this.init(),this},P.set=function(A,$){return this.clone().$set(A,$)},P.get=function(A){return this[D.p(A)]()},P.add=function(A,$){var U,it=this;A=Number(A);var nt=D.p($),R=function(ft){var xt=G(it);return D.w(xt.date(xt.date()+Math.round(ft*A)),it)};if(nt===g)return this.set(g,this.$M+A);if(nt===y)return this.set(y,this.$y+A);if(nt===f)return R(1);if(nt===p)return R(7);var J=(U={},U[h]=a,U[d]=s,U[c]=i,U)[nt]||1,ct=this.$d.getTime()+A*J;return D.w(ct,this)},P.subtract=function(A,$){return this.add(-1*A,$)},P.format=function(A){var $=this,U=this.$locale();if(!this.isValid())return U.invalidDate||k;var it=A||"YYYY-MM-DDTHH:mm:ssZ",nt=D.z(this),R=this.$H,J=this.$m,ct=this.$M,ft=U.weekdays,xt=U.months,mt=U.meridiem,Ct=function(Ot,jt,pe,Re){return Ot&&(Ot[jt]||Ot($,it))||pe[jt].slice(0,Re)},ot=function(Ot){return D.s(R%12||12,Ot,"0")},bt=mt||function(Ot,jt,pe){var Re=Ot<12?"AM":"PM";return pe?Re.toLowerCase():Re};return it.replace(T,(function(Ot,jt){return jt||(function(pe){switch(pe){case"YY":return String($.$y).slice(-2);case"YYYY":return D.s($.$y,4,"0");case"M":return ct+1;case"MM":return D.s(ct+1,2,"0");case"MMM":return Ct(U.monthsShort,ct,xt,3);case"MMMM":return Ct(xt,ct);case"D":return $.$D;case"DD":return D.s($.$D,2,"0");case"d":return String($.$W);case"dd":return Ct(U.weekdaysMin,$.$W,ft,2);case"ddd":return Ct(U.weekdaysShort,$.$W,ft,3);case"dddd":return ft[$.$W];case"H":return String(R);case"HH":return D.s(R,2,"0");case"h":return ot(1);case"hh":return ot(2);case"a":return bt(R,J,!0);case"A":return bt(R,J,!1);case"m":return String(J);case"mm":return D.s(J,2,"0");case"s":return String($.$s);case"ss":return D.s($.$s,2,"0");case"SSS":return D.s($.$ms,3,"0");case"Z":return nt}return null})(Ot)||nt.replace(":","")}))},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(A,$,U){var it,nt=this,R=D.p($),J=G(A),ct=(J.utcOffset()-this.utcOffset())*a,ft=this-J,xt=function(){return D.m(nt,J)};switch(R){case y:it=xt()/12;break;case g:it=xt();break;case x:it=xt()/3;break;case p:it=(ft-ct)/6048e5;break;case f:it=(ft-ct)/864e5;break;case d:it=ft/s;break;case h:it=ft/a;break;case c:it=ft/i;break;default:it=ft}return U?it:D.a(it)},P.daysInMonth=function(){return this.endOf(g).$D},P.$locale=function(){return N[this.$L]},P.locale=function(A,$){if(!A)return this.$L;var U=this.clone(),it=lt(A,$,!0);return it&&(U.$L=it),U},P.clone=function(){return D.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},W})(),tt=Z.prototype;return G.prototype=tt,[["$ms",l],["$s",c],["$m",h],["$H",d],["$W",f],["$M",g],["$y",y],["$D",C]].forEach((function(W){tt[W[1]]=function(P){return this.$g(P,W[0],W[1])}})),G.extend=function(W,P){return W.$i||(W(P,Z,G),W.$i=!0),G},G.locale=lt,G.isDayjs=j,G.unix=function(W){return G(1e3*W)},G.en=N[O],G.Ls=N,G.p={},G}))})(mu)),mu.exports}var UM=HM();const jM=Lm(UM);var kk=Object.defineProperty,v=(e,t)=>kk(e,"name",{value:t,configurable:!0}),PM=(e,t)=>{for(var i in t)kk(e,i,{get:t[i],enumerable:!0})},fa={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},gt={trace:v((...e)=>{},"trace"),debug:v((...e)=>{},"debug"),info:v((...e)=>{},"info"),warn:v((...e)=>{},"warn"),error:v((...e)=>{},"error"),fatal:v((...e)=>{},"fatal")},Xm=v(function(e="fatal"){let t=fa.fatal;typeof e=="string"?e.toLowerCase()in fa&&(t=fa[e]):typeof e=="number"&&(t=e),gt.trace=()=>{},gt.debug=()=>{},gt.info=()=>{},gt.warn=()=>{},gt.error=()=>{},gt.fatal=()=>{},t<=fa.fatal&&(gt.fatal=console.error?console.error.bind(console,nr("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",nr("FATAL"))),t<=fa.error&&(gt.error=console.error?console.error.bind(console,nr("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",nr("ERROR"))),t<=fa.warn&&(gt.warn=console.warn?console.warn.bind(console,nr("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",nr("WARN"))),t<=fa.info&&(gt.info=console.info?console.info.bind(console,nr("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",nr("INFO"))),t<=fa.debug&&(gt.debug=console.debug?console.debug.bind(console,nr("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",nr("DEBUG"))),t<=fa.trace&&(gt.trace=console.debug?console.debug.bind(console,nr("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",nr("TRACE")))},"setLogLevel"),nr=v(e=>`%c${jM().format("ss.SSS")} : ${e} : `,"format");const yu={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,i)=>(i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+(t-e)*6*i:i<1/2?t:i<2/3?e+(t-e)*(2/3-i)*6:e),hsl2rgb:({h:e,s:t,l:i},a)=>{if(!t)return i*2.55;e/=360,t/=100,i/=100;const s=i<.5?i*(1+t):i+t-i*t,l=2*i-s;switch(a){case"r":return yu.hue2rgb(l,s,e+1/3)*255;case"g":return yu.hue2rgb(l,s,e)*255;case"b":return yu.hue2rgb(l,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:i},a)=>{e/=255,t/=255,i/=255;const s=Math.max(e,t,i),l=Math.min(e,t,i),c=(s+l)/2;if(a==="l")return c*100;if(s===l)return 0;const h=s-l,d=c>.5?h/(2-s-l):h/(s+l);if(a==="s")return d*100;switch(s){case e:return((t-i)/h+(t<i?6:0))*60;case t:return((i-e)/h+2)*60;case i:return((e-t)/h+4)*60;default:return-1}}},WM={clamp:(e,t,i)=>t>i?Math.min(t,Math.max(i,e)):Math.min(i,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},YM={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},zt={channel:yu,lang:WM,unit:YM},cn={};for(let e=0;e<=255;e++)cn[e]=zt.unit.dec2hex(e);const li={ALL:0,RGB:1,HSL:2};class GM{constructor(){this.type=li.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=li.ALL}is(t){return this.type===t}}class XM{constructor(t,i){this.color=i,this.changed=!1,this.data=t,this.type=new GM}set(t,i){return this.color=i,this.changed=!1,this.data=t,this.type.type=li.ALL,this}_ensureHSL(){const t=this.data,{h:i,s:a,l:s}=t;i===void 0&&(t.h=zt.channel.rgb2hsl(t,"h")),a===void 0&&(t.s=zt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=zt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:i,g:a,b:s}=t;i===void 0&&(t.r=zt.channel.hsl2rgb(t,"r")),a===void 0&&(t.g=zt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=zt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,i=t.r;return!this.type.is(li.HSL)&&i!==void 0?i:(this._ensureHSL(),zt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,i=t.g;return!this.type.is(li.HSL)&&i!==void 0?i:(this._ensureHSL(),zt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,i=t.b;return!this.type.is(li.HSL)&&i!==void 0?i:(this._ensureHSL(),zt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,i=t.h;return!this.type.is(li.RGB)&&i!==void 0?i:(this._ensureRGB(),zt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,i=t.s;return!this.type.is(li.RGB)&&i!==void 0?i:(this._ensureRGB(),zt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,i=t.l;return!this.type.is(li.RGB)&&i!==void 0?i:(this._ensureRGB(),zt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(li.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(li.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(li.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(li.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(li.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(li.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const xd=new XM({r:0,g:0,b:0,a:0},"transparent"),hl={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(hl.re);if(!t)return;const i=t[1],a=parseInt(i,16),s=i.length,l=s%4===0,c=s>4,h=c?1:17,d=c?8:4,f=l?0:-1,p=c?255:15;return xd.set({r:(a>>d*(f+3)&p)*h,g:(a>>d*(f+2)&p)*h,b:(a>>d*(f+1)&p)*h,a:l?(a&p)*h/255:1},e)},stringify:e=>{const{r:t,g:i,b:a,a:s}=e;return s<1?`#${cn[Math.round(t)]}${cn[Math.round(i)]}${cn[Math.round(a)]}${cn[Math.round(s*255)]}`:`#${cn[Math.round(t)]}${cn[Math.round(i)]}${cn[Math.round(a)]}`}},Yn={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(Yn.hueRe);if(t){const[,i,a]=t;switch(a){case"grad":return zt.channel.clamp.h(parseFloat(i)*.9);case"rad":return zt.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return zt.channel.clamp.h(parseFloat(i)*360)}}return zt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const i=e.match(Yn.re);if(!i)return;const[,a,s,l,c,h]=i;return xd.set({h:Yn._hue2deg(a),s:zt.channel.clamp.s(parseFloat(s)),l:zt.channel.clamp.l(parseFloat(l)),a:c?zt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{h:t,s:i,l:a,a:s}=e;return s<1?`hsla(${zt.lang.round(t)}, ${zt.lang.round(i)}%, ${zt.lang.round(a)}%, ${s})`:`hsl(${zt.lang.round(t)}, ${zt.lang.round(i)}%, ${zt.lang.round(a)}%)`}},sc={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=sc.colors[e];if(t)return hl.parse(t)},stringify:e=>{const t=hl.stringify(e);for(const i in sc.colors)if(sc.colors[i]===t)return i}},Qo={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 i=e.match(Qo.re);if(!i)return;const[,a,s,l,c,h,d,f,p]=i;return xd.set({r:zt.channel.clamp.r(s?parseFloat(a)*2.55:parseFloat(a)),g:zt.channel.clamp.g(c?parseFloat(l)*2.55:parseFloat(l)),b:zt.channel.clamp.b(d?parseFloat(h)*2.55:parseFloat(h)),a:f?zt.channel.clamp.a(p?parseFloat(f)/100:parseFloat(f)):1},e)},stringify:e=>{const{r:t,g:i,b:a,a:s}=e;return s<1?`rgba(${zt.lang.round(t)}, ${zt.lang.round(i)}, ${zt.lang.round(a)}, ${zt.lang.round(s)})`:`rgb(${zt.lang.round(t)}, ${zt.lang.round(i)}, ${zt.lang.round(a)})`}},Ur={format:{keyword:sc,hex:hl,rgb:Qo,rgba:Qo,hsl:Yn,hsla:Yn},parse:e=>{if(typeof e!="string")return e;const t=hl.parse(e)||Qo.parse(e)||Yn.parse(e)||sc.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(li.HSL)||e.data.r===void 0?Yn.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Qo.stringify(e):hl.stringify(e)},vk=(e,t)=>{const i=Ur.parse(e);for(const a in t)i[a]=zt.channel.clamp[a](t[a]);return Ur.stringify(i)},fn=(e,t,i=0,a=1)=>{if(typeof e!="number")return vk(e,{a:t});const s=xd.set({r:zt.channel.clamp.r(e),g:zt.channel.clamp.g(t),b:zt.channel.clamp.b(i),a:zt.channel.clamp.a(a)});return Ur.stringify(s)},VM=e=>{const{r:t,g:i,b:a}=Ur.parse(e),s=.2126*zt.channel.toLinear(t)+.7152*zt.channel.toLinear(i)+.0722*zt.channel.toLinear(a);return zt.lang.round(s)},ZM=e=>VM(e)>=.5,Br=e=>!ZM(e),Sk=(e,t,i)=>{const a=Ur.parse(e),s=a[t],l=zt.channel.clamp[t](s+i);return s!==l&&(a[t]=l),Ur.stringify(a)},rt=(e,t)=>Sk(e,"l",t),at=(e,t)=>Sk(e,"l",-t),B=(e,t)=>{const i=Ur.parse(e),a={};for(const s in t)t[s]&&(a[s]=i[s]+t[s]);return vk(e,a)},QM=(e,t,i=50)=>{const{r:a,g:s,b:l,a:c}=Ur.parse(e),{r:h,g:d,b:f,a:p}=Ur.parse(t),g=i/100,x=g*2-1,y=c-p,k=((x*y===-1?x:(x+y)/(1+x*y))+1)/2,S=1-k,T=a*k+h*S,_=s*k+d*S,E=l*k+f*S,M=c*g+p*(1-g);return fn(T,_,E,M)},X=(e,t=100)=>{const i=Ur.parse(e);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,QM(i,e,t)};function s1(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,a=Array(t);i<t;i++)a[i]=e[i];return a}function KM(e){if(Array.isArray(e))return e}function JM(e,t){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var a,s,l,c,h=[],d=!0,f=!1;try{if(l=(i=i.call(e)).next,t!==0)for(;!(d=(a=l.call(i)).done)&&(h.push(a.value),h.length!==t);d=!0);}catch(p){f=!0,s=p}finally{try{if(!d&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(f)throw s}}return h}}function t5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
85
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e5(e,t){return KM(e)||JM(e,t)||i5(e,t)||t5()}function i5(e,t){if(e){if(typeof e=="string")return s1(e,t);var i={}.toString.call(e).slice(8,-1);return i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set"?Array.from(e):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?s1(e,t):void 0}}const Tk=Object.entries,l1=Object.setPrototypeOf,r5=Object.isFrozen,a5=Object.getPrototypeOf,n5=Object.getOwnPropertyDescriptor;let bi=Object.freeze,sr=Object.seal,al=Object.create,wk=typeof Reflect<"u"&&Reflect,Eg=wk.apply,Lg=wk.construct;bi||(bi=function(t){return t});sr||(sr=function(t){return t});Eg||(Eg=function(t,i){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];return t.apply(i,s)});Lg||(Lg=function(t){for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];return new t(...a)});const Ks=Ie(Array.prototype.forEach),s5=Ie(Array.prototype.lastIndexOf),o1=Ie(Array.prototype.pop),Js=Ie(Array.prototype.push),l5=Ie(Array.prototype.splice),mi=Array.isArray,Ko=Ie(String.prototype.toLowerCase),tg=Ie(String.prototype.toString),c1=Ie(String.prototype.match),tl=Ie(String.prototype.replace),h1=Ie(String.prototype.indexOf),o5=Ie(String.prototype.trim),c5=Ie(Number.prototype.toString),h5=Ie(Boolean.prototype.toString),u1=typeof BigInt>"u"?null:Ie(BigInt.prototype.toString),d1=typeof Symbol>"u"?null:Ie(Symbol.prototype.toString),Ee=Ie(Object.prototype.hasOwnProperty),Ho=Ie(Object.prototype.toString),ti=Ie(RegExp.prototype.test),Uo=u5(TypeError);function Ie(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];return Eg(e,t,a)}}function u5(e){return function(){for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return Lg(e,i)}}function Ht(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ko;if(l1&&l1(e,null),!mi(t))return e;let a=t.length;for(;a--;){let s=t[a];if(typeof s=="string"){const l=i(s);l!==s&&(r5(t)||(t[a]=l),s=l)}e[s]=!0}return e}function d5(e){for(let t=0;t<e.length;t++)Ee(e,t)||(e[t]=null);return e}function Mi(e){const t=al(null);for(const a of Tk(e)){var i=e5(a,2);const s=i[0],l=i[1];Ee(e,s)&&(mi(l)?t[s]=d5(l):l&&typeof l=="object"&&l.constructor===Object?t[s]=Mi(l):t[s]=l)}return t}function f5(e){switch(typeof e){case"string":return e;case"number":return c5(e);case"boolean":return h5(e);case"bigint":return u1?u1(e):"0";case"symbol":return d1?d1(e):"Symbol()";case"undefined":return Ho(e);case"function":case"object":{if(e===null)return Ho(e);const t=e,i=zr(t,"toString");if(typeof i=="function"){const a=i(t);return typeof a=="string"?a:Ho(a)}return Ho(e)}default:return Ho(e)}}function zr(e,t){for(;e!==null;){const a=n5(e,t);if(a){if(a.get)return Ie(a.get);if(typeof a.value=="function")return Ie(a.value)}e=a5(e)}function i(){return null}return i}function p5(e){try{return ti(e,""),!0}catch{return!1}}const f1=bi(["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"]),eg=bi(["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"]),ig=bi(["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"]),g5=bi(["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"]),rg=bi(["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"]),m5=bi(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),p1=bi(["#text"]),g1=bi(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),ag=bi(["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"]),m1=bi(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),iu=bi(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),y5=sr(/{{[\w\W]*|^[\w\W]*}}/g),x5=sr(/<%[\w\W]*|^[\w\W]*%>/g),b5=sr(/\${[\w\W]*/g),C5=sr(/^data-[\-\w.\u00B7-\uFFFF]+$/),k5=sr(/^aria-[\-\w]+$/),y1=sr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),v5=sr(/^(?:\w+script|data):/i),S5=sr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),T5=sr(/^html$/i),w5=sr(/^[a-z][.\w]*(-[.\w]+)+$/i),on={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},_5=function(){return typeof window>"u"?null:window},B5=function(t,i){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let a=null;const s="data-tt-policy-suffix";i&&i.hasAttribute(s)&&(a=i.getAttribute(s));const l="dompurify"+(a?"#"+a:"");try{return t.createPolicy(l,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},x1=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function _k(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_5();const t=wt=>_k(wt);if(t.version="3.4.6",t.removed=[],!e||!e.document||e.document.nodeType!==on.document||!e.Element)return t.isSupported=!1,t;let i=e.document;const a=i,s=a.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,c=e.Node,h=e.Element,d=e.NodeFilter,f=e.NamedNodeMap;f===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const p=e.DOMParser,g=e.trustedTypes,x=h.prototype,y=zr(x,"cloneNode"),C=zr(x,"remove"),k=zr(x,"nextSibling"),S=zr(x,"childNodes"),T=zr(x,"parentNode"),_=zr(x,"shadowRoot"),E=zr(x,"attributes"),M=c&&c.prototype?zr(c.prototype,"nodeType"):null,O=c&&c.prototype?zr(c.prototype,"nodeName"):null;if(typeof l=="function"){const wt=i.createElement("template");wt.content&&wt.content.ownerDocument&&(i=wt.content.ownerDocument)}let N,H="";const j=i,lt=j.implementation,G=j.createNodeIterator,D=j.createDocumentFragment,Z=j.getElementsByTagName,tt=a.importNode;let W=x1();t.isSupported=typeof Tk=="function"&&typeof T=="function"&&lt&&lt.createHTMLDocument!==void 0;const P=y5,A=x5,$=b5,U=C5,it=k5,nt=v5,R=S5,J=w5;let ct=y1,ft=null;const xt=Ht({},[...f1,...eg,...ig,...rg,...p1]);let mt=null;const Ct=Ht({},[...g1,...ag,...m1,...iu]);let ot=Object.seal(al(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}})),bt=null,Ot=null;const jt=Object.seal(al(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let pe=!0,Re=!0,Oe=!1,Di=!0,ki=!1,Gr=!0,di=!1,Cn=!1,kn=!1,Lr=!1,os=!1,cs=!1,ri=!0,Nc=!1;const jl="user-content-";let hs=!0,Ar=!1,_a={},$i=null;const Pl=Ht({},["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 qc=null;const Ba=Ht({},["audio","video","img","source","image","track"]);let Xe=null;const cr=Ht({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),We="http://www.w3.org/1998/Math/MathML",us="http://www.w3.org/2000/svg",Xi="http://www.w3.org/1999/xhtml";let Ea=Xi,La=!1,Aa=null;const ds=Ht({},[We,us,Xi],tg);let hr=Ht({},["mi","mo","mn","ms","mtext"]),Ma=Ht({},["annotation-xml"]);const vn=Ht({},["title","style","font","a","script"]);let Sn=null;const Ic=["application/xhtml+xml","text/html"],Wl="text/html";let ge=null,Ra=null;const Hc=i.createElement("form"),Yl=function(F){return F instanceof RegExp||F instanceof Function},fs=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ra&&Ra===F)return;(!F||typeof F!="object")&&(F={}),F=Mi(F),Sn=Ic.indexOf(F.PARSER_MEDIA_TYPE)===-1?Wl:F.PARSER_MEDIA_TYPE,ge=Sn==="application/xhtml+xml"?tg:Ko,ft=Ee(F,"ALLOWED_TAGS")&&mi(F.ALLOWED_TAGS)?Ht({},F.ALLOWED_TAGS,ge):xt,mt=Ee(F,"ALLOWED_ATTR")&&mi(F.ALLOWED_ATTR)?Ht({},F.ALLOWED_ATTR,ge):Ct,Aa=Ee(F,"ALLOWED_NAMESPACES")&&mi(F.ALLOWED_NAMESPACES)?Ht({},F.ALLOWED_NAMESPACES,tg):ds,Xe=Ee(F,"ADD_URI_SAFE_ATTR")&&mi(F.ADD_URI_SAFE_ATTR)?Ht(Mi(cr),F.ADD_URI_SAFE_ATTR,ge):cr,qc=Ee(F,"ADD_DATA_URI_TAGS")&&mi(F.ADD_DATA_URI_TAGS)?Ht(Mi(Ba),F.ADD_DATA_URI_TAGS,ge):Ba,$i=Ee(F,"FORBID_CONTENTS")&&mi(F.FORBID_CONTENTS)?Ht({},F.FORBID_CONTENTS,ge):Pl,bt=Ee(F,"FORBID_TAGS")&&mi(F.FORBID_TAGS)?Ht({},F.FORBID_TAGS,ge):Mi({}),Ot=Ee(F,"FORBID_ATTR")&&mi(F.FORBID_ATTR)?Ht({},F.FORBID_ATTR,ge):Mi({}),_a=Ee(F,"USE_PROFILES")?F.USE_PROFILES&&typeof F.USE_PROFILES=="object"?Mi(F.USE_PROFILES):F.USE_PROFILES:!1,pe=F.ALLOW_ARIA_ATTR!==!1,Re=F.ALLOW_DATA_ATTR!==!1,Oe=F.ALLOW_UNKNOWN_PROTOCOLS||!1,Di=F.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ki=F.SAFE_FOR_TEMPLATES||!1,Gr=F.SAFE_FOR_XML!==!1,di=F.WHOLE_DOCUMENT||!1,Lr=F.RETURN_DOM||!1,os=F.RETURN_DOM_FRAGMENT||!1,cs=F.RETURN_TRUSTED_TYPE||!1,kn=F.FORCE_BODY||!1,ri=F.SANITIZE_DOM!==!1,Nc=F.SANITIZE_NAMED_PROPS||!1,hs=F.KEEP_CONTENT!==!1,Ar=F.IN_PLACE||!1,ct=p5(F.ALLOWED_URI_REGEXP)?F.ALLOWED_URI_REGEXP:y1,Ea=typeof F.NAMESPACE=="string"?F.NAMESPACE:Xi,hr=Ee(F,"MATHML_TEXT_INTEGRATION_POINTS")&&F.MATHML_TEXT_INTEGRATION_POINTS&&typeof F.MATHML_TEXT_INTEGRATION_POINTS=="object"?Mi(F.MATHML_TEXT_INTEGRATION_POINTS):Ht({},["mi","mo","mn","ms","mtext"]),Ma=Ee(F,"HTML_INTEGRATION_POINTS")&&F.HTML_INTEGRATION_POINTS&&typeof F.HTML_INTEGRATION_POINTS=="object"?Mi(F.HTML_INTEGRATION_POINTS):Ht({},["annotation-xml"]);const ut=Ee(F,"CUSTOM_ELEMENT_HANDLING")&&F.CUSTOM_ELEMENT_HANDLING&&typeof F.CUSTOM_ELEMENT_HANDLING=="object"?Mi(F.CUSTOM_ELEMENT_HANDLING):al(null);if(ot=al(null),Ee(ut,"tagNameCheck")&&Yl(ut.tagNameCheck)&&(ot.tagNameCheck=ut.tagNameCheck),Ee(ut,"attributeNameCheck")&&Yl(ut.attributeNameCheck)&&(ot.attributeNameCheck=ut.attributeNameCheck),Ee(ut,"allowCustomizedBuiltInElements")&&typeof ut.allowCustomizedBuiltInElements=="boolean"&&(ot.allowCustomizedBuiltInElements=ut.allowCustomizedBuiltInElements),ki&&(Re=!1),os&&(Lr=!0),_a&&(ft=Ht({},p1),mt=al(null),_a.html===!0&&(Ht(ft,f1),Ht(mt,g1)),_a.svg===!0&&(Ht(ft,eg),Ht(mt,ag),Ht(mt,iu)),_a.svgFilters===!0&&(Ht(ft,ig),Ht(mt,ag),Ht(mt,iu)),_a.mathMl===!0&&(Ht(ft,rg),Ht(mt,m1),Ht(mt,iu))),jt.tagCheck=null,jt.attributeCheck=null,Ee(F,"ADD_TAGS")&&(typeof F.ADD_TAGS=="function"?jt.tagCheck=F.ADD_TAGS:mi(F.ADD_TAGS)&&(ft===xt&&(ft=Mi(ft)),Ht(ft,F.ADD_TAGS,ge))),Ee(F,"ADD_ATTR")&&(typeof F.ADD_ATTR=="function"?jt.attributeCheck=F.ADD_ATTR:mi(F.ADD_ATTR)&&(mt===Ct&&(mt=Mi(mt)),Ht(mt,F.ADD_ATTR,ge))),Ee(F,"ADD_URI_SAFE_ATTR")&&mi(F.ADD_URI_SAFE_ATTR)&&Ht(Xe,F.ADD_URI_SAFE_ATTR,ge),Ee(F,"FORBID_CONTENTS")&&mi(F.FORBID_CONTENTS)&&($i===Pl&&($i=Mi($i)),Ht($i,F.FORBID_CONTENTS,ge)),Ee(F,"ADD_FORBID_CONTENTS")&&mi(F.ADD_FORBID_CONTENTS)&&($i===Pl&&($i=Mi($i)),Ht($i,F.ADD_FORBID_CONTENTS,ge)),hs&&(ft["#text"]=!0),di&&Ht(ft,["html","head","body"]),ft.table&&(Ht(ft,["tbody"]),delete bt.tbody),F.TRUSTED_TYPES_POLICY){if(typeof F.TRUSTED_TYPES_POLICY.createHTML!="function")throw Uo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof F.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Uo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');N=F.TRUSTED_TYPES_POLICY,H=N.createHTML("")}else N===void 0&&(N=B5(g,s)),N!==null&&typeof H=="string"&&(H=N.createHTML(""));bi&&bi(F),Ra=F},ps=Ht({},[...eg,...ig,...g5]),gs=Ht({},[...rg,...m5]),Uc=function(F){let ut=T(F);(!ut||!ut.tagName)&&(ut={namespaceURI:Ea,tagName:"template"});const yt=Ko(F.tagName),re=Ko(ut.tagName);return Aa[F.namespaceURI]?F.namespaceURI===us?ut.namespaceURI===Xi?yt==="svg":ut.namespaceURI===We?yt==="svg"&&(re==="annotation-xml"||hr[re]):!!ps[yt]:F.namespaceURI===We?ut.namespaceURI===Xi?yt==="math":ut.namespaceURI===us?yt==="math"&&Ma[re]:!!gs[yt]:F.namespaceURI===Xi?ut.namespaceURI===us&&!Ma[re]||ut.namespaceURI===We&&!hr[re]?!1:!gs[yt]&&(vn[yt]||!ps[yt]):!!(Sn==="application/xhtml+xml"&&Aa[F.namespaceURI]):!1},vi=function(F){Js(t.removed,{element:F});try{T(F).removeChild(F)}catch{C(F)}},ai=function(F,ut){try{Js(t.removed,{attribute:ut.getAttributeNode(F),from:ut})}catch{Js(t.removed,{attribute:null,from:ut})}if(ut.removeAttribute(F),F==="is")if(Lr||os)try{vi(ut)}catch{}else try{ut.setAttribute(F,"")}catch{}},Fe=function(F){let ut=null,yt=null;if(kn)F="<remove></remove>"+F;else{const ye=c1(F,/^[\r\n\t ]+/);yt=ye&&ye[0]}Sn==="application/xhtml+xml"&&Ea===Xi&&(F='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+F+"</body></html>");const re=N?N.createHTML(F):F;if(Ea===Xi)try{ut=new p().parseFromString(re,Sn)}catch{}if(!ut||!ut.documentElement){ut=lt.createDocument(Ea,"template",null);try{ut.documentElement.innerHTML=La?H:re}catch{}}const Kt=ut.body||ut.documentElement;return F&&yt&&Kt.insertBefore(i.createTextNode(yt),Kt.childNodes[0]||null),Ea===Xi?Z.call(ut,di?"html":"body")[0]:di?ut.documentElement:Kt},Ve=function(F){return G.call(F.ownerDocument||F,F,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Xr=function(F){F.normalize();const ut=G.call(F.ownerDocument||F,F,d.SHOW_TEXT|d.SHOW_COMMENT|d.SHOW_CDATA_SECTION|d.SHOW_PROCESSING_INSTRUCTION,null);let yt=ut.nextNode();for(;yt;){let re=yt.data;Ks([P,A,$],Kt=>{re=tl(re,Kt," ")}),yt.data=re,yt=ut.nextNode()}},Oa=function(F){const ut=O?O(F):null;return typeof ut!="string"||ge(ut)!=="form"?!1:typeof F.nodeName!="string"||typeof F.textContent!="string"||typeof F.removeChild!="function"||F.attributes!==E(F)||typeof F.removeAttribute!="function"||typeof F.setAttribute!="function"||typeof F.namespaceURI!="string"||typeof F.insertBefore!="function"||typeof F.hasChildNodes!="function"||F.childNodes!==S(F)},Gl=function(F){if(!M||typeof F!="object"||F===null)return!1;try{return M(F)===on.documentFragment}catch{return!1}},ms=function(F){if(!M||typeof F!="object"||F===null)return!1;try{return typeof M(F)=="number"}catch{return!1}};function Vi(wt,F,ut){Ks(wt,yt=>{yt.call(t,F,ut,Ra)})}const Fa=function(F){let ut=null;if(Vi(W.beforeSanitizeElements,F,null),Oa(F))return vi(F),!0;const yt=ge(F.nodeName);if(Vi(W.uponSanitizeElement,F,{tagName:yt,allowedTags:ft}),Gr&&F.hasChildNodes()&&!ms(F.firstElementChild)&&ti(/<[/\w!]/g,F.innerHTML)&&ti(/<[/\w!]/g,F.textContent)||Gr&&F.namespaceURI===Xi&&yt==="style"&&ms(F.firstElementChild)||F.nodeType===on.progressingInstruction||Gr&&F.nodeType===on.comment&&ti(/<[/\w]/g,F.data))return vi(F),!0;if(bt[yt]||!(jt.tagCheck instanceof Function&&jt.tagCheck(yt))&&!ft[yt]){if(!bt[yt]&&Vr(yt)&&(ot.tagNameCheck instanceof RegExp&&ti(ot.tagNameCheck,yt)||ot.tagNameCheck instanceof Function&&ot.tagNameCheck(yt)))return!1;if(hs&&!$i[yt]){const Kt=T(F)||F.parentNode,ye=S(F)||F.childNodes;if(ye&&Kt){const Si=ye.length;for(let fi=Si-1;fi>=0;--fi){const ni=y(ye[fi],!0);Kt.insertBefore(ni,k(F))}}}return vi(F),!0}return(M?M(F):F.nodeType)===on.element&&!Uc(F)||(yt==="noscript"||yt==="noembed"||yt==="noframes")&&ti(/<\/no(script|embed|frames)/i,F.innerHTML)?(vi(F),!0):(ki&&F.nodeType===on.text&&(ut=F.textContent,Ks([P,A,$],Kt=>{ut=tl(ut,Kt," ")}),F.textContent!==ut&&(Js(t.removed,{element:F.cloneNode()}),F.textContent=ut)),Vi(W.afterSanitizeElements,F,null),!1)},ys=function(F,ut,yt){if(Ot[ut]||ri&&(ut==="id"||ut==="name")&&(yt in i||yt in Hc))return!1;const re=mt[ut]||jt.attributeCheck instanceof Function&&jt.attributeCheck(ut,F);if(!(Re&&!Ot[ut]&&ti(U,ut))){if(!(pe&&ti(it,ut))){if(!re||Ot[ut]){if(!(Vr(F)&&(ot.tagNameCheck instanceof RegExp&&ti(ot.tagNameCheck,F)||ot.tagNameCheck instanceof Function&&ot.tagNameCheck(F))&&(ot.attributeNameCheck instanceof RegExp&&ti(ot.attributeNameCheck,ut)||ot.attributeNameCheck instanceof Function&&ot.attributeNameCheck(ut,F))||ut==="is"&&ot.allowCustomizedBuiltInElements&&(ot.tagNameCheck instanceof RegExp&&ti(ot.tagNameCheck,yt)||ot.tagNameCheck instanceof Function&&ot.tagNameCheck(yt))))return!1}else if(!Xe[ut]){if(!ti(ct,tl(yt,R,""))){if(!((ut==="src"||ut==="xlink:href"||ut==="href")&&F!=="script"&&h1(yt,"data:")===0&&qc[F])){if(!(Oe&&!ti(nt,tl(yt,R,"")))){if(yt)return!1}}}}}}return!0},Da=Ht({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Vr=function(F){return!Da[Ko(F)]&&ti(J,F)},$a=function(F){Vi(W.beforeSanitizeAttributes,F,null);const ut=F.attributes;if(!ut||Oa(F))return;const yt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:mt,forceKeepAttr:void 0};let re=ut.length;for(;re--;){const Kt=ut[re],ye=Kt.name,Si=Kt.namespaceURI,fi=Kt.value,ni=ge(ye),zi=fi;let ae=ye==="value"?zi:o5(zi);if(yt.attrName=ni,yt.attrValue=ae,yt.keepAttr=!0,yt.forceKeepAttr=void 0,Vi(W.uponSanitizeAttribute,F,yt),ae=yt.attrValue,Nc&&(ni==="id"||ni==="name")&&h1(ae,jl)!==0&&(ai(ye,F),ae=jl+ae),Gr&&ti(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ae)){ai(ye,F);continue}if(ni==="attributename"&&c1(ae,"href")){ai(ye,F);continue}if(yt.forceKeepAttr)continue;if(!yt.keepAttr){ai(ye,F);continue}if(!Di&&ti(/\/>/i,ae)){ai(ye,F);continue}ki&&Ks([P,A,$],jc=>{ae=tl(ae,jc," ")});const Xl=ge(F.nodeName);if(!ys(Xl,ni,ae)){ai(ye,F);continue}if(N&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Si)switch(g.getAttributeType(Xl,ni)){case"TrustedHTML":{ae=N.createHTML(ae);break}case"TrustedScriptURL":{ae=N.createScriptURL(ae);break}}if(ae!==zi)try{Si?F.setAttributeNS(Si,ye,ae):F.setAttribute(ye,ae),Oa(F)?vi(F):o1(t.removed)}catch{ai(ye,F)}}Vi(W.afterSanitizeAttributes,F,null)},Mr=function(F){let ut=null;const yt=Ve(F);for(Vi(W.beforeSanitizeShadowDOM,F,null);ut=yt.nextNode();)Vi(W.uponSanitizeShadowNode,ut,null),Fa(ut),$a(ut),Gl(ut.content)&&Mr(ut.content);Vi(W.afterSanitizeShadowDOM,F,null)},Se=function(F){if((M?M(F):F.nodeType)===on.element){const Kt=_?_(F):F.shadowRoot;Gl(Kt)&&(Se(Kt),Mr(Kt))}const yt=S?S(F):F.childNodes;if(!yt)return;const re=[];Ks(yt,Kt=>{Js(re,Kt)});for(const Kt of re)Se(Kt)};return t.sanitize=function(wt){let F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ut=null,yt=null,re=null,Kt=null;if(La=!wt,La&&(wt="<!-->"),typeof wt!="string"&&!ms(wt)&&(wt=f5(wt),typeof wt!="string"))throw Uo("dirty is not a string, aborting");if(!t.isSupported)return wt;if(Cn||fs(F),t.removed=[],typeof wt=="string"&&(Ar=!1),Ar){const fi=O?O(wt):wt.nodeName;if(typeof fi=="string"){const ni=ge(fi);if(!ft[ni]||bt[ni])throw Uo("root node is forbidden and cannot be sanitized in-place")}if(Oa(wt))throw Uo("root node is clobbered and cannot be sanitized in-place");Se(wt)}else if(ms(wt))ut=Fe("<!---->"),yt=ut.ownerDocument.importNode(wt,!0),yt.nodeType===on.element&&yt.nodeName==="BODY"||yt.nodeName==="HTML"?ut=yt:ut.appendChild(yt),Se(yt);else{if(!Lr&&!ki&&!di&&wt.indexOf("<")===-1)return N&&cs?N.createHTML(wt):wt;if(ut=Fe(wt),!ut)return Lr?null:cs?H:""}ut&&kn&&vi(ut.firstChild);const ye=Ve(Ar?wt:ut);for(;re=ye.nextNode();)Fa(re),$a(re),Gl(re.content)&&Mr(re.content);if(Ar)return ki&&Xr(wt),wt;if(Lr){if(ki&&Xr(ut),os)for(Kt=D.call(ut.ownerDocument);ut.firstChild;)Kt.appendChild(ut.firstChild);else Kt=ut;return(mt.shadowroot||mt.shadowrootmode)&&(Kt=tt.call(a,Kt,!0)),Kt}let Si=di?ut.outerHTML:ut.innerHTML;return di&&ft["!doctype"]&&ut.ownerDocument&&ut.ownerDocument.doctype&&ut.ownerDocument.doctype.name&&ti(T5,ut.ownerDocument.doctype.name)&&(Si="<!DOCTYPE "+ut.ownerDocument.doctype.name+`>
86
+ `+Si),ki&&Ks([P,A,$],fi=>{Si=tl(Si,fi," ")}),N&&cs?N.createHTML(Si):Si},t.setConfig=function(){let wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};fs(wt),Cn=!0},t.clearConfig=function(){Ra=null,Cn=!1},t.isValidAttribute=function(wt,F,ut){Ra||fs({});const yt=ge(wt),re=ge(F);return ys(yt,re,ut)},t.addHook=function(wt,F){typeof F=="function"&&Js(W[wt],F)},t.removeHook=function(wt,F){if(F!==void 0){const ut=s5(W[wt],F);return ut===-1?void 0:l5(W[wt],ut,1)[0]}return o1(W[wt])},t.removeHooks=function(wt){W[wt]=[]},t.removeAllHooks=function(){W=x1()},t}var Bl=_k(),Bk=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,lc=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,E5=/\s*%%.*\n/gm,fl,Ek=(fl=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},v(fl,"UnknownDiagramError"),fl),Jn={},Vm=v(function(e,t){e=e.replace(Bk,"").replace(lc,"").replace(E5,`
87
+ `);for(const[i,{detector:a}]of Object.entries(Jn))if(a(e,t))return i;throw new Ek(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ag=v((...e)=>{for(const{id:t,detector:i,loader:a}of e)Lk(t,i,a)},"registerLazyLoadedDiagrams"),Lk=v((e,t,i)=>{Jn[e]&&gt.warn(`Detector with key ${e} already exists. Overwriting.`),Jn[e]={detector:t,loader:i},gt.debug(`Detector with key ${e} added${i?" with loader":""}`)},"addDetector"),L5=v(e=>Jn[e].loader,"getDiagramLoader"),Mg=v((e,t,{depth:i=2,clobber:a=!1}={})=>{const s={depth:i,clobber:a};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(l=>Mg(e,l,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(l=>{e.includes(l)||e.push(l)}),e):e===void 0||i<=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(l=>{typeof t[l]=="object"&&t[l]!==null&&(e[l]===void 0||typeof e[l]=="object")?(e[l]===void 0&&(e[l]=Array.isArray(t[l])?[]:{}),e[l]=Mg(e[l],t[l],{depth:i-1,clobber:a})):(a||typeof e[l]!="object"&&typeof t[l]!="object")&&(e[l]=t[l])}),e)},"assignWithDepth"),je=Mg,Pr="#ffffff",Wr="#f2f2f2",$t=v((e,t)=>t?B(e,{s:-40,l:10}):B(e,{s:-40,l:-10}),"mkBorder"),pl,A5=(pl=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||B(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||B(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||X(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||X(this.tertiaryColor),this.lineColor=this.lineColor||X(this.background),this.arrowheadColor=this.arrowheadColor||X(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?at(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||at(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||X(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||rt(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.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||at(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||at(this.mainBkg,10)):(this.rowOdd=this.rowOdd||rt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||rt(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||B(this.primaryColor,{h:30}),this.cScale4=this.cScale4||B(this.primaryColor,{h:60}),this.cScale5=this.cScale5||B(this.primaryColor,{h:90}),this.cScale6=this.cScale6||B(this.primaryColor,{h:120}),this.cScale7=this.cScale7||B(this.primaryColor,{h:150}),this.cScale8=this.cScale8||B(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||B(this.primaryColor,{h:270}),this.cScale10=this.cScale10||B(this.primaryColor,{h:300}),this.cScale11=this.cScale11||B(this.primaryColor,{h:330}),this.darkMode)for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScale"+i]=at(this["cScale"+i],75);else for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScale"+i]=at(this["cScale"+i],25);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||X(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this.darkMode?this["cScalePeer"+i]=this["cScalePeer"+i]||rt(this["cScale"+i],10):this["cScalePeer"+i]=this["cScalePeer"+i]||at(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=this["cScaleLabel"+i]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||B(this.mainBkg,{h:180,s:-15,l:t*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||B(this.mainBkg,{h:180,s:-15,l:t*(8+i*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||B(this.primaryColor,{h:64}),this.fillType3=this.fillType3||B(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||B(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||B(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||B(this.primaryColor,{h:128}),this.fillType7=this.fillType7||B(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||B(this.primaryColor,{l:-10}),this.pie5=this.pie5||B(this.secondaryColor,{l:-10}),this.pie6=this.pie6||B(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||B(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||B(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||B(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||B(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||B(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||B(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.venn1=this.venn1??B(this.primaryColor,{l:-30}),this.venn2=this.venn2??B(this.secondaryColor,{l:-30}),this.venn3=this.venn3??B(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??B(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??B(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??B(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??B(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??B(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},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||B(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Br(this.quadrant1Fill)?rt(this.quadrant1Fill):at(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?at(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||B(this.primaryColor,{h:-30}),this.git4=this.git4||B(this.primaryColor,{h:-60}),this.git5=this.git5||B(this.primaryColor,{h:-90}),this.git6=this.git6||B(this.primaryColor,{h:60}),this.git7=this.git7||B(this.primaryColor,{h:120}),this.darkMode?(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)):(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)),this.gitInv0=this.gitInv0||X(this.git0),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Wr,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},v(pl,"Theme"),pl),M5=v(e=>{const t=new A5;return t.calculate(e),t},"getThemeVariables"),gl,R5=(gl=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=rt(this.primaryColor,16),this.tertiaryColor=B(this.primaryColor,{h:-160}),this.primaryBorderColor=X(this.background),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=X(this.primaryColor),this.secondaryTextColor=X(this.secondaryColor),this.tertiaryTextColor=X(this.tertiaryColor),this.lineColor=X(this.background),this.textColor=X(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=rt(X("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=fn(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.radius=5,this.strokeWidth=1,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.clusterBkg="#302F3D",this.sectionBkgColor=at("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=at(this.sectionBkgColor,10),this.taskBorderColor=fn(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=fn(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||rt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||at(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=rt(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=rt(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=rt(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=X(this.doneTaskBkgColor),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=B(this.primaryColor,{h:64}),this.fillType3=B(this.secondaryColor,{h:64}),this.fillType4=B(this.primaryColor,{h:-64}),this.fillType5=B(this.secondaryColor,{h:-64}),this.fillType6=B(this.primaryColor,{h:128}),this.fillType7=B(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||B(this.primaryColor,{h:30}),this.cScale4=this.cScale4||B(this.primaryColor,{h:60}),this.cScale5=this.cScale5||B(this.primaryColor,{h:90}),this.cScale6=this.cScale6||B(this.primaryColor,{h:120}),this.cScale7=this.cScale7||B(this.primaryColor,{h:150}),this.cScale8=this.cScale8||B(this.primaryColor,{h:210}),this.cScale9=this.cScale9||B(this.primaryColor,{h:270}),this.cScale10=this.cScale10||B(this.primaryColor,{h:300}),this.cScale11=this.cScale11||B(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||X(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||rt(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||B(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||B(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,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";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??rt(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||B(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Br(this.quadrant1Fill)?rt(this.quadrant1Fill):at(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},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?at(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=rt(this.secondaryColor,20),this.git1=rt(this.pie2||this.secondaryColor,20),this.git2=rt(this.pie3||this.tertiaryColor,20),this.git3=rt(this.pie4||B(this.primaryColor,{h:-30}),20),this.git4=rt(this.pie5||B(this.primaryColor,{h:-60}),20),this.git5=rt(this.pie6||B(this.primaryColor,{h:-90}),10),this.git6=rt(this.pie7||B(this.primaryColor,{h:60}),10),this.git7=rt(this.pie8||B(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||X(this.git0),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||X(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||X(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.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||rt("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||rt("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||rt("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||rt("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||rt(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||rt(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||rt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||rt(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},v(gl,"Theme"),gl),O5=v(e=>{const t=new R5;return t.calculate(e),t},"getThemeVariables"),ml,F5=(ml=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=B(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=B(this.primaryColor,{h:-160}),this.primaryBorderColor=$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=X(this.primaryColor),this.secondaryTextColor=X(this.secondaryColor),this.tertiaryTextColor=X(this.tertiaryColor),this.lineColor=X(this.background),this.textColor=X(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=$t(this.primaryColor,this.darkMode),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.radius=5,this.strokeWidth=1,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.clusterBkg="#FBFBFF",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=fn(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.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",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.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||B(this.primaryColor,{h:30}),this.cScale4=this.cScale4||B(this.primaryColor,{h:60}),this.cScale5=this.cScale5||B(this.primaryColor,{h:90}),this.cScale6=this.cScale6||B(this.primaryColor,{h:120}),this.cScale7=this.cScale7||B(this.primaryColor,{h:150}),this.cScale8=this.cScale8||B(this.primaryColor,{h:210}),this.cScale9=this.cScale9||B(this.primaryColor,{h:270}),this.cScale10=this.cScale10||B(this.primaryColor,{h:300}),this.cScale11=this.cScale11||B(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||at(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||at(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=at(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||at(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||B(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||B(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||B(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||X(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||X(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||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=this.border1,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||rt(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||rt(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=B(this.primaryColor,{h:64}),this.fillType3=B(this.secondaryColor,{h:64}),this.fillType4=B(this.primaryColor,{h:-64}),this.fillType5=B(this.secondaryColor,{h:-64}),this.fillType6=B(this.primaryColor,{h:128}),this.fillType7=B(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||B(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||B(this.primaryColor,{l:-10}),this.pie5=this.pie5||B(this.secondaryColor,{l:-30}),this.pie6=this.pie6||B(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||B(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||B(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||B(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||B(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||B(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||B(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.venn1=this.venn1??B(this.primaryColor,{l:-30}),this.venn2=this.venn2??B(this.secondaryColor,{l:-30}),this.venn3=this.venn3??B(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??B(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??B(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??B(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??B(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??B(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||B(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Br(this.quadrant1Fill)?rt(this.quadrant1Fill):at(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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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||B(this.primaryColor,{h:-30}),this.git4=this.git4||B(this.primaryColor,{h:-60}),this.git5=this.git5||B(this.primaryColor,{h:-90}),this.git6=this.git6||B(this.primaryColor,{h:60}),this.git7=this.git7||B(this.primaryColor,{h:120}),this.darkMode?(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)):(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)),this.gitInv0=this.gitInv0||at(X(this.git0),25),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||X(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||X(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Wr}calculate(t){if(Object.keys(this).forEach(a=>{this[a]==="calculated"&&(this[a]=void 0)}),typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},v(ml,"Theme"),ml),D5=v(e=>{const t=new F5;return t.calculate(e),t},"getThemeVariables"),yl,$5=(yl=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=rt("#cde498",10),this.primaryBorderColor=$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=X(this.primaryColor),this.secondaryTextColor=X(this.secondaryColor),this.tertiaryTextColor=X(this.primaryColor),this.lineColor=X(this.background),this.textColor=X(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,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.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=at(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||B(this.primaryColor,{h:30}),this.cScale4=this.cScale4||B(this.primaryColor,{h:60}),this.cScale5=this.cScale5||B(this.primaryColor,{h:90}),this.cScale6=this.cScale6||B(this.primaryColor,{h:120}),this.cScale7=this.cScale7||B(this.primaryColor,{h:150}),this.cScale8=this.cScale8||B(this.primaryColor,{h:210}),this.cScale9=this.cScale9||B(this.primaryColor,{h:270}),this.cScale10=this.cScale10||B(this.primaryColor,{h:300}),this.cScale11=this.cScale11||B(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||at(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||at(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=at(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||at(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||B(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||B(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||B(this.mainBkg,{h:30,s:-30,l:-(8+t*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||rt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||rt(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=B(this.primaryColor,{h:64}),this.fillType3=B(this.secondaryColor,{h:64}),this.fillType4=B(this.primaryColor,{h:-64}),this.fillType5=B(this.secondaryColor,{h:-64}),this.fillType6=B(this.primaryColor,{h:128}),this.fillType7=B(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||B(this.primaryColor,{l:-30}),this.pie5=this.pie5||B(this.secondaryColor,{l:-30}),this.pie6=this.pie6||B(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||B(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||B(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||B(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||B(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||B(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||B(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.venn1=this.venn1??B(this.primaryColor,{l:-30}),this.venn2=this.venn2??B(this.secondaryColor,{l:-30}),this.venn3=this.venn3??B(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??B(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??B(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??B(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??B(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??B(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||B(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Br(this.quadrant1Fill)?rt(this.quadrant1Fill):at(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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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||B(this.primaryColor,{h:-30}),this.git4=this.git4||B(this.primaryColor,{h:-60}),this.git5=this.git5||B(this.primaryColor,{h:-90}),this.git6=this.git6||B(this.primaryColor,{h:60}),this.git7=this.git7||B(this.primaryColor,{h:120}),this.darkMode?(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)):(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)),this.gitInv0=this.gitInv0||X(this.git0),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||X(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||X(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Wr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},v(yl,"Theme"),yl),z5=v(e=>{const t=new $5;return t.calculate(e),t},"getThemeVariables"),xl,N5=(xl=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=rt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=B(this.primaryColor,{h:-160}),this.primaryBorderColor=$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=X(this.primaryColor),this.secondaryTextColor=X(this.secondaryColor),this.tertiaryTextColor=X(this.tertiaryColor),this.lineColor=X(this.background),this.textColor=X(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.radius=5,this.strokeWidth=1,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.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||rt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=rt(this.contrast,55),this.border2=this.contrast,this.actorBorder=rt(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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||X(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||rt(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||at(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||B(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||B(this.mainBkg,{l:-(8+t*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=rt(this.contrast,30),this.sectionBkgColor2=rt(this.contrast,30),this.taskBorderColor=at(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=rt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=at(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=B(this.primaryColor,{h:64}),this.fillType3=B(this.secondaryColor,{h:64}),this.fillType4=B(this.primaryColor,{h:-64}),this.fillType5=B(this.secondaryColor,{h:-64}),this.fillType6=B(this.primaryColor,{h:128}),this.fillType7=B(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||B(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Br(this.quadrant1Fill)?rt(this.quadrant1Fill):at(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},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=at(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||B(this.primaryColor,{h:-30}),this.git4=this.pie5||B(this.primaryColor,{h:-60}),this.git5=this.pie6||B(this.primaryColor,{h:-90}),this.git6=this.pie7||B(this.primaryColor,{h:60}),this.git7=this.pie8||B(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||X(this.git0),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Wr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},v(xl,"Theme"),xl),q5=v(e=>{const t=new N5;return t.calculate(e),t},"getThemeVariables"),bl,I5=(bl=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=$t(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||B(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||B(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||X(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||X(this.tertiaryColor),this.lineColor=this.lineColor||X(this.background),this.arrowheadColor=this.arrowheadColor||X(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?at(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||at(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||X(this.lineColor);const t="#ECECFE",i="#E9E9F1",a=B(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||a,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||rt(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,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.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||t,this.cScale1=this.cScale1||i,this.cScale2=this.cScale2||a,this.cScale3=this.cScale3||B(t,{h:30}),this.cScale4=this.cScale4||B(t,{h:60}),this.cScale5=this.cScale5||B(t,{h:90}),this.cScale6=this.cScale6||B(t,{h:120}),this.cScale7=this.cScale7||B(t,{h:150}),this.cScale8=this.cScale8||B(t,{h:210,l:150}),this.cScale9=this.cScale9||B(t,{h:270}),this.cScale10=this.cScale10||B(t,{h:300}),this.cScale11=this.cScale11||B(t,{h:330}),this.darkMode)for(let l=0;l<this.THEME_COLOR_LIMIT;l++)this["cScale"+l]=at(this["cScale"+l],75);else for(let l=0;l<this.THEME_COLOR_LIMIT;l++)this["cScale"+l]=at(this["cScale"+l],25);for(let l=0;l<this.THEME_COLOR_LIMIT;l++)this["cScaleInv"+l]=this["cScaleInv"+l]||X(this["cScale"+l]);for(let l=0;l<this.THEME_COLOR_LIMIT;l++)this.darkMode?this["cScalePeer"+l]=this["cScalePeer"+l]||rt(this["cScale"+l],10):this["cScalePeer"+l]=this["cScalePeer"+l]||at(this["cScale"+l],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let l=0;l<this.THEME_COLOR_LIMIT;l++)this["cScaleLabel"+l]=this["cScaleLabel"+l]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let l=0;l<5;l++)this["surface"+l]=this["surface"+l]||B(this.mainBkg,{h:180,s:-15,l:s*(5+l*3)}),this["surfacePeer"+l]=this["surfacePeer"+l]||B(this.mainBkg,{h:180,s:-15,l:s*(8+l*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||i,this.fillType2=this.fillType2||B(t,{h:64}),this.fillType3=this.fillType3||B(i,{h:64}),this.fillType4=this.fillType4||B(t,{h:-64}),this.fillType5=this.fillType5||B(i,{h:-64}),this.fillType6=this.fillType6||B(t,{h:128}),this.fillType7=this.fillType7||B(i,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||i,this.pie3=this.pie3||a,this.pie4=this.pie4||B(t,{l:-10}),this.pie5=this.pie5||B(i,{l:-10}),this.pie6=this.pie6||B(a,{l:-10}),this.pie7=this.pie7||B(t,{h:60,l:-10}),this.pie8=this.pie8||B(t,{h:-60,l:-10}),this.pie9=this.pie9||B(t,{h:120,l:0}),this.pie10=this.pie10||B(t,{h:60,l:-20}),this.pie11=this.pie11||B(t,{h:-60,l:-20}),this.pie12=this.pie12||B(t,{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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||B(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Br(this.quadrant1Fill)?rt(this.quadrant1Fill):at(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,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?at(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||i,this.git2=this.git2||a,this.git3=this.git3||B(t,{h:-30}),this.git4=this.git4||B(t,{h:-60}),this.git5=this.git5||B(t,{h:-90}),this.git6=this.git6||B(t,{h:60}),this.git7=this.git7||B(t,{h:120}),this.darkMode?(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)):(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)),this.gitInv0=this.gitInv0||X(this.git0),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(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||Pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Wr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},v(bl,"Theme"),bl),H5=v(e=>{const t=new I5;return t.calculate(e),t},"getThemeVariables"),Cl,U5=(Cl=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=rt(this.primaryColor,16),this.tertiaryColor=B(this.primaryColor,{h:-160}),this.primaryBorderColor=X(this.background),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=X(this.primaryColor),this.secondaryTextColor=X(this.secondaryColor),this.tertiaryTextColor=X(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=rt(X("#323D47"),10),this.border1="#ccc",this.border2=fn(255,255,255,.25),this.arrowheadColor=X(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||B(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||B(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||X(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||X(this.tertiaryColor),this.lineColor=this.lineColor||X(this.background),this.arrowheadColor=this.arrowheadColor||X(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.border1,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?at(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||at(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||X(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||rt(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||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,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.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||B(this.primaryColor,{h:30}),this.cScale4=this.cScale4||B(this.primaryColor,{h:60}),this.cScale5=this.cScale5||B(this.primaryColor,{h:90}),this.cScale6=this.cScale6||B(this.primaryColor,{h:120}),this.cScale7=this.cScale7||B(this.primaryColor,{h:150}),this.cScale8=this.cScale8||B(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||B(this.primaryColor,{h:270}),this.cScale10=this.cScale10||B(this.primaryColor,{h:300}),this.cScale11=this.cScale11||B(this.primaryColor,{h:330}),this.darkMode)for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScale"+i]=at(this["cScale"+i],75);else for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScale"+i]=at(this["cScale"+i],25);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||X(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this.darkMode?this["cScalePeer"+i]=this["cScalePeer"+i]||rt(this["cScale"+i],10):this["cScalePeer"+i]=this["cScalePeer"+i]||at(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=this["cScaleLabel"+i]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||B(this.mainBkg,{h:180,s:-15,l:t*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||B(this.mainBkg,{h:180,s:-15,l:t*(8+i*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||B(this.primaryColor,{h:64}),this.fillType3=this.fillType3||B(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||B(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||B(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||B(this.primaryColor,{h:128}),this.fillType7=this.fillType7||B(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||B(this.primaryColor,{l:-10}),this.pie5=this.pie5||B(this.secondaryColor,{l:-10}),this.pie6=this.pie6||B(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||B(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||B(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||B(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||B(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||B(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||B(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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||B(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Br(this.quadrant1Fill)?rt(this.quadrant1Fill):at(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?at(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)):(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)),this.gitInv0=this.gitInv0||X(this.git0),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(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||Pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Wr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},v(Cl,"Theme"),Cl),j5=v(e=>{const t=new U5;return t.calculate(e),t},"getThemeVariables"),kl,P5=(kl=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=$t("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||B(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||B(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||X(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||X(this.tertiaryColor),this.lineColor=this.lineColor||X(this.background),this.arrowheadColor=this.arrowheadColor||X(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?at(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,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||at(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||X(this.lineColor);const t="#ECECFE",i="#E9E9F1",a=B(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||a,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||rt(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,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.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let l=0;l<this.THEME_COLOR_LIMIT;l++)this["cScale"+l]=this.mainBkg;if(this.darkMode)for(let l=0;l<this.THEME_COLOR_LIMIT;l++)this["cScale"+l]=at(this["cScale"+l],75);else for(let l=0;l<this.THEME_COLOR_LIMIT;l++)this["cScale"+l]=at(this["cScale"+l],25);for(let l=0;l<this.THEME_COLOR_LIMIT;l++)this["cScaleInv"+l]=this["cScaleInv"+l]||X(this["cScale"+l]);for(let l=0;l<this.THEME_COLOR_LIMIT;l++)this.darkMode?this["cScalePeer"+l]=this["cScalePeer"+l]||rt(this["cScale"+l],10):this["cScalePeer"+l]=this["cScalePeer"+l]||at(this["cScale"+l],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let l=0;l<this.THEME_COLOR_LIMIT;l++)this["cScaleLabel"+l]=this["cScaleLabel"+l]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let l=0;l<5;l++)this["surface"+l]=this["surface"+l]||B(this.mainBkg,{h:180,s:-15,l:s*(5+l*3)}),this["surfacePeer"+l]=this["surfacePeer"+l]||B(this.mainBkg,{h:180,s:-15,l:s*(8+l*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||i,this.fillType2=this.fillType2||B(t,{h:64}),this.fillType3=this.fillType3||B(i,{h:64}),this.fillType4=this.fillType4||B(t,{h:-64}),this.fillType5=this.fillType5||B(i,{h:-64}),this.fillType6=this.fillType6||B(t,{h:128}),this.fillType7=this.fillType7||B(i,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||i,this.pie3=this.pie3||a,this.pie4=this.pie4||B(t,{l:-10}),this.pie5=this.pie5||B(i,{l:-10}),this.pie6=this.pie6||B(a,{l:-10}),this.pie7=this.pie7||B(t,{h:60,l:-10}),this.pie8=this.pie8||B(t,{h:-60,l:-10}),this.pie9=this.pie9||B(t,{h:120,l:0}),this.pie10=this.pie10||B(t,{h:60,l:-20}),this.pie11=this.pie11||B(t,{h:-60,l:-20}),this.pie12=this.pie12||B(t,{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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||B(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Br(this.quadrant1Fill)?rt(this.quadrant1Fill):at(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,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?at(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||i,this.git2=this.git2||a,this.git3=this.git3||B(t,{h:-30}),this.git4=this.git4||B(t,{h:-60}),this.git5=this.git5||B(t,{h:-90}),this.git6=this.git6||B(t,{h:60}),this.git7=this.git7||B(t,{h:120}),this.darkMode?(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)):(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)),this.gitInv0=this.gitInv0||X(this.git0),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Wr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},v(kl,"Theme"),kl),W5=v(e=>{const t=new P5;return t.calculate(e),t},"getThemeVariables"),vl,Y5=(vl=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=rt(this.primaryColor,16),this.tertiaryColor=B(this.primaryColor,{h:-160}),this.primaryBorderColor=X(this.background),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=X(this.primaryColor),this.secondaryTextColor=X(this.secondaryColor),this.tertiaryTextColor=X(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=rt(X("#323D47"),10),this.border1="#ccc",this.border2=fn(255,255,255,.25),this.arrowheadColor=X(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||B(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||B(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||X(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||X(this.tertiaryColor),this.lineColor=this.lineColor||X(this.background),this.arrowheadColor=this.arrowheadColor||X(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.border1,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?at(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",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||at(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||X(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||rt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,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.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||B(this.primaryColor,{h:30}),this.cScale4=this.cScale4||B(this.primaryColor,{h:60}),this.cScale5=this.cScale5||B(this.primaryColor,{h:90}),this.cScale6=this.cScale6||B(this.primaryColor,{h:120}),this.cScale7=this.cScale7||B(this.primaryColor,{h:150}),this.cScale8=this.cScale8||B(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||B(this.primaryColor,{h:270}),this.cScale10=this.cScale10||B(this.primaryColor,{h:300}),this.cScale11=this.cScale11||B(this.primaryColor,{h:330}),this.darkMode)for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScale"+i]=at(this["cScale"+i],75);else for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScale"+i]=at(this["cScale"+i],25);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||X(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this.darkMode?this["cScalePeer"+i]=this["cScalePeer"+i]||rt(this["cScale"+i],10):this["cScalePeer"+i]=this["cScalePeer"+i]||at(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=this["cScaleLabel"+i]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||B(this.mainBkg,{h:180,s:-15,l:t*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||B(this.mainBkg,{h:180,s:-15,l:t*(8+i*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||B(this.primaryColor,{h:64}),this.fillType3=this.fillType3||B(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||B(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||B(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||B(this.primaryColor,{h:128}),this.fillType7=this.fillType7||B(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||B(this.primaryColor,{l:-10}),this.pie5=this.pie5||B(this.secondaryColor,{l:-10}),this.pie6=this.pie6||B(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||B(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||B(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||B(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||B(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||B(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||B(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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||B(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Br(this.quadrant1Fill)?rt(this.quadrant1Fill):at(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?at(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||B(this.primaryColor,{h:-30}),this.git4=this.git4||B(this.primaryColor,{h:-60}),this.git5=this.git5||B(this.primaryColor,{h:-90}),this.git6=this.git6||B(this.primaryColor,{h:60}),this.git7=this.git7||B(this.primaryColor,{h:120}),this.darkMode?(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)):(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)),this.gitInv0=this.gitInv0||X(this.git0),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Wr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},v(vl,"Theme"),vl),G5=v(e=>{const t=new Y5;return t.calculate(e),t},"getThemeVariables"),Sl,X5=(Sl=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=$t(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||B(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||B(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||X(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||X(this.tertiaryColor),this.lineColor=this.lineColor||X(this.background),this.arrowheadColor=this.arrowheadColor||X(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?at(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||at(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||X(this.lineColor);const t="#ECECFE",i="#E9E9F1",a=B(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||a,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||rt(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,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.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||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let l=0;l<this.THEME_COLOR_LIMIT;l++)this["cScaleInv"+l]=this["cScaleInv"+l]||X(this["cScale"+l]);for(let l=0;l<this.THEME_COLOR_LIMIT;l++)this.darkMode?this["cScalePeer"+l]=this["cScalePeer"+l]||rt(this["cScale"+l],10):this["cScalePeer"+l]=this["cScalePeer"+l]||at(this["cScale"+l],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let l=0;l<this.THEME_COLOR_LIMIT;l++)this["cScaleLabel"+l]=this["cScaleLabel"+l]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let l=0;l<5;l++)this["surface"+l]=this["surface"+l]||B(this.mainBkg,{h:180,s:-15,l:s*(5+l*3)}),this["surfacePeer"+l]=this["surfacePeer"+l]||B(this.mainBkg,{h:180,s:-15,l:s*(8+l*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||i,this.fillType2=this.fillType2||B(t,{h:64}),this.fillType3=this.fillType3||B(i,{h:64}),this.fillType4=this.fillType4||B(t,{h:-64}),this.fillType5=this.fillType5||B(i,{h:-64}),this.fillType6=this.fillType6||B(t,{h:128}),this.fillType7=this.fillType7||B(i,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||i,this.pie3=this.pie3||a,this.pie4=this.pie4||B(t,{l:-10}),this.pie5=this.pie5||B(i,{l:-10}),this.pie6=this.pie6||B(a,{l:-10}),this.pie7=this.pie7||B(t,{h:60,l:-10}),this.pie8=this.pie8||B(t,{h:-60,l:-10}),this.pie9=this.pie9||B(t,{h:120,l:0}),this.pie10=this.pie10||B(t,{h:60,l:-20}),this.pie11=this.pie11||B(t,{h:-60,l:-20}),this.pie12=this.pie12||B(t,{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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||B(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Br(this.quadrant1Fill)?rt(this.quadrant1Fill):at(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,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?at(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||i,this.git2=this.git2||a,this.git3=this.git3||B(t,{h:-30}),this.git4=this.git4||B(t,{h:-60}),this.git5=this.git5||B(t,{h:-90}),this.git6=this.git6||B(t,{h:60}),this.git7=this.git7||B(t,{h:120}),this.darkMode?(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)):(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)),this.gitInv0=this.gitInv0||X(this.git0),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Wr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},v(Sl,"Theme"),Sl),V5=v(e=>{const t=new X5;return t.calculate(e),t},"getThemeVariables"),Tl,Z5=(Tl=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=rt(this.primaryColor,16),this.tertiaryColor=B(this.primaryColor,{h:-160}),this.primaryBorderColor=X(this.background),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=X(this.primaryColor),this.secondaryTextColor=X(this.secondaryColor),this.tertiaryTextColor=X(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=rt(X("#323D47"),10),this.border1="#ccc",this.border2=fn(255,255,255,.25),this.arrowheadColor=X(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||B(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||B(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||X(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||X(this.tertiaryColor),this.lineColor=this.lineColor||X(this.background),this.arrowheadColor=this.arrowheadColor||X(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.border1,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?at(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",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||at(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||X(this.lineColor),this.rootLabelColor="#FFFFFF",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||rt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,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.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||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||X(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this.darkMode?this["cScalePeer"+i]=this["cScalePeer"+i]||rt(this["cScale"+i],10):this["cScalePeer"+i]=this["cScalePeer"+i]||at(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=at(this["cScale"+i],75);const t=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||B(this.mainBkg,{h:180,s:-15,l:t*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||B(this.mainBkg,{h:180,s:-15,l:t*(8+i*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||B(this.primaryColor,{h:64}),this.fillType3=this.fillType3||B(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||B(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||B(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||B(this.primaryColor,{h:128}),this.fillType7=this.fillType7||B(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||B(this.primaryColor,{l:-10}),this.pie5=this.pie5||B(this.secondaryColor,{l:-10}),this.pie6=this.pie6||B(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||B(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||B(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||B(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||B(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||B(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||B(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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||B(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Br(this.quadrant1Fill)?rt(this.quadrant1Fill):at(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?at(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||B(this.primaryColor,{h:-30}),this.git4=this.git4||B(this.primaryColor,{h:-60}),this.git5=this.git5||B(this.primaryColor,{h:-90}),this.git6=this.git6||B(this.primaryColor,{h:60}),this.git7=this.git7||B(this.primaryColor,{h:120}),this.darkMode?(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)):(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)),this.gitInv0=this.gitInv0||X(this.git0),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Wr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},v(Tl,"Theme"),Tl),Q5=v(e=>{const t=new Z5;return t.calculate(e),t},"getThemeVariables"),ya={base:{getThemeVariables:M5},dark:{getThemeVariables:O5},default:{getThemeVariables:D5},forest:{getThemeVariables:z5},neutral:{getThemeVariables:q5},neo:{getThemeVariables:H5},"neo-dark":{getThemeVariables:j5},redux:{getThemeVariables:W5},"redux-dark":{getThemeVariables:G5},"redux-color":{getThemeVariables:V5},"redux-dark-color":{getThemeVariables:Q5}},gi={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,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,hierarchicalNamespaces:!0},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,showDataLabelOutsideBar:!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"},ishikawa:{useMaxWidth:!0,diagramPadding:20},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:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},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},Ak={...gi,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:ya.default.getThemeVariables(),sequence:{...gi.sequence,messageFont:v(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:v(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:v(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...gi.gantt,tickInterval:void 0,useWidth:void 0},c4:{...gi.c4,useWidth:void 0,personFont:v(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...gi.flowchart,inheritDir:!1},external_personFont:v(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:v(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:v(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:v(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:v(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:v(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:v(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:v(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:v(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:v(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:v(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:v(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:v(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:v(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:v(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:v(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:v(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:v(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:v(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:v(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:v(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...gi.pie,useWidth:984},xyChart:{...gi.xyChart,useWidth:void 0},requirement:{...gi.requirement,useWidth:void 0},packet:{...gi.packet},eventmodeling:{...gi.eventmodeling},treeView:{...gi.treeView,useWidth:void 0},radar:{...gi.radar},ishikawa:{...gi.ishikawa},sankey:{...gi.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...gi.venn}},Mk=v((e,t="")=>Object.keys(e).reduce((i,a)=>Array.isArray(e[a])?i:typeof e[a]=="object"&&e[a]!==null?[...i,t+a,...Mk(e[a],"")]:[...i,t+a],[]),"keyify"),K5=new Set(Mk(Ak,"")),Rk=Ak,Du=v(e=>{if(gt.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Du(t));return}for(const t of Object.keys(e)){if(gt.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!K5.has(t)||e[t]==null){gt.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){if(t==="nodeColors"){const a=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(const s of Object.keys(e[t]))(typeof e[t][s]!="string"||!a.test(e[t][s]))&&(gt.debug("sanitize deleting invalid color:",s,e[t][s]),delete e[t][s])}else gt.debug("sanitizing object",t),Du(e[t]);continue}const i=["themeCSS","fontFamily","altFontFamily"];for(const a of i)t.includes(a)&&(gt.debug("sanitizing css option",t),e[t]=Ok(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const i=e.themeVariables[t];i?.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}gt.debug("After sanitization",e)}},"sanitizeDirective"),Ok=v(e=>{let t=0,i=0;for(const a of e){if(t<i)return"{ /* ERROR: Unbalanced CSS */ }";a==="{"?t++:a==="}"&&i++}return t!==i?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),El=Object.freeze(Rk),Sa=v(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Ri=je({},El),$u,ts=[],oc=je({},El),bd=v((e,t)=>{let i=je({},e),a={};for(const s of t)$k(s),a=je(a,s);if(i=je(i,a),a.theme&&a.theme in ya){const s=je({},$u),l=je(s.themeVariables||{},a.themeVariables);i.theme&&i.theme in ya&&(i.themeVariables=ya[i.theme].getThemeVariables(l))}return oc=i,Nk(oc),oc},"updateCurrentConfig"),J5=v(e=>(Ri=je({},El),Ri=je(Ri,e),e.theme&&ya[e.theme]&&(Ri.themeVariables=ya[e.theme].getThemeVariables(e.themeVariables)),bd(Ri,ts),Ri),"setSiteConfig"),tR=v(e=>{$u=je({},e)},"saveConfigFromInitialize"),eR=v(e=>(Ri=je(Ri,e),bd(Ri,ts),Ri),"updateSiteConfig"),Fk=v(()=>je({},Ri),"getSiteConfig"),Dk=v(e=>(Nk(e),je(oc,e),Te()),"setConfig"),Te=v(()=>je({},oc),"getConfig"),$k=v(e=>{e&&(["secure",...Ri.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(gt.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"&&$k(e[t])}))},"sanitize"),iR=v(e=>{Du(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),ts.push(e),bd(Ri,ts)},"addDirective"),zu=v((e=Ri)=>{ts=[],bd(e,ts)},"reset"),rR={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},b1={},zk=v(e=>{b1[e]||(gt.warn(rR[e]),b1[e]=!0)},"issueWarning"),Nk=v(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&zk("LAZY_LOAD_DEPRECATED")},"checkConfig"),M7=v(()=>{let e={};$u&&(e=je(e,$u));for(const t of ts)e=je(e,t);return e},"getUserDefinedConfig"),Ci=v(e=>(e.flowchart?.htmlLabels!=null&&zk("FLOWCHART_HTML_LABELS_DEPRECATED"),Sa(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Lc=/<br\s*\/?>/gi,aR=v(e=>e?Hk(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),nR=(()=>{let e=!1;return()=>{e||(qk(),e=!0)}})();function qk(){const e="data-temp-href-target";Bl.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Bl.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"))})}v(qk,"setupDompurifyHooks");var Ik=v(e=>(nR(),Bl.sanitize(e)),"removeScript"),C1=v((e,t)=>{if(Ci(t)){const i=t.securityLevel;i==="antiscript"||i==="strict"||i==="sandbox"?e=Ik(e):i!=="loose"&&(e=Hk(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=cR(e))}return e},"sanitizeMore"),wr=v((e,t)=>e&&(t.dompurifyConfig?e=Bl.sanitize(C1(e,t),t.dompurifyConfig).toString():e=Bl.sanitize(C1(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),sR=v((e,t)=>typeof e=="string"?wr(e,t):e.flat().map(i=>wr(i,t)),"sanitizeTextOrArray"),lR=v(e=>Lc.test(e),"hasBreaks"),oR=v(e=>e.split(Lc),"splitBreaks"),cR=v(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Hk=v(e=>e.replace(Lc,"#br#"),"breakToPlaceholder"),hR=v(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),uR=v(function(...e){const t=e.filter(i=>!isNaN(i));return Math.max(...t)},"getMax"),dR=v(function(...e){const t=e.filter(i=>!isNaN(i));return Math.min(...t)},"getMin"),k1=v(function(e){const t=e.split(/(,)/),i=[];for(let a=0;a<t.length;a++){let s=t[a];if(s===","&&a>0&&a+1<t.length){const l=t[a-1],c=t[a+1];fR(l,c)&&(s=l+","+c,a++,i.pop())}i.push(pR(s))}return i.join("")},"parseGenericTypes"),Rg=v((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),fR=v((e,t)=>{const i=Rg(e,"~"),a=Rg(t,"~");return i===1&&a===1},"shouldCombineSets"),pR=v(e=>{const t=Rg(e,"~");let i=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),i=!0);const a=[...e];let s=a.indexOf("~"),l=a.lastIndexOf("~");for(;s!==-1&&l!==-1&&s!==l;)a[s]="<",a[l]=">",s=a.indexOf("~"),l=a.lastIndexOf("~");return i&&a.unshift("~"),a.join("")},"processSet"),v1=v(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Og=/\$\$(.*)\$\$/g,fc=v(e=>(e.match(Og)?.length??0)>0,"hasKatex"),R7=v(async(e,t)=>{const i=document.createElement("div");i.innerHTML=await Uk(e,t),i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",i);const s={width:i.clientWidth,height:i.clientHeight};return i.remove(),s},"calculateMathMLDimensions"),gR=v(async(e,t)=>{if(!fc(e))return e;if(!(v1()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Og,"MathML is unsupported in this environment.");{const{default:i}=await Zt(async()=>{const{default:s}=await import("./katex-HP8lGamR.js");return{default:s}},[]),a=t.forceLegacyMathML||!v1()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Lc).map(s=>fc(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(Og,(s,l)=>i.renderToString(l,{throwOnError:!0,displayMode:!0,output:a}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Uk=v(async(e,t)=>wr(await gR(e,t),t),"renderKatexSanitized"),Ac={getRows:aR,sanitizeText:wr,sanitizeTextOrArray:sR,hasBreaks:lR,splitBreaks:oR,lineBreakRegex:Lc,removeScript:Ik,getUrl:hR,evaluate:Sa,getMax:uR,getMin:dR},mR=v(function(e,t){for(let i of t)e.attr(i[0],i[1])},"d3Attrs"),yR=v(function(e,t,i){let a=new Map;return i?(a.set("width","100%"),a.set("style",`max-width: ${t}px;`)):(a.set("height",e),a.set("width",t)),a},"calculateSvgSizeAttrs"),jk=v(function(e,t,i,a){const s=yR(t,i,a);mR(e,s)},"configureSvgSize"),xR=v(function(e,t,i,a){const s=t.node().getBBox(),l=s.width,c=s.height;gt.info(`SVG bounds: ${l}x${c}`,s);let h=0,d=0;gt.info(`Graph bounds: ${h}x${d}`,e),h=l+i*2,d=c+i*2,gt.info(`Calculated bounds: ${h}x${d}`),jk(t,d,h,a);const f=`${s.x-i} ${s.y-i} ${s.width+2*i} ${s.height+2*i}`;t.attr("viewBox",f)},"setupGraphViewbox"),xu={};function Fg(e){return[...e.cssRules].map(t=>t.cssText).join(`
88
+ `)}v(Fg,"cssStyleSheetToString");var bR=v((e,t,i,a)=>{let s="";return e in xu&&xu[e]?s=xu[e]({...i,svgId:a}):gt.warn(`No theme found for ${e}`),` & {
89
+ font-family: ${i.fontFamily};
90
+ font-size: ${i.fontSize};
91
+ fill: ${i.textColor}
92
+ }
93
+ @keyframes edge-animation-frame {
94
+ from {
95
+ stroke-dashoffset: 0;
96
+ }
97
+ }
98
+ @keyframes dash {
99
+ to {
100
+ stroke-dashoffset: 0;
101
+ }
102
+ }
103
+ & .edge-animation-slow {
104
+ stroke-dasharray: 9,5 !important;
105
+ stroke-dashoffset: 900;
106
+ animation: dash 50s linear infinite;
107
+ stroke-linecap: round;
108
+ }
109
+ & .edge-animation-fast {
110
+ stroke-dasharray: 9,5 !important;
111
+ stroke-dashoffset: 900;
112
+ animation: dash 20s linear infinite;
113
+ stroke-linecap: round;
114
+ }
115
+ /* Classes common for multiple diagrams */
116
+
117
+ & .error-icon {
118
+ fill: ${i.errorBkgColor};
119
+ }
120
+ & .error-text {
121
+ fill: ${i.errorTextColor};
122
+ stroke: ${i.errorTextColor};
123
+ }
124
+
125
+ & .edge-thickness-normal {
126
+ stroke-width: ${i.strokeWidth??1}px;
127
+ }
128
+ & .edge-thickness-thick {
129
+ stroke-width: 3.5px
130
+ }
131
+ & .edge-pattern-solid {
132
+ stroke-dasharray: 0;
133
+ }
134
+ & .edge-thickness-invisible {
135
+ stroke-width: 0;
136
+ fill: none;
137
+ }
138
+ & .edge-pattern-dashed{
139
+ stroke-dasharray: 3;
140
+ }
141
+ .edge-pattern-dotted {
142
+ stroke-dasharray: 2;
143
+ }
144
+
145
+ & .marker {
146
+ fill: ${i.lineColor};
147
+ stroke: ${i.lineColor};
148
+ }
149
+ & .marker.cross {
150
+ stroke: ${i.lineColor};
151
+ }
152
+
153
+ & svg {
154
+ font-family: ${i.fontFamily};
155
+ font-size: ${i.fontSize};
156
+ }
157
+ & p {
158
+ margin: 0
159
+ }
160
+
161
+ ${s}
162
+ .node .neo-node {
163
+ stroke: ${i.nodeBorder};
164
+ }
165
+
166
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
167
+ stroke: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
168
+ filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
169
+ }
170
+
171
+
172
+ [data-look="neo"].node path {
173
+ stroke: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
174
+ stroke-width: ${i.strokeWidth??1}px;
175
+ }
176
+
177
+ [data-look="neo"].node .outer-path {
178
+ filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
179
+ }
180
+
181
+ [data-look="neo"].node .neo-line path {
182
+ stroke: ${i.nodeBorder};
183
+ filter: none;
184
+ }
185
+
186
+ [data-look="neo"].node circle{
187
+ stroke: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
188
+ filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
189
+ }
190
+
191
+ [data-look="neo"].node circle .state-start{
192
+ fill: #000000;
193
+ }
194
+
195
+ [data-look="neo"].icon-shape .icon {
196
+ fill: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
197
+ filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
198
+ }
199
+
200
+ [data-look="neo"].icon-shape .icon-neo path {
201
+ stroke: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
202
+ filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
203
+ }
204
+
205
+ ${t}
206
+ `},"getStyles"),CR=v((e,t)=>{t!==void 0&&(xu[e]=t)},"addStylesForDiagram"),kR=bR,Pk={};PM(Pk,{clear:()=>vR,getAccDescription:()=>_R,getAccTitle:()=>TR,getDiagramTitle:()=>ER,setAccDescription:()=>wR,setAccTitle:()=>SR,setDiagramTitle:()=>BR});var Zm="",Qm="",Km="",Jm=v(e=>wr(e,Te()),"sanitizeText"),vR=v(()=>{Zm="",Km="",Qm=""},"clear"),SR=v(e=>{Zm=Jm(e).replace(/^\s+/g,"")},"setAccTitle"),TR=v(()=>Zm,"getAccTitle"),wR=v(e=>{Km=Jm(e).replace(/\n\s+/g,`
207
+ `)},"setAccDescription"),_R=v(()=>Km,"getAccDescription"),BR=v(e=>{Qm=Jm(e)},"setDiagramTitle"),ER=v(()=>Qm,"getDiagramTitle"),S1=gt,LR=Xm,ee=Te,O7=Dk,F7=El,ty=v(e=>wr(e,ee()),"sanitizeText"),AR=xR,MR=v(()=>Pk,"getCommonDb"),Nu={},qu=v((e,t,i)=>{Nu[e]&&S1.warn(`Diagram with id ${e} already registered. Overwriting.`),Nu[e]=t,i&&Lk(e,i),CR(e,t.styles),t.injectUtils?.(S1,LR,ee,ty,AR,MR(),()=>{})},"registerDiagram"),Dg=v(e=>{if(e in Nu)return Nu[e];throw new RR(e)},"getDiagram"),wl,RR=(wl=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},v(wl,"DiagramNotFoundError"),wl),OR={value:()=>{}};function Wk(){for(var e=0,t=arguments.length,i={},a;e<t;++e){if(!(a=arguments[e]+"")||a in i||/[\s.]/.test(a))throw new Error("illegal type: "+a);i[a]=[]}return new bu(i)}function bu(e){this._=e}function FR(e,t){return e.trim().split(/^|\s+/).map(function(i){var a="",s=i.indexOf(".");if(s>=0&&(a=i.slice(s+1),i=i.slice(0,s)),i&&!t.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:a}})}bu.prototype=Wk.prototype={constructor:bu,on:function(e,t){var i=this._,a=FR(e+"",i),s,l=-1,c=a.length;if(arguments.length<2){for(;++l<c;)if((s=(e=a[l]).type)&&(s=DR(i[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++l<c;)if(s=(e=a[l]).type)i[s]=T1(i[s],e.name,t);else if(t==null)for(s in i)i[s]=T1(i[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var i in t)e[i]=t[i].slice();return new bu(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var i=new Array(s),a=0,s,l;a<s;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(l=this._[e],a=0,s=l.length;a<s;++a)l[a].value.apply(t,i)},apply:function(e,t,i){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var a=this._[e],s=0,l=a.length;s<l;++s)a[s].value.apply(t,i)}};function DR(e,t){for(var i=0,a=e.length,s;i<a;++i)if((s=e[i]).name===t)return s.value}function T1(e,t,i){for(var a=0,s=e.length;a<s;++a)if(e[a].name===t){e[a]=OR,e=e.slice(0,a).concat(e.slice(a+1));break}return i!=null&&e.push({name:t,value:i}),e}var $g="http://www.w3.org/1999/xhtml";const w1={svg:"http://www.w3.org/2000/svg",xhtml:$g,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Cd(e){var t=e+="",i=t.indexOf(":");return i>=0&&(t=e.slice(0,i))!=="xmlns"&&(e=e.slice(i+1)),w1.hasOwnProperty(t)?{space:w1[t],local:e}:e}function $R(e){return function(){var t=this.ownerDocument,i=this.namespaceURI;return i===$g&&t.documentElement.namespaceURI===$g?t.createElement(e):t.createElementNS(i,e)}}function zR(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Yk(e){var t=Cd(e);return(t.local?zR:$R)(t)}function NR(){}function ey(e){return e==null?NR:function(){return this.querySelector(e)}}function qR(e){typeof e!="function"&&(e=ey(e));for(var t=this._groups,i=t.length,a=new Array(i),s=0;s<i;++s)for(var l=t[s],c=l.length,h=a[s]=new Array(c),d,f,p=0;p<c;++p)(d=l[p])&&(f=e.call(d,d.__data__,p,l))&&("__data__"in d&&(f.__data__=d.__data__),h[p]=f);return new Yi(a,this._parents)}function IR(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function HR(){return[]}function Gk(e){return e==null?HR:function(){return this.querySelectorAll(e)}}function UR(e){return function(){return IR(e.apply(this,arguments))}}function jR(e){typeof e=="function"?e=UR(e):e=Gk(e);for(var t=this._groups,i=t.length,a=[],s=[],l=0;l<i;++l)for(var c=t[l],h=c.length,d,f=0;f<h;++f)(d=c[f])&&(a.push(e.call(d,d.__data__,f,c)),s.push(d));return new Yi(a,s)}function Xk(e){return function(){return this.matches(e)}}function Vk(e){return function(t){return t.matches(e)}}var PR=Array.prototype.find;function WR(e){return function(){return PR.call(this.children,e)}}function YR(){return this.firstElementChild}function GR(e){return this.select(e==null?YR:WR(typeof e=="function"?e:Vk(e)))}var XR=Array.prototype.filter;function VR(){return Array.from(this.children)}function ZR(e){return function(){return XR.call(this.children,e)}}function QR(e){return this.selectAll(e==null?VR:ZR(typeof e=="function"?e:Vk(e)))}function KR(e){typeof e!="function"&&(e=Xk(e));for(var t=this._groups,i=t.length,a=new Array(i),s=0;s<i;++s)for(var l=t[s],c=l.length,h=a[s]=[],d,f=0;f<c;++f)(d=l[f])&&e.call(d,d.__data__,f,l)&&h.push(d);return new Yi(a,this._parents)}function Zk(e){return new Array(e.length)}function JR(){return new Yi(this._enter||this._groups.map(Zk),this._parents)}function Iu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Iu.prototype={constructor:Iu,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function tO(e){return function(){return e}}function eO(e,t,i,a,s,l){for(var c=0,h,d=t.length,f=l.length;c<f;++c)(h=t[c])?(h.__data__=l[c],a[c]=h):i[c]=new Iu(e,l[c]);for(;c<d;++c)(h=t[c])&&(s[c]=h)}function iO(e,t,i,a,s,l,c){var h,d,f=new Map,p=t.length,g=l.length,x=new Array(p),y;for(h=0;h<p;++h)(d=t[h])&&(x[h]=y=c.call(d,d.__data__,h,t)+"",f.has(y)?s[h]=d:f.set(y,d));for(h=0;h<g;++h)y=c.call(e,l[h],h,l)+"",(d=f.get(y))?(a[h]=d,d.__data__=l[h],f.delete(y)):i[h]=new Iu(e,l[h]);for(h=0;h<p;++h)(d=t[h])&&f.get(x[h])===d&&(s[h]=d)}function rO(e){return e.__data__}function aO(e,t){if(!arguments.length)return Array.from(this,rO);var i=t?iO:eO,a=this._parents,s=this._groups;typeof e!="function"&&(e=tO(e));for(var l=s.length,c=new Array(l),h=new Array(l),d=new Array(l),f=0;f<l;++f){var p=a[f],g=s[f],x=g.length,y=nO(e.call(p,p&&p.__data__,f,a)),C=y.length,k=h[f]=new Array(C),S=c[f]=new Array(C),T=d[f]=new Array(x);i(p,g,k,S,T,y,t);for(var _=0,E=0,M,O;_<C;++_)if(M=k[_]){for(_>=E&&(E=_+1);!(O=S[E])&&++E<C;);M._next=O||null}}return c=new Yi(c,a),c._enter=h,c._exit=d,c}function nO(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function sO(){return new Yi(this._exit||this._groups.map(Zk),this._parents)}function lO(e,t,i){var a=this.enter(),s=this,l=this.exit();return typeof e=="function"?(a=e(a),a&&(a=a.selection())):a=a.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),i==null?l.remove():i(l),a&&s?a.merge(s).order():s}function oO(e){for(var t=e.selection?e.selection():e,i=this._groups,a=t._groups,s=i.length,l=a.length,c=Math.min(s,l),h=new Array(s),d=0;d<c;++d)for(var f=i[d],p=a[d],g=f.length,x=h[d]=new Array(g),y,C=0;C<g;++C)(y=f[C]||p[C])&&(x[C]=y);for(;d<s;++d)h[d]=i[d];return new Yi(h,this._parents)}function cO(){for(var e=this._groups,t=-1,i=e.length;++t<i;)for(var a=e[t],s=a.length-1,l=a[s],c;--s>=0;)(c=a[s])&&(l&&c.compareDocumentPosition(l)^4&&l.parentNode.insertBefore(c,l),l=c);return this}function hO(e){e||(e=uO);function t(g,x){return g&&x?e(g.__data__,x.__data__):!g-!x}for(var i=this._groups,a=i.length,s=new Array(a),l=0;l<a;++l){for(var c=i[l],h=c.length,d=s[l]=new Array(h),f,p=0;p<h;++p)(f=c[p])&&(d[p]=f);d.sort(t)}return new Yi(s,this._parents).order()}function uO(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function dO(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function fO(){return Array.from(this)}function pO(){for(var e=this._groups,t=0,i=e.length;t<i;++t)for(var a=e[t],s=0,l=a.length;s<l;++s){var c=a[s];if(c)return c}return null}function gO(){let e=0;for(const t of this)++e;return e}function mO(){return!this.node()}function yO(e){for(var t=this._groups,i=0,a=t.length;i<a;++i)for(var s=t[i],l=0,c=s.length,h;l<c;++l)(h=s[l])&&e.call(h,h.__data__,l,s);return this}function xO(e){return function(){this.removeAttribute(e)}}function bO(e){return function(){this.removeAttributeNS(e.space,e.local)}}function CO(e,t){return function(){this.setAttribute(e,t)}}function kO(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function vO(e,t){return function(){var i=t.apply(this,arguments);i==null?this.removeAttribute(e):this.setAttribute(e,i)}}function SO(e,t){return function(){var i=t.apply(this,arguments);i==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,i)}}function TO(e,t){var i=Cd(e);if(arguments.length<2){var a=this.node();return i.local?a.getAttributeNS(i.space,i.local):a.getAttribute(i)}return this.each((t==null?i.local?bO:xO:typeof t=="function"?i.local?SO:vO:i.local?kO:CO)(i,t))}function Qk(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function wO(e){return function(){this.style.removeProperty(e)}}function _O(e,t,i){return function(){this.style.setProperty(e,t,i)}}function BO(e,t,i){return function(){var a=t.apply(this,arguments);a==null?this.style.removeProperty(e):this.style.setProperty(e,a,i)}}function EO(e,t,i){return arguments.length>1?this.each((t==null?wO:typeof t=="function"?BO:_O)(e,t,i??"")):Ll(this.node(),e)}function Ll(e,t){return e.style.getPropertyValue(t)||Qk(e).getComputedStyle(e,null).getPropertyValue(t)}function LO(e){return function(){delete this[e]}}function AO(e,t){return function(){this[e]=t}}function MO(e,t){return function(){var i=t.apply(this,arguments);i==null?delete this[e]:this[e]=i}}function RO(e,t){return arguments.length>1?this.each((t==null?LO:typeof t=="function"?MO:AO)(e,t)):this.node()[e]}function Kk(e){return e.trim().split(/^|\s+/)}function iy(e){return e.classList||new Jk(e)}function Jk(e){this._node=e,this._names=Kk(e.getAttribute("class")||"")}Jk.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function tv(e,t){for(var i=iy(e),a=-1,s=t.length;++a<s;)i.add(t[a])}function ev(e,t){for(var i=iy(e),a=-1,s=t.length;++a<s;)i.remove(t[a])}function OO(e){return function(){tv(this,e)}}function FO(e){return function(){ev(this,e)}}function DO(e,t){return function(){(t.apply(this,arguments)?tv:ev)(this,e)}}function $O(e,t){var i=Kk(e+"");if(arguments.length<2){for(var a=iy(this.node()),s=-1,l=i.length;++s<l;)if(!a.contains(i[s]))return!1;return!0}return this.each((typeof t=="function"?DO:t?OO:FO)(i,t))}function zO(){this.textContent=""}function NO(e){return function(){this.textContent=e}}function qO(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function IO(e){return arguments.length?this.each(e==null?zO:(typeof e=="function"?qO:NO)(e)):this.node().textContent}function HO(){this.innerHTML=""}function UO(e){return function(){this.innerHTML=e}}function jO(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function PO(e){return arguments.length?this.each(e==null?HO:(typeof e=="function"?jO:UO)(e)):this.node().innerHTML}function WO(){this.nextSibling&&this.parentNode.appendChild(this)}function YO(){return this.each(WO)}function GO(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function XO(){return this.each(GO)}function VO(e){var t=typeof e=="function"?e:Yk(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function ZO(){return null}function QO(e,t){var i=typeof e=="function"?e:Yk(e),a=t==null?ZO:typeof t=="function"?t:ey(t);return this.select(function(){return this.insertBefore(i.apply(this,arguments),a.apply(this,arguments)||null)})}function KO(){var e=this.parentNode;e&&e.removeChild(this)}function JO(){return this.each(KO)}function t4(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function e4(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function i4(e){return this.select(e?e4:t4)}function r4(e){return arguments.length?this.property("__data__",e):this.node().__data__}function a4(e){return function(t){e.call(this,t,this.__data__)}}function n4(e){return e.trim().split(/^|\s+/).map(function(t){var i="",a=t.indexOf(".");return a>=0&&(i=t.slice(a+1),t=t.slice(0,a)),{type:t,name:i}})}function s4(e){return function(){var t=this.__on;if(t){for(var i=0,a=-1,s=t.length,l;i<s;++i)l=t[i],(!e.type||l.type===e.type)&&l.name===e.name?this.removeEventListener(l.type,l.listener,l.options):t[++a]=l;++a?t.length=a:delete this.__on}}}function l4(e,t,i){return function(){var a=this.__on,s,l=a4(t);if(a){for(var c=0,h=a.length;c<h;++c)if((s=a[c]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=l,s.options=i),s.value=t;return}}this.addEventListener(e.type,l,i),s={type:e.type,name:e.name,value:t,listener:l,options:i},a?a.push(s):this.__on=[s]}}function o4(e,t,i){var a=n4(e+""),s,l=a.length,c;if(arguments.length<2){var h=this.node().__on;if(h){for(var d=0,f=h.length,p;d<f;++d)for(s=0,p=h[d];s<l;++s)if((c=a[s]).type===p.type&&c.name===p.name)return p.value}return}for(h=t?l4:s4,s=0;s<l;++s)this.each(h(a[s],t,i));return this}function iv(e,t,i){var a=Qk(e),s=a.CustomEvent;typeof s=="function"?s=new s(t,i):(s=a.document.createEvent("Event"),i?(s.initEvent(t,i.bubbles,i.cancelable),s.detail=i.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function c4(e,t){return function(){return iv(this,e,t)}}function h4(e,t){return function(){return iv(this,e,t.apply(this,arguments))}}function u4(e,t){return this.each((typeof t=="function"?h4:c4)(e,t))}function*d4(){for(var e=this._groups,t=0,i=e.length;t<i;++t)for(var a=e[t],s=0,l=a.length,c;s<l;++s)(c=a[s])&&(yield c)}var rv=[null];function Yi(e,t){this._groups=e,this._parents=t}function Mc(){return new Yi([[document.documentElement]],rv)}function f4(){return this}Yi.prototype=Mc.prototype={constructor:Yi,select:qR,selectAll:jR,selectChild:GR,selectChildren:QR,filter:KR,data:aO,enter:JR,exit:sO,join:lO,merge:oO,selection:f4,order:cO,sort:hO,call:dO,nodes:fO,node:pO,size:gO,empty:mO,each:yO,attr:TO,style:EO,property:RO,classed:$O,text:IO,html:PO,raise:YO,lower:XO,append:VO,insert:QO,remove:JO,clone:i4,datum:r4,on:o4,dispatch:u4,[Symbol.iterator]:d4};function Ut(e){return typeof e=="string"?new Yi([[document.querySelector(e)]],[document.documentElement]):new Yi([[e]],rv)}function ry(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function av(e,t){var i=Object.create(e.prototype);for(var a in t)i[a]=t[a];return i}function Rc(){}var pc=.7,Hu=1/pc,ul="\\s*([+-]?\\d+)\\s*",gc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Hr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",p4=/^#([0-9a-f]{3,8})$/,g4=new RegExp(`^rgb\\(${ul},${ul},${ul}\\)$`),m4=new RegExp(`^rgb\\(${Hr},${Hr},${Hr}\\)$`),y4=new RegExp(`^rgba\\(${ul},${ul},${ul},${gc}\\)$`),x4=new RegExp(`^rgba\\(${Hr},${Hr},${Hr},${gc}\\)$`),b4=new RegExp(`^hsl\\(${gc},${Hr},${Hr}\\)$`),C4=new RegExp(`^hsla\\(${gc},${Hr},${Hr},${gc}\\)$`),_1={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ry(Rc,mc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:B1,formatHex:B1,formatHex8:k4,formatHsl:v4,formatRgb:E1,toString:E1});function B1(){return this.rgb().formatHex()}function k4(){return this.rgb().formatHex8()}function v4(){return nv(this).formatHsl()}function E1(){return this.rgb().formatRgb()}function mc(e){var t,i;return e=(e+"").trim().toLowerCase(),(t=p4.exec(e))?(i=t[1].length,t=parseInt(t[1],16),i===6?L1(t):i===3?new Fi(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):i===8?ru(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):i===4?ru(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=g4.exec(e))?new Fi(t[1],t[2],t[3],1):(t=m4.exec(e))?new Fi(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=y4.exec(e))?ru(t[1],t[2],t[3],t[4]):(t=x4.exec(e))?ru(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=b4.exec(e))?R1(t[1],t[2]/100,t[3]/100,1):(t=C4.exec(e))?R1(t[1],t[2]/100,t[3]/100,t[4]):_1.hasOwnProperty(e)?L1(_1[e]):e==="transparent"?new Fi(NaN,NaN,NaN,0):null}function L1(e){return new Fi(e>>16&255,e>>8&255,e&255,1)}function ru(e,t,i,a){return a<=0&&(e=t=i=NaN),new Fi(e,t,i,a)}function S4(e){return e instanceof Rc||(e=mc(e)),e?(e=e.rgb(),new Fi(e.r,e.g,e.b,e.opacity)):new Fi}function zg(e,t,i,a){return arguments.length===1?S4(e):new Fi(e,t,i,a??1)}function Fi(e,t,i,a){this.r=+e,this.g=+t,this.b=+i,this.opacity=+a}ry(Fi,zg,av(Rc,{brighter(e){return e=e==null?Hu:Math.pow(Hu,e),new Fi(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?pc:Math.pow(pc,e),new Fi(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Fi(Zn(this.r),Zn(this.g),Zn(this.b),Uu(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:A1,formatHex:A1,formatHex8:T4,formatRgb:M1,toString:M1}));function A1(){return`#${Gn(this.r)}${Gn(this.g)}${Gn(this.b)}`}function T4(){return`#${Gn(this.r)}${Gn(this.g)}${Gn(this.b)}${Gn((isNaN(this.opacity)?1:this.opacity)*255)}`}function M1(){const e=Uu(this.opacity);return`${e===1?"rgb(":"rgba("}${Zn(this.r)}, ${Zn(this.g)}, ${Zn(this.b)}${e===1?")":`, ${e})`}`}function Uu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Zn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Gn(e){return e=Zn(e),(e<16?"0":"")+e.toString(16)}function R1(e,t,i,a){return a<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new br(e,t,i,a)}function nv(e){if(e instanceof br)return new br(e.h,e.s,e.l,e.opacity);if(e instanceof Rc||(e=mc(e)),!e)return new br;if(e instanceof br)return e;e=e.rgb();var t=e.r/255,i=e.g/255,a=e.b/255,s=Math.min(t,i,a),l=Math.max(t,i,a),c=NaN,h=l-s,d=(l+s)/2;return h?(t===l?c=(i-a)/h+(i<a)*6:i===l?c=(a-t)/h+2:c=(t-i)/h+4,h/=d<.5?l+s:2-l-s,c*=60):h=d>0&&d<1?0:c,new br(c,h,d,e.opacity)}function w4(e,t,i,a){return arguments.length===1?nv(e):new br(e,t,i,a??1)}function br(e,t,i,a){this.h=+e,this.s=+t,this.l=+i,this.opacity=+a}ry(br,w4,av(Rc,{brighter(e){return e=e==null?Hu:Math.pow(Hu,e),new br(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?pc:Math.pow(pc,e),new br(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,a=i+(i<.5?i:1-i)*t,s=2*i-a;return new Fi(ng(e>=240?e-240:e+120,s,a),ng(e,s,a),ng(e<120?e+240:e-120,s,a),this.opacity)},clamp(){return new br(O1(this.h),au(this.s),au(this.l),Uu(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Uu(this.opacity);return`${e===1?"hsl(":"hsla("}${O1(this.h)}, ${au(this.s)*100}%, ${au(this.l)*100}%${e===1?")":`, ${e})`}`}}));function O1(e){return e=(e||0)%360,e<0?e+360:e}function au(e){return Math.max(0,Math.min(1,e||0))}function ng(e,t,i){return(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)*255}const ay=e=>()=>e;function sv(e,t){return function(i){return e+i*t}}function _4(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(a){return Math.pow(e+a*t,i)}}function D7(e,t){var i=t-e;return i?sv(e,i>180||i<-180?i-360*Math.round(i/360):i):ay(isNaN(e)?t:e)}function B4(e){return(e=+e)==1?lv:function(t,i){return i-t?_4(t,i,e):ay(isNaN(t)?i:t)}}function lv(e,t){var i=t-e;return i?sv(e,i):ay(isNaN(e)?t:e)}const F1=(function e(t){var i=B4(t);function a(s,l){var c=i((s=zg(s)).r,(l=zg(l)).r),h=i(s.g,l.g),d=i(s.b,l.b),f=lv(s.opacity,l.opacity);return function(p){return s.r=c(p),s.g=h(p),s.b=d(p),s.opacity=f(p),s+""}}return a.gamma=e,a})(1);function hn(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}var Ng=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sg=new RegExp(Ng.source,"g");function E4(e){return function(){return e}}function L4(e){return function(t){return e(t)+""}}function A4(e,t){var i=Ng.lastIndex=sg.lastIndex=0,a,s,l,c=-1,h=[],d=[];for(e=e+"",t=t+"";(a=Ng.exec(e))&&(s=sg.exec(t));)(l=s.index)>i&&(l=t.slice(i,l),h[c]?h[c]+=l:h[++c]=l),(a=a[0])===(s=s[0])?h[c]?h[c]+=s:h[++c]=s:(h[++c]=null,d.push({i:c,x:hn(a,s)})),i=sg.lastIndex;return i<t.length&&(l=t.slice(i),h[c]?h[c]+=l:h[++c]=l),h.length<2?d[0]?L4(d[0].x):E4(t):(t=d.length,function(f){for(var p=0,g;p<t;++p)h[(g=d[p]).i]=g.x(f);return h.join("")})}var D1=180/Math.PI,qg={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ov(e,t,i,a,s,l){var c,h,d;return(c=Math.sqrt(e*e+t*t))&&(e/=c,t/=c),(d=e*i+t*a)&&(i-=e*d,a-=t*d),(h=Math.sqrt(i*i+a*a))&&(i/=h,a/=h,d/=h),e*a<t*i&&(e=-e,t=-t,d=-d,c=-c),{translateX:s,translateY:l,rotate:Math.atan2(t,e)*D1,skewX:Math.atan(d)*D1,scaleX:c,scaleY:h}}var nu;function M4(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?qg:ov(t.a,t.b,t.c,t.d,t.e,t.f)}function R4(e){return e==null||(nu||(nu=document.createElementNS("http://www.w3.org/2000/svg","g")),nu.setAttribute("transform",e),!(e=nu.transform.baseVal.consolidate()))?qg:(e=e.matrix,ov(e.a,e.b,e.c,e.d,e.e,e.f))}function cv(e,t,i,a){function s(f){return f.length?f.pop()+" ":""}function l(f,p,g,x,y,C){if(f!==g||p!==x){var k=y.push("translate(",null,t,null,i);C.push({i:k-4,x:hn(f,g)},{i:k-2,x:hn(p,x)})}else(g||x)&&y.push("translate("+g+t+x+i)}function c(f,p,g,x){f!==p?(f-p>180?p+=360:p-f>180&&(f+=360),x.push({i:g.push(s(g)+"rotate(",null,a)-2,x:hn(f,p)})):p&&g.push(s(g)+"rotate("+p+a)}function h(f,p,g,x){f!==p?x.push({i:g.push(s(g)+"skewX(",null,a)-2,x:hn(f,p)}):p&&g.push(s(g)+"skewX("+p+a)}function d(f,p,g,x,y,C){if(f!==g||p!==x){var k=y.push(s(y)+"scale(",null,",",null,")");C.push({i:k-4,x:hn(f,g)},{i:k-2,x:hn(p,x)})}else(g!==1||x!==1)&&y.push(s(y)+"scale("+g+","+x+")")}return function(f,p){var g=[],x=[];return f=e(f),p=e(p),l(f.translateX,f.translateY,p.translateX,p.translateY,g,x),c(f.rotate,p.rotate,g,x),h(f.skewX,p.skewX,g,x),d(f.scaleX,f.scaleY,p.scaleX,p.scaleY,g,x),f=p=null,function(y){for(var C=-1,k=x.length,S;++C<k;)g[(S=x[C]).i]=S.x(y);return g.join("")}}}var O4=cv(M4,"px, ","px)","deg)"),F4=cv(R4,", ",")",")"),Al=0,Jo=0,jo=0,hv=1e3,ju,tc,Pu=0,es=0,kd=0,yc=typeof performance=="object"&&performance.now?performance:Date,uv=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ny(){return es||(uv(D4),es=yc.now()+kd)}function D4(){es=0}function Wu(){this._call=this._time=this._next=null}Wu.prototype=dv.prototype={constructor:Wu,restart:function(e,t,i){if(typeof e!="function")throw new TypeError("callback is not a function");i=(i==null?ny():+i)+(t==null?0:+t),!this._next&&tc!==this&&(tc?tc._next=this:ju=this,tc=this),this._call=e,this._time=i,Ig()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ig())}};function dv(e,t,i){var a=new Wu;return a.restart(e,t,i),a}function $4(){ny(),++Al;for(var e=ju,t;e;)(t=es-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Al}function $1(){es=(Pu=yc.now())+kd,Al=Jo=0;try{$4()}finally{Al=0,N4(),es=0}}function z4(){var e=yc.now(),t=e-Pu;t>hv&&(kd-=t,Pu=e)}function N4(){for(var e,t=ju,i,a=1/0;t;)t._call?(a>t._time&&(a=t._time),e=t,t=t._next):(i=t._next,t._next=null,t=e?e._next=i:ju=i);tc=e,Ig(a)}function Ig(e){if(!Al){Jo&&(Jo=clearTimeout(Jo));var t=e-es;t>24?(e<1/0&&(Jo=setTimeout($1,e-yc.now()-kd)),jo&&(jo=clearInterval(jo))):(jo||(Pu=yc.now(),jo=setInterval(z4,hv)),Al=1,uv($1))}}function z1(e,t,i){var a=new Wu;return t=t==null?0:+t,a.restart(s=>{a.stop(),e(s+t)},t,i),a}var q4=Wk("start","end","cancel","interrupt"),I4=[],fv=0,N1=1,Hg=2,Cu=3,q1=4,Ug=5,ku=6;function vd(e,t,i,a,s,l){var c=e.__transition;if(!c)e.__transition={};else if(i in c)return;H4(e,i,{name:t,index:a,group:s,on:q4,tween:I4,time:l.time,delay:l.delay,duration:l.duration,ease:l.ease,timer:null,state:fv})}function sy(e,t){var i=Er(e,t);if(i.state>fv)throw new Error("too late; already scheduled");return i}function Yr(e,t){var i=Er(e,t);if(i.state>Cu)throw new Error("too late; already running");return i}function Er(e,t){var i=e.__transition;if(!i||!(i=i[t]))throw new Error("transition not found");return i}function H4(e,t,i){var a=e.__transition,s;a[t]=i,i.timer=dv(l,0,i.time);function l(f){i.state=N1,i.timer.restart(c,i.delay,i.time),i.delay<=f&&c(f-i.delay)}function c(f){var p,g,x,y;if(i.state!==N1)return d();for(p in a)if(y=a[p],y.name===i.name){if(y.state===Cu)return z1(c);y.state===q1?(y.state=ku,y.timer.stop(),y.on.call("interrupt",e,e.__data__,y.index,y.group),delete a[p]):+p<t&&(y.state=ku,y.timer.stop(),y.on.call("cancel",e,e.__data__,y.index,y.group),delete a[p])}if(z1(function(){i.state===Cu&&(i.state=q1,i.timer.restart(h,i.delay,i.time),h(f))}),i.state=Hg,i.on.call("start",e,e.__data__,i.index,i.group),i.state===Hg){for(i.state=Cu,s=new Array(x=i.tween.length),p=0,g=-1;p<x;++p)(y=i.tween[p].value.call(e,e.__data__,i.index,i.group))&&(s[++g]=y);s.length=g+1}}function h(f){for(var p=f<i.duration?i.ease.call(null,f/i.duration):(i.timer.restart(d),i.state=Ug,1),g=-1,x=s.length;++g<x;)s[g].call(e,p);i.state===Ug&&(i.on.call("end",e,e.__data__,i.index,i.group),d())}function d(){i.state=ku,i.timer.stop(),delete a[t];for(var f in a)return;delete e.__transition}}function U4(e,t){var i=e.__transition,a,s,l=!0,c;if(i){t=t==null?null:t+"";for(c in i){if((a=i[c]).name!==t){l=!1;continue}s=a.state>Hg&&a.state<Ug,a.state=ku,a.timer.stop(),a.on.call(s?"interrupt":"cancel",e,e.__data__,a.index,a.group),delete i[c]}l&&delete e.__transition}}function j4(e){return this.each(function(){U4(this,e)})}function P4(e,t){var i,a;return function(){var s=Yr(this,e),l=s.tween;if(l!==i){a=i=l;for(var c=0,h=a.length;c<h;++c)if(a[c].name===t){a=a.slice(),a.splice(c,1);break}}s.tween=a}}function W4(e,t,i){var a,s;if(typeof i!="function")throw new Error;return function(){var l=Yr(this,e),c=l.tween;if(c!==a){s=(a=c).slice();for(var h={name:t,value:i},d=0,f=s.length;d<f;++d)if(s[d].name===t){s[d]=h;break}d===f&&s.push(h)}l.tween=s}}function Y4(e,t){var i=this._id;if(e+="",arguments.length<2){for(var a=Er(this.node(),i).tween,s=0,l=a.length,c;s<l;++s)if((c=a[s]).name===e)return c.value;return null}return this.each((t==null?P4:W4)(i,e,t))}function ly(e,t,i){var a=e._id;return e.each(function(){var s=Yr(this,a);(s.value||(s.value={}))[t]=i.apply(this,arguments)}),function(s){return Er(s,a).value[t]}}function pv(e,t){var i;return(typeof t=="number"?hn:t instanceof mc?F1:(i=mc(t))?(t=i,F1):A4)(e,t)}function G4(e){return function(){this.removeAttribute(e)}}function X4(e){return function(){this.removeAttributeNS(e.space,e.local)}}function V4(e,t,i){var a,s=i+"",l;return function(){var c=this.getAttribute(e);return c===s?null:c===a?l:l=t(a=c,i)}}function Z4(e,t,i){var a,s=i+"",l;return function(){var c=this.getAttributeNS(e.space,e.local);return c===s?null:c===a?l:l=t(a=c,i)}}function Q4(e,t,i){var a,s,l;return function(){var c,h=i(this),d;return h==null?void this.removeAttribute(e):(c=this.getAttribute(e),d=h+"",c===d?null:c===a&&d===s?l:(s=d,l=t(a=c,h)))}}function K4(e,t,i){var a,s,l;return function(){var c,h=i(this),d;return h==null?void this.removeAttributeNS(e.space,e.local):(c=this.getAttributeNS(e.space,e.local),d=h+"",c===d?null:c===a&&d===s?l:(s=d,l=t(a=c,h)))}}function J4(e,t){var i=Cd(e),a=i==="transform"?F4:pv;return this.attrTween(e,typeof t=="function"?(i.local?K4:Q4)(i,a,ly(this,"attr."+e,t)):t==null?(i.local?X4:G4)(i):(i.local?Z4:V4)(i,a,t))}function tF(e,t){return function(i){this.setAttribute(e,t.call(this,i))}}function eF(e,t){return function(i){this.setAttributeNS(e.space,e.local,t.call(this,i))}}function iF(e,t){var i,a;function s(){var l=t.apply(this,arguments);return l!==a&&(i=(a=l)&&eF(e,l)),i}return s._value=t,s}function rF(e,t){var i,a;function s(){var l=t.apply(this,arguments);return l!==a&&(i=(a=l)&&tF(e,l)),i}return s._value=t,s}function aF(e,t){var i="attr."+e;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;var a=Cd(e);return this.tween(i,(a.local?iF:rF)(a,t))}function nF(e,t){return function(){sy(this,e).delay=+t.apply(this,arguments)}}function sF(e,t){return t=+t,function(){sy(this,e).delay=t}}function lF(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?nF:sF)(t,e)):Er(this.node(),t).delay}function oF(e,t){return function(){Yr(this,e).duration=+t.apply(this,arguments)}}function cF(e,t){return t=+t,function(){Yr(this,e).duration=t}}function hF(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?oF:cF)(t,e)):Er(this.node(),t).duration}function uF(e,t){if(typeof t!="function")throw new Error;return function(){Yr(this,e).ease=t}}function dF(e){var t=this._id;return arguments.length?this.each(uF(t,e)):Er(this.node(),t).ease}function fF(e,t){return function(){var i=t.apply(this,arguments);if(typeof i!="function")throw new Error;Yr(this,e).ease=i}}function pF(e){if(typeof e!="function")throw new Error;return this.each(fF(this._id,e))}function gF(e){typeof e!="function"&&(e=Xk(e));for(var t=this._groups,i=t.length,a=new Array(i),s=0;s<i;++s)for(var l=t[s],c=l.length,h=a[s]=[],d,f=0;f<c;++f)(d=l[f])&&e.call(d,d.__data__,f,l)&&h.push(d);return new Ca(a,this._parents,this._name,this._id)}function mF(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,i=e._groups,a=t.length,s=i.length,l=Math.min(a,s),c=new Array(a),h=0;h<l;++h)for(var d=t[h],f=i[h],p=d.length,g=c[h]=new Array(p),x,y=0;y<p;++y)(x=d[y]||f[y])&&(g[y]=x);for(;h<a;++h)c[h]=t[h];return new Ca(c,this._parents,this._name,this._id)}function yF(e){return(e+"").trim().split(/^|\s+/).every(function(t){var i=t.indexOf(".");return i>=0&&(t=t.slice(0,i)),!t||t==="start"})}function xF(e,t,i){var a,s,l=yF(t)?sy:Yr;return function(){var c=l(this,e),h=c.on;h!==a&&(s=(a=h).copy()).on(t,i),c.on=s}}function bF(e,t){var i=this._id;return arguments.length<2?Er(this.node(),i).on.on(e):this.each(xF(i,e,t))}function CF(e){return function(){var t=this.parentNode;for(var i in this.__transition)if(+i!==e)return;t&&t.removeChild(this)}}function kF(){return this.on("end.remove",CF(this._id))}function vF(e){var t=this._name,i=this._id;typeof e!="function"&&(e=ey(e));for(var a=this._groups,s=a.length,l=new Array(s),c=0;c<s;++c)for(var h=a[c],d=h.length,f=l[c]=new Array(d),p,g,x=0;x<d;++x)(p=h[x])&&(g=e.call(p,p.__data__,x,h))&&("__data__"in p&&(g.__data__=p.__data__),f[x]=g,vd(f[x],t,i,x,f,Er(p,i)));return new Ca(l,this._parents,t,i)}function SF(e){var t=this._name,i=this._id;typeof e!="function"&&(e=Gk(e));for(var a=this._groups,s=a.length,l=[],c=[],h=0;h<s;++h)for(var d=a[h],f=d.length,p,g=0;g<f;++g)if(p=d[g]){for(var x=e.call(p,p.__data__,g,d),y,C=Er(p,i),k=0,S=x.length;k<S;++k)(y=x[k])&&vd(y,t,i,k,x,C);l.push(x),c.push(p)}return new Ca(l,c,t,i)}var TF=Mc.prototype.constructor;function wF(){return new TF(this._groups,this._parents)}function _F(e,t){var i,a,s;return function(){var l=Ll(this,e),c=(this.style.removeProperty(e),Ll(this,e));return l===c?null:l===i&&c===a?s:s=t(i=l,a=c)}}function gv(e){return function(){this.style.removeProperty(e)}}function BF(e,t,i){var a,s=i+"",l;return function(){var c=Ll(this,e);return c===s?null:c===a?l:l=t(a=c,i)}}function EF(e,t,i){var a,s,l;return function(){var c=Ll(this,e),h=i(this),d=h+"";return h==null&&(d=h=(this.style.removeProperty(e),Ll(this,e))),c===d?null:c===a&&d===s?l:(s=d,l=t(a=c,h))}}function LF(e,t){var i,a,s,l="style."+t,c="end."+l,h;return function(){var d=Yr(this,e),f=d.on,p=d.value[l]==null?h||(h=gv(t)):void 0;(f!==i||s!==p)&&(a=(i=f).copy()).on(c,s=p),d.on=a}}function AF(e,t,i){var a=(e+="")=="transform"?O4:pv;return t==null?this.styleTween(e,_F(e,a)).on("end.style."+e,gv(e)):typeof t=="function"?this.styleTween(e,EF(e,a,ly(this,"style."+e,t))).each(LF(this._id,e)):this.styleTween(e,BF(e,a,t),i).on("end.style."+e,null)}function MF(e,t,i){return function(a){this.style.setProperty(e,t.call(this,a),i)}}function RF(e,t,i){var a,s;function l(){var c=t.apply(this,arguments);return c!==s&&(a=(s=c)&&MF(e,c,i)),a}return l._value=t,l}function OF(e,t,i){var a="style."+(e+="");if(arguments.length<2)return(a=this.tween(a))&&a._value;if(t==null)return this.tween(a,null);if(typeof t!="function")throw new Error;return this.tween(a,RF(e,t,i??""))}function FF(e){return function(){this.textContent=e}}function DF(e){return function(){var t=e(this);this.textContent=t??""}}function $F(e){return this.tween("text",typeof e=="function"?DF(ly(this,"text",e)):FF(e==null?"":e+""))}function zF(e){return function(t){this.textContent=e.call(this,t)}}function NF(e){var t,i;function a(){var s=e.apply(this,arguments);return s!==i&&(t=(i=s)&&zF(s)),t}return a._value=e,a}function qF(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,NF(e))}function IF(){for(var e=this._name,t=this._id,i=mv(),a=this._groups,s=a.length,l=0;l<s;++l)for(var c=a[l],h=c.length,d,f=0;f<h;++f)if(d=c[f]){var p=Er(d,t);vd(d,e,i,f,c,{time:p.time+p.delay+p.duration,delay:0,duration:p.duration,ease:p.ease})}return new Ca(a,this._parents,e,i)}function HF(){var e,t,i=this,a=i._id,s=i.size();return new Promise(function(l,c){var h={value:c},d={value:function(){--s===0&&l()}};i.each(function(){var f=Yr(this,a),p=f.on;p!==e&&(t=(e=p).copy(),t._.cancel.push(h),t._.interrupt.push(h),t._.end.push(d)),f.on=t}),s===0&&l()})}var UF=0;function Ca(e,t,i,a){this._groups=e,this._parents=t,this._name=i,this._id=a}function mv(){return++UF}var pa=Mc.prototype;Ca.prototype={constructor:Ca,select:vF,selectAll:SF,selectChild:pa.selectChild,selectChildren:pa.selectChildren,filter:gF,merge:mF,selection:wF,transition:IF,call:pa.call,nodes:pa.nodes,node:pa.node,size:pa.size,empty:pa.empty,each:pa.each,on:bF,attr:J4,attrTween:aF,style:AF,styleTween:OF,text:$F,textTween:qF,remove:kF,tween:Y4,delay:lF,duration:hF,ease:dF,easeVarying:pF,end:HF,[Symbol.iterator]:pa[Symbol.iterator]};function jF(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var PF={time:null,delay:0,duration:250,ease:jF};function WF(e,t){for(var i;!(i=e.__transition)||!(i=i[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return i}function YF(e){var t,i;e instanceof Ca?(t=e._id,e=e._name):(t=mv(),(i=PF).time=ny(),e=e==null?null:e+"");for(var a=this._groups,s=a.length,l=0;l<s;++l)for(var c=a[l],h=c.length,d,f=0;f<h;++f)(d=c[f])&&vd(d,e,t,f,c,i||WF(d,t));return new Ca(a,this._parents,e,t)}Mc.prototype.interrupt=j4;Mc.prototype.transition=YF;const jg=Math.PI,Pg=2*jg,jn=1e-6,GF=Pg-jn;function yv(e){this._+=e[0];for(let t=1,i=e.length;t<i;++t)this._+=arguments[t]+e[t]}function XF(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return yv;const i=10**t;return function(a){this._+=a[0];for(let s=1,l=a.length;s<l;++s)this._+=Math.round(arguments[s]*i)/i+a[s]}}class VF{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?yv:XF(t)}moveTo(t,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,i){this._append`L${this._x1=+t},${this._y1=+i}`}quadraticCurveTo(t,i,a,s){this._append`Q${+t},${+i},${this._x1=+a},${this._y1=+s}`}bezierCurveTo(t,i,a,s,l,c){this._append`C${+t},${+i},${+a},${+s},${this._x1=+l},${this._y1=+c}`}arcTo(t,i,a,s,l){if(t=+t,i=+i,a=+a,s=+s,l=+l,l<0)throw new Error(`negative radius: ${l}`);let c=this._x1,h=this._y1,d=a-t,f=s-i,p=c-t,g=h-i,x=p*p+g*g;if(this._x1===null)this._append`M${this._x1=t},${this._y1=i}`;else if(x>jn)if(!(Math.abs(g*d-f*p)>jn)||!l)this._append`L${this._x1=t},${this._y1=i}`;else{let y=a-c,C=s-h,k=d*d+f*f,S=y*y+C*C,T=Math.sqrt(k),_=Math.sqrt(x),E=l*Math.tan((jg-Math.acos((k+x-S)/(2*T*_)))/2),M=E/_,O=E/T;Math.abs(M-1)>jn&&this._append`L${t+M*p},${i+M*g}`,this._append`A${l},${l},0,0,${+(g*y>p*C)},${this._x1=t+O*d},${this._y1=i+O*f}`}}arc(t,i,a,s,l,c){if(t=+t,i=+i,a=+a,c=!!c,a<0)throw new Error(`negative radius: ${a}`);let h=a*Math.cos(s),d=a*Math.sin(s),f=t+h,p=i+d,g=1^c,x=c?s-l:l-s;this._x1===null?this._append`M${f},${p}`:(Math.abs(this._x1-f)>jn||Math.abs(this._y1-p)>jn)&&this._append`L${f},${p}`,a&&(x<0&&(x=x%Pg+Pg),x>GF?this._append`A${a},${a},0,1,${g},${t-h},${i-d}A${a},${a},0,1,${g},${this._x1=f},${this._y1=p}`:x>jn&&this._append`A${a},${a},0,${+(x>=jg)},${g},${this._x1=t+a*Math.cos(l)},${this._y1=i+a*Math.sin(l)}`)}rect(t,i,a,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}h${a=+a}v${+s}h${-a}Z`}toString(){return this._}}function el(e){return function(){return e}}const $7=Math.abs,z7=Math.atan2,N7=Math.cos,q7=Math.max,I7=Math.min,H7=Math.sin,U7=Math.sqrt,I1=1e-12,oy=Math.PI,H1=oy/2,j7=2*oy;function P7(e){return e>1?0:e<-1?oy:Math.acos(e)}function W7(e){return e>=1?H1:e<=-1?-H1:Math.asin(e)}function ZF(e){let t=3;return e.digits=function(i){if(!arguments.length)return t;if(i==null)t=null;else{const a=Math.floor(i);if(!(a>=0))throw new RangeError(`invalid digits: ${i}`);t=a}return e},()=>new VF(t)}function QF(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xv(e){this._context=e}xv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function cc(e){return new xv(e)}function KF(e){return e[0]}function JF(e){return e[1]}function tD(e,t){var i=el(!0),a=null,s=cc,l=null,c=ZF(h);e=typeof e=="function"?e:e===void 0?KF:el(e),t=typeof t=="function"?t:t===void 0?JF:el(t);function h(d){var f,p=(d=QF(d)).length,g,x=!1,y;for(a==null&&(l=s(y=c())),f=0;f<=p;++f)!(f<p&&i(g=d[f],f,d))===x&&((x=!x)?l.lineStart():l.lineEnd()),x&&l.point(+e(g,f,d),+t(g,f,d));if(y)return l=null,y+""||null}return h.x=function(d){return arguments.length?(e=typeof d=="function"?d:el(+d),h):e},h.y=function(d){return arguments.length?(t=typeof d=="function"?d:el(+d),h):t},h.defined=function(d){return arguments.length?(i=typeof d=="function"?d:el(!!d),h):i},h.curve=function(d){return arguments.length?(s=d,a!=null&&(l=s(a)),h):s},h.context=function(d){return arguments.length?(d==null?a=l=null:l=s(a=d),h):a},h}class bv{constructor(t,i){this._context=t,this._x=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,i){switch(t=+t,i=+i,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,i,t,i):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+i)/2,t,this._y0,t,i);break}}this._x0=t,this._y0=i}}function Cv(e){return new bv(e,!0)}function kv(e){return new bv(e,!1)}function gn(){}function Yu(e,t,i){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+i)/6)}function Sd(e){this._context=e}Sd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Yu(this,this._x1,this._y1);case 2:this._context.lineTo(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;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Yu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Wg(e){return new Sd(e)}function vv(e){this._context=e}vv.prototype={areaStart:gn,areaEnd:gn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Yu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function eD(e){return new vv(e)}function Sv(e){this._context=e}Sv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+e)/6,a=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 3:this._point=4;default:Yu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function iD(e){return new Sv(e)}function Tv(e,t){this._basis=new Sd(e),this._beta=t}Tv.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,i=e.length-1;if(i>0)for(var a=e[0],s=t[0],l=e[i]-a,c=t[i]-s,h=-1,d;++h<=i;)d=h/i,this._basis.point(this._beta*e[h]+(1-this._beta)*(a+d*l),this._beta*t[h]+(1-this._beta)*(s+d*c));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const rD=(function e(t){function i(a){return t===1?new Sd(a):new Tv(a,t)}return i.beta=function(a){return e(+a)},i})(.85);function Gu(e,t,i){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-i),e._x2,e._y2)}function cy(e,t){this._context=e,this._k=(1-t)/6}cy.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:Gu(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:Gu(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 wv=(function e(t){function i(a){return new cy(a,t)}return i.tension=function(a){return e(+a)},i})(0);function hy(e,t){this._context=e,this._k=(1-t)/6}hy.prototype={areaStart:gn,areaEnd:gn,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:Gu(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 aD=(function e(t){function i(a){return new hy(a,t)}return i.tension=function(a){return e(+a)},i})(0);function uy(e,t){this._context=e,this._k=(1-t)/6}uy.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:Gu(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 nD=(function e(t){function i(a){return new uy(a,t)}return i.tension=function(a){return e(+a)},i})(0);function dy(e,t,i){var a=e._x1,s=e._y1,l=e._x2,c=e._y2;if(e._l01_a>I1){var h=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,d=3*e._l01_a*(e._l01_a+e._l12_a);a=(a*h-e._x0*e._l12_2a+e._x2*e._l01_2a)/d,s=(s*h-e._y0*e._l12_2a+e._y2*e._l01_2a)/d}if(e._l23_a>I1){var f=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,p=3*e._l23_a*(e._l23_a+e._l12_a);l=(l*f+e._x1*e._l23_2a-t*e._l12_2a)/p,c=(c*f+e._y1*e._l23_2a-i*e._l12_2a)/p}e._context.bezierCurveTo(a,s,l,c,e._x2,e._y2)}function _v(e,t){this._context=e,this._alpha=t}_v.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 i=this._x2-e,a=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+a*a,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:dy(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 Bv=(function e(t){function i(a){return t?new _v(a,t):new cy(a,0)}return i.alpha=function(a){return e(+a)},i})(.5);function Ev(e,t){this._context=e,this._alpha=t}Ev.prototype={areaStart:gn,areaEnd:gn,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 i=this._x2-e,a=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+a*a,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:dy(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 sD=(function e(t){function i(a){return t?new Ev(a,t):new hy(a,0)}return i.alpha=function(a){return e(+a)},i})(.5);function Lv(e,t){this._context=e,this._alpha=t}Lv.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 i=this._x2-e,a=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+a*a,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:dy(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 lD=(function e(t){function i(a){return t?new Lv(a,t):new uy(a,0)}return i.alpha=function(a){return e(+a)},i})(.5);function Av(e){this._context=e}Av.prototype={areaStart:gn,areaEnd:gn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function oD(e){return new Av(e)}function U1(e){return e<0?-1:1}function j1(e,t,i){var a=e._x1-e._x0,s=t-e._x1,l=(e._y1-e._y0)/(a||s<0&&-0),c=(i-e._y1)/(s||a<0&&-0),h=(l*s+c*a)/(a+s);return(U1(l)+U1(c))*Math.min(Math.abs(l),Math.abs(c),.5*Math.abs(h))||0}function P1(e,t){var i=e._x1-e._x0;return i?(3*(e._y1-e._y0)/i-t)/2:t}function lg(e,t,i){var a=e._x0,s=e._y0,l=e._x1,c=e._y1,h=(l-a)/3;e._context.bezierCurveTo(a+h,s+h*t,l-h,c-h*i,l,c)}function Xu(e){this._context=e}Xu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:lg(this,this._t0,P1(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var i=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,lg(this,P1(this,i=j1(this,e,t)),i);break;default:lg(this,this._t0,i=j1(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=i}}};function Mv(e){this._context=new Rv(e)}(Mv.prototype=Object.create(Xu.prototype)).point=function(e,t){Xu.prototype.point.call(this,t,e)};function Rv(e){this._context=e}Rv.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,i,a,s,l){this._context.bezierCurveTo(t,e,a,i,l,s)}};function Ov(e){return new Xu(e)}function Fv(e){return new Mv(e)}function Dv(e){this._context=e}Dv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,i=e.length;if(i)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),i===2)this._context.lineTo(e[1],t[1]);else for(var a=W1(e),s=W1(t),l=0,c=1;c<i;++l,++c)this._context.bezierCurveTo(a[0][l],s[0][l],a[1][l],s[1][l],e[c],t[c]);(this._line||this._line!==0&&i===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function W1(e){var t,i=e.length-1,a,s=new Array(i),l=new Array(i),c=new Array(i);for(s[0]=0,l[0]=2,c[0]=e[0]+2*e[1],t=1;t<i-1;++t)s[t]=1,l[t]=4,c[t]=4*e[t]+2*e[t+1];for(s[i-1]=2,l[i-1]=7,c[i-1]=8*e[i-1]+e[i],t=1;t<i;++t)a=s[t]/l[t-1],l[t]-=a,c[t]-=a*c[t-1];for(s[i-1]=c[i-1]/l[i-1],t=i-2;t>=0;--t)s[t]=(c[t]-s[t+1])/l[t];for(l[i-1]=(e[i]+s[i-1])/2,t=0;t<i-1;++t)l[t]=2*e[t+1]-s[t+1];return[s,l]}function $v(e){return new Dv(e)}function Td(e,t){this._context=e,this._t=t}Td.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var i=this._x*(1-this._t)+e*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,t)}break}}this._x=e,this._y=t}};function zv(e){return new Td(e,.5)}function Nv(e){return new Td(e,0)}function qv(e){return new Td(e,1)}function ec(e,t,i){this.k=e,this.x=t,this.y=i}ec.prototype={constructor:ec,scale:function(e){return e===1?this:new ec(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ec(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};ec.prototype;var cD=v(e=>{const{securityLevel:t}=ee();let i=Ut("body");if(t==="sandbox"){const l=Ut(`#i${e}`).node()?.contentDocument??document;i=Ut(l.body)}return i.select(`#${e}`)},"selectSvgElement");function fy(e){return typeof e>"u"||e===null}v(fy,"isNothing");function Iv(e){return typeof e=="object"&&e!==null}v(Iv,"isObject");function Hv(e){return Array.isArray(e)?e:fy(e)?[]:[e]}v(Hv,"toArray");function Uv(e,t){var i,a,s,l;if(t)for(l=Object.keys(t),i=0,a=l.length;i<a;i+=1)s=l[i],e[s]=t[s];return e}v(Uv,"extend");function jv(e,t){var i="",a;for(a=0;a<t;a+=1)i+=e;return i}v(jv,"repeat");function Pv(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}v(Pv,"isNegativeZero");var hD=fy,uD=Iv,dD=Hv,fD=jv,pD=Pv,gD=Uv,Pe={isNothing:hD,isObject:uD,toArray:dD,repeat:fD,isNegativeZero:pD,extend:gD};function py(e,t){var i="",a=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(i+='in "'+e.mark.name+'" '),i+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(i+=`
208
+
209
+ `+e.mark.snippet),a+" "+i):a}v(py,"formatError");function Ml(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=py(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}v(Ml,"YAMLException$1");Ml.prototype=Object.create(Error.prototype);Ml.prototype.constructor=Ml;Ml.prototype.toString=v(function(t){return this.name+": "+py(this,t)},"toString");var Oi=Ml;function vu(e,t,i,a,s){var l="",c="",h=Math.floor(s/2)-1;return a-t>h&&(l=" ... ",t=a-h+l.length),i-a>h&&(c=" ...",i=a+h-c.length),{str:l+e.slice(t,i).replace(/\t/g,"→")+c,pos:a-t+l.length}}v(vu,"getLine");function Su(e,t){return Pe.repeat(" ",t-e.length)+e}v(Su,"padStart");function Wv(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 i=/\r?\n|\r|\0/g,a=[0],s=[],l,c=-1;l=i.exec(e.buffer);)s.push(l.index),a.push(l.index+l[0].length),e.position<=l.index&&c<0&&(c=a.length-2);c<0&&(c=a.length-1);var h="",d,f,p=Math.min(e.line+t.linesAfter,s.length).toString().length,g=t.maxLength-(t.indent+p+3);for(d=1;d<=t.linesBefore&&!(c-d<0);d++)f=vu(e.buffer,a[c-d],s[c-d],e.position-(a[c]-a[c-d]),g),h=Pe.repeat(" ",t.indent)+Su((e.line-d+1).toString(),p)+" | "+f.str+`
210
+ `+h;for(f=vu(e.buffer,a[c],s[c],e.position,g),h+=Pe.repeat(" ",t.indent)+Su((e.line+1).toString(),p)+" | "+f.str+`
211
+ `,h+=Pe.repeat("-",t.indent+p+3+f.pos)+`^
212
+ `,d=1;d<=t.linesAfter&&!(c+d>=s.length);d++)f=vu(e.buffer,a[c+d],s[c+d],e.position-(a[c]-a[c+d]),g),h+=Pe.repeat(" ",t.indent)+Su((e.line+d+1).toString(),p)+" | "+f.str+`
213
+ `;return h.replace(/\n$/,"")}v(Wv,"makeSnippet");var mD=Wv,yD=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],xD=["scalar","sequence","mapping"];function Yv(e){var t={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(a){t[String(a)]=i})}),t}v(Yv,"compileStyleAliases");function Gv(e,t){if(t=t||{},Object.keys(t).forEach(function(i){if(yD.indexOf(i)===-1)throw new Oi('Unknown option "'+i+'" 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(i){return i},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=Yv(t.styleAliases||null),xD.indexOf(this.kind)===-1)throw new Oi('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}v(Gv,"Type$1");var hi=Gv;function Yg(e,t){var i=[];return e[t].forEach(function(a){var s=i.length;i.forEach(function(l,c){l.tag===a.tag&&l.kind===a.kind&&l.multi===a.multi&&(s=c)}),i[s]=a}),i}v(Yg,"compileList");function Xv(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,i;function a(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(v(a,"collectType"),t=0,i=arguments.length;t<i;t+=1)arguments[t].forEach(a);return e}v(Xv,"compileMap");function Vu(e){return this.extend(e)}v(Vu,"Schema$1");Vu.prototype.extend=v(function(t){var i=[],a=[];if(t instanceof hi)a.push(t);else if(Array.isArray(t))a=a.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(i=i.concat(t.implicit)),t.explicit&&(a=a.concat(t.explicit));else throw new Oi("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(l){if(!(l instanceof hi))throw new Oi("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(l.loadKind&&l.loadKind!=="scalar")throw new Oi("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(l.multi)throw new Oi("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),a.forEach(function(l){if(!(l instanceof hi))throw new Oi("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(Vu.prototype);return s.implicit=(this.implicit||[]).concat(i),s.explicit=(this.explicit||[]).concat(a),s.compiledImplicit=Yg(s,"implicit"),s.compiledExplicit=Yg(s,"explicit"),s.compiledTypeMap=Xv(s.compiledImplicit,s.compiledExplicit),s},"extend");var bD=Vu,CD=new hi("tag:yaml.org,2002:str",{kind:"scalar",construct:v(function(e){return e!==null?e:""},"construct")}),kD=new hi("tag:yaml.org,2002:seq",{kind:"sequence",construct:v(function(e){return e!==null?e:[]},"construct")}),vD=new hi("tag:yaml.org,2002:map",{kind:"mapping",construct:v(function(e){return e!==null?e:{}},"construct")}),SD=new bD({explicit:[CD,kD,vD]});function Vv(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}v(Vv,"resolveYamlNull");function Zv(){return null}v(Zv,"constructYamlNull");function Qv(e){return e===null}v(Qv,"isNull");var TD=new hi("tag:yaml.org,2002:null",{kind:"scalar",resolve:Vv,construct:Zv,predicate:Qv,represent:{canonical:v(function(){return"~"},"canonical"),lowercase:v(function(){return"null"},"lowercase"),uppercase:v(function(){return"NULL"},"uppercase"),camelcase:v(function(){return"Null"},"camelcase"),empty:v(function(){return""},"empty")},defaultStyle:"lowercase"});function Kv(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")}v(Kv,"resolveYamlBoolean");function Jv(e){return e==="true"||e==="True"||e==="TRUE"}v(Jv,"constructYamlBoolean");function tS(e){return Object.prototype.toString.call(e)==="[object Boolean]"}v(tS,"isBoolean");var wD=new hi("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Kv,construct:Jv,predicate:tS,represent:{lowercase:v(function(e){return e?"true":"false"},"lowercase"),uppercase:v(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:v(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function eS(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}v(eS,"isHexCode");function iS(e){return 48<=e&&e<=55}v(iS,"isOctCode");function rS(e){return 48<=e&&e<=57}v(rS,"isDecCode");function aS(e){if(e===null)return!1;var t=e.length,i=0,a=!1,s;if(!t)return!1;if(s=e[i],(s==="-"||s==="+")&&(s=e[++i]),s==="0"){if(i+1===t)return!0;if(s=e[++i],s==="b"){for(i++;i<t;i++)if(s=e[i],s!=="_"){if(s!=="0"&&s!=="1")return!1;a=!0}return a&&s!=="_"}if(s==="x"){for(i++;i<t;i++)if(s=e[i],s!=="_"){if(!eS(e.charCodeAt(i)))return!1;a=!0}return a&&s!=="_"}if(s==="o"){for(i++;i<t;i++)if(s=e[i],s!=="_"){if(!iS(e.charCodeAt(i)))return!1;a=!0}return a&&s!=="_"}}if(s==="_")return!1;for(;i<t;i++)if(s=e[i],s!=="_"){if(!rS(e.charCodeAt(i)))return!1;a=!0}return!(!a||s==="_")}v(aS,"resolveYamlInteger");function nS(e){var t=e,i=1,a;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),a=t[0],(a==="-"||a==="+")&&(a==="-"&&(i=-1),t=t.slice(1),a=t[0]),t==="0")return 0;if(a==="0"){if(t[1]==="b")return i*parseInt(t.slice(2),2);if(t[1]==="x")return i*parseInt(t.slice(2),16);if(t[1]==="o")return i*parseInt(t.slice(2),8)}return i*parseInt(t,10)}v(nS,"constructYamlInteger");function sS(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Pe.isNegativeZero(e)}v(sS,"isInteger");var _D=new hi("tag:yaml.org,2002:int",{kind:"scalar",resolve:aS,construct:nS,predicate:sS,represent:{binary:v(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:v(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:v(function(e){return e.toString(10)},"decimal"),hexadecimal:v(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"]}}),BD=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function lS(e){return!(e===null||!BD.test(e)||e[e.length-1]==="_")}v(lS,"resolveYamlFloat");function oS(e){var t,i;return t=e.replace(/_/g,"").toLowerCase(),i=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:i*parseFloat(t,10)}v(oS,"constructYamlFloat");var ED=/^[-+]?[0-9]+e/;function cS(e,t){var i;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(Pe.isNegativeZero(e))return"-0.0";return i=e.toString(10),ED.test(i)?i.replace("e",".e"):i}v(cS,"representYamlFloat");function hS(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Pe.isNegativeZero(e))}v(hS,"isFloat");var LD=new hi("tag:yaml.org,2002:float",{kind:"scalar",resolve:lS,construct:oS,predicate:hS,represent:cS,defaultStyle:"lowercase"}),uS=SD.extend({implicit:[TD,wD,_D,LD]}),AD=uS,dS=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),fS=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 pS(e){return e===null?!1:dS.exec(e)!==null||fS.exec(e)!==null}v(pS,"resolveYamlTimestamp");function gS(e){var t,i,a,s,l,c,h,d=0,f=null,p,g,x;if(t=dS.exec(e),t===null&&(t=fS.exec(e)),t===null)throw new Error("Date resolve error");if(i=+t[1],a=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(i,a,s));if(l=+t[4],c=+t[5],h=+t[6],t[7]){for(d=t[7].slice(0,3);d.length<3;)d+="0";d=+d}return t[9]&&(p=+t[10],g=+(t[11]||0),f=(p*60+g)*6e4,t[9]==="-"&&(f=-f)),x=new Date(Date.UTC(i,a,s,l,c,h,d)),f&&x.setTime(x.getTime()-f),x}v(gS,"constructYamlTimestamp");function mS(e){return e.toISOString()}v(mS,"representYamlTimestamp");var MD=new hi("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:pS,construct:gS,instanceOf:Date,represent:mS});function yS(e){return e==="<<"||e===null}v(yS,"resolveYamlMerge");var RD=new hi("tag:yaml.org,2002:merge",{kind:"scalar",resolve:yS}),gy=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
214
+ \r`;function xS(e){if(e===null)return!1;var t,i,a=0,s=e.length,l=gy;for(i=0;i<s;i++)if(t=l.indexOf(e.charAt(i)),!(t>64)){if(t<0)return!1;a+=6}return a%8===0}v(xS,"resolveYamlBinary");function bS(e){var t,i,a=e.replace(/[\r\n=]/g,""),s=a.length,l=gy,c=0,h=[];for(t=0;t<s;t++)t%4===0&&t&&(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)),c=c<<6|l.indexOf(a.charAt(t));return i=s%4*6,i===0?(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)):i===18?(h.push(c>>10&255),h.push(c>>2&255)):i===12&&h.push(c>>4&255),new Uint8Array(h)}v(bS,"constructYamlBinary");function CS(e){var t="",i=0,a,s,l=e.length,c=gy;for(a=0;a<l;a++)a%3===0&&a&&(t+=c[i>>18&63],t+=c[i>>12&63],t+=c[i>>6&63],t+=c[i&63]),i=(i<<8)+e[a];return s=l%3,s===0?(t+=c[i>>18&63],t+=c[i>>12&63],t+=c[i>>6&63],t+=c[i&63]):s===2?(t+=c[i>>10&63],t+=c[i>>4&63],t+=c[i<<2&63],t+=c[64]):s===1&&(t+=c[i>>2&63],t+=c[i<<4&63],t+=c[64],t+=c[64]),t}v(CS,"representYamlBinary");function kS(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}v(kS,"isBinary");var OD=new hi("tag:yaml.org,2002:binary",{kind:"scalar",resolve:xS,construct:bS,predicate:kS,represent:CS}),FD=Object.prototype.hasOwnProperty,DD=Object.prototype.toString;function vS(e){if(e===null)return!0;var t=[],i,a,s,l,c,h=e;for(i=0,a=h.length;i<a;i+=1){if(s=h[i],c=!1,DD.call(s)!=="[object Object]")return!1;for(l in s)if(FD.call(s,l))if(!c)c=!0;else return!1;if(!c)return!1;if(t.indexOf(l)===-1)t.push(l);else return!1}return!0}v(vS,"resolveYamlOmap");function SS(e){return e!==null?e:[]}v(SS,"constructYamlOmap");var $D=new hi("tag:yaml.org,2002:omap",{kind:"sequence",resolve:vS,construct:SS}),zD=Object.prototype.toString;function TS(e){if(e===null)return!0;var t,i,a,s,l,c=e;for(l=new Array(c.length),t=0,i=c.length;t<i;t+=1){if(a=c[t],zD.call(a)!=="[object Object]"||(s=Object.keys(a),s.length!==1))return!1;l[t]=[s[0],a[s[0]]]}return!0}v(TS,"resolveYamlPairs");function wS(e){if(e===null)return[];var t,i,a,s,l,c=e;for(l=new Array(c.length),t=0,i=c.length;t<i;t+=1)a=c[t],s=Object.keys(a),l[t]=[s[0],a[s[0]]];return l}v(wS,"constructYamlPairs");var ND=new hi("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:TS,construct:wS}),qD=Object.prototype.hasOwnProperty;function _S(e){if(e===null)return!0;var t,i=e;for(t in i)if(qD.call(i,t)&&i[t]!==null)return!1;return!0}v(_S,"resolveYamlSet");function BS(e){return e!==null?e:{}}v(BS,"constructYamlSet");var ID=new hi("tag:yaml.org,2002:set",{kind:"mapping",resolve:_S,construct:BS}),ES=AD.extend({implicit:[MD,RD],explicit:[OD,$D,ND,ID]}),mn=Object.prototype.hasOwnProperty,Zu=1,LS=2,AS=3,Qu=4,og=1,HD=2,Y1=3,UD=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,jD=/[\x85\u2028\u2029]/,PD=/[,\[\]\{\}]/,MS=/^(?:!|!!|![a-z\-]+!)$/i,RS=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Gg(e){return Object.prototype.toString.call(e)}v(Gg,"_class");function vr(e){return e===10||e===13}v(vr,"is_EOL");function pn(e){return e===9||e===32}v(pn,"is_WHITE_SPACE");function yi(e){return e===9||e===32||e===10||e===13}v(yi,"is_WS_OR_EOL");function Xn(e){return e===44||e===91||e===93||e===123||e===125}v(Xn,"is_FLOW_INDICATOR");function OS(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}v(OS,"fromHexCode");function FS(e){return e===120?2:e===117?4:e===85?8:0}v(FS,"escapedHexLen");function DS(e){return 48<=e&&e<=57?e-48:-1}v(DS,"fromDecimalCode");function Xg(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
215
+ `: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":""}v(Xg,"simpleEscapeSequence");function $S(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}v($S,"charFromCodepoint");function my(e,t,i){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:i}):e[t]=i}v(my,"setProperty");var zS=new Array(256),NS=new Array(256);for(In=0;In<256;In++)zS[In]=Xg(In)?1:0,NS[In]=Xg(In);var In;function qS(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||ES,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=[]}v(qS,"State$1");function yy(e,t){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=mD(i),new Oi(t,i)}v(yy,"generateError");function Lt(e,t){throw yy(e,t)}v(Lt,"throwError");function xc(e,t){e.onWarning&&e.onWarning.call(null,yy(e,t))}v(xc,"throwWarning");var G1={YAML:v(function(t,i,a){var s,l,c;t.version!==null&&Lt(t,"duplication of %YAML directive"),a.length!==1&&Lt(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(a[0]),s===null&&Lt(t,"ill-formed argument of the YAML directive"),l=parseInt(s[1],10),c=parseInt(s[2],10),l!==1&&Lt(t,"unacceptable YAML version of the document"),t.version=a[0],t.checkLineBreaks=c<2,c!==1&&c!==2&&xc(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:v(function(t,i,a){var s,l;a.length!==2&&Lt(t,"TAG directive accepts exactly two arguments"),s=a[0],l=a[1],MS.test(s)||Lt(t,"ill-formed tag handle (first argument) of the TAG directive"),mn.call(t.tagMap,s)&&Lt(t,'there is a previously declared suffix for "'+s+'" tag handle'),RS.test(l)||Lt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{l=decodeURIComponent(l)}catch{Lt(t,"tag prefix is malformed: "+l)}t.tagMap[s]=l},"handleTagDirective")};function xa(e,t,i,a){var s,l,c,h;if(t<i){if(h=e.input.slice(t,i),a)for(s=0,l=h.length;s<l;s+=1)c=h.charCodeAt(s),c===9||32<=c&&c<=1114111||Lt(e,"expected valid JSON character");else UD.test(h)&&Lt(e,"the stream contains non-printable characters");e.result+=h}}v(xa,"captureSegment");function Vg(e,t,i,a){var s,l,c,h;for(Pe.isObject(i)||Lt(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(i),c=0,h=s.length;c<h;c+=1)l=s[c],mn.call(t,l)||(my(t,l,i[l]),a[l]=!0)}v(Vg,"mergeMappings");function Vn(e,t,i,a,s,l,c,h,d){var f,p;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),f=0,p=s.length;f<p;f+=1)Array.isArray(s[f])&&Lt(e,"nested arrays are not supported inside keys"),typeof s=="object"&&Gg(s[f])==="[object Object]"&&(s[f]="[object Object]");if(typeof s=="object"&&Gg(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),a==="tag:yaml.org,2002:merge")if(Array.isArray(l))for(f=0,p=l.length;f<p;f+=1)Vg(e,t,l[f],i);else Vg(e,t,l,i);else!e.json&&!mn.call(i,s)&&mn.call(t,s)&&(e.line=c||e.line,e.lineStart=h||e.lineStart,e.position=d||e.position,Lt(e,"duplicated mapping key")),my(t,s,l),delete i[s];return t}v(Vn,"storeMappingPair");function wd(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++):Lt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}v(wd,"readLineBreak");function Me(e,t,i){for(var a=0,s=e.input.charCodeAt(e.position);s!==0;){for(;pn(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(vr(s))for(wd(e),s=e.input.charCodeAt(e.position),a++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return i!==-1&&a!==0&&e.lineIndent<i&&xc(e,"deficient indentation"),a}v(Me,"skipSeparationSpace");function Oc(e){var t=e.position,i;return i=e.input.charCodeAt(t),!!((i===45||i===46)&&i===e.input.charCodeAt(t+1)&&i===e.input.charCodeAt(t+2)&&(t+=3,i=e.input.charCodeAt(t),i===0||yi(i)))}v(Oc,"testDocumentSeparator");function _d(e,t){t===1?e.result+=" ":t>1&&(e.result+=Pe.repeat(`
216
+ `,t-1))}v(_d,"writeFoldedLines");function IS(e,t,i){var a,s,l,c,h,d,f,p,g=e.kind,x=e.result,y;if(y=e.input.charCodeAt(e.position),yi(y)||Xn(y)||y===35||y===38||y===42||y===33||y===124||y===62||y===39||y===34||y===37||y===64||y===96||(y===63||y===45)&&(s=e.input.charCodeAt(e.position+1),yi(s)||i&&Xn(s)))return!1;for(e.kind="scalar",e.result="",l=c=e.position,h=!1;y!==0;){if(y===58){if(s=e.input.charCodeAt(e.position+1),yi(s)||i&&Xn(s))break}else if(y===35){if(a=e.input.charCodeAt(e.position-1),yi(a))break}else{if(e.position===e.lineStart&&Oc(e)||i&&Xn(y))break;if(vr(y))if(d=e.line,f=e.lineStart,p=e.lineIndent,Me(e,!1,-1),e.lineIndent>=t){h=!0,y=e.input.charCodeAt(e.position);continue}else{e.position=c,e.line=d,e.lineStart=f,e.lineIndent=p;break}}h&&(xa(e,l,c,!1),_d(e,e.line-d),l=c=e.position,h=!1),pn(y)||(c=e.position+1),y=e.input.charCodeAt(++e.position)}return xa(e,l,c,!1),e.result?!0:(e.kind=g,e.result=x,!1)}v(IS,"readPlainScalar");function HS(e,t){var i,a,s;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,a=s=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(xa(e,a,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)a=e.position,e.position++,s=e.position;else return!0;else vr(i)?(xa(e,a,s,!0),_d(e,Me(e,!1,t)),a=s=e.position):e.position===e.lineStart&&Oc(e)?Lt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);Lt(e,"unexpected end of the stream within a single quoted scalar")}v(HS,"readSingleQuotedScalar");function US(e,t){var i,a,s,l,c,h;if(h=e.input.charCodeAt(e.position),h!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(h=e.input.charCodeAt(e.position))!==0;){if(h===34)return xa(e,i,e.position,!0),e.position++,!0;if(h===92){if(xa(e,i,e.position,!0),h=e.input.charCodeAt(++e.position),vr(h))Me(e,!1,t);else if(h<256&&zS[h])e.result+=NS[h],e.position++;else if((c=FS(h))>0){for(s=c,l=0;s>0;s--)h=e.input.charCodeAt(++e.position),(c=OS(h))>=0?l=(l<<4)+c:Lt(e,"expected hexadecimal character");e.result+=$S(l),e.position++}else Lt(e,"unknown escape sequence");i=a=e.position}else vr(h)?(xa(e,i,a,!0),_d(e,Me(e,!1,t)),i=a=e.position):e.position===e.lineStart&&Oc(e)?Lt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,a=e.position)}Lt(e,"unexpected end of the stream within a double quoted scalar")}v(US,"readDoubleQuotedScalar");function jS(e,t){var i=!0,a,s,l,c=e.tag,h,d=e.anchor,f,p,g,x,y,C=Object.create(null),k,S,T,_;if(_=e.input.charCodeAt(e.position),_===91)p=93,y=!1,h=[];else if(_===123)p=125,y=!0,h={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=h),_=e.input.charCodeAt(++e.position);_!==0;){if(Me(e,!0,t),_=e.input.charCodeAt(e.position),_===p)return e.position++,e.tag=c,e.anchor=d,e.kind=y?"mapping":"sequence",e.result=h,!0;i?_===44&&Lt(e,"expected the node content, but found ','"):Lt(e,"missed comma between flow collection entries"),S=k=T=null,g=x=!1,_===63&&(f=e.input.charCodeAt(e.position+1),yi(f)&&(g=x=!0,e.position++,Me(e,!0,t))),a=e.line,s=e.lineStart,l=e.position,is(e,t,Zu,!1,!0),S=e.tag,k=e.result,Me(e,!0,t),_=e.input.charCodeAt(e.position),(x||e.line===a)&&_===58&&(g=!0,_=e.input.charCodeAt(++e.position),Me(e,!0,t),is(e,t,Zu,!1,!0),T=e.result),y?Vn(e,h,C,S,k,T,a,s,l):g?h.push(Vn(e,null,C,S,k,T,a,s,l)):h.push(k),Me(e,!0,t),_=e.input.charCodeAt(e.position),_===44?(i=!0,_=e.input.charCodeAt(++e.position)):i=!1}Lt(e,"unexpected end of the stream within a flow collection")}v(jS,"readFlowCollection");function PS(e,t){var i,a,s=og,l=!1,c=!1,h=t,d=0,f=!1,p,g;if(g=e.input.charCodeAt(e.position),g===124)a=!1;else if(g===62)a=!0;else return!1;for(e.kind="scalar",e.result="";g!==0;)if(g=e.input.charCodeAt(++e.position),g===43||g===45)og===s?s=g===43?Y1:HD:Lt(e,"repeat of a chomping mode identifier");else if((p=DS(g))>=0)p===0?Lt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?Lt(e,"repeat of an indentation width identifier"):(h=t+p-1,c=!0);else break;if(pn(g)){do g=e.input.charCodeAt(++e.position);while(pn(g));if(g===35)do g=e.input.charCodeAt(++e.position);while(!vr(g)&&g!==0)}for(;g!==0;){for(wd(e),e.lineIndent=0,g=e.input.charCodeAt(e.position);(!c||e.lineIndent<h)&&g===32;)e.lineIndent++,g=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>h&&(h=e.lineIndent),vr(g)){d++;continue}if(e.lineIndent<h){s===Y1?e.result+=Pe.repeat(`
217
+ `,l?1+d:d):s===og&&l&&(e.result+=`
218
+ `);break}for(a?pn(g)?(f=!0,e.result+=Pe.repeat(`
219
+ `,l?1+d:d)):f?(f=!1,e.result+=Pe.repeat(`
220
+ `,d+1)):d===0?l&&(e.result+=" "):e.result+=Pe.repeat(`
221
+ `,d):e.result+=Pe.repeat(`
222
+ `,l?1+d:d),l=!0,c=!0,d=0,i=e.position;!vr(g)&&g!==0;)g=e.input.charCodeAt(++e.position);xa(e,i,e.position,!1)}return!0}v(PS,"readBlockScalar");function Zg(e,t){var i,a=e.tag,s=e.anchor,l=[],c,h=!1,d;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),d=e.input.charCodeAt(e.position);d!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Lt(e,"tab characters must not be used in indentation")),!(d!==45||(c=e.input.charCodeAt(e.position+1),!yi(c))));){if(h=!0,e.position++,Me(e,!0,-1)&&e.lineIndent<=t){l.push(null),d=e.input.charCodeAt(e.position);continue}if(i=e.line,is(e,t,AS,!1,!0),l.push(e.result),Me(e,!0,-1),d=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>t)&&d!==0)Lt(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return h?(e.tag=a,e.anchor=s,e.kind="sequence",e.result=l,!0):!1}v(Zg,"readBlockSequence");function WS(e,t,i){var a,s,l,c,h,d,f=e.tag,p=e.anchor,g={},x=Object.create(null),y=null,C=null,k=null,S=!1,T=!1,_;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=g),_=e.input.charCodeAt(e.position);_!==0;){if(!S&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Lt(e,"tab characters must not be used in indentation")),a=e.input.charCodeAt(e.position+1),l=e.line,(_===63||_===58)&&yi(a))_===63?(S&&(Vn(e,g,x,y,C,null,c,h,d),y=C=k=null),T=!0,S=!0,s=!0):S?(S=!1,s=!0):Lt(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,_=a;else{if(c=e.line,h=e.lineStart,d=e.position,!is(e,i,LS,!1,!0))break;if(e.line===l){for(_=e.input.charCodeAt(e.position);pn(_);)_=e.input.charCodeAt(++e.position);if(_===58)_=e.input.charCodeAt(++e.position),yi(_)||Lt(e,"a whitespace character is expected after the key-value separator within a block mapping"),S&&(Vn(e,g,x,y,C,null,c,h,d),y=C=k=null),T=!0,S=!1,s=!1,y=e.tag,C=e.result;else if(T)Lt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=f,e.anchor=p,!0}else if(T)Lt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=f,e.anchor=p,!0}if((e.line===l||e.lineIndent>t)&&(S&&(c=e.line,h=e.lineStart,d=e.position),is(e,t,Qu,!0,s)&&(S?C=e.result:k=e.result),S||(Vn(e,g,x,y,C,k,c,h,d),y=C=k=null),Me(e,!0,-1),_=e.input.charCodeAt(e.position)),(e.line===l||e.lineIndent>t)&&_!==0)Lt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return S&&Vn(e,g,x,y,C,null,c,h,d),T&&(e.tag=f,e.anchor=p,e.kind="mapping",e.result=g),T}v(WS,"readBlockMapping");function YS(e){var t,i=!1,a=!1,s,l,c;if(c=e.input.charCodeAt(e.position),c!==33)return!1;if(e.tag!==null&&Lt(e,"duplication of a tag property"),c=e.input.charCodeAt(++e.position),c===60?(i=!0,c=e.input.charCodeAt(++e.position)):c===33?(a=!0,s="!!",c=e.input.charCodeAt(++e.position)):s="!",t=e.position,i){do c=e.input.charCodeAt(++e.position);while(c!==0&&c!==62);e.position<e.length?(l=e.input.slice(t,e.position),c=e.input.charCodeAt(++e.position)):Lt(e,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!yi(c);)c===33&&(a?Lt(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),MS.test(s)||Lt(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),c=e.input.charCodeAt(++e.position);l=e.input.slice(t,e.position),PD.test(l)&&Lt(e,"tag suffix cannot contain flow indicator characters")}l&&!RS.test(l)&&Lt(e,"tag name cannot contain such characters: "+l);try{l=decodeURIComponent(l)}catch{Lt(e,"tag name is malformed: "+l)}return i?e.tag=l:mn.call(e.tagMap,s)?e.tag=e.tagMap[s]+l:s==="!"?e.tag="!"+l:s==="!!"?e.tag="tag:yaml.org,2002:"+l:Lt(e,'undeclared tag handle "'+s+'"'),!0}v(YS,"readTagProperty");function GS(e){var t,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&Lt(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!yi(i)&&!Xn(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&Lt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}v(GS,"readAnchorProperty");function XS(e){var t,i,a;if(a=e.input.charCodeAt(e.position),a!==42)return!1;for(a=e.input.charCodeAt(++e.position),t=e.position;a!==0&&!yi(a)&&!Xn(a);)a=e.input.charCodeAt(++e.position);return e.position===t&&Lt(e,"name of an alias node must contain at least one character"),i=e.input.slice(t,e.position),mn.call(e.anchorMap,i)||Lt(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],Me(e,!0,-1),!0}v(XS,"readAlias");function is(e,t,i,a,s){var l,c,h,d=1,f=!1,p=!1,g,x,y,C,k,S;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,l=c=h=Qu===i||AS===i,a&&Me(e,!0,-1)&&(f=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)),d===1)for(;YS(e)||GS(e);)Me(e,!0,-1)?(f=!0,h=l,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)):h=!1;if(h&&(h=f||s),(d===1||Qu===i)&&(Zu===i||LS===i?k=t:k=t+1,S=e.position-e.lineStart,d===1?h&&(Zg(e,S)||WS(e,S,k))||jS(e,k)?p=!0:(c&&PS(e,k)||HS(e,k)||US(e,k)?p=!0:XS(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&Lt(e,"alias node should not have any properties")):IS(e,k,Zu===i)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):d===0&&(p=h&&Zg(e,S))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Lt(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),g=0,x=e.implicitTypes.length;g<x;g+=1)if(C=e.implicitTypes[g],C.resolve(e.result)){e.result=C.construct(e.result),e.tag=C.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(mn.call(e.typeMap[e.kind||"fallback"],e.tag))C=e.typeMap[e.kind||"fallback"][e.tag];else for(C=null,y=e.typeMap.multi[e.kind||"fallback"],g=0,x=y.length;g<x;g+=1)if(e.tag.slice(0,y[g].tag.length)===y[g].tag){C=y[g];break}C||Lt(e,"unknown tag !<"+e.tag+">"),e.result!==null&&C.kind!==e.kind&&Lt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+C.kind+'", not "'+e.kind+'"'),C.resolve(e.result,e.tag)?(e.result=C.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Lt(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||p}v(is,"composeNode");function VS(e){var t=e.position,i,a,s,l=!1,c;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(c=e.input.charCodeAt(e.position))!==0&&(Me(e,!0,-1),c=e.input.charCodeAt(e.position),!(e.lineIndent>0||c!==37));){for(l=!0,c=e.input.charCodeAt(++e.position),i=e.position;c!==0&&!yi(c);)c=e.input.charCodeAt(++e.position);for(a=e.input.slice(i,e.position),s=[],a.length<1&&Lt(e,"directive name must not be less than one character in length");c!==0;){for(;pn(c);)c=e.input.charCodeAt(++e.position);if(c===35){do c=e.input.charCodeAt(++e.position);while(c!==0&&!vr(c));break}if(vr(c))break;for(i=e.position;c!==0&&!yi(c);)c=e.input.charCodeAt(++e.position);s.push(e.input.slice(i,e.position))}c!==0&&wd(e),mn.call(G1,a)?G1[a](e,a,s):xc(e,'unknown document directive "'+a+'"')}if(Me(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,Me(e,!0,-1)):l&&Lt(e,"directives end mark is expected"),is(e,e.lineIndent-1,Qu,!1,!0),Me(e,!0,-1),e.checkLineBreaks&&jD.test(e.input.slice(t,e.position))&&xc(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Oc(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Me(e,!0,-1));return}if(e.position<e.length-1)Lt(e,"end of the stream or a document separator is expected");else return}v(VS,"readDocument");function xy(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
223
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new qS(e,t),a=e.indexOf("\0");for(a!==-1&&(i.position=a,Lt(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)VS(i);return i.documents}v(xy,"loadDocuments");function WD(e,t,i){t!==null&&typeof t=="object"&&typeof i>"u"&&(i=t,t=null);var a=xy(e,i);if(typeof t!="function")return a;for(var s=0,l=a.length;s<l;s+=1)t(a[s])}v(WD,"loadAll$1");function ZS(e,t){var i=xy(e,t);if(i.length!==0){if(i.length===1)return i[0];throw new Oi("expected a single document in the stream, but found more")}}v(ZS,"load$1");var YD=ZS,GD={load:YD},QS=Object.prototype.toString,KS=Object.prototype.hasOwnProperty,by=65279,XD=9,bc=10,VD=13,ZD=32,QD=33,KD=34,Qg=35,JD=37,t6=38,e6=39,i6=42,JS=44,r6=45,Ku=58,a6=61,n6=62,s6=63,l6=64,tT=91,eT=93,o6=96,iT=123,c6=124,rT=125,ui={};ui[0]="\\0";ui[7]="\\a";ui[8]="\\b";ui[9]="\\t";ui[10]="\\n";ui[11]="\\v";ui[12]="\\f";ui[13]="\\r";ui[27]="\\e";ui[34]='\\"';ui[92]="\\\\";ui[133]="\\N";ui[160]="\\_";ui[8232]="\\L";ui[8233]="\\P";var h6=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],u6=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function aT(e,t){var i,a,s,l,c,h,d;if(t===null)return{};for(i={},a=Object.keys(t),s=0,l=a.length;s<l;s+=1)c=a[s],h=String(t[c]),c.slice(0,2)==="!!"&&(c="tag:yaml.org,2002:"+c.slice(2)),d=e.compiledTypeMap.fallback[c],d&&KS.call(d.styleAliases,h)&&(h=d.styleAliases[h]),i[c]=h;return i}v(aT,"compileStyleMap");function nT(e){var t,i,a;if(t=e.toString(16).toUpperCase(),e<=255)i="x",a=2;else if(e<=65535)i="u",a=4;else if(e<=4294967295)i="U",a=8;else throw new Oi("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+Pe.repeat("0",a-t.length)+t}v(nT,"encodeHex");var d6=1,Cc=2;function sT(e){this.schema=e.schema||ES,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Pe.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=aT(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==='"'?Cc:d6,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}v(sT,"State");function Kg(e,t){for(var i=Pe.repeat(" ",t),a=0,s=-1,l="",c,h=e.length;a<h;)s=e.indexOf(`
224
+ `,a),s===-1?(c=e.slice(a),a=h):(c=e.slice(a,s+1),a=s+1),c.length&&c!==`
225
+ `&&(l+=i),l+=c;return l}v(Kg,"indentString");function Ju(e,t){return`
226
+ `+Pe.repeat(" ",e.indent*t)}v(Ju,"generateNextLine");function lT(e,t){var i,a,s;for(i=0,a=e.implicitTypes.length;i<a;i+=1)if(s=e.implicitTypes[i],s.resolve(t))return!0;return!1}v(lT,"testImplicitResolving");function kc(e){return e===ZD||e===XD}v(kc,"isWhitespace");function Rl(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==by||65536<=e&&e<=1114111}v(Rl,"isPrintable");function Jg(e){return Rl(e)&&e!==by&&e!==VD&&e!==bc}v(Jg,"isNsCharOrWhitespace");function tm(e,t,i){var a=Jg(e),s=a&&!kc(e);return(i?a:a&&e!==JS&&e!==tT&&e!==eT&&e!==iT&&e!==rT)&&e!==Qg&&!(t===Ku&&!s)||Jg(t)&&!kc(t)&&e===Qg||t===Ku&&s}v(tm,"isPlainSafe");function oT(e){return Rl(e)&&e!==by&&!kc(e)&&e!==r6&&e!==s6&&e!==Ku&&e!==JS&&e!==tT&&e!==eT&&e!==iT&&e!==rT&&e!==Qg&&e!==t6&&e!==i6&&e!==QD&&e!==c6&&e!==a6&&e!==n6&&e!==e6&&e!==KD&&e!==JD&&e!==l6&&e!==o6}v(oT,"isPlainSafeFirst");function cT(e){return!kc(e)&&e!==Ku}v(cT,"isPlainSafeLast");function ol(e,t){var i=e.charCodeAt(t),a;return i>=55296&&i<=56319&&t+1<e.length&&(a=e.charCodeAt(t+1),a>=56320&&a<=57343)?(i-55296)*1024+a-56320+65536:i}v(ol,"codePointAt");function Cy(e){var t=/^\n* /;return t.test(e)}v(Cy,"needIndentIndicator");var hT=1,em=2,uT=3,dT=4,nl=5;function fT(e,t,i,a,s,l,c,h){var d,f=0,p=null,g=!1,x=!1,y=a!==-1,C=-1,k=oT(ol(e,0))&&cT(ol(e,e.length-1));if(t||c)for(d=0;d<e.length;f>=65536?d+=2:d++){if(f=ol(e,d),!Rl(f))return nl;k=k&&tm(f,p,h),p=f}else{for(d=0;d<e.length;f>=65536?d+=2:d++){if(f=ol(e,d),f===bc)g=!0,y&&(x=x||d-C-1>a&&e[C+1]!==" ",C=d);else if(!Rl(f))return nl;k=k&&tm(f,p,h),p=f}x=x||y&&d-C-1>a&&e[C+1]!==" "}return!g&&!x?k&&!c&&!s(e)?hT:l===Cc?nl:em:i>9&&Cy(e)?nl:c?l===Cc?nl:em:x?dT:uT}v(fT,"chooseScalarStyle");function pT(e,t,i,a,s){e.dump=(function(){if(t.length===0)return e.quotingType===Cc?'""':"''";if(!e.noCompatMode&&(h6.indexOf(t)!==-1||u6.test(t)))return e.quotingType===Cc?'"'+t+'"':"'"+t+"'";var l=e.indent*Math.max(1,i),c=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-l),h=a||e.flowLevel>-1&&i>=e.flowLevel;function d(f){return lT(e,f)}switch(v(d,"testAmbiguity"),fT(t,h,e.indent,c,d,e.quotingType,e.forceQuotes&&!a,s)){case hT:return t;case em:return"'"+t.replace(/'/g,"''")+"'";case uT:return"|"+im(t,e.indent)+rm(Kg(t,l));case dT:return">"+im(t,e.indent)+rm(Kg(gT(t,c),l));case nl:return'"'+mT(t)+'"';default:throw new Oi("impossible error: invalid scalar style")}})()}v(pT,"writeScalar");function im(e,t){var i=Cy(e)?String(t):"",a=e[e.length-1]===`
227
+ `,s=a&&(e[e.length-2]===`
228
+ `||e===`
229
+ `),l=s?"+":a?"":"-";return i+l+`
230
+ `}v(im,"blockHeader");function rm(e){return e[e.length-1]===`
231
+ `?e.slice(0,-1):e}v(rm,"dropEndingNewline");function gT(e,t){for(var i=/(\n+)([^\n]*)/g,a=(function(){var f=e.indexOf(`
232
+ `);return f=f!==-1?f:e.length,i.lastIndex=f,am(e.slice(0,f),t)})(),s=e[0]===`
233
+ `||e[0]===" ",l,c;c=i.exec(e);){var h=c[1],d=c[2];l=d[0]===" ",a+=h+(!s&&!l&&d!==""?`
234
+ `:"")+am(d,t),s=l}return a}v(gT,"foldString");function am(e,t){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,a,s=0,l,c=0,h=0,d="";a=i.exec(e);)h=a.index,h-s>t&&(l=c>s?c:h,d+=`
235
+ `+e.slice(s,l),s=l+1),c=h;return d+=`
236
+ `,e.length-s>t&&c>s?d+=e.slice(s,c)+`
237
+ `+e.slice(c+1):d+=e.slice(s),d.slice(1)}v(am,"foldLine");function mT(e){for(var t="",i=0,a,s=0;s<e.length;i>=65536?s+=2:s++)i=ol(e,s),a=ui[i],!a&&Rl(i)?(t+=e[s],i>=65536&&(t+=e[s+1])):t+=a||nT(i);return t}v(mT,"escapeString");function yT(e,t,i){var a="",s=e.tag,l,c,h;for(l=0,c=i.length;l<c;l+=1)h=i[l],e.replacer&&(h=e.replacer.call(i,String(l),h)),(jr(e,t,h,!1,!1)||typeof h>"u"&&jr(e,t,null,!1,!1))&&(a!==""&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=s,e.dump="["+a+"]"}v(yT,"writeFlowSequence");function nm(e,t,i,a){var s="",l=e.tag,c,h,d;for(c=0,h=i.length;c<h;c+=1)d=i[c],e.replacer&&(d=e.replacer.call(i,String(c),d)),(jr(e,t+1,d,!0,!0,!1,!0)||typeof d>"u"&&jr(e,t+1,null,!0,!0,!1,!0))&&((!a||s!=="")&&(s+=Ju(e,t)),e.dump&&bc===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=l,e.dump=s||"[]"}v(nm,"writeBlockSequence");function xT(e,t,i){var a="",s=e.tag,l=Object.keys(i),c,h,d,f,p;for(c=0,h=l.length;c<h;c+=1)p="",a!==""&&(p+=", "),e.condenseFlow&&(p+='"'),d=l[c],f=i[d],e.replacer&&(f=e.replacer.call(i,d,f)),jr(e,t,d,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),jr(e,t,f,!1,!1)&&(p+=e.dump,a+=p));e.tag=s,e.dump="{"+a+"}"}v(xT,"writeFlowMapping");function bT(e,t,i,a){var s="",l=e.tag,c=Object.keys(i),h,d,f,p,g,x;if(e.sortKeys===!0)c.sort();else if(typeof e.sortKeys=="function")c.sort(e.sortKeys);else if(e.sortKeys)throw new Oi("sortKeys must be a boolean or a function");for(h=0,d=c.length;h<d;h+=1)x="",(!a||s!=="")&&(x+=Ju(e,t)),f=c[h],p=i[f],e.replacer&&(p=e.replacer.call(i,f,p)),jr(e,t+1,f,!0,!0,!0)&&(g=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,g&&(e.dump&&bc===e.dump.charCodeAt(0)?x+="?":x+="? "),x+=e.dump,g&&(x+=Ju(e,t)),jr(e,t+1,p,!0,g)&&(e.dump&&bc===e.dump.charCodeAt(0)?x+=":":x+=": ",x+=e.dump,s+=x));e.tag=l,e.dump=s||"{}"}v(bT,"writeBlockMapping");function sm(e,t,i){var a,s,l,c,h,d;for(s=i?e.explicitTypes:e.implicitTypes,l=0,c=s.length;l<c;l+=1)if(h=s[l],(h.instanceOf||h.predicate)&&(!h.instanceOf||typeof t=="object"&&t instanceof h.instanceOf)&&(!h.predicate||h.predicate(t))){if(i?h.multi&&h.representName?e.tag=h.representName(t):e.tag=h.tag:e.tag="?",h.represent){if(d=e.styleMap[h.tag]||h.defaultStyle,QS.call(h.represent)==="[object Function]")a=h.represent(t,d);else if(KS.call(h.represent,d))a=h.represent[d](t,d);else throw new Oi("!<"+h.tag+'> tag resolver accepts not "'+d+'" style');e.dump=a}return!0}return!1}v(sm,"detectType");function jr(e,t,i,a,s,l,c){e.tag=null,e.dump=i,sm(e,i,!1)||sm(e,i,!0);var h=QS.call(e.dump),d=a,f;a&&(a=e.flowLevel<0||e.flowLevel>t);var p=h==="[object Object]"||h==="[object Array]",g,x;if(p&&(g=e.duplicates.indexOf(i),x=g!==-1),(e.tag!==null&&e.tag!=="?"||x||e.indent!==2&&t>0)&&(s=!1),x&&e.usedDuplicates[g])e.dump="*ref_"+g;else{if(p&&x&&!e.usedDuplicates[g]&&(e.usedDuplicates[g]=!0),h==="[object Object]")a&&Object.keys(e.dump).length!==0?(bT(e,t,e.dump,s),x&&(e.dump="&ref_"+g+e.dump)):(xT(e,t,e.dump),x&&(e.dump="&ref_"+g+" "+e.dump));else if(h==="[object Array]")a&&e.dump.length!==0?(e.noArrayIndent&&!c&&t>0?nm(e,t-1,e.dump,s):nm(e,t,e.dump,s),x&&(e.dump="&ref_"+g+e.dump)):(yT(e,t,e.dump),x&&(e.dump="&ref_"+g+" "+e.dump));else if(h==="[object String]")e.tag!=="?"&&pT(e,e.dump,t,l,d);else{if(h==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Oi("unacceptable kind of an object to dump "+h)}e.tag!==null&&e.tag!=="?"&&(f=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?f="!"+f:f.slice(0,18)==="tag:yaml.org,2002:"?f="!!"+f.slice(18):f="!<"+f+">",e.dump=f+" "+e.dump)}return!0}v(jr,"writeNode");function CT(e,t){var i=[],a=[],s,l;for(td(e,i,a),s=0,l=a.length;s<l;s+=1)t.duplicates.push(i[a[s]]);t.usedDuplicates=new Array(l)}v(CT,"getDuplicateReferences");function td(e,t,i){var a,s,l;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)i.indexOf(s)===-1&&i.push(s);else if(t.push(e),Array.isArray(e))for(s=0,l=e.length;s<l;s+=1)td(e[s],t,i);else for(a=Object.keys(e),s=0,l=a.length;s<l;s+=1)td(e[a[s]],t,i)}v(td,"inspectNode");function f6(e,t){t=t||{};var i=new sT(t);i.noRefs||CT(e,i);var a=e;return i.replacer&&(a=i.replacer.call({"":a},"",a)),jr(i,0,a,!0,!0)?i.dump+`
238
+ `:""}v(f6,"dump$1");function p6(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.")}}v(p6,"renamed");var g6=uS,m6=GD.load;var Po=v((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const i=e.x??0,a=e.y??0;return"translate("+-(i+e.width/2)+", "+-(a+e.height/2)+")"},"computeLabelTransform"),oi={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},X1={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function ic(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=ke(e),t=ke(t);const[i,a]=[e.x,e.y],[s,l]=[t.x,t.y],c=s-i,h=l-a;return{angle:Math.atan(h/c),deltaX:c,deltaY:h}}v(ic,"calculateDeltaAndAngle");var ke=v(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),y6=v(e=>({x:v(function(t,i,a){let s=0;const l=ke(a[0]).x<ke(a[a.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(oi,e.arrowTypeStart)){const{angle:y,deltaX:C}=ic(a[0],a[1]);s=oi[e.arrowTypeStart]*Math.cos(y)*(C>=0?1:-1)}else if(i===a.length-1&&Object.hasOwn(oi,e.arrowTypeEnd)){const{angle:y,deltaX:C}=ic(a[a.length-1],a[a.length-2]);s=oi[e.arrowTypeEnd]*Math.cos(y)*(C>=0?1:-1)}const c=Math.abs(ke(t).x-ke(a[a.length-1]).x),h=Math.abs(ke(t).y-ke(a[a.length-1]).y),d=Math.abs(ke(t).x-ke(a[0]).x),f=Math.abs(ke(t).y-ke(a[0]).y),p=oi[e.arrowTypeStart],g=oi[e.arrowTypeEnd],x=1;if(c<g&&c>0&&h<g){let y=g+x-c;y*=l==="right"?-1:1,s-=y}if(d<p&&d>0&&f<p){let y=p+x-d;y*=l==="right"?-1:1,s+=y}return ke(t).x+s},"x"),y:v(function(t,i,a){let s=0;const l=ke(a[0]).y<ke(a[a.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(oi,e.arrowTypeStart)){const{angle:y,deltaY:C}=ic(a[0],a[1]);s=oi[e.arrowTypeStart]*Math.abs(Math.sin(y))*(C>=0?1:-1)}else if(i===a.length-1&&Object.hasOwn(oi,e.arrowTypeEnd)){const{angle:y,deltaY:C}=ic(a[a.length-1],a[a.length-2]);s=oi[e.arrowTypeEnd]*Math.abs(Math.sin(y))*(C>=0?1:-1)}const c=Math.abs(ke(t).y-ke(a[a.length-1]).y),h=Math.abs(ke(t).x-ke(a[a.length-1]).x),d=Math.abs(ke(t).y-ke(a[0]).y),f=Math.abs(ke(t).x-ke(a[0]).x),p=oi[e.arrowTypeStart],g=oi[e.arrowTypeEnd],x=1;if(c<g&&c>0&&h<g){let y=g+x-c;y*=l==="up"?-1:1,s-=y}if(d<p&&d>0&&f<p){let y=p+x-d;y*=l==="up"?-1:1,s+=y}return ke(t).y+s},"y")}),"getLineFunctionsWithOffset"),su={},Ue={},V1;function x6(){return V1||(V1=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.BLANK_URL=Ue.relativeFirstCharacters=Ue.whitespaceEscapeCharsRegex=Ue.urlSchemeRegex=Ue.ctrlCharactersRegex=Ue.htmlCtrlEntityRegex=Ue.htmlEntitiesRegex=Ue.invalidProtocolRegex=void 0,Ue.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Ue.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Ue.htmlCtrlEntityRegex=/&(newline|tab);/gi,Ue.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Ue.urlSchemeRegex=/^.+(:|&colon;)/gim,Ue.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Ue.relativeFirstCharacters=[".","/"],Ue.BLANK_URL="about:blank"),Ue}var Z1;function b6(){if(Z1)return su;Z1=1,Object.defineProperty(su,"__esModule",{value:!0}),su.sanitizeUrl=l;var e=x6();function t(c){return e.relativeFirstCharacters.indexOf(c[0])>-1}function i(c){var h=c.replace(e.ctrlCharactersRegex,"");return h.replace(e.htmlEntitiesRegex,function(d,f){return String.fromCharCode(f)})}function a(c){return URL.canParse(c)}function s(c){try{return decodeURIComponent(c)}catch{return c}}function l(c){if(!c)return e.BLANK_URL;var h,d=s(c.trim());do d=i(d).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),d=s(d),h=d.match(e.ctrlCharactersRegex)||d.match(e.htmlEntitiesRegex)||d.match(e.htmlCtrlEntityRegex)||d.match(e.whitespaceEscapeCharsRegex);while(h&&h.length>0);var f=d;if(!f)return e.BLANK_URL;if(t(f))return f;var p=f.trimStart(),g=p.match(e.urlSchemeRegex);if(!g)return f;var x=g[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(x))return e.BLANK_URL;var y=p.replace(/\\/g,"/");if(x==="mailto:"||x.includes("://"))return y;if(x==="http:"||x==="https:"){if(!a(y))return e.BLANK_URL;var C=new URL(y);return C.protocol=C.protocol.toLowerCase(),C.hostname=C.hostname.toLowerCase(),C.toString()}return y}return su}var C6=b6();function k6(e){return Number.isSafeInteger(e)&&e>=0}function kT(e){return e!=null&&typeof e!="function"&&k6(e.length)}function v6(e){return e==="__proto__"}function ky(e){return e==null||typeof e!="object"&&typeof e!="function"}function vT(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function vy(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const S6="[object RegExp]",ST="[object String]",TT="[object Number]",wT="[object Boolean]",_T="[object Arguments]",T6="[object Symbol]",w6="[object Date]",_6="[object Map]",B6="[object Set]",E6="[object Array]",L6="[object ArrayBuffer]",BT="[object Object]",A6="[object DataView]",M6="[object Uint8Array]",R6="[object Uint8ClampedArray]",O6="[object Uint16Array]",F6="[object Uint32Array]",D6="[object Int8Array]",$6="[object Int16Array]",z6="[object Int32Array]",N6="[object Float32Array]",q6="[object Float64Array]",Q1=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();function Sy(e){return typeof Q1.Buffer<"u"&&Q1.Buffer.isBuffer(e)}function Ty(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function I6(e,t){return cl(e,void 0,e,new Map,t)}function cl(e,t,i,a=new Map,s=void 0){const l=s?.(e,t,i,a);if(l!==void 0)return l;if(ky(e))return e;if(a.has(e))return a.get(e);if(Array.isArray(e)){const c=new Array(e.length);a.set(e,c);for(let h=0;h<e.length;h++)c[h]=cl(e[h],h,i,a,s);return Object.hasOwn(e,"index")&&(c.index=e.index),Object.hasOwn(e,"input")&&(c.input=e.input),c}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const c=new RegExp(e.source,e.flags);return c.lastIndex=e.lastIndex,c}if(e instanceof Map){const c=new Map;a.set(e,c);for(const[h,d]of e)c.set(h,cl(d,h,i,a,s));return c}if(e instanceof Set){const c=new Set;a.set(e,c);for(const h of e)c.add(cl(h,void 0,i,a,s));return c}if(Sy(e))return e.subarray();if(Ty(e)){const c=new(Object.getPrototypeOf(e)).constructor(e.length);a.set(e,c);for(let h=0;h<e.length;h++)c[h]=cl(e[h],h,i,a,s);return c}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const c=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return a.set(e,c),pr(c,e,i,a,s),c}if(typeof File<"u"&&e instanceof File){const c=new File([e],e.name,{type:e.type});return a.set(e,c),pr(c,e,i,a,s),c}if(typeof Blob<"u"&&e instanceof Blob){const c=new Blob([e],{type:e.type});return a.set(e,c),pr(c,e,i,a,s),c}if(e instanceof Error){const c=structuredClone(e);return a.set(e,c),c.message=e.message,c.name=e.name,c.stack=e.stack,c.cause=e.cause,c.constructor=e.constructor,pr(c,e,i,a,s),c}if(e instanceof Boolean){const c=new Boolean(e.valueOf());return a.set(e,c),pr(c,e,i,a,s),c}if(e instanceof Number){const c=new Number(e.valueOf());return a.set(e,c),pr(c,e,i,a,s),c}if(e instanceof String){const c=new String(e.valueOf());return a.set(e,c),pr(c,e,i,a,s),c}if(typeof e=="object"&&H6(e)){const c=Object.create(Object.getPrototypeOf(e));return a.set(e,c),pr(c,e,i,a,s),c}return e}function pr(e,t,i=e,a,s){const l=[...Object.keys(t),...vT(t)];for(let c=0;c<l.length;c++){const h=l[c],d=Object.getOwnPropertyDescriptor(e,h);(d==null||d.writable)&&(e[h]=cl(t[h],h,i,a,s))}}function H6(e){switch(vy(e)){case _T:case E6:case L6:case A6:case wT:case w6:case N6:case q6:case D6:case $6:case z6:case _6:case TT:case BT:case S6:case B6:case ST:case T6:case M6:case R6:case O6:case F6:return!0;default:return!1}}function U6(e,t){return I6(e,(i,a,s,l)=>{if(typeof e=="object"){if(vy(e)===BT&&typeof e.constructor!="function"){const c={};return l.set(e,c),pr(c,e,s,l),c}switch(Object.prototype.toString.call(e)){case TT:case ST:case wT:{const c=new e.constructor(e?.valueOf());return pr(c,e),c}case _T:{const c={};return pr(c,e),c.length=e.length,c[Symbol.iterator]=e[Symbol.iterator],c}default:return}}})}function K1(e){return U6(e)}function lm(e){return e!==null&&typeof e=="object"&&vy(e)==="[object Arguments]"}function om(e){return typeof e=="object"&&e!==null}function j6(e){return om(e)&&kT(e)}function Fc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const i=function(...s){const l=t?t.apply(this,s):s[0],c=i.cache;if(c.has(l))return c.get(l);const h=e.apply(this,s);return i.cache=c.set(l,h)||c,h},a=Fc.Cache||Map;return i.cache=new a,i}Fc.Cache=Map;function P6(){}function W6(e){const t=e?.constructor,i=typeof t=="function"?t.prototype:Object.prototype;return e===i}function Tu(e){return Ty(e)}function cg(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Y6(e){if(ky(e))return e;if(Array.isArray(e)||Ty(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const i=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new i(e);if(e instanceof RegExp){const a=new i(e);return a.lastIndex=e.lastIndex,a}if(e instanceof DataView)return new i(e.buffer.slice(0));if(e instanceof Error){let a;return e instanceof AggregateError?a=new i(e.errors,e.message,{cause:e.cause}):a=new i(e.message,{cause:e.cause}),a.stack=e.stack,Object.assign(a,e),a}if(typeof File<"u"&&e instanceof File)return new i([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e=="object"){const a=Object.create(t);return Object.assign(a,e)}return e}function G6(e,...t){const i=t.slice(0,-1),a=t[t.length-1];let s=e;for(let l=0;l<i.length;l++){const c=i[l];s=wu(s,c,a,new Map)}return s}function wu(e,t,i,a){if(ky(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(a.has(t))return Y6(a.get(t));if(a.set(t,e),Array.isArray(t)){t=t.slice();for(let l=0;l<t.length;l++)t[l]=t[l]??void 0}const s=[...Object.keys(t),...vT(t)];for(let l=0;l<s.length;l++){const c=s[l];if(v6(c))continue;let h=t[c],d=e[c];if(lm(h)&&(h={...h}),lm(d)&&(d={...d}),Sy(h)&&(h=K1(h)),Array.isArray(h))if(Array.isArray(d)){const p=[],g=Reflect.ownKeys(d);for(let x=0;x<g.length;x++){const y=g[x];p[y]=d[y]}d=p}else if(j6(d)){const p=[];for(let g=0;g<d.length;g++)p[g]=d[g];d=p}else d=[];const f=i(d,h,c,e,t,a);f!==void 0?e[c]=f:Array.isArray(h)||om(d)&&om(h)&&(cg(d)||cg(h)||Tu(d)||Tu(h))?e[c]=wu(d,h,i,a):d==null&&cg(h)?e[c]=wu({},h,i,a):d==null&&Tu(h)?e[c]=K1(h):(d===void 0||h!==void 0)&&(e[c]=h)}return e}function X6(e,...t){return G6(e,...t,P6)}function J1(e){if(e==null)return!0;if(kT(e))return typeof e.splice!="function"&&typeof e!="string"&&!Sy(e)&&!Tu(e)&&!lm(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return W6(e)?t.filter(i=>i!=="constructor").length===0:t.length===0}return!0}var V6="​",Z6={curveBasis:Wg,curveBasisClosed:eD,curveBasisOpen:iD,curveBumpX:Cv,curveBumpY:kv,curveBundle:rD,curveCardinalClosed:aD,curveCardinalOpen:nD,curveCardinal:wv,curveCatmullRomClosed:sD,curveCatmullRomOpen:lD,curveCatmullRom:Bv,curveLinear:cc,curveLinearClosed:oD,curveMonotoneX:Ov,curveMonotoneY:Fv,curveNatural:$v,curveStep:zv,curveStepAfter:qv,curveStepBefore:Nv},Q6=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,K6=v(function(e,t){const i=ET(e,/(?:init\b)|(?:initialize\b)/);let a={};if(Array.isArray(i)){const c=i.map(h=>h.args);Du(c),a=je(a,[...c])}else a=i.args;if(!a)return;let s=Vm(e,t);const l="config";return a[l]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),a[s]=a[l],delete a[l]),a},"detectInit"),ET=v(function(e,t=null){try{const i=new RegExp(`[%]{2}(?![{]${Q6.source})(?=[}][%]{2}).*
239
+ `,"ig");e=e.trim().replace(i,"").replace(/'/gm,'"'),gt.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const s=[];for(;(a=lc.exec(e))!==null;)if(a.index===lc.lastIndex&&lc.lastIndex++,a&&!t||t&&a[1]?.match(t)||t&&a[2]?.match(t)){const l=a[1]?a[1]:a[2],c=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;s.push({type:l,args:c})}return s.length===0?{type:e,args:null}:s.length===1?s[0]:s}catch(i){return gt.error(`ERROR: ${i.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),J6=v(function(e){return e.replace(lc,"")},"removeDirectives"),t$=v(function(e,t){for(const[i,a]of t.entries())if(a.match(e))return i;return-1},"isSubstringInArray");function wy(e,t){if(!e)return t;const i=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Z6[i]??t}v(wy,"interpolateToCurve");function LT(e,t){const i=e.trim();if(i)return t.securityLevel!=="loose"?C6.sanitizeUrl(i):i}v(LT,"formatUrl");var e$=v((e,...t)=>{const i=e.split("."),a=i.length-1,s=i[a];let l=window;for(let c=0;c<a;c++)if(l=l[i[c]],!l){gt.error(`Function name: ${e} not found in window`);return}l[s](...t)},"runFunc");function _y(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}v(_y,"distance");function AT(e){let t,i=0;e.forEach(s=>{i+=_y(s,t),t=s});const a=i/2;return By(e,a)}v(AT,"traverseEdge");function MT(e){return e.length===1?e[0]:AT(e)}v(MT,"calcLabelPosition");var t2=v((e,t=2)=>{const i=Math.pow(10,t);return Math.round(e*i)/i},"roundNumber"),By=v((e,t)=>{let i,a=t;for(const s of e){if(i){const l=_y(s,i);if(l===0)return i;if(l<a)a-=l;else{const c=a/l;if(c<=0)return i;if(c>=1)return{x:s.x,y:s.y};if(c>0&&c<1)return{x:t2((1-c)*i.x+c*s.x,5),y:t2((1-c)*i.y+c*s.y,5)}}}i=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),i$=v((e,t,i)=>{gt.info(`our points ${JSON.stringify(t)}`),t[0]!==i&&(t=t.reverse());const s=By(t,25),l=e?10:5,c=Math.atan2(t[0].y-s.y,t[0].x-s.x),h={x:0,y:0};return h.x=Math.sin(c)*l+(t[0].x+s.x)/2,h.y=-Math.cos(c)*l+(t[0].y+s.y)/2,h},"calcCardinalityPosition");function RT(e,t,i){const a=structuredClone(i);gt.info("our points",a),t!=="start_left"&&t!=="start_right"&&a.reverse();const s=25+e,l=By(a,s),c=10+e*.5,h=Math.atan2(a[0].y-l.y,a[0].x-l.x),d={x:0,y:0};return t==="start_left"?(d.x=Math.sin(h+Math.PI)*c+(a[0].x+l.x)/2,d.y=-Math.cos(h+Math.PI)*c+(a[0].y+l.y)/2):t==="end_right"?(d.x=Math.sin(h-Math.PI)*c+(a[0].x+l.x)/2-5,d.y=-Math.cos(h-Math.PI)*c+(a[0].y+l.y)/2-5):t==="end_left"?(d.x=Math.sin(h)*c+(a[0].x+l.x)/2-5,d.y=-Math.cos(h)*c+(a[0].y+l.y)/2-5):(d.x=Math.sin(h)*c+(a[0].x+l.x)/2,d.y=-Math.cos(h)*c+(a[0].y+l.y)/2),d}v(RT,"calcTerminalLabelPosition");function OT(e){let t="",i="";for(const a of e)a!==void 0&&(a.startsWith("color:")||a.startsWith("text-align:")?i=i+a+";":t=t+a+";");return{style:t,labelStyle:i}}v(OT,"getStylesFromArray");var e2=0,r$=v(()=>(e2++,"id-"+Math.random().toString(36).substr(2,12)+"-"+e2),"generateId");function FT(e){let t="";const i="0123456789abcdef",a=i.length;for(let s=0;s<e;s++)t+=i.charAt(Math.floor(Math.random()*a));return t}v(FT,"makeRandomHex");var a$=v(e=>FT(e.length),"random"),n$=v(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"),s$=v(function(e,t){const i=t.text.replace(Ac.lineBreakRegex," "),[,a]=Bd(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",a),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const l=s.append("tspan");return l.attr("x",t.x+t.textMargin*2),l.attr("fill",t.fill),l.text(i),s},"drawSimpleText"),l$=Fc((e,t,i)=>{if(!e||(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),Ac.lineBreakRegex.test(e)))return e;const a=e.split(" ").filter(Boolean),s=[];let l="";return a.forEach((c,h)=>{const d=ka(`${c} `,i),f=ka(l,i);if(d>t){const{hyphenatedStrings:x,remainingWord:y}=o$(c,t,"-",i);s.push(l,...x),l=y}else f+d>=t?(s.push(l),l=c):l=[l,c].filter(Boolean).join(" ");h+1===a.length&&s.push(l)}),s.filter(c=>c!=="").join(i.joinWith)},(e,t,i)=>`${e}${t}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),o$=Fc((e,t,i="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);const s=[...e],l=[];let c="";return s.forEach((h,d)=>{const f=`${c}${h}`;if(ka(f,a)>=t){const g=d+1,x=s.length===g,y=`${f}${i}`;l.push(x?f:y),c=""}else c=f}),{hyphenatedStrings:l,remainingWord:c}},(e,t,i="-",a)=>`${e}${t}${i}${a.fontSize}${a.fontWeight}${a.fontFamily}`);function DT(e,t){return Ey(e,t).height}v(DT,"calculateTextHeight");function ka(e,t){return Ey(e,t).width}v(ka,"calculateTextWidth");var Ey=Fc((e,t)=>{const{fontSize:i=12,fontFamily:a="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,l]=Bd(i),c=["sans-serif",a],h=e.split(Ac.lineBreakRegex),d=[],f=Ut("body");if(!f.remove)return{width:0,height:0,lineHeight:0};const p=f.append("svg");for(const x of c){let y=0;const C={width:0,height:0,lineHeight:0};for(const k of h){const S=n$();S.text=k||V6;const T=s$(p,S).style("font-size",l).style("font-weight",s).style("font-family",x),_=(T._groups||T)[0][0].getBBox();if(_.width===0&&_.height===0)throw new Error("svg element not in render tree");C.width=Math.round(Math.max(C.width,_.width)),y=Math.round(_.height),C.height+=y,C.lineHeight=Math.round(Math.max(C.lineHeight,y))}d.push(C)}p.remove();const g=isNaN(d[1].height)||isNaN(d[1].width)||isNaN(d[1].lineHeight)||d[0].height>d[1].height&&d[0].width>d[1].width&&d[0].lineHeight>d[1].lineHeight?0:1;return d[g]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),_l,c$=(_l=class{constructor(t=!1,i){this.count=0,this.count=i?i.length:0,this.next=t?()=>this.count++:()=>Date.now()}},v(_l,"InitIDGenerator"),_l),lu,h$=v(function(e){return lu=lu||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),lu.innerHTML=e,unescape(lu.textContent)},"entityDecode");function Ly(e){return"str"in e}v(Ly,"isDetailedError");var u$=v((e,t,i,a)=>{if(!a)return;const s=e.node()?.getBBox();s&&e.append("text").text(a).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-i).attr("class",t)},"insertTitle"),Bd=v(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 Ay(e,t){return X6({},e,t)}v(Ay,"cleanAndMerge");var Cr={assignWithDepth:je,wrapLabel:l$,calculateTextHeight:DT,calculateTextWidth:ka,calculateTextDimensions:Ey,cleanAndMerge:Ay,detectInit:K6,detectDirective:ET,isSubstringInArray:t$,interpolateToCurve:wy,calcLabelPosition:MT,calcCardinalityPosition:i$,calcTerminalLabelPosition:RT,formatUrl:LT,getStylesFromArray:OT,generateId:r$,random:a$,runFunc:e$,entityDecode:h$,insertTitle:u$,isLabelCoordinateInPath:$T,parseFontSize:Bd,InitIDGenerator:c$},d$=v(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),t=t.replace(/#\w+;/g,function(i){const a=i.substring(1,i.length-1);return/^\+?\d+$/.test(a)?"fl°°"+a+"¶ß":"fl°"+a+"¶ß"}),t},"encodeEntities"),rs=v(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Y7=v((e,t,{counter:i=0,prefix:a,suffix:s},l)=>l||`${a?`${a}_`:""}${e}_${t}_${i}${s?`_${s}`:""}`,"getEdgeId");function Ge(e){return e??null}v(Ge,"handleUndefinedAttr");function $T(e,t){const i=Math.round(e.x),a=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,l=>Math.round(parseFloat(l)).toString());return s.includes(i.toString())||s.includes(a.toString())}v($T,"isLabelCoordinateInPath");var My=v(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,i=e?.subGraphTitleMargin?.bottom??0,a=t+i;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:a}},"getSubGraphTitleMargins");async function zT(e,t){const i=e.getElementsByTagName("img");if(!i||i.length===0)return;const a=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...i].map(s=>new Promise(l=>{function c(){if(s.style.display="flex",s.style.flexDirection="column",a){const h=ee().fontSize?ee().fontSize:window.getComputedStyle(document.body).fontSize,d=5,[f=Rk.fontSize]=Bd(h),p=f*d+"px";s.style.minWidth=p,s.style.maxWidth=p}else s.style.width="100%";l(s)}v(c,"setupImage"),setTimeout(()=>{s.complete&&c()}),s.addEventListener("error",c),s.addEventListener("load",c)})))}v(zT,"configureLabelImages");var f$=v(e=>{const{handDrawnSeed:t}=ee();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),ql=v(e=>{const t=p$([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),p$=v(e=>{const t=new Map;return e.forEach(i=>{const[a,s]=i.split(":");t.set(a.trim(),s?.trim())}),t},"styles2Map"),NT=v(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"),_t=v(e=>{const{stylesArray:t}=ql(e),i=[],a=[],s=[],l=[];return t.forEach(c=>{const h=c[0];NT(h)?i.push(c.join(":")+" !important"):(a.push(c.join(":")+" !important"),h.includes("stroke")&&s.push(c.join(":")+" !important"),h==="fill"&&l.push(c.join(":")+" !important"))}),{labelStyles:i.join(";"),nodeStyles:a.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:l}},"styles2String"),Tt=v((e,t)=>{const{themeVariables:i,handDrawnSeed:a}=ee(),{nodeBorder:s,mainBkg:l}=i,{stylesMap:c}=ql(e);return Object.assign({roughness:.7,fill:c.get("fill")||l,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:c.get("stroke")||s,seed:a,strokeWidth:c.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:g$(c.get("stroke-dasharray"))},t)},"userNodeOverrides"),g$=v(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const i=isNaN(t[0])?0:t[0],a=isNaN(t[1])?0:t[1];return[i,a]},"getStrokeDashArray");const m$=Object.freeze({left:0,top:0,width:16,height:16}),ed=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),qT=Object.freeze({...m$,...ed}),y$=Object.freeze({...qT,body:"",hidden:!1}),x$=Object.freeze({width:null,height:null}),b$=Object.freeze({...x$,...ed}),C$=(e,t,i,a="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;a=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const h=s.pop(),d=s.pop(),f={provider:s.length>0?s[0]:a,prefix:d,name:h};return hg(f)?f:null}const l=s[0],c=l.split("-");if(c.length>1){const h={provider:a,prefix:c.shift(),name:c.join("-")};return hg(h)?h:null}if(i&&a===""){const h={provider:a,prefix:"",name:l};return hg(h,i)?h:null}return null},hg=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function k$(e,t){const i={};!e.hFlip!=!t.hFlip&&(i.hFlip=!0),!e.vFlip!=!t.vFlip&&(i.vFlip=!0);const a=((e.rotate||0)+(t.rotate||0))%4;return a&&(i.rotate=a),i}function i2(e,t){const i=k$(e,t);for(const a in y$)a in ed?a in e&&!(a in i)&&(i[a]=ed[a]):a in t?i[a]=t[a]:a in e&&(i[a]=e[a]);return i}function v$(e,t){const i=e.icons,a=e.aliases||Object.create(null),s=Object.create(null);function l(c){if(i[c])return s[c]=[];if(!(c in s)){s[c]=null;const h=a[c]&&a[c].parent,d=h&&l(h);d&&(s[c]=[h].concat(d))}return s[c]}return(t||Object.keys(i).concat(Object.keys(a))).forEach(l),s}function r2(e,t,i){const a=e.icons,s=e.aliases||Object.create(null);let l={};function c(h){l=i2(a[h]||s[h],l)}return c(t),i.forEach(c),i2(e,l)}function S$(e,t){if(e.icons[t])return r2(e,t,[]);const i=v$(e,[t])[t];return i?r2(e,t,i):null}const T$=/(-?[0-9.]*[0-9]+[0-9.]*)/g,w$=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function a2(e,t,i){if(t===1)return e;if(i=i||100,typeof e=="number")return Math.ceil(e*t*i)/i;if(typeof e!="string")return e;const a=e.split(T$);if(a===null||!a.length)return e;const s=[];let l=a.shift(),c=w$.test(l);for(;;){if(c){const h=parseFloat(l);isNaN(h)?s.push(l):s.push(Math.ceil(h*t*i)/i)}else s.push(l);if(l=a.shift(),l===void 0)return s.join("");c=!c}}function _$(e,t="defs"){let i="";const a=e.indexOf("<"+t);for(;a>=0;){const s=e.indexOf(">",a),l=e.indexOf("</"+t);if(s===-1||l===-1)break;const c=e.indexOf(">",l);if(c===-1)break;i+=e.slice(s+1,l).trim(),e=e.slice(0,a).trim()+e.slice(c+1)}return{defs:i,content:e}}function B$(e,t){return e?"<defs>"+e+"</defs>"+t:t}function E$(e,t,i){const a=_$(e);return B$(a.defs,t+a.content+i)}const L$=e=>e==="unset"||e==="undefined"||e==="none";function A$(e,t){const i={...qT,...e},a={...b$,...t},s={left:i.left,top:i.top,width:i.width,height:i.height};let l=i.body;[i,a].forEach(k=>{const S=[],T=k.hFlip,_=k.vFlip;let E=k.rotate;T?_?E+=2:(S.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),S.push("scale(-1 1)"),s.top=s.left=0):_&&(S.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),S.push("scale(1 -1)"),s.top=s.left=0);let M;switch(E<0&&(E-=Math.floor(E/4)*4),E=E%4,E){case 1:M=s.height/2+s.top,S.unshift("rotate(90 "+M.toString()+" "+M.toString()+")");break;case 2:S.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:M=s.width/2+s.left,S.unshift("rotate(-90 "+M.toString()+" "+M.toString()+")");break}E%2===1&&(s.left!==s.top&&(M=s.left,s.left=s.top,s.top=M),s.width!==s.height&&(M=s.width,s.width=s.height,s.height=M)),S.length&&(l=E$(l,'<g transform="'+S.join(" ")+'">',"</g>"))});const c=a.width,h=a.height,d=s.width,f=s.height;let p,g;c===null?(g=h===null?"1em":h==="auto"?f:h,p=a2(g,d/f)):(p=c==="auto"?d:c,g=h===null?a2(p,f/d):h==="auto"?f:h);const x={},y=(k,S)=>{L$(S)||(x[k]=S.toString())};y("width",p),y("height",g);const C=[s.left,s.top,d,f];return x.viewBox=C.join(" "),{attributes:x,viewBox:C,body:l}}const M$=/\sid="(\S+)"/g,n2=new Map;function R$(e){e=e.replace(/[0-9]+$/,"")||"a";const t=n2.get(e)||0;return n2.set(e,t+1),t?`${e}${t}`:e}function O$(e){const t=[];let i;for(;i=M$.exec(e);)t.push(i[1]);if(!t.length)return e;const a="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const l=R$(s),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+l+a+"$3")}),e=e.replace(new RegExp(a,"g"),""),e}function F$(e,t){let i=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const a in t)i+=" "+a+'="'+t[a]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+e+"</svg>"}function Ry(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ls=Ry();function IT(e){ls=e}var hc={exec:()=>null};function ie(e,t=""){let i=typeof e=="string"?e:e.source,a={replace:(s,l)=>{let c=typeof l=="string"?l:l.source;return c=c.replace(xi.caret,"$1"),i=i.replace(s,c),a},getRegex:()=>new RegExp(i,t)};return a}var D$=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),xi={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},$$=/^(?:[ \t]*(?:\n|$))+/,z$=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,N$=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Dc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,q$=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Oy=/(?:[*+-]|\d{1,9}[.)])/,HT=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,UT=ie(HT).replace(/bull/g,Oy).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),I$=ie(HT).replace(/bull/g,Oy).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Fy=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,H$=/^[^\n]+/,Dy=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,U$=ie(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Dy).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),j$=ie(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Oy).getRegex(),Ed="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",$y=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,P$=ie("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",$y).replace("tag",Ed).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),jT=ie(Fy).replace("hr",Dc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ed).getRegex(),W$=ie(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",jT).getRegex(),zy={blockquote:W$,code:z$,def:U$,fences:N$,heading:q$,hr:Dc,html:P$,lheading:UT,list:j$,newline:$$,paragraph:jT,table:hc,text:H$},s2=ie("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Dc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ed).getRegex(),Y$={...zy,lheading:I$,table:s2,paragraph:ie(Fy).replace("hr",Dc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",s2).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ed).getRegex()},G$={...zy,html:ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",$y).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:hc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ie(Fy).replace("hr",Dc).replace("heading",` *#{1,6} *[^
240
+ ]`).replace("lheading",UT).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},X$=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,V$=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,PT=/^( {2,}|\\)\n(?!\s*$)/,Z$=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ld=/[\p{P}\p{S}]/u,Ny=/[\s\p{P}\p{S}]/u,WT=/[^\s\p{P}\p{S}]/u,Q$=ie(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ny).getRegex(),YT=/(?!~)[\p{P}\p{S}]/u,K$=/(?!~)[\s\p{P}\p{S}]/u,J$=/(?:[^\s\p{P}\p{S}]|~)/u,t8=ie(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",D$?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),GT=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,e8=ie(GT,"u").replace(/punct/g,Ld).getRegex(),i8=ie(GT,"u").replace(/punct/g,YT).getRegex(),XT="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",r8=ie(XT,"gu").replace(/notPunctSpace/g,WT).replace(/punctSpace/g,Ny).replace(/punct/g,Ld).getRegex(),a8=ie(XT,"gu").replace(/notPunctSpace/g,J$).replace(/punctSpace/g,K$).replace(/punct/g,YT).getRegex(),n8=ie("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,WT).replace(/punctSpace/g,Ny).replace(/punct/g,Ld).getRegex(),s8=ie(/\\(punct)/,"gu").replace(/punct/g,Ld).getRegex(),l8=ie(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),o8=ie($y).replace("(?:-->|$)","-->").getRegex(),c8=ie("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",o8).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),id=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,h8=ie(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",id).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),VT=ie(/^!?\[(label)\]\[(ref)\]/).replace("label",id).replace("ref",Dy).getRegex(),ZT=ie(/^!?\[(ref)\](?:\[\])?/).replace("ref",Dy).getRegex(),u8=ie("reflink|nolink(?!\\()","g").replace("reflink",VT).replace("nolink",ZT).getRegex(),l2=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,qy={_backpedal:hc,anyPunctuation:s8,autolink:l8,blockSkip:t8,br:PT,code:V$,del:hc,emStrongLDelim:e8,emStrongRDelimAst:r8,emStrongRDelimUnd:n8,escape:X$,link:h8,nolink:ZT,punctuation:Q$,reflink:VT,reflinkSearch:u8,tag:c8,text:Z$,url:hc},d8={...qy,link:ie(/^!?\[(label)\]\((.*?)\)/).replace("label",id).getRegex(),reflink:ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",id).getRegex()},cm={...qy,emStrongRDelimAst:a8,emStrongLDelim:i8,url:ie(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",l2).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ie(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",l2).getRegex()},f8={...cm,br:ie(PT).replace("{2,}","*").getRegex(),text:ie(cm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ou={normal:zy,gfm:Y$,pedantic:G$},Wo={normal:qy,gfm:cm,breaks:f8,pedantic:d8},p8={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},o2=e=>p8[e];function Nr(e,t){if(t){if(xi.escapeTest.test(e))return e.replace(xi.escapeReplace,o2)}else if(xi.escapeTestNoEncode.test(e))return e.replace(xi.escapeReplaceNoEncode,o2);return e}function c2(e){try{e=encodeURI(e).replace(xi.percentDecode,"%")}catch{return null}return e}function h2(e,t){let i=e.replace(xi.findPipe,(l,c,h)=>{let d=!1,f=c;for(;--f>=0&&h[f]==="\\";)d=!d;return d?"|":" |"}),a=i.split(xi.splitPipe),s=0;if(a[0].trim()||a.shift(),a.length>0&&!a.at(-1)?.trim()&&a.pop(),t)if(a.length>t)a.splice(t);else for(;a.length<t;)a.push("");for(;s<a.length;s++)a[s]=a[s].trim().replace(xi.slashPipe,"|");return a}function Yo(e,t,i){let a=e.length;if(a===0)return"";let s=0;for(;s<a&&e.charAt(a-s-1)===t;)s++;return e.slice(0,a-s)}function g8(e,t){if(e.indexOf(t[1])===-1)return-1;let i=0;for(let a=0;a<e.length;a++)if(e[a]==="\\")a++;else if(e[a]===t[0])i++;else if(e[a]===t[1]&&(i--,i<0))return a;return i>0?-2:-1}function u2(e,t,i,a,s){let l=t.href,c=t.title||null,h=e[1].replace(s.other.outputLinkReplace,"$1");a.state.inLink=!0;let d={type:e[0].charAt(0)==="!"?"image":"link",raw:i,href:l,title:c,text:h,tokens:a.inlineTokens(h)};return a.state.inLink=!1,d}function m8(e,t,i){let a=e.match(i.other.indentCodeCompensation);if(a===null)return t;let s=a[1];return t.split(`
241
+ `).map(l=>{let c=l.match(i.other.beginningSpace);if(c===null)return l;let[h]=c;return h.length>=s.length?l.slice(s.length):l}).join(`
242
+ `)}var rd=class{options;rules;lexer;constructor(t){this.options=t||ls}space(t){let i=this.rules.block.newline.exec(t);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(t){let i=this.rules.block.code.exec(t);if(i){let a=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?a:Yo(a,`
243
+ `)}}}fences(t){let i=this.rules.block.fences.exec(t);if(i){let a=i[0],s=m8(a,i[3]||"",this.rules);return{type:"code",raw:a,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:s}}}heading(t){let i=this.rules.block.heading.exec(t);if(i){let a=i[2].trim();if(this.rules.other.endingHash.test(a)){let s=Yo(a,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(a=s.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:a,tokens:this.lexer.inline(a)}}}hr(t){let i=this.rules.block.hr.exec(t);if(i)return{type:"hr",raw:Yo(i[0],`
244
+ `)}}blockquote(t){let i=this.rules.block.blockquote.exec(t);if(i){let a=Yo(i[0],`
245
+ `).split(`
246
+ `),s="",l="",c=[];for(;a.length>0;){let h=!1,d=[],f;for(f=0;f<a.length;f++)if(this.rules.other.blockquoteStart.test(a[f]))d.push(a[f]),h=!0;else if(!h)d.push(a[f]);else break;a=a.slice(f);let p=d.join(`
247
+ `),g=p.replace(this.rules.other.blockquoteSetextReplace,`
248
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
249
+ ${p}`:p,l=l?`${l}
250
+ ${g}`:g;let x=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(g,c,!0),this.lexer.state.top=x,a.length===0)break;let y=c.at(-1);if(y?.type==="code")break;if(y?.type==="blockquote"){let C=y,k=C.raw+`
251
+ `+a.join(`
252
+ `),S=this.blockquote(k);c[c.length-1]=S,s=s.substring(0,s.length-C.raw.length)+S.raw,l=l.substring(0,l.length-C.text.length)+S.text;break}else if(y?.type==="list"){let C=y,k=C.raw+`
253
+ `+a.join(`
254
+ `),S=this.list(k);c[c.length-1]=S,s=s.substring(0,s.length-y.raw.length)+S.raw,l=l.substring(0,l.length-C.raw.length)+S.raw,a=k.substring(c.at(-1).raw.length).split(`
255
+ `);continue}}return{type:"blockquote",raw:s,tokens:c,text:l}}}list(t){let i=this.rules.block.list.exec(t);if(i){let a=i[1].trim(),s=a.length>1,l={type:"list",raw:"",ordered:s,start:s?+a.slice(0,-1):"",loose:!1,items:[]};a=s?`\\d{1,9}\\${a.slice(-1)}`:`\\${a}`,this.options.pedantic&&(a=s?a:"[*+-]");let c=this.rules.other.listItemRegex(a),h=!1;for(;t;){let f=!1,p="",g="";if(!(i=c.exec(t))||this.rules.block.hr.test(t))break;p=i[0],t=t.substring(p.length);let x=i[2].split(`
256
+ `,1)[0].replace(this.rules.other.listReplaceTabs,_=>" ".repeat(3*_.length)),y=t.split(`
257
+ `,1)[0],C=!x.trim(),k=0;if(this.options.pedantic?(k=2,g=x.trimStart()):C?k=i[1].length+1:(k=i[2].search(this.rules.other.nonSpaceChar),k=k>4?1:k,g=x.slice(k),k+=i[1].length),C&&this.rules.other.blankLine.test(y)&&(p+=y+`
258
+ `,t=t.substring(y.length+1),f=!0),!f){let _=this.rules.other.nextBulletRegex(k),E=this.rules.other.hrRegex(k),M=this.rules.other.fencesBeginRegex(k),O=this.rules.other.headingBeginRegex(k),N=this.rules.other.htmlBeginRegex(k);for(;t;){let H=t.split(`
259
+ `,1)[0],j;if(y=H,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting," "),j=y):j=y.replace(this.rules.other.tabCharGlobal," "),M.test(y)||O.test(y)||N.test(y)||_.test(y)||E.test(y))break;if(j.search(this.rules.other.nonSpaceChar)>=k||!y.trim())g+=`
260
+ `+j.slice(k);else{if(C||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||M.test(x)||O.test(x)||E.test(x))break;g+=`
261
+ `+y}!C&&!y.trim()&&(C=!0),p+=H+`
262
+ `,t=t.substring(H.length+1),x=j.slice(k)}}l.loose||(h?l.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(h=!0));let S=null,T;this.options.gfm&&(S=this.rules.other.listIsTask.exec(g),S&&(T=S[0]!=="[ ] ",g=g.replace(this.rules.other.listReplaceTask,""))),l.items.push({type:"list_item",raw:p,task:!!S,checked:T,loose:!1,text:g,tokens:[]}),l.raw+=p}let d=l.items.at(-1);if(d)d.raw=d.raw.trimEnd(),d.text=d.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let f=0;f<l.items.length;f++)if(this.lexer.state.top=!1,l.items[f].tokens=this.lexer.blockTokens(l.items[f].text,[]),!l.loose){let p=l.items[f].tokens.filter(x=>x.type==="space"),g=p.length>0&&p.some(x=>this.rules.other.anyLine.test(x.raw));l.loose=g}if(l.loose)for(let f=0;f<l.items.length;f++)l.items[f].loose=!0;return l}}html(t){let i=this.rules.block.html.exec(t);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(t){let i=this.rules.block.def.exec(t);if(i){let a=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",l=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:a,raw:i[0],href:s,title:l}}}table(t){let i=this.rules.block.table.exec(t);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let a=h2(i[1]),s=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=i[3]?.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
263
+ `):[],c={type:"table",raw:i[0],header:[],align:[],rows:[]};if(a.length===s.length){for(let h of s)this.rules.other.tableAlignRight.test(h)?c.align.push("right"):this.rules.other.tableAlignCenter.test(h)?c.align.push("center"):this.rules.other.tableAlignLeft.test(h)?c.align.push("left"):c.align.push(null);for(let h=0;h<a.length;h++)c.header.push({text:a[h],tokens:this.lexer.inline(a[h]),header:!0,align:c.align[h]});for(let h of l)c.rows.push(h2(h,c.header.length).map((d,f)=>({text:d,tokens:this.lexer.inline(d),header:!1,align:c.align[f]})));return c}}lheading(t){let i=this.rules.block.lheading.exec(t);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(t){let i=this.rules.block.paragraph.exec(t);if(i){let a=i[1].charAt(i[1].length-1)===`
264
+ `?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:a,tokens:this.lexer.inline(a)}}}text(t){let i=this.rules.block.text.exec(t);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(t){let i=this.rules.inline.escape.exec(t);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(t){let i=this.rules.inline.tag.exec(t);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(t){let i=this.rules.inline.link.exec(t);if(i){let a=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(a)){if(!this.rules.other.endAngleBracket.test(a))return;let c=Yo(a.slice(0,-1),"\\");if((a.length-c.length)%2===0)return}else{let c=g8(i[2],"()");if(c===-2)return;if(c>-1){let h=(i[0].indexOf("!")===0?5:4)+i[1].length+c;i[2]=i[2].substring(0,c),i[0]=i[0].substring(0,h).trim(),i[3]=""}}let s=i[2],l="";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(s);c&&(s=c[1],l=c[3])}else l=i[3]?i[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(a)?s=s.slice(1):s=s.slice(1,-1)),u2(i,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:l&&l.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(t,i){let a;if((a=this.rules.inline.reflink.exec(t))||(a=this.rules.inline.nolink.exec(t))){let s=(a[2]||a[1]).replace(this.rules.other.multipleSpaceGlobal," "),l=i[s.toLowerCase()];if(!l){let c=a[0].charAt(0);return{type:"text",raw:c,text:c}}return u2(a,l,a[0],this.lexer,this.rules)}}emStrong(t,i,a=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&a.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!a||this.rules.inline.punctuation.exec(a))){let l=[...s[0]].length-1,c,h,d=l,f=0,p=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,i=i.slice(-1*t.length+l);(s=p.exec(i))!=null;){if(c=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!c)continue;if(h=[...c].length,s[3]||s[4]){d+=h;continue}else if((s[5]||s[6])&&l%3&&!((l+h)%3)){f+=h;continue}if(d-=h,d>0)continue;h=Math.min(h,h+d+f);let g=[...s[0]][0].length,x=t.slice(0,l+s.index+g+h);if(Math.min(l,h)%2){let C=x.slice(1,-1);return{type:"em",raw:x,text:C,tokens:this.lexer.inlineTokens(C)}}let y=x.slice(2,-2);return{type:"strong",raw:x,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(t){let i=this.rules.inline.code.exec(t);if(i){let a=i[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(a),l=this.rules.other.startingSpaceChar.test(a)&&this.rules.other.endingSpaceChar.test(a);return s&&l&&(a=a.substring(1,a.length-1)),{type:"codespan",raw:i[0],text:a}}}br(t){let i=this.rules.inline.br.exec(t);if(i)return{type:"br",raw:i[0]}}del(t){let i=this.rules.inline.del.exec(t);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(t){let i=this.rules.inline.autolink.exec(t);if(i){let a,s;return i[2]==="@"?(a=i[1],s="mailto:"+a):(a=i[1],s=a),{type:"link",raw:i[0],text:a,href:s,tokens:[{type:"text",raw:a,text:a}]}}}url(t){let i;if(i=this.rules.inline.url.exec(t)){let a,s;if(i[2]==="@")a=i[0],s="mailto:"+a;else{let l;do l=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])?.[0]??"";while(l!==i[0]);a=i[0],i[1]==="www."?s="http://"+i[0]:s=i[0]}return{type:"link",raw:i[0],text:a,href:s,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(t){let i=this.rules.inline.text.exec(t);if(i){let a=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:a}}}},yr=class hm{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ls,this.options.tokenizer=this.options.tokenizer||new rd,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let i={other:xi,block:ou.normal,inline:Wo.normal};this.options.pedantic?(i.block=ou.pedantic,i.inline=Wo.pedantic):this.options.gfm&&(i.block=ou.gfm,this.options.breaks?i.inline=Wo.breaks:i.inline=Wo.gfm),this.tokenizer.rules=i}static get rules(){return{block:ou,inline:Wo}}static lex(t,i){return new hm(i).lex(t)}static lexInline(t,i){return new hm(i).inlineTokens(t)}lex(t){t=t.replace(xi.carriageReturn,`
265
+ `),this.blockTokens(t,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let a=this.inlineQueue[i];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,i=[],a=!1){for(this.options.pedantic&&(t=t.replace(xi.tabCharGlobal," ").replace(xi.spaceLine,""));t;){let s;if(this.options.extensions?.block?.some(c=>(s=c.call({lexer:this},t,i))?(t=t.substring(s.raw.length),i.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let c=i.at(-1);s.raw.length===1&&c!==void 0?c.raw+=`
266
+ `:i.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let c=i.at(-1);c?.type==="paragraph"||c?.type==="text"?(c.raw+=(c.raw.endsWith(`
267
+ `)?"":`
268
+ `)+s.raw,c.text+=`
269
+ `+s.text,this.inlineQueue.at(-1).src=c.text):i.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),i.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),i.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),i.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),i.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),i.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),i.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let c=i.at(-1);c?.type==="paragraph"||c?.type==="text"?(c.raw+=(c.raw.endsWith(`
270
+ `)?"":`
271
+ `)+s.raw,c.text+=`
272
+ `+s.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},i.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),i.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),i.push(s);continue}let l=t;if(this.options.extensions?.startBlock){let c=1/0,h=t.slice(1),d;this.options.extensions.startBlock.forEach(f=>{d=f.call({lexer:this},h),typeof d=="number"&&d>=0&&(c=Math.min(c,d))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(this.state.top&&(s=this.tokenizer.paragraph(l))){let c=i.at(-1);a&&c?.type==="paragraph"?(c.raw+=(c.raw.endsWith(`
273
+ `)?"":`
274
+ `)+s.raw,c.text+=`
275
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):i.push(s),a=l.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let c=i.at(-1);c?.type==="text"?(c.raw+=(c.raw.endsWith(`
276
+ `)?"":`
277
+ `)+s.raw,c.text+=`
278
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):i.push(s);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,i}inline(t,i=[]){return this.inlineQueue.push({src:t,tokens:i}),i}inlineTokens(t,i=[]){let a=t,s=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)d.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,s.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let l;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)l=s[2]?s[2].length:0,a=a.slice(0,s.index+l)+"["+"a".repeat(s[0].length-l-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);a=this.options.hooks?.emStrongMask?.call({lexer:this},a)??a;let c=!1,h="";for(;t;){c||(h=""),c=!1;let d;if(this.options.extensions?.inline?.some(p=>(d=p.call({lexer:this},t,i))?(t=t.substring(d.raw.length),i.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let p=i.at(-1);d.type==="text"&&p?.type==="text"?(p.raw+=d.raw,p.text+=d.text):i.push(d);continue}if(d=this.tokenizer.emStrong(t,a,h)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),i.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),i.push(d);continue}let f=t;if(this.options.extensions?.startInline){let p=1/0,g=t.slice(1),x;this.options.extensions.startInline.forEach(y=>{x=y.call({lexer:this},g),typeof x=="number"&&x>=0&&(p=Math.min(p,x))}),p<1/0&&p>=0&&(f=t.substring(0,p+1))}if(d=this.tokenizer.inlineText(f)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(h=d.raw.slice(-1)),c=!0;let p=i.at(-1);p?.type==="text"?(p.raw+=d.raw,p.text+=d.text):i.push(d);continue}if(t){let p="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return i}},ad=class{options;parser;constructor(t){this.options=t||ls}space(t){return""}code({text:t,lang:i,escaped:a}){let s=(i||"").match(xi.notSpaceStart)?.[0],l=t.replace(xi.endingNewline,"")+`
279
+ `;return s?'<pre><code class="language-'+Nr(s)+'">'+(a?l:Nr(l,!0))+`</code></pre>
280
+ `:"<pre><code>"+(a?l:Nr(l,!0))+`</code></pre>
281
+ `}blockquote({tokens:t}){return`<blockquote>
282
+ ${this.parser.parse(t)}</blockquote>
283
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:i}){return`<h${i}>${this.parser.parseInline(t)}</h${i}>
284
+ `}hr(t){return`<hr>
285
+ `}list(t){let i=t.ordered,a=t.start,s="";for(let h=0;h<t.items.length;h++){let d=t.items[h];s+=this.listitem(d)}let l=i?"ol":"ul",c=i&&a!==1?' start="'+a+'"':"";return"<"+l+c+`>
286
+ `+s+"</"+l+`>
287
+ `}listitem(t){let i="";if(t.task){let a=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=a+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=a+" "+Nr(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):i+=a+" "}return i+=this.parser.parse(t.tokens,!!t.loose),`<li>${i}</li>
288
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
289
+ `}table(t){let i="",a="";for(let l=0;l<t.header.length;l++)a+=this.tablecell(t.header[l]);i+=this.tablerow({text:a});let s="";for(let l=0;l<t.rows.length;l++){let c=t.rows[l];a="";for(let h=0;h<c.length;h++)a+=this.tablecell(c[h]);s+=this.tablerow({text:a})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
290
+ <thead>
291
+ `+i+`</thead>
292
+ `+s+`</table>
293
+ `}tablerow({text:t}){return`<tr>
294
+ ${t}</tr>
295
+ `}tablecell(t){let i=this.parser.parseInline(t.tokens),a=t.header?"th":"td";return(t.align?`<${a} align="${t.align}">`:`<${a}>`)+i+`</${a}>
296
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Nr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:i,tokens:a}){let s=this.parser.parseInline(a),l=c2(t);if(l===null)return s;t=l;let c='<a href="'+t+'"';return i&&(c+=' title="'+Nr(i)+'"'),c+=">"+s+"</a>",c}image({href:t,title:i,text:a,tokens:s}){s&&(a=this.parser.parseInline(s,this.parser.textRenderer));let l=c2(t);if(l===null)return Nr(a);t=l;let c=`<img src="${t}" alt="${a}"`;return i&&(c+=` title="${Nr(i)}"`),c+=">",c}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Nr(t.text)}},Iy=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},xr=class um{options;renderer;textRenderer;constructor(t){this.options=t||ls,this.options.renderer=this.options.renderer||new ad,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Iy}static parse(t,i){return new um(i).parse(t)}static parseInline(t,i){return new um(i).parseInline(t)}parse(t,i=!0){let a="";for(let s=0;s<t.length;s++){let l=t[s];if(this.options.extensions?.renderers?.[l.type]){let h=l,d=this.options.extensions.renderers[h.type].call({parser:this},h);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){a+=d||"";continue}}let c=l;switch(c.type){case"space":{a+=this.renderer.space(c);continue}case"hr":{a+=this.renderer.hr(c);continue}case"heading":{a+=this.renderer.heading(c);continue}case"code":{a+=this.renderer.code(c);continue}case"table":{a+=this.renderer.table(c);continue}case"blockquote":{a+=this.renderer.blockquote(c);continue}case"list":{a+=this.renderer.list(c);continue}case"html":{a+=this.renderer.html(c);continue}case"def":{a+=this.renderer.def(c);continue}case"paragraph":{a+=this.renderer.paragraph(c);continue}case"text":{let h=c,d=this.renderer.text(h);for(;s+1<t.length&&t[s+1].type==="text";)h=t[++s],d+=`
297
+ `+this.renderer.text(h);i?a+=this.renderer.paragraph({type:"paragraph",raw:d,text:d,tokens:[{type:"text",raw:d,text:d,escaped:!0}]}):a+=d;continue}default:{let h='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return a}parseInline(t,i=this.renderer){let a="";for(let s=0;s<t.length;s++){let l=t[s];if(this.options.extensions?.renderers?.[l.type]){let h=this.options.extensions.renderers[l.type].call({parser:this},l);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){a+=h||"";continue}}let c=l;switch(c.type){case"escape":{a+=i.text(c);break}case"html":{a+=i.html(c);break}case"link":{a+=i.link(c);break}case"image":{a+=i.image(c);break}case"strong":{a+=i.strong(c);break}case"em":{a+=i.em(c);break}case"codespan":{a+=i.codespan(c);break}case"br":{a+=i.br(c);break}case"del":{a+=i.del(c);break}case"text":{a+=i.text(c);break}default:{let h='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return a}},rc=class{options;block;constructor(t){this.options=t||ls}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?yr.lex:yr.lexInline}provideParser(){return this.block?xr.parse:xr.parseInline}},y8=class{defaults=Ry();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=xr;Renderer=ad;TextRenderer=Iy;Lexer=yr;Tokenizer=rd;Hooks=rc;constructor(...t){this.use(...t)}walkTokens(t,i){let a=[];for(let s of t)switch(a=a.concat(i.call(this,s)),s.type){case"table":{let l=s;for(let c of l.header)a=a.concat(this.walkTokens(c.tokens,i));for(let c of l.rows)for(let h of c)a=a.concat(this.walkTokens(h.tokens,i));break}case"list":{let l=s;a=a.concat(this.walkTokens(l.items,i));break}default:{let l=s;this.defaults.extensions?.childTokens?.[l.type]?this.defaults.extensions.childTokens[l.type].forEach(c=>{let h=l[c].flat(1/0);a=a.concat(this.walkTokens(h,i))}):l.tokens&&(a=a.concat(this.walkTokens(l.tokens,i)))}}return a}use(...t){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(a=>{let s={...a};if(s.async=this.defaults.async||s.async||!1,a.extensions&&(a.extensions.forEach(l=>{if(!l.name)throw new Error("extension name required");if("renderer"in l){let c=i.renderers[l.name];c?i.renderers[l.name]=function(...h){let d=l.renderer.apply(this,h);return d===!1&&(d=c.apply(this,h)),d}:i.renderers[l.name]=l.renderer}if("tokenizer"in l){if(!l.level||l.level!=="block"&&l.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let c=i[l.level];c?c.unshift(l.tokenizer):i[l.level]=[l.tokenizer],l.start&&(l.level==="block"?i.startBlock?i.startBlock.push(l.start):i.startBlock=[l.start]:l.level==="inline"&&(i.startInline?i.startInline.push(l.start):i.startInline=[l.start]))}"childTokens"in l&&l.childTokens&&(i.childTokens[l.name]=l.childTokens)}),s.extensions=i),a.renderer){let l=this.defaults.renderer||new ad(this.defaults);for(let c in a.renderer){if(!(c in l))throw new Error(`renderer '${c}' does not exist`);if(["options","parser"].includes(c))continue;let h=c,d=a.renderer[h],f=l[h];l[h]=(...p)=>{let g=d.apply(l,p);return g===!1&&(g=f.apply(l,p)),g||""}}s.renderer=l}if(a.tokenizer){let l=this.defaults.tokenizer||new rd(this.defaults);for(let c in a.tokenizer){if(!(c in l))throw new Error(`tokenizer '${c}' does not exist`);if(["options","rules","lexer"].includes(c))continue;let h=c,d=a.tokenizer[h],f=l[h];l[h]=(...p)=>{let g=d.apply(l,p);return g===!1&&(g=f.apply(l,p)),g}}s.tokenizer=l}if(a.hooks){let l=this.defaults.hooks||new rc;for(let c in a.hooks){if(!(c in l))throw new Error(`hook '${c}' does not exist`);if(["options","block"].includes(c))continue;let h=c,d=a.hooks[h],f=l[h];rc.passThroughHooks.has(c)?l[h]=p=>{if(this.defaults.async&&rc.passThroughHooksRespectAsync.has(c))return(async()=>{let x=await d.call(l,p);return f.call(l,x)})();let g=d.call(l,p);return f.call(l,g)}:l[h]=(...p)=>{if(this.defaults.async)return(async()=>{let x=await d.apply(l,p);return x===!1&&(x=await f.apply(l,p)),x})();let g=d.apply(l,p);return g===!1&&(g=f.apply(l,p)),g}}s.hooks=l}if(a.walkTokens){let l=this.defaults.walkTokens,c=a.walkTokens;s.walkTokens=function(h){let d=[];return d.push(c.call(this,h)),l&&(d=d.concat(l.call(this,h))),d}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,i){return yr.lex(t,i??this.defaults)}parser(t,i){return xr.parse(t,i??this.defaults)}parseMarkdown(t){return(i,a)=>{let s={...a},l={...this.defaults,...s},c=this.onError(!!l.silent,!!l.async);if(this.defaults.async===!0&&s.async===!1)return c(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(l.hooks&&(l.hooks.options=l,l.hooks.block=t),l.async)return(async()=>{let h=l.hooks?await l.hooks.preprocess(i):i,d=await(l.hooks?await l.hooks.provideLexer():t?yr.lex:yr.lexInline)(h,l),f=l.hooks?await l.hooks.processAllTokens(d):d;l.walkTokens&&await Promise.all(this.walkTokens(f,l.walkTokens));let p=await(l.hooks?await l.hooks.provideParser():t?xr.parse:xr.parseInline)(f,l);return l.hooks?await l.hooks.postprocess(p):p})().catch(c);try{l.hooks&&(i=l.hooks.preprocess(i));let h=(l.hooks?l.hooks.provideLexer():t?yr.lex:yr.lexInline)(i,l);l.hooks&&(h=l.hooks.processAllTokens(h)),l.walkTokens&&this.walkTokens(h,l.walkTokens);let d=(l.hooks?l.hooks.provideParser():t?xr.parse:xr.parseInline)(h,l);return l.hooks&&(d=l.hooks.postprocess(d)),d}catch(h){return c(h)}}}onError(t,i){return a=>{if(a.message+=`
298
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Nr(a.message+"",!0)+"</pre>";return i?Promise.resolve(s):s}if(i)return Promise.reject(a);throw a}}},as=new y8;function le(e,t){return as.parse(e,t)}le.options=le.setOptions=function(e){return as.setOptions(e),le.defaults=as.defaults,IT(le.defaults),le};le.getDefaults=Ry;le.defaults=ls;le.use=function(...e){return as.use(...e),le.defaults=as.defaults,IT(le.defaults),le};le.walkTokens=function(e,t){return as.walkTokens(e,t)};le.parseInline=as.parseInline;le.Parser=xr;le.parser=xr.parse;le.Renderer=ad;le.TextRenderer=Iy;le.Lexer=yr;le.lexer=yr.lex;le.Tokenizer=rd;le.Hooks=rc;le.parse=le;le.options;le.setOptions;le.use;le.walkTokens;le.parseInline;xr.parse;yr.lex;function QT(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var a=Array.from(typeof e=="string"?[e]:e);a[a.length-1]=a[a.length-1].replace(/\r?\n([\t ]*)$/,"");var s=a.reduce(function(h,d){var f=d.match(/\n([\t ]+|(?!\s).)/g);return f?h.concat(f.map(function(p){var g,x;return(x=(g=p.match(/[\t ]/g))===null||g===void 0?void 0:g.length)!==null&&x!==void 0?x:0})):h},[]);if(s.length){var l=new RegExp(`
299
+ [ ]{`+Math.min.apply(Math,s)+"}","g");a=a.map(function(h){return h.replace(l,`
300
+ `)})}a[0]=a[0].replace(/^\r?\n/,"");var c=a[0];return t.forEach(function(h,d){var f=c.match(/(?:^|\n)( *)$/),p=f?f[1]:"",g=h;typeof h=="string"&&h.includes(`
301
+ `)&&(g=String(h).split(`
302
+ `).map(function(x,y){return y===0?x:""+p+x}).join(`
303
+ `)),c+=g+a[d+1]}),c}var x8={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},dm=new Map,KT=new Map,b8=v(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(gt.debug("Registering icon pack:",t.name),"loader"in t)KT.set(t.name,t.loader);else if("icons"in t)dm.set(t.name,t.icons);else throw gt.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),JT=v(async(e,t)=>{const i=C$(e,!0,t!==void 0);if(!i)throw new Error(`Invalid icon name: ${e}`);const a=i.prefix||t;if(!a)throw new Error(`Icon name must contain a prefix: ${e}`);let s=dm.get(a);if(!s){const c=KT.get(a);if(!c)throw new Error(`Icon set not found: ${i.prefix}`);try{s={...await c(),prefix:a},dm.set(a,s)}catch(h){throw gt.error(h),new Error(`Failed to load icon set: ${i.prefix}`)}}const l=S$(s,i.name);if(!l)throw new Error(`Icon not found: ${e}`);return l},"getRegisteredIconData"),C8=v(async e=>{try{return await JT(e),!0}catch{return!1}},"isIconAvailable"),$c=v(async(e,t,i)=>{let a;try{a=await JT(e,t?.fallbackPrefix)}catch(c){gt.error(c),a=x8}const s=A$(a,t),l=F$(O$(s.body),{...s.attributes,...i});return wr(l,Te())},"getIconSVG");function tw(e,{markdownAutoWrap:t}){const a=e.replace(/<br\/>/g,`
304
+ `).replace(/\n{2,}/g,`
305
+ `);return QT(a)}v(tw,"preprocessMarkdown");function ew(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(i=>({content:i,type:"normal"}))??[])}v(ew,"nonMarkdownToLines");function iw(e,t={}){const i=tw(e,t),a=le.lexer(i),s=[[]];let l=0;function c(h,d="normal"){h.type==="text"?h.text.split(`
306
+ `).forEach((p,g)=>{g!==0&&(l++,s.push([])),p.split(" ").forEach(x=>{x=x.replace(/&#39;/g,"'"),x&&s[l].push({content:x,type:d})})}):h.type==="strong"||h.type==="em"?h.tokens.forEach(f=>{c(f,h.type)}):h.type==="html"&&s[l].push({content:h.text,type:"normal"})}return v(c,"processNode"),a.forEach(h=>{h.type==="paragraph"?h.tokens?.forEach(d=>{c(d)}):h.type==="html"?s[l].push({content:h.text,type:"normal"}):s[l].push({content:h.raw,type:"normal"})}),s}v(iw,"markdownToLines");function rw(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}v(rw,"nonMarkdownToHTML");function aw(e,{markdownAutoWrap:t}={}){const i=le.lexer(e);function a(s){return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${s.tokens?.map(a).join("")}</strong>`:s.type==="em"?`<em>${s.tokens?.map(a).join("")}</em>`:s.type==="paragraph"?`<p>${s.tokens?.map(a).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(gt.warn(`Unsupported markdown: ${s.type}`),s.raw)}return v(a,"output"),i.map(a).join("")}v(aw,"markdownToHTML");function nw(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}v(nw,"splitTextToChars");function sw(e,t){const i=nw(t.content);return Hy(e,[],i,t.type)}v(sw,"splitWordToFitWidth");function Hy(e,t,i,a){if(i.length===0)return[{content:t.join(""),type:a},{content:"",type:a}];const[s,...l]=i,c=[...t,s];return e([{content:c.join(""),type:a}])?Hy(e,c,l,a):(t.length===0&&s&&(t.push(s),i.shift()),[{content:t.join(""),type:a},{content:i.join(""),type:a}])}v(Hy,"splitWordToFitWidthRecursion");function lw(e,t){if(e.some(({content:i})=>i.includes(`
307
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return nd(e,t)}v(lw,"splitLineToFitWidth");function nd(e,t,i=[],a=[]){if(e.length===0)return a.length>0&&i.push(a),i.length>0?i:[];let s="";e[0].content===" "&&(s=" ",e.shift());const l=e.shift()??{content:" ",type:"normal"},c=[...a];if(s!==""&&c.push({content:s,type:"normal"}),c.push(l),t(c))return nd(e,t,i,c);if(a.length>0)i.push(a),e.unshift(l);else if(l.content){const[h,d]=sw(t,l);i.push([h]),d.content&&e.unshift(d)}return nd(e,t,i)}v(nd,"splitLineToFitWidthRecursion");function fm(e,t){t&&e.attr("style",t)}v(fm,"applyStyle");var d2=16384;async function ow(e,t,i,a,s=!1,l=Te()){const c=e.append("foreignObject");c.attr("width",`${Math.min(10*i,d2)}px`),c.attr("height",`${Math.min(10*i,d2)}px`);const h=c.append("xhtml:div"),d=fc(t.label)?await Uk(t.label.replace(Ac.lineBreakRegex,`
308
+ `),l):wr(t.label,l),f=t.isNode?"nodeLabel":"edgeLabel",p=h.append("span");p.html(d),fm(p,t.labelStyle),p.attr("class",`${f} ${a}`),fm(h,t.labelStyle),h.style("display","table-cell"),h.style("white-space","nowrap"),h.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY&&(h.style("max-width",i+"px"),h.style("text-align","center")),h.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&h.attr("class","labelBkg");let g=h.node().getBoundingClientRect();return g.width===i&&(h.style("display","table"),h.style("white-space","break-spaces"),h.style("width",i+"px"),g=h.node().getBoundingClientRect()),c.node()}v(ow,"addHtmlSpan");function Ad(e,t,i,a=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*i-.1+"em").attr("dy",i+"em");return a&&s.attr("text-anchor","middle"),s}v(Ad,"createTspan");function cw(e,t,i){const a=e.append("text"),s=Ad(a,1,t);Md(s,i);const l=s.node().getComputedTextLength();return a.remove(),l}v(cw,"computeWidthOfText");function k8(e,t,i){const a=e.append("text"),s=Ad(a,1,t);Md(s,[{content:i,type:"normal"}]);const l=s.node()?.getBoundingClientRect();return l&&a.remove(),l}v(k8,"computeDimensionOfText");function hw(e,t,i,a=!1,s=!1){const c=t.append("g"),h=c.insert("rect").attr("class","background").attr("style","stroke: none"),d=c.append("text").attr("y","-10.1");s&&d.attr("text-anchor","middle");let f=0;for(const p of i){const g=v(y=>cw(c,1.1,y)<=e,"checkWidth"),x=g(p)?[p]:lw(p,g);for(const y of x){const C=Ad(d,f,1.1,s);Md(C,y),f++}}if(a){const p=d.node().getBBox(),g=2;return h.attr("x",p.x-g).attr("y",p.y-g).attr("width",p.width+2*g).attr("height",p.height+2*g),c.node()}else return d.node()}v(hw,"createFormattedText");function pm(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(i,a)=>{switch(a){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return i}})}v(pm,"decodeHTMLEntities");function Md(e,t){e.text(""),t.forEach((i,a)=>{const s=e.append("tspan").attr("font-style",i.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",i.type==="strong"?"bold":"normal");a===0?s.text(pm(i.content)):s.text(" "+pm(i.content))})}v(Md,"updateTextContentAndStyles");async function uw(e,t={}){const i=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,l,c)=>(i.push((async()=>{const h=`${l}:${c}`;return await C8(h)?await $c(h,void 0,{class:"label-icon"}):`<i class='${wr(s,t).replace(":"," ")}'></i>`})()),s));const a=await Promise.all(i);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>a.shift()??"")}v(uw,"replaceIconSubstring");var Ta=v(async(e,t="",{style:i="",isTitle:a=!1,classes:s="",useHtmlLabels:l=!0,markdown:c=!0,isNode:h=!0,width:d=200,addSvgBackground:f=!1}={},p)=>{if(gt.debug("XYZ createText",t,i,a,s,l,h,"addSvgBackground: ",f),l){const g=c?aw(t,p):rw(t),x=await uw(rs(g),p),y=t.replace(/\\\\/g,"\\"),C={isNode:h,label:fc(t)?y:x,labelStyle:i.replace("fill:","color:")};return await ow(e,C,d,s,f,p)}else{const g=rs(t.replace(/<br\s*\/?>/g,"<br/>")),x=c?iw(g.replace("<br>","<br/>"),p):ew(g),y=hw(d,e,x,t?f:!1,!h);if(h){/stroke:/.exec(i)&&(i=i.replace("stroke:","lineColor:"));const C=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Ut(y).attr("style",C)}else{const C=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Ut(y).select("rect").attr("style",C.replace(/background:/g,"fill:"));const k=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Ut(y).select("text").attr("style",k)}return a?Ut(y).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Ut(y).selectAll("tspan.text-outer-tspan").classed("row",!0),y}},"createText");function ug(e,t,i){if(e&&e.length){const[a,s]=t,l=Math.PI/180*i,c=Math.cos(l),h=Math.sin(l);for(const d of e){const[f,p]=d;d[0]=(f-a)*c-(p-s)*h+a,d[1]=(f-a)*h+(p-s)*c+s}}}function v8(e,t){return e[0]===t[0]&&e[1]===t[1]}function S8(e,t,i,a=1){const s=i,l=Math.max(t,.1),c=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,h=[0,0];if(s)for(const f of c)ug(f,h,s);const d=(function(f,p,g){const x=[];for(const _ of f){const E=[..._];v8(E[0],E[E.length-1])||E.push([E[0][0],E[0][1]]),E.length>2&&x.push(E)}const y=[];p=Math.max(p,.1);const C=[];for(const _ of x)for(let E=0;E<_.length-1;E++){const M=_[E],O=_[E+1];if(M[1]!==O[1]){const N=Math.min(M[1],O[1]);C.push({ymin:N,ymax:Math.max(M[1],O[1]),x:N===M[1]?M[0]:O[0],islope:(O[0]-M[0])/(O[1]-M[1])})}}if(C.sort(((_,E)=>_.ymin<E.ymin?-1:_.ymin>E.ymin?1:_.x<E.x?-1:_.x>E.x?1:_.ymax===E.ymax?0:(_.ymax-E.ymax)/Math.abs(_.ymax-E.ymax))),!C.length)return y;let k=[],S=C[0].ymin,T=0;for(;k.length||C.length;){if(C.length){let _=-1;for(let E=0;E<C.length&&!(C[E].ymin>S);E++)_=E;C.splice(0,_+1).forEach((E=>{k.push({s:S,edge:E})}))}if(k=k.filter((_=>!(_.edge.ymax<=S))),k.sort(((_,E)=>_.edge.x===E.edge.x?0:(_.edge.x-E.edge.x)/Math.abs(_.edge.x-E.edge.x))),(g!==1||T%p==0)&&k.length>1)for(let _=0;_<k.length;_+=2){const E=_+1;if(E>=k.length)break;const M=k[_].edge,O=k[E].edge;y.push([[Math.round(M.x),S],[Math.round(O.x),S]])}S+=g,k.forEach((_=>{_.edge.x=_.edge.x+g*_.edge.islope})),T++}return y})(c,l,a);if(s){for(const f of c)ug(f,h,-s);(function(f,p,g){const x=[];f.forEach((y=>x.push(...y))),ug(x,p,g)})(d,h,-s)}return d}function zc(e,t){var i;const a=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let l=1;return t.roughness>=1&&(((i=t.randomizer)===null||i===void 0?void 0:i.next())||Math.random())>.7&&(l=s),S8(e,s,a,l||1)}class Uy{constructor(t){this.helper=t}fillPolygons(t,i){return this._fillPolygons(t,i)}_fillPolygons(t,i){const a=zc(t,i);return{type:"fillSketch",ops:this.renderLines(a,i)}}renderLines(t,i){const a=[];for(const s of t)a.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],i));return a}}function Rd(e){const t=e[0],i=e[1];return Math.sqrt(Math.pow(t[0]-i[0],2)+Math.pow(t[1]-i[1],2))}class T8 extends Uy{fillPolygons(t,i){let a=i.hachureGap;a<0&&(a=4*i.strokeWidth),a=Math.max(a,.1);const s=zc(t,Object.assign({},i,{hachureGap:a})),l=Math.PI/180*i.hachureAngle,c=[],h=.5*a*Math.cos(l),d=.5*a*Math.sin(l);for(const[f,p]of s)Rd([f,p])&&c.push([[f[0]-h,f[1]+d],[...p]],[[f[0]+h,f[1]-d],[...p]]);return{type:"fillSketch",ops:this.renderLines(c,i)}}}class w8 extends Uy{fillPolygons(t,i){const a=this._fillPolygons(t,i),s=Object.assign({},i,{hachureAngle:i.hachureAngle+90}),l=this._fillPolygons(t,s);return a.ops=a.ops.concat(l.ops),a}}class _8{constructor(t){this.helper=t}fillPolygons(t,i){const a=zc(t,i=Object.assign({},i,{hachureAngle:0}));return this.dotsOnLines(a,i)}dotsOnLines(t,i){const a=[];let s=i.hachureGap;s<0&&(s=4*i.strokeWidth),s=Math.max(s,.1);let l=i.fillWeight;l<0&&(l=i.strokeWidth/2);const c=s/4;for(const h of t){const d=Rd(h),f=d/s,p=Math.ceil(f)-1,g=d-p*s,x=(h[0][0]+h[1][0])/2-s/4,y=Math.min(h[0][1],h[1][1]);for(let C=0;C<p;C++){const k=y+g+C*s,S=x-c+2*Math.random()*c,T=k-c+2*Math.random()*c,_=this.helper.ellipse(S,T,l,l,i);a.push(..._.ops)}}return{type:"fillSketch",ops:a}}}class B8{constructor(t){this.helper=t}fillPolygons(t,i){const a=zc(t,i);return{type:"fillSketch",ops:this.dashedLine(a,i)}}dashedLine(t,i){const a=i.dashOffset<0?i.hachureGap<0?4*i.strokeWidth:i.hachureGap:i.dashOffset,s=i.dashGap<0?i.hachureGap<0?4*i.strokeWidth:i.hachureGap:i.dashGap,l=[];return t.forEach((c=>{const h=Rd(c),d=Math.floor(h/(a+s)),f=(h+s-d*(a+s))/2;let p=c[0],g=c[1];p[0]>g[0]&&(p=c[1],g=c[0]);const x=Math.atan((g[1]-p[1])/(g[0]-p[0]));for(let y=0;y<d;y++){const C=y*(a+s),k=C+a,S=[p[0]+C*Math.cos(x)+f*Math.cos(x),p[1]+C*Math.sin(x)+f*Math.sin(x)],T=[p[0]+k*Math.cos(x)+f*Math.cos(x),p[1]+k*Math.sin(x)+f*Math.sin(x)];l.push(...this.helper.doubleLineOps(S[0],S[1],T[0],T[1],i))}})),l}}class E8{constructor(t){this.helper=t}fillPolygons(t,i){const a=i.hachureGap<0?4*i.strokeWidth:i.hachureGap,s=i.zigzagOffset<0?a:i.zigzagOffset,l=zc(t,i=Object.assign({},i,{hachureGap:a+s}));return{type:"fillSketch",ops:this.zigzagLines(l,s,i)}}zigzagLines(t,i,a){const s=[];return t.forEach((l=>{const c=Rd(l),h=Math.round(c/(2*i));let d=l[0],f=l[1];d[0]>f[0]&&(d=l[1],f=l[0]);const p=Math.atan((f[1]-d[1])/(f[0]-d[0]));for(let g=0;g<h;g++){const x=2*g*i,y=2*(g+1)*i,C=Math.sqrt(2*Math.pow(i,2)),k=[d[0]+x*Math.cos(p),d[1]+x*Math.sin(p)],S=[d[0]+y*Math.cos(p),d[1]+y*Math.sin(p)],T=[k[0]+C*Math.cos(p+Math.PI/4),k[1]+C*Math.sin(p+Math.PI/4)];s.push(...this.helper.doubleLineOps(k[0],k[1],T[0],T[1],a),...this.helper.doubleLineOps(T[0],T[1],S[0],S[1],a))}})),s}}const Ai={};class L8{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const A8=0,dg=1,f2=2,cu={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 fg(e,t){return e.type===t}function jy(e){const t=[],i=(function(c){const h=new Array;for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))h[h.length]={type:A8,text:RegExp.$1},c=c.substr(RegExp.$1.length);else{if(!c.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];h[h.length]={type:dg,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return h[h.length]={type:f2,text:""},h})(e);let a="BOD",s=0,l=i[s];for(;!fg(l,f2);){let c=0;const h=[];if(a==="BOD"){if(l.text!=="M"&&l.text!=="m")return jy("M0,0"+e);s++,c=cu[l.text],a=l.text}else fg(l,dg)?c=cu[a]:(s++,c=cu[l.text],a=l.text);if(!(s+c<i.length))throw new Error("Path data ended short");for(let d=s;d<s+c;d++){const f=i[d];if(!fg(f,dg))throw new Error("Param not a number: "+a+","+f.text);h[h.length]=+f.text}if(typeof cu[a]!="number")throw new Error("Bad segment: "+a);{const d={key:a,data:h};t.push(d),s+=c,l=i[s],a==="M"&&(a="L"),a==="m"&&(a="l")}}return t}function dw(e){let t=0,i=0,a=0,s=0;const l=[];for(const{key:c,data:h}of e)switch(c){case"M":l.push({key:"M",data:[...h]}),[t,i]=h,[a,s]=h;break;case"m":t+=h[0],i+=h[1],l.push({key:"M",data:[t,i]}),a=t,s=i;break;case"L":l.push({key:"L",data:[...h]}),[t,i]=h;break;case"l":t+=h[0],i+=h[1],l.push({key:"L",data:[t,i]});break;case"C":l.push({key:"C",data:[...h]}),t=h[4],i=h[5];break;case"c":{const d=h.map(((f,p)=>p%2?f+i:f+t));l.push({key:"C",data:d}),t=d[4],i=d[5];break}case"Q":l.push({key:"Q",data:[...h]}),t=h[2],i=h[3];break;case"q":{const d=h.map(((f,p)=>p%2?f+i:f+t));l.push({key:"Q",data:d}),t=d[2],i=d[3];break}case"A":l.push({key:"A",data:[...h]}),t=h[5],i=h[6];break;case"a":t+=h[5],i+=h[6],l.push({key:"A",data:[h[0],h[1],h[2],h[3],h[4],t,i]});break;case"H":l.push({key:"H",data:[...h]}),t=h[0];break;case"h":t+=h[0],l.push({key:"H",data:[t]});break;case"V":l.push({key:"V",data:[...h]}),i=h[0];break;case"v":i+=h[0],l.push({key:"V",data:[i]});break;case"S":l.push({key:"S",data:[...h]}),t=h[2],i=h[3];break;case"s":{const d=h.map(((f,p)=>p%2?f+i:f+t));l.push({key:"S",data:d}),t=d[2],i=d[3];break}case"T":l.push({key:"T",data:[...h]}),t=h[0],i=h[1];break;case"t":t+=h[0],i+=h[1],l.push({key:"T",data:[t,i]});break;case"Z":case"z":l.push({key:"Z",data:[]}),t=a,i=s}return l}function fw(e){const t=[];let i="",a=0,s=0,l=0,c=0,h=0,d=0;for(const{key:f,data:p}of e){switch(f){case"M":t.push({key:"M",data:[...p]}),[a,s]=p,[l,c]=p;break;case"C":t.push({key:"C",data:[...p]}),a=p[4],s=p[5],h=p[2],d=p[3];break;case"L":t.push({key:"L",data:[...p]}),[a,s]=p;break;case"H":a=p[0],t.push({key:"L",data:[a,s]});break;case"V":s=p[0],t.push({key:"L",data:[a,s]});break;case"S":{let g=0,x=0;i==="C"||i==="S"?(g=a+(a-h),x=s+(s-d)):(g=a,x=s),t.push({key:"C",data:[g,x,...p]}),h=p[0],d=p[1],a=p[2],s=p[3];break}case"T":{const[g,x]=p;let y=0,C=0;i==="Q"||i==="T"?(y=a+(a-h),C=s+(s-d)):(y=a,C=s);const k=a+2*(y-a)/3,S=s+2*(C-s)/3,T=g+2*(y-g)/3,_=x+2*(C-x)/3;t.push({key:"C",data:[k,S,T,_,g,x]}),h=y,d=C,a=g,s=x;break}case"Q":{const[g,x,y,C]=p,k=a+2*(g-a)/3,S=s+2*(x-s)/3,T=y+2*(g-y)/3,_=C+2*(x-C)/3;t.push({key:"C",data:[k,S,T,_,y,C]}),h=g,d=x,a=y,s=C;break}case"A":{const g=Math.abs(p[0]),x=Math.abs(p[1]),y=p[2],C=p[3],k=p[4],S=p[5],T=p[6];g===0||x===0?(t.push({key:"C",data:[a,s,S,T,S,T]}),a=S,s=T):(a!==S||s!==T)&&(pw(a,s,S,T,g,x,y,C,k).forEach((function(_){t.push({key:"C",data:_})})),a=S,s=T);break}case"Z":t.push({key:"Z",data:[]}),a=l,s=c}i=f}return t}function Go(e,t,i){return[e*Math.cos(i)-t*Math.sin(i),e*Math.sin(i)+t*Math.cos(i)]}function pw(e,t,i,a,s,l,c,h,d,f){const p=(g=c,Math.PI*g/180);var g;let x=[],y=0,C=0,k=0,S=0;if(f)[y,C,k,S]=f;else{[e,t]=Go(e,t,-p),[i,a]=Go(i,a,-p);const tt=(e-i)/2,W=(t-a)/2;let P=tt*tt/(s*s)+W*W/(l*l);P>1&&(P=Math.sqrt(P),s*=P,l*=P);const A=s*s,$=l*l,U=A*$-A*W*W-$*tt*tt,it=A*W*W+$*tt*tt,nt=(h===d?-1:1)*Math.sqrt(Math.abs(U/it));k=nt*s*W/l+(e+i)/2,S=nt*-l*tt/s+(t+a)/2,y=Math.asin(parseFloat(((t-S)/l).toFixed(9))),C=Math.asin(parseFloat(((a-S)/l).toFixed(9))),e<k&&(y=Math.PI-y),i<k&&(C=Math.PI-C),y<0&&(y=2*Math.PI+y),C<0&&(C=2*Math.PI+C),d&&y>C&&(y-=2*Math.PI),!d&&C>y&&(C-=2*Math.PI)}let T=C-y;if(Math.abs(T)>120*Math.PI/180){const tt=C,W=i,P=a;C=d&&C>y?y+120*Math.PI/180*1:y+120*Math.PI/180*-1,x=pw(i=k+s*Math.cos(C),a=S+l*Math.sin(C),W,P,s,l,c,0,d,[C,tt,k,S])}T=C-y;const _=Math.cos(y),E=Math.sin(y),M=Math.cos(C),O=Math.sin(C),N=Math.tan(T/4),H=4/3*s*N,j=4/3*l*N,lt=[e,t],G=[e+H*E,t-j*_],D=[i+H*O,a-j*M],Z=[i,a];if(G[0]=2*lt[0]-G[0],G[1]=2*lt[1]-G[1],f)return[G,D,Z].concat(x);{x=[G,D,Z].concat(x);const tt=[];for(let W=0;W<x.length;W+=3){const P=Go(x[W][0],x[W][1],p),A=Go(x[W+1][0],x[W+1][1],p),$=Go(x[W+2][0],x[W+2][1],p);tt.push([P[0],P[1],A[0],A[1],$[0],$[1]])}return tt}}const M8={randOffset:function(e,t){return Dt(e,t)},randOffsetWithRange:function(e,t,i){return sd(e,t,i)},ellipse:function(e,t,i,a,s){const l=mw(i,a,s);return gm(e,t,s,l).opset},doubleLineOps:function(e,t,i,a,s){return yn(e,t,i,a,s,!0)}};function gw(e,t,i,a,s){return{type:"path",ops:yn(e,t,i,a,s)}}function _u(e,t,i){const a=(e||[]).length;if(a>2){const s=[];for(let l=0;l<a-1;l++)s.push(...yn(e[l][0],e[l][1],e[l+1][0],e[l+1][1],i));return t&&s.push(...yn(e[a-1][0],e[a-1][1],e[0][0],e[0][1],i)),{type:"path",ops:s}}return a===2?gw(e[0][0],e[0][1],e[1][0],e[1][1],i):{type:"path",ops:[]}}function R8(e,t,i,a,s){return(function(l,c){return _u(l,!0,c)})([[e,t],[e+i,t],[e+i,t+a],[e,t+a]],s)}function p2(e,t){if(e.length){const i=typeof e[0][0]=="number"?[e]:e,a=hu(i[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:hu(i[0],1.5*(1+.22*t.roughness),y2(t));for(let l=1;l<i.length;l++){const c=i[l];if(c.length){const h=hu(c,1*(1+.2*t.roughness),t),d=t.disableMultiStroke?[]:hu(c,1.5*(1+.22*t.roughness),y2(t));for(const f of h)f.op!=="move"&&a.push(f);for(const f of d)f.op!=="move"&&s.push(f)}}return{type:"path",ops:a.concat(s)}}return{type:"path",ops:[]}}function mw(e,t,i){const a=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(i.curveStepCount,i.curveStepCount/Math.sqrt(200)*a)),l=2*Math.PI/s;let c=Math.abs(e/2),h=Math.abs(t/2);const d=1-i.curveFitting;return c+=Dt(c*d,i),h+=Dt(h*d,i),{increment:l,rx:c,ry:h}}function gm(e,t,i,a){const[s,l]=x2(a.increment,e,t,a.rx,a.ry,1,a.increment*sd(.1,sd(.4,1,i),i),i);let c=ld(s,null,i);if(!i.disableMultiStroke&&i.roughness!==0){const[h]=x2(a.increment,e,t,a.rx,a.ry,1.5,0,i),d=ld(h,null,i);c=c.concat(d)}return{estimatedPoints:l,opset:{type:"path",ops:c}}}function g2(e,t,i,a,s,l,c,h,d){const f=e,p=t;let g=Math.abs(i/2),x=Math.abs(a/2);g+=Dt(.01*g,d),x+=Dt(.01*x,d);let y=s,C=l;for(;y<0;)y+=2*Math.PI,C+=2*Math.PI;C-y>2*Math.PI&&(y=0,C=2*Math.PI);const k=2*Math.PI/d.curveStepCount,S=Math.min(k/2,(C-y)/2),T=b2(S,f,p,g,x,y,C,1,d);if(!d.disableMultiStroke){const _=b2(S,f,p,g,x,y,C,1.5,d);T.push(..._)}return c&&(h?T.push(...yn(f,p,f+g*Math.cos(y),p+x*Math.sin(y),d),...yn(f,p,f+g*Math.cos(C),p+x*Math.sin(C),d)):T.push({op:"lineTo",data:[f,p]},{op:"lineTo",data:[f+g*Math.cos(y),p+x*Math.sin(y)]})),{type:"path",ops:T}}function m2(e,t){const i=fw(dw(jy(e))),a=[];let s=[0,0],l=[0,0];for(const{key:c,data:h}of i)switch(c){case"M":l=[h[0],h[1]],s=[h[0],h[1]];break;case"L":a.push(...yn(l[0],l[1],h[0],h[1],t)),l=[h[0],h[1]];break;case"C":{const[d,f,p,g,x,y]=h;a.push(...O8(d,f,p,g,x,y,l,t)),l=[x,y];break}case"Z":a.push(...yn(l[0],l[1],s[0],s[1],t)),l=[s[0],s[1]]}return{type:"path",ops:a}}function pg(e,t){const i=[];for(const a of e)if(a.length){const s=t.maxRandomnessOffset||0,l=a.length;if(l>2){i.push({op:"move",data:[a[0][0]+Dt(s,t),a[0][1]+Dt(s,t)]});for(let c=1;c<l;c++)i.push({op:"lineTo",data:[a[c][0]+Dt(s,t),a[c][1]+Dt(s,t)]})}}return{type:"fillPath",ops:i}}function il(e,t){return(function(i,a){let s=i.fillStyle||"hachure";if(!Ai[s])switch(s){case"zigzag":Ai[s]||(Ai[s]=new T8(a));break;case"cross-hatch":Ai[s]||(Ai[s]=new w8(a));break;case"dots":Ai[s]||(Ai[s]=new _8(a));break;case"dashed":Ai[s]||(Ai[s]=new B8(a));break;case"zigzag-line":Ai[s]||(Ai[s]=new E8(a));break;default:s="hachure",Ai[s]||(Ai[s]=new Uy(a))}return Ai[s]})(t,M8).fillPolygons(e,t)}function y2(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function yw(e){return e.randomizer||(e.randomizer=new L8(e.seed||0)),e.randomizer.next()}function sd(e,t,i,a=1){return i.roughness*a*(yw(i)*(t-e)+e)}function Dt(e,t,i=1){return sd(-e,e,t,i)}function yn(e,t,i,a,s,l=!1){const c=l?s.disableMultiStrokeFill:s.disableMultiStroke,h=mm(e,t,i,a,s,!0,!1);if(c)return h;const d=mm(e,t,i,a,s,!0,!0);return h.concat(d)}function mm(e,t,i,a,s,l,c){const h=Math.pow(e-i,2)+Math.pow(t-a,2),d=Math.sqrt(h);let f=1;f=d<200?1:d>500?.4:-.0016668*d+1.233334;let p=s.maxRandomnessOffset||0;p*p*100>h&&(p=d/10);const g=p/2,x=.2+.2*yw(s);let y=s.bowing*s.maxRandomnessOffset*(a-t)/200,C=s.bowing*s.maxRandomnessOffset*(e-i)/200;y=Dt(y,s,f),C=Dt(C,s,f);const k=[],S=()=>Dt(g,s,f),T=()=>Dt(p,s,f),_=s.preserveVertices;return c?k.push({op:"move",data:[e+(_?0:S()),t+(_?0:S())]}):k.push({op:"move",data:[e+(_?0:Dt(p,s,f)),t+(_?0:Dt(p,s,f))]}),c?k.push({op:"bcurveTo",data:[y+e+(i-e)*x+S(),C+t+(a-t)*x+S(),y+e+2*(i-e)*x+S(),C+t+2*(a-t)*x+S(),i+(_?0:S()),a+(_?0:S())]}):k.push({op:"bcurveTo",data:[y+e+(i-e)*x+T(),C+t+(a-t)*x+T(),y+e+2*(i-e)*x+T(),C+t+2*(a-t)*x+T(),i+(_?0:T()),a+(_?0:T())]}),k}function hu(e,t,i){if(!e.length)return[];const a=[];a.push([e[0][0]+Dt(t,i),e[0][1]+Dt(t,i)]),a.push([e[0][0]+Dt(t,i),e[0][1]+Dt(t,i)]);for(let s=1;s<e.length;s++)a.push([e[s][0]+Dt(t,i),e[s][1]+Dt(t,i)]),s===e.length-1&&a.push([e[s][0]+Dt(t,i),e[s][1]+Dt(t,i)]);return ld(a,null,i)}function ld(e,t,i){const a=e.length,s=[];if(a>3){const l=[],c=1-i.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let h=1;h+2<a;h++){const d=e[h];l[0]=[d[0],d[1]],l[1]=[d[0]+(c*e[h+1][0]-c*e[h-1][0])/6,d[1]+(c*e[h+1][1]-c*e[h-1][1])/6],l[2]=[e[h+1][0]+(c*e[h][0]-c*e[h+2][0])/6,e[h+1][1]+(c*e[h][1]-c*e[h+2][1])/6],l[3]=[e[h+1][0],e[h+1][1]],s.push({op:"bcurveTo",data:[l[1][0],l[1][1],l[2][0],l[2][1],l[3][0],l[3][1]]})}}else a===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):a===2&&s.push(...mm(e[0][0],e[0][1],e[1][0],e[1][1],i,!0,!0));return s}function x2(e,t,i,a,s,l,c,h){const d=[],f=[];if(h.roughness===0){e/=4,f.push([t+a*Math.cos(-e),i+s*Math.sin(-e)]);for(let p=0;p<=2*Math.PI;p+=e){const g=[t+a*Math.cos(p),i+s*Math.sin(p)];d.push(g),f.push(g)}f.push([t+a*Math.cos(0),i+s*Math.sin(0)]),f.push([t+a*Math.cos(e),i+s*Math.sin(e)])}else{const p=Dt(.5,h)-Math.PI/2;f.push([Dt(l,h)+t+.9*a*Math.cos(p-e),Dt(l,h)+i+.9*s*Math.sin(p-e)]);const g=2*Math.PI+p-.01;for(let x=p;x<g;x+=e){const y=[Dt(l,h)+t+a*Math.cos(x),Dt(l,h)+i+s*Math.sin(x)];d.push(y),f.push(y)}f.push([Dt(l,h)+t+a*Math.cos(p+2*Math.PI+.5*c),Dt(l,h)+i+s*Math.sin(p+2*Math.PI+.5*c)]),f.push([Dt(l,h)+t+.98*a*Math.cos(p+c),Dt(l,h)+i+.98*s*Math.sin(p+c)]),f.push([Dt(l,h)+t+.9*a*Math.cos(p+.5*c),Dt(l,h)+i+.9*s*Math.sin(p+.5*c)])}return[f,d]}function b2(e,t,i,a,s,l,c,h,d){const f=l+Dt(.1,d),p=[];p.push([Dt(h,d)+t+.9*a*Math.cos(f-e),Dt(h,d)+i+.9*s*Math.sin(f-e)]);for(let g=f;g<=c;g+=e)p.push([Dt(h,d)+t+a*Math.cos(g),Dt(h,d)+i+s*Math.sin(g)]);return p.push([t+a*Math.cos(c),i+s*Math.sin(c)]),p.push([t+a*Math.cos(c),i+s*Math.sin(c)]),ld(p,null,d)}function O8(e,t,i,a,s,l,c,h){const d=[],f=[h.maxRandomnessOffset||1,(h.maxRandomnessOffset||1)+.3];let p=[0,0];const g=h.disableMultiStroke?1:2,x=h.preserveVertices;for(let y=0;y<g;y++)y===0?d.push({op:"move",data:[c[0],c[1]]}):d.push({op:"move",data:[c[0]+(x?0:Dt(f[0],h)),c[1]+(x?0:Dt(f[0],h))]}),p=x?[s,l]:[s+Dt(f[y],h),l+Dt(f[y],h)],d.push({op:"bcurveTo",data:[e+Dt(f[y],h),t+Dt(f[y],h),i+Dt(f[y],h),a+Dt(f[y],h),p[0],p[1]]});return d}function Xo(e){return[...e]}function C2(e,t=0){const i=e.length;if(i<3)throw new Error("A curve must have at least three points.");const a=[];if(i===3)a.push(Xo(e[0]),Xo(e[1]),Xo(e[2]),Xo(e[2]));else{const s=[];s.push(e[0],e[0]);for(let h=1;h<e.length;h++)s.push(e[h]),h===e.length-1&&s.push(e[h]);const l=[],c=1-t;a.push(Xo(s[0]));for(let h=1;h+2<s.length;h++){const d=s[h];l[0]=[d[0],d[1]],l[1]=[d[0]+(c*s[h+1][0]-c*s[h-1][0])/6,d[1]+(c*s[h+1][1]-c*s[h-1][1])/6],l[2]=[s[h+1][0]+(c*s[h][0]-c*s[h+2][0])/6,s[h+1][1]+(c*s[h][1]-c*s[h+2][1])/6],l[3]=[s[h+1][0],s[h+1][1]],a.push(l[1],l[2],l[3])}}return a}function Bu(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function F8(e,t,i){const a=Bu(t,i);if(a===0)return Bu(e,t);let s=((e[0]-t[0])*(i[0]-t[0])+(e[1]-t[1])*(i[1]-t[1]))/a;return s=Math.max(0,Math.min(1,s)),Bu(e,Pn(t,i,s))}function Pn(e,t,i){return[e[0]+(t[0]-e[0])*i,e[1]+(t[1]-e[1])*i]}function ym(e,t,i,a){const s=a||[];if((function(h,d){const f=h[d+0],p=h[d+1],g=h[d+2],x=h[d+3];let y=3*p[0]-2*f[0]-x[0];y*=y;let C=3*p[1]-2*f[1]-x[1];C*=C;let k=3*g[0]-2*x[0]-f[0];k*=k;let S=3*g[1]-2*x[1]-f[1];return S*=S,y<k&&(y=k),C<S&&(C=S),y+C})(e,t)<i){const h=e[t+0];s.length?(l=s[s.length-1],c=h,Math.sqrt(Bu(l,c))>1&&s.push(h)):s.push(h),s.push(e[t+3])}else{const d=e[t+0],f=e[t+1],p=e[t+2],g=e[t+3],x=Pn(d,f,.5),y=Pn(f,p,.5),C=Pn(p,g,.5),k=Pn(x,y,.5),S=Pn(y,C,.5),T=Pn(k,S,.5);ym([d,x,k,T],0,i,s),ym([T,S,C,g],0,i,s)}var l,c;return s}function D8(e,t){return od(e,0,e.length,t)}function od(e,t,i,a,s){const l=s||[],c=e[t],h=e[i-1];let d=0,f=1;for(let p=t+1;p<i-1;++p){const g=F8(e[p],c,h);g>d&&(d=g,f=p)}return Math.sqrt(d)>a?(od(e,t,f+1,a,l),od(e,f,i,a,l)):(l.length||l.push(c),l.push(h)),l}function gg(e,t=.15,i){const a=[],s=(e.length-1)/3;for(let l=0;l<s;l++)ym(e,3*l,t,a);return i&&i>0?od(a,0,a.length,i):a}const Wi="none";class cd{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,i,a){return{shape:t,sets:i||[],options:a||this.defaultOptions}}line(t,i,a,s,l){const c=this._o(l);return this._d("line",[gw(t,i,a,s,c)],c)}rectangle(t,i,a,s,l){const c=this._o(l),h=[],d=R8(t,i,a,s,c);if(c.fill){const f=[[t,i],[t+a,i],[t+a,i+s],[t,i+s]];c.fillStyle==="solid"?h.push(pg([f],c)):h.push(il([f],c))}return c.stroke!==Wi&&h.push(d),this._d("rectangle",h,c)}ellipse(t,i,a,s,l){const c=this._o(l),h=[],d=mw(a,s,c),f=gm(t,i,c,d);if(c.fill)if(c.fillStyle==="solid"){const p=gm(t,i,c,d).opset;p.type="fillPath",h.push(p)}else h.push(il([f.estimatedPoints],c));return c.stroke!==Wi&&h.push(f.opset),this._d("ellipse",h,c)}circle(t,i,a,s){const l=this.ellipse(t,i,a,a,s);return l.shape="circle",l}linearPath(t,i){const a=this._o(i);return this._d("linearPath",[_u(t,!1,a)],a)}arc(t,i,a,s,l,c,h=!1,d){const f=this._o(d),p=[],g=g2(t,i,a,s,l,c,h,!0,f);if(h&&f.fill)if(f.fillStyle==="solid"){const x=Object.assign({},f);x.disableMultiStroke=!0;const y=g2(t,i,a,s,l,c,!0,!1,x);y.type="fillPath",p.push(y)}else p.push((function(x,y,C,k,S,T,_){const E=x,M=y;let O=Math.abs(C/2),N=Math.abs(k/2);O+=Dt(.01*O,_),N+=Dt(.01*N,_);let H=S,j=T;for(;H<0;)H+=2*Math.PI,j+=2*Math.PI;j-H>2*Math.PI&&(H=0,j=2*Math.PI);const lt=(j-H)/_.curveStepCount,G=[];for(let D=H;D<=j;D+=lt)G.push([E+O*Math.cos(D),M+N*Math.sin(D)]);return G.push([E+O*Math.cos(j),M+N*Math.sin(j)]),G.push([E,M]),il([G],_)})(t,i,a,s,l,c,f));return f.stroke!==Wi&&p.push(g),this._d("arc",p,f)}curve(t,i){const a=this._o(i),s=[],l=p2(t,a);if(a.fill&&a.fill!==Wi)if(a.fillStyle==="solid"){const c=p2(t,Object.assign(Object.assign({},a),{disableMultiStroke:!0,roughness:a.roughness?a.roughness+a.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else{const c=[],h=t;if(h.length){const d=typeof h[0][0]=="number"?[h]:h;for(const f of d)f.length<3?c.push(...f):f.length===3?c.push(...gg(C2([f[0],f[0],f[1],f[2]]),10,(1+a.roughness)/2)):c.push(...gg(C2(f),10,(1+a.roughness)/2))}c.length&&s.push(il([c],a))}return a.stroke!==Wi&&s.push(l),this._d("curve",s,a)}polygon(t,i){const a=this._o(i),s=[],l=_u(t,!0,a);return a.fill&&(a.fillStyle==="solid"?s.push(pg([t],a)):s.push(il([t],a))),a.stroke!==Wi&&s.push(l),this._d("polygon",s,a)}path(t,i){const a=this._o(i),s=[];if(!t)return this._d("path",s,a);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const l=a.fill&&a.fill!=="transparent"&&a.fill!==Wi,c=a.stroke!==Wi,h=!!(a.simplification&&a.simplification<1),d=(function(p,g,x){const y=fw(dw(jy(p))),C=[];let k=[],S=[0,0],T=[];const _=()=>{T.length>=4&&k.push(...gg(T,g)),T=[]},E=()=>{_(),k.length&&(C.push(k),k=[])};for(const{key:O,data:N}of y)switch(O){case"M":E(),S=[N[0],N[1]],k.push(S);break;case"L":_(),k.push([N[0],N[1]]);break;case"C":if(!T.length){const H=k.length?k[k.length-1]:S;T.push([H[0],H[1]])}T.push([N[0],N[1]]),T.push([N[2],N[3]]),T.push([N[4],N[5]]);break;case"Z":_(),k.push([S[0],S[1]])}if(E(),!x)return C;const M=[];for(const O of C){const N=D8(O,x);N.length&&M.push(N)}return M})(t,1,h?4-4*(a.simplification||1):(1+a.roughness)/2),f=m2(t,a);if(l)if(a.fillStyle==="solid")if(d.length===1){const p=m2(t,Object.assign(Object.assign({},a),{disableMultiStroke:!0,roughness:a.roughness?a.roughness+a.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(p.ops)})}else s.push(pg(d,a));else s.push(il(d,a));return c&&(h?d.forEach((p=>{s.push(_u(p,!1,a))})):s.push(f)),this._d("path",s,a)}opsToPath(t,i){let a="";for(const s of t.ops){const l=typeof i=="number"&&i>=0?s.data.map((c=>+c.toFixed(i))):s.data;switch(s.op){case"move":a+=`M${l[0]} ${l[1]} `;break;case"bcurveTo":a+=`C${l[0]} ${l[1]}, ${l[2]} ${l[3]}, ${l[4]} ${l[5]} `;break;case"lineTo":a+=`L${l[0]} ${l[1]} `}}return a.trim()}toPaths(t){const i=t.sets||[],a=t.options||this.defaultOptions,s=[];for(const l of i){let c=null;switch(l.type){case"path":c={d:this.opsToPath(l),stroke:a.stroke,strokeWidth:a.strokeWidth,fill:Wi};break;case"fillPath":c={d:this.opsToPath(l),stroke:Wi,strokeWidth:0,fill:a.fill||Wi};break;case"fillSketch":c=this.fillSketch(l,a)}c&&s.push(c)}return s}fillSketch(t,i){let a=i.fillWeight;return a<0&&(a=i.strokeWidth/2),{d:this.opsToPath(t),stroke:i.fill||Wi,strokeWidth:a,fill:Wi}}_mergedShape(t){return t.filter(((i,a)=>a===0||i.op!=="move"))}}class $8{constructor(t,i){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new cd(i)}draw(t){const i=t.sets||[],a=t.options||this.getDefaultOptions(),s=this.ctx,l=t.options.fixedDecimalPlaceDigits;for(const c of i)switch(c.type){case"path":s.save(),s.strokeStyle=a.stroke==="none"?"transparent":a.stroke,s.lineWidth=a.strokeWidth,a.strokeLineDash&&s.setLineDash(a.strokeLineDash),a.strokeLineDashOffset&&(s.lineDashOffset=a.strokeLineDashOffset),this._drawToContext(s,c,l),s.restore();break;case"fillPath":{s.save(),s.fillStyle=a.fill||"";const h=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,c,l,h),s.restore();break}case"fillSketch":this.fillSketch(s,c,a)}}fillSketch(t,i,a){let s=a.fillWeight;s<0&&(s=a.strokeWidth/2),t.save(),a.fillLineDash&&t.setLineDash(a.fillLineDash),a.fillLineDashOffset&&(t.lineDashOffset=a.fillLineDashOffset),t.strokeStyle=a.fill||"",t.lineWidth=s,this._drawToContext(t,i,a.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,i,a,s="nonzero"){t.beginPath();for(const l of i.ops){const c=typeof a=="number"&&a>=0?l.data.map((h=>+h.toFixed(a))):l.data;switch(l.op){case"move":t.moveTo(c[0],c[1]);break;case"bcurveTo":t.bezierCurveTo(c[0],c[1],c[2],c[3],c[4],c[5]);break;case"lineTo":t.lineTo(c[0],c[1])}}i.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,i,a,s,l){const c=this.gen.line(t,i,a,s,l);return this.draw(c),c}rectangle(t,i,a,s,l){const c=this.gen.rectangle(t,i,a,s,l);return this.draw(c),c}ellipse(t,i,a,s,l){const c=this.gen.ellipse(t,i,a,s,l);return this.draw(c),c}circle(t,i,a,s){const l=this.gen.circle(t,i,a,s);return this.draw(l),l}linearPath(t,i){const a=this.gen.linearPath(t,i);return this.draw(a),a}polygon(t,i){const a=this.gen.polygon(t,i);return this.draw(a),a}arc(t,i,a,s,l,c,h=!1,d){const f=this.gen.arc(t,i,a,s,l,c,h,d);return this.draw(f),f}curve(t,i){const a=this.gen.curve(t,i);return this.draw(a),a}path(t,i){const a=this.gen.path(t,i);return this.draw(a),a}}const uu="http://www.w3.org/2000/svg";class z8{constructor(t,i){this.svg=t,this.gen=new cd(i)}draw(t){const i=t.sets||[],a=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,l=s.createElementNS(uu,"g"),c=t.options.fixedDecimalPlaceDigits;for(const h of i){let d=null;switch(h.type){case"path":d=s.createElementNS(uu,"path"),d.setAttribute("d",this.opsToPath(h,c)),d.setAttribute("stroke",a.stroke),d.setAttribute("stroke-width",a.strokeWidth+""),d.setAttribute("fill","none"),a.strokeLineDash&&d.setAttribute("stroke-dasharray",a.strokeLineDash.join(" ").trim()),a.strokeLineDashOffset&&d.setAttribute("stroke-dashoffset",`${a.strokeLineDashOffset}`);break;case"fillPath":d=s.createElementNS(uu,"path"),d.setAttribute("d",this.opsToPath(h,c)),d.setAttribute("stroke","none"),d.setAttribute("stroke-width","0"),d.setAttribute("fill",a.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||d.setAttribute("fill-rule","evenodd");break;case"fillSketch":d=this.fillSketch(s,h,a)}d&&l.appendChild(d)}return l}fillSketch(t,i,a){let s=a.fillWeight;s<0&&(s=a.strokeWidth/2);const l=t.createElementNS(uu,"path");return l.setAttribute("d",this.opsToPath(i,a.fixedDecimalPlaceDigits)),l.setAttribute("stroke",a.fill||""),l.setAttribute("stroke-width",s+""),l.setAttribute("fill","none"),a.fillLineDash&&l.setAttribute("stroke-dasharray",a.fillLineDash.join(" ").trim()),a.fillLineDashOffset&&l.setAttribute("stroke-dashoffset",`${a.fillLineDashOffset}`),l}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,i){return this.gen.opsToPath(t,i)}line(t,i,a,s,l){const c=this.gen.line(t,i,a,s,l);return this.draw(c)}rectangle(t,i,a,s,l){const c=this.gen.rectangle(t,i,a,s,l);return this.draw(c)}ellipse(t,i,a,s,l){const c=this.gen.ellipse(t,i,a,s,l);return this.draw(c)}circle(t,i,a,s){const l=this.gen.circle(t,i,a,s);return this.draw(l)}linearPath(t,i){const a=this.gen.linearPath(t,i);return this.draw(a)}polygon(t,i){const a=this.gen.polygon(t,i);return this.draw(a)}arc(t,i,a,s,l,c,h=!1,d){const f=this.gen.arc(t,i,a,s,l,c,h,d);return this.draw(f)}curve(t,i){const a=this.gen.curve(t,i);return this.draw(a)}path(t,i){const a=this.gen.path(t,i);return this.draw(a)}}var St={canvas:(e,t)=>new $8(e,t),svg:(e,t)=>new z8(e,t),generator:e=>new cd(e),newSeed:()=>cd.newSeed()},Ft=v(async(e,t,i)=>{let a;const s=t.useHtmlLabels||Sa(ee()?.htmlLabels);i?a=i:a="node default";const l=e.insert("g").attr("class",a).attr("id",t.domId||t.id),c=l.insert("g").attr("class","label").attr("style",Ge(t.labelStyle));let h;t.label===void 0?h="":h=typeof t.label=="string"?t.label:t.label[0];const d=!!t.icon||!!t.img,f=t.labelType==="markdown",p=await Ta(c,wr(rs(h),ee()),{useHtmlLabels:s,width:t.width||ee().flowchart?.wrappingWidth,classes:f?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:d,markdown:f},ee());let g=p.getBBox();const x=(t?.padding??0)/2;if(s){const y=p.children[0],C=Ut(p);await zT(y,h),g=y.getBoundingClientRect(),C.attr("width",g.width),C.attr("height",g.height)}return s?c.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"):c.attr("transform","translate(0, "+-g.height/2+")"),t.centerLabel&&c.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:l,bbox:g,halfPadding:x,label:c}},"labelHelper"),mg=v(async(e,t,i)=>{const a=i.useHtmlLabels??Ci(ee()),s=e.insert("g").attr("class","label").attr("style",i.labelStyle||""),l=await Ta(s,wr(rs(t),ee()),{useHtmlLabels:a,width:i.width||ee()?.flowchart?.wrappingWidth,style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img});let c=l.getBBox();const h=i.padding/2;if(Ci(ee())){const d=l.children[0],f=Ut(l);c=d.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}return a?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),i.centerLabel&&s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:c,halfPadding:h,label:s}},"insertLabel"),Et=v((e,t)=>{const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),Mt=v((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Vt(e){const t=e.map((i,a)=>`${a===0?"M":"L"}${i.x},${i.y}`);return t.push("Z"),t.join(" ")}v(Vt,"createPathFromPoints");function xn(e,t,i,a,s,l){const c=[],d=i-e,f=a-t,p=d/l,g=2*Math.PI/p,x=t+f/2;for(let y=0;y<=50;y++){const C=y/50,k=e+C*d,S=x+s*Math.sin(g*(k-e));c.push({x:k,y:S})}return c}v(xn,"generateFullSineWavePoints");function vc(e,t,i,a,s,l){const c=[],h=s*Math.PI/180,p=(l*Math.PI/180-h)/(a-1);for(let g=0;g<a;g++){const x=h+g*p,y=e+i*Math.cos(x),C=t+i*Math.sin(x);c.push({x:-y,y:-C})}return c}v(vc,"generateCirclePoints");function xm(e){const t=Array.from(e.childNodes).filter(d=>d.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),a=t.map(d=>d.getAttribute("d")).filter(d=>d!==null).join(" ");i.setAttribute("d",a);const s=t.find(d=>d.getAttribute("fill")!=="none"),l=t.find(d=>d.getAttribute("stroke")!=="none"),c=v((d,f)=>d?.getAttribute(f)??void 0,"getAttr");if(s){const d={fill:c(s,"fill"),"fill-opacity":c(s,"fill-opacity")??"1"};Object.entries(d).forEach(([f,p])=>{p&&i.setAttribute(f,p)})}if(l){const d={stroke:c(l,"stroke"),"stroke-width":c(l,"stroke-width")??"1","stroke-opacity":c(l,"stroke-opacity")??"1"};Object.entries(d).forEach(([f,p])=>{p&&i.setAttribute(f,p)})}const h=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(i),h}v(xm,"mergePaths");var N8=v((e,t)=>{var i=e.x,a=e.y,s=t.x-i,l=t.y-a,c=e.width/2,h=e.height/2,d,f;return Math.abs(l)*c>Math.abs(s)*h?(l<0&&(h=-h),d=l===0?0:h*s/l,f=h):(s<0&&(c=-c),d=c,f=s===0?0:c*l/s),{x:i+d,y:a+f}},"intersectRect"),Il=N8,q8=v(async(e,t,i,a=!1,s=!1)=>{let l=t||"";typeof l=="object"&&(l=l[0]);const c=ee(),h=Ci(c);return await Ta(e,l,{style:i,isTitle:a,useHtmlLabels:h,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},c)},"createLabel"),un=q8,bn=v((e,t,i,a,s)=>["M",e+s,t,"H",e+i-s,"A",s,s,0,0,1,e+i,t+s,"V",t+a-s,"A",s,s,0,0,1,e+i-s,t+a,"H",e+s,"A",s,s,0,0,1,e,t+a-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),xw=v(async(e,t)=>{gt.info("Creating subgraph rect for ",t.id,t);const i=ee(),{themeVariables:a,handDrawnSeed:s}=i,{clusterBkg:l,clusterBorder:c}=a,{labelStyles:h,nodeStyles:d,borderStyles:f,backgroundStyles:p}=_t(t),g=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),x=Ci(i),y=g.insert("g").attr("class","cluster-label ");let C;t.labelType==="markdown"?C=await Ta(y,t.label,{style:t.labelStyle,useHtmlLabels:x,isNode:!0,width:t.width}):C=await un(y,t.label,t.labelStyle||"",!1,!0);let k=C.getBBox();if(Ci(i)){const H=C.children[0],j=Ut(C);k=H.getBoundingClientRect(),j.attr("width",k.width),j.attr("height",k.height)}const S=t.width<=k.width+t.padding?k.width+t.padding:t.width;t.width<=k.width+t.padding?t.diff=(S-t.width)/2-t.padding:t.diff=-t.padding;const T=t.height,_=t.x-S/2,E=t.y-T/2;gt.trace("Data ",t,JSON.stringify(t));let M;if(t.look==="handDrawn"){const H=St.svg(g),j=Tt(t,{roughness:.7,fill:l,stroke:c,fillWeight:3,seed:s}),lt=H.path(bn(_,E,S,T,0),j);M=g.insert(()=>(gt.debug("Rough node insert CXC",lt),lt),":first-child"),M.select("path:nth-child(2)").attr("style",f.join(";")),M.select("path").attr("style",p.join(";").replace("fill","stroke"))}else M=g.insert("rect",":first-child"),M.attr("style",d).attr("rx",t.rx).attr("ry",t.ry).attr("x",_).attr("y",E).attr("width",S).attr("height",T);const{subGraphTitleTopMargin:O}=My(i);if(y.attr("transform",`translate(${t.x-k.width/2}, ${t.y-t.height/2+O})`),h){const H=y.select("span");H&&H.attr("style",h)}const N=M.node().getBBox();return t.offsetX=0,t.width=N.width,t.height=N.height,t.offsetY=k.height-t.padding/2,t.intersect=function(H){return Il(t,H)},{cluster:g,labelBBox:k}},"rect"),I8=v((e,t)=>{const i=e.insert("g").attr("class","note-cluster").attr("id",t.domId),a=i.insert("rect",":first-child"),s=0*t.padding,l=s/2;a.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-l).attr("y",t.y-t.height/2-l).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const c=a.node().getBBox();return t.width=c.width,t.height=c.height,t.intersect=function(h){return Il(t,h)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),H8=v(async(e,t)=>{const i=ee(),{themeVariables:a,handDrawnSeed:s}=i,{altBackground:l,compositeBackground:c,compositeTitleBackground:h,nodeBorder:d}=a,f=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),p=f.insert("g",":first-child"),g=f.insert("g").attr("class","cluster-label");let x=f.append("rect");const y=await un(g,t.label,t.labelStyle,void 0,!0);let C=y.getBBox();if(Ci(i)){const lt=y.children[0],G=Ut(y);C=lt.getBoundingClientRect(),G.attr("width",C.width),G.attr("height",C.height)}const k=0*t.padding,S=k/2,T=(t.width<=C.width+t.padding?C.width+t.padding:t.width)+k;t.width<=C.width+t.padding?t.diff=(T-t.width)/2-t.padding:t.diff=-t.padding;const _=t.height+k,E=t.height+k-C.height-6,M=t.x-T/2,O=t.y-_/2;t.width=T;const N=t.y-t.height/2-S+C.height+2;let H;if(t.look==="handDrawn"){const lt=t.cssClasses.includes("statediagram-cluster-alt"),G=St.svg(f),D=t.rx||t.ry?G.path(bn(M,O,T,_,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:d,seed:s}):G.rectangle(M,O,T,_,{seed:s});H=f.insert(()=>D,":first-child");const Z=G.rectangle(M,N,T,E,{fill:lt?l:c,fillStyle:lt?"hachure":"solid",stroke:d,seed:s});H=f.insert(()=>D,":first-child"),x=f.insert(()=>Z)}else H=p.insert("rect",":first-child"),H.attr("class","outer").attr("x",M).attr("y",O).attr("width",T).attr("height",_).attr("data-look",t.look),x.attr("class","inner").attr("x",M).attr("y",N).attr("width",T).attr("height",E);g.attr("transform",`translate(${t.x-C.width/2}, ${O+1-(Ci(i)?0:3)})`);const j=H.node().getBBox();return t.height=j.height,t.offsetX=0,t.offsetY=C.height-t.padding/2,t.labelBBox=C,t.intersect=function(lt){return Il(t,lt)},{cluster:f,labelBBox:C}},"roundedWithTitle"),U8=v(async(e,t)=>{gt.info("Creating subgraph rect for ",t.id,t);const i=ee(),{themeVariables:a,handDrawnSeed:s}=i,{clusterBkg:l,clusterBorder:c}=a,{labelStyles:h,nodeStyles:d,borderStyles:f,backgroundStyles:p}=_t(t),g=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),x=Ci(i),y=g.insert("g").attr("class","cluster-label "),C=await Ta(y,t.label,{style:t.labelStyle,useHtmlLabels:x,isNode:!0,width:t.width});let k=C.getBBox();if(Ci(i)){const H=C.children[0],j=Ut(C);k=H.getBoundingClientRect(),j.attr("width",k.width),j.attr("height",k.height)}const S=t.width<=k.width+t.padding?k.width+t.padding:t.width;t.width<=k.width+t.padding?t.diff=(S-t.width)/2-t.padding:t.diff=-t.padding;const T=t.height,_=t.x-S/2,E=t.y-T/2;gt.trace("Data ",t,JSON.stringify(t));let M;if(t.look==="handDrawn"){const H=St.svg(g),j=Tt(t,{roughness:.7,fill:l,stroke:c,fillWeight:4,seed:s}),lt=H.path(bn(_,E,S,T,t.rx),j);M=g.insert(()=>(gt.debug("Rough node insert CXC",lt),lt),":first-child"),M.select("path:nth-child(2)").attr("style",f.join(";")),M.select("path").attr("style",p.join(";").replace("fill","stroke"))}else M=g.insert("rect",":first-child"),M.attr("style",d).attr("rx",t.rx).attr("ry",t.ry).attr("x",_).attr("y",E).attr("width",S).attr("height",T);const{subGraphTitleTopMargin:O}=My(i);if(y.attr("transform",`translate(${t.x-k.width/2}, ${t.y-t.height/2+O})`),h){const H=y.select("span");H&&H.attr("style",h)}const N=M.node().getBBox();return t.offsetX=0,t.width=N.width,t.height=N.height,t.offsetY=k.height-t.padding/2,t.intersect=function(H){return Il(t,H)},{cluster:g,labelBBox:k}},"kanbanSection"),j8=v((e,t)=>{const i=ee(),{themeVariables:a,handDrawnSeed:s}=i,{nodeBorder:l}=a,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),h=c.insert("g",":first-child"),d=0*t.padding,f=t.width+d;t.diff=-t.padding;const p=t.height+d,g=t.x-f/2,x=t.y-p/2;t.width=f;let y;if(t.look==="handDrawn"){const S=St.svg(c).rectangle(g,x,f,p,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:l,seed:s});y=c.insert(()=>S,":first-child")}else{y=h.insert("rect",":first-child");let k="outer";t.look,k="divider",y.attr("class",k).attr("x",g).attr("y",x).attr("width",f).attr("height",p).attr("data-look",t.look)}const C=y.node().getBBox();return t.height=C.height,t.offsetX=0,t.offsetY=0,t.intersect=function(k){return Il(t,k)},{cluster:c,labelBBox:{}}},"divider"),P8=xw,W8={rect:xw,squareRect:P8,roundedWithTitle:H8,noteGroup:I8,divider:j8,kanbanSection:U8},bw=new Map,Y8=v(async(e,t)=>{const i=t.shape||"rect",a=await W8[i](e,t);return bw.set(t.id,a),a},"insertCluster"),K7=v(()=>{bw=new Map},"clear");function Cw(e,t){return e.intersect(t)}v(Cw,"intersectNode");var G8=Cw;function kw(e,t,i,a){var s=e.x,l=e.y,c=s-a.x,h=l-a.y,d=Math.sqrt(t*t*h*h+i*i*c*c),f=Math.abs(t*i*c/d);a.x<s&&(f=-f);var p=Math.abs(t*i*h/d);return a.y<l&&(p=-p),{x:s+f,y:l+p}}v(kw,"intersectEllipse");var vw=kw;function Sw(e,t,i){return vw(e,t,t,i)}v(Sw,"intersectCircle");var X8=Sw;function Tw(e,t,i,a){{const s=t.y-e.y,l=e.x-t.x,c=t.x*e.y-e.x*t.y,h=s*i.x+l*i.y+c,d=s*a.x+l*a.y+c,f=1e-6;if(h!==0&&d!==0&&bm(h,d))return;const p=a.y-i.y,g=i.x-a.x,x=a.x*i.y-i.x*a.y,y=p*e.x+g*e.y+x,C=p*t.x+g*t.y+x;if(Math.abs(y)<f&&Math.abs(C)<f&&bm(y,C))return;const k=s*g-p*l;if(k===0)return;const S=Math.abs(k/2);let T=l*x-g*c;const _=T<0?(T-S)/k:(T+S)/k;T=p*c-s*x;const E=T<0?(T-S)/k:(T+S)/k;return{x:_,y:E}}}v(Tw,"intersectLine");function bm(e,t){return e*t>0}v(bm,"sameSign");var V8=Tw;function ww(e,t,i){let a=e.x,s=e.y,l=[],c=Number.POSITIVE_INFINITY,h=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(p){c=Math.min(c,p.x),h=Math.min(h,p.y)}):(c=Math.min(c,t.x),h=Math.min(h,t.y));let d=a-e.width/2-c,f=s-e.height/2-h;for(let p=0;p<t.length;p++){let g=t[p],x=t[p<t.length-1?p+1:0],y=V8(e,i,{x:d+g.x,y:f+g.y},{x:d+x.x,y:f+x.y});y&&l.push(y)}return l.length?(l.length>1&&l.sort(function(p,g){let x=p.x-i.x,y=p.y-i.y,C=Math.sqrt(x*x+y*y),k=g.x-i.x,S=g.y-i.y,T=Math.sqrt(k*k+S*S);return C<T?-1:C===T?0:1}),l[0]):e}v(ww,"intersectPolygon");var Z8=ww,kt={node:G8,circle:X8,ellipse:vw,polygon:Z8,rect:Il};function _w(e,t){const{labelStyles:i}=_t(t);t.labelStyle=i;const a=Mt(t);let s=a;a||(s="anchor");const l=e.insert("g").attr("class",s).attr("id",t.domId||t.id),c=1,{cssStyles:h}=t,d=St.svg(l),f=Tt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(f.roughness=0);const p=d.circle(0,0,c*2,f),g=l.insert(()=>p,":first-child");return g.attr("class","anchor").attr("style",Ge(h)),Et(t,g),t.intersect=function(x){return gt.info("Circle intersect",t,c,x),kt.circle(t,c,x)},l}v(_w,"anchor");function Cm(e,t,i,a,s,l,c){const d=(e+i)/2,f=(t+a)/2,p=Math.atan2(a-t,i-e),g=(i-e)/2,x=(a-t)/2,y=g/s,C=x/l,k=Math.sqrt(y**2+C**2);if(k>1)throw new Error("The given radii are too small to create an arc between the points.");const S=Math.sqrt(1-k**2),T=d+S*l*Math.sin(p)*(c?-1:1),_=f-S*s*Math.cos(p)*(c?-1:1),E=Math.atan2((t-_)/l,(e-T)/s);let O=Math.atan2((a-_)/l,(i-T)/s)-E;c&&O<0&&(O+=2*Math.PI),!c&&O>0&&(O-=2*Math.PI);const N=[];for(let H=0;H<20;H++){const j=H/19,lt=E+j*O,G=T+s*Math.cos(lt),D=_+l*Math.sin(lt);N.push({x:G,y:D})}return N}v(Cm,"generateArcPoints");function Bw(e,t,i){const[a,s]=[t,i].sort((l,c)=>c-l);return s*(1-Math.sqrt(1-(e/a/2)**2))}v(Bw,"calculateArcSagitta");async function Ew(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s,h=v(lt=>lt+c,"calcTotalHeight"),d=v(lt=>{const G=lt/2;return[G/(2.5+lt/50),G]},"calcEllipseRadius"),{shapeSvg:f,bbox:p}=await Ft(e,t,Mt(t)),g=h(t?.height?t?.height:p.height),[x,y]=d(g),C=Bw(g,x,y),S=(t?.width?t?.width:p.width)+l*2+C-C,T=g,{cssStyles:_}=t,E=[{x:S/2,y:-T/2},{x:-S/2,y:-T/2},...Cm(-S/2,-T/2,-S/2,T/2,x,y,!1),{x:S/2,y:T/2},...Cm(S/2,T/2,S/2,-T/2,x,y,!0)],M=St.svg(f),O=Tt(t,{});t.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");const N=Vt(E),H=M.path(N,O),j=f.insert(()=>H,":first-child");return j.attr("class","basic label-container outer-path"),_&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",_),a&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",a),j.attr("transform",`translate(${x/2}, 0)`),Et(t,j),t.intersect=function(lt){return kt.polygon(t,E,lt)},f}v(Ew,"bowTieRect");function wa(e,t,i,a){return e.insert("polygon",":first-child").attr("points",a.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+i/2+")")}v(wa,"insertPolygonShape");var du=12;async function Lw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?28:s,c=t.look==="neo"?24:s,{shapeSvg:h,bbox:d}=await Ft(e,t,Mt(t)),f=(t?.width??d.width)+(t.look==="neo"?l*2:l+du),p=(t?.height??d.height)+(t.look==="neo"?c*2:c),g=0,x=f,y=-p,C=0,k=[{x:g+du,y},{x,y},{x,y:C},{x:g,y:C},{x:g,y:y+du},{x:g+du,y}];let S;const{cssStyles:T}=t;if(t.look==="handDrawn"){const _=St.svg(h),E=Tt(t,{}),M=Vt(k),O=_.path(M,E);S=h.insert(()=>O,":first-child").attr("transform",`translate(${-f/2}, ${p/2})`),T&&S.attr("style",T)}else S=wa(h,f,p,k);return a&&S.attr("style",a),Et(t,S),t.intersect=function(_){return kt.polygon(t,k,_)},h}v(Lw,"card");function Aw(e,t){const{nodeStyles:i}=_t(t);t.label="";const a=e.insert("g").attr("class",Mt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,l=Math.max(28,t.width??0),c=[{x:0,y:l/2},{x:l/2,y:0},{x:0,y:-l/2},{x:-l/2,y:0}],h=St.svg(a),d=Tt(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=Vt(c),p=h.path(f,d),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),t.width=28,t.height=28,t.intersect=function(x){return kt.polygon(t,c,x)},a}v(Aw,"choice");async function Py(e,t,i){const{labelStyles:a,nodeStyles:s}=_t(t);t.labelStyle=a;const{shapeSvg:l,bbox:c,halfPadding:h}=await Ft(e,t,Mt(t)),d=16,f=i?.padding??h,p=t.look==="neo"?c.width/2+d*2:c.width/2+f;let g;const{cssStyles:x}=t;if(t.look==="handDrawn"){const y=St.svg(l),C=Tt(t,{}),k=y.circle(0,0,p*2,C);g=l.insert(()=>k,":first-child"),g.attr("class","basic label-container").attr("style",Ge(x))}else g=l.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",p).attr("cx",0).attr("cy",0);return Et(t,g),t.calcIntersect=function(y,C){const k=y.width/2;return kt.circle(y,k,C)},t.intersect=function(y){return gt.info("Circle intersect",t,p,y),kt.circle(t,p,y)},l}v(Py,"circle");function Mw(e){const t=Math.cos(Math.PI/4),i=Math.sin(Math.PI/4),a=e*2,s={x:a/2*t,y:a/2*i},l={x:-(a/2)*t,y:a/2*i},c={x:-(a/2)*t,y:-(a/2)*i},h={x:a/2*t,y:-(a/2)*i};return`M ${l.x},${l.y} L ${h.x},${h.y}
309
+ M ${s.x},${s.y} L ${c.x},${c.y}`}v(Mw,"createLine");function Rw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i,t.label="";const s=e.insert("g").attr("class",Mt(t)).attr("id",t.domId??t.id),l=Math.max(30,t?.width??0),{cssStyles:c}=t,h=St.svg(s),d=Tt(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=h.circle(0,0,l*2,d),p=Mw(l),g=h.path(p,d),x=s.insert(()=>f,":first-child");return x.insert(()=>g),x.attr("class","outer-path"),c&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",c),a&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",a),Et(t,x),t.intersect=function(y){return gt.info("crossedCircle intersect",t,{radius:l,point:y}),kt.circle(t,l,y)},s}v(Rw,"crossedCircle");function ga(e,t,i,a=100,s=0,l=180){const c=[],h=s*Math.PI/180,p=(l*Math.PI/180-h)/(a-1);for(let g=0;g<a;g++){const x=h+g*p,y=e+i*Math.cos(x),C=t+i*Math.sin(x);c.push({x:-y,y:-C})}return c}v(ga,"generateCirclePoints");async function Ow(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,label:c}=await Ft(e,t,Mt(t)),h=t.look==="neo"?18:t.padding??0,d=t.look==="neo"?12:t.padding??0,f=l.width+h,p=l.height+d,g=Math.max(5,p*.1),{cssStyles:x}=t,y=[...ga(f/2,-p/2,g,30,-90,0),{x:-f/2-g,y:g},...ga(f/2+g*2,-g,g,20,-180,-270),...ga(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:-p/2},...ga(f/2,p/2,g,20,0,90)],C=[{x:f/2,y:-p/2-g},{x:-f/2,y:-p/2-g},...ga(f/2,-p/2,g,20,-90,0),{x:-f/2-g,y:-g},...ga(f/2+f*.1,-g,g,20,-180,-270),...ga(f/2+f*.1,g,g,20,-90,-180),{x:-f/2-g,y:p/2},...ga(f/2,p/2,g,20,0,90),{x:-f/2,y:p/2+g},{x:f/2,y:p/2+g}],k=St.svg(s),S=Tt(t,{fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=Vt(y).replace("Z",""),E=k.path(_,S),M=Vt(C),O=k.path(M,{...S}),N=s.insert("g",":first-child");return N.insert(()=>O,":first-child").attr("stroke-opacity",0),N.insert(()=>E,":first-child"),N.attr("class","text"),x&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",x),a&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",a),N.attr("transform",`translate(${g}, 0)`),c.attr("transform",`translate(${-f/2+g-(l.x-(l.left??0))},${-p/2+(t.padding??0)/2-(l.y-(l.top??0))})`),Et(t,N),t.intersect=function(H){return kt.polygon(t,C,H)},s}v(Ow,"curlyBraceLeft");function ma(e,t,i,a=100,s=0,l=180){const c=[],h=s*Math.PI/180,p=(l*Math.PI/180-h)/(a-1);for(let g=0;g<a;g++){const x=h+g*p,y=e+i*Math.cos(x),C=t+i*Math.sin(x);c.push({x:y,y:C})}return c}v(ma,"generateCirclePoints");async function Fw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,label:c}=await Ft(e,t,Mt(t)),h=t.look==="neo"?18:t.padding??0,d=t.look==="neo"?12:t.padding??0,f=l.width+(t.look==="neo"?h*2:h),p=l.height+(t.look==="neo"?d*2:d),g=Math.max(5,p*.1),{cssStyles:x}=t,y=[...ma(f/2,-p/2,g,20,-90,0),{x:f/2+g,y:-g},...ma(f/2+g*2,-g,g,20,-180,-270),...ma(f/2+g*2,g,g,20,-90,-180),{x:f/2+g,y:p/2},...ma(f/2,p/2,g,20,0,90)],C=[{x:-f/2,y:-p/2-g},{x:f/2,y:-p/2-g},...ma(f/2,-p/2,g,20,-90,0),{x:f/2+g,y:-g},...ma(f/2+g*2,-g,g,20,-180,-270),...ma(f/2+g*2,g,g,20,-90,-180),{x:f/2+g,y:p/2},...ma(f/2,p/2,g,20,0,90),{x:f/2,y:p/2+g},{x:-f/2,y:p/2+g}],k=St.svg(s),S=Tt(t,{fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=Vt(y).replace("Z",""),E=k.path(_,S),M=Vt(C),O=k.path(M,{...S}),N=s.insert("g",":first-child");return N.insert(()=>O,":first-child").attr("stroke-opacity",0),N.insert(()=>E,":first-child"),N.attr("class","text"),x&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",x),a&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",a),N.attr("transform",`translate(${-g}, 0)`),c.attr("transform",`translate(${-f/2+(t.padding??0)/2-(l.x-(l.left??0))},${-p/2+(t.padding??0)/2-(l.y-(l.top??0))})`),Et(t,N),t.intersect=function(H){return kt.polygon(t,C,H)},s}v(Fw,"curlyBraceRight");function ei(e,t,i,a=100,s=0,l=180){const c=[],h=s*Math.PI/180,p=(l*Math.PI/180-h)/(a-1);for(let g=0;g<a;g++){const x=h+g*p,y=e+i*Math.cos(x),C=t+i*Math.sin(x);c.push({x:-y,y:-C})}return c}v(ei,"generateCirclePoints");async function Dw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,label:c}=await Ft(e,t,Mt(t)),h=t.look==="neo"?18:t.padding??0,d=t.look==="neo"?12:t.padding??0,f=l.width+(t.look==="neo"?h*2:h),p=l.height+(t.look==="neo"?d*2:d),g=Math.max(5,p*.1),{cssStyles:x}=t,y=[...ei(f/2,-p/2,g,30,-90,0),{x:-f/2-g,y:g},...ei(f/2+g*2,-g,g,20,-180,-270),...ei(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:-p/2},...ei(f/2,p/2,g,20,0,90)],C=[...ei(-f/2+g+g/2,-p/2,g,20,-90,-180),{x:f/2-g/2,y:g},...ei(-f/2-g/2,-g,g,20,0,90),...ei(-f/2-g/2,g,g,20,-90,0),{x:f/2-g/2,y:-g},...ei(-f/2+g+g/2,p/2,g,30,-180,-270)],k=[{x:f/2,y:-p/2-g},{x:-f/2,y:-p/2-g},...ei(f/2,-p/2,g,20,-90,0),{x:-f/2-g,y:-g},...ei(f/2+g*2,-g,g,20,-180,-270),...ei(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:p/2},...ei(f/2,p/2,g,20,0,90),{x:-f/2,y:p/2+g},{x:f/2-g-g/2,y:p/2+g},...ei(-f/2+g+g/2,-p/2,g,20,-90,-180),{x:f/2-g/2,y:g},...ei(-f/2-g/2,-g,g,20,0,90),...ei(-f/2-g/2,g,g,20,-90,0),{x:f/2-g/2,y:-g},...ei(-f/2+g+g/2,p/2,g,30,-180,-270)],S=St.svg(s),T=Tt(t,{fill:"none"});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const E=Vt(y).replace("Z",""),M=S.path(E,T),N=Vt(C).replace("Z",""),H=S.path(N,T),j=Vt(k),lt=S.path(j,{...T}),G=s.insert("g",":first-child");return G.insert(()=>lt,":first-child").attr("stroke-opacity",0),G.insert(()=>M,":first-child"),G.insert(()=>H,":first-child"),G.attr("class","text"),x&&t.look!=="handDrawn"&&G.selectAll("path").attr("style",x),a&&t.look!=="handDrawn"&&G.selectAll("path").attr("style",a),G.attr("transform",`translate(${g-g/4}, 0)`),c.attr("transform",`translate(${-f/2+(t.padding??0)/2-(l.x-(l.left??0))},${-p/2+(t.padding??0)/2-(l.y-(l.top??0))})`),Et(t,G),t.intersect=function(D){return kt.polygon(t,k,D)},s}v(Dw,"curlyBraces");async function $w(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s,h=20,d=5,{shapeSvg:f,bbox:p}=await Ft(e,t,Mt(t)),g=Math.max(h,(p.width+l*2)*1.25,t?.width??0),x=Math.max(d,p.height+c*2,t?.height??0),y=x/2,{cssStyles:C}=t,k=St.svg(f),S=Tt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const T=g,_=x,E=T-y,M=_/4,O=[{x:E,y:0},{x:M,y:0},{x:0,y:_/2},{x:M,y:_},{x:E,y:_},...vc(-E,-_/2,y,50,270,90)],N=Vt(O),H=k.path(N,S),j=f.insert(()=>H,":first-child");return j.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&j.selectChildren("path").attr("style",C),a&&t.look!=="handDrawn"&&j.selectChildren("path").attr("style",a),j.attr("transform",`translate(${-g/2}, ${-x/2})`),Et(t,j),t.intersect=function(lt){return kt.polygon(t,O,lt)},f}v($w,"curvedTrapezoid");var Q8=v((e,t,i,a,s,l)=>[`M${e},${t+l}`,`a${s},${l} 0,0,0 ${i},0`,`a${s},${l} 0,0,0 ${-i},0`,`l0,${a}`,`a${s},${l} 0,0,0 ${i},0`,`l0,${-a}`].join(" "),"createCylinderPathD"),K8=v((e,t,i,a,s,l)=>[`M${e},${t+l}`,`M${e+i},${t+l}`,`a${s},${l} 0,0,0 ${-i},0`,`l0,${a}`,`a${s},${l} 0,0,0 ${i},0`,`l0,${-a}`].join(" "),"createOuterCylinderPathD"),J8=v((e,t,i,a,s,l)=>[`M${e-i/2},${-a/2}`,`a${s},${l} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),k2=8,v2=8;async function zw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?24:s,c=t.look==="neo"?24:s;if(t.width||t.height){const S=t.width??0;t.width=(t.width??0)-c,t.width<v2&&(t.width=v2);const _=S/2/(2.5+S/50);t.height=(t.height??0)-l-_*3,t.height<k2&&(t.height=k2)}const{shapeSvg:h,bbox:d,label:f}=await Ft(e,t,Mt(t)),p=(t.width?t.width:d.width)+c,g=p/2,x=g/(2.5+p/50),y=(t.height?t.height:d.height)+l+x;let C;const{cssStyles:k}=t;if(t.look==="handDrawn"){const S=St.svg(h),T=K8(0,0,p,y,g,x),_=J8(0,x,p,y,g,x),E=Tt(t,{}),M=S.path(T,E),O=S.path(_,Tt(t,{fill:"none"}));C=h.insert(()=>O,":first-child"),C=h.insert(()=>M,":first-child"),C.attr("class","basic label-container"),k&&C.attr("style",k)}else{const S=Q8(0,0,p,y,g,x);C=h.insert("path",":first-child").attr("d",S).attr("class","basic label-container outer-path").attr("style",Ge(k)).attr("style",a)}return C.attr("label-offset-y",x),C.attr("transform",`translate(${-p/2}, ${-(y/2+x)})`),Et(t,C),f.attr("transform",`translate(${-(d.width/2)-(d.x-(d.left??0))}, ${-(d.height/2)+(t.padding??0)/1.5-(d.y-(d.top??0))})`),t.intersect=function(S){const T=kt.rect(t,S),_=T.x-(t.x??0);if(g!=0&&(Math.abs(_)<(t.width??0)/2||Math.abs(_)==(t.width??0)/2&&Math.abs(T.y-(t.y??0))>(t.height??0)/2-x)){let E=x*x*(1-_*_/(g*g));E>0&&(E=Math.sqrt(E)),E=x-E,S.y-(t.y??0)>0&&(E=-E),T.y+=E}return T},h}v(zw,"cylinder");async function Hl(e,t,i){const{labelStyles:a,nodeStyles:s}=_t(t);t.labelStyle=a;const{shapeSvg:l,bbox:c}=await Ft(e,t,Mt(t)),h=Math.max(c.width+i.labelPaddingX*2,t?.width||0),d=Math.max(c.height+i.labelPaddingY*2,t?.height||0),f=-h/2,p=-d/2;let g,{rx:x,ry:y}=t;const{cssStyles:C}=t;if(i?.rx&&i.ry&&(x=i.rx,y=i.ry),t.look==="handDrawn"){const k=St.svg(l),S=Tt(t,{}),T=x||y?k.path(bn(f,p,h,d,x||0),S):k.rectangle(f,p,h,d,S);g=l.insert(()=>T,":first-child"),g.attr("class","basic label-container").attr("style",Ge(C))}else g=l.insert("rect",":first-child"),g.attr("class","basic label-container").attr("style",s).attr("rx",Ge(x)).attr("ry",Ge(y)).attr("x",f).attr("y",p).attr("width",h).attr("height",d);return Et(t,g),t.calcIntersect=function(k,S){return kt.rect(k,S)},t.intersect=function(k){return kt.rect(t,k)},l}v(Hl,"drawRect");async function Nw(e,t){const{cssClasses:i,labelPaddingX:a,labelPaddingY:s,padding:l,width:c,height:h}=t,d={rx:0,ry:0,labelPaddingX:a??(l??0)*2,labelPaddingY:s??l??0},f=await Hl(e,t,d);if(t.look==="handDrawn"){const y=St.svg(f),C=Tt(t,{}),k=f.select(".basic.label-container > path:nth-child(2)"),S=k.node();if(!S)return f;let T=null;if(S instanceof SVGGraphicsElement)T=S.getBBox();else return f;return f.insert(()=>y.line(T.x,T.y,T.x+T.width,T.y,C),".basic.label-container g.label"),f.insert(()=>y.line(T.x,T.y+T.height,T.x+T.width,T.y+T.height,C),".basic.label-container g.label"),k.remove(),f}const p=f.select(".basic.label-container"),g=(Number(p.attr("width"))||c)??0,x=(Number(p.attr("height"))||h)??0;return g>0&&x>0&&p.attr("stroke-dasharray",`${g} ${x}`),f}v(Nw,"datastore");async function qw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?16:t.padding??0,{shapeSvg:c,bbox:h,label:d}=await Ft(e,t,Mt(t)),f=h.width+s,p=h.height+l,g=p*.2,x=-f/2,y=-p/2-g/2,{cssStyles:C}=t,k=St.svg(c),S=Tt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const T=[{x,y:y+g},{x:-x,y:y+g},{x:-x,y:-y},{x,y:-y},{x,y},{x:-x,y},{x:-x,y:y+g}],_=k.polygon(T.map(M=>[M.x,M.y]),S),E=c.insert(()=>_,":first-child");return E.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",C),a&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",a),d.attr("transform",`translate(${x+(t.padding??0)/2-(h.x-(h.left??0))}, ${y+g+(t.padding??0)/2-(h.y-(h.top??0))})`),Et(t,E),t.intersect=function(M){return kt.rect(t,M)},c}v(qw,"dividedRectangle");async function Iw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t),s=t.look==="neo"?12:5;t.labelStyle=i;const l=t.padding??0,c=t.look==="neo"?16:l,{shapeSvg:h,bbox:d}=await Ft(e,t,Mt(t)),f=(t?.width?t?.width/2:d.width/2)+(c??0),p=f-s;let g;const{cssStyles:x}=t;if(t.look==="handDrawn"){const y=St.svg(h),C=Tt(t,{roughness:.2,strokeWidth:2.5}),k=Tt(t,{roughness:.2,strokeWidth:1.5}),S=y.circle(0,0,f*2,C),T=y.circle(0,0,p*2,k);g=h.insert("g",":first-child"),g.attr("class",Ge(t.cssClasses)).attr("style",Ge(x)),g.node()?.appendChild(S),g.node()?.appendChild(T)}else{g=h.insert("g",":first-child");const y=g.insert("circle",":first-child"),C=g.insert("circle");g.attr("class","basic label-container").attr("style",a),y.attr("class","outer-circle").attr("style",a).attr("r",f).attr("cx",0).attr("cy",0),C.attr("class","inner-circle").attr("style",a).attr("r",p).attr("cx",0).attr("cy",0)}return Et(t,g),t.intersect=function(y){return gt.info("DoubleCircle intersect",t,f,y),kt.circle(t,f,y)},h}v(Iw,"doublecircle");function Hw(e,t,{config:{themeVariables:i}}){const{labelStyles:a,nodeStyles:s}=_t(t);t.label="",t.labelStyle=a;const l=e.insert("g").attr("class",Mt(t)).attr("id",t.domId??t.id),c=7,{cssStyles:h}=t,d=St.svg(l),{nodeBorder:f}=i,p=Tt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(p.roughness=0);const g=d.circle(0,0,c*2,p),x=l.insert(()=>g,":first-child");return x.selectAll("path").attr("style",`fill: ${f} !important;`),h&&h.length>0&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",h),s&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",s),Et(t,x),t.intersect=function(y){return gt.info("filledCircle intersect",t,{radius:c,point:y}),kt.circle(t,c,y)},l}v(Hw,"filledCircle");var S2=10,T2=10;async function Uw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=t?.height??0,t.height<S2&&(t.height=S2),t.width=(t?.width??0)-l-l/2,t.width<T2&&(t.width=T2));const{shapeSvg:c,bbox:h,label:d}=await Ft(e,t,Mt(t)),f=(t?.width?t?.width:h.width)+(l??0),p=t?.height?t?.height:f+h.height,g=p,x=[{x:0,y:-p},{x:g,y:-p},{x:g/2,y:0}],{cssStyles:y}=t,C=St.svg(c),k=Tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=Vt(x),T=C.path(S,k),_=c.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`).attr("class","outer-path");return y&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",y),a&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",a),t.width=f,t.height=p,Et(t,_),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-p/2+(t.padding??0)/2+(h.y-(h.top??0))})`),t.intersect=function(E){return gt.info("Triangle intersect",t,x,E),kt.polygon(t,x,E)},c}v(Uw,"flippedTriangle");function jw(e,t,{dir:i,config:{state:a,themeVariables:s}}){const{nodeStyles:l}=_t(t);t.label="";const c=e.insert("g").attr("class",Mt(t)).attr("id",t.domId??t.id),{cssStyles:h}=t;let d=Math.max(70,t?.width??0),f=Math.max(10,t?.height??0);i==="LR"&&(d=Math.max(10,t?.width??0),f=Math.max(70,t?.height??0));const p=-1*d/2,g=-1*f/2,x=St.svg(c),y=Tt(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=x.rectangle(p,g,d,f,y),k=c.insert(()=>C,":first-child");h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),l&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",l),Et(t,k);const S=a?.padding??0;return t.width&&t.height&&(t.width+=S/2||0,t.height+=S/2||0),t.intersect=function(T){return kt.rect(t,T)},c}v(jw,"forkJoin");async function Pw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=15,l=10,c=t.look==="neo"?16:t.padding??0,h=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-h*2,t.height<l&&(t.height=l),t.width=(t?.width??0)-c*2,t.width<s&&(t.width=s));const{shapeSvg:d,bbox:f}=await Ft(e,t,Mt(t)),p=(t?.width?t?.width:Math.max(s,f.width))+c*2,g=(t?.height?t?.height:Math.max(l,f.height))+h*2,x=g/2,{cssStyles:y}=t,C=St.svg(d),k=Tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=[{x:-p/2,y:-g/2},{x:p/2-x,y:-g/2},...vc(-p/2+x,0,x,50,90,270),{x:p/2-x,y:g/2},{x:-p/2,y:g/2}],T=Vt(S),_=C.path(T,k),E=d.insert(()=>_,":first-child");return E.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",y),a&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",a),Et(t,E),t.intersect=function(M){return gt.info("Pill intersect",t,{radius:x,point:M}),kt.polygon(t,S,M)},d}v(Pw,"halfRoundedRectangle");var tz=v((e,t,i,a,s)=>[`M${e+s},${t}`,`L${e+i-s},${t}`,`L${e+i},${t-a/2}`,`L${e+i-s},${t-a}`,`L${e+s},${t-a}`,`L${e},${t-a/2}`,"Z"].join(" "),"createHexagonPathD");async function Ww(e,t){const{labelStyles:i,nodeStyles:a}=_t(t),s=t.look==="neo"?3.5:4;t.labelStyle=i;const l=t.padding??0,c=70,h=32,d=t.look==="neo"?c:l,f=t.look==="neo"?h:l;if(t.width||t.height){const E=(t.height??0)/s;t.width=(t?.width??0)-2*E-f,t.height=(t.height??0)-d}const{shapeSvg:p,bbox:g}=await Ft(e,t,Mt(t)),x=(t?.height?t?.height:g.height)+d,y=x/s,C=(t?.width?t?.width:g.width)+2*y+f,k=[{x:y,y:0},{x:C-y,y:0},{x:C,y:-x/2},{x:C-y,y:-x},{x:y,y:-x},{x:0,y:-x/2}];let S;const{cssStyles:T}=t;if(t.look==="handDrawn"){const _=St.svg(p),E=Tt(t,{}),M=tz(0,0,C,x,y),O=_.path(M,E);S=p.insert(()=>O,":first-child").attr("transform",`translate(${-C/2}, ${x/2})`),T&&S.attr("style",T)}else S=wa(p,C,x,k);return a&&S.attr("style",a),t.width=C,t.height=x,Et(t,S),t.intersect=function(_){return kt.polygon(t,k,_)},p}v(Ww,"hexagon");async function Yw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.label="",t.labelStyle=i;const{shapeSvg:s}=await Ft(e,t,Mt(t)),l=Math.max(30,t?.width??0),c=Math.max(30,t?.height??0),{cssStyles:h}=t,d=St.svg(s),f=Tt(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{x:0,y:0},{x:l,y:0},{x:0,y:c},{x:l,y:c}],g=Vt(p),x=d.path(g,f),y=s.insert(()=>x,":first-child");return y.attr("class","basic label-container outer-path"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),a&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",a),y.attr("transform",`translate(${-l/2}, ${-c/2})`),Et(t,y),t.intersect=function(C){return gt.info("Pill intersect",t,{points:p}),kt.polygon(t,p,C)},s}v(Yw,"hourglass");async function Gw(e,t,{config:{themeVariables:i,flowchart:a}}){const{labelStyles:s}=_t(t);t.labelStyle=s;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),d=a?.wrappingWidth;t.width=Math.max(h,d??0);const{shapeSvg:f,bbox:p,label:g}=await Ft(e,t,"icon-shape default"),x=t.pos==="t",y=h,C=h,{nodeBorder:k}=i,{stylesMap:S}=ql(t),T=-C/2,_=-y/2,E=t.label?8:0,M=St.svg(f),O=Tt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");const N=M.rectangle(T,_,C,y,O),H=Math.max(C,p.width),j=y+p.height+E,lt=M.rectangle(-H/2,-j/2,H,j,{...O,fill:"transparent",stroke:"none"}),G=f.insert(()=>N,":first-child"),D=f.insert(()=>lt);if(t.icon){const Z=f.append("g");Z.html(`<g>${await $c(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const tt=Z.node().getBBox(),W=tt.width,P=tt.height,A=tt.x,$=tt.y;Z.attr("transform",`translate(${-W/2-A},${x?p.height/2+E/2-P/2-$:-p.height/2-E/2-P/2-$})`),Z.attr("style",`color: ${S.get("stroke")??k};`)}return g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${x?-j/2:j/2-p.height})`),G.attr("transform",`translate(0,${x?p.height/2+E/2:-p.height/2-E/2})`),Et(t,D),t.intersect=function(Z){if(gt.info("iconSquare intersect",t,Z),!t.label)return kt.rect(t,Z);const tt=t.x??0,W=t.y??0,P=t.height??0;let A=[];return x?A=[{x:tt-p.width/2,y:W-P/2},{x:tt+p.width/2,y:W-P/2},{x:tt+p.width/2,y:W-P/2+p.height+E},{x:tt+C/2,y:W-P/2+p.height+E},{x:tt+C/2,y:W+P/2},{x:tt-C/2,y:W+P/2},{x:tt-C/2,y:W-P/2+p.height+E},{x:tt-p.width/2,y:W-P/2+p.height+E}]:A=[{x:tt-C/2,y:W-P/2},{x:tt+C/2,y:W-P/2},{x:tt+C/2,y:W-P/2+y},{x:tt+p.width/2,y:W-P/2+y},{x:tt+p.width/2/2,y:W+P/2},{x:tt-p.width/2,y:W+P/2},{x:tt-p.width/2,y:W-P/2+y},{x:tt-C/2,y:W-P/2+y}],kt.polygon(t,A,Z)},f}v(Gw,"icon");async function Xw(e,t,{config:{themeVariables:i,flowchart:a}}){const{labelStyles:s}=_t(t);t.labelStyle=s;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),d=a?.wrappingWidth;t.width=Math.max(h,d??0);const{shapeSvg:f,bbox:p,label:g}=await Ft(e,t,"icon-shape default"),x=20,y=t.label?8:0,C=t.pos==="t",{nodeBorder:k,mainBkg:S}=i,{stylesMap:T}=ql(t),_=St.svg(f),E=Tt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const M=T.get("fill");E.stroke=M??S;const O=f.append("g");t.icon&&O.html(`<g>${await $c(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const N=O.node().getBBox(),H=N.width,j=N.height,lt=N.x,G=N.y,D=Math.max(H,j)*Math.SQRT2+x*2,Z=_.circle(0,0,D,E),tt=Math.max(D,p.width),W=D+p.height+y,P=_.rectangle(-tt/2,-W/2,tt,W,{...E,fill:"transparent",stroke:"none"}),A=f.insert(()=>Z,":first-child"),$=f.insert(()=>P);return O.attr("transform",`translate(${-H/2-lt},${C?p.height/2+y/2-j/2-G:-p.height/2-y/2-j/2-G})`),O.attr("style",`color: ${T.get("stroke")??k};`),g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${C?-W/2:W/2-p.height})`),A.attr("transform",`translate(0,${C?p.height/2+y/2:-p.height/2-y/2})`),Et(t,$),t.intersect=function(U){return gt.info("iconSquare intersect",t,U),kt.rect(t,U)},f}v(Xw,"iconCircle");async function Vw(e,t,{config:{themeVariables:i,flowchart:a}}){const{labelStyles:s}=_t(t);t.labelStyle=s;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),d=a?.wrappingWidth;t.width=Math.max(h,d??0);const{shapeSvg:f,bbox:p,halfPadding:g,label:x}=await Ft(e,t,"icon-shape default"),y=t.pos==="t",C=h+g*2,k=h+g*2,{nodeBorder:S,mainBkg:T}=i,{stylesMap:_}=ql(t),E=-k/2,M=-C/2,O=t.label?8:0,N=St.svg(f),H=Tt(t,{});t.look!=="handDrawn"&&(H.roughness=0,H.fillStyle="solid");const j=_.get("fill");H.stroke=j??T;const lt=N.path(bn(E,M,k,C,5),H),G=Math.max(k,p.width),D=C+p.height+O,Z=N.rectangle(-G/2,-D/2,G,D,{...H,fill:"transparent",stroke:"none"}),tt=f.insert(()=>lt,":first-child").attr("class","icon-shape2"),W=f.insert(()=>Z);if(t.icon){const P=f.append("g");P.html(`<g>${await $c(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const A=P.node().getBBox(),$=A.width,U=A.height,it=A.x,nt=A.y;P.attr("transform",`translate(${-$/2-it},${y?p.height/2+O/2-U/2-nt:-p.height/2-O/2-U/2-nt})`),P.attr("style",`color: ${_.get("stroke")??S};`)}return x.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${y?-D/2:D/2-p.height})`),tt.attr("transform",`translate(0,${y?p.height/2+O/2:-p.height/2-O/2})`),Et(t,W),t.intersect=function(P){if(gt.info("iconSquare intersect",t,P),!t.label)return kt.rect(t,P);const A=t.x??0,$=t.y??0,U=t.height??0;let it=[];return y?it=[{x:A-p.width/2,y:$-U/2},{x:A+p.width/2,y:$-U/2},{x:A+p.width/2,y:$-U/2+p.height+O},{x:A+k/2,y:$-U/2+p.height+O},{x:A+k/2,y:$+U/2},{x:A-k/2,y:$+U/2},{x:A-k/2,y:$-U/2+p.height+O},{x:A-p.width/2,y:$-U/2+p.height+O}]:it=[{x:A-k/2,y:$-U/2},{x:A+k/2,y:$-U/2},{x:A+k/2,y:$-U/2+C},{x:A+p.width/2,y:$-U/2+C},{x:A+p.width/2/2,y:$+U/2},{x:A-p.width/2,y:$+U/2},{x:A-p.width/2,y:$-U/2+C},{x:A-k/2,y:$-U/2+C}],kt.polygon(t,it,P)},f}v(Vw,"iconRounded");async function Zw(e,t,{config:{themeVariables:i,flowchart:a}}){const{labelStyles:s}=_t(t);t.labelStyle=s;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),d=a?.wrappingWidth;t.width=Math.max(h,d??0);const{shapeSvg:f,bbox:p,halfPadding:g,label:x}=await Ft(e,t,"icon-shape default"),y=t.pos==="t",C=h+g*2,k=h+g*2,{nodeBorder:S,mainBkg:T}=i,{stylesMap:_}=ql(t),E=-k/2,M=-C/2,O=t.label?8:0,N=St.svg(f),H=Tt(t,{});t.look!=="handDrawn"&&(H.roughness=0,H.fillStyle="solid");const j=_.get("fill");H.stroke=j??T;const lt=N.path(bn(E,M,k,C,.1),H),G=Math.max(k,p.width),D=C+p.height+O,Z=N.rectangle(-G/2,-D/2,G,D,{...H,fill:"transparent",stroke:"none"}),tt=f.insert(()=>lt,":first-child"),W=f.insert(()=>Z);if(t.icon){const P=f.append("g");P.html(`<g>${await $c(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const A=P.node().getBBox(),$=A.width,U=A.height,it=A.x,nt=A.y;P.attr("transform",`translate(${-$/2-it},${y?p.height/2+O/2-U/2-nt:-p.height/2-O/2-U/2-nt})`),P.attr("style",`color: ${_.get("stroke")??S};`)}return x.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${y?-D/2:D/2-p.height})`),tt.attr("transform",`translate(0,${y?p.height/2+O/2:-p.height/2-O/2})`),Et(t,W),t.intersect=function(P){if(gt.info("iconSquare intersect",t,P),!t.label)return kt.rect(t,P);const A=t.x??0,$=t.y??0,U=t.height??0;let it=[];return y?it=[{x:A-p.width/2,y:$-U/2},{x:A+p.width/2,y:$-U/2},{x:A+p.width/2,y:$-U/2+p.height+O},{x:A+k/2,y:$-U/2+p.height+O},{x:A+k/2,y:$+U/2},{x:A-k/2,y:$+U/2},{x:A-k/2,y:$-U/2+p.height+O},{x:A-p.width/2,y:$-U/2+p.height+O}]:it=[{x:A-k/2,y:$-U/2},{x:A+k/2,y:$-U/2},{x:A+k/2,y:$-U/2+C},{x:A+p.width/2,y:$-U/2+C},{x:A+p.width/2/2,y:$+U/2},{x:A-p.width/2,y:$+U/2},{x:A-p.width/2,y:$-U/2+C},{x:A-k/2,y:$-U/2+C}],kt.polygon(t,it,P)},f}v(Zw,"iconSquare");async function Qw(e,t,{config:{flowchart:i}}){const a=new Image;a.src=t?.img??"",await a.decode();const s=Number(a.naturalWidth.toString().replace("px","")),l=Number(a.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/l;const{labelStyles:c}=_t(t);t.labelStyle=c;const h=i?.wrappingWidth;t.defaultWidth=i?.wrappingWidth;const d=Math.max(t.label?h??0:0,t?.assetWidth??s),f=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:d,p=t.constraint==="on"?f/t.imageAspectRatio:t?.assetHeight??l;t.width=Math.max(f,h??0);const{shapeSvg:g,bbox:x,label:y}=await Ft(e,t,"image-shape default"),C=t.pos==="t",k=-f/2,S=-p/2,T=t.label?8:0,_=St.svg(g),E=Tt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const M=_.rectangle(k,S,f,p,E),O=Math.max(f,x.width),N=p+x.height+T,H=_.rectangle(-O/2,-N/2,O,N,{...E,fill:"none",stroke:"none"}),j=g.insert(()=>M,":first-child"),lt=g.insert(()=>H);if(t.img){const G=g.append("image");G.attr("href",t.img),G.attr("width",f),G.attr("height",p),G.attr("preserveAspectRatio","none"),G.attr("transform",`translate(${-f/2},${C?N/2-p:-N/2})`)}return y.attr("transform",`translate(${-x.width/2-(x.x-(x.left??0))},${C?-p/2-x.height/2-T/2:p/2-x.height/2+T/2})`),j.attr("transform",`translate(0,${C?x.height/2+T/2:-x.height/2-T/2})`),Et(t,lt),t.intersect=function(G){if(gt.info("iconSquare intersect",t,G),!t.label)return kt.rect(t,G);const D=t.x??0,Z=t.y??0,tt=t.height??0;let W=[];return C?W=[{x:D-x.width/2,y:Z-tt/2},{x:D+x.width/2,y:Z-tt/2},{x:D+x.width/2,y:Z-tt/2+x.height+T},{x:D+f/2,y:Z-tt/2+x.height+T},{x:D+f/2,y:Z+tt/2},{x:D-f/2,y:Z+tt/2},{x:D-f/2,y:Z-tt/2+x.height+T},{x:D-x.width/2,y:Z-tt/2+x.height+T}]:W=[{x:D-f/2,y:Z-tt/2},{x:D+f/2,y:Z-tt/2},{x:D+f/2,y:Z-tt/2+p},{x:D+x.width/2,y:Z-tt/2+p},{x:D+x.width/2/2,y:Z+tt/2},{x:D-x.width/2,y:Z+tt/2},{x:D-x.width/2,y:Z-tt/2+p},{x:D-f/2,y:Z-tt/2+p}],kt.polygon(t,W,G)},g}v(Qw,"imageSquare");async function Kw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=s,c=t.look==="neo"?s*2:s,{shapeSvg:h,bbox:d}=await Ft(e,t,Mt(t)),f=Math.max(d.width+(c??0)*2,t?.width??0),p=Math.max(d.height+(l??0)*2,t?.height??0),g=[{x:0,y:0},{x:f,y:0},{x:f+3*p/6,y:-p},{x:-3*p/6,y:-p}];let x;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=St.svg(h),k=Tt(t,{}),S=Vt(g),T=C.path(S,k);x=h.insert(()=>T,":first-child").attr("transform",`translate(${-f/2}, ${p/2})`),y&&x.attr("style",y)}else x=wa(h,f,p,g);return a&&x.attr("style",a),t.width=f,t.height=p,Et(t,x),t.intersect=function(C){return kt.polygon(t,g,C)},h}v(Kw,"inv_trapezoid");async function Jw(e,t){const{shapeSvg:i,bbox:a,label:s}=await Ft(e,t,"label"),l=i.insert("rect",":first-child");return l.attr("width",.1).attr("height",.1),i.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Et(t,l),t.intersect=function(d){return kt.rect(t,d)},i}v(Jw,"labelRect");async function t_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=s,c=t.look==="neo"?s*2:s,{shapeSvg:h,bbox:d}=await Ft(e,t,Mt(t)),f=(t?.height??d.height)+l,p=(t?.width??d.width)+c,g=[{x:0,y:0},{x:p+3*f/6,y:0},{x:p,y:-f},{x:-(3*f)/6,y:-f}];let x;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=St.svg(h),k=Tt(t,{}),S=Vt(g),T=C.path(S,k);x=h.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),y&&x.attr("style",y)}else x=wa(h,p,f,g);return a&&x.attr("style",a),t.width=p,t.height=f,Et(t,x),t.intersect=function(C){return kt.polygon(t,g,C)},h}v(t_,"lean_left");async function e_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=s,c=t.look==="neo"?s*2:s,{shapeSvg:h,bbox:d}=await Ft(e,t,Mt(t)),f=(t?.height??d.height)+l,p=(t?.width??d.width)+c,g=[{x:-3*f/6,y:0},{x:p,y:0},{x:p+3*f/6,y:-f},{x:0,y:-f}];let x;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=St.svg(h),k=Tt(t,{}),S=Vt(g),T=C.path(S,k);x=h.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),y&&x.attr("style",y)}else x=wa(h,p,f,g);return a&&x.attr("style",a),t.width=p,t.height=f,Et(t,x),t.intersect=function(C){return kt.polygon(t,g,C)},h}v(e_,"lean_right");function i_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",Mt(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,c=Math.max(35,t?.width??0),h=Math.max(35,t?.height??0),d=7,f=[{x:c,y:0},{x:0,y:h+d/2},{x:c-2*d,y:h+d/2},{x:0,y:2*h},{x:c,y:h-d/2},{x:2*d,y:h-d/2}],p=St.svg(s),g=Tt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=Vt(f),y=p.path(x,g),C=s.insert(()=>y,":first-child");return C.attr("class","outer-path"),l&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",l),a&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",a),C.attr("transform",`translate(-${c/2},${-h})`),Et(t,C),t.intersect=function(k){return gt.info("lightningBolt intersect",t,k),kt.polygon(t,f,k)},s}v(i_,"lightningBolt");var ez=v((e,t,i,a,s,l,c)=>[`M${e},${t+l}`,`a${s},${l} 0,0,0 ${i},0`,`a${s},${l} 0,0,0 ${-i},0`,`l0,${a}`,`a${s},${l} 0,0,0 ${i},0`,`l0,${-a}`,`M${e},${t+l+c}`,`a${s},${l} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),iz=v((e,t,i,a,s,l,c)=>[`M${e},${t+l}`,`M${e+i},${t+l}`,`a${s},${l} 0,0,0 ${-i},0`,`l0,${a}`,`a${s},${l} 0,0,0 ${i},0`,`l0,${-a}`,`M${e},${t+l+c}`,`a${s},${l} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),rz=v((e,t,i,a,s,l)=>[`M${e-i/2},${-a/2}`,`a${s},${l} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),w2=10,_2=10;async function r_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?24:s;if(t.width||t.height){const T=t.width??0;t.width=(t.width??0)-l,t.width<_2&&(t.width=_2);const E=T/2/(2.5+T/50);t.height=(t.height??0)-c-E*3,t.height<w2&&(t.height=w2)}const{shapeSvg:h,bbox:d,label:f}=await Ft(e,t,Mt(t)),p=(t?.width?t?.width:d.width)+l*2,g=p/2,x=g/(2.5+p/50),y=(t?.height?t?.height:d.height)+x+c*2,C=y*.1;let k;const{cssStyles:S}=t;if(t.look==="handDrawn"){const T=St.svg(h),_=iz(0,0,p,y,g,x,C),E=rz(0,x,p,y,g,x),M=Tt(t,{}),O=T.path(_,M),N=T.path(E,M);h.insert(()=>N,":first-child").attr("class","line"),k=h.insert(()=>O,":first-child"),k.attr("class","basic label-container"),S&&k.attr("style",S)}else{const T=ez(0,0,p,y,g,x,C);k=h.insert("path",":first-child").attr("d",T).attr("class","basic label-container outer-path").attr("style",Ge(S)).attr("style",a)}return k.attr("label-offset-y",x),k.attr("transform",`translate(${-p/2}, ${-(y/2+x)})`),Et(t,k),f.attr("transform",`translate(${-(d.width/2)-(d.x-(d.left??0))}, ${-(d.height/2)+x-(d.y-(d.top??0))})`),t.intersect=function(T){const _=kt.rect(t,T),E=_.x-(t.x??0);if(g!=0&&(Math.abs(E)<(t.width??0)/2||Math.abs(E)==(t.width??0)/2&&Math.abs(_.y-(t.y??0))>(t.height??0)/2-x)){let M=x*x*(1-E*E/(g*g));M>0&&(M=Math.sqrt(M)),M=x-M,T.y-(t.y??0)>0&&(M=-M),_.y+=M}return _},h}v(r_,"linedCylinder");async function a_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s;if(t.width||t.height){const M=t.width;t.width=(M??0)*10/11-l*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-c*2,t.height<10&&(t.height=10)}const{shapeSvg:h,bbox:d,label:f}=await Ft(e,t,Mt(t)),p=(t?.width?t?.width:d.width)+(l??0)*2,g=(t?.height?t?.height:d.height)+(c??0)*2,x=t.look==="neo"?g/4:g/8,y=g+x,{cssStyles:C}=t,k=St.svg(h),S=Tt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const T=[{x:-p/2-p/2*.1,y:-y/2},{x:-p/2-p/2*.1,y:y/2},...xn(-p/2-p/2*.1,y/2,p/2+p/2*.1,y/2,x,.8),{x:p/2+p/2*.1,y:-y/2},{x:-p/2-p/2*.1,y:-y/2},{x:-p/2,y:-y/2},{x:-p/2,y:y/2*1.1},{x:-p/2,y:-y/2}],_=k.polygon(T.map(M=>[M.x,M.y]),S),E=h.insert(()=>_,":first-child");return E.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",C),a&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",a),E.attr("transform",`translate(0,${-x/2})`),f.attr("transform",`translate(${-p/2+(t.padding??0)+p/2*.1/2-(d.x-(d.left??0))},${-g/2+(t.padding??0)-x/2-(d.y-(d.top??0))})`),Et(t,E),t.intersect=function(M){return kt.polygon(t,T,M)},h}v(a_,"linedWaveEdgedRect");async function n_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s,h=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-l*2-2*h,10),t.height=Math.max((t?.height??0)-c*2-2*h,10));const{shapeSvg:d,bbox:f,label:p}=await Ft(e,t,Mt(t)),g=(t?.width?t?.width:f.width)+l*2+2*h,x=(t?.height?t?.height:f.height)+c*2+2*h,y=g-2*h,C=x-2*h,k=-y/2,S=-C/2,{cssStyles:T}=t,_=St.svg(d),E=Tt(t,{}),M=[{x:k-h,y:S+h},{x:k-h,y:S+C+h},{x:k+y-h,y:S+C+h},{x:k+y-h,y:S+C},{x:k+y,y:S+C},{x:k+y,y:S+C-h},{x:k+y+h,y:S+C-h},{x:k+y+h,y:S-h},{x:k+h,y:S-h},{x:k+h,y:S},{x:k,y:S},{x:k,y:S+h}],O=[{x:k,y:S+h},{x:k+y-h,y:S+h},{x:k+y-h,y:S+C},{x:k+y,y:S+C},{x:k+y,y:S},{x:k,y:S}];t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const N=Vt(M);let H=_.path(N,E);const j=Vt(O);let lt=_.path(j,E);t.look!=="handDrawn"&&(H=xm(H),lt=xm(lt));const G=d.insert("g",":first-child");return G.insert(()=>H),G.insert(()=>lt),G.attr("class","basic label-container outer-path"),T&&t.look!=="handDrawn"&&G.selectAll("path").attr("style",T),a&&t.look!=="handDrawn"&&G.selectAll("path").attr("style",a),p.attr("transform",`translate(${-(f.width/2)-h-(f.x-(f.left??0))}, ${-(f.height/2)+h-(f.y-(f.top??0))})`),Et(t,G),t.intersect=function(D){return kt.polygon(t,M,D)},d}v(n_,"multiRect");async function s_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,label:c}=await Ft(e,t,Mt(t)),h=t.padding??0,d=t.look==="neo"?16:h,f=t.look==="neo"?12:h;let p=!0;(t.width||t.height)&&(p=!1,t.width=(t?.width??0)-d*2,t.height=(t?.height??0)-f*3);const g=Math.max(l.width,t?.width??0)+d*2,x=Math.max(l.height,t?.height??0)+f*3,y=t.look==="neo"?x/4:x/8,C=x+(p?y/2:-y/2),k=-g/2,S=-C/2,T=10,{cssStyles:_}=t,E=xn(k-T,S+C+T,k+g-T,S+C+T,y,.8),M=E?.[E.length-1],O=[{x:k-T,y:S+T},{x:k-T,y:S+C+T},...E,{x:k+g-T,y:M.y-T},{x:k+g,y:M.y-T},{x:k+g,y:M.y-2*T},{x:k+g+T,y:M.y-2*T},{x:k+g+T,y:S-T},{x:k+T,y:S-T},{x:k+T,y:S},{x:k,y:S},{x:k,y:S+T}],N=[{x:k,y:S+T},{x:k+g-T,y:S+T},{x:k+g-T,y:M.y-T},{x:k+g,y:M.y-T},{x:k+g,y:S},{x:k,y:S}],H=St.svg(s),j=Tt(t,{});t.look!=="handDrawn"&&(j.roughness=0,j.fillStyle="solid");const lt=Vt(O),G=H.path(lt,j),D=Vt(N),Z=H.path(D,j),tt=s.insert(()=>G,":first-child");return tt.insert(()=>Z),tt.attr("class","basic label-container outer-path"),_&&t.look!=="handDrawn"&&tt.selectAll("path").attr("style",_),a&&t.look!=="handDrawn"&&tt.selectAll("path").attr("style",a),tt.attr("transform",`translate(0,${-y/2})`),c.attr("transform",`translate(${-(l.width/2)-T-(l.x-(l.left??0))}, ${-(l.height/2)+T-y/2-(l.y-(l.top??0))})`),Et(t,tt),t.intersect=function(W){return kt.polygon(t,O,W)},s}v(s_,"multiWaveEdgedRectangle");async function l_(e,t,{config:{themeVariables:i}}){const{labelStyles:a,nodeStyles:s}=_t(t);t.labelStyle=a,t.useHtmlLabels||Ci(Te())||(t.centerLabel=!0);const{shapeSvg:c,bbox:h,label:d}=await Ft(e,t,Mt(t)),f=Math.max(h.width+(t.padding??0)*2,t?.width??0),p=Math.max(h.height+(t.padding??0)*2,t?.height??0),g=-f/2,x=-p/2,{cssStyles:y}=t,C=St.svg(c),k=Tt(t,{fill:i.noteBkgColor,stroke:i.noteBorderColor});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=C.rectangle(g,x,f,p,k),T=c.insert(()=>S,":first-child");return T.attr("class","basic label-container outer-path"),d.attr("class","label noteLabel"),y&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",y),s&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",s),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),Et(t,T),t.intersect=function(_){return kt.rect(t,_)},c}v(l_,"note");var az=v((e,t,i)=>[`M${e+i/2},${t}`,`L${e+i},${t-i/2}`,`L${e+i/2},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function o_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l}=await Ft(e,t,Mt(t)),c=l.width+(t.padding??0),h=l.height+(t.padding??0),d=c+h,f=.5,p=[{x:d/2,y:0},{x:d,y:-d/2},{x:d/2,y:-d},{x:0,y:-d/2}];let g;const{cssStyles:x}=t;if(t.look==="handDrawn"){const y=St.svg(s),C=Tt(t,{}),k=az(0,0,d),S=y.path(k,C);g=s.insert(()=>S,":first-child").attr("transform",`translate(${-d/2+f}, ${d/2})`),x&&g.attr("style",x)}else g=wa(s,d,d,p),g.attr("transform",`translate(${-d/2+f}, ${d/2})`);return a&&g.attr("style",a),Et(t,g),t.calcIntersect=function(y,C){const k=y.width,S=[{x:k/2,y:0},{x:k,y:-k/2},{x:k/2,y:-k},{x:0,y:-k/2}],T=kt.polygon(y,S,C);return{x:T.x-.5,y:T.y-.5}},t.intersect=function(y){return this.calcIntersect(t,y)},s}v(o_,"question");async function c_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?21:s??0,c=t.look==="neo"?12:s??0,{shapeSvg:h,bbox:d,label:f}=await Ft(e,t,Mt(t)),p=(t?.width??d.width)+(t.look==="neo"?l*2:l),g=(t?.height??d.height)+(t.look==="neo"?c*2:c),x=-p/2,y=-g/2,C=y/2,k=[{x:x+C,y},{x,y:0},{x:x+C,y:-y},{x:-x,y:-y},{x:-x,y}],{cssStyles:S}=t,T=St.svg(h),_=Tt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const E=Vt(k),M=T.path(E,_),O=h.insert(()=>M,":first-child");return O.attr("class","basic label-container outer-path"),S&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",S),a&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",a),O.attr("transform",`translate(${-C/2},0)`),f.attr("transform",`translate(${-C/2-d.width/2-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),Et(t,O),t.intersect=function(N){return kt.polygon(t,k,N)},h}v(c_,"rect_left_inv_arrow");async function h_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const l=e.insert("g").attr("class",s).attr("id",t.domId||t.id),c=l.insert("g"),h=l.insert("g").attr("class","label").attr("style",a),d=t.description,f=t.label,p=await un(h,f,t.labelStyle,!0,!0);let g={width:0,height:0};if(Ci(ee())){const j=p.children[0],lt=Ut(p);g=j.getBoundingClientRect(),lt.attr("width",g.width),lt.attr("height",g.height)}gt.info("Text 2",d);const x=d||[],y=p.getBBox(),C=await un(h,Array.isArray(x)?x.join("<br/>"):x,t.labelStyle,!0,!0),k=C.children[0],S=Ut(C);g=k.getBoundingClientRect(),S.attr("width",g.width),S.attr("height",g.height);const T=(t.padding||0)/2;Ut(C).attr("transform","translate( "+(g.width>y.width?0:(y.width-g.width)/2)+", "+(y.height+T+5)+")"),Ut(p).attr("transform","translate( "+(g.width<y.width?0:-(y.width-g.width)/2)+", 0)"),g=h.node().getBBox(),h.attr("transform","translate("+-g.width/2+", "+(-g.height/2-T+3)+")");const _=g.width+(t.padding||0),E=g.height+(t.padding||0),M=-g.width/2-T,O=-g.height/2-T;let N,H;if(t.look==="handDrawn"){const j=St.svg(l),lt=Tt(t,{}),G=j.path(bn(M,O,_,E,t.rx||0),lt),D=j.line(-g.width/2-T,-g.height/2-T+y.height+T,g.width/2+T,-g.height/2-T+y.height+T,lt);H=l.insert(()=>(gt.debug("Rough node insert CXC",G),D),":first-child"),N=l.insert(()=>(gt.debug("Rough node insert CXC",G),G),":first-child")}else N=c.insert("rect",":first-child"),H=c.insert("line"),N.attr("class","outer title-state").attr("style",a).attr("x",-g.width/2-T).attr("y",-g.height/2-T).attr("width",g.width+(t.padding||0)).attr("height",g.height+(t.padding||0)),H.attr("class","divider").attr("x1",-g.width/2-T).attr("x2",g.width/2+T).attr("y1",-g.height/2-T+y.height+T).attr("y2",-g.height/2-T+y.height+T);return Et(t,N),t.intersect=function(j){return kt.rect(t,j)},l}v(h_,"rectWithTitle");async function u_(e,t,{config:{themeVariables:i}}){const a=i?.radius??5,s={rx:a,ry:a,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return Hl(e,t,s)}v(u_,"roundedRect");var Hn=8;async function d_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0,{shapeSvg:c,bbox:h,label:d}=await Ft(e,t,Mt(t)),f=(t?.width??h.width)+s*2+(t.look==="neo"?Hn:Hn*2),p=(t?.height??h.height)+l*2,g=f-Hn,x=p,y=Hn-f/2,C=-p/2,{cssStyles:k}=t,S=St.svg(c),T=Tt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const _=[{x:y,y:C},{x:y+g,y:C},{x:y+g,y:C+x},{x:y-Hn,y:C+x},{x:y-Hn,y:C},{x:y,y:C},{x:y,y:C+x}],E=S.polygon(_.map(O=>[O.x,O.y]),T),M=c.insert(()=>E,":first-child");return M.attr("class","basic label-container outer-path").attr("style",Ge(k)),a&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",a),k&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",a),d.attr("transform",`translate(${Hn/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),Et(t,M),t.intersect=function(O){return kt.rect(t,O)},c}v(d_,"shadedProcess");async function f_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-l*2,10),t.height=Math.max((t?.height??0)/1.5-c*2,10));const{shapeSvg:h,bbox:d,label:f}=await Ft(e,t,Mt(t)),p=(t?.width?t?.width:d.width)+l*2,g=((t?.height?t?.height:d.height)+c*2)*1.5,x=p,y=g/1.5,C=-x/2,k=-y/2,{cssStyles:S}=t,T=St.svg(h),_=Tt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const E=[{x:C,y:k},{x:C,y:k+y},{x:C+x,y:k+y},{x:C+x,y:k-y/2}],M=Vt(E),O=T.path(M,_),N=h.insert(()=>O,":first-child");return N.attr("class","basic label-container outer-path"),S&&t.look!=="handDrawn"&&N.selectChildren("path").attr("style",S),a&&t.look!=="handDrawn"&&N.selectChildren("path").attr("style",a),N.attr("transform",`translate(0, ${y/4})`),f.attr("transform",`translate(${-x/2+(t.padding??0)-(d.x-(d.left??0))}, ${-y/4+(t.padding??0)-(d.y-(d.top??0))})`),Et(t,N),t.intersect=function(H){return kt.polygon(t,E,H)},h}v(f_,"slopedRect");async function p_(e,t){const i=t.padding??0,a=t.look==="neo"?16:i*2,s=t.look==="neo"?12:i,l={rx:0,ry:0,labelPaddingX:t.labelPaddingX??a,labelPaddingY:s};return Hl(e,t,l)}v(p_,"squareRect");async function g_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?20:s,c=t.look==="neo"?12:s,{shapeSvg:h,bbox:d}=await Ft(e,t,Mt(t)),f=d.height+(t.look==="neo"?c*2:c),p=d.width+f/4+(t.look==="neo"?l*2:l),g=f/2,{cssStyles:x}=t,y=St.svg(h),C=Tt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:-p/2+g,y:-f/2},{x:p/2-g,y:-f/2},...vc(-p/2+g,0,g,50,90,270),{x:p/2-g,y:f/2},...vc(p/2-g,0,g,50,270,450)],S=Vt(k),T=y.path(S,C),_=h.insert(()=>T,":first-child");return _.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",x),a&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",a),Et(t,_),t.intersect=function(E){return kt.polygon(t,k,E)},h}v(g_,"stadium");async function m_(e,t){const i={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Hl(e,t,i)}v(m_,"state");function y_(e,t,{config:{themeVariables:i}}){const{labelStyles:a,nodeStyles:s}=_t(t);t.labelStyle=a;const{cssStyles:l}=t,{lineColor:c,stateBorder:h,nodeBorder:d,nodeShadow:f}=i;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const p=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),g=St.svg(p),x=Tt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=g.circle(0,0,t.width,{...x,stroke:c,strokeWidth:2}),C=h??d,k=(t.width??0)*5/14,S=g.circle(0,0,k,{...x,fill:C,stroke:C,strokeWidth:2,fillStyle:"solid"}),T=p.insert(()=>y,":first-child");if(T.insert(()=>S),t.look!=="handDrawn"&&T.attr("class","outer-path"),l&&T.selectAll("path").attr("style",l),s&&T.selectAll("path").attr("style",s),t.width<25&&f&&t.look!=="handDrawn"){const _=e.node()?.ownerSVGElement?.id??"",E=_?`${_}-drop-shadow-small`:"drop-shadow-small";T.attr("style",`filter:url(#${E})`)}return Et(t,T),t.intersect=function(_){return kt.circle(t,(t.width??0)/2,_)},p}v(y_,"stateEnd");function x_(e,t,{config:{themeVariables:i}}){const{lineColor:a,nodeShadow:s}=i;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const l=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let c;if(t.look==="handDrawn"){const d=St.svg(l).circle(0,0,t.width,f$(a));c=l.insert(()=>d),c.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else c=l.insert("circle",":first-child"),c.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const h=e.node()?.ownerSVGElement?.id??"",d=h?`${h}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${d})`)}return Et(t,c),t.intersect=function(h){return kt.circle(t,(t.width??7)/2,h)},l}v(x_,"stateStart");var rl=8;async function b_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t?.padding??8,l=t.look==="neo"?28:s,c=t.look==="neo"?12:s,{shapeSvg:h,bbox:d}=await Ft(e,t,Mt(t)),f=(t?.width??d.width)+2*rl+l,p=(t?.height??d.height)+c,g=f-2*rl,x=p,y=-f/2,C=-p/2,k=[{x:0,y:0},{x:g,y:0},{x:g,y:-x},{x:0,y:-x},{x:0,y:0},{x:-8,y:0},{x:g+8,y:0},{x:g+8,y:-x},{x:-8,y:-x},{x:-8,y:0}];if(t.look==="handDrawn"){const S=St.svg(h),T=Tt(t,{}),_=S.rectangle(y,C,g+16,x,T),E=S.line(y+rl,C,y+rl,C+x,T),M=S.line(y+rl+g,C,y+rl+g,C+x,T);h.insert(()=>E,":first-child"),h.insert(()=>M,":first-child");const O=h.insert(()=>_,":first-child"),{cssStyles:N}=t;O.attr("class","basic label-container").attr("style",Ge(N)),Et(t,O)}else{const S=wa(h,g,x,k);a&&S.attr("style",a),Et(t,S)}return t.intersect=function(S){return kt.polygon(t,k,S)},h}v(b_,"subroutine");var yg=.2;async function C_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-c*2,10),t.width=Math.max((t?.width??0)-l*2-yg*(t.height+c*2),10));const{shapeSvg:h,bbox:d}=await Ft(e,t,Mt(t)),f=(t?.height?t?.height:d.height)+c*2,p=yg*f,g=yg*f,y=(t?.width?t?.width:d.width)+l*2+p-p,C=f,k=-y/2,S=-C/2,{cssStyles:T}=t,_=St.svg(h),E=Tt(t,{}),M=[{x:k-p/2,y:S},{x:k+y+p/2,y:S},{x:k+y+p/2,y:S+C},{x:k-p/2,y:S+C}],O=[{x:k+y-p/2,y:S+C},{x:k+y+p/2,y:S+C},{x:k+y+p/2,y:S+C-g}];t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const N=Vt(M),H=_.path(N,E),j=Vt(O),lt=_.path(j,{...E,fillStyle:"solid"}),G=h.insert(()=>lt,":first-child");return G.insert(()=>H,":first-child"),G.attr("class","basic label-container outer-path"),T&&t.look!=="handDrawn"&&G.selectAll("path").attr("style",T),a&&t.look!=="handDrawn"&&G.selectAll("path").attr("style",a),Et(t,G),t.intersect=function(D){return kt.polygon(t,M,D)},h}v(C_,"taggedRect");async function k_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,label:c}=await Ft(e,t,Mt(t)),h=Math.max(l.width+(t.padding??0)*2,t?.width??0),d=Math.max(l.height+(t.padding??0)*2,t?.height??0),f=d/8,p=.2*h,g=.2*d,x=d+f,{cssStyles:y}=t,C=St.svg(s),k=Tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=[{x:-h/2-h/2*.1,y:x/2},...xn(-h/2-h/2*.1,x/2,h/2+h/2*.1,x/2,f,.8),{x:h/2+h/2*.1,y:-x/2},{x:-h/2-h/2*.1,y:-x/2}],T=-h/2+h/2*.1,_=-x/2-g*.4,E=[{x:T+h-p,y:(_+d)*1.3},{x:T+h,y:_+d-g},{x:T+h,y:(_+d)*.9},...xn(T+h,(_+d)*1.25,T+h-p,(_+d)*1.3,-d*.02,.5)],M=Vt(S),O=C.path(M,k),N=Vt(E),H=C.path(N,{...k,fillStyle:"solid"}),j=s.insert(()=>H,":first-child");return j.insert(()=>O,":first-child"),j.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",y),a&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",a),j.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)-(l.x-(l.left??0))},${-d/2+(t.padding??0)-f/2-(l.y-(l.top??0))})`),Et(t,j),t.intersect=function(lt){return kt.polygon(t,S,lt)},s}v(k_,"taggedWaveEdgedRectangle");async function v_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l}=await Ft(e,t,Mt(t)),c=Math.max(l.width+(t.padding??0),t?.width||0),h=Math.max(l.height+(t.padding??0),t?.height||0),d=-c/2,f=-h/2,p=s.insert("rect",":first-child");return p.attr("class","text").attr("style",a).attr("rx",0).attr("ry",0).attr("x",d).attr("y",f).attr("width",c).attr("height",h),Et(t,p),t.intersect=function(g){return kt.rect(t,g)},s}v(v_,"text");var nz=v((e,t,i,a,s,l)=>`M${e},${t}
310
+ a${s},${l} 0,0,1 0,${-a}
311
+ l${i},0
312
+ a${s},${l} 0,0,1 0,${a}
313
+ M${i},${-a}
314
+ a${s},${l} 0,0,0 0,${a}
315
+ l${-i},0`,"createCylinderPathD"),sz=v((e,t,i,a,s,l)=>[`M${e},${t}`,`M${e+i},${t}`,`a${s},${l} 0,0,0 0,${-a}`,`l${-i},0`,`a${s},${l} 0,0,0 0,${a}`,`l${i},0`].join(" "),"createOuterCylinderPathD"),lz=v((e,t,i,a,s,l)=>[`M${e+i/2},${-a/2}`,`a${s},${l} 0,0,0 0,${a}`].join(" "),"createInnerCylinderPathD"),B2=5,E2=10;async function S_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?12:s/2;if(t.width||t.height){const k=t.height??0;t.height=(t.height??0)-l,t.height<B2&&(t.height=B2);const T=k/2/(2.5+k/50);t.width=(t.width??0)-l-T*3,t.width<E2&&(t.width=E2)}const{shapeSvg:c,bbox:h,label:d}=await Ft(e,t,Mt(t)),f=(t.height?t.height:h.height)+l,p=f/2,g=p/(2.5+f/50),x=(t.width?t.width:h.width)+g+l,{cssStyles:y}=t;let C;if(t.look==="handDrawn"){const k=St.svg(c),S=sz(0,0,x,f,g,p),T=lz(0,0,x,f,g,p),_=k.path(S,Tt(t,{})),E=k.path(T,Tt(t,{fill:"none"}));C=c.insert(()=>E,":first-child"),C=c.insert(()=>_,":first-child"),C.attr("class","basic label-container"),y&&C.attr("style",y)}else{const k=nz(0,0,x,f,g,p);C=c.insert("path",":first-child").attr("d",k).attr("class","basic label-container").attr("style",Ge(y)).attr("style",a),C.attr("class","basic label-container outer-path"),y&&C.selectAll("path").attr("style",y),a&&C.selectAll("path").attr("style",a)}return C.attr("label-offset-x",g),C.attr("transform",`translate(${-x/2}, ${f/2} )`),d.attr("transform",`translate(${-(h.width/2)-g-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),Et(t,C),t.intersect=function(k){const S=kt.rect(t,k),T=S.y-(t.y??0);if(p!=0&&(Math.abs(T)<(t.height??0)/2||Math.abs(T)==(t.height??0)/2&&Math.abs(S.x-(t.x??0))>(t.width??0)/2-g)){let _=g*g*(1-T*T/(p*p));_!=0&&(_=Math.sqrt(Math.abs(_))),_=g-_,k.x-(t.x??0)>0&&(_=-_),S.x+=_}return S},c}v(S_,"tiltedCylinder");async function T_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=(t.look==="neo",s),c=t.look==="neo"?s*2:s,{shapeSvg:h,bbox:d}=await Ft(e,t,Mt(t)),f=(t?.height??d.height)+l,p=(t?.width??d.width)+c,g=[{x:-3*f/6,y:0},{x:p+3*f/6,y:0},{x:p,y:-f},{x:0,y:-f}];let x;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=St.svg(h),k=Tt(t,{}),S=Vt(g),T=C.path(S,k);x=h.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),y&&x.attr("style",y)}else x=wa(h,p,f,g);return a&&x.attr("style",a),t.width=p,t.height=f,Et(t,x),t.intersect=function(C){return kt.polygon(t,g,C)},h}v(T_,"trapezoid");async function w_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s,h=15,d=5;(t.width||t.height)&&(t.height=(t.height??0)-c*2,t.height<d&&(t.height=d),t.width=(t.width??0)-l*2,t.width<h&&(t.width=h));const{shapeSvg:f,bbox:p}=await Ft(e,t,Mt(t)),g=(t?.width?t?.width:p.width)+l*2,x=(t?.height?t?.height:p.height)+c*2,{cssStyles:y}=t,C=St.svg(f),k=Tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=[{x:-g/2*.8,y:-x/2},{x:g/2*.8,y:-x/2},{x:g/2,y:-x/2*.6},{x:g/2,y:x/2},{x:-g/2,y:x/2},{x:-g/2,y:-x/2*.6}],T=Vt(S),_=C.path(T,k),E=f.insert(()=>_,":first-child");return E.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",y),a&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",a),Et(t,E),t.intersect=function(M){return kt.polygon(t,S,M)},f}v(w_,"trapezoidalPentagon");var L2=10,A2=10;async function __(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=((t?.width??0)-l)/2,t.width<A2&&(t.width=A2),t.height=t?.height??0,t.height<L2&&(t.height=L2));const{shapeSvg:c,bbox:h,label:d}=await Ft(e,t,Mt(t)),f=Sa(ee().flowchart?.htmlLabels),p=(t?.width?t?.width:h.width)+l,g=t?.height?t?.height:p+h.height,x=g,y=[{x:0,y:0},{x,y:0},{x:x/2,y:-g}],{cssStyles:C}=t,k=St.svg(c),S=Tt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const T=Vt(y),_=k.path(T,S),E=c.insert(()=>_,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`).attr("class","outer-path");return C&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",C),a&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",a),t.width=p,t.height=g,Et(t,E),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${g/2-(h.height+(t.padding??0)/(f?2:1)-(h.y-(h.top??0)))})`),t.intersect=function(M){return gt.info("Triangle intersect",t,y,M),kt.polygon(t,y,M)},c}v(__,"triangle");async function B_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s;let h=!0;(t.width||t.height)&&(h=!1,t.width=(t?.width??0)-l*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-c*2,t.height<10&&(t.height=10));const{shapeSvg:d,bbox:f,label:p}=await Ft(e,t,Mt(t)),g=(t?.width?t?.width:f.width)+(l??0)*2,x=(t?.height?t?.height:f.height)+(c??0)*2,y=t.look==="neo"?x/4:x/8,C=x+(h?y:-y),{cssStyles:k}=t,T=14-g,_=T>0?T/2:0,E=St.svg(d),M=Tt(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const O=[{x:-g/2-_,y:C/2},...xn(-g/2-_,C/2,g/2+_,C/2,y,.8),{x:g/2+_,y:-C/2},{x:-g/2-_,y:-C/2}],N=Vt(O),H=E.path(N,M),j=d.insert(()=>H,":first-child");return j.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",k),a&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",a),j.attr("transform",`translate(0,${-y/2})`),p.attr("transform",`translate(${-g/2+(t.padding??0)-(f.x-(f.left??0))},${-x/2+(t.padding??0)-y-(f.y-(f.top??0))})`),Et(t,j),t.intersect=function(lt){return kt.polygon(t,O,lt)},d}v(B_,"waveEdgedRectangle");async function E_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?20:s;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);const M=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-c-M*(20/9)),t.width=t.width-l*2}const{shapeSvg:h,bbox:d}=await Ft(e,t,Mt(t)),f=(t?.width?t?.width:d.width)+l*2,p=(t?.height?t?.height:d.height)+c,g=p/8,x=p+g*2,{cssStyles:y}=t,C=St.svg(h),k=Tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=[{x:-f/2,y:x/2},...xn(-f/2,x/2,f/2,x/2,g,1),{x:f/2,y:-x/2},...xn(f/2,-x/2,-f/2,-x/2,g,-1)],T=Vt(S),_=C.path(T,k),E=h.insert(()=>_,":first-child");return E.attr("class","basic label-container"),y&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",y),a&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",a),Et(t,E),t.intersect=function(M){return kt.polygon(t,S,M)},h}v(E_,"waveRectangle");var Be=10;async function L_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2-Be,10),t.height=Math.max((t?.height??0)-l*2-Be,10));const{shapeSvg:c,bbox:h,label:d}=await Ft(e,t,Mt(t)),f=(t?.width?t?.width:h.width)+s*2+Be,p=(t?.height?t?.height:h.height)+l*2+Be,g=f-Be,x=p-Be,y=-g/2,C=-x/2,{cssStyles:k}=t,S=St.svg(c),T=Tt(t,{}),_=[{x:y-Be,y:C-Be},{x:y-Be,y:C+x},{x:y+g,y:C+x},{x:y+g,y:C-Be}],E=`M${y-Be},${C-Be} L${y+g},${C-Be} L${y+g},${C+x} L${y-Be},${C+x} L${y-Be},${C-Be}
316
+ M${y-Be},${C} L${y+g},${C}
317
+ M${y},${C-Be} L${y},${C+x}`;t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const M=S.path(E,T),O=c.insert(()=>M,":first-child");return O.attr("transform",`translate(${Be/2}, ${Be/2})`),O.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",k),a&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",a),d.attr("transform",`translate(${-(h.width/2)+Be/2-(h.x-(h.left??0))}, ${-(h.height/2)+Be/2-(h.y-(h.top??0))})`),Et(t,O),t.intersect=function(N){return kt.polygon(t,_,N)},c}v(L_,"windowPane");var M2=new Set(["redux-color","redux-dark-color"]),oz=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Wy(e,t){const i=t;i.alias&&(t.label=i.alias);const{theme:a,themeVariables:s}=Te(),{rowEven:l,rowOdd:c,nodeBorder:h,borderColorArray:d}=s;if(t.look==="handDrawn"){const{themeVariables:mt}=Te(),{background:Ct}=mt,ot={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Ct}`]};await Wy(e,ot)}const f=Te();t.useHtmlLabels=f.htmlLabels;let p=f.er?.diagramPadding??10,g=f.er?.entityPadding??6;const{cssStyles:x}=t,{labelStyles:y,nodeStyles:C}=_t(t);if(i.attributes.length===0&&t.label){const mt={rx:0,ry:0,labelPaddingX:p,labelPaddingY:p*1.5};ka(t.label,f)+mt.labelPaddingX*2<f.er.minEntityWidth&&(t.width=f.er.minEntityWidth);const Ct=await Hl(e,t,mt);if(a!=null&&M2.has(a)){const ot=i.colorIndex??0;Ct.attr("data-color-id",`color-${ot%d.length}`)}if(!Sa(f.htmlLabels)){const ot=Ct.select("text"),bt=ot.node()?.getBBox();ot.attr("transform",`translate(${-bt.width/2}, 0)`)}return Ct}f.htmlLabels||(p*=1.25,g*=1.25);let k=Mt(t);k||(k="node default");const S=e.insert("g").attr("class",k).attr("id",t.domId||t.id),T=await sl(S,t.label??"",f,0,0,["name"],y);T.height+=g;let _=0;const E=[],M=[];let O=0,N=0,H=0,j=0,lt=!0,G=!0;for(const mt of i.attributes){const Ct=await sl(S,mt.type,f,0,_,["attribute-type"],y);O=Math.max(O,Ct.width+p);const ot=await sl(S,mt.name,f,0,_,["attribute-name"],y);N=Math.max(N,ot.width+p);const bt=await sl(S,mt.keys.join(),f,0,_,["attribute-keys"],y);H=Math.max(H,bt.width+p);const Ot=await sl(S,mt.comment,f,0,_,["attribute-comment"],y);j=Math.max(j,Ot.width+p);const jt=Math.max(Ct.height,ot.height,bt.height,Ot.height)+g;M.push({yOffset:_,rowHeight:jt}),_+=jt}let D=4;H<=p&&(lt=!1,H=0,D--),j<=p&&(G=!1,j=0,D--);const Z=S.node().getBBox();if(T.width+p*2-(O+N+H+j)>0){const mt=T.width+p*2-(O+N+H+j);O+=mt/D,N+=mt/D,H>0&&(H+=mt/D),j>0&&(j+=mt/D)}const tt=O+N+H+j,W=St.svg(S),P=Tt(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid");let A=0;M.length>0&&(A=M.reduce((mt,Ct)=>mt+(Ct?.rowHeight??0),0));const $=Math.max(Z.width+p*2,t?.width||0,tt),U=Math.max((A??0)+T.height,t?.height||0),it=-$/2,nt=-U/2;if(S.selectAll("g:not(:first-child)").each((mt,Ct,ot)=>{const bt=Ut(ot[Ct]),Ot=bt.attr("transform");let jt=0,pe=0;if(Ot){const Oe=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Ot);Oe&&(jt=parseFloat(Oe[1]),pe=parseFloat(Oe[2]),bt.attr("class").includes("attribute-name")?jt+=O:bt.attr("class").includes("attribute-keys")?jt+=O+N:bt.attr("class").includes("attribute-comment")&&(jt+=O+N+H))}bt.attr("transform",`translate(${it+p/2+jt}, ${pe+nt+T.height+g/2})`)}),S.select(".name").attr("transform","translate("+-T.width/2+", "+(nt+g/2)+")"),a!=null&&M2.has(a)){const mt=i.colorIndex??0;S.attr("data-color-id",`color-${mt%d.length}`)}const R=W.rectangle(it,nt,$,U,P),J=S.insert(()=>R,":first-child").attr("class","outer-path").attr("style",x.join(""));E.push(0);for(const[mt,Ct]of M.entries()){const bt=(mt+1)%2===0&&Ct.yOffset!==0,Ot=W.rectangle(it,T.height+nt+Ct?.yOffset,$,Ct?.rowHeight,{...P,fill:bt?l:c,stroke:h});S.insert(()=>Ot,"g.label").attr("style",x.join("")).attr("class",`row-rect-${bt?"even":"odd"}`)}const ct=1e-4;let ft=ll(it,T.height+nt,$+it,T.height+nt,ct),xt=W.polygon(ft.map(mt=>[mt.x,mt.y]),P);if(S.insert(()=>xt).attr("class","divider"),ft=ll(O+it,T.height+nt,O+it,U+nt,ct),xt=W.polygon(ft.map(mt=>[mt.x,mt.y]),P),S.insert(()=>xt).attr("class","divider"),lt){const mt=O+N+it;ft=ll(mt,T.height+nt,mt,U+nt,ct),xt=W.polygon(ft.map(Ct=>[Ct.x,Ct.y]),P),S.insert(()=>xt).attr("class","divider")}if(G){const mt=O+N+H+it;ft=ll(mt,T.height+nt,mt,U+nt,ct),xt=W.polygon(ft.map(Ct=>[Ct.x,Ct.y]),P),S.insert(()=>xt).attr("class","divider")}for(const mt of E){const Ct=T.height+nt+mt;ft=ll(it,Ct,$+it,Ct,ct),xt=W.polygon(ft.map(ot=>[ot.x,ot.y]),P),S.insert(()=>xt).attr("class","divider")}if(Et(t,J),C&&t.look!=="handDrawn")if(a!=null&&oz.has(a))S.selectAll("path").attr("style",C);else{const Ct=C.split(";")?.filter(ot=>ot.includes("stroke"))?.map(ot=>`${ot}`).join("; ");S.selectAll("path").attr("style",Ct??""),S.selectAll(".row-rect-even path").attr("style",C)}return t.intersect=function(mt){return kt.rect(t,mt)},S}v(Wy,"erBox");async function sl(e,t,i,a=0,s=0,l=[],c=""){const h=e.insert("g").attr("class",`label ${l.join(" ")}`).attr("transform",`translate(${a}, ${s})`).attr("style",c);t!==k1(t)&&(t=k1(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const d=h.node().appendChild(await Ta(h,t,{width:ka(t,i)+100,style:c,useHtmlLabels:i.htmlLabels},i));if(t.includes("&lt;")||t.includes("&gt;")){let p=d.children[0];for(p.textContent=p.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");p.childNodes[0];)p=p.childNodes[0],p.textContent=p.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let f=d.getBBox();if(Sa(i.htmlLabels)){const p=d.children[0];p.style.textAlign="start";const g=Ut(d);f=p.getBoundingClientRect(),g.attr("width",f.width),g.attr("height",f.height)}return f}v(sl,"addText");function ll(e,t,i,a,s){return e===i?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:i+s/2,y:a},{x:i-s/2,y:a}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:i,y:a+s/2},{x:i,y:a-s/2}]}v(ll,"lineToPolygon");async function A_(e,t,i,a,s=i.class.padding??12){const l=a?0:3,c=e.insert("g").attr("class",Mt(t)).attr("id",t.domId||t.id);let h=null,d=null,f=null,p=null,g=0,x=0,y=0;if(h=c.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const _=t.annotations[0];await ac(h,{text:`«${_}»`},0),g=h.node().getBBox().height}d=c.insert("g").attr("class","label-group text"),await ac(d,t,0,["font-weight: bolder"]);const C=d.node().getBBox();x=C.height,f=c.insert("g").attr("class","members-group text");let k=0;for(const _ of t.members){const E=await ac(f,_,k,[_.parseClassifier()]);k+=E+l}y=f.node().getBBox().height,y<=0&&(y=s/2),p=c.insert("g").attr("class","methods-group text");let S=0;for(const _ of t.methods){const E=await ac(p,_,S,[_.parseClassifier()]);S+=E+l}let T=c.node().getBBox();if(h!==null){const _=h.node().getBBox();h.attr("transform",`translate(${-_.width/2})`)}return d.attr("transform",`translate(${-C.width/2}, ${g})`),T=c.node().getBBox(),f.attr("transform",`translate(0, ${g+x+s*2})`),T=c.node().getBBox(),p.attr("transform",`translate(0, ${g+x+(y?y+s*4:s*2)})`),T=c.node().getBBox(),{shapeSvg:c,bbox:T}}v(A_,"textHelper");async function ac(e,t,i,a=[]){const s=e.insert("g").attr("class","label").attr("style",a.join("; ")),l=Te();let c="useHtmlLabels"in t?t.useHtmlLabels:Sa(l.htmlLabels)??!0,h="";"text"in t?h=t.text:h=t.label,!c&&h.startsWith("\\")&&(h=h.substring(1)),fc(h)&&(c=!0);const d=await Ta(s,ty(rs(h)),{width:ka(h,l)+50,classes:"markdown-node-label",useHtmlLabels:c},l);let f,p=1;if(c){const g=d.children[0],x=Ut(d);p=g.innerHTML.split("<br>").length,g.innerHTML.includes("</math>")&&(p+=g.innerHTML.split("<mrow>").length-1);const y=g.getElementsByTagName("img");if(y){const C=h.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...y].map(k=>new Promise(S=>{function T(){if(k.style.display="flex",k.style.flexDirection="column",C){const _=l.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,M=parseInt(_,10)*5+"px";k.style.minWidth=M,k.style.maxWidth=M}else k.style.width="100%";S(k)}v(T,"setupImage"),setTimeout(()=>{k.complete&&T()}),k.addEventListener("error",T),k.addEventListener("load",T)})))}f=g.getBoundingClientRect(),x.attr("width",f.width),x.attr("height",f.height)}else{a.includes("font-weight: bolder")&&Ut(d).selectAll("tspan").attr("font-weight",""),p=d.children.length;const g=d.children[0];(d.textContent===""||d.textContent.includes("&gt"))&&(g.textContent=h[0]+h.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),h[1]===" "&&(g.textContent=g.textContent[0]+" "+g.textContent.substring(1))),g.textContent==="undefined"&&(g.textContent=""),f=d.getBBox()}return s.attr("transform","translate(0,"+(-f.height/(2*p)+i)+")"),f.height}v(ac,"addText");async function M_(e,t){const i=ee(),{themeVariables:a}=i,{useGradient:s}=a,l=i.class.padding??12,c=l,h=t.useHtmlLabels??Sa(i.htmlLabels)??!0,d=t;d.annotations=d.annotations??[],d.members=d.members??[],d.methods=d.methods??[];const{shapeSvg:f,bbox:p}=await A_(e,t,i,h,c),{labelStyles:g,nodeStyles:x}=_t(t);t.labelStyle=g,t.cssStyles=d.styles||"";const y=d.styles?.join(";")||x||"";t.cssStyles||(t.cssStyles=y.replaceAll("!important","").split(";"));const C=d.members.length===0&&d.methods.length===0&&!i.class?.hideEmptyMembersBox,k=St.svg(f),S=Tt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const T=Math.max(t.width??0,p.width);let _=Math.max(t.height??0,p.height);const E=(t.height??0)>p.height;d.members.length===0&&d.methods.length===0?_+=c:d.members.length>0&&d.methods.length===0&&(_+=c*2);const M=-T/2,O=-_/2;let N=C?l*2:d.members.length===0&&d.methods.length===0?-l:0;E&&(N=l*2);const H=k.rectangle(M-l,O-l-(C?l:d.members.length===0&&d.methods.length===0?-l/2:0),T+2*l,_+2*l+N,S),j=f.insert(()=>H,":first-child");j.attr("class","basic label-container outer-path");const lt=j.node().getBBox(),G=f.select(".annotation-group").node().getBBox().height-(C?l/2:0)||0,D=f.select(".label-group").node().getBBox().height-(C?l/2:0)||0,Z=f.select(".members-group").node().getBBox().height-(C?l/2:0)||0,tt=(G+D+O+l-(O-l-(C?l:d.members.length===0&&d.methods.length===0?-l/2:0)))/2;if(f.selectAll(".text").each((W,P,A)=>{const $=Ut(A[P]),U=$.attr("transform");let it=0;if(U){const ct=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(U);ct&&(it=parseFloat(ct[2]))}let nt=it+O+l-(C?l:d.members.length===0&&d.methods.length===0?-l/2:0);if($.attr("class").includes("methods-group")){const J=Math.max(Z,c/2);E?nt=Math.max(tt,G+D+J+O+c*2+l)+c*2:nt=G+D+J+O+c*4+l}d.members.length===0&&d.methods.length===0&&i.class?.hideEmptyMembersBox&&(d.annotations.length>0?nt=it-c:nt=it),h||(nt-=4);let R=M;($.attr("class").includes("label-group")||$.attr("class").includes("annotation-group"))&&(R=-$.node()?.getBBox().width/2||0,f.selectAll("text").each(function(J,ct,ft){window.getComputedStyle(ft[ct]).textAnchor==="middle"&&(R=0)})),$.attr("transform",`translate(${R}, ${nt})`)}),d.members.length>0||d.methods.length>0||C){const W=G+D+O+l,P=k.line(lt.x,W,lt.x+lt.width,W+.001,S);f.insert(()=>P).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",y)}if(C||d.members.length>0||d.methods.length>0){const W=G+D+Z+O+c*2+l,P=k.line(lt.x,E?Math.max(tt,W):W,lt.x+lt.width,(E?Math.max(tt,W):W)+.001,S);f.insert(()=>P).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",y)}if(d.look!=="handDrawn"&&f.selectAll("path").attr("style",y),j.select(":nth-child(2)").attr("style",y),f.selectAll(".divider").select("path").attr("style",y),t.labelStyle?f.selectAll("span").attr("style",t.labelStyle):f.selectAll("span").attr("style",y),!h){const W=RegExp(/color\s*:\s*([^;]*)/),P=W.exec(y);if(P){const A=P[0].replace("color","fill");f.selectAll("tspan").attr("style",A)}else if(g){const A=W.exec(g);if(A){const $=A[0].replace("color","fill");f.selectAll("tspan").attr("style",$)}}}return Et(t,j),t.intersect=function(W){return kt.rect(t,W)},f}v(M_,"classBox");async function R_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t,l=t,c=20,h=20,d="verifyMethod"in t,f=Mt(t),{themeVariables:p}=ee(),{borderColorArray:g,requirementEdgeLabelBackground:x}=p,y=e.insert("g").attr("class",f).attr("id",t.domId??t.id);let C;d?C=await qr(y,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):C=await qr(y,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let k=C;const S=await qr(y,s.name,k,t.labelStyle+"; font-weight: bold;");if(k+=S+h,d){const lt=await qr(y,`${s.requirementId?`ID: ${s.requirementId}`:""}`,k,t.labelStyle);k+=lt;const G=await qr(y,`${s.text?`Text: ${s.text}`:""}`,k,t.labelStyle);k+=G;const D=await qr(y,`${s.risk?`Risk: ${s.risk}`:""}`,k,t.labelStyle);k+=D,await qr(y,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,k,t.labelStyle)}else{const lt=await qr(y,`${l.type?`Type: ${l.type}`:""}`,k,t.labelStyle);k+=lt,await qr(y,`${l.docRef?`Doc Ref: ${l.docRef}`:""}`,k,t.labelStyle)}const T=(y.node()?.getBBox().width??200)+c,_=(y.node()?.getBBox().height??200)+c,E=-T/2,M=-_/2,O=St.svg(y),N=Tt(t,{});t.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const H=O.rectangle(E,M,T,_,N),j=y.insert(()=>H,":first-child");if(j.attr("class","basic label-container outer-path").attr("style",a),g?.length){const lt=t.colorIndex??0;y.attr("data-color-id",`color-${lt%g.length}`)}if(y.selectAll(".label").each((lt,G,D)=>{const Z=Ut(D[G]),tt=Z.attr("transform");let W=0,P=0;if(tt){const it=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(tt);it&&(W=parseFloat(it[1]),P=parseFloat(it[2]))}const A=P-_/2;let $=E+c/2;(G===0||G===1)&&($=W),Z.attr("transform",`translate(${$}, ${A+c})`)}),k>C+S+h){const lt=M+C+S+h;let G;if(t.look==="neo"){const tt=[[E,lt],[E+T,lt],[E+T,lt+.001],[E,lt+.001]];G=O.polygon(tt,N)}else G=O.line(E,lt,E+T,lt,N);y.insert(()=>G).attr("class","divider")}return Et(t,j),t.intersect=function(lt){return kt.rect(t,lt)},a&&t.look!=="handDrawn"&&(x||g?.length)&&y.selectAll("path").attr("style",a),y}v(R_,"requirementBox");async function qr(e,t,i,a=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",a),l=ee(),c=l.htmlLabels??!0,h=await Ta(s,ty(rs(t)),{width:ka(t,l)+50,classes:"markdown-node-label",useHtmlLabels:c,style:a},l);let d;if(c){const f=h.children[0],p=Ut(h);d=f.getBoundingClientRect(),p.attr("width",d.width),p.attr("height",d.height)}else{const f=h.children[0];for(const p of f.children)a&&p.setAttribute("style",a);d=h.getBBox(),d.height+=6}return s.attr("transform",`translate(${-d.width/2},${-d.height/2+i})`),d.height}v(qr,"addText");var cz=v(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 O_(e,t,{config:i}){const{labelStyles:a,nodeStyles:s}=_t(t);t.labelStyle=a||"";const l=10,c=t.width;t.width=(t.width??200)-10;const{shapeSvg:h,bbox:d,label:f}=await Ft(e,t,Mt(t)),p=t.padding||10;let g="",x;"ticket"in t&&t.ticket&&i?.kanban?.ticketBaseUrl&&(g=i?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),x=h.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",g).attr("target","_blank"));const y={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let C,k;x?{label:C,bbox:k}=await mg(x,"ticket"in t&&t.ticket||"",y):{label:C,bbox:k}=await mg(h,"ticket"in t&&t.ticket||"",y);const{label:S,bbox:T}=await mg(h,"assigned"in t&&t.assigned||"",y);t.width=c;const _=10,E=t?.width||0,M=Math.max(k.height,T.height)/2,O=Math.max(d.height+_*2,t?.height||0)+M,N=-E/2,H=-O/2;f.attr("transform","translate("+(p-E/2)+", "+(-M-d.height/2)+")"),C.attr("transform","translate("+(p-E/2)+", "+(-M+d.height/2)+")"),S.attr("transform","translate("+(p+E/2-T.width-2*l)+", "+(-M+d.height/2)+")");let j;const{rx:lt,ry:G}=t,{cssStyles:D}=t;if(t.look==="handDrawn"){const Z=St.svg(h),tt=Tt(t,{}),W=lt||G?Z.path(bn(N,H,E,O,lt||0),tt):Z.rectangle(N,H,E,O,tt);j=h.insert(()=>W,":first-child"),j.attr("class","basic label-container").attr("style",D||null)}else{j=h.insert("rect",":first-child"),j.attr("class","basic label-container __APA__").attr("style",s).attr("rx",lt??5).attr("ry",G??5).attr("x",N).attr("y",H).attr("width",E).attr("height",O);const Z="priority"in t&&t.priority;if(Z){const tt=h.append("line"),W=N+2,P=H+Math.floor((lt??0)/2),A=H+O-Math.floor((lt??0)/2);tt.attr("x1",W).attr("y1",P).attr("x2",W).attr("y2",A).attr("stroke-width","4").attr("stroke",cz(Z))}}return Et(t,j),t.height=O,t.intersect=function(Z){return kt.rect(t,Z)},h}v(O_,"kanbanItem");async function F_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,halfPadding:c,label:h}=await Ft(e,t,Mt(t)),d=l.width+10*c,f=l.height+8*c,p=.15*d,{cssStyles:g}=t,x=l.width+20,y=l.height+20,C=Math.max(d,x),k=Math.max(f,y);h.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`);let S;const T=`M0 0
318
+ a${p},${p} 1 0,0 ${C*.25},${-1*k*.1}
319
+ a${p},${p} 1 0,0 ${C*.25},0
320
+ a${p},${p} 1 0,0 ${C*.25},0
321
+ a${p},${p} 1 0,0 ${C*.25},${k*.1}
322
+
323
+ a${p},${p} 1 0,0 ${C*.15},${k*.33}
324
+ a${p*.8},${p*.8} 1 0,0 0,${k*.34}
325
+ a${p},${p} 1 0,0 ${-1*C*.15},${k*.33}
326
+
327
+ a${p},${p} 1 0,0 ${-1*C*.25},${k*.15}
328
+ a${p},${p} 1 0,0 ${-1*C*.25},0
329
+ a${p},${p} 1 0,0 ${-1*C*.25},0
330
+ a${p},${p} 1 0,0 ${-1*C*.25},${-1*k*.15}
331
+
332
+ a${p},${p} 1 0,0 ${-1*C*.1},${-1*k*.33}
333
+ a${p*.8},${p*.8} 1 0,0 0,${-1*k*.34}
334
+ a${p},${p} 1 0,0 ${C*.1},${-1*k*.33}
335
+ H0 V0 Z`;if(t.look==="handDrawn"){const _=St.svg(s),E=Tt(t,{}),M=_.path(T,E);S=s.insert(()=>M,":first-child"),S.attr("class","basic label-container").attr("style",Ge(g))}else S=s.insert("path",":first-child").attr("class","basic label-container").attr("style",a).attr("d",T);return S.attr("transform",`translate(${-C/2}, ${-k/2})`),Et(t,S),t.calcIntersect=function(_,E){return kt.rect(_,E)},t.intersect=function(_){return gt.info("Bang intersect",t,_),kt.rect(t,_)},s}v(F_,"bang");async function D_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,halfPadding:c,label:h}=await Ft(e,t,Mt(t)),d=l.width+2*c,f=l.height+2*c,p=.15*d,g=.25*d,x=.35*d,y=.2*d,{cssStyles:C}=t;let k;const S=`M0 0
336
+ a${p},${p} 0 0,1 ${d*.25},${-1*d*.1}
337
+ a${x},${x} 1 0,1 ${d*.4},${-1*d*.1}
338
+ a${g},${g} 1 0,1 ${d*.35},${d*.2}
339
+
340
+ a${p},${p} 1 0,1 ${d*.15},${f*.35}
341
+ a${y},${y} 1 0,1 ${-1*d*.15},${f*.65}
342
+
343
+ a${g},${p} 1 0,1 ${-1*d*.25},${d*.15}
344
+ a${x},${x} 1 0,1 ${-1*d*.5},0
345
+ a${p},${p} 1 0,1 ${-1*d*.25},${-1*d*.15}
346
+
347
+ a${p},${p} 1 0,1 ${-1*d*.1},${-1*f*.35}
348
+ a${y},${y} 1 0,1 ${d*.1},${-1*f*.65}
349
+ H0 V0 Z`;if(t.look==="handDrawn"){const T=St.svg(s),_=Tt(t,{}),E=T.path(S,_);k=s.insert(()=>E,":first-child"),k.attr("class","basic label-container").attr("style",Ge(C))}else k=s.insert("path",":first-child").attr("class","basic label-container").attr("style",a).attr("d",S);return h.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`),k.attr("transform",`translate(${-d/2}, ${-f/2})`),Et(t,k),t.calcIntersect=function(T,_){return kt.rect(T,_)},t.intersect=function(T){return gt.info("Cloud intersect",t,T),kt.rect(t,T)},s}v(D_,"cloud");async function $_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,halfPadding:c,label:h}=await Ft(e,t,Mt(t)),d=l.width+8*c,f=l.height+2*c,p=5,g=t.look==="neo"?`
350
+ M${-d/2} ${f/2-p}
351
+ v${-f+2*p}
352
+ q0,-${p} ${p},-${p}
353
+ h${d-2*p}
354
+ q${p},0 ${p},${p}
355
+ v${f-p}
356
+ H${-d/2}
357
+ Z
358
+ `:`
359
+ M${-d/2} ${f/2-p}
360
+ v${-f+2*p}
361
+ q0,-${p} ${p},-${p}
362
+ h${d-2*p}
363
+ q${p},0 ${p},${p}
364
+ v${f-2*p}
365
+ q0,${p} ${-p},${p}
366
+ h${-(d-2*p)}
367
+ q${-p},0 ${-p},${-p}
368
+ Z
369
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const x=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",a).attr("d",g);return s.append("line").attr("class","node-line-").attr("x1",-d/2).attr("y1",f/2).attr("x2",d/2).attr("y2",f/2),h.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`),s.append(()=>h.node()),Et(t,x),t.calcIntersect=function(y,C){return kt.rect(y,C)},t.intersect=function(y){return kt.rect(t,y)},s}v($_,"defaultMindmapNode");async function z_(e,t){const i={padding:t.padding??0};return Py(e,t,i)}v(z_,"mindmapCircle");var hz=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:p_},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:u_},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:g_},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:b_},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:zw},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Nw},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Py},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:F_},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:D_},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:o_},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Ww},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:e_},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:t_},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:T_},{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:Kw},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Iw},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:v_},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Lw},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:d_},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:x_},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:y_},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:jw},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Yw},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Ow},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Fw},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Dw},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:i_},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:B_},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Pw},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:S_},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:r_},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:$w},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:qw},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:__},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:L_},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Hw},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:w_},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Uw},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:f_},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:s_},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:n_},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Ew},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Rw},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:k_},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:C_},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:E_},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:c_},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:a_}],uz=v(()=>{const t=[...Object.entries({state:m_,choice:Aw,note:l_,rectWithTitle:h_,labelRect:Jw,iconSquare:Zw,iconCircle:Xw,icon:Gw,iconRounded:Vw,imageSquare:Qw,anchor:_w,kanbanItem:O_,mindmapCircle:z_,defaultMindmapNode:$_,classBox:M_,erBox:Wy,requirementBox:R_}),...hz.flatMap(i=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map(s=>[s,i.handler]))];return Object.fromEntries(t)},"generateShapeMap"),N_=uz();function dz(e){return e in N_}v(dz,"isValidShape");var Od=new Map;async function q_(e,t,i){let a,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const l=t.shape?N_[t.shape]:void 0;if(!l)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let c;i.config.securityLevel==="sandbox"?c="_top":t.linkTarget&&(c=t.linkTarget||"_blank"),a=e.insert("svg:a").attr("xlink:href",t.link).attr("target",c??null),s=await l(a,t,i)}else s=await l(e,t,i),a=s;return a.attr("data-look",Ge(t.look)),t.tooltip&&s.attr("title",t.tooltip),Od.set(t.id,a),t.haveCallback&&a.attr("class",a.attr("class")+" clickable"),a}v(q_,"insertNode");var J7=v((e,t)=>{Od.set(t.id,e)},"setNodeElem"),tI=v(()=>{Od.clear()},"clear"),eI=v(e=>{const t=Od.get(e.id);gt.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const i=8,a=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+a-e.width/2)+", "+(e.y-e.height/2-i)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),a},"positionNode"),fz=v((e,t,i,a,s,l=!1,c)=>{t.arrowTypeStart&&R2(e,"start",t.arrowTypeStart,i,a,s,l,c),t.arrowTypeEnd&&R2(e,"end",t.arrowTypeEnd,i,a,s,l,c)},"addEdgeMarkers"),pz={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{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}},gz=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],R2=v((e,t,i,a,s,l,c=!1,h)=>{const d=pz[i],f=d&&gz.includes(d.type);if(!d){gt.warn(`Unknown arrow type: ${i}`);return}const p=d.type,y=`${s}_${l}-${p}${t==="start"?"Start":"End"}${c&&f?"-margin":""}`;if(h&&h.trim()!==""){const C=h.replace(/[^\dA-Za-z]/g,"_"),k=`${y}_${C}`;if(!document.getElementById(k)){const S=document.getElementById(y);if(S){const T=S.cloneNode(!0);T.id=k,T.querySelectorAll("path, circle, line").forEach(E=>{E.setAttribute("stroke",h),d.fill&&E.setAttribute("fill",h)}),S.parentNode?.appendChild(T)}}e.attr(`marker-${t}`,`url(${a}#${k})`)}else e.attr(`marker-${t}`,`url(${a}#${y})`)},"addEdgeMarker"),mz=v(e=>typeof e=="string"?e:ee()?.flowchart?.curve,"resolveEdgeCurveType"),hd=new Map,ii=new Map,iI=v(()=>{hd.clear(),ii.clear()},"clear"),Vo=v(e=>e?typeof e=="string"?e:e.reduce((t,i)=>t+";"+i,""):"","getLabelStyles"),yz=v(async(e,t)=>{const i=ee();let a=Ci(i);const{labelStyles:s}=_t(t);t.labelStyle=s;const l=e.insert("g").attr("class","edgeLabel"),c=l.insert("g").attr("class","label").attr("data-id",t.id),h=t.labelType==="markdown",f=await Ta(e,t.label,{style:Vo(t.labelStyle),useHtmlLabels:a,addSvgBackground:!0,isNode:!1,markdown:h,width:h?void 0:void 0},i);c.node().appendChild(f),gt.info("abc82",t,t.labelType);let p=f.getBBox(),g=p;if(a){const y=f.children[0],C=Ut(f);p=y.getBoundingClientRect(),g=p,C.attr("width",p.width),C.attr("height",p.height)}else{const y=Ut(f).select("text").node();y&&typeof y.getBBox=="function"&&(g=y.getBBox())}c.attr("transform",Po(g,a)),hd.set(t.id,l),t.width=p.width,t.height=p.height;let x;if(t.startLabelLeft){const y=e.insert("g").attr("class","edgeTerminals"),C=y.insert("g").attr("class","inner"),k=await un(C,t.startLabelLeft,Vo(t.labelStyle)||"",!1,!1);x=k;let S=k.getBBox();if(a){const T=k.children[0],_=Ut(k);S=T.getBoundingClientRect(),_.attr("width",S.width),_.attr("height",S.height)}C.attr("transform",Po(S,a)),ii.get(t.id)||ii.set(t.id,{}),ii.get(t.id).startLeft=y,nc(x,t.startLabelLeft)}if(t.startLabelRight){const y=e.insert("g").attr("class","edgeTerminals"),C=y.insert("g").attr("class","inner"),k=await un(C,t.startLabelRight,Vo(t.labelStyle)||"",!1,!1);x=k;let S=k.getBBox();if(a){const T=k.children[0],_=Ut(k);S=T.getBoundingClientRect(),_.attr("width",S.width),_.attr("height",S.height)}C.attr("transform",Po(S,a)),ii.get(t.id)||ii.set(t.id,{}),ii.get(t.id).startRight=y,nc(x,t.startLabelRight)}if(t.endLabelLeft){const y=e.insert("g").attr("class","edgeTerminals"),C=y.insert("g").attr("class","inner"),k=await un(y,t.endLabelLeft,Vo(t.labelStyle)||"",!1,!1);x=k;let S=k.getBBox();if(a){const T=k.children[0],_=Ut(k);S=T.getBoundingClientRect(),_.attr("width",S.width),_.attr("height",S.height)}C.attr("transform",Po(S,a)),ii.get(t.id)||ii.set(t.id,{}),ii.get(t.id).endLeft=y,nc(x,t.endLabelLeft)}if(t.endLabelRight){const y=e.insert("g").attr("class","edgeTerminals"),C=y.insert("g").attr("class","inner"),k=await un(y,t.endLabelRight,Vo(t.labelStyle)||"",!1,!1);x=k;let S=k.getBBox();if(a){const T=k.children[0],_=Ut(k);S=T.getBoundingClientRect(),_.attr("width",S.width),_.attr("height",S.height)}C.attr("transform",Po(S,a)),ii.get(t.id)||ii.set(t.id,{}),ii.get(t.id).endRight=y,nc(x,t.endLabelRight)}return f},"insertEdgeLabel");function nc(e,t){Ci(ee())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}v(nc,"setTerminalWidth");var xz=v((e,t)=>{gt.debug("Moving label abc88 ",e.id,e.label,hd.get(e.id),t);let i=t.updatedPath?t.updatedPath:t.originalPath;const a=ee(),{subGraphTitleTotalMargin:s}=My(a);if(e.label){const l=hd.get(e.id);let c=e.x,h=e.y;if(i){const d=Cr.calcLabelPosition(i);gt.debug("Moving label "+e.label+" from (",c,",",h,") to (",d.x,",",d.y,") abc88"),t.updatedPath&&(c=d.x,h=d.y)}l.attr("transform",`translate(${c}, ${h+s/2})`)}if(e.startLabelLeft){const l=ii.get(e.id).startLeft;let c=e.x,h=e.y;if(i){const d=Cr.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",i);c=d.x,h=d.y}l.attr("transform",`translate(${c}, ${h})`)}if(e.startLabelRight){const l=ii.get(e.id).startRight;let c=e.x,h=e.y;if(i){const d=Cr.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",i);c=d.x,h=d.y}l.attr("transform",`translate(${c}, ${h})`)}if(e.endLabelLeft){const l=ii.get(e.id).endLeft;let c=e.x,h=e.y;if(i){const d=Cr.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",i);c=d.x,h=d.y}l.attr("transform",`translate(${c}, ${h})`)}if(e.endLabelRight){const l=ii.get(e.id).endRight;let c=e.x,h=e.y;if(i){const d=Cr.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",i);c=d.x,h=d.y}l.attr("transform",`translate(${c}, ${h})`)}},"positionEdgeLabel"),bz=v((e,t)=>{const i=e.x,a=e.y,s=Math.abs(t.x-i),l=Math.abs(t.y-a),c=e.width/2,h=e.height/2;return s>=c||l>=h},"outsideNode"),Cz=v((e,t,i)=>{gt.debug(`intersection calc abc89:
370
+ outsidePoint: ${JSON.stringify(t)}
371
+ insidePoint : ${JSON.stringify(i)}
372
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const a=e.x,s=e.y,l=Math.abs(a-i.x),c=e.width/2;let h=i.x<t.x?c-l:c+l;const d=e.height/2,f=Math.abs(t.y-i.y),p=Math.abs(t.x-i.x);if(Math.abs(s-t.y)*c>Math.abs(a-t.x)*d){let g=i.y<t.y?t.y-d-s:s-d-t.y;h=p*g/f;const x={x:i.x<t.x?i.x+h:i.x-p+h,y:i.y<t.y?i.y+f-g:i.y-f+g};return h===0&&(x.x=t.x,x.y=t.y),p===0&&(x.x=t.x),f===0&&(x.y=t.y),gt.debug(`abc89 top/bottom calc, Q ${f}, q ${g}, R ${p}, r ${h}`,x),x}else{i.x<t.x?h=t.x-c-a:h=a-c-t.x;let g=f*h/p,x=i.x<t.x?i.x+p-h:i.x-p+h,y=i.y<t.y?i.y+g:i.y-g;return gt.debug(`sides calc abc89, Q ${f}, q ${g}, R ${p}, r ${h}`,{_x:x,_y:y}),h===0&&(x=t.x,y=t.y),p===0&&(x=t.x),f===0&&(y=t.y),{x,y}}},"intersection"),O2=v((e,t)=>{gt.warn("abc88 cutPathAtIntersect",e,t);let i=[],a=e[0],s=!1;return e.forEach(l=>{if(gt.info("abc88 checking point",l,t),!bz(t,l)&&!s){const c=Cz(t,a,l);gt.debug("abc88 inside",l,a,c),gt.debug("abc88 intersection",c,t);let h=!1;i.forEach(d=>{h=h||d.x===c.x&&d.y===c.y}),i.some(d=>d.x===c.x&&d.y===c.y)?gt.warn("abc88 no intersect",c,i):i.push(c),s=!0}else gt.warn("abc88 outside",l,a),a=l,s||i.push(l)}),gt.debug("returning points",i),i},"cutPathAtIntersect");function I_(e){const t=[],i=[];for(let a=1;a<e.length-1;a++){const s=e[a-1],l=e[a],c=e[a+1];(s.x===l.x&&l.y===c.y&&Math.abs(l.x-c.x)>5&&Math.abs(l.y-s.y)>5||s.y===l.y&&l.x===c.x&&Math.abs(l.x-s.x)>5&&Math.abs(l.y-c.y)>5)&&(t.push(l),i.push(a))}return{cornerPoints:t,cornerPointPositions:i}}v(I_,"extractCornerPoints");var F2=v(function(e,t,i){const a=t.x-e.x,s=t.y-e.y,l=Math.sqrt(a*a+s*s),c=i/l;return{x:t.x-c*a,y:t.y-c*s}},"findAdjacentPoint"),kz=v(function(e){const{cornerPointPositions:t}=I_(e),i=[];for(let a=0;a<e.length;a++)if(t.includes(a)){const s=e[a-1],l=e[a+1],c=e[a],h=F2(s,c,5),d=F2(l,c,5),f=d.x-h.x,p=d.y-h.y;i.push(h);const g=Math.sqrt(2)*2;let x={x:c.x,y:c.y};if(Math.abs(l.x-s.x)>10&&Math.abs(l.y-s.y)>=10){gt.debug("Corner point fixing",Math.abs(l.x-s.x),Math.abs(l.y-s.y));const y=5;c.x===h.x?x={x:f<0?h.x-y+g:h.x+y-g,y:p<0?h.y-g:h.y+g}:x={x:f<0?h.x-g:h.x+g,y:p<0?h.y-y+g:h.y+y-g}}else gt.debug("Corner point skipping fixing",Math.abs(l.x-s.x),Math.abs(l.y-s.y));i.push(x,d)}else i.push(e[a]);return i},"fixCorners"),vz=v((e,t,i)=>{const a=e-t-i,s=2,l=2,c=s+l,h=Math.floor(a/c),d=Array(h).fill(`${s} ${l}`).join(" ");return`0 ${t} ${d} ${i}`},"generateDashArray"),Sz=v(function(e,t,i,a,s,l,c,h=!1){if(!c)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:d}=ee();let f=t.points,p=!1;const g=s;var x=l;const y=[];for(const $ in t.cssCompiledStyles)NT($)||y.push(t.cssCompiledStyles[$]);gt.debug("UIO intersect check",t.points,x.x,g.x),x.intersect&&g.intersect&&!h&&(f=f.slice(1,t.points.length-1),f.unshift(g.intersect(f[0])),gt.debug("Last point UIO",t.start,"-->",t.end,f[f.length-1],x,x.intersect(f[f.length-1])),f.push(x.intersect(f[f.length-1])));const C=btoa(JSON.stringify(f));t.toCluster&&(gt.info("to cluster abc88",i.get(t.toCluster)),f=O2(t.points,i.get(t.toCluster).node),p=!0),t.fromCluster&&(gt.debug("from cluster abc88",i.get(t.fromCluster),JSON.stringify(f,null,2)),f=O2(f.reverse(),i.get(t.fromCluster).node).reverse(),p=!0);let k=f.filter($=>!Number.isNaN($.y));const S=mz(t.curve);S!=="rounded"&&(k=kz(k));let T=cc;switch(S){case"linear":T=cc;break;case"basis":T=Wg;break;case"cardinal":T=wv;break;case"bumpX":T=Cv;break;case"bumpY":T=kv;break;case"catmullRom":T=Bv;break;case"monotoneX":T=Ov;break;case"monotoneY":T=Fv;break;case"natural":T=$v;break;case"step":T=zv;break;case"stepAfter":T=qv;break;case"stepBefore":T=Nv;break;case"rounded":T=cc;break;default:T=Wg}const{x:_,y:E}=y6(t),M=tD().x(_).y(E).curve(T);let O;switch(t.thickness){case"normal":O="edge-thickness-normal";break;case"thick":O="edge-thickness-thick";break;case"invisible":O="edge-thickness-invisible";break;default:O="edge-thickness-normal"}switch(t.pattern){case"solid":O+=" edge-pattern-solid";break;case"dotted":O+=" edge-pattern-dotted";break;case"dashed":O+=" edge-pattern-dashed";break;default:O+=" edge-pattern-solid"}let N,H=S==="rounded"?H_(U_(k,t),5):M(k);const j=Array.isArray(t.style)?t.style:[t.style];let lt=j.find($=>$?.startsWith("stroke:")),G="";t.animate&&(G="edge-animation-fast"),t.animation&&(G="edge-animation-"+t.animation);let D=!1;if(t.look==="handDrawn"){const $=St.svg(e);Object.assign([],k);const U=$.path(H,{roughness:.3,seed:d});O+=" transition",N=Ut(U).select("path").attr("id",`${c}-${t.id}`).attr("class"," "+O+(t.classes?" "+t.classes:"")+(G?" "+G:"")).attr("style",j?j.reduce((nt,R)=>nt+";"+R,""):"");let it=N.attr("d");N.attr("d",it),e.node().appendChild(N.node())}else{const $=y.join(";"),U=j?j.reduce((ft,xt)=>ft+xt+";",""):"",it=($?$+";"+U+";":U)+";"+(j?j.reduce((ft,xt)=>ft+";"+xt,""):"");N=e.append("path").attr("d",H).attr("id",`${c}-${t.id}`).attr("class"," "+O+(t.classes?" "+t.classes:"")+(G?" "+G:"")).attr("style",it),lt=it.match(/stroke:([^;]+)/)?.[1],D=t.animate===!0||!!t.animation||$.includes("animation");const nt=N.node(),R=typeof nt.getTotalLength=="function"?nt.getTotalLength():0,J=X1[t.arrowTypeStart]||0,ct=X1[t.arrowTypeEnd]||0;if(t.look==="neo"&&!D){const xt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?vz(R,J,ct):`0 ${J} ${R-J-ct} ${ct}`}; stroke-dashoffset: 0;`;N.attr("style",xt+N.attr("style"))}}N.attr("data-edge",!0),N.attr("data-et","edge"),N.attr("data-id",t.id),N.attr("data-points",C),N.attr("data-look",Ge(t.look)),t.showPoints&&k.forEach($=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",$.x).attr("cy",$.y)});let Z="";(ee().flowchart.arrowMarkerAbsolute||ee().state.arrowMarkerAbsolute)&&(Z=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,Z=Z.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),gt.info("arrowTypeStart",t.arrowTypeStart),gt.info("arrowTypeEnd",t.arrowTypeEnd);const tt=!D&&t?.look==="neo";fz(N,t,Z,c,a,tt,lt);const W=Math.floor(f.length/2),P=f[W];Cr.isLabelCoordinateInPath(P,N.attr("d"))||(p=!0);let A={};return p&&(A.updatedPath=f),A.originalPath=t.points,A},"insertEdge");function H_(e,t){if(e.length<2)return"";let i="";const a=e.length,s=1e-5;for(let l=0;l<a;l++){const c=e[l],h=e[l-1],d=e[l+1];if(l===0)i+=`M${c.x},${c.y}`;else if(l===a-1)i+=`L${c.x},${c.y}`;else{const f=c.x-h.x,p=c.y-h.y,g=d.x-c.x,x=d.y-c.y,y=Math.hypot(f,p),C=Math.hypot(g,x);if(y<s||C<s){i+=`L${c.x},${c.y}`;continue}const k=f/y,S=p/y,T=g/C,_=x/C,E=k*T+S*_,M=Math.max(-1,Math.min(1,E)),O=Math.acos(M);if(O<s||Math.abs(Math.PI-O)<s){i+=`L${c.x},${c.y}`;continue}const N=Math.min(t/Math.sin(O/2),y/2,C/2),H=c.x-k*N,j=c.y-S*N,lt=c.x+T*N,G=c.y+_*N;i+=`L${H},${j}`,i+=`Q${c.x},${c.y} ${lt},${G}`}}return i}v(H_,"generateRoundedPath");function km(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const i=t.x-e.x,a=t.y-e.y;return{angle:Math.atan2(a,i),deltaX:i,deltaY:a}}v(km,"calculateDeltaAndAngle");function U_(e,t){const i=e.map(s=>({...s}));if(e.length>=2&&oi[t.arrowTypeStart]){const s=oi[t.arrowTypeStart],l=e[0],c=e[1],{angle:h}=km(l,c),d=s*Math.cos(h),f=s*Math.sin(h);i[0].x=l.x+d,i[0].y=l.y+f}const a=e.length;if(a>=2&&oi[t.arrowTypeEnd]){const s=oi[t.arrowTypeEnd],l=e[a-1],c=e[a-2],{angle:h}=km(c,l),d=s*Math.cos(h),f=s*Math.sin(h);i[a-1].x=l.x-d,i[a-1].y=l.y-f}return i}v(U_,"applyMarkerOffsetsToPoints");var Tz=v((e,t,i,a)=>{t.forEach(s=>{Gz[s](e,i,a)})},"insertMarkers"),wz=v((e,t,i)=>{gt.trace("Making markers for ",i),e.append("defs").append("marker").attr("id",i+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",i+"_"+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"),e.append("marker").attr("id",i+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",i+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),_z=v((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+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",i+"_"+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"),e.append("defs").append("marker").attr("id",i+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Bz=v((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+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",i+"_"+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"),e.append("defs").append("marker").attr("id",i+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Ez=v((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+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",i+"_"+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"),e.append("defs").append("marker").attr("id",i+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Lz=v((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+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("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",i+"_"+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("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",i+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",i+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),Az=v((e,t,i)=>{e.append("marker").attr("id",i+"_"+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",i+"_"+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"),e.append("marker").attr("id",i+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),Mz=v((e,t,i)=>{e.append("marker").attr("id",i+"_"+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",i+"_"+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"),e.append("marker").attr("id",i+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),Rz=v((e,t,i)=>{e.append("marker").attr("id",i+"_"+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",i+"_"+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"),e.append("marker").attr("id",i+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",i+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),Oz=v((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+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"),Fz=v((e,t,i)=>{const a=Te(),{themeVariables:s}=a,{transitionColor:l}=s;e.append("defs").append("marker").attr("id",i+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${l}`)},"barbNeo"),Dz=v((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+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",i+"_"+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"),$z=v((e,t,i)=>{const a=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),a.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),zz=v((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+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",i+"_"+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"),Nz=v((e,t,i)=>{const a=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),a.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),qz=v((e,t,i)=>{const a=Te(),{themeVariables:s}=a,{strokeWidth:l}=s;e.append("defs").append("marker").attr("id",i+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${l}`),e.append("defs").append("marker").attr("id",i+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${l}`)},"only_one_neo"),Iz=v((e,t,i)=>{const a=Te(),{themeVariables:s}=a,{strokeWidth:l,mainBkg:c}=s,h=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");h.append("circle").attr("fill",c??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${l}`).attr("r",6),h.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${l}`);const d=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");d.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${l}`).attr("r",6),d.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${l}`)},"zero_or_one_neo"),Hz=v((e,t,i)=>{const a=Te(),{themeVariables:s}=a,{strokeWidth:l}=s;e.append("defs").append("marker").attr("id",i+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${l}`),e.append("defs").append("marker").attr("id",i+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${l}`)},"one_or_more_neo"),Uz=v((e,t,i)=>{const a=Te(),{themeVariables:s}=a,{strokeWidth:l,mainBkg:c}=s,h=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");h.append("circle").attr("fill",c??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${l}`),h.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${l}`);const d=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");d.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${l}`),d.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${l}`)},"zero_or_more_neo"),jz=v((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
373
+ L20,10
374
+ M20,10
375
+ L0,20`)},"requirement_arrow"),Pz=v((e,t,i)=>{const a=Te(),{themeVariables:s}=a,{strokeWidth:l}=s;e.append("defs").append("marker").attr("id",i+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${l}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
376
+ L20,10
377
+ M20,10
378
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Wz=v((e,t,i)=>{const a=e.append("defs").append("marker").attr("id",i+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Yz=v((e,t,i)=>{const a=Te(),{themeVariables:s}=a,{strokeWidth:l}=s,c=e.append("defs").append("marker").attr("id",i+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");c.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),c.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),c.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),c.selectAll("*").attr("stroke-width",`${l}`)},"requirement_contains_neo"),Gz={extension:wz,composition:_z,aggregation:Bz,dependency:Ez,lollipop:Lz,point:Az,circle:Mz,cross:Rz,barb:Oz,barbNeo:Fz,only_one:Dz,zero_or_one:$z,one_or_more:zz,zero_or_more:Nz,only_one_neo:qz,zero_or_one_neo:Iz,one_or_more_neo:Hz,zero_or_more_neo:Uz,requirement_arrow:jz,requirement_contains:Wz,requirement_arrow_neo:Pz,requirement_contains_neo:Yz},Xz=Tz,Vz={common:Ac,getConfig:Te,insertCluster:Y8,insertEdge:Sz,insertEdgeLabel:yz,insertMarkers:Xz,insertNode:q_,interpolateToCurve:wy,labelHelper:Ft,log:gt,positionEdgeLabel:xz},Sc={},j_=v(e=>{for(const t of e)Sc[t.name]=t},"registerLayoutLoaders"),Zz=v(()=>{j_([{name:"dagre",loader:v(async()=>await Zt(()=>import("./dagre-BM42HDAG-C9SDvHaG.js"),__vite__mapDeps([0,1,2])),"loader")},{name:"cose-bilkent",loader:v(async()=>await Zt(()=>import("./cose-bilkent-S5V4N54A-B7oR3DyP.js"),__vite__mapDeps([3,4])),"loader")}])},"registerDefaultLayoutLoaders");Zz();var rI=v(async(e,t)=>{if(!(e.layoutAlgorithm in Sc))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const p of e.nodes){const g=p.domId||p.id;p.domId=`${e.diagramId}-${g}`}const i=Sc[e.layoutAlgorithm],a=await i.loader(),{theme:s,themeVariables:l}=e.config,{useGradient:c,gradientStart:h,gradientStop:d}=l,f=t.attr("id");if(t.append("defs").append("filter").attr("id",`${f}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${f}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),c){const p=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");p.append("svg:stop").attr("offset","0%").attr("stop-color",h).attr("stop-opacity",1),p.append("svg:stop").attr("offset","100%").attr("stop-color",d).attr("stop-opacity",1)}return a.render(e,t,Vz,{algorithm:i.algorithm})},"render"),aI=v((e="",{fallback:t="dagre"}={})=>{if(e in Sc)return e;if(t in Sc)return gt.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"),Yy="comm",P_="rule",W_="decl",Qz="@media",Kz="@import",Jz="@supports",tN="@namespace",vm="@keyframes",Y_="@layer",eN="@scope",iN=Math.abs,uc=String.fromCharCode;function G_(e){return e.trim()}function Sm(e,t,i){return e.replace(t,i)}function dl(e,t){return e.charCodeAt(t)|0}function Ol(e,t,i){return e.slice(t,i)}function Ir(e){return e.length}function X_(e){return e.length}function fu(e,t){return t.push(e),e}var Fd=1,Fl=1,V_=0,lr=0,qe=0,Ul="";function Gy(e,t,i,a,s,l,c,h){return{value:e,root:t,parent:i,type:a,props:s,children:l,line:Fd,column:Fl,length:c,return:"",siblings:h}}function rN(){return qe}function aN(){return qe=lr>0?dl(Ul,--lr):0,Fl--,qe===10&&(Fl=1,Fd--),qe}function Sr(){return qe=lr<V_?dl(Ul,lr++):0,Fl++,qe===10&&(Fl=1,Fd++),qe}function dn(){return dl(Ul,lr)}function Eu(){return lr}function Dd(e,t){return Ol(Ul,e,t)}function Tc(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 nN(e){return Fd=Fl=1,V_=Ir(Ul=e),lr=0,[]}function sN(e){return Ul="",e}function xg(e){return G_(Dd(lr-1,Tm(e===91?e+2:e===40?e+1:e)))}function lN(e){for(;(qe=dn())&&qe<33;)Sr();return Tc(e)>2||Tc(qe)>3?"":" "}function oN(e,t){for(;--t&&Sr()&&!(qe<48||qe>102||qe>57&&qe<65||qe>70&&qe<97););return Dd(e,Eu()+(t<6&&dn()==32&&Sr()==32))}function Tm(e){for(;Sr();)switch(qe){case e:return lr;case 34:case 39:e!==34&&e!==39&&Tm(qe);break;case 40:e===41&&Tm(e);break;case 92:Sr();break}return lr}function cN(e,t){for(;Sr()&&e+qe!==57;)if(e+qe===84&&dn()===47)break;return"/*"+Dd(t,lr-1)+"*"+uc(e===47?e:Sr())}function hN(e){for(;!Tc(dn());)Sr();return Dd(e,lr)}function uN(e){return sN(Lu("",null,null,null,[""],e=nN(e),0,[0],e))}function Lu(e,t,i,a,s,l,c,h,d){for(var f=0,p=0,g=c,x=0,y=0,C=0,k=1,S=1,T=1,_=0,E=0,M="",O=s,N=l,H=a,j=M;S;)switch(C=E,E=Sr()){case 40:C!=108&&dl(j,g-1)==58?(_++,j+="("):j+=xg(E);break;case 41:_--,j+=")";break;case 34:case 39:case 91:j+=xg(E);break;case 9:case 10:case 13:case 32:if(_>0){j+=uc(E);break}j+=lN(C);break;case 92:j+=oN(Eu()-1,7);continue;case 47:switch(dn()){case 42:case 47:fu(dN(cN(Sr(),Eu()),t,i,d),d),(Tc(C||1)==5||Tc(dn()||1)==5)&&Ir(j)&&Ol(j,-1,void 0)!==" "&&(j+=" ");break;default:j+="/"}break;case 123*k:h[f++]=Ir(j)*T;case 125*k:case 59:case 0:if(_>0&&E){j+=uc(E);break}switch(E){case 0:case 125:S=0;case 59+p:T==-1&&(j=Sm(j,/\f/g,"")),y>0&&(Ir(j)-g||k===0)&&fu(y>32?$2(j+";",a,i,g-1,d):$2(Sm(j," ","")+";",a,i,g-2,d),d);break;case 59:j+=";";default:if(fu(H=D2(j,t,i,f,p,s,h,M,O=[],N=[],g,l),l),E===123)if(p===0)Lu(j,t,H,H,O,l,g,h,N);else{switch(x){case 99:if(dl(j,3)===110)break;case 108:if(dl(j,2)===97)break;default:p=0;case 100:case 109:case 115:}p?Lu(e,H,H,a&&fu(D2(e,H,H,0,0,s,h,M,s,O=[],g,N),N),s,N,g,h,a?O:N):Lu(j,H,H,H,[""],N,0,h,N)}}f=p=y=0,k=T=1,M=j="",g=c;break;case 58:g=1+Ir(j),y=C;default:if(k<1){if(E==123)--k;else if(E==125&&k++==0&&aN()==125)continue}switch(j+=uc(E),E*k){case 38:T=p>0?1:(j+="\f",-1);break;case 44:if(_>0)break;h[f++]=(Ir(j)-1)*T,T=1;break;case 64:dn()===45&&(j+=xg(Sr())),x=dn(),p=g=Ir(M=j+=hN(Eu())),E++;break;case 45:C===45&&Ir(j)==2&&(k=0)}}return l}function D2(e,t,i,a,s,l,c,h,d,f,p,g){for(var x=s-1,y=s===0?l:[""],C=X_(y),k=0,S=0,T=0;k<a;++k)for(var _=0,E=Ol(e,x+1,x=iN(S=c[k])),M=e;_<C;++_)(M=G_(S>0?y[_]+" "+E:Sm(E,/&\f/g,y[_])))&&(d[T++]=M);return Gy(e,t,i,s===0?P_:h,d,f,p,g)}function dN(e,t,i,a){return Gy(e,t,i,Yy,uc(rN()),Ol(e,2,-2),0,a)}function $2(e,t,i,a,s){return Gy(e,t,i,W_,Ol(e,0,a),Ol(e,a+1,-1),a,s)}function wm(e,t){for(var i="",a=0;a<e.length;a++)i+=t(e[a],a,e,t)||"";return i}function fN(e,t,i,a){switch(e.type){case Y_:if(e.children.length)break;case Kz:case tN:case W_:return e.return=e.return||e.value;case Yy:return"";case vm:return e.return=e.value+"{"+wm(e.children,a)+"}";case P_:if(!Ir(e.value=e.props.join(",")))return""}return Ir(i=wm(e.children,a))?e.return=e.value+"{"+i+"}":""}function pN(e){var t=X_(e);return function(i,a,s,l){for(var c="",h=0;h<t;h++)c+=e[h](i,a,s,l)||"";return c}}var Z_="c4",gN=v(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),mN=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./c4Diagram-AAUBKEIU-DlS4uT1_.js");return{diagram:t}},__vite__mapDeps([5,6]));return{id:Z_,diagram:e}},"loader"),yN={id:Z_,detector:gN,loader:mN},xN=yN,Q_="flowchart",bN=v((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),CN=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-DrEzlHME.js");return{diagram:t}},__vite__mapDeps([7,8,6,9,10,11]));return{id:Q_,diagram:e}},"loader"),kN={id:Q_,detector:bN,loader:CN},vN=kN,K_="flowchart-v2",SN=v((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),TN=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-DrEzlHME.js");return{diagram:t}},__vite__mapDeps([7,8,6,9,10,11]));return{id:K_,diagram:e}},"loader"),wN={id:K_,detector:SN,loader:TN},_N=wN,J_="er",BN=v(e=>/^\s*erDiagram/.test(e),"detector"),EN=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./erDiagram-TEJ5UH35-C8E_aGnu.js");return{diagram:t}},__vite__mapDeps([12,9,10,11]));return{id:J_,diagram:e}},"loader"),LN={id:J_,detector:BN,loader:EN},AN=LN,tB="gitGraph",MN=v(e=>/^\s*gitGraph/.test(e),"detector"),RN=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PVQCEYII-BvrAMgme.js");return{diagram:t}},__vite__mapDeps([13,14,15,16]));return{id:tB,diagram:e}},"loader"),ON={id:tB,detector:MN,loader:RN},FN=ON,eB="gantt",DN=v(e=>/^\s*gantt/.test(e),"detector"),$N=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./ganttDiagram-6RSMTGT7-ritdFwn_.js");return{diagram:t}},__vite__mapDeps([17,18,19,20]));return{id:eB,diagram:e}},"loader"),zN={id:eB,detector:DN,loader:$N},NN=zN,iB="info",qN=v(e=>/^\s*info/.test(e),"detector"),IN=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./infoDiagram-5YYISTIA-DGo9iAf1.js");return{diagram:t}},__vite__mapDeps([21,16]));return{id:iB,diagram:e}},"loader"),HN={id:iB,detector:qN,loader:IN},rB="pie",UN=v(e=>/^\s*pie/.test(e),"detector"),jN=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./pieDiagram-4H26LBE5-LJC7tux2.js");return{diagram:t}},__vite__mapDeps([22,14,16,23,24,19]));return{id:rB,diagram:e}},"loader"),PN={id:rB,detector:UN,loader:jN},aB="quadrantChart",WN=v(e=>/^\s*quadrantChart/.test(e),"detector"),YN=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./quadrantDiagram-W4KKPZXB-ma2mZhGO.js");return{diagram:t}},__vite__mapDeps([25,18,19,20]));return{id:aB,diagram:e}},"loader"),GN={id:aB,detector:WN,loader:YN},XN=GN,nB="xychart",VN=v(e=>/^\s*xychart(-beta)?/.test(e),"detector"),ZN=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./xychartDiagram-2RQKCTM6-Dsl9_fgE.js");return{diagram:t}},__vite__mapDeps([26,19,24,18,20]));return{id:nB,diagram:e}},"loader"),QN={id:nB,detector:VN,loader:ZN},KN=QN,sB="requirement",JN=v(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),t9=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./requirementDiagram-4Y6WPE33-BaQWRwJt.js");return{diagram:t}},__vite__mapDeps([27,9,10]));return{id:sB,diagram:e}},"loader"),e9={id:sB,detector:JN,loader:t9},i9=e9,lB="sequence",r9=v(e=>/^\s*sequenceDiagram/.test(e),"detector"),a9=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./sequenceDiagram-3UESZ5HK-w-6ftIn5.js");return{diagram:t}},__vite__mapDeps([28,6,15]));return{id:lB,diagram:e}},"loader"),n9={id:lB,detector:r9,loader:a9},s9=n9,oB="class",l9=v((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),o9=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./classDiagram-4FO5ZUOK-DphUz-_B.js");return{diagram:t}},__vite__mapDeps([29,30,8,6,9,10]));return{id:oB,diagram:e}},"loader"),c9={id:oB,detector:l9,loader:o9},h9=c9,cB="classDiagram",u9=v((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),d9=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./classDiagram-v2-Q7XG4LA2-DphUz-_B.js");return{diagram:t}},__vite__mapDeps([31,30,8,6,9,10]));return{id:cB,diagram:e}},"loader"),f9={id:cB,detector:u9,loader:d9},p9=f9,hB="state",g9=v((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),m9=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./stateDiagram-AJRCARHV-bk2slbvF.js");return{diagram:t}},__vite__mapDeps([32,33,9,10,1,2]));return{id:hB,diagram:e}},"loader"),y9={id:hB,detector:g9,loader:m9},x9=y9,uB="stateDiagram",b9=v((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),C9=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-BHNVJYJU-CmaVLj5D.js");return{diagram:t}},__vite__mapDeps([34,33,9,10]));return{id:uB,diagram:e}},"loader"),k9={id:uB,detector:b9,loader:C9},v9=k9,dB="journey",S9=v(e=>/^\s*journey/.test(e),"detector"),T9=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./journeyDiagram-JHISSGLW-CfDkxnhu.js");return{diagram:t}},__vite__mapDeps([35,8,6,23]));return{id:dB,diagram:e}},"loader"),w9={id:dB,detector:S9,loader:T9},_9=w9,B9=v((e,t,i)=>{gt.debug(`rendering svg for syntax error
379
+ `);const a=cD(t),s=a.append("g");a.attr("viewBox","0 0 2412 512"),jk(a,100,512,!0),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${i}`)},"draw"),fB={draw:B9},E9=fB,L9={db:{},renderer:fB,parser:{parse:v(()=>{},"parse")}},A9=L9,pB="flowchart-elk",M9=v((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),R9=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-DrEzlHME.js");return{diagram:t}},__vite__mapDeps([7,8,6,9,10,11]));return{id:pB,diagram:e}},"loader"),O9={id:pB,detector:M9,loader:R9},F9=O9,gB="timeline",D9=v(e=>/^\s*timeline/.test(e),"detector"),$9=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./timeline-definition-PNZ67QCA-Bs_476xO.js");return{diagram:t}},__vite__mapDeps([36,23]));return{id:gB,diagram:e}},"loader"),z9={id:gB,detector:D9,loader:$9},N9=z9,mB="mindmap",q9=v(e=>/^\s*mindmap/.test(e),"detector"),I9=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./mindmap-definition-RKZ34NQL-C7mBQtCS.js");return{diagram:t}},__vite__mapDeps([37,9,10]));return{id:mB,diagram:e}},"loader"),H9={id:mB,detector:q9,loader:I9},U9=H9,yB="kanban",j9=v(e=>/^\s*kanban/.test(e),"detector"),P9=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./kanban-definition-UN3LZRKU-Bf10Hgev.js");return{diagram:t}},__vite__mapDeps([38,8]));return{id:yB,diagram:e}},"loader"),W9={id:yB,detector:j9,loader:P9},Y9=W9,xB="sankey",G9=v(e=>/^\s*sankey(-beta)?/.test(e),"detector"),X9=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./sankeyDiagram-5OEKKPKP-ejOS7WnA.js");return{diagram:t}},__vite__mapDeps([39,24,19]));return{id:xB,diagram:e}},"loader"),V9={id:xB,detector:G9,loader:X9},Z9=V9,bB="packet",Q9=v(e=>/^\s*packet(-beta)?/.test(e),"detector"),K9=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./diagram-LMA3HP47-DsqAP__t.js");return{diagram:t}},__vite__mapDeps([40,14,16]));return{id:bB,diagram:e}},"loader"),J9={id:bB,detector:Q9,loader:K9},CB="radar",tq=v(e=>/^\s*radar-beta/.test(e),"detector"),eq=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./diagram-2AECGRRQ-DfNzoPmb.js");return{diagram:t}},__vite__mapDeps([41,14,16]));return{id:CB,diagram:e}},"loader"),iq={id:CB,detector:tq,loader:eq},kB="block",rq=v(e=>/^\s*block(-beta)?/.test(e),"detector"),aq=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./blockDiagram-GPEHLZMM-BCL5dg7K.js");return{diagram:t}},__vite__mapDeps([42,8,1,11]));return{id:kB,diagram:e}},"loader"),nq={id:kB,detector:rq,loader:aq},sq=nq,vB="treeView",lq=v(e=>/^\s*treeView-beta/.test(e),"detector"),oq=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./diagram-5GNKFQAL-BkzSh7ps.js");return{diagram:t}},__vite__mapDeps([43,14,15,16]));return{id:vB,diagram:e}},"loader"),cq={id:vB,detector:lq,loader:oq},hq=cq,SB="architecture",uq=v(e=>/^\s*architecture/.test(e),"detector"),dq=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./architectureDiagram-3BPJPVTR-DMBx-2Be.js");return{diagram:t}},__vite__mapDeps([44,14,16,4]));return{id:SB,diagram:e}},"loader"),fq={id:SB,detector:uq,loader:dq},pq=fq,TB="eventmodeling",gq=v(e=>/^\s*eventmodeling/.test(e),"detector"),mq=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./diagram-KO2AKTUF-Co760L_W.js");return{diagram:t}},__vite__mapDeps([45,14,16]));return{id:TB,diagram:e}},"loader"),yq={id:TB,detector:gq,loader:mq},xq=yq,wB="ishikawa",bq=v(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),Cq=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-YF4QCWOH-DrSVzjbw.js");return{diagram:t}},[]);return{id:wB,diagram:e}},"loader"),kq={id:wB,detector:bq,loader:Cq},_B="venn",vq=v(e=>/^\s*venn-beta/.test(e),"detector"),Sq=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./vennDiagram-CIIHVFJN-BD9aC-Oh.js");return{diagram:t}},[]);return{id:_B,diagram:e}},"loader"),Tq={id:_B,detector:vq,loader:Sq},wq=Tq,BB="treemap",_q=v(e=>/^\s*treemap/.test(e),"detector"),Bq=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./diagram-OG6HWLK6-CIswB7UK.js");return{diagram:t}},__vite__mapDeps([46,10,14,16,20,24,19]));return{id:BB,diagram:e}},"loader"),Eq={id:BB,detector:_q,loader:Bq},EB="wardley-beta",Lq=v(e=>/^\s*wardley-beta/i.test(e),"detector"),Aq=v(async()=>{const{diagram:e}=await Zt(async()=>{const{diagram:t}=await import("./wardleyDiagram-YWT4CUSO-CQwbXcsV.js");return{diagram:t}},__vite__mapDeps([47,14,16]));return{id:EB,diagram:e}},"loader"),Mq={id:EB,detector:Lq,loader:Aq},Rq=Mq,z2=!1,$d=v(()=>{z2||(z2=!0,qu("error",A9,e=>e.toLowerCase().trim()==="error"),qu("---",{db:{clear:v(()=>{},"clear")},styles:{},renderer:{draw:v(()=>{},"draw")},parser:{parse:v(()=>{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:v(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Ag(F9,U9,pq),Ag(xN,Y9,p9,h9,AN,NN,HN,PN,i9,s9,_N,vN,N9,FN,v9,x9,_9,XN,Z9,J9,KN,sq,xq,hq,iq,kq,Eq,wq,Rq))},"addDiagrams"),Oq=v(async()=>{gt.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Jn).map(async([i,{detector:a,loader:s}])=>{if(s)try{Dg(i)}catch{try{const{diagram:l,id:c}=await s();qu(c,l,a)}catch(l){throw gt.error(`Failed to load external diagram with key ${i}. Removing from detectors.`),delete Jn[i],l}}}))).filter(i=>i.status==="rejected");if(t.length>0){gt.error(`Failed to load ${t.length} external diagrams`);for(const i of t)gt.error(i);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Fq="graphics-document document";function LB(e,t){e.attr("role",Fq),t!==""&&e.attr("aria-roledescription",t)}v(LB,"setA11yDiagramInfo");function AB(e,t,i,a){if(e.insert!==void 0){if(i){const s=`chart-desc-${a}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(i)}if(t){const s=`chart-title-${a}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}v(AB,"addSVGa11yTitleDescription");var Qn,_m=(Qn=class{constructor(t,i,a,s,l){this.type=t,this.text=i,this.db=a,this.parser=s,this.renderer=l}static async fromText(t,i={}){const a=Te(),s=Vm(t,a);t=d$(t)+`
380
+ `;try{Dg(s)}catch{const f=L5(s);if(!f)throw new Ek(`Diagram ${s} not found.`);const{id:p,diagram:g}=await f();qu(p,g)}const{db:l,parser:c,renderer:h,init:d}=Dg(s);return c.parser&&(c.parser.yy=l),l.clear?.(),d?.(a),i.title&&l.setDiagramTitle?.(i.title),await c.parse(t),new Qn(s,t,l,c,h)}async render(t,i){await this.renderer.draw(this.text,t,i,this)}getParser(){return this.parser}getType(){return this.type}},v(Qn,"Diagram"),Qn),N2=[],Dq=v(()=>{N2.forEach(e=>{e()}),N2=[]},"attachFunctions"),$q=v(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function MB(e){const t=e.match(Bk);if(!t)return{text:e,metadata:{}};let i=m6(t[1],{schema:g6})??{};i=typeof i=="object"&&!Array.isArray(i)?i:{};const a={};return i.displayMode&&(a.displayMode=i.displayMode.toString()),i.title&&(a.title=i.title.toString()),i.config&&(a.config=i.config),{text:e.slice(t[0].length),metadata:a}}v(MB,"extractFrontMatter");var zq=v(e=>e.replace(/\r\n?/g,`
381
+ `).replace(/<(\w+)([^>]*)>/g,(t,i,a)=>"<"+i+a.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Nq=v(e=>{const{text:t,metadata:i}=MB(e),{displayMode:a,title:s,config:l={}}=i;return a&&(l.gantt||(l.gantt={}),l.gantt.displayMode=a),{title:s,config:l,text:t}},"processFrontmatter"),qq=v(e=>{const t=Cr.detectInit(e)??{},i=Cr.detectDirective(e,"wrap");return Array.isArray(i)?t.wrap=i.some(({type:a})=>a==="wrap"):i?.type==="wrap"&&(t.wrap=!0),{text:J6(e),directive:t}},"processDirectives");function Xy(e){const t=zq(e),i=Nq(t),a=qq(i.text),s=Ay(i.config,a.directive);return e=$q(a.text),{code:e,title:i.title,config:s}}v(Xy,"preprocessDiagram");function RB(e){const t=new TextEncoder().encode(e),i=Array.from(t,a=>String.fromCodePoint(a)).join("");return btoa(i)}v(RB,"toBase64");var Iq=5e4,Hq="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Uq="sandbox",jq="loose",Pq="http://www.w3.org/2000/svg",Wq="http://www.w3.org/1999/xlink",Yq="http://www.w3.org/1999/xhtml",Gq="100%",Xq="100%",Vq="border:0;margin:0;",Zq="margin:0",Qq="allow-top-navigation-by-user-activation allow-popups",Kq='The "iframe" tag is not supported by your browser.',Jq=["foreignobject"],t7=["dominant-baseline"];function Vy(e){const t=Xy(e);return zu(),iR(t.config??{}),t}v(Vy,"processAndSetConfigs");async function OB(e,t){$d();try{const{code:i,config:a}=Vy(e);return{diagramType:(await DB(i)).type,config:a}}catch(i){if(t?.suppressErrors)return!1;throw i}}v(OB,"parse");var q2=v((e,t,i=[])=>{const a=Ok(`{ ${i.join(" !important; ")} !important; }`);return`.${e} ${t} ${a}`},"cssImportantStyles"),e7=v((e,t=new Map)=>{const i=new CSSStyleSheet;if(e.fontFamily!==void 0&&i.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,i.cssRules.length),e.altFontFamily!==void 0&&i.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,i.cssRules.length),t instanceof Map){const h=Ci(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(d=>{J1(d.styles)||h.forEach(f=>{i.insertRule(q2(d.id,f,d.styles),i.cssRules.length)}),J1(d.textStyles)||i.insertRule(q2(d.id,"tspan",(d?.textStyles||[]).map(f=>f.replace("color","fill"))),i.cssRules.length)})}let a="";if(e.themeCSS!==void 0)if(typeof i.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),a=Fg(s)+`
382
+ `}else a+=`${e.themeCSS}
383
+ `;return a+Fg(i)},"createCssStyles"),i7=v((e,t)=>wm(uN(`${e}{${t}}`),pN([v(function(a,s,l,c){if(a.type==="rule"&&Array.isArray(a.props)){if(a.parent&&a.parent.type===vm)return;a.props=a.props.map(h=>h.startsWith(e)?h:`${e} ${h}`)}else a.type.startsWith("@")&&([...[Qz,Jz,Y_,eN,"@container","@starting-style"],vm].includes(a.type)||(gt.warn(`Removing unsupported at-rule ${a.type} from CSS`),a.type=Yy))},"addNamespace"),fN])),"compileCSS"),r7=v((e,t,i,a)=>{const s=e7(e,i),l=kR(t,s,{...e.themeVariables,theme:e.theme,look:e.look},a);return i7(a,l)},"createUserStyles"),a7=v((e="",t,i)=>{let a=e;return!i&&!t&&(a=a.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),a=rs(a),a=a.replace(/<br>/g,"<br/>"),a},"cleanUpSvgCode"),n7=v((e="",t)=>{const i=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":Xq,a=RB(`<body style="${Zq}">${e}</body>`);return`<iframe style="width:${Gq};height:${i};${Vq}" src="data:text/html;charset=UTF-8;base64,${a}" sandbox="${Qq}">
384
+ ${Kq}
385
+ </iframe>`},"putIntoIFrame"),I2=v((e,t,i,a,s)=>{const l=e.append("div");l.attr("id",i),a&&l.attr("style",a);const c=l.append("svg").attr("id",t).attr("width","100%").attr("xmlns",Pq);return s&&c.attr("xmlns:xlink",s),c.append("g"),e},"appendDivSvgG");function Bm(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}v(Bm,"sandboxedIframe");var s7=v((e,t,i,a)=>{e.getElementById(t)?.remove(),e.getElementById(i)?.remove(),e.getElementById(a)?.remove()},"removeExistingElements"),l7=v(async function(e,t,i){$d();const a=Vy(t);t=a.code;const s=Te();gt.debug(s),t.length>(s?.maxTextSize??Iq)&&(t=Hq);const l=`#${e}`,c="i"+e,h="#"+c,d="d"+e,f="#"+d,p=v(()=>{const tt=Ut(x?h:f).node();tt&&"remove"in tt&&tt.remove()},"removeTempElements");let g=Ut(document.body);const x=s.securityLevel===Uq,y=s.securityLevel===jq,C=s.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),x){const Z=Bm(Ut(i),c);g=Ut(Z.nodes()[0].contentDocument.body),g.node().style.margin="0"}else g=Ut(i);I2(g,e,d,`font-family: ${C}`,Wq)}else{if(s7(document,e,d,c),x){const Z=Bm(Ut(document.body),c);g=Ut(Z.nodes()[0].contentDocument.body),g.node().style.margin="0"}else g=Ut("body");I2(g,e,d)}let k,S;try{k=await _m.fromText(t,{title:a.title})}catch(Z){if(s.suppressErrorRendering)throw p(),Z;k=await _m.fromText("error"),S=Z}const T=g.select(f).node(),_=k.type,E=T.firstChild,M=E.firstChild,O=k.renderer.getClasses?.(t,k),N=r7(s,_,O,l),H=document.createElement("style");H.innerHTML=N,E.insertBefore(H,M);try{await k.renderer.draw(t,e,"11.15.0",k)}catch(Z){throw s.suppressErrorRendering?p():E9.draw(t,e,"11.15.0"),Z}const j=g.select(`${f} svg`),lt=k.db.getAccTitle?.(),G=k.db.getAccDescription?.();$B(_,j,lt,G),g.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",Yq);let D=g.select(f).node().innerHTML;if(gt.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),D=a7(D,x,Sa(s.arrowMarkerAbsolute)),x){const Z=g.select(f+" svg").node();D=n7(D,Z)}else y||(D=Bl.sanitize(D,{ADD_TAGS:Jq,ADD_ATTR:t7,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Dq(),S)throw S;return p(),{diagramType:_,svg:D,bindFunctions:k.db.bindFunctions}},"render");function FB(e={}){const t=je({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),tR(t),t?.theme&&t.theme in ya?t.themeVariables=ya[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ya.default.getThemeVariables(t.themeVariables));const i=typeof t=="object"?J5(t):Fk();Xm(i.logLevel),$d()}v(FB,"initialize");var DB=v((e,t={})=>{const{code:i}=Xy(e);return _m.fromText(i,t)},"getDiagramFromText");function $B(e,t,i,a){LB(t,e),AB(t,i,a,t.attr("id"))}v($B,"addA11yInfo");var ns=Object.freeze({render:l7,parse:OB,getDiagramFromText:DB,initialize:FB,getConfig:Te,setConfig:Dk,getSiteConfig:Fk,updateSiteConfig:eR,reset:v(()=>{zu()},"reset"),globalReset:v(()=>{zu(El)},"globalReset"),defaultConfig:El});Xm(Te().logLevel);zu(Te());var o7=v((e,t,i)=>{gt.warn(e),Ly(e)?(i&&i(e.str,e.hash),t.push({...e,message:e.str,error:e})):(i&&i(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),zB=v(async function(e={querySelector:".mermaid"}){try{await c7(e)}catch(t){if(Ly(t)&&gt.error(t.str),va.parseError&&va.parseError(t),!e.suppressErrors)throw gt.error("Use the suppressErrors option to suppress these errors"),t}},"run"),c7=v(async function({postRenderCallback:e,querySelector:t,nodes:i}={querySelector:".mermaid"}){const a=ns.getConfig();gt.debug(`${e?"":"No "}Callback function found`);let s;if(i)s=i;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");gt.debug(`Found ${s.length} diagrams`),a?.startOnLoad!==void 0&&(gt.debug("Start On Load: "+a?.startOnLoad),ns.updateSiteConfig({startOnLoad:a?.startOnLoad}));const l=new Cr.InitIDGenerator(a.deterministicIds,a.deterministicIDSeed);let c;const h=[];for(const d of Array.from(s)){if(gt.info("Rendering diagram: "+d.id),d.getAttribute("data-processed"))continue;d.setAttribute("data-processed","true");const f=`mermaid-${l.next()}`;c=d.innerHTML,c=QT(Cr.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>");const p=Cr.detectInit(c);p&&gt.debug("Detected early reinit: ",p);try{const{svg:g,bindFunctions:x}=await HB(f,c,d);d.innerHTML=g,e&&await e(f),x&&x(d)}catch(g){o7(g,h,va.parseError)}}if(h.length>0)throw h[0]},"runThrowsErrors"),NB=v(function(e){ns.initialize(e)},"initialize"),h7=v(async function(e,t,i){gt.warn("mermaid.init is deprecated. Please use run instead."),e&&NB(e);const a={postRenderCallback:i,querySelector:".mermaid"};typeof t=="string"?a.querySelector=t:t&&(t instanceof HTMLElement?a.nodes=[t]:a.nodes=t),await zB(a)},"init"),u7=v(async(e,{lazyLoad:t=!0}={})=>{$d(),Ag(...e),t===!1&&await Oq()},"registerExternalDiagrams"),qB=v(function(){if(va.startOnLoad){const{startOnLoad:e}=ns.getConfig();e&&va.run().catch(t=>gt.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",qB,!1);var d7=v(function(e){va.parseError=e},"setParseErrorHandler"),ud=[],bg=!1,IB=v(async()=>{if(!bg){for(bg=!0;ud.length>0;){const e=ud.shift();if(e)try{await e()}catch(t){gt.error("Error executing queue",t)}}bg=!1}},"executeQueue"),f7=v(async(e,t)=>new Promise((i,a)=>{const s=v(()=>new Promise((l,c)=>{ns.parse(e,t).then(h=>{l(h),i(h)},h=>{gt.error("Error parsing",h),va.parseError?.(h),c(h),a(h)})}),"performCall");ud.push(s),IB().catch(a)}),"parse"),HB=v((e,t,i)=>new Promise((a,s)=>{const l=v(()=>new Promise((c,h)=>{ns.render(e,t,i).then(d=>{c(d),a(d)},d=>{gt.error("Error parsing",d),va.parseError?.(d),h(d),s(d)})}),"performCall");ud.push(l),IB().catch(s)}),"render"),p7=v(()=>Object.keys(Jn).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),va={startOnLoad:!0,mermaidAPI:ns,parse:f7,render:HB,init:h7,run:zB,registerExternalDiagrams:u7,registerLayoutLoaders:j_,initialize:NB,parseError:void 0,contentLoaded:qB,setParseErrorHandler:d7,detectType:Vm,registerIconPacks:b8,getRegisteredDiagramsMetadata:p7},Em=va;Em.initialize({startOnLoad:!1,theme:"dark",themeVariables:{primaryColor:"#0ea5e9",primaryTextColor:"#e2e8f0",primaryBorderColor:"#334155",lineColor:"#94a3b8",secondaryColor:"#1e293b",tertiaryColor:"#0f172a",fontSize:"13px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'},securityLevel:"loose",flowchart:{htmlLabels:!0,curve:"basis"}});function H2(e,t){const{escapeHtml:i=!1}=t??{},a=/[├└│─╠╚═╞╟╤╪]/,s=[],l=/(```|~~~)[\s\S]*?\1/g;let c=0,h;for(;(h=l.exec(e))!==null;)h.index>c&&s.push({type:"text",content:e.slice(c,h.index)}),s.push({type:"fence",content:h[0]}),c=h.index+h[0].length;c<e.length&&s.push({type:"text",content:e.slice(c)});const d=s.map(f=>{if(f.type==="fence")return f;let p=f.content;const g=p.split(`
386
+ `),x=[];let y=!1,C=[],k=0;const S=()=>{const T=C.join(`
387
+ `);try{JSON.parse(T),x.push("\n```json\n"+T+"\n```\n")}catch{x.push(...C)}y=!1,C=[],k=0};for(const T of g){const _=T.trim();!y&&_.startsWith('{"')?(y=!0,C=[T],k=(T.match(/{/g)||[]).length-(T.match(/}/g)||[]).length,k<=0&&S()):y?(C.push(T),k+=(T.match(/{/g)||[]).length-(T.match(/}/g)||[]).length,k<=0&&S()):x.push(T)}if(C.length&&x.push(...C),p=x.join(`
388
+ `),a.test(p)){const T=p.split(`
389
+ `),_=[];let E=[];const M=()=>{E.length>0&&(_.push("\n```\n"+E.join(`
390
+ `).replace(/^\n+/,"").replace(/\n+$/,"")+"\n```\n"),E=[])};for(const O of T)a.test(O)?E.push(O):(M(),_.push(O));M(),p=_.join(`
391
+ `)}return p=p.replace(/^(#{1,6})([^\s#\n])/gm,"$1 $2"),p=p.replace(/^-([^\s\-])/gm,"- $1"),p=p.replace(/([^\n])(\n?)(#{1,6}\s)/g,(T,_,E,M)=>E&&_===`
392
+ `||/[{(\[\\/>]$/.test(_)?T:_+`
393
+
394
+ `+M),p=p.replace(/(#{1,6}\s[\u4e00-\u9fffa-zA-Z0-9\s]{1,30}?)(?=[^\u4e00-\u9fffa-zA-Z0-9\s\n#])/g,`$1
395
+ `),p=p.replace(/([^\n\s{}()\[\]"':\/\\>])(- (?!-))/g,`$1
396
+ $2`),p=p.replace(/([^\n\s{}()\[\]"':\/\\>])(\d+\.\s)/g,`$1
397
+ $2`),p=p.replace(/([^\n])(```|~~~)/g,`$1
398
+ $2`),p=p.replace(/^([\u4e00-\u9fffa-zA-Z0-9])([\u{2700}-\u{27BF}\u{1F300}-\u{1F9FF}\u{2600}-\u{26FF}])/gmu,`$1
399
+ $2`),{type:"text",content:p}});if(i){const f=[];for(const p of d){if(p.type==="fence"){f.push(p.content);continue}const g=/(```|~~~)[\s\S]*?\1/g;let x=0,y;for(;(y=g.exec(p.content))!==null;)y.index>x&&f.push(p.content.slice(x,y.index).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")),f.push(y[0]),x=y.index+y[0].length;x<p.content.length&&f.push(p.content.slice(x).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"))}return f.join("")}return d.map(f=>f.content).join("")}function U2(){const{sessionId:e}=GA(),{messages:t,isLoading:i,isHistoryLoading:a,error:s,sendMessage:l,clearMessages:c,abortChat:h,subAgents:d,thinkingStatus:f}=V3(e),{status:p}=gd(),[g,x]=I.useState(""),[y,C]=I.useState(!1),k=I.useRef(null),S=I.useRef(null),T=I.useRef(!0),_=I.useRef(null),[E,M]=I.useState(0),[O,N]=I.useState([]),[H,j]=I.useState(null),[lt,G]=I.useState(!1),[D,Z]=I.useState([]),[tt,W]=I.useState(null),[P,A]=I.useState(!1);I.useEffect(()=>{(async()=>{try{N(await me.listModels())}catch{}try{const ot=await me.getStatus();j(ot.model),W(ot.currentAgent)}catch{}try{const ot=await me.listAgents();Z(ot.agents)}catch{}})()},[]);const $=async ot=>{try{const bt=await me.switchModel(ot.id);bt.success&&j(bt.model)}catch{}G(!1)},U=async ot=>{try{const bt=await me.switchAgent(ot);bt.success&&W(bt.currentAgent)}catch{}A(!1)},it=I.useMemo(()=>{const ot=new Map;for(const bt of O){const Ot=bt.providerDisplayName??bt.provider;ot.has(Ot)||ot.set(Ot,[]),ot.get(Ot).push(bt)}return ot},[O]),nt=d.filter(ot=>ot.status==="running"),R=()=>{const ot=S.current;ot&&(T.current=ot.scrollHeight-ot.scrollTop-ot.clientHeight<80)};I.useEffect(()=>{if(!T.current)return;const ot=S.current;ot&&(i?ot.scrollTop=ot.scrollHeight:k.current?.scrollIntoView({behavior:"smooth"}))},[t,nt,f,i]),I.useEffect(()=>{if(!f){M(0);return}const ot=setInterval(()=>{M(Math.floor((Date.now()-f.startTime)/1e3))},500);return()=>clearInterval(ot)},[f]);const J=ot=>{ot.preventDefault(),g.trim()&&!i&&(T.current=!0,l(g.trim()),x("")),_.current?.focus()};I.useEffect(()=>{_.current?.focus()},[]),I.useEffect(()=>{i||_.current?.focus()},[i]),I.useEffect(()=>{const ot=bt=>{bt.key==="Escape"&&i&&(bt.preventDefault(),h())};return window.addEventListener("keydown",ot),()=>window.removeEventListener("keydown",ot)},[i,h]);const ct=I.useRef(0),ft=ot=>{ot.preventDefault(),ot.stopPropagation(),ct.current++,ot.dataTransfer.types.includes("Files")&&C(!0)},xt=ot=>{ot.preventDefault(),ot.stopPropagation(),ct.current--,ct.current===0&&C(!1)},mt=ot=>{ot.preventDefault(),ot.stopPropagation()},Ct=async ot=>{ot.preventDefault(),ot.stopPropagation(),ct.current=0,C(!1);const bt=ot.dataTransfer.files;if(bt.length===0)return;const Ot=[],jt=[];for(let pe=0;pe<bt.length;pe++){const Re=bt[pe],Oe=Re.path;Oe?Ot.push(Oe):jt.push(Re)}if(jt.length>0)try{const pe=Di=>new Promise((ki,Gr)=>{const di=new FileReader;di.onload=()=>ki(di.result),di.onerror=Gr,di.readAsDataURL(Di)}),Re=await Promise.all(jt.map(async Di=>({name:Di.name,data:(await pe(Di)).split(",")[1]}))),Oe=await fetch("/api/files/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:Re})});if(Oe.ok){const Di=await Oe.json();Ot.push(...Di.paths||[])}}catch(pe){console.error("[aggroot] File upload failed:",pe)}Ot.length!==0&&(x(pe=>{const Re=Ot.join(" ");return pe?`${pe} ${Re}`:Re}),_.current?.focus())};return z.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",position:"relative"},onDragEnter:ft,onDragLeave:xt,onDragOver:mt,onDrop:Ct,children:[z.jsxs("div",{style:{padding:"12px 20px",borderBottom:"1px solid var(--border)",display:"flex",justifyContent:"space-between",alignItems:"center",gap:12,background:"linear-gradient(180deg, rgba(99,102,241,0.04) 0%, transparent 100%)"},children:[z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,flex:1},children:[z.jsx("h2",{style:{fontSize:16,fontWeight:600},className:"gradient-text",children:"Chat"}),z.jsxs("div",{style:{position:"relative"},children:[z.jsxs("button",{className:"btn-ghost",onClick:()=>{A(!P),G(!1)},style:{fontSize:13,display:"flex",alignItems:"center",gap:4},children:[tt??"Agent",z.jsx("span",{style:{fontSize:10},children:"▼"})]}),P&&z.jsx("div",{style:{position:"absolute",top:"100%",left:0,zIndex:100,background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:"var(--radius)",boxShadow:"0 4px 20px rgba(0,0,0,0.4)",maxHeight:300,overflow:"auto",minWidth:200,marginTop:4},children:D.map(ot=>z.jsxs("div",{onClick:()=>U(ot.name),style:{padding:"8px 12px",cursor:"pointer",fontSize:13,background:ot.name===tt?"var(--accent-soft)":"transparent",color:ot.name===tt?"var(--accent)":"var(--text-primary)",fontWeight:ot.name===tt?500:400},onMouseEnter:bt=>bt.currentTarget.style.background="var(--bg-hover)",onMouseLeave:bt=>bt.currentTarget.style.background=ot.name===tt?"var(--accent-soft)":"transparent",children:[z.jsx("div",{children:ot.name}),ot.description&&z.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:ot.description})]},ot.name))})]}),z.jsxs("div",{style:{position:"relative"},children:[z.jsxs("button",{className:"btn-ghost",onClick:()=>{G(!lt),A(!1)},style:{fontSize:13,display:"flex",alignItems:"center",gap:4},children:[H?.name??"Select Model",z.jsx("span",{style:{fontSize:10},children:"▼"})]}),lt&&z.jsx("div",{style:{position:"absolute",top:"100%",left:0,zIndex:100,background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:"var(--radius)",boxShadow:"0 4px 20px rgba(0,0,0,0.4)",maxHeight:400,overflow:"auto",minWidth:260,marginTop:4},children:Array.from(it.entries()).map(([ot,bt])=>z.jsxs("div",{children:[z.jsx("div",{style:{padding:"6px 12px",fontSize:11,fontWeight:600,color:"var(--violet)",textTransform:"uppercase",letterSpacing:.5},children:ot}),bt.map(Ot=>z.jsx("div",{onClick:()=>$(Ot),style:{padding:"8px 12px",cursor:"pointer",fontSize:13,background:Ot.id===H?.id?"var(--accent-soft)":"transparent",color:Ot.id===H?.id?"var(--accent)":"var(--text-primary)",fontWeight:Ot.id===H?.id?500:400},onMouseEnter:jt=>jt.currentTarget.style.background="var(--bg-hover)",onMouseLeave:jt=>jt.currentTarget.style.background=Ot.id===H?.id?"var(--accent-soft)":"transparent",children:Ot.name},Ot.id))]},ot))})]})]}),p?.workingDirectory&&z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:11,color:"var(--text-muted)",background:"var(--violet-soft)",padding:"3px 8px",borderRadius:"var(--radius-sm)",maxWidth:400,overflow:"hidden"},title:p.workingDirectory,children:[z.jsx("span",{style:{flexShrink:0,fontSize:10,fontWeight:600,color:"var(--violet)"},children:"WorkDir:"}),z.jsx("span",{style:{fontFamily:"monospace",color:"var(--text-secondary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.workingDirectory})]}),z.jsx("button",{className:"btn-ghost",onClick:c,children:"Clear"})]}),z.jsxs("div",{ref:S,onScroll:R,style:{flex:1,overflow:"auto",padding:"16px 20px"},children:[a?z.jsx("div",{style:{textAlign:"center",color:"var(--text-muted)",marginTop:80,fontSize:14},children:"Loading history..."}):t.length===0&&!f&&z.jsxs("div",{style:{textAlign:"center",color:"var(--text-muted)",marginTop:80,fontSize:14},children:[z.jsx("div",{style:{fontSize:48,marginBottom:16,opacity:.3},children:"💬"}),"Start a conversation by typing a message below."]}),t.map(ot=>z.jsx(x7,{message:ot},ot.id)),nt.length>0?z.jsx(y7,{agents:nt}):f?z.jsx(m7,{status:f,elapsed:E}):null,s&&z.jsx("div",{style:{padding:12,background:"var(--rose-soft)",borderRadius:"var(--radius)",color:"var(--rose)",fontSize:13,marginBottom:12,border:"1px solid rgba(244, 63, 94, 0.2)"},children:s}),z.jsx("div",{ref:k})]}),z.jsx("form",{onSubmit:J,style:{padding:"0 20px 16px",display:"flex",alignItems:"flex-end",gap:0},children:z.jsxs("div",{style:{flex:1,display:"flex",alignItems:"flex-end",background:"var(--bg-tertiary)",border:"1px solid var(--border)",borderRadius:"var(--radius-lg)",overflow:"hidden",transition:"border-color 0.2s"},children:[z.jsx("textarea",{ref:_,value:g,onChange:ot=>x(ot.target.value),onKeyDown:ot=>{ot.key==="Enter"&&!ot.shiftKey&&(ot.preventDefault(),J(ot))},placeholder:"Type a message... (Shift+Enter for new line)",disabled:i,rows:6,style:{flex:1,resize:"none",border:"none",outline:"none",background:"transparent",color:"var(--text-primary)",fontSize:14,lineHeight:1.5,padding:"14px 16px",minHeight:132,fontFamily:"inherit"}}),z.jsx("button",{type:"submit",disabled:i||!g.trim(),style:{background:g.trim()&&!i?"var(--accent)":"var(--bg-hover)",color:g.trim()&&!i?"white":"var(--text-muted)",border:"none",borderRadius:"0 var(--radius-lg) var(--radius-lg) 0",padding:"14px 18px",cursor:g.trim()&&!i?"pointer":"default",fontSize:16,display:"flex",alignItems:"center",transition:"all 0.2s",alignSelf:"stretch"},children:z.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[z.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),z.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})}),y&&z.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(14, 165, 233, 0.08)",border:"2px dashed var(--accent)",borderRadius:"var(--radius-lg)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:100,pointerEvents:"none"},children:z.jsx("div",{style:{color:"var(--accent)",fontSize:16,fontWeight:500,background:"var(--bg-primary)",padding:"12px 24px",borderRadius:"var(--radius)",border:"1px solid var(--accent)"},children:"Drop file here to insert path"})})]})}const Cg=["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"],kg=["○","◎","●","◎"];function UB(e=80){const[t,i]=I.useState(0);return I.useEffect(()=>{const a=setInterval(()=>i(s=>(s+1)%Cg.length),e);return()=>clearInterval(a)},[e]),Cg[t%Cg.length]}function g7(e=375){const[t,i]=I.useState(0);return I.useEffect(()=>{const a=setInterval(()=>i(s=>(s+1)%kg.length),e);return()=>clearInterval(a)},[e]),kg[t%kg.length]}function jB(e){return e<60?`${e}s`:e<3600?`${Math.floor(e/60)}m${e%60}s`:`${Math.floor(e/3600)}h${Math.floor(e%3600/60)}m${e%60}s`}function m7({status:e,elapsed:t}){const i=UB(),{color:a,bg:s,label:l}=e.phase==="thinking"?{color:"var(--cyan)",bg:"var(--cyan-soft)",label:"Thinking"}:e.phase==="tool_calling"?{color:"var(--amber)",bg:"var(--amber-soft)",label:"Tool"}:{color:"var(--emerald)",bg:"var(--emerald-soft)",label:"Gen"};return z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 10px",marginTop:8,fontSize:13,lineHeight:1.5,background:s,borderRadius:"var(--radius-sm)",border:`1px solid ${a}22`},children:[z.jsx("span",{style:{color:a,fontFamily:"monospace",fontWeight:700},children:i}),z.jsxs("span",{style:{color:a,fontWeight:500,fontSize:11,opacity:.7},children:["[",l,"]"]}),z.jsx("span",{style:{color:"var(--text-secondary)"},children:e.text}),t>0&&z.jsx("span",{style:{color:"var(--text-muted)",fontSize:11,marginLeft:"auto"},children:jB(t)}),z.jsx("span",{style:{color:"var(--text-muted)",fontSize:11},children:"[ESC打断]"})]})}const j2=["#6366f1","#8b5cf6","#a855f7","#d946ef","#ec4899","#f43f5e"];function y7({agents:e}){const t=UB(),i=g7(),[a,s]=I.useState(Date.now());I.useEffect(()=>{const h=setInterval(()=>s(Date.now()),1e3);return()=>clearInterval(h)},[]);const l=Math.min(...e.map(h=>h.startTime)),c=jB(Math.floor((a-l)/1e3));return z.jsxs("div",{style:{marginTop:4,marginBottom:8,padding:"8px 10px",fontSize:12,lineHeight:1.8,background:"var(--amber-soft)",borderRadius:"var(--radius-sm)",border:"1px solid rgba(245, 158, 11, 0.15)"},children:[z.jsxs("div",{children:[z.jsx("span",{style:{color:"var(--amber)",fontFamily:"monospace",fontWeight:700},children:t})," ",z.jsx("span",{style:{color:"var(--amber)",fontWeight:600},children:"SubagentExecutor"})," ",z.jsxs("span",{style:{color:"var(--text-muted)"},children:["[",c,"]"]})]}),e.map((h,d)=>{const p=d===e.length-1?" └─ ":" ├─ ",g=h.lines.length>0?h.lines[h.lines.length-1]:"思考中...",x=h.toolCount>0?` ${h.toolCount} tools`:"",y=j2[d%j2.length];return z.jsxs("div",{children:[z.jsx("span",{style:{color:"var(--text-muted)"},children:p}),z.jsx("span",{style:{color:y,fontWeight:500},children:h.name})," ",z.jsx("span",{style:{color:y,opacity:.6},children:i})," ",z.jsxs("span",{style:{color:"var(--text-muted)"},children:[g,x]})]},h.id)})]})}function x7({message:e}){const t=e.role==="user",[i,a]=I.useState(!1),[s,l]=I.useState(null),c=I.useRef(null),h=I.useRef(null),d=I.useRef(!0);I.useEffect(()=>{e.isStreaming&&e.reasoning&&(a(!0),d.current=!0)},[e.isStreaming,e.reasoning]);const f=()=>{const C=c.current;C&&(d.current=C.scrollHeight-C.scrollTop-C.clientHeight<40)};I.useEffect(()=>{i&&d.current&&c.current&&(c.current.scrollTop=c.current.scrollHeight)},[e.reasoning,i]);const p=I.useMemo(()=>{if(t)return null;try{const C=new se.Renderer,k=C.code.bind(C);let S=0;C.code=_=>_.lang==="mermaid"?(S++,`<div class="mermaid-diagram" data-mermaid="${encodeURIComponent(_.text)}"><div class="mermaid-placeholder" style="padding:16px;text-align:center;color:var(--text-muted);font-size:12px;">📊 图表</div></div>`):k(_);const T=se.parse(H2(e.content||""),{async:!1,renderer:C});return console.log(`[mermaid-debug] useMemo htmlContent: mermaidBlocks=${S}, contentLen=${(e.content||"").length}, htmlLen=${T.length}, hasMermaidClass=${T.includes("mermaid-diagram")}`),T}catch(C){return console.error("[mermaid-debug] useMemo ERROR:",C),e.content}},[e.content,t]),[g,x]=I.useState(null);I.useEffect(()=>{if(console.log(`[mermaid-debug] useEffect trigger: htmlContent=${!!p}, isUser=${t}, isStreaming=${e.isStreaming}, contentLen=${(e.content||"").length}`),!p||t){l(null);return}if(e.isStreaming){l(p);return}const C=document.createElement("div");C.innerHTML=p;const k=C.querySelectorAll(".mermaid-diagram[data-mermaid]");if(console.log(`[mermaid-debug] Found diagrams: ${k.length}, tempDiv innerHTML length: ${C.innerHTML.length}`),k.length>0){const S=k[0];console.log(`[mermaid-debug] First diagram data-mermaid preview: ${(S.dataset.mermaid||"").slice(0,100)}`)}if(k.length===0){l(p);return}(async()=>{let S=0;for(const _ of Array.from(k)){const E=_,M=decodeURIComponent(E.dataset.mermaid??""),O=S++;let N=!1;try{await Em.parse(M),N=!0,console.log(`[mermaid-debug#${O}] Parse OK, srcLen=${M.length}`)}catch(H){console.warn(`[mermaid-debug#${O}] Parse FAILED:`,H instanceof Error?H.message:String(H).slice(0,500))}if(!N){E.innerHTML=`<pre style="margin:0;padding:12px;border-radius:var(--radius-sm);overflow:auto;font-size:12px;background:var(--bg-secondary);border:1px solid var(--border);"><code class="language-mermaid" style="color:var(--text-secondary)">${M.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}</code></pre>`;continue}try{const H=`m-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,{svg:j}=await Em.render(H,M);console.log(`[mermaid-debug#${O}] Render OK, svgLen=${j.length}`);const lt=`cb_${Date.now()}_${Math.random().toString(36).slice(2,8)}`;window.__mermaidCb||(window.__mermaidCb={}),window.__mermaidCb[lt]={svg:j,async save(Z){try{const tt=new Blob([j],{type:"image/svg+xml"}),W=URL.createObjectURL(tt),P=document.createElement("a");P.href=W,P.download=`diagram-${Date.now()}.svg`,document.body.appendChild(P),P.click(),document.body.removeChild(P),URL.revokeObjectURL(W),Z.textContent="Saved!",Z.style.color="var(--emerald)",setTimeout(()=>{Z.textContent="Save SVG",Z.style.color="var(--text-muted)"},2e3)}catch{Z.textContent="Failed!",Z.style.color="var(--red)",setTimeout(()=>{Z.textContent="Save SVG",Z.style.color="var(--text-muted)"},2e3)}},fullscreen(){console.log("[bind-debug] Fullscreen via inline onclick!"),x(j)}};const G=`<div class="mermaid-toolbar" style="position:absolute;top:8px;right:8px;display:flex;gap:4px;z-index:5;opacity:1;pointer-events:auto;">
400
+ <button onclick="window.__mermaidCb['${lt}'].save(this)" title="另存为 SVG 文件" style="padding:2px 8px;font-size:11px;background:var(--bg-secondary);color:var(--text-muted);border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer">Save SVG</button>
401
+ <button onclick="event.stopPropagation();window.__mermaidCb['${lt}'].fullscreen()" title="双击或点击全屏查看" style="padding:2px 8px;font-size:14px;background:var(--bg-secondary);color:var(--text-muted);border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer;line-height:1;">⛶</button>
402
+ </div>`;E.innerHTML=j+G,Object.assign(E.style,{display:"block",padding:"16px",borderRadius:"var(--radius-sm)",overflow:"auto",background:"rgba(15, 23, 42, 0.6)",border:"1px solid rgba(99, 102, 241, 0.2)",minHeight:"200px",cursor:"pointer",position:"relative"}),E.setAttribute("ondblclick",`event.stopPropagation();window.__mermaidCb['${lt}'].fullscreen()`);const D=E.querySelector("svg");D&&(D.style.maxWidth="100%",D.style.height="auto",D.style.color="inherit"),console.log(`[mermaid-debug#${O}] Toolbar added, final div HTML len=${E.outerHTML.length}`)}catch(H){console.error(`[mermaid-debug#${O}] Render FAILED:`,H instanceof Error?H.message:String(H).slice(0,500)),E.innerHTML=`<pre style="margin:0;padding:12px;border-radius:var(--radius-sm);overflow:auto;font-size:12px;background:var(--bg-secondary);border:1px solid var(--border);"><code class="language-mermaid" style="color:var(--text-secondary)">${M.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}</code></pre>`}}const T=C.innerHTML;console.log(`[mermaid-debug] setFinalHtml called: totalLen=${T.length}, containsToolbar=${T.includes("mermaid-toolbar")}, containsSvgTag=${T.includes("<svg")}, containsFullscreen=${T.includes("setFullscreenSvg")}`),l(T)})()},[p,e.isStreaming]),I.useEffect(()=>{const C=h.current;if(!C||t)return;C.querySelectorAll("pre").forEach(S=>{if(S.parentElement?.classList.contains("pre-copy-wrapper"))return;const T=document.createElement("button");T.className="copy-btn",T.textContent="Copy",T.style.cssText="position:absolute;top:6px;right:6px;padding:2px 8px;font-size:11px;background:var(--bg-secondary);color:var(--text-muted);border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer;opacity:0;transition:opacity 0.15s";const _=()=>{T.textContent!=="Copied!"&&(T.style.opacity="1")},E=()=>{T.textContent!=="Copied!"&&(T.style.opacity="0")};T.addEventListener("mouseenter",_),T.addEventListener("mouseleave",E),T.addEventListener("click",async()=>{const N=S.querySelector("code")?.textContent||S.textContent||"";try{await navigator.clipboard.writeText(N),T.textContent="Copied!",T.style.color="var(--emerald)",T.style.opacity="0.7",setTimeout(()=>{T.textContent="Copy",T.style.color="var(--text-muted)",T.style.opacity="0"},2e3)}catch{}});const M=document.createElement("div");M.className="pre-copy-wrapper",M.style.position="relative",S.parentNode?.insertBefore(M,S),M.appendChild(S),M.appendChild(T)})},[p,t]),I.useEffect(()=>{if(!g)return;const C=k=>{k.key==="Escape"&&x(null)};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[g]);const y=e.reasoning?Math.max(1,Math.round(e.reasoning.length/50)):0;return z.jsxs("div",{style:{marginBottom:16,display:"flex",justifyContent:t?"flex-end":"flex-start"},children:[z.jsxs("div",{style:{maxWidth:"80%",padding:"10px 14px",borderRadius:t?"var(--radius-lg) var(--radius-sm) var(--radius-lg) var(--radius-lg)":"var(--radius-sm) var(--radius-lg) var(--radius-lg) var(--radius-lg)",background:t?"linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%)":"var(--bg-tertiary)",color:t?"white":"var(--text-primary)",fontSize:14,lineHeight:1.6,border:t?"none":"1px solid var(--border)",boxShadow:t?"0 2px 12px rgba(99, 102, 241, 0.2)":"0 1px 4px rgba(0,0,0,0.1)"},children:[e.reasoning&&!t&&z.jsxs("div",{style:{marginBottom:8},children:[z.jsxs("div",{onClick:()=>a(!i),style:{cursor:"pointer",display:"flex",alignItems:"center",gap:6,fontSize:12,color:"var(--cyan)",userSelect:"none"},children:[z.jsx("span",{style:{fontSize:10,transition:"transform 0.2s",transform:i?"rotate(90deg)":"rotate(0)"},children:"▸"}),z.jsx("span",{style:{fontWeight:500},children:"💭 Thinking"}),!e.isStreaming&&y>0&&z.jsxs("span",{style:{fontSize:11,color:"var(--text-muted)"},children:["(",y,"s)"]})]}),i&&z.jsx("div",{ref:c,onScroll:f,style:{marginTop:4,padding:8,background:"var(--cyan-soft)",borderRadius:"var(--radius-sm)",border:"1px solid rgba(34, 211, 238, 0.15)",maxHeight:200,overflow:"auto"},className:"markdown-body reasoning-block",dangerouslySetInnerHTML:{__html:(()=>{try{return se.parse(H2(e.reasoning||"",{escapeHtml:!0}),{async:!1})}catch{return(e.reasoning||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}})()}})]}),t?z.jsx("div",{style:{whiteSpace:"pre-wrap"},children:e.content}):z.jsx("div",{ref:h,className:"markdown-body",dangerouslySetInnerHTML:{__html:s??p??""}}),(()=>{const C=s??p??"";return!t&&!e.isStreaming&&C&&C.includes("mermaid-diagram")&&console.log(`[mermaid-debug] RENDER: finalHtml=${!!s}, hasToolbar=${C.includes("mermaid-toolbar")}, hasSvg=${C.includes("<svg")}, htmlLen=${C.length}`),null})(),e.isStreaming&&!e.reasoning&&z.jsx("span",{className:"cursor",children:"▌"}),e.toolCalls&&e.toolCalls.length>0&&z.jsx("div",{style:{marginTop:8},children:e.toolCalls.map(C=>z.jsx(S7,{toolCall:C},C.id))})]}),(g&&console.log(`[mermaid-debug] Fullscreen modal RENDERING: svgLen=${g.length}`),null),g&&z.jsx("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"rgba(0, 0, 0, 0.85)",zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onClick:()=>x(null),children:z.jsxs("div",{style:{maxWidth:"90vw",maxHeight:"90vh",background:"#0d1117",borderRadius:"var(--radius-lg)",padding:"24px",border:"1px solid rgba(99, 102, 241, 0.3)",boxShadow:"0 20px 60px rgba(0, 0, 0, 0.5)",overflow:"auto",cursor:"default"},onClick:C=>C.stopPropagation(),children:[z.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},children:[z.jsx("span",{style:{fontSize:13,color:"var(--text-muted)",fontWeight:500},children:"📊 Architecture Diagram"}),z.jsx("button",{onClick:()=>{const C=new Blob([g],{type:"image/svg+xml"}),k=URL.createObjectURL(C),S=document.createElement("a");S.href=k,S.download=`diagram-${Date.now()}.svg`,document.body.appendChild(S),S.click(),document.body.removeChild(S),URL.revokeObjectURL(k)},style:{padding:"4px 14px",fontSize:12,background:"var(--accent)",color:"white",border:"none",borderRadius:"var(--radius-sm)",cursor:"pointer"},children:"Save SVG"}),z.jsx("button",{onClick:()=>x(null),style:{padding:"4px 14px",fontSize:12,background:"transparent",color:"var(--text-muted)",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)",cursor:"pointer"},children:"✕ Close (ESC)"})]}),z.jsx("div",{dangerouslySetInnerHTML:{__html:g}}),z.jsx("div",{style:{marginTop:8,textAlign:"center",fontSize:11,color:"var(--text-muted)"},children:"Click outside or press ESC to close"})]})})]})}function b7(e){const t=e.trim();if((t.startsWith("{")||t.startsWith("["))&&t.length>2)try{const i=JSON.parse(t);return{html:JSON.stringify(i,null,2),isJson:!0}}catch{}return{html:e.replace(/\n{4,}/g,`
403
+
404
+ `),isJson:!1}}function C7(e){try{const t=JSON.parse(e);if(t.command)return t.command}catch{}return""}function k7(e){return e.name==="Shell"||e.name==="Bash"}const v7=({children:e,style:t})=>z.jsx("span",{style:{fontSize:11,fontFamily:"'JetBrains Mono', 'Fira Code', Consolas, monospace",...t},children:e});function S7({toolCall:e}){const{color:t,bg:i,border:a,icon:s}=e.riskLevel==="dangerous"?{color:"var(--rose)",bg:"var(--rose-soft)",border:"rgba(244, 63, 94, 0.25)",icon:"⚠"}:e.riskLevel==="moderate"?{color:"var(--orange)",bg:"var(--orange-soft)",border:"rgba(249, 115, 22, 0.25)",icon:"⚡"}:{color:"var(--emerald)",bg:"var(--emerald-soft)",border:"rgba(16, 185, 129, 0.2)",icon:"→"},l=e.result!==void 0,c=I.useRef(null),h=k7(e),d=I.useMemo(()=>{if(!e.argsPreview)return"";const y=e.argsPreview.trim();if((y.startsWith("{")||y.startsWith("["))&&y.length>2)try{const C=JSON.parse(y);return JSON.stringify(C,null,2)}catch{}return e.argsPreview},[e.argsPreview]),f=I.useMemo(()=>h?C7(e.argsPreview):"",[h,e.argsPreview]),p=I.useMemo(()=>e.result?b7(e.result):null,[e.result]);I.useEffect(()=>{const y=c.current;if(!y||!l||y.querySelector(".tc-copy-btn"))return;const C=document.createElement("button");C.className="tc-copy-btn",C.textContent="Copy",Object.assign(C.style,{position:"absolute",top:4,right:4,padding:"1px 6px",fontSize:10,background:"var(--bg-secondary)",color:"var(--text-muted)",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)",cursor:"pointer",opacity:0,transition:"opacity 0.15s"});const k=()=>{C.textContent!=="Copied!"&&(C.style.opacity="1")},S=()=>{C.textContent!=="Copied!"&&(C.style.opacity="0")};C.addEventListener("mouseenter",k),C.addEventListener("mouseleave",S),C.addEventListener("click",async()=>{let T="";if(h){const _=[];f&&_.push(`$ ${f}`),e.stdout&&_.push(e.stdout),e.stderr&&_.push(`[stderr] ${e.stderr}`),T=_.join(`
405
+
406
+ `)}else T=e.result??"";try{await navigator.clipboard.writeText(T),C.textContent="Copied!",C.style.color="var(--emerald)",C.style.opacity="0.7",setTimeout(()=>{C.textContent="Copy",C.style.color="var(--text-muted)",C.style.opacity="0"},2e3)}catch{}}),y.style.position="relative",y.appendChild(C)},[l,h,f,e.stdout,e.stderr,e.result]);const g=(y,C)=>y.length>C?y.slice(0,C)+`
407
+ … (truncated)`:y,x=y=>y.replace(/^\[Shell:[^\]]*\]\n?/,"").replace(/^\[IMPORTANT[^\n]*\n?/,"").trim();return z.jsxs("div",{style:{background:i,borderRadius:"var(--radius)",padding:"8px 12px",marginBottom:6,borderLeft:`3px solid ${t}`,border:`1px solid ${a}`,borderLeftWidth:3,fontSize:12},children:[z.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[z.jsx("span",{style:{color:t,fontSize:10},children:s}),z.jsx("span",{style:{fontWeight:600,color:t},children:e.name}),h&&f&&z.jsxs(v7,{style:{color:"var(--text-muted)",fontWeight:400,maxWidth:300,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["$ ",f.length>60?f.slice(0,60)+"…":f]})]}),z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[e.duration!==void 0&&z.jsxs("span",{style:{color:"var(--text-muted)",fontSize:11},children:[e.duration,"ms"]}),l&&(e.success!==!1?z.jsx("span",{style:{color:"var(--emerald)",fontSize:11,fontWeight:700},children:"✓"}):z.jsx("span",{style:{color:"var(--rose)",fontSize:11,fontWeight:700},children:"✗"}))]})]}),!h&&d&&z.jsx("pre",{style:{display:"block",marginTop:4,color:"var(--text-secondary)",fontSize:11,whiteSpace:"pre-wrap",wordBreak:"break-all",background:"rgba(0,0,0,0.12)",padding:"4px 8px",borderRadius:"var(--radius-sm)",maxHeight:80,overflow:"auto"},children:g(d,300)}),z.jsx("div",{ref:c,style:{marginTop:4},children:l?h?z.jsxs("div",{children:[e.stdout&&(()=>{const y=x(e.stdout);return!y&&!e.stderr?z.jsx("div",{style:{padding:"4px 8px",borderRadius:"var(--radius-sm)",background:"rgba(0,0,0,0.15)",color:"var(--text-muted)",fontSize:11,fontStyle:"italic"},children:e.success===!1?"(command produced no output)":"(completed successfully, no output)"}):y?z.jsx("div",{style:{padding:6,borderRadius:"var(--radius-sm)",background:"rgba(0,0,0,0.18)",color:"var(--text-secondary)",fontSize:11,fontFamily:"'JetBrains Mono', Consolas, monospace",whiteSpace:"pre-wrap",maxHeight:240,overflow:"auto",lineHeight:1.5},children:g(y,3e3)}):null})(),e.stderr&&z.jsxs("div",{style:{marginTop:4,padding:"6px 8px",borderRadius:"var(--radius-sm)",background:"rgba(244, 63, 94, 0.08)",color:"var(--rose)",fontSize:11,fontFamily:"'JetBrains Mono', Consolas, monospace",whiteSpace:"pre-wrap",maxHeight:120,overflow:"auto",lineHeight:1.5,border:"1px solid rgba(244, 63, 94, 0.12)"},children:[z.jsx("span",{style:{opacity:.6,marginRight:6},children:"[stderr]"}),g(e.stderr,1500)]})]}):z.jsx("div",{style:{padding:6,background:p?.isJson?"rgba(0,0,0,0.25)":"rgba(0,0,0,0.2)",borderRadius:"var(--radius-sm)",color:e.success===!1?"var(--rose)":p?.isJson?"var(--sky)":"var(--text-secondary)",fontSize:11,fontFamily:p?.isJson?"'JetBrains Mono', 'Fira Code', Consolas, monospace":"inherit",whiteSpace:"pre-wrap",maxHeight:200,overflow:"auto",lineHeight:1.5},children:g(p?p.html:e.result??"",2e3)}):null})]})}function T7(){const{sessions:e,isLoading:t,fetchSessions:i,createSession:a,deleteSession:s,deleteAllSessions:l,clearSession:c}=Z3(),h=_c(),{setCurrentSession:d,refreshStatus:f,clearMessageCache:p}=gd(),[g,x]=I.useState(null),[y,C]=I.useState(""),[k,S]=I.useState(null),[T,_]=I.useState(!1);I.useEffect(()=>{i()},[i]);const E=async()=>{const G=await a();d({id:G.id,name:G.name??"New Session",messageCount:0}),h(`/chat/${G.id}`)},M=async G=>{S(null);try{await s(G),p(G),f()}catch(D){console.error("Failed to delete session:",D),i()}},O=async()=>{_(!1);try{await l(),p("__default__"),f()}catch(G){console.error("Failed to delete all sessions:",G),i()}},N=async G=>{try{await c(G),p(G),f()}catch(D){console.error("Failed to clear session:",D)}},H=async G=>{if(!y.trim()){x(null);return}try{await me.renameSession(G,y.trim()),x(null),await i(),f()}catch{}},j=async(G,D)=>{try{await me.activateSession(G),d({id:D.id,name:D.name??D.id.slice(0,8),messageCount:D.messageCount??0}),h(`/chat/${G}`)}catch{}},lt=G=>{x(G.id),C(G.name??"")};return z.jsxs("div",{style:{padding:24},children:[z.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:20},children:[z.jsx("h2",{style:{fontSize:18,fontWeight:600},children:"Sessions"}),z.jsxs("div",{style:{display:"flex",gap:8},children:[e.length>0&&(T?z.jsxs(z.Fragment,{children:[z.jsx("button",{className:"btn-ghost",onClick:O,style:{fontSize:12,padding:"4px 10px",color:"var(--dangerous)"},children:"Confirm Delete All"}),z.jsx("button",{className:"btn-ghost",onClick:()=>_(!1),style:{fontSize:12,padding:"4px 10px"},children:"Cancel"})]}):z.jsx("button",{className:"btn-ghost",onClick:()=>_(!0),style:{fontSize:12,padding:"4px 10px"},children:"Delete All"})),z.jsx("button",{className:"btn-primary",onClick:E,children:"New Session"})]})]}),t?z.jsx("div",{style:{color:"var(--text-muted)",textAlign:"center",padding:40},children:"Loading..."}):e.length===0?z.jsx("div",{style:{color:"var(--text-muted)",textAlign:"center",padding:40},children:"No sessions yet"}):z.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:e.map(G=>z.jsxs("div",{style:{padding:"12px 16px",background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--border)",cursor:"pointer",transition:"border-color 0.15s"},onClick:()=>j(G.id,G),onMouseEnter:D=>D.currentTarget.style.borderColor="var(--accent)",onMouseLeave:D=>D.currentTarget.style.borderColor="var(--border)",children:[z.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[g===G.id?z.jsx("input",{value:y,onChange:D=>C(D.target.value),onKeyDown:D=>{D.key==="Enter"&&H(G.id),D.key==="Escape"&&x(null)},onBlur:()=>H(G.id),onClick:D=>D.stopPropagation(),autoFocus:!0,style:{flex:1,fontSize:14,fontWeight:500,padding:"2px 6px"}}):z.jsx("span",{style:{fontWeight:500,fontSize:14,flex:1},children:G.name??G.id.slice(0,8)}),z.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center"},onClick:D=>D.stopPropagation(),children:[z.jsx("button",{className:"btn-ghost",onClick:()=>lt(G),style:{fontSize:11,padding:"2px 6px"},title:"Rename",children:"✎"}),z.jsx("button",{className:"btn-ghost",onClick:()=>N(G.id),style:{fontSize:11,padding:"2px 6px"},title:"Clear messages",children:"⊘"}),k===G.id?z.jsxs(z.Fragment,{children:[z.jsx("button",{className:"btn-ghost",onClick:()=>M(G.id),style:{fontSize:11,padding:"2px 6px",color:"var(--dangerous)"},children:"Confirm"}),z.jsx("button",{className:"btn-ghost",onClick:()=>S(null),style:{fontSize:11,padding:"2px 6px"},children:"Cancel"})]}):z.jsx("button",{className:"btn-ghost",onClick:()=>S(G.id),style:{fontSize:11,padding:"2px 6px"},title:"Delete",children:"✕"})]})]}),z.jsxs("div",{style:{color:"var(--text-muted)",fontSize:12,marginTop:4},children:[G.agentName??G.agentType??"main"," · ",G.messageCount??0," messages · ",new Date(G.createdAt).toLocaleString()]})]},G.id))})]})}const vg=[{name:"DeepSeek",apiKeyEnvVar:"DEEPSEEK_API_KEY",baseUrlEnvVar:"DEEPSEEK_BASE_URL",defaultBaseUrl:"https://api.deepseek.com/v1"},{name:"智谱 (Zhipu)",apiKeyEnvVar:"ZHIPU_API_KEY",baseUrlEnvVar:"ZHIPU_BASE_URL",defaultBaseUrl:"https://open.bigmodel.cn/api/paas/v4"},{name:"Kimi (Moonshot)",apiKeyEnvVar:"KIMI_API_KEY",baseUrlEnvVar:"KIMI_BASE_URL",defaultBaseUrl:"https://api.moonshot.cn/v1"},{name:"OpenAI",apiKeyEnvVar:"OPENAI_API_KEY",baseUrlEnvVar:"OPENAI_BASE_URL",defaultBaseUrl:"https://api.openai.com/v1"},{name:"Claude",apiKeyEnvVar:"CLAUDE_API_KEY",baseUrlEnvVar:"CLAUDE_BASE_URL",defaultBaseUrl:"https://api.anthropic.com/v1"},{name:"MiniMax",apiKeyEnvVar:"MINIMAX_API_KEY",baseUrlEnvVar:"MINIMAX_BASE_URL",defaultBaseUrl:"https://api.minimaxi.com/v1"},{name:"Ollama",apiKeyEnvVar:"",baseUrlEnvVar:"OLLAMA_BASE_URL",defaultBaseUrl:"http://localhost:11434"},{name:"NVIDIA NIM",apiKeyEnvVar:"NVIDIA_API_KEY",baseUrlEnvVar:"NVIDIA_BASE_URL",defaultBaseUrl:"https://integrate.api.nvidia.com/v1"},{name:"Qwen",apiKeyEnvVar:"QWEN_API_KEY",baseUrlEnvVar:"QWEN_BASE_URL",defaultBaseUrl:"https://dashscope.aliyuncs.com/compatible-mode/v1"},{name:"小米 MiMo",apiKeyEnvVar:"MIMO_API_KEY",baseUrlEnvVar:"MIMO_BASE_URL",defaultBaseUrl:"https://api.xiaomimimo.com/v1"},{name:"SiliconFlow",apiKeyEnvVar:"SILICONFLOW_API_KEY",baseUrlEnvVar:"SILICONFLOW_BASE_URL",defaultBaseUrl:"https://api.siliconflow.cn/v1"}];function w7(){const[e,t]=I.useState(null),[i,a]=I.useState({}),[s,l]=I.useState("safe_only"),[c,h]=I.useState(!1),[d,f]=I.useState(!1),[p,g]=I.useState(new Set),[x,y]=I.useState([]),[C,k]=I.useState(!1),[S,T]=I.useState({id:"",name:"",baseUrl:"",apiKey:"",contextLength:128e3,supportsTools:!0,isReasoningModel:!1}),[_,E]=I.useState(""),[M,O]=I.useState(!1);I.useEffect(()=>{(async()=>{try{const D=await me.getSettings();t(D);const Z={};for(const tt of vg)tt.apiKeyEnvVar&&(Z[tt.apiKeyEnvVar]=D.env[tt.apiKeyEnvVar]??""),tt.baseUrlEnvVar&&(Z[tt.baseUrlEnvVar]=D.env[tt.baseUrlEnvVar]??"");a(Z),l(D.preferences?.approvalMode??"safe_only"),D.customModels&&y(D.customModels)}catch{}})()},[]);const N=D=>{g(Z=>{const tt=new Set(Z);return tt.has(D)?tt.delete(D):tt.add(D),tt})},H=async()=>{h(!0),f(!1);try{const D={};for(const[tt,W]of Object.entries(i)){const P=e?.env[tt]??"";W!==P&&(D[tt]=W)}const Z={};if(s!==(e?.preferences?.approvalMode??"safe_only")&&(Z.approvalMode=s),Object.keys(D).length>0||Object.keys(Z).length>0){await me.updateSettings({env:D,preferences:Z});const tt=await me.getSettings();t(tt);const W={};for(const P of vg)P.apiKeyEnvVar&&(W[P.apiKeyEnvVar]=tt.env[P.apiKeyEnvVar]??""),P.baseUrlEnvVar&&(W[P.baseUrlEnvVar]=tt.env[P.baseUrlEnvVar]??"");a(W),l(tt.preferences?.approvalMode??"safe_only")}f(!0)}catch{}h(!1)},j=D=>{a(Z=>({...Z,[D]:""}))},lt=async()=>{if(!S.id||!S.name||!S.baseUrl){E("Model ID, Name, and Base URL are required");return}O(!0),E("");try{const D=await me.addCustomModel({id:S.id,name:S.name,baseUrl:S.baseUrl,apiKey:S.apiKey||void 0,contextLength:S.contextLength??128e3,supportsTools:S.supportsTools??!1,isReasoningModel:S.isReasoningModel??!1});if(D.success){const Z=await me.getSettings();Z.customModels&&y(Z.customModels),T({id:"",name:"",baseUrl:"",apiKey:"",contextLength:128e3,supportsTools:!0,isReasoningModel:!1}),k(!1)}else E(D.error??"Failed to add model")}catch{E("Failed to add custom model")}O(!1)},G=async D=>{try{await me.removeCustomModel(D),y(Z=>Z.filter(tt=>tt.id!==D))}catch{}};return z.jsxs("div",{style:{padding:24,maxWidth:700},children:[z.jsx("h2",{style:{fontSize:18,fontWeight:600,marginBottom:20},children:"Settings"}),z.jsxs("section",{style:{marginBottom:24},children:[z.jsx("h3",{style:{fontSize:14,fontWeight:600,marginBottom:10,color:"var(--text-secondary)"},children:"Approval Mode"}),z.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[{value:"auto",label:"Auto",desc:"Approve all tool calls automatically"},{value:"safe_only",label:"Safe Only",desc:"Auto-approve safe tools, ask for moderate/dangerous"},{value:"always_ask",label:"Always Ask",desc:"Require approval for every tool call"}].map(D=>z.jsxs("label",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:"10px 14px",background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:`1px solid ${s===D.value?"var(--accent)":"var(--border)"}`,cursor:"pointer",transition:"border-color 0.15s"},children:[z.jsx("input",{type:"radio",name:"approvalMode",value:D.value,checked:s===D.value,onChange:()=>l(D.value),style:{marginTop:3}}),z.jsxs("div",{children:[z.jsx("div",{style:{fontWeight:500,fontSize:13},children:D.label}),z.jsx("div",{style:{fontSize:12,color:"var(--text-muted)"},children:D.desc})]})]},D.value))})]}),z.jsxs("section",{style:{marginBottom:24},children:[z.jsx("h3",{style:{fontSize:14,fontWeight:600,marginBottom:10,color:"var(--text-secondary)"},children:"Model Provider Configuration"}),z.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:vg.map(D=>{const Z=p.has(D.name),tt=i[D.apiKeyEnvVar]??"",W=i[D.baseUrlEnvVar]??"",P=!!tt,A=!!W&&W!==D.defaultBaseUrl;return z.jsxs("div",{style:{background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--border)",overflow:"hidden"},children:[z.jsxs("div",{onClick:()=>N(D.name),style:{padding:"10px 14px",display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",userSelect:"none"},children:[z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[z.jsx("span",{style:{fontSize:10,transition:"transform 0.2s",transform:Z?"rotate(90deg)":"rotate(0)"},children:"▸"}),z.jsx("span",{style:{fontWeight:500,fontSize:14},children:D.name})]}),z.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[P&&z.jsx("span",{style:{color:"var(--safe)",fontSize:11},children:"Key set"}),A&&z.jsx("span",{style:{color:"var(--moderate)",fontSize:11},children:"Custom URL"}),!P&&!A&&!Z&&z.jsx("span",{style:{color:"var(--text-muted)",fontSize:11},children:"Not configured"})]})]}),Z&&z.jsxs("div",{style:{padding:"4px 14px 14px",display:"flex",flexDirection:"column",gap:12},children:[D.apiKeyEnvVar&&z.jsxs("div",{children:[z.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"API Key"}),z.jsxs("div",{style:{display:"flex",gap:6},children:[z.jsx("input",{type:"password",value:tt,onChange:$=>a(U=>({...U,[D.apiKeyEnvVar]:$.target.value})),placeholder:D.apiKeyEnvVar,style:{flex:1}}),P&&z.jsx("button",{className:"btn-ghost",onClick:()=>j(D.apiKeyEnvVar),style:{fontSize:11,padding:"4px 8px"},children:"Clear"})]}),z.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:["Env: ",D.apiKeyEnvVar]})]}),D.baseUrlEnvVar&&z.jsxs("div",{children:[z.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Base URL"}),z.jsx("input",{type:"text",value:W,onChange:$=>a(U=>({...U,[D.baseUrlEnvVar]:$.target.value})),placeholder:D.defaultBaseUrl,style:{width:"100%"}}),z.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:["Env: ",D.baseUrlEnvVar]})]})]})]},D.name)})})]}),z.jsxs("section",{style:{marginBottom:24},children:[z.jsx("h3",{style:{fontSize:14,fontWeight:600,marginBottom:10,color:"var(--text-secondary)"},children:"Custom Models (自定义模型)"}),z.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:10},children:"Add any OpenAI-compatible API endpoint as a custom model. After adding, it will appear in the model selector."}),x.length>0&&z.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6,marginBottom:10},children:x.map(D=>z.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 14px",background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--border)"},children:[z.jsxs("div",{children:[z.jsx("span",{style:{fontWeight:500,fontSize:13},children:D.name}),z.jsxs("span",{style:{color:"var(--text-muted)",fontSize:11,marginLeft:8},children:[D.id," · ",D.baseUrl]})]}),z.jsx("button",{className:"btn-ghost",onClick:()=>G(D.id),style:{fontSize:11,padding:"2px 8px",color:"var(--danger)"},children:"Remove"})]},D.id))}),C?z.jsxs("div",{style:{padding:16,background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--border)"},children:[z.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12},children:[z.jsxs("div",{children:[z.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:'Model ID * (unique, e.g. "my-llama-70b")'}),z.jsx("input",{type:"text",value:S.id??"",onChange:D=>T(Z=>({...Z,id:D.target.value})),placeholder:"my-llama-70b",style:{width:"100%"}})]}),z.jsxs("div",{children:[z.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Display Name *"}),z.jsx("input",{type:"text",value:S.name??"",onChange:D=>T(Z=>({...Z,name:D.target.value})),placeholder:"My LLaMA 70B",style:{width:"100%"}})]}),z.jsxs("div",{style:{gridColumn:"1 / -1"},children:[z.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Base URL * (OpenAI-compatible endpoint)"}),z.jsx("input",{type:"text",value:S.baseUrl??"",onChange:D=>T(Z=>({...Z,baseUrl:D.target.value})),placeholder:"http://localhost:11434/v1",style:{width:"100%"}})]}),z.jsxs("div",{children:[z.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"API Key (optional)"}),z.jsx("input",{type:"password",value:S.apiKey??"",onChange:D=>T(Z=>({...Z,apiKey:D.target.value})),placeholder:"sk-...",style:{width:"100%"}})]}),z.jsxs("div",{children:[z.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Context Length"}),z.jsx("input",{type:"number",value:S.contextLength??128e3,onChange:D=>T(Z=>({...Z,contextLength:Number(D.target.value)||128e3})),placeholder:"128000",style:{width:"100%"}})]})]}),z.jsxs("div",{style:{display:"flex",gap:16,marginTop:12},children:[z.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12,cursor:"pointer"},children:[z.jsx("input",{type:"checkbox",checked:S.supportsTools??!1,onChange:D=>T(Z=>({...Z,supportsTools:D.target.checked}))}),"Supports Tool Calling"]}),z.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12,cursor:"pointer"},children:[z.jsx("input",{type:"checkbox",checked:S.isReasoningModel??!1,onChange:D=>T(Z=>({...Z,isReasoningModel:D.target.checked}))}),"Reasoning Model"]})]}),_&&z.jsx("div",{style:{color:"var(--danger)",fontSize:12,marginTop:8},children:_}),z.jsxs("div",{style:{display:"flex",gap:8,marginTop:12},children:[z.jsx("button",{className:"btn-primary",onClick:lt,disabled:M,style:{fontSize:12,padding:"4px 12px"},children:M?"Adding...":"Add Model"}),z.jsx("button",{className:"btn-ghost",onClick:()=>{k(!1),E("")},style:{fontSize:12,padding:"4px 12px"},children:"Cancel"})]})]}):z.jsx("button",{className:"btn-ghost",onClick:()=>k(!0),style:{fontSize:12},children:"+ Add Custom Model"})]}),z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:8,marginBottom:40},children:[z.jsx("button",{className:"btn-primary",onClick:H,disabled:c,children:c?"Saving...":"Save Settings"}),d&&z.jsx("span",{style:{color:"var(--safe)",fontSize:13},children:"Saved"})]})]})}lA.createRoot(document.getElementById("root")).render(z.jsx(JL.StrictMode,{children:z.jsx(F3,{children:z.jsx(Y3,{children:z.jsx(h3,{children:z.jsxs(Un,{path:"/",element:z.jsx(X3,{}),children:[z.jsx(Un,{index:!0,element:z.jsx(l3,{to:"/chat",replace:!0})}),z.jsx(Un,{path:"chat",element:z.jsx(U2,{})}),z.jsx(Un,{path:"chat/:sessionId",element:z.jsx(U2,{})}),z.jsx(Un,{path:"sessions",element:z.jsx(T7,{})}),z.jsx(Un,{path:"settings",element:z.jsx(w7,{})})]})})})})}));export{N6 as $,Ac as A,k8 as B,Ur as C,Po as D,zT as E,jk as F,el as G,ay as H,N7 as I,g6 as J,Ta as K,Wg as L,at as M,A6 as N,w6 as O,jM as P,rs as Q,Fi as R,F7 as S,Rk as T,zt as U,ry as V,C6 as W,I1 as X,av as Y,V6 as Z,PM as _,Rc as a,Ut as a$,q6 as a0,r$ as a1,_R as a2,TR as a3,Te as a4,ee as a5,Lm as a6,ER as a7,Y7 as a8,Ci as a9,dz as aA,rt as aB,tD as aC,Lc as aD,m6 as aE,gt as aF,_6 as aG,Xz as aH,q7 as aI,I7 as aJ,lv as aK,TT as aL,BT as aM,Bd as aN,k1 as aO,oy as aP,xz as aQ,eI as aR,Bl as aS,a$ as aT,S6 as aU,b8 as aV,rI as aW,Uk as aX,S4 as aY,fn as aZ,wr as a_,$c as aa,y6 as ab,aI as ac,OT as ad,My as ae,vy as af,D5 as ag,hR as ah,M7 as ai,H1 as aj,fc as ak,D7 as al,Y8 as am,Sz as an,yz as ao,q_ as ap,$6 as aq,z6 as ar,D6 as as,hn as at,F1 as au,A4 as av,Br as aw,NT as ax,ky as ay,Tu as az,v as b,cD as b0,wR as b1,SR as b2,O7 as b3,BR as b4,J7 as b5,B6 as b6,xR as b7,AR as b8,H7 as b9,U7 as ba,ST as bb,_t as bc,T6 as bd,j7 as be,O6 as bf,F6 as bg,M6 as bh,R6 as bi,x8 as bj,Et as bk,Cr as bl,ZF as bm,l$ as bn,Zt as c,$7 as d,P7 as e,Sk as f,_T as g,QF as h,L6 as i,E6 as j,W7 as k,je as l,St as m,z7 as n,wT as o,R7 as p,Ey as q,DT as r,ka as s,Ay as t,vR as u,iI as v,K7 as w,tI as x,mc as y,Pk as z};