@aggroot-team/aggroot 1.9.9 → 1.10.3

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 (145) hide show
  1. package/dist/index.cjs +1043 -919
  2. package/dist/native/rg.exe +0 -0
  3. package/package.json +1 -1
  4. package/scripts/obfuscate.mjs +51 -0
  5. package/scripts/verify-no-source.mjs +2 -0
  6. package/share/web/dist/assets/{arc-vAbfGHI4.js → arc-DAWWGenL.js} +1 -1
  7. package/share/web/dist/assets/arc-DGAyaozb.js +1 -0
  8. package/share/web/dist/assets/arc-HbtxQJy3.js +1 -0
  9. package/share/web/dist/assets/{architectureDiagram-3BPJPVTR-Beofs4Vr.js → architectureDiagram-3BPJPVTR-CJQ3_Xaw.js} +1 -1
  10. package/share/web/dist/assets/architectureDiagram-3BPJPVTR-Cjrx69uF.js +36 -0
  11. package/share/web/dist/assets/architectureDiagram-3BPJPVTR-DBjyco54.js +36 -0
  12. package/share/web/dist/assets/{blockDiagram-GPEHLZMM-BHald0vJ.js → blockDiagram-GPEHLZMM-3t2ofZz0.js} +1 -1
  13. package/share/web/dist/assets/blockDiagram-GPEHLZMM-DLOBpwDC.js +132 -0
  14. package/share/web/dist/assets/blockDiagram-GPEHLZMM-DV_MSqCU.js +132 -0
  15. package/share/web/dist/assets/{c4Diagram-AAUBKEIU-DdheLyDg.js → c4Diagram-AAUBKEIU-B3e26q4H.js} +1 -1
  16. package/share/web/dist/assets/c4Diagram-AAUBKEIU-BcJ4_JAq.js +10 -0
  17. package/share/web/dist/assets/c4Diagram-AAUBKEIU-qBKEMeh0.js +10 -0
  18. package/share/web/dist/assets/channel-88yq8-21.js +1 -0
  19. package/share/web/dist/assets/channel-BBcKWs2I.js +1 -0
  20. package/share/web/dist/assets/channel-D3uC32yU.js +1 -0
  21. package/share/web/dist/assets/{chunk-2J33WTMH-CqifXJHr.js → chunk-2J33WTMH-BISdYB-C.js} +1 -1
  22. package/share/web/dist/assets/chunk-2J33WTMH-KQRj36t0.js +1 -0
  23. package/share/web/dist/assets/chunk-2J33WTMH-tf0mV7GG.js +1 -0
  24. package/share/web/dist/assets/{chunk-4BX2VUAB-Ct0wiv5k.js → chunk-4BX2VUAB-CCQ9jIht.js} +1 -1
  25. package/share/web/dist/assets/chunk-4BX2VUAB-CiQaygfY.js +1 -0
  26. package/share/web/dist/assets/chunk-4BX2VUAB-HgR5mMZH.js +1 -0
  27. package/share/web/dist/assets/{chunk-55IACEB6-C3ZOlIck.js → chunk-55IACEB6-BPBdaRwo.js} +1 -1
  28. package/share/web/dist/assets/chunk-55IACEB6-C5Ps8JH7.js +1 -0
  29. package/share/web/dist/assets/chunk-55IACEB6-Dghi_9zV.js +1 -0
  30. package/share/web/dist/assets/{chunk-727SXJPM-D_-n9Kx7.js → chunk-727SXJPM-B9F6yQpk.js} +1 -1
  31. package/share/web/dist/assets/chunk-727SXJPM-CmcZ5Wyu.js +206 -0
  32. package/share/web/dist/assets/chunk-727SXJPM-fQM7qqXa.js +206 -0
  33. package/share/web/dist/assets/{chunk-AQP2D5EJ-Cs0Pzu6B.js → chunk-AQP2D5EJ-CKe_kWkr.js} +1 -1
  34. package/share/web/dist/assets/chunk-AQP2D5EJ-Duv8-QjT.js +231 -0
  35. package/share/web/dist/assets/chunk-AQP2D5EJ-Wp1_vZxD.js +231 -0
  36. package/share/web/dist/assets/{chunk-FMBD7UC4-BqU9GOt6.js → chunk-FMBD7UC4-Dp4dDCyM.js} +1 -1
  37. package/share/web/dist/assets/chunk-FMBD7UC4-JzMA_sn1.js +15 -0
  38. package/share/web/dist/assets/chunk-FMBD7UC4-t5dwvEtU.js +15 -0
  39. package/share/web/dist/assets/{chunk-ND2GUHAM-C4XXXRHx.js → chunk-ND2GUHAM-AtOkcwxO.js} +1 -1
  40. package/share/web/dist/assets/chunk-ND2GUHAM-DcXw_V8A.js +1 -0
  41. package/share/web/dist/assets/chunk-ND2GUHAM-DvOTRk5O.js +1 -0
  42. package/share/web/dist/assets/{chunk-QZHKN3VN-BQx_T-pw.js → chunk-QZHKN3VN-BtT9oUo_.js} +1 -1
  43. package/share/web/dist/assets/chunk-QZHKN3VN-DdX7pvQV.js +1 -0
  44. package/share/web/dist/assets/chunk-QZHKN3VN-Dsnaya_3.js +1 -0
  45. package/share/web/dist/assets/classDiagram-4FO5ZUOK-BG6G2w7M.js +1 -0
  46. package/share/web/dist/assets/classDiagram-4FO5ZUOK-YD7aFmk4.js +1 -0
  47. package/share/web/dist/assets/classDiagram-4FO5ZUOK-pN64LTX2.js +1 -0
  48. package/share/web/dist/assets/classDiagram-v2-Q7XG4LA2-BG6G2w7M.js +1 -0
  49. package/share/web/dist/assets/classDiagram-v2-Q7XG4LA2-YD7aFmk4.js +1 -0
  50. package/share/web/dist/assets/classDiagram-v2-Q7XG4LA2-pN64LTX2.js +1 -0
  51. package/share/web/dist/assets/{cose-bilkent-S5V4N54A-Dg4UBnML.js → cose-bilkent-S5V4N54A-BiISwttp.js} +1 -1
  52. package/share/web/dist/assets/cose-bilkent-S5V4N54A-CWS9LN88.js +1 -0
  53. package/share/web/dist/assets/cose-bilkent-S5V4N54A-Cdcu1udn.js +1 -0
  54. package/share/web/dist/assets/{dagre-BM42HDAG-BJ-Bl03N.js → dagre-BM42HDAG-CrTY01ZS.js} +1 -1
  55. package/share/web/dist/assets/dagre-BM42HDAG-DH48KSnI.js +4 -0
  56. package/share/web/dist/assets/dagre-BM42HDAG-DSaFUOac.js +4 -0
  57. package/share/web/dist/assets/{diagram-2AECGRRQ-Copnlt_p.js → diagram-2AECGRRQ-4mPaQta7.js} +1 -1
  58. package/share/web/dist/assets/diagram-2AECGRRQ-CZFZ-P_g.js +43 -0
  59. package/share/web/dist/assets/diagram-2AECGRRQ-WHrjNyOs.js +43 -0
  60. package/share/web/dist/assets/{diagram-5GNKFQAL-CMy5CqNk.js → diagram-5GNKFQAL-B8EZUuHv.js} +1 -1
  61. package/share/web/dist/assets/diagram-5GNKFQAL-BIBtKl2n.js +10 -0
  62. package/share/web/dist/assets/diagram-5GNKFQAL-Cel1H_0m.js +10 -0
  63. package/share/web/dist/assets/{diagram-KO2AKTUF-AZ4G-26n.js → diagram-KO2AKTUF-BIQRBLfy.js} +1 -1
  64. package/share/web/dist/assets/diagram-KO2AKTUF-CgSCgVpo.js +3 -0
  65. package/share/web/dist/assets/diagram-KO2AKTUF-YkLoN09n.js +3 -0
  66. package/share/web/dist/assets/{diagram-LMA3HP47-DdD4VMzH.js → diagram-LMA3HP47-BglDNnD6.js} +1 -1
  67. package/share/web/dist/assets/diagram-LMA3HP47-CTcd_yQW.js +24 -0
  68. package/share/web/dist/assets/diagram-LMA3HP47-CtUrWgF8.js +24 -0
  69. package/share/web/dist/assets/{diagram-OG6HWLK6-jDgNtQLg.js → diagram-OG6HWLK6-BQYYwCRp.js} +1 -1
  70. package/share/web/dist/assets/diagram-OG6HWLK6-CNMAfaNl.js +24 -0
  71. package/share/web/dist/assets/diagram-OG6HWLK6-DdZyiUTB.js +24 -0
  72. package/share/web/dist/assets/{erDiagram-TEJ5UH35-BRKRSsvs.js → erDiagram-TEJ5UH35-BAiUH7TI.js} +1 -1
  73. package/share/web/dist/assets/erDiagram-TEJ5UH35-DJ5B_v36.js +85 -0
  74. package/share/web/dist/assets/erDiagram-TEJ5UH35-DjazTN-w.js +85 -0
  75. package/share/web/dist/assets/{flowDiagram-I6XJVG4X-B-y9L8Rr.js → flowDiagram-I6XJVG4X-CClDxjPP.js} +1 -1
  76. package/share/web/dist/assets/flowDiagram-I6XJVG4X-CcNqYro5.js +162 -0
  77. package/share/web/dist/assets/flowDiagram-I6XJVG4X-FgXGamXq.js +162 -0
  78. package/share/web/dist/assets/{ganttDiagram-6RSMTGT7-9HFj_Xfu.js → ganttDiagram-6RSMTGT7-BqQpl_AI.js} +1 -1
  79. package/share/web/dist/assets/ganttDiagram-6RSMTGT7-Bv7SCXEy.js +292 -0
  80. package/share/web/dist/assets/ganttDiagram-6RSMTGT7-DRFGnwMy.js +292 -0
  81. package/share/web/dist/assets/{gitGraphDiagram-PVQCEYII-BeEiyKwE.js → gitGraphDiagram-PVQCEYII-B9dyglKH.js} +1 -1
  82. package/share/web/dist/assets/gitGraphDiagram-PVQCEYII-CEFbnH6X.js +106 -0
  83. package/share/web/dist/assets/gitGraphDiagram-PVQCEYII-DtD0_1xU.js +106 -0
  84. package/share/web/dist/assets/{index-BGVEOJln.js → index-BJJGse-6.js} +4 -4
  85. package/share/web/dist/assets/index-CVJm2nsZ.js +462 -0
  86. package/share/web/dist/assets/index-DGGq2-jY.js +462 -0
  87. package/share/web/dist/assets/{infoDiagram-5YYISTIA-B_xf2BO8.js → infoDiagram-5YYISTIA-BnCd67vl.js} +1 -1
  88. package/share/web/dist/assets/infoDiagram-5YYISTIA-Cx52pYbR.js +2 -0
  89. package/share/web/dist/assets/infoDiagram-5YYISTIA-D-CZ12ig.js +2 -0
  90. package/share/web/dist/assets/{ishikawaDiagram-YF4QCWOH-CnkHvVMc.js → ishikawaDiagram-YF4QCWOH-BIbBK9lj.js} +1 -1
  91. package/share/web/dist/assets/ishikawaDiagram-YF4QCWOH-C-w0E12m.js +70 -0
  92. package/share/web/dist/assets/ishikawaDiagram-YF4QCWOH-IPq1s0X7.js +70 -0
  93. package/share/web/dist/assets/{journeyDiagram-JHISSGLW-BhCKF-L6.js → journeyDiagram-JHISSGLW-C6NL_U-x.js} +1 -1
  94. package/share/web/dist/assets/journeyDiagram-JHISSGLW-Cmyx-4-x.js +139 -0
  95. package/share/web/dist/assets/journeyDiagram-JHISSGLW-DSlilcAu.js +139 -0
  96. package/share/web/dist/assets/{kanban-definition-UN3LZRKU-f3ghgA-_.js → kanban-definition-UN3LZRKU-BPtRy2FR.js} +1 -1
  97. package/share/web/dist/assets/kanban-definition-UN3LZRKU-DUkxtwzE.js +89 -0
  98. package/share/web/dist/assets/kanban-definition-UN3LZRKU-DyrJY_CA.js +89 -0
  99. package/share/web/dist/assets/{linear-CxTWz0e9.js → linear-B3Fq5BWd.js} +1 -1
  100. package/share/web/dist/assets/linear-C4T9mQF3.js +1 -0
  101. package/share/web/dist/assets/linear-CRXFvyA0.js +1 -0
  102. package/share/web/dist/assets/{mindmap-definition-RKZ34NQL-AT8F9pYs.js → mindmap-definition-RKZ34NQL-BhdejNSk.js} +1 -1
  103. package/share/web/dist/assets/mindmap-definition-RKZ34NQL-BjID6Hwn.js +96 -0
  104. package/share/web/dist/assets/mindmap-definition-RKZ34NQL-Bp1Xd8bl.js +96 -0
  105. package/share/web/dist/assets/{pieDiagram-4H26LBE5-DdmWKttq.js → pieDiagram-4H26LBE5-Bhea-GHU.js} +1 -1
  106. package/share/web/dist/assets/pieDiagram-4H26LBE5-D4x-T8gz.js +30 -0
  107. package/share/web/dist/assets/pieDiagram-4H26LBE5-DQcREwFf.js +30 -0
  108. package/share/web/dist/assets/{quadrantDiagram-W4KKPZXB-CO1Ivpei.js → quadrantDiagram-W4KKPZXB-B3DF7GL3.js} +1 -1
  109. package/share/web/dist/assets/quadrantDiagram-W4KKPZXB-DVV9SA8B.js +7 -0
  110. package/share/web/dist/assets/quadrantDiagram-W4KKPZXB-Tlzu5KWj.js +7 -0
  111. package/share/web/dist/assets/{requirementDiagram-4Y6WPE33-D6vgvFtL.js → requirementDiagram-4Y6WPE33--mgl6P6d.js} +1 -1
  112. package/share/web/dist/assets/requirementDiagram-4Y6WPE33-79_wp-3B.js +84 -0
  113. package/share/web/dist/assets/requirementDiagram-4Y6WPE33-B3Ezfu1x.js +84 -0
  114. package/share/web/dist/assets/{sankeyDiagram-5OEKKPKP-CzpA03NF.js → sankeyDiagram-5OEKKPKP-BaUWYvhY.js} +1 -1
  115. package/share/web/dist/assets/sankeyDiagram-5OEKKPKP-D47XBz-f.js +40 -0
  116. package/share/web/dist/assets/sankeyDiagram-5OEKKPKP-D4sBgt2H.js +40 -0
  117. package/share/web/dist/assets/{sequenceDiagram-3UESZ5HK-D9p7JlcE.js → sequenceDiagram-3UESZ5HK-CROVFpmb.js} +1 -1
  118. package/share/web/dist/assets/sequenceDiagram-3UESZ5HK-CT6TJy_g.js +162 -0
  119. package/share/web/dist/assets/sequenceDiagram-3UESZ5HK-DKJomVzD.js +162 -0
  120. package/share/web/dist/assets/{stateDiagram-AJRCARHV-D5WeiPVB.js → stateDiagram-AJRCARHV-B97uFUIB.js} +1 -1
  121. package/share/web/dist/assets/stateDiagram-AJRCARHV-CbopWyKG.js +1 -0
  122. package/share/web/dist/assets/stateDiagram-AJRCARHV-ChI1w0kO.js +1 -0
  123. package/share/web/dist/assets/stateDiagram-v2-BHNVJYJU-DVp4s1rd.js +1 -0
  124. package/share/web/dist/assets/stateDiagram-v2-BHNVJYJU-ElXbEc84.js +1 -0
  125. package/share/web/dist/assets/stateDiagram-v2-BHNVJYJU-uMR_aTUu.js +1 -0
  126. package/share/web/dist/assets/{timeline-definition-PNZ67QCA-c8ZcxVVs.js → timeline-definition-PNZ67QCA-DOcZCwg5.js} +1 -1
  127. package/share/web/dist/assets/timeline-definition-PNZ67QCA-DVXrrEwF.js +120 -0
  128. package/share/web/dist/assets/timeline-definition-PNZ67QCA-DvuHWqCp.js +120 -0
  129. package/share/web/dist/assets/{vennDiagram-CIIHVFJN-Chtw87Kc.js → vennDiagram-CIIHVFJN-CaM3hdOc.js} +1 -1
  130. package/share/web/dist/assets/vennDiagram-CIIHVFJN-DRarK0mr.js +34 -0
  131. package/share/web/dist/assets/vennDiagram-CIIHVFJN-HIUt9U0v.js +34 -0
  132. package/share/web/dist/assets/{wardley-L42UT6IY-BU-MTDCS.js → wardley-L42UT6IY-B3_K9jdm.js} +1 -1
  133. package/share/web/dist/assets/wardley-L42UT6IY-BHzWkMs7.js +173 -0
  134. package/share/web/dist/assets/wardley-L42UT6IY-C4--5SCJ.js +173 -0
  135. package/share/web/dist/assets/{wardleyDiagram-YWT4CUSO-DphjJCYS.js → wardleyDiagram-YWT4CUSO-BiDxx2jY.js} +1 -1
  136. package/share/web/dist/assets/wardleyDiagram-YWT4CUSO-CG_fUTZL.js +78 -0
  137. package/share/web/dist/assets/wardleyDiagram-YWT4CUSO-CZFHdmZ7.js +78 -0
  138. package/share/web/dist/assets/{xychartDiagram-2RQKCTM6-DcJv_8WS.js → xychartDiagram-2RQKCTM6-3SwAaDmP.js} +1 -1
  139. package/share/web/dist/assets/xychartDiagram-2RQKCTM6-BJFWt8tQ.js +7 -0
  140. package/share/web/dist/assets/xychartDiagram-2RQKCTM6-_2nMxLXq.js +7 -0
  141. package/share/web/dist/index.html +1 -1
  142. package/share/web/dist/assets/channel-RUPVcLbL.js +0 -1
  143. package/share/web/dist/assets/classDiagram-4FO5ZUOK-BpLeHiQl.js +0 -1
  144. package/share/web/dist/assets/classDiagram-v2-Q7XG4LA2-BpLeHiQl.js +0 -1
  145. package/share/web/dist/assets/stateDiagram-v2-BHNVJYJU-DhUy5VW5.js +0 -1
@@ -0,0 +1,462 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-BM42HDAG-CrTY01ZS.js","assets/graph-BEmEBUp_.js","assets/layout-Bw0msyOw.js","assets/cose-bilkent-S5V4N54A-CWS9LN88.js","assets/cytoscape.esm-LDYqcvCF.js","assets/c4Diagram-AAUBKEIU-B3e26q4H.js","assets/chunk-ND2GUHAM-AtOkcwxO.js","assets/flowDiagram-I6XJVG4X-FgXGamXq.js","assets/chunk-FMBD7UC4-t5dwvEtU.js","assets/chunk-55IACEB6-BPBdaRwo.js","assets/chunk-2J33WTMH-KQRj36t0.js","assets/channel-D3uC32yU.js","assets/erDiagram-TEJ5UH35-DJ5B_v36.js","assets/gitGraphDiagram-PVQCEYII-B9dyglKH.js","assets/chunk-4BX2VUAB-CCQ9jIht.js","assets/chunk-QZHKN3VN-DdX7pvQV.js","assets/wardley-L42UT6IY-B3_K9jdm.js","assets/ganttDiagram-6RSMTGT7-BqQpl_AI.js","assets/linear-CRXFvyA0.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-CrowFXzY.js","assets/infoDiagram-5YYISTIA-BnCd67vl.js","assets/pieDiagram-4H26LBE5-Bhea-GHU.js","assets/arc-HbtxQJy3.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-W4KKPZXB-DVV9SA8B.js","assets/xychartDiagram-2RQKCTM6-_2nMxLXq.js","assets/requirementDiagram-4Y6WPE33-79_wp-3B.js","assets/sequenceDiagram-3UESZ5HK-CROVFpmb.js","assets/classDiagram-4FO5ZUOK-BG6G2w7M.js","assets/chunk-727SXJPM-fQM7qqXa.js","assets/classDiagram-v2-Q7XG4LA2-BG6G2w7M.js","assets/stateDiagram-AJRCARHV-ChI1w0kO.js","assets/chunk-AQP2D5EJ-CKe_kWkr.js","assets/stateDiagram-v2-BHNVJYJU-uMR_aTUu.js","assets/journeyDiagram-JHISSGLW-Cmyx-4-x.js","assets/timeline-definition-PNZ67QCA-DOcZCwg5.js","assets/mindmap-definition-RKZ34NQL-BjID6Hwn.js","assets/kanban-definition-UN3LZRKU-DyrJY_CA.js","assets/sankeyDiagram-5OEKKPKP-BaUWYvhY.js","assets/diagram-LMA3HP47-CtUrWgF8.js","assets/diagram-2AECGRRQ-CZFZ-P_g.js","assets/blockDiagram-GPEHLZMM-3t2ofZz0.js","assets/diagram-5GNKFQAL-Cel1H_0m.js","assets/architectureDiagram-3BPJPVTR-DBjyco54.js","assets/diagram-KO2AKTUF-CgSCgVpo.js","assets/diagram-OG6HWLK6-DdZyiUTB.js","assets/wardleyDiagram-YWT4CUSO-CZFHdmZ7.js"])))=>i.map(i=>d[i]);
2
+ var JL=Object.defineProperty;var tA=(e,t,r)=>t in e?JL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Lt=(e,t,r)=>tA(e,typeof t!="symbol"?t+"":t,r);(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 r(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=r(s);fetch(s.href,l)}})();function Rm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xp={exports:{}},No={};/**
3
+ * @license React
4
+ * react-jsx-runtime.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var zC;function eA(){if(zC)return No;zC=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(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 No.Fragment=t,No.jsx=r,No.jsxs=r,No}var NC;function iA(){return NC||(NC=1,Xp.exports=eA()),Xp.exports}var U=iA(),Vp={exports:{}},It={};/**
11
+ * @license React
12
+ * react.production.js
13
+ *
14
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var qC;function rA(){if(qC)return It;qC=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=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"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),x=Symbol.iterator;function m($){return $===null||typeof $!="object"?null:($=x&&$[x]||$["@@iterator"],typeof $=="function"?$:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,v={};function T($,tt,ct){this.props=$,this.context=tt,this.refs=v,this.updater=ct||C}T.prototype.isReactComponent={},T.prototype.setState=function($,tt){if(typeof $!="object"&&typeof $!="function"&&$!=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,$,tt,"setState")},T.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function _(){}_.prototype=T.prototype;function E($,tt,ct){this.props=$,this.context=tt,this.refs=v,this.updater=ct||C}var R=E.prototype=new _;R.constructor=E,k(R,T.prototype),R.isPureReactComponent=!0;var F=Array.isArray;function N(){}var H={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function at($,tt,ct){var ht=ct.ref;return{$$typeof:e,type:$,key:tt,ref:ht!==void 0?ht:null,props:ct}}function X($,tt){return at($.type,tt,$.props)}function D($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function V($){var tt={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(ct){return tt[ct]})}var J=/\/+/g;function Y($,tt){return typeof $=="object"&&$!==null&&$.key!=null?V(""+$.key):tt.toString(36)}function j($){switch($.status){case"fulfilled":return $.value;case"rejected":throw $.reason;default:switch(typeof $.status=="string"?$.then(N,N):($.status="pending",$.then(function(tt){$.status==="pending"&&($.status="fulfilled",$.value=tt)},function(tt){$.status==="pending"&&($.status="rejected",$.reason=tt)})),$.status){case"fulfilled":return $.value;case"rejected":throw $.reason}}throw $}function A($,tt,ct,ht,yt){var xt=typeof $;(xt==="undefined"||xt==="boolean")&&($=null);var Ft=!1;if($===null)Ft=!0;else switch(xt){case"bigint":case"string":case"number":Ft=!0;break;case"object":switch($.$$typeof){case e:case t:Ft=!0;break;case p:return Ft=$._init,A(Ft($._payload),tt,ct,ht,yt)}}if(Ft)return yt=yt($),Ft=ht===""?"."+Y($,0):ht,F(yt)?(ct="",Ft!=null&&(ct=Ft.replace(J,"$&/")+"/"),A(yt,tt,ct,"",function(mt){return mt})):yt!=null&&(D(yt)&&(yt=X(yt,ct+(yt.key==null||$&&$.key===yt.key?"":(""+yt.key).replace(J,"$&/")+"/")+Ft)),tt.push(yt)),1;Ft=0;var Dt=ht===""?".":ht+":";if(F($))for(var pt=0;pt<$.length;pt++)ht=$[pt],xt=Dt+Y(ht,pt),Ft+=A(ht,tt,ct,xt,yt);else if(pt=m($),typeof pt=="function")for($=pt.call($),pt=0;!(ht=$.next()).done;)ht=ht.value,xt=Dt+Y(ht,pt++),Ft+=A(ht,tt,ct,xt,yt);else if(xt==="object"){if(typeof $.then=="function")return A(j($),tt,ct,ht,yt);throw tt=String($),Error("Objects are not valid as a React child (found: "+(tt==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":tt)+"). If you meant to render a collection of children, use an array instead.")}return Ft}function z($,tt,ct){if($==null)return $;var ht=[],yt=0;return A($,ht,"","",function(xt){return tt.call(ct,xt,yt++)}),ht}function O($){if($._status===-1){var tt=$._result;tt=tt(),tt.then(function(ct){($._status===0||$._status===-1)&&($._status=1,$._result=ct)},function(ct){($._status===0||$._status===-1)&&($._status=2,$._result=ct)}),$._status===-1&&($._status=0,$._result=tt)}if($._status===1)return $._result.default;throw $._result}var M=typeof reportError=="function"?reportError:function($){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var tt=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof $=="object"&&$!==null&&typeof $.message=="string"?String($.message):String($),error:$});if(!window.dispatchEvent(tt))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",$);return}console.error($)},Q={map:z,forEach:function($,tt,ct){z($,function(){tt.apply(this,arguments)},ct)},count:function($){var tt=0;return z($,function(){tt++}),tt},toArray:function($){return z($,function(tt){return tt})||[]},only:function($){if(!D($))throw Error("React.Children.only expected to receive a single React element child.");return $}};return It.Activity=g,It.Children=Q,It.Component=T,It.Fragment=r,It.Profiler=s,It.PureComponent=E,It.StrictMode=a,It.Suspense=f,It.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,It.__COMPILER_RUNTIME={__proto__:null,c:function($){return H.H.useMemoCache($)}},It.cache=function($){return function(){return $.apply(null,arguments)}},It.cacheSignal=function(){return null},It.cloneElement=function($,tt,ct){if($==null)throw Error("The argument must be a React element, but you passed "+$+".");var ht=k({},$.props),yt=$.key;if(tt!=null)for(xt in tt.key!==void 0&&(yt=""+tt.key),tt)!I.call(tt,xt)||xt==="key"||xt==="__self"||xt==="__source"||xt==="ref"&&tt.ref===void 0||(ht[xt]=tt[xt]);var xt=arguments.length-2;if(xt===1)ht.children=ct;else if(1<xt){for(var Ft=Array(xt),Dt=0;Dt<xt;Dt++)Ft[Dt]=arguments[Dt+2];ht.children=Ft}return at($.type,yt,ht)},It.createContext=function($){return $={$$typeof:c,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null},$.Provider=$,$.Consumer={$$typeof:l,_context:$},$},It.createElement=function($,tt,ct){var ht,yt={},xt=null;if(tt!=null)for(ht in tt.key!==void 0&&(xt=""+tt.key),tt)I.call(tt,ht)&&ht!=="key"&&ht!=="__self"&&ht!=="__source"&&(yt[ht]=tt[ht]);var Ft=arguments.length-2;if(Ft===1)yt.children=ct;else if(1<Ft){for(var Dt=Array(Ft),pt=0;pt<Ft;pt++)Dt[pt]=arguments[pt+2];yt.children=Dt}if($&&$.defaultProps)for(ht in Ft=$.defaultProps,Ft)yt[ht]===void 0&&(yt[ht]=Ft[ht]);return at($,xt,yt)},It.createRef=function(){return{current:null}},It.forwardRef=function($){return{$$typeof:h,render:$}},It.isValidElement=D,It.lazy=function($){return{$$typeof:p,_payload:{_status:-1,_result:$},_init:O}},It.memo=function($,tt){return{$$typeof:d,type:$,compare:tt===void 0?null:tt}},It.startTransition=function($){var tt=H.T,ct={};H.T=ct;try{var ht=$(),yt=H.S;yt!==null&&yt(ct,ht),typeof ht=="object"&&ht!==null&&typeof ht.then=="function"&&ht.then(N,M)}catch(xt){M(xt)}finally{tt!==null&&ct.types!==null&&(tt.types=ct.types),H.T=tt}},It.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},It.use=function($){return H.H.use($)},It.useActionState=function($,tt,ct){return H.H.useActionState($,tt,ct)},It.useCallback=function($,tt){return H.H.useCallback($,tt)},It.useContext=function($){return H.H.useContext($)},It.useDebugValue=function(){},It.useDeferredValue=function($,tt){return H.H.useDeferredValue($,tt)},It.useEffect=function($,tt){return H.H.useEffect($,tt)},It.useEffectEvent=function($){return H.H.useEffectEvent($)},It.useId=function(){return H.H.useId()},It.useImperativeHandle=function($,tt,ct){return H.H.useImperativeHandle($,tt,ct)},It.useInsertionEffect=function($,tt){return H.H.useInsertionEffect($,tt)},It.useLayoutEffect=function($,tt){return H.H.useLayoutEffect($,tt)},It.useMemo=function($,tt){return H.H.useMemo($,tt)},It.useOptimistic=function($,tt){return H.H.useOptimistic($,tt)},It.useReducer=function($,tt,ct){return H.H.useReducer($,tt,ct)},It.useRef=function($){return H.H.useRef($)},It.useState=function($){return H.H.useState($)},It.useSyncExternalStore=function($,tt,ct){return H.H.useSyncExternalStore($,tt,ct)},It.useTransition=function(){return H.H.useTransition()},It.version="19.2.6",It}var IC;function Fm(){return IC||(IC=1,Vp.exports=rA()),Vp.exports}var P=Fm();const aA=Rm(P);var Zp={exports:{}},qo={},Qp={exports:{}},Kp={};/**
19
+ * @license React
20
+ * scheduler.production.js
21
+ *
22
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var HC;function nA(){return HC||(HC=1,(function(e){function t(A,z){var O=A.length;A.push(z);t:for(;0<O;){var M=O-1>>>1,Q=A[M];if(0<s(Q,z))A[M]=z,A[O]=Q,O=M;else break t}}function r(A){return A.length===0?null:A[0]}function a(A){if(A.length===0)return null;var z=A[0],O=A.pop();if(O!==z){A[0]=O;t:for(var M=0,Q=A.length,$=Q>>>1;M<$;){var tt=2*(M+1)-1,ct=A[tt],ht=tt+1,yt=A[ht];if(0>s(ct,O))ht<Q&&0>s(yt,ct)?(A[M]=yt,A[ht]=O,M=ht):(A[M]=ct,A[tt]=O,M=tt);else if(ht<Q&&0>s(yt,O))A[M]=yt,A[ht]=O,M=ht;else break t}}return z}function s(A,z){var O=A.sortIndex-z.sortIndex;return O!==0?O:A.id-z.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 f=[],d=[],p=1,g=null,x=3,m=!1,C=!1,k=!1,v=!1,T=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function R(A){for(var z=r(d);z!==null;){if(z.callback===null)a(d);else if(z.startTime<=A)a(d),z.sortIndex=z.expirationTime,t(f,z);else break;z=r(d)}}function F(A){if(k=!1,R(A),!C)if(r(f)!==null)C=!0,N||(N=!0,V());else{var z=r(d);z!==null&&j(F,z.startTime-A)}}var N=!1,H=-1,I=5,at=-1;function X(){return v?!0:!(e.unstable_now()-at<I)}function D(){if(v=!1,N){var A=e.unstable_now();at=A;var z=!0;try{t:{C=!1,k&&(k=!1,_(H),H=-1),m=!0;var O=x;try{e:{for(R(A),g=r(f);g!==null&&!(g.expirationTime>A&&X());){var M=g.callback;if(typeof M=="function"){g.callback=null,x=g.priorityLevel;var Q=M(g.expirationTime<=A);if(A=e.unstable_now(),typeof Q=="function"){g.callback=Q,R(A),z=!0;break e}g===r(f)&&a(f),R(A)}else a(f);g=r(f)}if(g!==null)z=!0;else{var $=r(d);$!==null&&j(F,$.startTime-A),z=!1}}break t}finally{g=null,x=O,m=!1}z=void 0}}finally{z?V():N=!1}}}var V;if(typeof E=="function")V=function(){E(D)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,Y=J.port2;J.port1.onmessage=D,V=function(){Y.postMessage(null)}}else V=function(){T(D,0)};function j(A,z){H=T(function(){A(e.unstable_now())},z)}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"):I=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 z=3;break;default:z=x}var O=x;x=z;try{return A()}finally{x=O}},e.unstable_requestPaint=function(){v=!0},e.unstable_runWithPriority=function(A,z){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var O=x;x=A;try{return z()}finally{x=O}},e.unstable_scheduleCallback=function(A,z,O){var M=e.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?M+O:M):O=M,A){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=O+Q,A={id:p++,callback:z,priorityLevel:A,startTime:O,expirationTime:Q,sortIndex:-1},O>M?(A.sortIndex=O,t(d,A),r(f)===null&&A===r(d)&&(k?(_(H),H=-1):k=!0,j(F,O-M))):(A.sortIndex=Q,t(f,A),C||m||(C=!0,N||(N=!0,V()))),A},e.unstable_shouldYield=X,e.unstable_wrapCallback=function(A){var z=x;return function(){var O=x;x=z;try{return A.apply(this,arguments)}finally{x=O}}}})(Kp)),Kp}var UC;function sA(){return UC||(UC=1,Qp.exports=nA()),Qp.exports}var Jp={exports:{}},hi={};/**
27
+ * @license React
28
+ * react-dom.production.js
29
+ *
30
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var jC;function lA(){if(jC)return hi;jC=1;var e=Fm();function t(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)d+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+f+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(f,d,p){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:f,containerInfo:d,implementation:p}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return hi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,hi.createPortal=function(f,d){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return l(f,d,null,p)},hi.flushSync=function(f){var d=c.T,p=a.p;try{if(c.T=null,a.p=2,f)return f()}finally{c.T=d,a.p=p,a.d.f()}},hi.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,a.d.C(f,d))},hi.prefetchDNS=function(f){typeof f=="string"&&a.d.D(f)},hi.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var p=d.as,g=h(p,d.crossOrigin),x=typeof d.integrity=="string"?d.integrity:void 0,m=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;p==="style"?a.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:g,integrity:x,fetchPriority:m}):p==="script"&&a.d.X(f,{crossOrigin:g,integrity:x,fetchPriority:m,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},hi.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var p=h(d.as,d.crossOrigin);a.d.M(f,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&a.d.M(f)},hi.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var p=d.as,g=h(p,d.crossOrigin);a.d.L(f,p,{crossOrigin:g,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},hi.preloadModule=function(f,d){if(typeof f=="string")if(d){var p=h(d.as,d.crossOrigin);a.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else a.d.m(f)},hi.requestFormReset=function(f){a.d.r(f)},hi.unstable_batchedUpdates=function(f,d){return f(d)},hi.useFormState=function(f,d,p){return c.H.useFormState(f,d,p)},hi.useFormStatus=function(){return c.H.useHostTransitionStatus()},hi.version="19.2.6",hi}var PC;function oA(){if(PC)return Jp.exports;PC=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(),Jp.exports=lA(),Jp.exports}/**
35
+ * @license React
36
+ * react-dom-client.production.js
37
+ *
38
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
39
+ *
40
+ * This source code is licensed under the MIT license found in the
41
+ * LICENSE file in the root directory of this source tree.
42
+ */var WC;function cA(){if(WC)return qo;WC=1;var e=sA(),t=Fm(),r=oA();function a(i){var n="https://react.dev/errors/"+i;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 #"+i+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function l(i){var n=i,o=i;if(i.alternate)for(;n.return;)n=n.return;else{i=n;do n=i,(n.flags&4098)!==0&&(o=n.return),i=n.return;while(i)}return n.tag===3?o:null}function c(i){if(i.tag===13){var n=i.memoizedState;if(n===null&&(i=i.alternate,i!==null&&(n=i.memoizedState)),n!==null)return n.dehydrated}return null}function h(i){if(i.tag===31){var n=i.memoizedState;if(n===null&&(i=i.alternate,i!==null&&(n=i.memoizedState)),n!==null)return n.dehydrated}return null}function f(i){if(l(i)!==i)throw Error(a(188))}function d(i){var n=i.alternate;if(!n){if(n=l(i),n===null)throw Error(a(188));return n!==i?null:i}for(var o=i,u=n;;){var y=o.return;if(y===null)break;var b=y.alternate;if(b===null){if(u=y.return,u!==null){o=u;continue}break}if(y.child===b.child){for(b=y.child;b;){if(b===o)return f(y),i;if(b===u)return f(y),n;b=b.sibling}throw Error(a(188))}if(o.return!==u.return)o=y,u=b;else{for(var w=!1,L=y.child;L;){if(L===o){w=!0,o=y,u=b;break}if(L===u){w=!0,u=y,o=b;break}L=L.sibling}if(!w){for(L=b.child;L;){if(L===o){w=!0,o=b,u=y;break}if(L===u){w=!0,u=b,o=y;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?i:n}function p(i){var n=i.tag;if(n===5||n===26||n===27||n===6)return i;for(i=i.child;i!==null;){if(n=p(i),n!==null)return n;i=i.sibling}return null}var g=Object.assign,x=Symbol.for("react.element"),m=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),E=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),at=Symbol.for("react.activity"),X=Symbol.for("react.memo_cache_sentinel"),D=Symbol.iterator;function V(i){return i===null||typeof i!="object"?null:(i=D&&i[D]||i["@@iterator"],typeof i=="function"?i:null)}var J=Symbol.for("react.client.reference");function Y(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===J?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case k:return"Fragment";case T:return"Profiler";case v:return"StrictMode";case F:return"Suspense";case N:return"SuspenseList";case at:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case C:return"Portal";case E:return i.displayName||"Context";case _:return(i._context.displayName||"Context")+".Consumer";case R:var n=i.render;return i=i.displayName,i||(i=n.displayName||n.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case H:return n=i.displayName||null,n!==null?n:Y(i.type)||"Memo";case I:n=i._payload,i=i._init;try{return Y(i(n))}catch{}}return null}var j=Array.isArray,A=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O={pending:!1,data:null,method:null,action:null},M=[],Q=-1;function $(i){return{current:i}}function tt(i){0>Q||(i.current=M[Q],M[Q]=null,Q--)}function ct(i,n){Q++,M[Q]=i.current,i.current=n}var ht=$(null),yt=$(null),xt=$(null),Ft=$(null);function Dt(i,n){switch(ct(xt,n),ct(yt,i),ct(ht,null),n.nodeType){case 9:case 11:i=(i=n.documentElement)&&(i=i.namespaceURI)?sC(i):0;break;default:if(i=n.tagName,n=n.namespaceURI)n=sC(n),i=lC(n,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}tt(ht),ct(ht,i)}function pt(){tt(ht),tt(yt),tt(xt)}function mt(i){i.memoizedState!==null&&ct(Ft,i);var n=ht.current,o=lC(n,i.type);n!==o&&(ct(yt,i),ct(ht,o))}function Ct(i){yt.current===i&&(tt(ht),tt(yt)),Ft.current===i&&(tt(Ft),Oo._currentValue=O)}var Ht,he;function Oe(i){if(Ht===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);Ht=n&&n[1]||"",he=-1<o.stack.indexOf(`
43
+ at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
44
+ `+Ht+i+he}var ne=!1;function Ce(i,n){if(!i||ne)return"";ne=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(n){var dt=function(){throw Error()};if(Object.defineProperty(dt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(dt,[])}catch(lt){var rt=lt}Reflect.construct(i,[],dt)}else{try{dt.call()}catch(lt){rt=lt}i.call(dt.prototype)}}else{try{throw Error()}catch(lt){rt=lt}(dt=i())&&typeof dt.catch=="function"&&dt.catch(function(){})}}catch(lt){if(lt&&rt&&typeof lt.stack=="string")return[lt.stack,rt.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=u.DetermineComponentFrameRoot(),w=b[0],L=b[1];if(w&&L){var W=w.split(`
45
+ `),it=L.split(`
46
+ `);for(y=u=0;u<W.length&&!W[u].includes("DetermineComponentFrameRoot");)u++;for(;y<it.length&&!it[y].includes("DetermineComponentFrameRoot");)y++;if(u===W.length||y===it.length)for(u=W.length-1,y=it.length-1;1<=u&&0<=y&&W[u]!==it[y];)y--;for(;1<=u&&0<=y;u--,y--)if(W[u]!==it[y]){if(u!==1||y!==1)do if(u--,y--,0>y||W[u]!==it[y]){var ot=`
47
+ `+W[u].replace(" at new "," at ");return i.displayName&&ot.includes("<anonymous>")&&(ot=ot.replace("<anonymous>",i.displayName)),ot}while(1<=u&&0<=y);break}}}finally{ne=!1,Error.prepareStackTrace=o}return(o=i?i.displayName||i.name:"")?Oe(o):""}function mi(i,n){switch(i.tag){case 26:case 27:case 5:return Oe(i.type);case 16:return Oe("Lazy");case 13:return i.child!==n&&n!==null?Oe("Suspense Fallback"):Oe("Suspense");case 19:return Oe("SuspenseList");case 0:case 15:return Ce(i.type,!1);case 11:return Ce(i.type.render,!1);case 1:return Ce(i.type,!0);case 31:return Oe("Activity");default:return""}}function Te(i){try{var n="",o=null;do n+=mi(i,o),o=i,i=i.return;while(i);return n}catch(u){return`
48
+ Error generating stack: `+u.message+`
49
+ `+u.stack}}var Zr=Object.prototype.hasOwnProperty,Qr=e.unstable_scheduleCallback,yi=e.unstable_cancelCallback,cs=e.unstable_shouldYield,hs=e.unstable_requestPaint,li=e.unstable_now,qc=e.unstable_getCurrentPriorityLevel,Pl=e.unstable_ImmediatePriority,us=e.unstable_UserBlockingPriority,Fr=e.unstable_NormalPriority,La=e.unstable_LowPriority,qi=e.unstable_IdlePriority,Wl=e.log,Ic=e.unstable_setDisableYieldValue,Aa=null,Ke=null;function dr(i){if(typeof Wl=="function"&&Ic(i),Ke&&typeof Ke.setStrictMode=="function")try{Ke.setStrictMode(Aa,i)}catch{}}var Ve=Math.clz32?Math.clz32:Ma,fs=Math.log,Ki=Math.LN2;function Ma(i){return i>>>=0,i===0?32:31-(fs(i)/Ki|0)|0}var Ra=256,Fa=262144,ds=4194304;function pr(i){var n=i&42;if(n!==0)return n;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Oa(i,n,o){var u=i.pendingLanes;if(u===0)return 0;var y=0,b=i.suspendedLanes,w=i.pingedLanes;i=i.warmLanes;var L=u&134217727;return L!==0?(u=L&~b,u!==0?y=pr(u):(w&=L,w!==0?y=pr(w):o||(o=L&~i,o!==0&&(y=pr(o))))):(L=u&~b,L!==0?y=pr(L):w!==0?y=pr(w):o||(o=u&~i,o!==0&&(y=pr(o)))),y===0?0:n!==0&&n!==y&&(n&b)===0&&(b=y&-y,o=n&-n,b>=o||b===32&&(o&4194048)!==0)?n:y}function Sn(i,n){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&n)===0}function Tn(i,n){switch(i){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 Hc(){var i=ds;return ds<<=1,(ds&62914560)===0&&(ds=4194304),i}function Yl(i){for(var n=[],o=0;31>o;o++)n.push(i);return n}function xe(i,n){i.pendingLanes|=n,n!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Da(i,n,o,u,y,b){var w=i.pendingLanes;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=o,i.entangledLanes&=o,i.errorRecoveryDisabledLanes&=o,i.shellSuspendCounter=0;var L=i.entanglements,W=i.expirationTimes,it=i.hiddenUpdates;for(o=w&~o;0<o;){var ot=31-Ve(o),dt=1<<ot;L[ot]=0,W[ot]=-1;var rt=it[ot];if(rt!==null)for(it[ot]=null,ot=0;ot<rt.length;ot++){var lt=rt[ot];lt!==null&&(lt.lane&=-536870913)}o&=~dt}u!==0&&Uc(i,u,0),b!==0&&y===0&&i.tag!==0&&(i.suspendedLanes|=b&~(w&~n))}function Uc(i,n,o){i.pendingLanes|=n,i.suspendedLanes&=~n;var u=31-Ve(n);i.entangledLanes|=n,i.entanglements[u]=i.entanglements[u]|1073741824|o&261930}function Gl(i,n){var o=i.entangledLanes|=n;for(i=i.entanglements;o;){var u=31-Ve(o),y=1<<u;y&n|i[u]&n&&(i[u]|=n),o&=~y}}function ps(i,n){var o=n&-n;return o=(o&42)!==0?1:gs(o),(o&(i.suspendedLanes|n))!==0?0:o}function gs(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function ms(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function jc(){var i=z.p;return i!==0?i:(i=window.event,i===void 0?32:AC(i.type))}function _i(i,n){var o=z.p;try{return z.p=i,n()}finally{z.p=o}}var oi=Math.random().toString(36).slice(2),Ne="__reactFiber$"+oi,Je="__reactProps$"+oi,Kr="__reactContainer$"+oi,$a="__reactEvents$"+oi,Xl="__reactListeners$"+oi,ys="__reactHandles$"+oi,Ji="__reactResources$"+oi,za="__reactMarker$"+oi;function xs(i){delete i[Ne],delete i[Je],delete i[$a],delete i[Xl],delete i[ys]}function Na(i){var n=i[Ne];if(n)return n;for(var o=i.parentNode;o;){if(n=o[Kr]||o[Ne]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(i=pC(i);i!==null;){if(o=i[Ne])return o;i=pC(i)}return n}i=o,o=i.parentNode}return null}function Jr(i){if(i=i[Ne]||i[Kr]){var n=i.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return i}return null}function qa(i){var n=i.tag;if(n===5||n===26||n===27||n===6)return i.stateNode;throw Error(a(33))}function Or(i){var n=i[Ji];return n||(n=i[Ji]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Ee(i){i[za]=!0}var wt=new Set,q={};function ut(i,n){bt(i,n),bt(i+"Capture",n)}function bt(i,n){for(q[i]=n,i=0;i<n.length;i++)wt.add(n[i])}var se=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]*$"),te={},ke={};function Bi(i){return Zr.call(ke,i)?!0:Zr.call(te,i)?!1:se.test(i)?ke[i]=!0:(te[i]=!0,!1)}function xi(i,n,o){if(Bi(n))if(o===null)i.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":i.removeAttribute(n);return;case"boolean":var u=n.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){i.removeAttribute(n);return}}i.setAttribute(n,""+o)}}function ci(i,n,o){if(o===null)i.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(n);return}i.setAttribute(n,""+o)}}function Ii(i,n,o,u){if(u===null)i.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(o);return}i.setAttributeNS(n,o,""+u)}}function le(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Vl(i){var n=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Pc(i,n,o){var u=Object.getOwnPropertyDescriptor(i.constructor.prototype,n);if(!i.hasOwnProperty(n)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var y=u.get,b=u.set;return Object.defineProperty(i,n,{configurable:!0,get:function(){return y.call(this)},set:function(w){o=""+w,b.call(this,w)}}),Object.defineProperty(i,n,{enumerable:u.enumerable}),{getValue:function(){return o},setValue:function(w){o=""+w},stopTracking:function(){i._valueTracker=null,delete i[n]}}}}function Hf(i){if(!i._valueTracker){var n=Vl(i)?"checked":"value";i._valueTracker=Pc(i,n,""+i[n])}}function Jy(i){if(!i)return!1;var n=i._valueTracker;if(!n)return!0;var o=n.getValue(),u="";return i&&(u=Vl(i)?i.checked?"true":"false":i.value),i=u,i!==o?(n.setValue(i),!0):!1}function Wc(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var GB=/[\n"\\]/g;function tr(i){return i.replace(GB,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Uf(i,n,o,u,y,b,w,L){i.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?i.type=w:i.removeAttribute("type"),n!=null?w==="number"?(n===0&&i.value===""||i.value!=n)&&(i.value=""+le(n)):i.value!==""+le(n)&&(i.value=""+le(n)):w!=="submit"&&w!=="reset"||i.removeAttribute("value"),n!=null?jf(i,w,le(n)):o!=null?jf(i,w,le(o)):u!=null&&i.removeAttribute("value"),y==null&&b!=null&&(i.defaultChecked=!!b),y!=null&&(i.checked=y&&typeof y!="function"&&typeof y!="symbol"),L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?i.name=""+le(L):i.removeAttribute("name")}function t0(i,n,o,u,y,b,w,L){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(i.type=b),n!=null||o!=null){if(!(b!=="submit"&&b!=="reset"||n!=null)){Hf(i);return}o=o!=null?""+le(o):"",n=n!=null?""+le(n):o,L||n===i.value||(i.value=n),i.defaultValue=n}u=u??y,u=typeof u!="function"&&typeof u!="symbol"&&!!u,i.checked=L?i.checked:!!u,i.defaultChecked=!!u,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(i.name=w),Hf(i)}function jf(i,n,o){n==="number"&&Wc(i.ownerDocument)===i||i.defaultValue===""+o||(i.defaultValue=""+o)}function bs(i,n,o,u){if(i=i.options,n){n={};for(var y=0;y<o.length;y++)n["$"+o[y]]=!0;for(o=0;o<i.length;o++)y=n.hasOwnProperty("$"+i[o].value),i[o].selected!==y&&(i[o].selected=y),y&&u&&(i[o].defaultSelected=!0)}else{for(o=""+le(o),n=null,y=0;y<i.length;y++){if(i[y].value===o){i[y].selected=!0,u&&(i[y].defaultSelected=!0);return}n!==null||i[y].disabled||(n=i[y])}n!==null&&(n.selected=!0)}}function e0(i,n,o){if(n!=null&&(n=""+le(n),n!==i.value&&(i.value=n),o==null)){i.defaultValue!==n&&(i.defaultValue=n);return}i.defaultValue=o!=null?""+le(o):""}function i0(i,n,o,u){if(n==null){if(u!=null){if(o!=null)throw Error(a(92));if(j(u)){if(1<u.length)throw Error(a(93));u=u[0]}o=u}o==null&&(o=""),n=o}o=le(n),i.defaultValue=o,u=i.textContent,u===o&&u!==""&&u!==null&&(i.value=u),Hf(i)}function Cs(i,n){if(n){var o=i.firstChild;if(o&&o===i.lastChild&&o.nodeType===3){o.nodeValue=n;return}}i.textContent=n}var XB=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 r0(i,n,o){var u=n.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?u?i.setProperty(n,""):n==="float"?i.cssFloat="":i[n]="":u?i.setProperty(n,o):typeof o!="number"||o===0||XB.has(n)?n==="float"?i.cssFloat=o:i[n]=(""+o).trim():i[n]=o+"px"}function a0(i,n,o){if(n!=null&&typeof n!="object")throw Error(a(62));if(i=i.style,o!=null){for(var u in o)!o.hasOwnProperty(u)||n!=null&&n.hasOwnProperty(u)||(u.indexOf("--")===0?i.setProperty(u,""):u==="float"?i.cssFloat="":i[u]="");for(var y in n)u=n[y],n.hasOwnProperty(y)&&o[y]!==u&&r0(i,y,u)}else for(var b in n)n.hasOwnProperty(b)&&r0(i,b,n[b])}function Pf(i){if(i.indexOf("-")===-1)return!1;switch(i){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 VB=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"]]),ZB=/^[\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 Yc(i){return ZB.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function ta(){}var Wf=null;function Yf(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var ks=null,vs=null;function n0(i){var n=Jr(i);if(n&&(i=n.stateNode)){var o=i[Je]||null;t:switch(i=n.stateNode,n.type){case"input":if(Uf(i,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),n=o.name,o.type==="radio"&&n!=null){for(o=i;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+tr(""+n)+'"][type="radio"]'),n=0;n<o.length;n++){var u=o[n];if(u!==i&&u.form===i.form){var y=u[Je]||null;if(!y)throw Error(a(90));Uf(u,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(n=0;n<o.length;n++)u=o[n],u.form===i.form&&Jy(u)}break t;case"textarea":e0(i,o.value,o.defaultValue);break t;case"select":n=o.value,n!=null&&bs(i,!!o.multiple,n,!1)}}}var Gf=!1;function s0(i,n,o){if(Gf)return i(n,o);Gf=!0;try{var u=i(n);return u}finally{if(Gf=!1,(ks!==null||vs!==null)&&(Fh(),ks&&(n=ks,i=vs,vs=ks=null,n0(n),i)))for(n=0;n<i.length;n++)n0(i[n])}}function Zl(i,n){var o=i.stateNode;if(o===null)return null;var u=o[Je]||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)||(i=i.type,u=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!u;break t;default:i=!1}if(i)return null;if(o&&typeof o!="function")throw Error(a(231,n,typeof o));return o}var ea=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xf=!1;if(ea)try{var Ql={};Object.defineProperty(Ql,"passive",{get:function(){Xf=!0}}),window.addEventListener("test",Ql,Ql),window.removeEventListener("test",Ql,Ql)}catch{Xf=!1}var Ia=null,Vf=null,Gc=null;function l0(){if(Gc)return Gc;var i,n=Vf,o=n.length,u,y="value"in Ia?Ia.value:Ia.textContent,b=y.length;for(i=0;i<o&&n[i]===y[i];i++);var w=o-i;for(u=1;u<=w&&n[o-u]===y[b-u];u++);return Gc=y.slice(i,1<u?1-u:void 0)}function Xc(i){var n=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&n===13&&(i=13)):i=n,i===10&&(i=13),32<=i||i===13?i:0}function Vc(){return!0}function o0(){return!1}function Ei(i){function n(o,u,y,b,w){this._reactName=o,this._targetInst=y,this.type=u,this.nativeEvent=b,this.target=w,this.currentTarget=null;for(var L in i)i.hasOwnProperty(L)&&(o=i[L],this[L]=o?o(b):b[L]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Vc:o0,this.isPropagationStopped=o0,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=Vc)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Vc)},persist:function(){},isPersistent:Vc}),n}var wn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zc=Ei(wn),Kl=g({},wn,{view:0,detail:0}),QB=Ei(Kl),Zf,Qf,Jl,Qc=g({},Kl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jf,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Jl&&(Jl&&i.type==="mousemove"?(Zf=i.screenX-Jl.screenX,Qf=i.screenY-Jl.screenY):Qf=Zf=0,Jl=i),Zf)},movementY:function(i){return"movementY"in i?i.movementY:Qf}}),c0=Ei(Qc),KB=g({},Qc,{dataTransfer:0}),JB=Ei(KB),tE=g({},Kl,{relatedTarget:0}),Kf=Ei(tE),eE=g({},wn,{animationName:0,elapsedTime:0,pseudoElement:0}),iE=Ei(eE),rE=g({},wn,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),aE=Ei(rE),nE=g({},wn,{data:0}),h0=Ei(nE),sE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},lE={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"},oE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cE(i){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(i):(i=oE[i])?!!n[i]:!1}function Jf(){return cE}var hE=g({},Kl,{key:function(i){if(i.key){var n=sE[i.key]||i.key;if(n!=="Unidentified")return n}return i.type==="keypress"?(i=Xc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?lE[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jf,charCode:function(i){return i.type==="keypress"?Xc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Xc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),uE=Ei(hE),fE=g({},Qc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),u0=Ei(fE),dE=g({},Kl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jf}),pE=Ei(dE),gE=g({},wn,{propertyName:0,elapsedTime:0,pseudoElement:0}),mE=Ei(gE),yE=g({},Qc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),xE=Ei(yE),bE=g({},wn,{newState:0,oldState:0}),CE=Ei(bE),kE=[9,13,27,32],td=ea&&"CompositionEvent"in window,to=null;ea&&"documentMode"in document&&(to=document.documentMode);var vE=ea&&"TextEvent"in window&&!to,f0=ea&&(!td||to&&8<to&&11>=to),d0=" ",p0=!1;function g0(i,n){switch(i){case"keyup":return kE.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function m0(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ss=!1;function SE(i,n){switch(i){case"compositionend":return m0(n);case"keypress":return n.which!==32?null:(p0=!0,d0);case"textInput":return i=n.data,i===d0&&p0?null:i;default:return null}}function TE(i,n){if(Ss)return i==="compositionend"||!td&&g0(i,n)?(i=l0(),Gc=Vf=Ia=null,Ss=!1,i):null;switch(i){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 f0&&n.locale!=="ko"?null:n.data;default:return null}}var wE={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 y0(i){var n=i&&i.nodeName&&i.nodeName.toLowerCase();return n==="input"?!!wE[i.type]:n==="textarea"}function x0(i,n,o,u){ks?vs?vs.push(u):vs=[u]:ks=u,n=Ih(n,"onChange"),0<n.length&&(o=new Zc("onChange","change",null,o,u),i.push({event:o,listeners:n}))}var eo=null,io=null;function _E(i){tC(i,0)}function Kc(i){var n=qa(i);if(Jy(n))return i}function b0(i,n){if(i==="change")return n}var C0=!1;if(ea){var ed;if(ea){var id="oninput"in document;if(!id){var k0=document.createElement("div");k0.setAttribute("oninput","return;"),id=typeof k0.oninput=="function"}ed=id}else ed=!1;C0=ed&&(!document.documentMode||9<document.documentMode)}function v0(){eo&&(eo.detachEvent("onpropertychange",S0),io=eo=null)}function S0(i){if(i.propertyName==="value"&&Kc(io)){var n=[];x0(n,io,i,Yf(i)),s0(_E,n)}}function BE(i,n,o){i==="focusin"?(v0(),eo=n,io=o,eo.attachEvent("onpropertychange",S0)):i==="focusout"&&v0()}function EE(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Kc(io)}function LE(i,n){if(i==="click")return Kc(n)}function AE(i,n){if(i==="input"||i==="change")return Kc(n)}function ME(i,n){return i===n&&(i!==0||1/i===1/n)||i!==i&&n!==n}var Hi=typeof Object.is=="function"?Object.is:ME;function ro(i,n){if(Hi(i,n))return!0;if(typeof i!="object"||i===null||typeof n!="object"||n===null)return!1;var o=Object.keys(i),u=Object.keys(n);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var y=o[u];if(!Zr.call(n,y)||!Hi(i[y],n[y]))return!1}return!0}function T0(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function w0(i,n){var o=T0(i);i=0;for(var u;o;){if(o.nodeType===3){if(u=i+o.textContent.length,i<=n&&u>=n)return{node:o,offset:n-i};i=u}t:{for(;o;){if(o.nextSibling){o=o.nextSibling;break t}o=o.parentNode}o=void 0}o=T0(o)}}function _0(i,n){return i&&n?i===n?!0:i&&i.nodeType===3?!1:n&&n.nodeType===3?_0(i,n.parentNode):"contains"in i?i.contains(n):i.compareDocumentPosition?!!(i.compareDocumentPosition(n)&16):!1:!1}function B0(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var n=Wc(i.document);n instanceof i.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)i=n.contentWindow;else break;n=Wc(i.document)}return n}function rd(i){var n=i&&i.nodeName&&i.nodeName.toLowerCase();return n&&(n==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||n==="textarea"||i.contentEditable==="true")}var RE=ea&&"documentMode"in document&&11>=document.documentMode,Ts=null,ad=null,ao=null,nd=!1;function E0(i,n,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;nd||Ts==null||Ts!==Wc(u)||(u=Ts,"selectionStart"in u&&rd(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}),ao&&ro(ao,u)||(ao=u,u=Ih(ad,"onSelect"),0<u.length&&(n=new Zc("onSelect","select",null,n,o),i.push({event:n,listeners:u}),n.target=Ts)))}function _n(i,n){var o={};return o[i.toLowerCase()]=n.toLowerCase(),o["Webkit"+i]="webkit"+n,o["Moz"+i]="moz"+n,o}var ws={animationend:_n("Animation","AnimationEnd"),animationiteration:_n("Animation","AnimationIteration"),animationstart:_n("Animation","AnimationStart"),transitionrun:_n("Transition","TransitionRun"),transitionstart:_n("Transition","TransitionStart"),transitioncancel:_n("Transition","TransitionCancel"),transitionend:_n("Transition","TransitionEnd")},sd={},L0={};ea&&(L0=document.createElement("div").style,"AnimationEvent"in window||(delete ws.animationend.animation,delete ws.animationiteration.animation,delete ws.animationstart.animation),"TransitionEvent"in window||delete ws.transitionend.transition);function Bn(i){if(sd[i])return sd[i];if(!ws[i])return i;var n=ws[i],o;for(o in n)if(n.hasOwnProperty(o)&&o in L0)return sd[i]=n[o];return i}var A0=Bn("animationend"),M0=Bn("animationiteration"),R0=Bn("animationstart"),FE=Bn("transitionrun"),OE=Bn("transitionstart"),DE=Bn("transitioncancel"),F0=Bn("transitionend"),O0=new Map,ld="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(" ");ld.push("scrollEnd");function gr(i,n){O0.set(i,n),ut(n,[i])}var Jc=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},er=[],_s=0,od=0;function th(){for(var i=_s,n=od=_s=0;n<i;){var o=er[n];er[n++]=null;var u=er[n];er[n++]=null;var y=er[n];er[n++]=null;var b=er[n];if(er[n++]=null,u!==null&&y!==null){var w=u.pending;w===null?y.next=y:(y.next=w.next,w.next=y),u.pending=y}b!==0&&D0(o,y,b)}}function eh(i,n,o,u){er[_s++]=i,er[_s++]=n,er[_s++]=o,er[_s++]=u,od|=u,i.lanes|=u,i=i.alternate,i!==null&&(i.lanes|=u)}function cd(i,n,o,u){return eh(i,n,o,u),ih(i)}function En(i,n){return eh(i,null,null,n),ih(i)}function D0(i,n,o){i.lanes|=o;var u=i.alternate;u!==null&&(u.lanes|=o);for(var y=!1,b=i.return;b!==null;)b.childLanes|=o,u=b.alternate,u!==null&&(u.childLanes|=o),b.tag===22&&(i=b.stateNode,i===null||i._visibility&1||(y=!0)),i=b,b=b.return;return i.tag===3?(b=i.stateNode,y&&n!==null&&(y=31-Ve(o),i=b.hiddenUpdates,u=i[y],u===null?i[y]=[n]:u.push(n),n.lane=o|536870912),b):null}function ih(i){if(50<Bo)throw Bo=0,xp=null,Error(a(185));for(var n=i.return;n!==null;)i=n,n=i.return;return i.tag===3?i.stateNode:null}var Bs={};function $E(i,n,o,u){this.tag=i,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 Ui(i,n,o,u){return new $E(i,n,o,u)}function hd(i){return i=i.prototype,!(!i||!i.isReactComponent)}function ia(i,n){var o=i.alternate;return o===null?(o=Ui(i.tag,n,i.key,i.mode),o.elementType=i.elementType,o.type=i.type,o.stateNode=i.stateNode,o.alternate=i,i.alternate=o):(o.pendingProps=n,o.type=i.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=i.flags&65011712,o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,n=i.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=i.sibling,o.index=i.index,o.ref=i.ref,o.refCleanup=i.refCleanup,o}function $0(i,n){i.flags&=65011714;var o=i.alternate;return o===null?(i.childLanes=0,i.lanes=n,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,n=o.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),i}function rh(i,n,o,u,y,b){var w=0;if(u=i,typeof i=="function")hd(i)&&(w=1);else if(typeof i=="string")w=HL(i,o,ht.current)?26:i==="html"||i==="head"||i==="body"?27:5;else t:switch(i){case at:return i=Ui(31,o,n,y),i.elementType=at,i.lanes=b,i;case k:return Ln(o.children,y,b,n);case v:w=8,y|=24;break;case T:return i=Ui(12,o,n,y|2),i.elementType=T,i.lanes=b,i;case F:return i=Ui(13,o,n,y),i.elementType=F,i.lanes=b,i;case N:return i=Ui(19,o,n,y),i.elementType=N,i.lanes=b,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case E:w=10;break t;case _:w=9;break t;case R:w=11;break t;case H:w=14;break t;case I:w=16,u=null;break t}w=29,o=Error(a(130,i===null?"null":typeof i,"")),u=null}return n=Ui(w,o,n,y),n.elementType=i,n.type=u,n.lanes=b,n}function Ln(i,n,o,u){return i=Ui(7,i,u,n),i.lanes=o,i}function ud(i,n,o){return i=Ui(6,i,null,n),i.lanes=o,i}function z0(i){var n=Ui(18,null,null,0);return n.stateNode=i,n}function fd(i,n,o){return n=Ui(4,i.children!==null?i.children:[],i.key,n),n.lanes=o,n.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},n}var N0=new WeakMap;function ir(i,n){if(typeof i=="object"&&i!==null){var o=N0.get(i);return o!==void 0?o:(n={value:i,source:n,stack:Te(n)},N0.set(i,n),n)}return{value:i,source:n,stack:Te(n)}}var Es=[],Ls=0,ah=null,no=0,rr=[],ar=0,Ha=null,Dr=1,$r="";function ra(i,n){Es[Ls++]=no,Es[Ls++]=ah,ah=i,no=n}function q0(i,n,o){rr[ar++]=Dr,rr[ar++]=$r,rr[ar++]=Ha,Ha=i;var u=Dr;i=$r;var y=32-Ve(u)-1;u&=~(1<<y),o+=1;var b=32-Ve(n)+y;if(30<b){var w=y-y%5;b=(u&(1<<w)-1).toString(32),u>>=w,y-=w,Dr=1<<32-Ve(n)+y|o<<y|u,$r=b+i}else Dr=1<<b|o<<y|u,$r=i}function dd(i){i.return!==null&&(ra(i,1),q0(i,1,0))}function pd(i){for(;i===ah;)ah=Es[--Ls],Es[Ls]=null,no=Es[--Ls],Es[Ls]=null;for(;i===Ha;)Ha=rr[--ar],rr[ar]=null,$r=rr[--ar],rr[ar]=null,Dr=rr[--ar],rr[ar]=null}function I0(i,n){rr[ar++]=Dr,rr[ar++]=$r,rr[ar++]=Ha,Dr=n.id,$r=n.overflow,Ha=i}var ti=null,ve=null,Zt=!1,Ua=null,nr=!1,gd=Error(a(519));function ja(i){var n=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw so(ir(n,i)),gd}function H0(i){var n=i.stateNode,o=i.type,u=i.memoizedProps;switch(n[Ne]=i,n[Je]=u,o){case"dialog":Gt("cancel",n),Gt("close",n);break;case"iframe":case"object":case"embed":Gt("load",n);break;case"video":case"audio":for(o=0;o<Lo.length;o++)Gt(Lo[o],n);break;case"source":Gt("error",n);break;case"img":case"image":case"link":Gt("error",n),Gt("load",n);break;case"details":Gt("toggle",n);break;case"input":Gt("invalid",n),t0(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Gt("invalid",n);break;case"textarea":Gt("invalid",n),i0(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||aC(n.textContent,o)?(u.popover!=null&&(Gt("beforetoggle",n),Gt("toggle",n)),u.onScroll!=null&&Gt("scroll",n),u.onScrollEnd!=null&&Gt("scrollend",n),u.onClick!=null&&(n.onclick=ta),n=!0):n=!1,n||ja(i,!0)}function U0(i){for(ti=i.return;ti;)switch(ti.tag){case 5:case 31:case 13:nr=!1;return;case 27:case 3:nr=!0;return;default:ti=ti.return}}function As(i){if(i!==ti)return!1;if(!Zt)return U0(i),Zt=!0,!1;var n=i.tag,o;if((o=n!==3&&n!==27)&&((o=n===5)&&(o=i.type,o=!(o!=="form"&&o!=="button")||Fp(i.type,i.memoizedProps)),o=!o),o&&ve&&ja(i),U0(i),n===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));ve=dC(i)}else if(n===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));ve=dC(i)}else n===27?(n=ve,an(i.type)?(i=Np,Np=null,ve=i):ve=n):ve=ti?lr(i.stateNode.nextSibling):null;return!0}function An(){ve=ti=null,Zt=!1}function md(){var i=Ua;return i!==null&&(Ri===null?Ri=i:Ri.push.apply(Ri,i),Ua=null),i}function so(i){Ua===null?Ua=[i]:Ua.push(i)}var yd=$(null),Mn=null,aa=null;function Pa(i,n,o){ct(yd,n._currentValue),n._currentValue=o}function na(i){i._currentValue=yd.current,tt(yd)}function xd(i,n,o){for(;i!==null;){var u=i.alternate;if((i.childLanes&n)!==n?(i.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),i===o)break;i=i.return}}function bd(i,n,o,u){var y=i.child;for(y!==null&&(y.return=i);y!==null;){var b=y.dependencies;if(b!==null){var w=y.child;b=b.firstContext;t:for(;b!==null;){var L=b;b=y;for(var W=0;W<n.length;W++)if(L.context===n[W]){b.lanes|=o,L=b.alternate,L!==null&&(L.lanes|=o),xd(b.return,o,i),u||(w=null);break t}b=L.next}}else if(y.tag===18){if(w=y.return,w===null)throw Error(a(341));w.lanes|=o,b=w.alternate,b!==null&&(b.lanes|=o),xd(w,o,i),w=null}else w=y.child;if(w!==null)w.return=y;else for(w=y;w!==null;){if(w===i){w=null;break}if(y=w.sibling,y!==null){y.return=w.return,w=y;break}w=w.return}y=w}}function Ms(i,n,o,u){i=null;for(var y=n,b=!1;y!==null;){if(!b){if((y.flags&524288)!==0)b=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var w=y.alternate;if(w===null)throw Error(a(387));if(w=w.memoizedProps,w!==null){var L=y.type;Hi(y.pendingProps.value,w.value)||(i!==null?i.push(L):i=[L])}}else if(y===Ft.current){if(w=y.alternate,w===null)throw Error(a(387));w.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(i!==null?i.push(Oo):i=[Oo])}y=y.return}i!==null&&bd(n,i,o,u),n.flags|=262144}function nh(i){for(i=i.firstContext;i!==null;){if(!Hi(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Rn(i){Mn=i,aa=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function ei(i){return j0(Mn,i)}function sh(i,n){return Mn===null&&Rn(i),j0(i,n)}function j0(i,n){var o=n._currentValue;if(n={context:n,memoizedValue:o,next:null},aa===null){if(i===null)throw Error(a(308));aa=n,i.dependencies={lanes:0,firstContext:n},i.flags|=524288}else aa=aa.next=n;return o}var zE=typeof AbortController<"u"?AbortController:function(){var i=[],n=this.signal={aborted:!1,addEventListener:function(o,u){i.push(u)}};this.abort=function(){n.aborted=!0,i.forEach(function(o){return o()})}},NE=e.unstable_scheduleCallback,qE=e.unstable_NormalPriority,qe={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cd(){return{controller:new zE,data:new Map,refCount:0}}function lo(i){i.refCount--,i.refCount===0&&NE(qE,function(){i.controller.abort()})}var oo=null,kd=0,Rs=0,Fs=null;function IE(i,n){if(oo===null){var o=oo=[];kd=0,Rs=Tp(),Fs={status:"pending",value:void 0,then:function(u){o.push(u)}}}return kd++,n.then(P0,P0),n}function P0(){if(--kd===0&&oo!==null){Fs!==null&&(Fs.status="fulfilled");var i=oo;oo=null,Rs=0,Fs=null;for(var n=0;n<i.length;n++)(0,i[n])()}}function HE(i,n){var o=[],u={status:"pending",value:null,reason:null,then:function(y){o.push(y)}};return i.then(function(){u.status="fulfilled",u.value=n;for(var y=0;y<o.length;y++)(0,o[y])(n)},function(y){for(u.status="rejected",u.reason=y,y=0;y<o.length;y++)(0,o[y])(void 0)}),u}var W0=A.S;A.S=function(i,n){Eb=li(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&IE(i,n),W0!==null&&W0(i,n)};var Fn=$(null);function vd(){var i=Fn.current;return i!==null?i:ye.pooledCache}function lh(i,n){n===null?ct(Fn,Fn.current):ct(Fn,n.pool)}function Y0(){var i=vd();return i===null?null:{parent:qe._currentValue,pool:i}}var Os=Error(a(460)),Sd=Error(a(474)),oh=Error(a(542)),ch={then:function(){}};function G0(i){return i=i.status,i==="fulfilled"||i==="rejected"}function X0(i,n,o){switch(o=i[o],o===void 0?i.push(n):o!==n&&(n.then(ta,ta),n=o),n.status){case"fulfilled":return n.value;case"rejected":throw i=n.reason,Z0(i),i;default:if(typeof n.status=="string")n.then(ta,ta);else{if(i=ye,i!==null&&100<i.shellSuspendCounter)throw Error(a(482));i=n,i.status="pending",i.then(function(u){if(n.status==="pending"){var y=n;y.status="fulfilled",y.value=u}},function(u){if(n.status==="pending"){var y=n;y.status="rejected",y.reason=u}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw i=n.reason,Z0(i),i}throw Dn=n,Os}}function On(i){try{var n=i._init;return n(i._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Dn=o,Os):o}}var Dn=null;function V0(){if(Dn===null)throw Error(a(459));var i=Dn;return Dn=null,i}function Z0(i){if(i===Os||i===oh)throw Error(a(483))}var Ds=null,co=0;function hh(i){var n=co;return co+=1,Ds===null&&(Ds=[]),X0(Ds,i,n)}function ho(i,n){n=n.props.ref,i.ref=n!==void 0?n:null}function uh(i,n){throw n.$$typeof===x?Error(a(525)):(i=Object.prototype.toString.call(n),Error(a(31,i==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":i)))}function Q0(i){function n(K,G){if(i){var et=K.deletions;et===null?(K.deletions=[G],K.flags|=16):et.push(G)}}function o(K,G){if(!i)return null;for(;G!==null;)n(K,G),G=G.sibling;return null}function u(K){for(var G=new Map;K!==null;)K.key!==null?G.set(K.key,K):G.set(K.index,K),K=K.sibling;return G}function y(K,G){return K=ia(K,G),K.index=0,K.sibling=null,K}function b(K,G,et){return K.index=et,i?(et=K.alternate,et!==null?(et=et.index,et<G?(K.flags|=67108866,G):et):(K.flags|=67108866,G)):(K.flags|=1048576,G)}function w(K){return i&&K.alternate===null&&(K.flags|=67108866),K}function L(K,G,et,ft){return G===null||G.tag!==6?(G=ud(et,K.mode,ft),G.return=K,G):(G=y(G,et),G.return=K,G)}function W(K,G,et,ft){var Mt=et.type;return Mt===k?ot(K,G,et.props.children,ft,et.key):G!==null&&(G.elementType===Mt||typeof Mt=="object"&&Mt!==null&&Mt.$$typeof===I&&On(Mt)===G.type)?(G=y(G,et.props),ho(G,et),G.return=K,G):(G=rh(et.type,et.key,et.props,null,K.mode,ft),ho(G,et),G.return=K,G)}function it(K,G,et,ft){return G===null||G.tag!==4||G.stateNode.containerInfo!==et.containerInfo||G.stateNode.implementation!==et.implementation?(G=fd(et,K.mode,ft),G.return=K,G):(G=y(G,et.children||[]),G.return=K,G)}function ot(K,G,et,ft,Mt){return G===null||G.tag!==7?(G=Ln(et,K.mode,ft,Mt),G.return=K,G):(G=y(G,et),G.return=K,G)}function dt(K,G,et){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return G=ud(""+G,K.mode,et),G.return=K,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case m:return et=rh(G.type,G.key,G.props,null,K.mode,et),ho(et,G),et.return=K,et;case C:return G=fd(G,K.mode,et),G.return=K,G;case I:return G=On(G),dt(K,G,et)}if(j(G)||V(G))return G=Ln(G,K.mode,et,null),G.return=K,G;if(typeof G.then=="function")return dt(K,hh(G),et);if(G.$$typeof===E)return dt(K,sh(K,G),et);uh(K,G)}return null}function rt(K,G,et,ft){var Mt=G!==null?G.key:null;if(typeof et=="string"&&et!==""||typeof et=="number"||typeof et=="bigint")return Mt!==null?null:L(K,G,""+et,ft);if(typeof et=="object"&&et!==null){switch(et.$$typeof){case m:return et.key===Mt?W(K,G,et,ft):null;case C:return et.key===Mt?it(K,G,et,ft):null;case I:return et=On(et),rt(K,G,et,ft)}if(j(et)||V(et))return Mt!==null?null:ot(K,G,et,ft,null);if(typeof et.then=="function")return rt(K,G,hh(et),ft);if(et.$$typeof===E)return rt(K,G,sh(K,et),ft);uh(K,et)}return null}function lt(K,G,et,ft,Mt){if(typeof ft=="string"&&ft!==""||typeof ft=="number"||typeof ft=="bigint")return K=K.get(et)||null,L(G,K,""+ft,Mt);if(typeof ft=="object"&&ft!==null){switch(ft.$$typeof){case m:return K=K.get(ft.key===null?et:ft.key)||null,W(G,K,ft,Mt);case C:return K=K.get(ft.key===null?et:ft.key)||null,it(G,K,ft,Mt);case I:return ft=On(ft),lt(K,G,et,ft,Mt)}if(j(ft)||V(ft))return K=K.get(et)||null,ot(G,K,ft,Mt,null);if(typeof ft.then=="function")return lt(K,G,et,hh(ft),Mt);if(ft.$$typeof===E)return lt(K,G,et,sh(G,ft),Mt);uh(G,ft)}return null}function vt(K,G,et,ft){for(var Mt=null,ee=null,Bt=G,jt=G=0,Vt=null;Bt!==null&&jt<et.length;jt++){Bt.index>jt?(Vt=Bt,Bt=null):Vt=Bt.sibling;var ie=rt(K,Bt,et[jt],ft);if(ie===null){Bt===null&&(Bt=Vt);break}i&&Bt&&ie.alternate===null&&n(K,Bt),G=b(ie,G,jt),ee===null?Mt=ie:ee.sibling=ie,ee=ie,Bt=Vt}if(jt===et.length)return o(K,Bt),Zt&&ra(K,jt),Mt;if(Bt===null){for(;jt<et.length;jt++)Bt=dt(K,et[jt],ft),Bt!==null&&(G=b(Bt,G,jt),ee===null?Mt=Bt:ee.sibling=Bt,ee=Bt);return Zt&&ra(K,jt),Mt}for(Bt=u(Bt);jt<et.length;jt++)Vt=lt(Bt,K,jt,et[jt],ft),Vt!==null&&(i&&Vt.alternate!==null&&Bt.delete(Vt.key===null?jt:Vt.key),G=b(Vt,G,jt),ee===null?Mt=Vt:ee.sibling=Vt,ee=Vt);return i&&Bt.forEach(function(cn){return n(K,cn)}),Zt&&ra(K,jt),Mt}function Ot(K,G,et,ft){if(et==null)throw Error(a(151));for(var Mt=null,ee=null,Bt=G,jt=G=0,Vt=null,ie=et.next();Bt!==null&&!ie.done;jt++,ie=et.next()){Bt.index>jt?(Vt=Bt,Bt=null):Vt=Bt.sibling;var cn=rt(K,Bt,ie.value,ft);if(cn===null){Bt===null&&(Bt=Vt);break}i&&Bt&&cn.alternate===null&&n(K,Bt),G=b(cn,G,jt),ee===null?Mt=cn:ee.sibling=cn,ee=cn,Bt=Vt}if(ie.done)return o(K,Bt),Zt&&ra(K,jt),Mt;if(Bt===null){for(;!ie.done;jt++,ie=et.next())ie=dt(K,ie.value,ft),ie!==null&&(G=b(ie,G,jt),ee===null?Mt=ie:ee.sibling=ie,ee=ie);return Zt&&ra(K,jt),Mt}for(Bt=u(Bt);!ie.done;jt++,ie=et.next())ie=lt(Bt,K,jt,ie.value,ft),ie!==null&&(i&&ie.alternate!==null&&Bt.delete(ie.key===null?jt:ie.key),G=b(ie,G,jt),ee===null?Mt=ie:ee.sibling=ie,ee=ie);return i&&Bt.forEach(function(KL){return n(K,KL)}),Zt&&ra(K,jt),Mt}function me(K,G,et,ft){if(typeof et=="object"&&et!==null&&et.type===k&&et.key===null&&(et=et.props.children),typeof et=="object"&&et!==null){switch(et.$$typeof){case m:t:{for(var Mt=et.key;G!==null;){if(G.key===Mt){if(Mt=et.type,Mt===k){if(G.tag===7){o(K,G.sibling),ft=y(G,et.props.children),ft.return=K,K=ft;break t}}else if(G.elementType===Mt||typeof Mt=="object"&&Mt!==null&&Mt.$$typeof===I&&On(Mt)===G.type){o(K,G.sibling),ft=y(G,et.props),ho(ft,et),ft.return=K,K=ft;break t}o(K,G);break}else n(K,G);G=G.sibling}et.type===k?(ft=Ln(et.props.children,K.mode,ft,et.key),ft.return=K,K=ft):(ft=rh(et.type,et.key,et.props,null,K.mode,ft),ho(ft,et),ft.return=K,K=ft)}return w(K);case C:t:{for(Mt=et.key;G!==null;){if(G.key===Mt)if(G.tag===4&&G.stateNode.containerInfo===et.containerInfo&&G.stateNode.implementation===et.implementation){o(K,G.sibling),ft=y(G,et.children||[]),ft.return=K,K=ft;break t}else{o(K,G);break}else n(K,G);G=G.sibling}ft=fd(et,K.mode,ft),ft.return=K,K=ft}return w(K);case I:return et=On(et),me(K,G,et,ft)}if(j(et))return vt(K,G,et,ft);if(V(et)){if(Mt=V(et),typeof Mt!="function")throw Error(a(150));return et=Mt.call(et),Ot(K,G,et,ft)}if(typeof et.then=="function")return me(K,G,hh(et),ft);if(et.$$typeof===E)return me(K,G,sh(K,et),ft);uh(K,et)}return typeof et=="string"&&et!==""||typeof et=="number"||typeof et=="bigint"?(et=""+et,G!==null&&G.tag===6?(o(K,G.sibling),ft=y(G,et),ft.return=K,K=ft):(o(K,G),ft=ud(et,K.mode,ft),ft.return=K,K=ft),w(K)):o(K,G)}return function(K,G,et,ft){try{co=0;var Mt=me(K,G,et,ft);return Ds=null,Mt}catch(Bt){if(Bt===Os||Bt===oh)throw Bt;var ee=Ui(29,Bt,null,K.mode);return ee.lanes=ft,ee.return=K,ee}finally{}}}var $n=Q0(!0),K0=Q0(!1),Wa=!1;function Td(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wd(i,n){i=i.updateQueue,n.updateQueue===i&&(n.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Ya(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ga(i,n,o){var u=i.updateQueue;if(u===null)return null;if(u=u.shared,(oe&2)!==0){var y=u.pending;return y===null?n.next=n:(n.next=y.next,y.next=n),u.pending=n,n=ih(i),D0(i,null,o),n}return eh(i,u,n,o),ih(i)}function uo(i,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194048)!==0)){var u=n.lanes;u&=i.pendingLanes,o|=u,n.lanes=o,Gl(i,o)}}function _d(i,n){var o=i.updateQueue,u=i.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var y=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?y=b=w:b=b.next=w,o=o.next}while(o!==null);b===null?y=b=n:b=b.next=n}else y=b=n;o={baseState:u.baseState,firstBaseUpdate:y,lastBaseUpdate:b,shared:u.shared,callbacks:u.callbacks},i.updateQueue=o;return}i=o.lastBaseUpdate,i===null?o.firstBaseUpdate=n:i.next=n,o.lastBaseUpdate=n}var Bd=!1;function fo(){if(Bd){var i=Fs;if(i!==null)throw i}}function po(i,n,o,u){Bd=!1;var y=i.updateQueue;Wa=!1;var b=y.firstBaseUpdate,w=y.lastBaseUpdate,L=y.shared.pending;if(L!==null){y.shared.pending=null;var W=L,it=W.next;W.next=null,w===null?b=it:w.next=it,w=W;var ot=i.alternate;ot!==null&&(ot=ot.updateQueue,L=ot.lastBaseUpdate,L!==w&&(L===null?ot.firstBaseUpdate=it:L.next=it,ot.lastBaseUpdate=W))}if(b!==null){var dt=y.baseState;w=0,ot=it=W=null,L=b;do{var rt=L.lane&-536870913,lt=rt!==L.lane;if(lt?(Xt&rt)===rt:(u&rt)===rt){rt!==0&&rt===Rs&&(Bd=!0),ot!==null&&(ot=ot.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});t:{var vt=i,Ot=L;rt=n;var me=o;switch(Ot.tag){case 1:if(vt=Ot.payload,typeof vt=="function"){dt=vt.call(me,dt,rt);break t}dt=vt;break t;case 3:vt.flags=vt.flags&-65537|128;case 0:if(vt=Ot.payload,rt=typeof vt=="function"?vt.call(me,dt,rt):vt,rt==null)break t;dt=g({},dt,rt);break t;case 2:Wa=!0}}rt=L.callback,rt!==null&&(i.flags|=64,lt&&(i.flags|=8192),lt=y.callbacks,lt===null?y.callbacks=[rt]:lt.push(rt))}else lt={lane:rt,tag:L.tag,payload:L.payload,callback:L.callback,next:null},ot===null?(it=ot=lt,W=dt):ot=ot.next=lt,w|=rt;if(L=L.next,L===null){if(L=y.shared.pending,L===null)break;lt=L,L=lt.next,lt.next=null,y.lastBaseUpdate=lt,y.shared.pending=null}}while(!0);ot===null&&(W=dt),y.baseState=W,y.firstBaseUpdate=it,y.lastBaseUpdate=ot,b===null&&(y.shared.lanes=0),Ka|=w,i.lanes=w,i.memoizedState=dt}}function J0(i,n){if(typeof i!="function")throw Error(a(191,i));i.call(n)}function tx(i,n){var o=i.callbacks;if(o!==null)for(i.callbacks=null,i=0;i<o.length;i++)J0(o[i],n)}var $s=$(null),fh=$(0);function ex(i,n){i=pa,ct(fh,i),ct($s,n),pa=i|n.baseLanes}function Ed(){ct(fh,pa),ct($s,$s.current)}function Ld(){pa=fh.current,tt($s),tt(fh)}var ji=$(null),sr=null;function Xa(i){var n=i.alternate;ct(De,De.current&1),ct(ji,i),sr===null&&(n===null||$s.current!==null||n.memoizedState!==null)&&(sr=i)}function Ad(i){ct(De,De.current),ct(ji,i),sr===null&&(sr=i)}function ix(i){i.tag===22?(ct(De,De.current),ct(ji,i),sr===null&&(sr=i)):Va()}function Va(){ct(De,De.current),ct(ji,ji.current)}function Pi(i){tt(ji),sr===i&&(sr=null),tt(De)}var De=$(0);function dh(i){for(var n=i;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||$p(o)||zp(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===i)break;for(;n.sibling===null;){if(n.return===null||n.return===i)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var sa=0,Ut=null,pe=null,Ie=null,ph=!1,zs=!1,zn=!1,gh=0,go=0,Ns=null,UE=0;function Ae(){throw Error(a(321))}function Md(i,n){if(n===null)return!1;for(var o=0;o<n.length&&o<i.length;o++)if(!Hi(i[o],n[o]))return!1;return!0}function Rd(i,n,o,u,y,b){return sa=b,Ut=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,A.H=i===null||i.memoizedState===null?qx:Gd,zn=!1,b=o(u,y),zn=!1,zs&&(b=ax(n,o,u,y)),rx(i),b}function rx(i){A.H=xo;var n=pe!==null&&pe.next!==null;if(sa=0,Ie=pe=Ut=null,ph=!1,go=0,Ns=null,n)throw Error(a(300));i===null||He||(i=i.dependencies,i!==null&&nh(i)&&(He=!0))}function ax(i,n,o,u){Ut=i;var y=0;do{if(zs&&(Ns=null),go=0,zs=!1,25<=y)throw Error(a(301));if(y+=1,Ie=pe=null,i.updateQueue!=null){var b=i.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}A.H=Ix,b=n(o,u)}while(zs);return b}function jE(){var i=A.H,n=i.useState()[0];return n=typeof n.then=="function"?mo(n):n,i=i.useState()[0],(pe!==null?pe.memoizedState:null)!==i&&(Ut.flags|=1024),n}function Fd(){var i=gh!==0;return gh=0,i}function Od(i,n,o){n.updateQueue=i.updateQueue,n.flags&=-2053,i.lanes&=~o}function Dd(i){if(ph){for(i=i.memoizedState;i!==null;){var n=i.queue;n!==null&&(n.pending=null),i=i.next}ph=!1}sa=0,Ie=pe=Ut=null,zs=!1,go=gh=0,Ns=null}function bi(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?Ut.memoizedState=Ie=i:Ie=Ie.next=i,Ie}function $e(){if(pe===null){var i=Ut.alternate;i=i!==null?i.memoizedState:null}else i=pe.next;var n=Ie===null?Ut.memoizedState:Ie.next;if(n!==null)Ie=n,pe=i;else{if(i===null)throw Ut.alternate===null?Error(a(467)):Error(a(310));pe=i,i={memoizedState:pe.memoizedState,baseState:pe.baseState,baseQueue:pe.baseQueue,queue:pe.queue,next:null},Ie===null?Ut.memoizedState=Ie=i:Ie=Ie.next=i}return Ie}function mh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function mo(i){var n=go;return go+=1,Ns===null&&(Ns=[]),i=X0(Ns,i,n),n=Ut,(Ie===null?n.memoizedState:Ie.next)===null&&(n=n.alternate,A.H=n===null||n.memoizedState===null?qx:Gd),i}function yh(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return mo(i);if(i.$$typeof===E)return ei(i)}throw Error(a(438,String(i)))}function $d(i){var n=null,o=Ut.updateQueue;if(o!==null&&(n=o.memoCache),n==null){var u=Ut.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(y){return y.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),o===null&&(o=mh(),Ut.updateQueue=o),o.memoCache=n,o=n.data[n.index],o===void 0)for(o=n.data[n.index]=Array(i),u=0;u<i;u++)o[u]=X;return n.index++,o}function la(i,n){return typeof n=="function"?n(i):n}function xh(i){var n=$e();return zd(n,pe,i)}function zd(i,n,o){var u=i.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=o;var y=i.baseQueue,b=u.pending;if(b!==null){if(y!==null){var w=y.next;y.next=b.next,b.next=w}n.baseQueue=y=b,u.pending=null}if(b=i.baseState,y===null)i.memoizedState=b;else{n=y.next;var L=w=null,W=null,it=n,ot=!1;do{var dt=it.lane&-536870913;if(dt!==it.lane?(Xt&dt)===dt:(sa&dt)===dt){var rt=it.revertLane;if(rt===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:it.action,hasEagerState:it.hasEagerState,eagerState:it.eagerState,next:null}),dt===Rs&&(ot=!0);else if((sa&rt)===rt){it=it.next,rt===Rs&&(ot=!0);continue}else dt={lane:0,revertLane:it.revertLane,gesture:null,action:it.action,hasEagerState:it.hasEagerState,eagerState:it.eagerState,next:null},W===null?(L=W=dt,w=b):W=W.next=dt,Ut.lanes|=rt,Ka|=rt;dt=it.action,zn&&o(b,dt),b=it.hasEagerState?it.eagerState:o(b,dt)}else rt={lane:dt,revertLane:it.revertLane,gesture:it.gesture,action:it.action,hasEagerState:it.hasEagerState,eagerState:it.eagerState,next:null},W===null?(L=W=rt,w=b):W=W.next=rt,Ut.lanes|=dt,Ka|=dt;it=it.next}while(it!==null&&it!==n);if(W===null?w=b:W.next=L,!Hi(b,i.memoizedState)&&(He=!0,ot&&(o=Fs,o!==null)))throw o;i.memoizedState=b,i.baseState=w,i.baseQueue=W,u.lastRenderedState=b}return y===null&&(u.lanes=0),[i.memoizedState,u.dispatch]}function Nd(i){var n=$e(),o=n.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=i;var u=o.dispatch,y=o.pending,b=n.memoizedState;if(y!==null){o.pending=null;var w=y=y.next;do b=i(b,w.action),w=w.next;while(w!==y);Hi(b,n.memoizedState)||(He=!0),n.memoizedState=b,n.baseQueue===null&&(n.baseState=b),o.lastRenderedState=b}return[b,u]}function nx(i,n,o){var u=Ut,y=$e(),b=Zt;if(b){if(o===void 0)throw Error(a(407));o=o()}else o=n();var w=!Hi((pe||y).memoizedState,o);if(w&&(y.memoizedState=o,He=!0),y=y.queue,Hd(ox.bind(null,u,y,i),[i]),y.getSnapshot!==n||w||Ie!==null&&Ie.memoizedState.tag&1){if(u.flags|=2048,qs(9,{destroy:void 0},lx.bind(null,u,y,o,n),null),ye===null)throw Error(a(349));b||(sa&127)!==0||sx(u,n,o)}return o}function sx(i,n,o){i.flags|=16384,i={getSnapshot:n,value:o},n=Ut.updateQueue,n===null?(n=mh(),Ut.updateQueue=n,n.stores=[i]):(o=n.stores,o===null?n.stores=[i]:o.push(i))}function lx(i,n,o,u){n.value=o,n.getSnapshot=u,cx(n)&&hx(i)}function ox(i,n,o){return o(function(){cx(n)&&hx(i)})}function cx(i){var n=i.getSnapshot;i=i.value;try{var o=n();return!Hi(i,o)}catch{return!0}}function hx(i){var n=En(i,2);n!==null&&Fi(n,i,2)}function qd(i){var n=bi();if(typeof i=="function"){var o=i;if(i=o(),zn){dr(!0);try{o()}finally{dr(!1)}}}return n.memoizedState=n.baseState=i,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:i},n}function ux(i,n,o,u){return i.baseState=o,zd(i,pe,typeof u=="function"?u:la)}function PE(i,n,o,u,y){if(kh(i))throw Error(a(485));if(i=n.action,i!==null){var b={payload:y,action:i,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,fx(n,b)):(b.next=o.next,n.pending=o.next=b)}}function fx(i,n){var o=n.action,u=n.payload,y=i.state;if(n.isTransition){var b=A.T,w={};A.T=w;try{var L=o(y,u),W=A.S;W!==null&&W(w,L),dx(i,n,L)}catch(it){Id(i,n,it)}finally{b!==null&&w.types!==null&&(b.types=w.types),A.T=b}}else try{b=o(y,u),dx(i,n,b)}catch(it){Id(i,n,it)}}function dx(i,n,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(u){px(i,n,u)},function(u){return Id(i,n,u)}):px(i,n,o)}function px(i,n,o){n.status="fulfilled",n.value=o,gx(n),i.state=o,n=i.pending,n!==null&&(o=n.next,o===n?i.pending=null:(o=o.next,n.next=o,fx(i,o)))}function Id(i,n,o){var u=i.pending;if(i.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=o,gx(n),n=n.next;while(n!==u)}i.action=null}function gx(i){i=i.listeners;for(var n=0;n<i.length;n++)(0,i[n])()}function mx(i,n){return n}function yx(i,n){if(Zt){var o=ye.formState;if(o!==null){t:{var u=Ut;if(Zt){if(ve){e:{for(var y=ve,b=nr;y.nodeType!==8;){if(!b){y=null;break e}if(y=lr(y.nextSibling),y===null){y=null;break e}}b=y.data,y=b==="F!"||b==="F"?y:null}if(y){ve=lr(y.nextSibling),u=y.data==="F!";break t}}ja(u)}u=!1}u&&(n=o[0])}}return o=bi(),o.memoizedState=o.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mx,lastRenderedState:n},o.queue=u,o=$x.bind(null,Ut,u),u.dispatch=o,u=qd(!1),b=Yd.bind(null,Ut,!1,u.queue),u=bi(),y={state:n,dispatch:null,action:i,pending:null},u.queue=y,o=PE.bind(null,Ut,y,b,o),y.dispatch=o,u.memoizedState=i,[n,o,!1]}function xx(i){var n=$e();return bx(n,pe,i)}function bx(i,n,o){if(n=zd(i,n,mx)[0],i=xh(la)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=mo(n)}catch(w){throw w===Os?oh:w}else u=n;n=$e();var y=n.queue,b=y.dispatch;return o!==n.memoizedState&&(Ut.flags|=2048,qs(9,{destroy:void 0},WE.bind(null,y,o),null)),[u,b,i]}function WE(i,n){i.action=n}function Cx(i){var n=$e(),o=pe;if(o!==null)return bx(n,o,i);$e(),n=n.memoizedState,o=$e();var u=o.queue.dispatch;return o.memoizedState=i,[n,u,!1]}function qs(i,n,o,u){return i={tag:i,create:o,deps:u,inst:n,next:null},n=Ut.updateQueue,n===null&&(n=mh(),Ut.updateQueue=n),o=n.lastEffect,o===null?n.lastEffect=i.next=i:(u=o.next,o.next=i,i.next=u,n.lastEffect=i),i}function kx(){return $e().memoizedState}function bh(i,n,o,u){var y=bi();Ut.flags|=i,y.memoizedState=qs(1|n,{destroy:void 0},o,u===void 0?null:u)}function Ch(i,n,o,u){var y=$e();u=u===void 0?null:u;var b=y.memoizedState.inst;pe!==null&&u!==null&&Md(u,pe.memoizedState.deps)?y.memoizedState=qs(n,b,o,u):(Ut.flags|=i,y.memoizedState=qs(1|n,b,o,u))}function vx(i,n){bh(8390656,8,i,n)}function Hd(i,n){Ch(2048,8,i,n)}function YE(i){Ut.flags|=4;var n=Ut.updateQueue;if(n===null)n=mh(),Ut.updateQueue=n,n.events=[i];else{var o=n.events;o===null?n.events=[i]:o.push(i)}}function Sx(i){var n=$e().memoizedState;return YE({ref:n,nextImpl:i}),function(){if((oe&2)!==0)throw Error(a(440));return n.impl.apply(void 0,arguments)}}function Tx(i,n){return Ch(4,2,i,n)}function wx(i,n){return Ch(4,4,i,n)}function _x(i,n){if(typeof n=="function"){i=i();var o=n(i);return function(){typeof o=="function"?o():n(null)}}if(n!=null)return i=i(),n.current=i,function(){n.current=null}}function Bx(i,n,o){o=o!=null?o.concat([i]):null,Ch(4,4,_x.bind(null,n,i),o)}function Ud(){}function Ex(i,n){var o=$e();n=n===void 0?null:n;var u=o.memoizedState;return n!==null&&Md(n,u[1])?u[0]:(o.memoizedState=[i,n],i)}function Lx(i,n){var o=$e();n=n===void 0?null:n;var u=o.memoizedState;if(n!==null&&Md(n,u[1]))return u[0];if(u=i(),zn){dr(!0);try{i()}finally{dr(!1)}}return o.memoizedState=[u,n],u}function jd(i,n,o){return o===void 0||(sa&1073741824)!==0&&(Xt&261930)===0?i.memoizedState=n:(i.memoizedState=o,i=Ab(),Ut.lanes|=i,Ka|=i,o)}function Ax(i,n,o,u){return Hi(o,n)?o:$s.current!==null?(i=jd(i,o,u),Hi(i,n)||(He=!0),i):(sa&42)===0||(sa&1073741824)!==0&&(Xt&261930)===0?(He=!0,i.memoizedState=o):(i=Ab(),Ut.lanes|=i,Ka|=i,n)}function Mx(i,n,o,u,y){var b=z.p;z.p=b!==0&&8>b?b:8;var w=A.T,L={};A.T=L,Yd(i,!1,n,o);try{var W=y(),it=A.S;if(it!==null&&it(L,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var ot=HE(W,u);yo(i,n,ot,Gi(i))}else yo(i,n,u,Gi(i))}catch(dt){yo(i,n,{then:function(){},status:"rejected",reason:dt},Gi())}finally{z.p=b,w!==null&&L.types!==null&&(w.types=L.types),A.T=w}}function GE(){}function Pd(i,n,o,u){if(i.tag!==5)throw Error(a(476));var y=Rx(i).queue;Mx(i,y,n,O,o===null?GE:function(){return Fx(i),o(u)})}function Rx(i){var n=i.memoizedState;if(n!==null)return n;n={memoizedState:O,baseState:O,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:O},next:null};var o={};return n.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:o},next:null},i.memoizedState=n,i=i.alternate,i!==null&&(i.memoizedState=n),n}function Fx(i){var n=Rx(i);n.next===null&&(n=i.alternate.memoizedState),yo(i,n.next.queue,{},Gi())}function Wd(){return ei(Oo)}function Ox(){return $e().memoizedState}function Dx(){return $e().memoizedState}function XE(i){for(var n=i.return;n!==null;){switch(n.tag){case 24:case 3:var o=Gi();i=Ya(o);var u=Ga(n,i,o);u!==null&&(Fi(u,n,o),uo(u,n,o)),n={cache:Cd()},i.payload=n;return}n=n.return}}function VE(i,n,o){var u=Gi();o={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},kh(i)?zx(n,o):(o=cd(i,n,o,u),o!==null&&(Fi(o,i,u),Nx(o,n,u)))}function $x(i,n,o){var u=Gi();yo(i,n,o,u)}function yo(i,n,o,u){var y={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(kh(i))zx(n,y);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=n.lastRenderedReducer,b!==null))try{var w=n.lastRenderedState,L=b(w,o);if(y.hasEagerState=!0,y.eagerState=L,Hi(L,w))return eh(i,n,y,0),ye===null&&th(),!1}catch{}finally{}if(o=cd(i,n,y,u),o!==null)return Fi(o,i,u),Nx(o,n,u),!0}return!1}function Yd(i,n,o,u){if(u={lane:2,revertLane:Tp(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},kh(i)){if(n)throw Error(a(479))}else n=cd(i,o,u,2),n!==null&&Fi(n,i,2)}function kh(i){var n=i.alternate;return i===Ut||n!==null&&n===Ut}function zx(i,n){zs=ph=!0;var o=i.pending;o===null?n.next=n:(n.next=o.next,o.next=n),i.pending=n}function Nx(i,n,o){if((o&4194048)!==0){var u=n.lanes;u&=i.pendingLanes,o|=u,n.lanes=o,Gl(i,o)}}var xo={readContext:ei,use:yh,useCallback:Ae,useContext:Ae,useEffect:Ae,useImperativeHandle:Ae,useLayoutEffect:Ae,useInsertionEffect:Ae,useMemo:Ae,useReducer:Ae,useRef:Ae,useState:Ae,useDebugValue:Ae,useDeferredValue:Ae,useTransition:Ae,useSyncExternalStore:Ae,useId:Ae,useHostTransitionStatus:Ae,useFormState:Ae,useActionState:Ae,useOptimistic:Ae,useMemoCache:Ae,useCacheRefresh:Ae};xo.useEffectEvent=Ae;var qx={readContext:ei,use:yh,useCallback:function(i,n){return bi().memoizedState=[i,n===void 0?null:n],i},useContext:ei,useEffect:vx,useImperativeHandle:function(i,n,o){o=o!=null?o.concat([i]):null,bh(4194308,4,_x.bind(null,n,i),o)},useLayoutEffect:function(i,n){return bh(4194308,4,i,n)},useInsertionEffect:function(i,n){bh(4,2,i,n)},useMemo:function(i,n){var o=bi();n=n===void 0?null:n;var u=i();if(zn){dr(!0);try{i()}finally{dr(!1)}}return o.memoizedState=[u,n],u},useReducer:function(i,n,o){var u=bi();if(o!==void 0){var y=o(n);if(zn){dr(!0);try{o(n)}finally{dr(!1)}}}else y=n;return u.memoizedState=u.baseState=y,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:y},u.queue=i,i=i.dispatch=VE.bind(null,Ut,i),[u.memoizedState,i]},useRef:function(i){var n=bi();return i={current:i},n.memoizedState=i},useState:function(i){i=qd(i);var n=i.queue,o=$x.bind(null,Ut,n);return n.dispatch=o,[i.memoizedState,o]},useDebugValue:Ud,useDeferredValue:function(i,n){var o=bi();return jd(o,i,n)},useTransition:function(){var i=qd(!1);return i=Mx.bind(null,Ut,i.queue,!0,!1),bi().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,n,o){var u=Ut,y=bi();if(Zt){if(o===void 0)throw Error(a(407));o=o()}else{if(o=n(),ye===null)throw Error(a(349));(Xt&127)!==0||sx(u,n,o)}y.memoizedState=o;var b={value:o,getSnapshot:n};return y.queue=b,vx(ox.bind(null,u,b,i),[i]),u.flags|=2048,qs(9,{destroy:void 0},lx.bind(null,u,b,o,n),null),o},useId:function(){var i=bi(),n=ye.identifierPrefix;if(Zt){var o=$r,u=Dr;o=(u&~(1<<32-Ve(u)-1)).toString(32)+o,n="_"+n+"R_"+o,o=gh++,0<o&&(n+="H"+o.toString(32)),n+="_"}else o=UE++,n="_"+n+"r_"+o.toString(32)+"_";return i.memoizedState=n},useHostTransitionStatus:Wd,useFormState:yx,useActionState:yx,useOptimistic:function(i){var n=bi();n.memoizedState=n.baseState=i;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=o,n=Yd.bind(null,Ut,!0,o),o.dispatch=n,[i,n]},useMemoCache:$d,useCacheRefresh:function(){return bi().memoizedState=XE.bind(null,Ut)},useEffectEvent:function(i){var n=bi(),o={impl:i};return n.memoizedState=o,function(){if((oe&2)!==0)throw Error(a(440));return o.impl.apply(void 0,arguments)}}},Gd={readContext:ei,use:yh,useCallback:Ex,useContext:ei,useEffect:Hd,useImperativeHandle:Bx,useInsertionEffect:Tx,useLayoutEffect:wx,useMemo:Lx,useReducer:xh,useRef:kx,useState:function(){return xh(la)},useDebugValue:Ud,useDeferredValue:function(i,n){var o=$e();return Ax(o,pe.memoizedState,i,n)},useTransition:function(){var i=xh(la)[0],n=$e().memoizedState;return[typeof i=="boolean"?i:mo(i),n]},useSyncExternalStore:nx,useId:Ox,useHostTransitionStatus:Wd,useFormState:xx,useActionState:xx,useOptimistic:function(i,n){var o=$e();return ux(o,pe,i,n)},useMemoCache:$d,useCacheRefresh:Dx};Gd.useEffectEvent=Sx;var Ix={readContext:ei,use:yh,useCallback:Ex,useContext:ei,useEffect:Hd,useImperativeHandle:Bx,useInsertionEffect:Tx,useLayoutEffect:wx,useMemo:Lx,useReducer:Nd,useRef:kx,useState:function(){return Nd(la)},useDebugValue:Ud,useDeferredValue:function(i,n){var o=$e();return pe===null?jd(o,i,n):Ax(o,pe.memoizedState,i,n)},useTransition:function(){var i=Nd(la)[0],n=$e().memoizedState;return[typeof i=="boolean"?i:mo(i),n]},useSyncExternalStore:nx,useId:Ox,useHostTransitionStatus:Wd,useFormState:Cx,useActionState:Cx,useOptimistic:function(i,n){var o=$e();return pe!==null?ux(o,pe,i,n):(o.baseState=i,[i,o.queue.dispatch])},useMemoCache:$d,useCacheRefresh:Dx};Ix.useEffectEvent=Sx;function Xd(i,n,o,u){n=i.memoizedState,o=o(u,n),o=o==null?n:g({},n,o),i.memoizedState=o,i.lanes===0&&(i.updateQueue.baseState=o)}var Vd={enqueueSetState:function(i,n,o){i=i._reactInternals;var u=Gi(),y=Ya(u);y.payload=n,o!=null&&(y.callback=o),n=Ga(i,y,u),n!==null&&(Fi(n,i,u),uo(n,i,u))},enqueueReplaceState:function(i,n,o){i=i._reactInternals;var u=Gi(),y=Ya(u);y.tag=1,y.payload=n,o!=null&&(y.callback=o),n=Ga(i,y,u),n!==null&&(Fi(n,i,u),uo(n,i,u))},enqueueForceUpdate:function(i,n){i=i._reactInternals;var o=Gi(),u=Ya(o);u.tag=2,n!=null&&(u.callback=n),n=Ga(i,u,o),n!==null&&(Fi(n,i,o),uo(n,i,o))}};function Hx(i,n,o,u,y,b,w){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(u,b,w):n.prototype&&n.prototype.isPureReactComponent?!ro(o,u)||!ro(y,b):!0}function Ux(i,n,o,u){i=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,u),n.state!==i&&Vd.enqueueReplaceState(n,n.state,null)}function Nn(i,n){var o=n;if("ref"in n){o={};for(var u in n)u!=="ref"&&(o[u]=n[u])}if(i=i.defaultProps){o===n&&(o=g({},o));for(var y in i)o[y]===void 0&&(o[y]=i[y])}return o}function jx(i){Jc(i)}function Px(i){console.error(i)}function Wx(i){Jc(i)}function vh(i,n){try{var o=i.onUncaughtError;o(n.value,{componentStack:n.stack})}catch(u){setTimeout(function(){throw u})}}function Yx(i,n,o){try{var u=i.onCaughtError;u(o.value,{componentStack:o.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function Zd(i,n,o){return o=Ya(o),o.tag=3,o.payload={element:null},o.callback=function(){vh(i,n)},o}function Gx(i){return i=Ya(i),i.tag=3,i}function Xx(i,n,o,u){var y=o.type.getDerivedStateFromError;if(typeof y=="function"){var b=u.value;i.payload=function(){return y(b)},i.callback=function(){Yx(n,o,u)}}var w=o.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(i.callback=function(){Yx(n,o,u),typeof y!="function"&&(Ja===null?Ja=new Set([this]):Ja.add(this));var L=u.stack;this.componentDidCatch(u.value,{componentStack:L!==null?L:""})})}function ZE(i,n,o,u,y){if(o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=o.alternate,n!==null&&Ms(n,o,y,!0),o=ji.current,o!==null){switch(o.tag){case 31:case 13:return sr===null?Oh():o.alternate===null&&Me===0&&(Me=3),o.flags&=-257,o.flags|=65536,o.lanes=y,u===ch?o.flags|=16384:(n=o.updateQueue,n===null?o.updateQueue=new Set([u]):n.add(u),kp(i,u,y)),!1;case 22:return o.flags|=65536,u===ch?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)),kp(i,u,y)),!1}throw Error(a(435,o.tag))}return kp(i,u,y),Oh(),!1}if(Zt)return n=ji.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=y,u!==gd&&(i=Error(a(422),{cause:u}),so(ir(i,o)))):(u!==gd&&(n=Error(a(423),{cause:u}),so(ir(n,o))),i=i.current.alternate,i.flags|=65536,y&=-y,i.lanes|=y,u=ir(u,o),y=Zd(i.stateNode,u,y),_d(i,y),Me!==4&&(Me=2)),!1;var b=Error(a(520),{cause:u});if(b=ir(b,o),_o===null?_o=[b]:_o.push(b),Me!==4&&(Me=2),n===null)return!0;u=ir(u,o),o=n;do{switch(o.tag){case 3:return o.flags|=65536,i=y&-y,o.lanes|=i,i=Zd(o.stateNode,u,i),_d(o,i),!1;case 1:if(n=o.type,b=o.stateNode,(o.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Ja===null||!Ja.has(b))))return o.flags|=65536,y&=-y,o.lanes|=y,y=Gx(y),Xx(y,i,o,u),_d(o,y),!1}o=o.return}while(o!==null);return!1}var Qd=Error(a(461)),He=!1;function ii(i,n,o,u){n.child=i===null?K0(n,null,o,u):$n(n,i.child,o,u)}function Vx(i,n,o,u,y){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 Rn(n),u=Rd(i,n,o,w,b,y),L=Fd(),i!==null&&!He?(Od(i,n,y),oa(i,n,y)):(Zt&&L&&dd(n),n.flags|=1,ii(i,n,u,y),n.child)}function Zx(i,n,o,u,y){if(i===null){var b=o.type;return typeof b=="function"&&!hd(b)&&b.defaultProps===void 0&&o.compare===null?(n.tag=15,n.type=b,Qx(i,n,b,u,y)):(i=rh(o.type,null,u,n,n.mode,y),i.ref=n.ref,i.return=n,n.child=i)}if(b=i.child,!np(i,y)){var w=b.memoizedProps;if(o=o.compare,o=o!==null?o:ro,o(w,u)&&i.ref===n.ref)return oa(i,n,y)}return n.flags|=1,i=ia(b,u),i.ref=n.ref,i.return=n,n.child=i}function Qx(i,n,o,u,y){if(i!==null){var b=i.memoizedProps;if(ro(b,u)&&i.ref===n.ref)if(He=!1,n.pendingProps=u=b,np(i,y))(i.flags&131072)!==0&&(He=!0);else return n.lanes=i.lanes,oa(i,n,y)}return Kd(i,n,o,u,y)}function Kx(i,n,o,u){var y=u.children,b=i!==null?i.memoizedState:null;if(i===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,i!==null){for(u=n.child=i.child,y=0;u!==null;)y=y|u.lanes|u.childLanes,u=u.sibling;u=y&~b}else u=0,n.child=null;return Jx(i,n,b,o,u)}if((o&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},i!==null&&lh(n,b!==null?b.cachePool:null),b!==null?ex(n,b):Ed(),ix(n);else return u=n.lanes=536870912,Jx(i,n,b!==null?b.baseLanes|o:o,o,u)}else b!==null?(lh(n,b.cachePool),ex(n,b),Va(),n.memoizedState=null):(i!==null&&lh(n,null),Ed(),Va());return ii(i,n,y,o),n.child}function bo(i,n){return i!==null&&i.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Jx(i,n,o,u,y){var b=vd();return b=b===null?null:{parent:qe._currentValue,pool:b},n.memoizedState={baseLanes:o,cachePool:b},i!==null&&lh(n,null),Ed(),ix(n),i!==null&&Ms(i,n,u,!0),n.childLanes=y,null}function Sh(i,n){return n=wh({mode:n.mode,children:n.children},i.mode),n.ref=i.ref,i.child=n,n.return=i,n}function tb(i,n,o){return $n(n,i.child,null,o),i=Sh(n,n.pendingProps),i.flags|=2,Pi(n),n.memoizedState=null,i}function QE(i,n,o){var u=n.pendingProps,y=(n.flags&128)!==0;if(n.flags&=-129,i===null){if(Zt){if(u.mode==="hidden")return i=Sh(n,u),n.lanes=536870912,bo(null,i);if(Ad(n),(i=ve)?(i=fC(i,nr),i=i!==null&&i.data==="&"?i:null,i!==null&&(n.memoizedState={dehydrated:i,treeContext:Ha!==null?{id:Dr,overflow:$r}:null,retryLane:536870912,hydrationErrors:null},o=z0(i),o.return=n,n.child=o,ti=n,ve=null)):i=null,i===null)throw ja(n);return n.lanes=536870912,null}return Sh(n,u)}var b=i.memoizedState;if(b!==null){var w=b.dehydrated;if(Ad(n),y)if(n.flags&256)n.flags&=-257,n=tb(i,n,o);else if(n.memoizedState!==null)n.child=i.child,n.flags|=128,n=null;else throw Error(a(558));else if(He||Ms(i,n,o,!1),y=(o&i.childLanes)!==0,He||y){if(u=ye,u!==null&&(w=ps(u,o),w!==0&&w!==b.retryLane))throw b.retryLane=w,En(i,w),Fi(u,i,w),Qd;Oh(),n=tb(i,n,o)}else i=b.treeContext,ve=lr(w.nextSibling),ti=n,Zt=!0,Ua=null,nr=!1,i!==null&&I0(n,i),n=Sh(n,u),n.flags|=4096;return n}return i=ia(i.child,{mode:u.mode,children:u.children}),i.ref=n.ref,n.child=i,i.return=n,i}function Th(i,n){var o=n.ref;if(o===null)i!==null&&i.ref!==null&&(n.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(a(284));(i===null||i.ref!==o)&&(n.flags|=4194816)}}function Kd(i,n,o,u,y){return Rn(n),o=Rd(i,n,o,u,void 0,y),u=Fd(),i!==null&&!He?(Od(i,n,y),oa(i,n,y)):(Zt&&u&&dd(n),n.flags|=1,ii(i,n,o,y),n.child)}function eb(i,n,o,u,y,b){return Rn(n),n.updateQueue=null,o=ax(n,u,o,y),rx(i),u=Fd(),i!==null&&!He?(Od(i,n,b),oa(i,n,b)):(Zt&&u&&dd(n),n.flags|=1,ii(i,n,o,b),n.child)}function ib(i,n,o,u,y){if(Rn(n),n.stateNode===null){var b=Bs,w=o.contextType;typeof w=="object"&&w!==null&&(b=ei(w)),b=new o(u,b),n.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Vd,n.stateNode=b,b._reactInternals=n,b=n.stateNode,b.props=u,b.state=n.memoizedState,b.refs={},Td(n),w=o.contextType,b.context=typeof w=="object"&&w!==null?ei(w):Bs,b.state=n.memoizedState,w=o.getDerivedStateFromProps,typeof w=="function"&&(Xd(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&&Vd.enqueueReplaceState(b,b.state,null),po(n,u,b,y),fo(),b.state=n.memoizedState),typeof b.componentDidMount=="function"&&(n.flags|=4194308),u=!0}else if(i===null){b=n.stateNode;var L=n.memoizedProps,W=Nn(o,L);b.props=W;var it=b.context,ot=o.contextType;w=Bs,typeof ot=="object"&&ot!==null&&(w=ei(ot));var dt=o.getDerivedStateFromProps;ot=typeof dt=="function"||typeof b.getSnapshotBeforeUpdate=="function",L=n.pendingProps!==L,ot||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(L||it!==w)&&Ux(n,b,u,w),Wa=!1;var rt=n.memoizedState;b.state=rt,po(n,u,b,y),fo(),it=n.memoizedState,L||rt!==it||Wa?(typeof dt=="function"&&(Xd(n,o,dt,u),it=n.memoizedState),(W=Wa||Hx(n,o,W,u,rt,it,w))?(ot||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=it),b.props=u,b.state=it,b.context=w,u=W):(typeof b.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{b=n.stateNode,wd(i,n),w=n.memoizedProps,ot=Nn(o,w),b.props=ot,dt=n.pendingProps,rt=b.context,it=o.contextType,W=Bs,typeof it=="object"&&it!==null&&(W=ei(it)),L=o.getDerivedStateFromProps,(it=typeof L=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(w!==dt||rt!==W)&&Ux(n,b,u,W),Wa=!1,rt=n.memoizedState,b.state=rt,po(n,u,b,y),fo();var lt=n.memoizedState;w!==dt||rt!==lt||Wa||i!==null&&i.dependencies!==null&&nh(i.dependencies)?(typeof L=="function"&&(Xd(n,o,L,u),lt=n.memoizedState),(ot=Wa||Hx(n,o,ot,u,rt,lt,W)||i!==null&&i.dependencies!==null&&nh(i.dependencies))?(it||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(u,lt,W),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(u,lt,W)),typeof b.componentDidUpdate=="function"&&(n.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof b.componentDidUpdate!="function"||w===i.memoizedProps&&rt===i.memoizedState||(n.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||w===i.memoizedProps&&rt===i.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=lt),b.props=u,b.state=lt,b.context=W,u=ot):(typeof b.componentDidUpdate!="function"||w===i.memoizedProps&&rt===i.memoizedState||(n.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||w===i.memoizedProps&&rt===i.memoizedState||(n.flags|=1024),u=!1)}return b=u,Th(i,n),u=(n.flags&128)!==0,b||u?(b=n.stateNode,o=u&&typeof o.getDerivedStateFromError!="function"?null:b.render(),n.flags|=1,i!==null&&u?(n.child=$n(n,i.child,null,y),n.child=$n(n,null,o,y)):ii(i,n,o,y),n.memoizedState=b.state,i=n.child):i=oa(i,n,y),i}function rb(i,n,o,u){return An(),n.flags|=256,ii(i,n,o,u),n.child}var Jd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function tp(i){return{baseLanes:i,cachePool:Y0()}}function ep(i,n,o){return i=i!==null?i.childLanes&~o:0,n&&(i|=Yi),i}function ab(i,n,o){var u=n.pendingProps,y=!1,b=(n.flags&128)!==0,w;if((w=b)||(w=i!==null&&i.memoizedState===null?!1:(De.current&2)!==0),w&&(y=!0,n.flags&=-129),w=(n.flags&32)!==0,n.flags&=-33,i===null){if(Zt){if(y?Xa(n):Va(),(i=ve)?(i=fC(i,nr),i=i!==null&&i.data!=="&"?i:null,i!==null&&(n.memoizedState={dehydrated:i,treeContext:Ha!==null?{id:Dr,overflow:$r}:null,retryLane:536870912,hydrationErrors:null},o=z0(i),o.return=n,n.child=o,ti=n,ve=null)):i=null,i===null)throw ja(n);return zp(i)?n.lanes=32:n.lanes=536870912,null}var L=u.children;return u=u.fallback,y?(Va(),y=n.mode,L=wh({mode:"hidden",children:L},y),u=Ln(u,y,o,null),L.return=n,u.return=n,L.sibling=u,n.child=L,u=n.child,u.memoizedState=tp(o),u.childLanes=ep(i,w,o),n.memoizedState=Jd,bo(null,u)):(Xa(n),ip(n,L))}var W=i.memoizedState;if(W!==null&&(L=W.dehydrated,L!==null)){if(b)n.flags&256?(Xa(n),n.flags&=-257,n=rp(i,n,o)):n.memoizedState!==null?(Va(),n.child=i.child,n.flags|=128,n=null):(Va(),L=u.fallback,y=n.mode,u=wh({mode:"visible",children:u.children},y),L=Ln(L,y,o,null),L.flags|=2,u.return=n,L.return=n,u.sibling=L,n.child=u,$n(n,i.child,null,o),u=n.child,u.memoizedState=tp(o),u.childLanes=ep(i,w,o),n.memoizedState=Jd,n=bo(null,u));else if(Xa(n),zp(L)){if(w=L.nextSibling&&L.nextSibling.dataset,w)var it=w.dgst;w=it,u=Error(a(419)),u.stack="",u.digest=w,so({value:u,source:null,stack:null}),n=rp(i,n,o)}else if(He||Ms(i,n,o,!1),w=(o&i.childLanes)!==0,He||w){if(w=ye,w!==null&&(u=ps(w,o),u!==0&&u!==W.retryLane))throw W.retryLane=u,En(i,u),Fi(w,i,u),Qd;$p(L)||Oh(),n=rp(i,n,o)}else $p(L)?(n.flags|=192,n.child=i.child,n=null):(i=W.treeContext,ve=lr(L.nextSibling),ti=n,Zt=!0,Ua=null,nr=!1,i!==null&&I0(n,i),n=ip(n,u.children),n.flags|=4096);return n}return y?(Va(),L=u.fallback,y=n.mode,W=i.child,it=W.sibling,u=ia(W,{mode:"hidden",children:u.children}),u.subtreeFlags=W.subtreeFlags&65011712,it!==null?L=ia(it,L):(L=Ln(L,y,o,null),L.flags|=2),L.return=n,u.return=n,u.sibling=L,n.child=u,bo(null,u),u=n.child,L=i.child.memoizedState,L===null?L=tp(o):(y=L.cachePool,y!==null?(W=qe._currentValue,y=y.parent!==W?{parent:W,pool:W}:y):y=Y0(),L={baseLanes:L.baseLanes|o,cachePool:y}),u.memoizedState=L,u.childLanes=ep(i,w,o),n.memoizedState=Jd,bo(i.child,u)):(Xa(n),o=i.child,i=o.sibling,o=ia(o,{mode:"visible",children:u.children}),o.return=n,o.sibling=null,i!==null&&(w=n.deletions,w===null?(n.deletions=[i],n.flags|=16):w.push(i)),n.child=o,n.memoizedState=null,o)}function ip(i,n){return n=wh({mode:"visible",children:n},i.mode),n.return=i,i.child=n}function wh(i,n){return i=Ui(22,i,null,n),i.lanes=0,i}function rp(i,n,o){return $n(n,i.child,null,o),i=ip(n,n.pendingProps.children),i.flags|=2,n.memoizedState=null,i}function nb(i,n,o){i.lanes|=n;var u=i.alternate;u!==null&&(u.lanes|=n),xd(i.return,n,o)}function ap(i,n,o,u,y,b){var w=i.memoizedState;w===null?i.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:y,treeForkCount:b}:(w.isBackwards=n,w.rendering=null,w.renderingStartTime=0,w.last=u,w.tail=o,w.tailMode=y,w.treeForkCount=b)}function sb(i,n,o){var u=n.pendingProps,y=u.revealOrder,b=u.tail;u=u.children;var w=De.current,L=(w&2)!==0;if(L?(w=w&1|2,n.flags|=128):w&=1,ct(De,w),ii(i,n,u,o),u=Zt?no:0,!L&&i!==null&&(i.flags&128)!==0)t:for(i=n.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&nb(i,o,n);else if(i.tag===19)nb(i,o,n);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break t;for(;i.sibling===null;){if(i.return===null||i.return===n)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(y){case"forwards":for(o=n.child,y=null;o!==null;)i=o.alternate,i!==null&&dh(i)===null&&(y=o),o=o.sibling;o=y,o===null?(y=n.child,n.child=null):(y=o.sibling,o.sibling=null),ap(n,!1,y,o,b,u);break;case"backwards":case"unstable_legacy-backwards":for(o=null,y=n.child,n.child=null;y!==null;){if(i=y.alternate,i!==null&&dh(i)===null){n.child=y;break}i=y.sibling,y.sibling=o,o=y,y=i}ap(n,!0,o,null,b,u);break;case"together":ap(n,!1,null,null,void 0,u);break;default:n.memoizedState=null}return n.child}function oa(i,n,o){if(i!==null&&(n.dependencies=i.dependencies),Ka|=n.lanes,(o&n.childLanes)===0)if(i!==null){if(Ms(i,n,o,!1),(o&n.childLanes)===0)return null}else return null;if(i!==null&&n.child!==i.child)throw Error(a(153));if(n.child!==null){for(i=n.child,o=ia(i,i.pendingProps),n.child=o,o.return=n;i.sibling!==null;)i=i.sibling,o=o.sibling=ia(i,i.pendingProps),o.return=n;o.sibling=null}return n.child}function np(i,n){return(i.lanes&n)!==0?!0:(i=i.dependencies,!!(i!==null&&nh(i)))}function KE(i,n,o){switch(n.tag){case 3:Dt(n,n.stateNode.containerInfo),Pa(n,qe,i.memoizedState.cache),An();break;case 27:case 5:mt(n);break;case 4:Dt(n,n.stateNode.containerInfo);break;case 10:Pa(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Ad(n),null;break;case 13:var u=n.memoizedState;if(u!==null)return u.dehydrated!==null?(Xa(n),n.flags|=128,null):(o&n.child.childLanes)!==0?ab(i,n,o):(Xa(n),i=oa(i,n,o),i!==null?i.sibling:null);Xa(n);break;case 19:var y=(i.flags&128)!==0;if(u=(o&n.childLanes)!==0,u||(Ms(i,n,o,!1),u=(o&n.childLanes)!==0),y){if(u)return sb(i,n,o);n.flags|=128}if(y=n.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),ct(De,De.current),u)break;return null;case 22:return n.lanes=0,Kx(i,n,o,n.pendingProps);case 24:Pa(n,qe,i.memoizedState.cache)}return oa(i,n,o)}function lb(i,n,o){if(i!==null)if(i.memoizedProps!==n.pendingProps)He=!0;else{if(!np(i,o)&&(n.flags&128)===0)return He=!1,KE(i,n,o);He=(i.flags&131072)!==0}else He=!1,Zt&&(n.flags&1048576)!==0&&q0(n,no,n.index);switch(n.lanes=0,n.tag){case 16:t:{var u=n.pendingProps;if(i=On(n.elementType),n.type=i,typeof i=="function")hd(i)?(u=Nn(i,u),n.tag=1,n=ib(null,n,i,u,o)):(n.tag=0,n=Kd(null,n,i,u,o));else{if(i!=null){var y=i.$$typeof;if(y===R){n.tag=11,n=Vx(null,n,i,u,o);break t}else if(y===H){n.tag=14,n=Zx(null,n,i,u,o);break t}}throw n=Y(i)||i,Error(a(306,n,""))}}return n;case 0:return Kd(i,n,n.type,n.pendingProps,o);case 1:return u=n.type,y=Nn(u,n.pendingProps),ib(i,n,u,y,o);case 3:t:{if(Dt(n,n.stateNode.containerInfo),i===null)throw Error(a(387));u=n.pendingProps;var b=n.memoizedState;y=b.element,wd(i,n),po(n,u,null,o);var w=n.memoizedState;if(u=w.cache,Pa(n,qe,u),u!==b.cache&&bd(n,[qe],o,!0),fo(),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=rb(i,n,u,o);break t}else if(u!==y){y=ir(Error(a(424)),n),so(y),n=rb(i,n,u,o);break t}else{switch(i=n.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(ve=lr(i.firstChild),ti=n,Zt=!0,Ua=null,nr=!0,o=K0(n,null,u,o),n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(An(),u===y){n=oa(i,n,o);break t}ii(i,n,u,o)}n=n.child}return n;case 26:return Th(i,n),i===null?(o=xC(n.type,null,n.pendingProps,null))?n.memoizedState=o:Zt||(o=n.type,i=n.pendingProps,u=Hh(xt.current).createElement(o),u[Ne]=n,u[Je]=i,ri(u,o,i),Ee(u),n.stateNode=u):n.memoizedState=xC(n.type,i.memoizedProps,n.pendingProps,i.memoizedState),null;case 27:return mt(n),i===null&&Zt&&(u=n.stateNode=gC(n.type,n.pendingProps,xt.current),ti=n,nr=!0,y=ve,an(n.type)?(Np=y,ve=lr(u.firstChild)):ve=y),ii(i,n,n.pendingProps.children,o),Th(i,n),i===null&&(n.flags|=4194304),n.child;case 5:return i===null&&Zt&&((y=u=ve)&&(u=EL(u,n.type,n.pendingProps,nr),u!==null?(n.stateNode=u,ti=n,ve=lr(u.firstChild),nr=!1,y=!0):y=!1),y||ja(n)),mt(n),y=n.type,b=n.pendingProps,w=i!==null?i.memoizedProps:null,u=b.children,Fp(y,b)?u=null:w!==null&&Fp(y,w)&&(n.flags|=32),n.memoizedState!==null&&(y=Rd(i,n,jE,null,null,o),Oo._currentValue=y),Th(i,n),ii(i,n,u,o),n.child;case 6:return i===null&&Zt&&((i=o=ve)&&(o=LL(o,n.pendingProps,nr),o!==null?(n.stateNode=o,ti=n,ve=null,i=!0):i=!1),i||ja(n)),null;case 13:return ab(i,n,o);case 4:return Dt(n,n.stateNode.containerInfo),u=n.pendingProps,i===null?n.child=$n(n,null,u,o):ii(i,n,u,o),n.child;case 11:return Vx(i,n,n.type,n.pendingProps,o);case 7:return ii(i,n,n.pendingProps,o),n.child;case 8:return ii(i,n,n.pendingProps.children,o),n.child;case 12:return ii(i,n,n.pendingProps.children,o),n.child;case 10:return u=n.pendingProps,Pa(n,n.type,u.value),ii(i,n,u.children,o),n.child;case 9:return y=n.type._context,u=n.pendingProps.children,Rn(n),y=ei(y),u=u(y),n.flags|=1,ii(i,n,u,o),n.child;case 14:return Zx(i,n,n.type,n.pendingProps,o);case 15:return Qx(i,n,n.type,n.pendingProps,o);case 19:return sb(i,n,o);case 31:return QE(i,n,o);case 22:return Kx(i,n,o,n.pendingProps);case 24:return Rn(n),u=ei(qe),i===null?(y=vd(),y===null&&(y=ye,b=Cd(),y.pooledCache=b,b.refCount++,b!==null&&(y.pooledCacheLanes|=o),y=b),n.memoizedState={parent:u,cache:y},Td(n),Pa(n,qe,y)):((i.lanes&o)!==0&&(wd(i,n),po(n,null,null,o),fo()),y=i.memoizedState,b=n.memoizedState,y.parent!==u?(y={parent:u,cache:u},n.memoizedState=y,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=y),Pa(n,qe,u)):(u=b.cache,Pa(n,qe,u),u!==y.cache&&bd(n,[qe],o,!0))),ii(i,n,n.pendingProps.children,o),n.child;case 29:throw n.pendingProps}throw Error(a(156,n.tag))}function ca(i){i.flags|=4}function sp(i,n,o,u,y){if((n=(i.mode&32)!==0)&&(n=!1),n){if(i.flags|=16777216,(y&335544128)===y)if(i.stateNode.complete)i.flags|=8192;else if(Ob())i.flags|=8192;else throw Dn=ch,Sd}else i.flags&=-16777217}function ob(i,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!SC(n))if(Ob())i.flags|=8192;else throw Dn=ch,Sd}function _h(i,n){n!==null&&(i.flags|=4),i.flags&16384&&(n=i.tag!==22?Hc():536870912,i.lanes|=n,js|=n)}function Co(i,n){if(!Zt)switch(i.tailMode){case"hidden":n=i.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?i.tail=null:o.sibling=null;break;case"collapsed":o=i.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?n||i.tail===null?i.tail=null:i.tail.sibling=null:u.sibling=null}}function Se(i){var n=i.alternate!==null&&i.alternate.child===i.child,o=0,u=0;if(n)for(var y=i.child;y!==null;)o|=y.lanes|y.childLanes,u|=y.subtreeFlags&65011712,u|=y.flags&65011712,y.return=i,y=y.sibling;else for(y=i.child;y!==null;)o|=y.lanes|y.childLanes,u|=y.subtreeFlags,u|=y.flags,y.return=i,y=y.sibling;return i.subtreeFlags|=u,i.childLanes=o,n}function JE(i,n,o){var u=n.pendingProps;switch(pd(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Se(n),null;case 1:return Se(n),null;case 3:return o=n.stateNode,u=null,i!==null&&(u=i.memoizedState.cache),n.memoizedState.cache!==u&&(n.flags|=2048),na(qe),pt(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(i===null||i.child===null)&&(As(n)?ca(n):i===null||i.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,md())),Se(n),null;case 26:var y=n.type,b=n.memoizedState;return i===null?(ca(n),b!==null?(Se(n),ob(n,b)):(Se(n),sp(n,y,null,u,o))):b?b!==i.memoizedState?(ca(n),Se(n),ob(n,b)):(Se(n),n.flags&=-16777217):(i=i.memoizedProps,i!==u&&ca(n),Se(n),sp(n,y,i,u,o)),null;case 27:if(Ct(n),o=xt.current,y=n.type,i!==null&&n.stateNode!=null)i.memoizedProps!==u&&ca(n);else{if(!u){if(n.stateNode===null)throw Error(a(166));return Se(n),null}i=ht.current,As(n)?H0(n):(i=gC(y,u,o),n.stateNode=i,ca(n))}return Se(n),null;case 5:if(Ct(n),y=n.type,i!==null&&n.stateNode!=null)i.memoizedProps!==u&&ca(n);else{if(!u){if(n.stateNode===null)throw Error(a(166));return Se(n),null}if(b=ht.current,As(n))H0(n);else{var w=Hh(xt.current);switch(b){case 1:b=w.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:b=w.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":b=w.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":b=w.createElementNS("http://www.w3.org/1998/Math/MathML",y);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(y,{is:u.is}):w.createElement(y)}}b[Ne]=n,b[Je]=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(ri(b,y,u),y){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break t;case"img":u=!0;break t;default:u=!1}u&&ca(n)}}return Se(n),sp(n,n.type,i===null?null:i.memoizedProps,n.pendingProps,o),null;case 6:if(i&&n.stateNode!=null)i.memoizedProps!==u&&ca(n);else{if(typeof u!="string"&&n.stateNode===null)throw Error(a(166));if(i=xt.current,As(n)){if(i=n.stateNode,o=n.memoizedProps,u=null,y=ti,y!==null)switch(y.tag){case 27:case 5:u=y.memoizedProps}i[Ne]=n,i=!!(i.nodeValue===o||u!==null&&u.suppressHydrationWarning===!0||aC(i.nodeValue,o)),i||ja(n,!0)}else i=Hh(i).createTextNode(u),i[Ne]=n,n.stateNode=i}return Se(n),null;case 31:if(o=n.memoizedState,i===null||i.memoizedState!==null){if(u=As(n),o!==null){if(i===null){if(!u)throw Error(a(318));if(i=n.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(557));i[Ne]=n}else An(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Se(n),i=!1}else o=md(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=o),i=!0;if(!i)return n.flags&256?(Pi(n),n):(Pi(n),null);if((n.flags&128)!==0)throw Error(a(558))}return Se(n),null;case 13:if(u=n.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(y=As(n),u!==null&&u.dehydrated!==null){if(i===null){if(!y)throw Error(a(318));if(y=n.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(a(317));y[Ne]=n}else An(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Se(n),y=!1}else y=md(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=y),y=!0;if(!y)return n.flags&256?(Pi(n),n):(Pi(n),null)}return Pi(n),(n.flags&128)!==0?(n.lanes=o,n):(o=u!==null,i=i!==null&&i.memoizedState!==null,o&&(u=n.child,y=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(y=u.alternate.memoizedState.cachePool.pool),b=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(b=u.memoizedState.cachePool.pool),b!==y&&(u.flags|=2048)),o!==i&&o&&(n.child.flags|=8192),_h(n,n.updateQueue),Se(n),null);case 4:return pt(),i===null&&Ep(n.stateNode.containerInfo),Se(n),null;case 10:return na(n.type),Se(n),null;case 19:if(tt(De),u=n.memoizedState,u===null)return Se(n),null;if(y=(n.flags&128)!==0,b=u.rendering,b===null)if(y)Co(u,!1);else{if(Me!==0||i!==null&&(i.flags&128)!==0)for(i=n.child;i!==null;){if(b=dh(i),b!==null){for(n.flags|=128,Co(u,!1),i=b.updateQueue,n.updateQueue=i,_h(n,i),n.subtreeFlags=0,i=o,o=n.child;o!==null;)$0(o,i),o=o.sibling;return ct(De,De.current&1|2),Zt&&ra(n,u.treeForkCount),n.child}i=i.sibling}u.tail!==null&&li()>Mh&&(n.flags|=128,y=!0,Co(u,!1),n.lanes=4194304)}else{if(!y)if(i=dh(b),i!==null){if(n.flags|=128,y=!0,i=i.updateQueue,n.updateQueue=i,_h(n,i),Co(u,!0),u.tail===null&&u.tailMode==="hidden"&&!b.alternate&&!Zt)return Se(n),null}else 2*li()-u.renderingStartTime>Mh&&o!==536870912&&(n.flags|=128,y=!0,Co(u,!1),n.lanes=4194304);u.isBackwards?(b.sibling=n.child,n.child=b):(i=u.last,i!==null?i.sibling=b:n.child=b,u.last=b)}return u.tail!==null?(i=u.tail,u.rendering=i,u.tail=i.sibling,u.renderingStartTime=li(),i.sibling=null,o=De.current,ct(De,y?o&1|2:o&1),Zt&&ra(n,u.treeForkCount),i):(Se(n),null);case 22:case 23:return Pi(n),Ld(),u=n.memoizedState!==null,i!==null?i.memoizedState!==null!==u&&(n.flags|=8192):u&&(n.flags|=8192),u?(o&536870912)!==0&&(n.flags&128)===0&&(Se(n),n.subtreeFlags&6&&(n.flags|=8192)):Se(n),o=n.updateQueue,o!==null&&_h(n,o.retryQueue),o=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==o&&(n.flags|=2048),i!==null&&tt(Fn),null;case 24:return o=null,i!==null&&(o=i.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),na(qe),Se(n),null;case 25:return null;case 30:return null}throw Error(a(156,n.tag))}function tL(i,n){switch(pd(n),n.tag){case 1:return i=n.flags,i&65536?(n.flags=i&-65537|128,n):null;case 3:return na(qe),pt(),i=n.flags,(i&65536)!==0&&(i&128)===0?(n.flags=i&-65537|128,n):null;case 26:case 27:case 5:return Ct(n),null;case 31:if(n.memoizedState!==null){if(Pi(n),n.alternate===null)throw Error(a(340));An()}return i=n.flags,i&65536?(n.flags=i&-65537|128,n):null;case 13:if(Pi(n),i=n.memoizedState,i!==null&&i.dehydrated!==null){if(n.alternate===null)throw Error(a(340));An()}return i=n.flags,i&65536?(n.flags=i&-65537|128,n):null;case 19:return tt(De),null;case 4:return pt(),null;case 10:return na(n.type),null;case 22:case 23:return Pi(n),Ld(),i!==null&&tt(Fn),i=n.flags,i&65536?(n.flags=i&-65537|128,n):null;case 24:return na(qe),null;case 25:return null;default:return null}}function cb(i,n){switch(pd(n),n.tag){case 3:na(qe),pt();break;case 26:case 27:case 5:Ct(n);break;case 4:pt();break;case 31:n.memoizedState!==null&&Pi(n);break;case 13:Pi(n);break;case 19:tt(De);break;case 10:na(n.type);break;case 22:case 23:Pi(n),Ld(),i!==null&&tt(Fn);break;case 24:na(qe)}}function ko(i,n){try{var o=n.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var y=u.next;o=y;do{if((o.tag&i)===i){u=void 0;var b=o.create,w=o.inst;u=b(),w.destroy=u}o=o.next}while(o!==y)}}catch(L){de(n,n.return,L)}}function Za(i,n,o){try{var u=n.updateQueue,y=u!==null?u.lastEffect:null;if(y!==null){var b=y.next;u=b;do{if((u.tag&i)===i){var w=u.inst,L=w.destroy;if(L!==void 0){w.destroy=void 0,y=n;var W=o,it=L;try{it()}catch(ot){de(y,W,ot)}}}u=u.next}while(u!==b)}}catch(ot){de(n,n.return,ot)}}function hb(i){var n=i.updateQueue;if(n!==null){var o=i.stateNode;try{tx(n,o)}catch(u){de(i,i.return,u)}}}function ub(i,n,o){o.props=Nn(i.type,i.memoizedProps),o.state=i.memoizedState;try{o.componentWillUnmount()}catch(u){de(i,n,u)}}function vo(i,n){try{var o=i.ref;if(o!==null){switch(i.tag){case 26:case 27:case 5:var u=i.stateNode;break;case 30:u=i.stateNode;break;default:u=i.stateNode}typeof o=="function"?i.refCleanup=o(u):o.current=u}}catch(y){de(i,n,y)}}function zr(i,n){var o=i.ref,u=i.refCleanup;if(o!==null)if(typeof u=="function")try{u()}catch(y){de(i,n,y)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(y){de(i,n,y)}else o.current=null}function fb(i){var n=i.type,o=i.memoizedProps,u=i.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(y){de(i,i.return,y)}}function lp(i,n,o){try{var u=i.stateNode;vL(u,i.type,o,n),u[Je]=n}catch(y){de(i,i.return,y)}}function db(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&an(i.type)||i.tag===4}function op(i){t:for(;;){for(;i.sibling===null;){if(i.return===null||db(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&an(i.type)||i.flags&2||i.child===null||i.tag===4)continue t;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function cp(i,n,o){var u=i.tag;if(u===5||u===6)i=i.stateNode,n?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(i,n):(n=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,n.appendChild(i),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=ta));else if(u!==4&&(u===27&&an(i.type)&&(o=i.stateNode,n=null),i=i.child,i!==null))for(cp(i,n,o),i=i.sibling;i!==null;)cp(i,n,o),i=i.sibling}function Bh(i,n,o){var u=i.tag;if(u===5||u===6)i=i.stateNode,n?o.insertBefore(i,n):o.appendChild(i);else if(u!==4&&(u===27&&an(i.type)&&(o=i.stateNode),i=i.child,i!==null))for(Bh(i,n,o),i=i.sibling;i!==null;)Bh(i,n,o),i=i.sibling}function pb(i){var n=i.stateNode,o=i.memoizedProps;try{for(var u=i.type,y=n.attributes;y.length;)n.removeAttributeNode(y[0]);ri(n,u,o),n[Ne]=i,n[Je]=o}catch(b){de(i,i.return,b)}}var ha=!1,Ue=!1,hp=!1,gb=typeof WeakSet=="function"?WeakSet:Set,Ze=null;function eL(i,n){if(i=i.containerInfo,Mp=Xh,i=B0(i),rd(i)){if("selectionStart"in i)var o={start:i.selectionStart,end:i.selectionEnd};else t:{o=(o=i.ownerDocument)&&o.defaultView||window;var u=o.getSelection&&o.getSelection();if(u&&u.rangeCount!==0){o=u.anchorNode;var y=u.anchorOffset,b=u.focusNode;u=u.focusOffset;try{o.nodeType,b.nodeType}catch{o=null;break t}var w=0,L=-1,W=-1,it=0,ot=0,dt=i,rt=null;e:for(;;){for(var lt;dt!==o||y!==0&&dt.nodeType!==3||(L=w+y),dt!==b||u!==0&&dt.nodeType!==3||(W=w+u),dt.nodeType===3&&(w+=dt.nodeValue.length),(lt=dt.firstChild)!==null;)rt=dt,dt=lt;for(;;){if(dt===i)break e;if(rt===o&&++it===y&&(L=w),rt===b&&++ot===u&&(W=w),(lt=dt.nextSibling)!==null)break;dt=rt,rt=dt.parentNode}dt=lt}o=L===-1||W===-1?null:{start:L,end:W}}else o=null}o=o||{start:0,end:0}}else o=null;for(Rp={focusedElem:i,selectionRange:o},Xh=!1,Ze=n;Ze!==null;)if(n=Ze,i=n.child,(n.subtreeFlags&1028)!==0&&i!==null)i.return=n,Ze=i;else for(;Ze!==null;){switch(n=Ze,b=n.alternate,i=n.flags,n.tag){case 0:if((i&4)!==0&&(i=n.updateQueue,i=i!==null?i.events:null,i!==null))for(o=0;o<i.length;o++)y=i[o],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&b!==null){i=void 0,o=n,y=b.memoizedProps,b=b.memoizedState,u=o.stateNode;try{var vt=Nn(o.type,y);i=u.getSnapshotBeforeUpdate(vt,b),u.__reactInternalSnapshotBeforeUpdate=i}catch(Ot){de(o,o.return,Ot)}}break;case 3:if((i&1024)!==0){if(i=n.stateNode.containerInfo,o=i.nodeType,o===9)Dp(i);else if(o===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Dp(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(a(163))}if(i=n.sibling,i!==null){i.return=n.return,Ze=i;break}Ze=n.return}}function mb(i,n,o){var u=o.flags;switch(o.tag){case 0:case 11:case 15:fa(i,o),u&4&&ko(5,o);break;case 1:if(fa(i,o),u&4)if(i=o.stateNode,n===null)try{i.componentDidMount()}catch(w){de(o,o.return,w)}else{var y=Nn(o.type,n.memoizedProps);n=n.memoizedState;try{i.componentDidUpdate(y,n,i.__reactInternalSnapshotBeforeUpdate)}catch(w){de(o,o.return,w)}}u&64&&hb(o),u&512&&vo(o,o.return);break;case 3:if(fa(i,o),u&64&&(i=o.updateQueue,i!==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{tx(i,n)}catch(w){de(o,o.return,w)}}break;case 27:n===null&&u&4&&pb(o);case 26:case 5:fa(i,o),n===null&&u&4&&fb(o),u&512&&vo(o,o.return);break;case 12:fa(i,o);break;case 31:fa(i,o),u&4&&bb(i,o);break;case 13:fa(i,o),u&4&&Cb(i,o),u&64&&(i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(o=hL.bind(null,o),AL(i,o))));break;case 22:if(u=o.memoizedState!==null||ha,!u){n=n!==null&&n.memoizedState!==null||Ue,y=ha;var b=Ue;ha=u,(Ue=n)&&!b?da(i,o,(o.subtreeFlags&8772)!==0):fa(i,o),ha=y,Ue=b}break;case 30:break;default:fa(i,o)}}function yb(i){var n=i.alternate;n!==null&&(i.alternate=null,yb(n)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(n=i.stateNode,n!==null&&xs(n)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var we=null,Li=!1;function ua(i,n,o){for(o=o.child;o!==null;)xb(i,n,o),o=o.sibling}function xb(i,n,o){if(Ke&&typeof Ke.onCommitFiberUnmount=="function")try{Ke.onCommitFiberUnmount(Aa,o)}catch{}switch(o.tag){case 26:Ue||zr(o,n),ua(i,n,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Ue||zr(o,n);var u=we,y=Li;an(o.type)&&(we=o.stateNode,Li=!1),ua(i,n,o),Mo(o.stateNode),we=u,Li=y;break;case 5:Ue||zr(o,n);case 6:if(u=we,y=Li,we=null,ua(i,n,o),we=u,Li=y,we!==null)if(Li)try{(we.nodeType===9?we.body:we.nodeName==="HTML"?we.ownerDocument.body:we).removeChild(o.stateNode)}catch(b){de(o,n,b)}else try{we.removeChild(o.stateNode)}catch(b){de(o,n,b)}break;case 18:we!==null&&(Li?(i=we,hC(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,o.stateNode),Qs(i)):hC(we,o.stateNode));break;case 4:u=we,y=Li,we=o.stateNode.containerInfo,Li=!0,ua(i,n,o),we=u,Li=y;break;case 0:case 11:case 14:case 15:Za(2,o,n),Ue||Za(4,o,n),ua(i,n,o);break;case 1:Ue||(zr(o,n),u=o.stateNode,typeof u.componentWillUnmount=="function"&&ub(o,n,u)),ua(i,n,o);break;case 21:ua(i,n,o);break;case 22:Ue=(u=Ue)||o.memoizedState!==null,ua(i,n,o),Ue=u;break;default:ua(i,n,o)}}function bb(i,n){if(n.memoizedState===null&&(i=n.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Qs(i)}catch(o){de(n,n.return,o)}}}function Cb(i,n){if(n.memoizedState===null&&(i=n.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Qs(i)}catch(o){de(n,n.return,o)}}function iL(i){switch(i.tag){case 31:case 13:case 19:var n=i.stateNode;return n===null&&(n=i.stateNode=new gb),n;case 22:return i=i.stateNode,n=i._retryCache,n===null&&(n=i._retryCache=new gb),n;default:throw Error(a(435,i.tag))}}function Eh(i,n){var o=iL(i);n.forEach(function(u){if(!o.has(u)){o.add(u);var y=uL.bind(null,i,u);u.then(y,y)}})}function Ai(i,n){var o=n.deletions;if(o!==null)for(var u=0;u<o.length;u++){var y=o[u],b=i,w=n,L=w;t:for(;L!==null;){switch(L.tag){case 27:if(an(L.type)){we=L.stateNode,Li=!1;break t}break;case 5:we=L.stateNode,Li=!1;break t;case 3:case 4:we=L.stateNode.containerInfo,Li=!0;break t}L=L.return}if(we===null)throw Error(a(160));xb(b,w,y),we=null,Li=!1,b=y.alternate,b!==null&&(b.return=null),y.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)kb(n,i),n=n.sibling}var mr=null;function kb(i,n){var o=i.alternate,u=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Ai(n,i),Mi(i),u&4&&(Za(3,i,i.return),ko(3,i),Za(5,i,i.return));break;case 1:Ai(n,i),Mi(i),u&512&&(Ue||o===null||zr(o,o.return)),u&64&&ha&&(i=i.updateQueue,i!==null&&(u=i.callbacks,u!==null&&(o=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=o===null?u:o.concat(u))));break;case 26:var y=mr;if(Ai(n,i),Mi(i),u&512&&(Ue||o===null||zr(o,o.return)),u&4){var b=o!==null?o.memoizedState:null;if(u=i.memoizedState,o===null)if(u===null)if(i.stateNode===null){t:{u=i.type,o=i.memoizedProps,y=y.ownerDocument||y;e:switch(u){case"title":b=y.getElementsByTagName("title")[0],(!b||b[za]||b[Ne]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=y.createElement(u),y.head.insertBefore(b,y.querySelector("head > title"))),ri(b,u,o),b[Ne]=i,Ee(b),u=b;break t;case"link":var w=kC("link","href",y).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=y.createElement(u),ri(b,u,o),y.head.appendChild(b);break;case"meta":if(w=kC("meta","content",y).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=y.createElement(u),ri(b,u,o),y.head.appendChild(b);break;default:throw Error(a(468,u))}b[Ne]=i,Ee(b),u=b}i.stateNode=u}else vC(y,i.type,i.stateNode);else i.stateNode=CC(y,u,i.memoizedProps);else b!==u?(b===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):b.count--,u===null?vC(y,i.type,i.stateNode):CC(y,u,i.memoizedProps)):u===null&&i.stateNode!==null&&lp(i,i.memoizedProps,o.memoizedProps)}break;case 27:Ai(n,i),Mi(i),u&512&&(Ue||o===null||zr(o,o.return)),o!==null&&u&4&&lp(i,i.memoizedProps,o.memoizedProps);break;case 5:if(Ai(n,i),Mi(i),u&512&&(Ue||o===null||zr(o,o.return)),i.flags&32){y=i.stateNode;try{Cs(y,"")}catch(vt){de(i,i.return,vt)}}u&4&&i.stateNode!=null&&(y=i.memoizedProps,lp(i,y,o!==null?o.memoizedProps:y)),u&1024&&(hp=!0);break;case 6:if(Ai(n,i),Mi(i),u&4){if(i.stateNode===null)throw Error(a(162));u=i.memoizedProps,o=i.stateNode;try{o.nodeValue=u}catch(vt){de(i,i.return,vt)}}break;case 3:if(Ph=null,y=mr,mr=Uh(n.containerInfo),Ai(n,i),mr=y,Mi(i),u&4&&o!==null&&o.memoizedState.isDehydrated)try{Qs(n.containerInfo)}catch(vt){de(i,i.return,vt)}hp&&(hp=!1,vb(i));break;case 4:u=mr,mr=Uh(i.stateNode.containerInfo),Ai(n,i),Mi(i),mr=u;break;case 12:Ai(n,i),Mi(i);break;case 31:Ai(n,i),Mi(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,Eh(i,u)));break;case 13:Ai(n,i),Mi(i),i.child.flags&8192&&i.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Ah=li()),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,Eh(i,u)));break;case 22:y=i.memoizedState!==null;var W=o!==null&&o.memoizedState!==null,it=ha,ot=Ue;if(ha=it||y,Ue=ot||W,Ai(n,i),Ue=ot,ha=it,Mi(i),u&8192)t:for(n=i.stateNode,n._visibility=y?n._visibility&-2:n._visibility|1,y&&(o===null||W||ha||Ue||qn(i)),o=null,n=i;;){if(n.tag===5||n.tag===26){if(o===null){W=o=n;try{if(b=W.stateNode,y)w=b.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{L=W.stateNode;var dt=W.memoizedProps.style,rt=dt!=null&&dt.hasOwnProperty("display")?dt.display:null;L.style.display=rt==null||typeof rt=="boolean"?"":(""+rt).trim()}}catch(vt){de(W,W.return,vt)}}}else if(n.tag===6){if(o===null){W=n;try{W.stateNode.nodeValue=y?"":W.memoizedProps}catch(vt){de(W,W.return,vt)}}}else if(n.tag===18){if(o===null){W=n;try{var lt=W.stateNode;y?uC(lt,!0):uC(W.stateNode,!1)}catch(vt){de(W,W.return,vt)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===i)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===i)break t;for(;n.sibling===null;){if(n.return===null||n.return===i)break t;o===n&&(o=null),n=n.return}o===n&&(o=null),n.sibling.return=n.return,n=n.sibling}u&4&&(u=i.updateQueue,u!==null&&(o=u.retryQueue,o!==null&&(u.retryQueue=null,Eh(i,o))));break;case 19:Ai(n,i),Mi(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,Eh(i,u)));break;case 30:break;case 21:break;default:Ai(n,i),Mi(i)}}function Mi(i){var n=i.flags;if(n&2){try{for(var o,u=i.return;u!==null;){if(db(u)){o=u;break}u=u.return}if(o==null)throw Error(a(160));switch(o.tag){case 27:var y=o.stateNode,b=op(i);Bh(i,b,y);break;case 5:var w=o.stateNode;o.flags&32&&(Cs(w,""),o.flags&=-33);var L=op(i);Bh(i,L,w);break;case 3:case 4:var W=o.stateNode.containerInfo,it=op(i);cp(i,it,W);break;default:throw Error(a(161))}}catch(ot){de(i,i.return,ot)}i.flags&=-3}n&4096&&(i.flags&=-4097)}function vb(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var n=i;vb(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),i=i.sibling}}function fa(i,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)mb(i,n.alternate,n),n=n.sibling}function qn(i){for(i=i.child;i!==null;){var n=i;switch(n.tag){case 0:case 11:case 14:case 15:Za(4,n,n.return),qn(n);break;case 1:zr(n,n.return);var o=n.stateNode;typeof o.componentWillUnmount=="function"&&ub(n,n.return,o),qn(n);break;case 27:Mo(n.stateNode);case 26:case 5:zr(n,n.return),qn(n);break;case 22:n.memoizedState===null&&qn(n);break;case 30:qn(n);break;default:qn(n)}i=i.sibling}}function da(i,n,o){for(o=o&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var u=n.alternate,y=i,b=n,w=b.flags;switch(b.tag){case 0:case 11:case 15:da(y,b,o),ko(4,b);break;case 1:if(da(y,b,o),u=b,y=u.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(it){de(u,u.return,it)}if(u=b,y=u.updateQueue,y!==null){var L=u.stateNode;try{var W=y.shared.hiddenCallbacks;if(W!==null)for(y.shared.hiddenCallbacks=null,y=0;y<W.length;y++)J0(W[y],L)}catch(it){de(u,u.return,it)}}o&&w&64&&hb(b),vo(b,b.return);break;case 27:pb(b);case 26:case 5:da(y,b,o),o&&u===null&&w&4&&fb(b),vo(b,b.return);break;case 12:da(y,b,o);break;case 31:da(y,b,o),o&&w&4&&bb(y,b);break;case 13:da(y,b,o),o&&w&4&&Cb(y,b);break;case 22:b.memoizedState===null&&da(y,b,o),vo(b,b.return);break;case 30:break;default:da(y,b,o)}n=n.sibling}}function up(i,n){var o=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),i=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==o&&(i!=null&&i.refCount++,o!=null&&lo(o))}function fp(i,n){i=null,n.alternate!==null&&(i=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==i&&(n.refCount++,i!=null&&lo(i))}function yr(i,n,o,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Sb(i,n,o,u),n=n.sibling}function Sb(i,n,o,u){var y=n.flags;switch(n.tag){case 0:case 11:case 15:yr(i,n,o,u),y&2048&&ko(9,n);break;case 1:yr(i,n,o,u);break;case 3:yr(i,n,o,u),y&2048&&(i=null,n.alternate!==null&&(i=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==i&&(n.refCount++,i!=null&&lo(i)));break;case 12:if(y&2048){yr(i,n,o,u),i=n.stateNode;try{var b=n.memoizedProps,w=b.id,L=b.onPostCommit;typeof L=="function"&&L(w,n.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(W){de(n,n.return,W)}}else yr(i,n,o,u);break;case 31:yr(i,n,o,u);break;case 13:yr(i,n,o,u);break;case 23:break;case 22:b=n.stateNode,w=n.alternate,n.memoizedState!==null?b._visibility&2?yr(i,n,o,u):So(i,n):b._visibility&2?yr(i,n,o,u):(b._visibility|=2,Is(i,n,o,u,(n.subtreeFlags&10256)!==0||!1)),y&2048&&up(w,n);break;case 24:yr(i,n,o,u),y&2048&&fp(n.alternate,n);break;default:yr(i,n,o,u)}}function Is(i,n,o,u,y){for(y=y&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var b=i,w=n,L=o,W=u,it=w.flags;switch(w.tag){case 0:case 11:case 15:Is(b,w,L,W,y),ko(8,w);break;case 23:break;case 22:var ot=w.stateNode;w.memoizedState!==null?ot._visibility&2?Is(b,w,L,W,y):So(b,w):(ot._visibility|=2,Is(b,w,L,W,y)),y&&it&2048&&up(w.alternate,w);break;case 24:Is(b,w,L,W,y),y&&it&2048&&fp(w.alternate,w);break;default:Is(b,w,L,W,y)}n=n.sibling}}function So(i,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var o=i,u=n,y=u.flags;switch(u.tag){case 22:So(o,u),y&2048&&up(u.alternate,u);break;case 24:So(o,u),y&2048&&fp(u.alternate,u);break;default:So(o,u)}n=n.sibling}}var To=8192;function Hs(i,n,o){if(i.subtreeFlags&To)for(i=i.child;i!==null;)Tb(i,n,o),i=i.sibling}function Tb(i,n,o){switch(i.tag){case 26:Hs(i,n,o),i.flags&To&&i.memoizedState!==null&&UL(o,mr,i.memoizedState,i.memoizedProps);break;case 5:Hs(i,n,o);break;case 3:case 4:var u=mr;mr=Uh(i.stateNode.containerInfo),Hs(i,n,o),mr=u;break;case 22:i.memoizedState===null&&(u=i.alternate,u!==null&&u.memoizedState!==null?(u=To,To=16777216,Hs(i,n,o),To=u):Hs(i,n,o));break;default:Hs(i,n,o)}}function wb(i){var n=i.alternate;if(n!==null&&(i=n.child,i!==null)){n.child=null;do n=i.sibling,i.sibling=null,i=n;while(i!==null)}}function wo(i){var n=i.deletions;if((i.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var u=n[o];Ze=u,Bb(u,i)}wb(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)_b(i),i=i.sibling}function _b(i){switch(i.tag){case 0:case 11:case 15:wo(i),i.flags&2048&&Za(9,i,i.return);break;case 3:wo(i);break;case 12:wo(i);break;case 22:var n=i.stateNode;i.memoizedState!==null&&n._visibility&2&&(i.return===null||i.return.tag!==13)?(n._visibility&=-3,Lh(i)):wo(i);break;default:wo(i)}}function Lh(i){var n=i.deletions;if((i.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var u=n[o];Ze=u,Bb(u,i)}wb(i)}for(i=i.child;i!==null;){switch(n=i,n.tag){case 0:case 11:case 15:Za(8,n,n.return),Lh(n);break;case 22:o=n.stateNode,o._visibility&2&&(o._visibility&=-3,Lh(n));break;default:Lh(n)}i=i.sibling}}function Bb(i,n){for(;Ze!==null;){var o=Ze;switch(o.tag){case 0:case 11:case 15:Za(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:lo(o.memoizedState.cache)}if(u=o.child,u!==null)u.return=o,Ze=u;else t:for(o=i;Ze!==null;){u=Ze;var y=u.sibling,b=u.return;if(yb(u),u===o){Ze=null;break t}if(y!==null){y.return=b,Ze=y;break t}Ze=b}}}var rL={getCacheForType:function(i){var n=ei(qe),o=n.data.get(i);return o===void 0&&(o=i(),n.data.set(i,o)),o},cacheSignal:function(){return ei(qe).controller.signal}},aL=typeof WeakMap=="function"?WeakMap:Map,oe=0,ye=null,Yt=null,Xt=0,fe=0,Wi=null,Qa=!1,Us=!1,dp=!1,pa=0,Me=0,Ka=0,In=0,pp=0,Yi=0,js=0,_o=null,Ri=null,gp=!1,Ah=0,Eb=0,Mh=1/0,Rh=null,Ja=null,We=0,tn=null,Ps=null,ga=0,mp=0,yp=null,Lb=null,Bo=0,xp=null;function Gi(){return(oe&2)!==0&&Xt!==0?Xt&-Xt:A.T!==null?Tp():jc()}function Ab(){if(Yi===0)if((Xt&536870912)===0||Zt){var i=Fa;Fa<<=1,(Fa&3932160)===0&&(Fa=262144),Yi=i}else Yi=536870912;return i=ji.current,i!==null&&(i.flags|=32),Yi}function Fi(i,n,o){(i===ye&&(fe===2||fe===9)||i.cancelPendingCommit!==null)&&(Ws(i,0),en(i,Xt,Yi,!1)),xe(i,o),((oe&2)===0||i!==ye)&&(i===ye&&((oe&2)===0&&(In|=o),Me===4&&en(i,Xt,Yi,!1)),Nr(i))}function Mb(i,n,o){if((oe&6)!==0)throw Error(a(327));var u=!o&&(n&127)===0&&(n&i.expiredLanes)===0||Sn(i,n),y=u?lL(i,n):Cp(i,n,!0),b=u;do{if(y===0){Us&&!u&&en(i,n,0,!1);break}else{if(o=i.current.alternate,b&&!nL(o)){y=Cp(i,n,!1),b=!1;continue}if(y===2){if(b=n,i.errorRecoveryDisabledLanes&b)var w=0;else w=i.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){n=w;t:{var L=i;y=_o;var W=L.current.memoizedState.isDehydrated;if(W&&(Ws(L,w).flags|=256),w=Cp(L,w,!1),w!==2){if(dp&&!W){L.errorRecoveryDisabledLanes|=b,In|=b,y=4;break t}b=Ri,Ri=y,b!==null&&(Ri===null?Ri=b:Ri.push.apply(Ri,b))}y=w}if(b=!1,y!==2)continue}}if(y===1){Ws(i,0),en(i,n,0,!0);break}t:{switch(u=i,b=y,b){case 0:case 1:throw Error(a(345));case 4:if((n&4194048)!==n)break;case 6:en(u,n,Yi,!Qa);break t;case 2:Ri=null;break;case 3:case 5:break;default:throw Error(a(329))}if((n&62914560)===n&&(y=Ah+300-li(),10<y)){if(en(u,n,Yi,!Qa),Oa(u,0,!0)!==0)break t;ga=n,u.timeoutHandle=oC(Rb.bind(null,u,o,Ri,Rh,gp,n,Yi,In,js,Qa,b,"Throttled",-0,0),y);break t}Rb(u,o,Ri,Rh,gp,n,Yi,In,js,Qa,b,null,-0,0)}}break}while(!0);Nr(i)}function Rb(i,n,o,u,y,b,w,L,W,it,ot,dt,rt,lt){if(i.timeoutHandle=-1,dt=n.subtreeFlags,dt&8192||(dt&16785408)===16785408){dt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ta},Tb(n,b,dt);var vt=(b&62914560)===b?Ah-li():(b&4194048)===b?Eb-li():0;if(vt=jL(dt,vt),vt!==null){ga=b,i.cancelPendingCommit=vt(Ib.bind(null,i,n,b,o,u,y,w,L,W,ot,dt,null,rt,lt)),en(i,b,w,!it);return}}Ib(i,n,b,o,u,y,w,L,W)}function nL(i){for(var n=i;;){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 y=o[u],b=y.getSnapshot;y=y.value;try{if(!Hi(b(),y))return!1}catch{return!1}}if(o=n.child,n.subtreeFlags&16384&&o!==null)o.return=n,n=o;else{if(n===i)break;for(;n.sibling===null;){if(n.return===null||n.return===i)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function en(i,n,o,u){n&=~pp,n&=~In,i.suspendedLanes|=n,i.pingedLanes&=~n,u&&(i.warmLanes|=n),u=i.expirationTimes;for(var y=n;0<y;){var b=31-Ve(y),w=1<<b;u[b]=-1,y&=~w}o!==0&&Uc(i,o,n)}function Fh(){return(oe&6)===0?(Eo(0),!1):!0}function bp(){if(Yt!==null){if(fe===0)var i=Yt.return;else i=Yt,aa=Mn=null,Dd(i),Ds=null,co=0,i=Yt;for(;i!==null;)cb(i.alternate,i),i=i.return;Yt=null}}function Ws(i,n){var o=i.timeoutHandle;o!==-1&&(i.timeoutHandle=-1,wL(o)),o=i.cancelPendingCommit,o!==null&&(i.cancelPendingCommit=null,o()),ga=0,bp(),ye=i,Yt=o=ia(i.current,null),Xt=n,fe=0,Wi=null,Qa=!1,Us=Sn(i,n),dp=!1,js=Yi=pp=In=Ka=Me=0,Ri=_o=null,gp=!1,(n&8)!==0&&(n|=n&32);var u=i.entangledLanes;if(u!==0)for(i=i.entanglements,u&=n;0<u;){var y=31-Ve(u),b=1<<y;n|=i[y],u&=~b}return pa=n,th(),o}function Fb(i,n){Ut=null,A.H=xo,n===Os||n===oh?(n=V0(),fe=3):n===Sd?(n=V0(),fe=4):fe=n===Qd?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Wi=n,Yt===null&&(Me=1,vh(i,ir(n,i.current)))}function Ob(){var i=ji.current;return i===null?!0:(Xt&4194048)===Xt?sr===null:(Xt&62914560)===Xt||(Xt&536870912)!==0?i===sr:!1}function Db(){var i=A.H;return A.H=xo,i===null?xo:i}function $b(){var i=A.A;return A.A=rL,i}function Oh(){Me=4,Qa||(Xt&4194048)!==Xt&&ji.current!==null||(Us=!0),(Ka&134217727)===0&&(In&134217727)===0||ye===null||en(ye,Xt,Yi,!1)}function Cp(i,n,o){var u=oe;oe|=2;var y=Db(),b=$b();(ye!==i||Xt!==n)&&(Rh=null,Ws(i,n)),n=!1;var w=Me;t:do try{if(fe!==0&&Yt!==null){var L=Yt,W=Wi;switch(fe){case 8:bp(),w=6;break t;case 3:case 2:case 9:case 6:ji.current===null&&(n=!0);var it=fe;if(fe=0,Wi=null,Ys(i,L,W,it),o&&Us){w=0;break t}break;default:it=fe,fe=0,Wi=null,Ys(i,L,W,it)}}sL(),w=Me;break}catch(ot){Fb(i,ot)}while(!0);return n&&i.shellSuspendCounter++,aa=Mn=null,oe=u,A.H=y,A.A=b,Yt===null&&(ye=null,Xt=0,th()),w}function sL(){for(;Yt!==null;)zb(Yt)}function lL(i,n){var o=oe;oe|=2;var u=Db(),y=$b();ye!==i||Xt!==n?(Rh=null,Mh=li()+500,Ws(i,n)):Us=Sn(i,n);t:do try{if(fe!==0&&Yt!==null){n=Yt;var b=Wi;e:switch(fe){case 1:fe=0,Wi=null,Ys(i,n,b,1);break;case 2:case 9:if(G0(b)){fe=0,Wi=null,Nb(n);break}n=function(){fe!==2&&fe!==9||ye!==i||(fe=7),Nr(i)},b.then(n,n);break t;case 3:fe=7;break t;case 4:fe=5;break t;case 7:G0(b)?(fe=0,Wi=null,Nb(n)):(fe=0,Wi=null,Ys(i,n,b,7));break;case 5:var w=null;switch(Yt.tag){case 26:w=Yt.memoizedState;case 5:case 27:var L=Yt;if(w?SC(w):L.stateNode.complete){fe=0,Wi=null;var W=L.sibling;if(W!==null)Yt=W;else{var it=L.return;it!==null?(Yt=it,Dh(it)):Yt=null}break e}}fe=0,Wi=null,Ys(i,n,b,5);break;case 6:fe=0,Wi=null,Ys(i,n,b,6);break;case 8:bp(),Me=6;break t;default:throw Error(a(462))}}oL();break}catch(ot){Fb(i,ot)}while(!0);return aa=Mn=null,A.H=u,A.A=y,oe=o,Yt!==null?0:(ye=null,Xt=0,th(),Me)}function oL(){for(;Yt!==null&&!cs();)zb(Yt)}function zb(i){var n=lb(i.alternate,i,pa);i.memoizedProps=i.pendingProps,n===null?Dh(i):Yt=n}function Nb(i){var n=i,o=n.alternate;switch(n.tag){case 15:case 0:n=eb(o,n,n.pendingProps,n.type,void 0,Xt);break;case 11:n=eb(o,n,n.pendingProps,n.type.render,n.ref,Xt);break;case 5:Dd(n);default:cb(o,n),n=Yt=$0(n,pa),n=lb(o,n,pa)}i.memoizedProps=i.pendingProps,n===null?Dh(i):Yt=n}function Ys(i,n,o,u){aa=Mn=null,Dd(n),Ds=null,co=0;var y=n.return;try{if(ZE(i,y,n,o,Xt)){Me=1,vh(i,ir(o,i.current)),Yt=null;return}}catch(b){if(y!==null)throw Yt=y,b;Me=1,vh(i,ir(o,i.current)),Yt=null;return}n.flags&32768?(Zt||u===1?i=!0:Us||(Xt&536870912)!==0?i=!1:(Qa=i=!0,(u===2||u===9||u===3||u===6)&&(u=ji.current,u!==null&&u.tag===13&&(u.flags|=16384))),qb(n,i)):Dh(n)}function Dh(i){var n=i;do{if((n.flags&32768)!==0){qb(n,Qa);return}i=n.return;var o=JE(n.alternate,n,pa);if(o!==null){Yt=o;return}if(n=n.sibling,n!==null){Yt=n;return}Yt=n=i}while(n!==null);Me===0&&(Me=5)}function qb(i,n){do{var o=tL(i.alternate,i);if(o!==null){o.flags&=32767,Yt=o;return}if(o=i.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!n&&(i=i.sibling,i!==null)){Yt=i;return}Yt=i=o}while(i!==null);Me=6,Yt=null}function Ib(i,n,o,u,y,b,w,L,W){i.cancelPendingCommit=null;do $h();while(We!==0);if((oe&6)!==0)throw Error(a(327));if(n!==null){if(n===i.current)throw Error(a(177));if(b=n.lanes|n.childLanes,b|=od,Da(i,o,b,w,L,W),i===ye&&(Yt=ye=null,Xt=0),Ps=n,tn=i,ga=o,mp=b,yp=y,Lb=u,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,fL(Fr,function(){return Wb(),null})):(i.callbackNode=null,i.callbackPriority=0),u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=A.T,A.T=null,y=z.p,z.p=2,w=oe,oe|=4;try{eL(i,n,o)}finally{oe=w,z.p=y,A.T=u}}We=1,Hb(),Ub(),jb()}}function Hb(){if(We===1){We=0;var i=tn,n=Ps,o=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||o){o=A.T,A.T=null;var u=z.p;z.p=2;var y=oe;oe|=4;try{kb(n,i);var b=Rp,w=B0(i.containerInfo),L=b.focusedElem,W=b.selectionRange;if(w!==L&&L&&L.ownerDocument&&_0(L.ownerDocument.documentElement,L)){if(W!==null&&rd(L)){var it=W.start,ot=W.end;if(ot===void 0&&(ot=it),"selectionStart"in L)L.selectionStart=it,L.selectionEnd=Math.min(ot,L.value.length);else{var dt=L.ownerDocument||document,rt=dt&&dt.defaultView||window;if(rt.getSelection){var lt=rt.getSelection(),vt=L.textContent.length,Ot=Math.min(W.start,vt),me=W.end===void 0?Ot:Math.min(W.end,vt);!lt.extend&&Ot>me&&(w=me,me=Ot,Ot=w);var K=w0(L,Ot),G=w0(L,me);if(K&&G&&(lt.rangeCount!==1||lt.anchorNode!==K.node||lt.anchorOffset!==K.offset||lt.focusNode!==G.node||lt.focusOffset!==G.offset)){var et=dt.createRange();et.setStart(K.node,K.offset),lt.removeAllRanges(),Ot>me?(lt.addRange(et),lt.extend(G.node,G.offset)):(et.setEnd(G.node,G.offset),lt.addRange(et))}}}}for(dt=[],lt=L;lt=lt.parentNode;)lt.nodeType===1&&dt.push({element:lt,left:lt.scrollLeft,top:lt.scrollTop});for(typeof L.focus=="function"&&L.focus(),L=0;L<dt.length;L++){var ft=dt[L];ft.element.scrollLeft=ft.left,ft.element.scrollTop=ft.top}}Xh=!!Mp,Rp=Mp=null}finally{oe=y,z.p=u,A.T=o}}i.current=n,We=2}}function Ub(){if(We===2){We=0;var i=tn,n=Ps,o=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||o){o=A.T,A.T=null;var u=z.p;z.p=2;var y=oe;oe|=4;try{mb(i,n.alternate,n)}finally{oe=y,z.p=u,A.T=o}}We=3}}function jb(){if(We===4||We===3){We=0,hs();var i=tn,n=Ps,o=ga,u=Lb;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?We=5:(We=0,Ps=tn=null,Pb(i,i.pendingLanes));var y=i.pendingLanes;if(y===0&&(Ja=null),ms(o),n=n.stateNode,Ke&&typeof Ke.onCommitFiberRoot=="function")try{Ke.onCommitFiberRoot(Aa,n,void 0,(n.current.flags&128)===128)}catch{}if(u!==null){n=A.T,y=z.p,z.p=2,A.T=null;try{for(var b=i.onRecoverableError,w=0;w<u.length;w++){var L=u[w];b(L.value,{componentStack:L.stack})}}finally{A.T=n,z.p=y}}(ga&3)!==0&&$h(),Nr(i),y=i.pendingLanes,(o&261930)!==0&&(y&42)!==0?i===xp?Bo++:(Bo=0,xp=i):Bo=0,Eo(0)}}function Pb(i,n){(i.pooledCacheLanes&=n)===0&&(n=i.pooledCache,n!=null&&(i.pooledCache=null,lo(n)))}function $h(){return Hb(),Ub(),jb(),Wb()}function Wb(){if(We!==5)return!1;var i=tn,n=mp;mp=0;var o=ms(ga),u=A.T,y=z.p;try{z.p=32>o?32:o,A.T=null,o=yp,yp=null;var b=tn,w=ga;if(We=0,Ps=tn=null,ga=0,(oe&6)!==0)throw Error(a(331));var L=oe;if(oe|=4,_b(b.current),Sb(b,b.current,w,o),oe=L,Eo(0,!1),Ke&&typeof Ke.onPostCommitFiberRoot=="function")try{Ke.onPostCommitFiberRoot(Aa,b)}catch{}return!0}finally{z.p=y,A.T=u,Pb(i,n)}}function Yb(i,n,o){n=ir(o,n),n=Zd(i.stateNode,n,2),i=Ga(i,n,2),i!==null&&(xe(i,2),Nr(i))}function de(i,n,o){if(i.tag===3)Yb(i,i,o);else for(;n!==null;){if(n.tag===3){Yb(n,i,o);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Ja===null||!Ja.has(u))){i=ir(o,i),o=Gx(2),u=Ga(n,o,2),u!==null&&(Xx(o,u,n,i),xe(u,2),Nr(u));break}}n=n.return}}function kp(i,n,o){var u=i.pingCache;if(u===null){u=i.pingCache=new aL;var y=new Set;u.set(n,y)}else y=u.get(n),y===void 0&&(y=new Set,u.set(n,y));y.has(o)||(dp=!0,y.add(o),i=cL.bind(null,i,n,o),n.then(i,i))}function cL(i,n,o){var u=i.pingCache;u!==null&&u.delete(n),i.pingedLanes|=i.suspendedLanes&o,i.warmLanes&=~o,ye===i&&(Xt&o)===o&&(Me===4||Me===3&&(Xt&62914560)===Xt&&300>li()-Ah?(oe&2)===0&&Ws(i,0):pp|=o,js===Xt&&(js=0)),Nr(i)}function Gb(i,n){n===0&&(n=Hc()),i=En(i,n),i!==null&&(xe(i,n),Nr(i))}function hL(i){var n=i.memoizedState,o=0;n!==null&&(o=n.retryLane),Gb(i,o)}function uL(i,n){var o=0;switch(i.tag){case 31:case 13:var u=i.stateNode,y=i.memoizedState;y!==null&&(o=y.retryLane);break;case 19:u=i.stateNode;break;case 22:u=i.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(n),Gb(i,o)}function fL(i,n){return Qr(i,n)}var zh=null,Gs=null,vp=!1,Nh=!1,Sp=!1,rn=0;function Nr(i){i!==Gs&&i.next===null&&(Gs===null?zh=Gs=i:Gs=Gs.next=i),Nh=!0,vp||(vp=!0,pL())}function Eo(i,n){if(!Sp&&Nh){Sp=!0;do for(var o=!1,u=zh;u!==null;){if(i!==0){var y=u.pendingLanes;if(y===0)var b=0;else{var w=u.suspendedLanes,L=u.pingedLanes;b=(1<<31-Ve(42|i)+1)-1,b&=y&~(w&~L),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(o=!0,Qb(u,b))}else b=Xt,b=Oa(u,u===ye?b:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(b&3)===0||Sn(u,b)||(o=!0,Qb(u,b));u=u.next}while(o);Sp=!1}}function dL(){Xb()}function Xb(){Nh=vp=!1;var i=0;rn!==0&&TL()&&(i=rn);for(var n=li(),o=null,u=zh;u!==null;){var y=u.next,b=Vb(u,n);b===0?(u.next=null,o===null?zh=y:o.next=y,y===null&&(Gs=o)):(o=u,(i!==0||(b&3)!==0)&&(Nh=!0)),u=y}We!==0&&We!==5||Eo(i),rn!==0&&(rn=0)}function Vb(i,n){for(var o=i.suspendedLanes,u=i.pingedLanes,y=i.expirationTimes,b=i.pendingLanes&-62914561;0<b;){var w=31-Ve(b),L=1<<w,W=y[w];W===-1?((L&o)===0||(L&u)!==0)&&(y[w]=Tn(L,n)):W<=n&&(i.expiredLanes|=L),b&=~L}if(n=ye,o=Xt,o=Oa(i,i===n?o:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u=i.callbackNode,o===0||i===n&&(fe===2||fe===9)||i.cancelPendingCommit!==null)return u!==null&&u!==null&&yi(u),i.callbackNode=null,i.callbackPriority=0;if((o&3)===0||Sn(i,o)){if(n=o&-o,n===i.callbackPriority)return n;switch(u!==null&&yi(u),ms(o)){case 2:case 8:o=us;break;case 32:o=Fr;break;case 268435456:o=qi;break;default:o=Fr}return u=Zb.bind(null,i),o=Qr(o,u),i.callbackPriority=n,i.callbackNode=o,n}return u!==null&&u!==null&&yi(u),i.callbackPriority=2,i.callbackNode=null,2}function Zb(i,n){if(We!==0&&We!==5)return i.callbackNode=null,i.callbackPriority=0,null;var o=i.callbackNode;if($h()&&i.callbackNode!==o)return null;var u=Xt;return u=Oa(i,i===ye?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u===0?null:(Mb(i,u,n),Vb(i,li()),i.callbackNode!=null&&i.callbackNode===o?Zb.bind(null,i):null)}function Qb(i,n){if($h())return null;Mb(i,n,!0)}function pL(){_L(function(){(oe&6)!==0?Qr(Pl,dL):Xb()})}function Tp(){if(rn===0){var i=Rs;i===0&&(i=Ra,Ra<<=1,(Ra&261888)===0&&(Ra=256)),rn=i}return rn}function Kb(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Yc(""+i)}function Jb(i,n){var o=n.ownerDocument.createElement("input");return o.name=n.name,o.value=n.value,i.id&&o.setAttribute("form",i.id),n.parentNode.insertBefore(o,n),i=new FormData(i),o.parentNode.removeChild(o),i}function gL(i,n,o,u,y){if(n==="submit"&&o&&o.stateNode===y){var b=Kb((y[Je]||null).action),w=u.submitter;w&&(n=(n=w[Je]||null)?Kb(n.formAction):w.getAttribute("formAction"),n!==null&&(b=n,w=null));var L=new Zc("action","action",null,u,y);i.push({event:L,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(rn!==0){var W=w?Jb(y,w):new FormData(y);Pd(o,{pending:!0,data:W,method:y.method,action:b},null,W)}}else typeof b=="function"&&(L.preventDefault(),W=w?Jb(y,w):new FormData(y),Pd(o,{pending:!0,data:W,method:y.method,action:b},b,W))},currentTarget:y}]})}}for(var wp=0;wp<ld.length;wp++){var _p=ld[wp],mL=_p.toLowerCase(),yL=_p[0].toUpperCase()+_p.slice(1);gr(mL,"on"+yL)}gr(A0,"onAnimationEnd"),gr(M0,"onAnimationIteration"),gr(R0,"onAnimationStart"),gr("dblclick","onDoubleClick"),gr("focusin","onFocus"),gr("focusout","onBlur"),gr(FE,"onTransitionRun"),gr(OE,"onTransitionStart"),gr(DE,"onTransitionCancel"),gr(F0,"onTransitionEnd"),bt("onMouseEnter",["mouseout","mouseover"]),bt("onMouseLeave",["mouseout","mouseover"]),bt("onPointerEnter",["pointerout","pointerover"]),bt("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 Lo="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(" "),xL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Lo));function tC(i,n){n=(n&4)!==0;for(var o=0;o<i.length;o++){var u=i[o],y=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],W=L.instance,it=L.currentTarget;if(L=L.listener,W!==b&&y.isPropagationStopped())break t;b=L,y.currentTarget=it;try{b(y)}catch(ot){Jc(ot)}y.currentTarget=null,b=W}else for(w=0;w<u.length;w++){if(L=u[w],W=L.instance,it=L.currentTarget,L=L.listener,W!==b&&y.isPropagationStopped())break t;b=L,y.currentTarget=it;try{b(y)}catch(ot){Jc(ot)}y.currentTarget=null,b=W}}}}function Gt(i,n){var o=n[$a];o===void 0&&(o=n[$a]=new Set);var u=i+"__bubble";o.has(u)||(eC(n,i,2,!1),o.add(u))}function Bp(i,n,o){var u=0;n&&(u|=4),eC(o,i,u,n)}var qh="_reactListening"+Math.random().toString(36).slice(2);function Ep(i){if(!i[qh]){i[qh]=!0,wt.forEach(function(o){o!=="selectionchange"&&(xL.has(o)||Bp(o,!1,i),Bp(o,!0,i))});var n=i.nodeType===9?i:i.ownerDocument;n===null||n[qh]||(n[qh]=!0,Bp("selectionchange",!1,n))}}function eC(i,n,o,u){switch(AC(n)){case 2:var y=YL;break;case 8:y=GL;break;default:y=jp}o=y.bind(null,n,o,i),y=void 0,!Xf||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(y=!0),u?y!==void 0?i.addEventListener(n,o,{capture:!0,passive:y}):i.addEventListener(n,o,!0):y!==void 0?i.addEventListener(n,o,{passive:y}):i.addEventListener(n,o,!1)}function Lp(i,n,o,u,y){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===y)break;if(w===4)for(w=u.return;w!==null;){var W=w.tag;if((W===3||W===4)&&w.stateNode.containerInfo===y)return;w=w.return}for(;L!==null;){if(w=Na(L),w===null)return;if(W=w.tag,W===5||W===6||W===26||W===27){u=b=w;continue t}L=L.parentNode}}u=u.return}s0(function(){var it=b,ot=Yf(o),dt=[];t:{var rt=O0.get(i);if(rt!==void 0){var lt=Zc,vt=i;switch(i){case"keypress":if(Xc(o)===0)break t;case"keydown":case"keyup":lt=uE;break;case"focusin":vt="focus",lt=Kf;break;case"focusout":vt="blur",lt=Kf;break;case"beforeblur":case"afterblur":lt=Kf;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":lt=c0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":lt=JB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":lt=pE;break;case A0:case M0:case R0:lt=iE;break;case F0:lt=mE;break;case"scroll":case"scrollend":lt=QB;break;case"wheel":lt=xE;break;case"copy":case"cut":case"paste":lt=aE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":lt=u0;break;case"toggle":case"beforetoggle":lt=CE}var Ot=(n&4)!==0,me=!Ot&&(i==="scroll"||i==="scrollend"),K=Ot?rt!==null?rt+"Capture":null:rt;Ot=[];for(var G=it,et;G!==null;){var ft=G;if(et=ft.stateNode,ft=ft.tag,ft!==5&&ft!==26&&ft!==27||et===null||K===null||(ft=Zl(G,K),ft!=null&&Ot.push(Ao(G,ft,et))),me)break;G=G.return}0<Ot.length&&(rt=new lt(rt,vt,null,o,ot),dt.push({event:rt,listeners:Ot}))}}if((n&7)===0){t:{if(rt=i==="mouseover"||i==="pointerover",lt=i==="mouseout"||i==="pointerout",rt&&o!==Wf&&(vt=o.relatedTarget||o.fromElement)&&(Na(vt)||vt[Kr]))break t;if((lt||rt)&&(rt=ot.window===ot?ot:(rt=ot.ownerDocument)?rt.defaultView||rt.parentWindow:window,lt?(vt=o.relatedTarget||o.toElement,lt=it,vt=vt?Na(vt):null,vt!==null&&(me=l(vt),Ot=vt.tag,vt!==me||Ot!==5&&Ot!==27&&Ot!==6)&&(vt=null)):(lt=null,vt=it),lt!==vt)){if(Ot=c0,ft="onMouseLeave",K="onMouseEnter",G="mouse",(i==="pointerout"||i==="pointerover")&&(Ot=u0,ft="onPointerLeave",K="onPointerEnter",G="pointer"),me=lt==null?rt:qa(lt),et=vt==null?rt:qa(vt),rt=new Ot(ft,G+"leave",lt,o,ot),rt.target=me,rt.relatedTarget=et,ft=null,Na(ot)===it&&(Ot=new Ot(K,G+"enter",vt,o,ot),Ot.target=et,Ot.relatedTarget=me,ft=Ot),me=ft,lt&&vt)e:{for(Ot=bL,K=lt,G=vt,et=0,ft=K;ft;ft=Ot(ft))et++;ft=0;for(var Mt=G;Mt;Mt=Ot(Mt))ft++;for(;0<et-ft;)K=Ot(K),et--;for(;0<ft-et;)G=Ot(G),ft--;for(;et--;){if(K===G||G!==null&&K===G.alternate){Ot=K;break e}K=Ot(K),G=Ot(G)}Ot=null}else Ot=null;lt!==null&&iC(dt,rt,lt,Ot,!1),vt!==null&&me!==null&&iC(dt,me,vt,Ot,!0)}}t:{if(rt=it?qa(it):window,lt=rt.nodeName&&rt.nodeName.toLowerCase(),lt==="select"||lt==="input"&&rt.type==="file")var ee=b0;else if(y0(rt))if(C0)ee=AE;else{ee=EE;var Bt=BE}else lt=rt.nodeName,!lt||lt.toLowerCase()!=="input"||rt.type!=="checkbox"&&rt.type!=="radio"?it&&Pf(it.elementType)&&(ee=b0):ee=LE;if(ee&&(ee=ee(i,it))){x0(dt,ee,o,ot);break t}Bt&&Bt(i,rt,it),i==="focusout"&&it&&rt.type==="number"&&it.memoizedProps.value!=null&&jf(rt,"number",rt.value)}switch(Bt=it?qa(it):window,i){case"focusin":(y0(Bt)||Bt.contentEditable==="true")&&(Ts=Bt,ad=it,ao=null);break;case"focusout":ao=ad=Ts=null;break;case"mousedown":nd=!0;break;case"contextmenu":case"mouseup":case"dragend":nd=!1,E0(dt,o,ot);break;case"selectionchange":if(RE)break;case"keydown":case"keyup":E0(dt,o,ot)}var jt;if(td)t:{switch(i){case"compositionstart":var Vt="onCompositionStart";break t;case"compositionend":Vt="onCompositionEnd";break t;case"compositionupdate":Vt="onCompositionUpdate";break t}Vt=void 0}else Ss?g0(i,o)&&(Vt="onCompositionEnd"):i==="keydown"&&o.keyCode===229&&(Vt="onCompositionStart");Vt&&(f0&&o.locale!=="ko"&&(Ss||Vt!=="onCompositionStart"?Vt==="onCompositionEnd"&&Ss&&(jt=l0()):(Ia=ot,Vf="value"in Ia?Ia.value:Ia.textContent,Ss=!0)),Bt=Ih(it,Vt),0<Bt.length&&(Vt=new h0(Vt,i,null,o,ot),dt.push({event:Vt,listeners:Bt}),jt?Vt.data=jt:(jt=m0(o),jt!==null&&(Vt.data=jt)))),(jt=vE?SE(i,o):TE(i,o))&&(Vt=Ih(it,"onBeforeInput"),0<Vt.length&&(Bt=new h0("onBeforeInput","beforeinput",null,o,ot),dt.push({event:Bt,listeners:Vt}),Bt.data=jt)),gL(dt,i,it,o,ot)}tC(dt,n)})}function Ao(i,n,o){return{instance:i,listener:n,currentTarget:o}}function Ih(i,n){for(var o=n+"Capture",u=[];i!==null;){var y=i,b=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||b===null||(y=Zl(i,o),y!=null&&u.unshift(Ao(i,y,b)),y=Zl(i,n),y!=null&&u.push(Ao(i,y,b))),i.tag===3)return u;i=i.return}return[]}function bL(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function iC(i,n,o,u,y){for(var b=n._reactName,w=[];o!==null&&o!==u;){var L=o,W=L.alternate,it=L.stateNode;if(L=L.tag,W!==null&&W===u)break;L!==5&&L!==26&&L!==27||it===null||(W=it,y?(it=Zl(o,b),it!=null&&w.unshift(Ao(o,it,W))):y||(it=Zl(o,b),it!=null&&w.push(Ao(o,it,W)))),o=o.return}w.length!==0&&i.push({event:n,listeners:w})}var CL=/\r\n?/g,kL=/\u0000|\uFFFD/g;function rC(i){return(typeof i=="string"?i:""+i).replace(CL,`
50
+ `).replace(kL,"")}function aC(i,n){return n=rC(n),rC(i)===n}function ge(i,n,o,u,y,b){switch(o){case"children":typeof u=="string"?n==="body"||n==="textarea"&&u===""||Cs(i,u):(typeof u=="number"||typeof u=="bigint")&&n!=="body"&&Cs(i,""+u);break;case"className":ci(i,"class",u);break;case"tabIndex":ci(i,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":ci(i,o,u);break;case"style":a0(i,u,b);break;case"data":if(n!=="object"){ci(i,"data",u);break}case"src":case"href":if(u===""&&(n!=="a"||o!=="href")){i.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){i.removeAttribute(o);break}u=Yc(""+u),i.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){i.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"&&ge(i,n,"name",y.name,y,null),ge(i,n,"formEncType",y.formEncType,y,null),ge(i,n,"formMethod",y.formMethod,y,null),ge(i,n,"formTarget",y.formTarget,y,null)):(ge(i,n,"encType",y.encType,y,null),ge(i,n,"method",y.method,y,null),ge(i,n,"target",y.target,y,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){i.removeAttribute(o);break}u=Yc(""+u),i.setAttribute(o,u);break;case"onClick":u!=null&&(i.onclick=ta);break;case"onScroll":u!=null&&Gt("scroll",i);break;case"onScrollEnd":u!=null&&Gt("scrollend",i);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(o=u.__html,o!=null){if(y.children!=null)throw Error(a(60));i.innerHTML=o}}break;case"multiple":i.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":i.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"){i.removeAttribute("xlink:href");break}o=Yc(""+u),i.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"?i.setAttribute(o,""+u):i.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"?i.setAttribute(o,""):i.removeAttribute(o);break;case"capture":case"download":u===!0?i.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?i.setAttribute(o,u):i.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?i.setAttribute(o,u):i.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?i.removeAttribute(o):i.setAttribute(o,u);break;case"popover":Gt("beforetoggle",i),Gt("toggle",i),xi(i,"popover",u);break;case"xlinkActuate":Ii(i,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Ii(i,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Ii(i,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Ii(i,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Ii(i,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Ii(i,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Ii(i,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Ii(i,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Ii(i,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":xi(i,"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=VB.get(o)||o,xi(i,o,u))}}function Ap(i,n,o,u,y,b){switch(o){case"style":a0(i,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(y.children!=null)throw Error(a(60));i.innerHTML=o}}break;case"children":typeof u=="string"?Cs(i,u):(typeof u=="number"||typeof u=="bigint")&&Cs(i,""+u);break;case"onScroll":u!=null&&Gt("scroll",i);break;case"onScrollEnd":u!=null&&Gt("scrollend",i);break;case"onClick":u!=null&&(i.onclick=ta);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!q.hasOwnProperty(o))t:{if(o[0]==="o"&&o[1]==="n"&&(y=o.endsWith("Capture"),n=o.slice(2,y?o.length-7:void 0),b=i[Je]||null,b=b!=null?b[o]:null,typeof b=="function"&&i.removeEventListener(n,b,y),typeof u=="function")){typeof b!="function"&&b!==null&&(o in i?i[o]=null:i.hasAttribute(o)&&i.removeAttribute(o)),i.addEventListener(n,u,y);break t}o in i?i[o]=u:u===!0?i.setAttribute(o,""):xi(i,o,u)}}}function ri(i,n,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Gt("error",i),Gt("load",i);var u=!1,y=!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":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:ge(i,n,b,w,o,null)}}y&&ge(i,n,"srcSet",o.srcSet,o,null),u&&ge(i,n,"src",o.src,o,null);return;case"input":Gt("invalid",i);var L=b=w=y=null,W=null,it=null;for(u in o)if(o.hasOwnProperty(u)){var ot=o[u];if(ot!=null)switch(u){case"name":y=ot;break;case"type":w=ot;break;case"checked":W=ot;break;case"defaultChecked":it=ot;break;case"value":b=ot;break;case"defaultValue":L=ot;break;case"children":case"dangerouslySetInnerHTML":if(ot!=null)throw Error(a(137,n));break;default:ge(i,n,u,ot,o,null)}}t0(i,b,L,W,it,w,y,!1);return;case"select":Gt("invalid",i),u=w=b=null;for(y in o)if(o.hasOwnProperty(y)&&(L=o[y],L!=null))switch(y){case"value":b=L;break;case"defaultValue":w=L;break;case"multiple":u=L;default:ge(i,n,y,L,o,null)}n=b,o=w,i.multiple=!!u,n!=null?bs(i,!!u,n,!1):o!=null&&bs(i,!!u,o,!0);return;case"textarea":Gt("invalid",i),b=y=u=null;for(w in o)if(o.hasOwnProperty(w)&&(L=o[w],L!=null))switch(w){case"value":u=L;break;case"defaultValue":y=L;break;case"children":b=L;break;case"dangerouslySetInnerHTML":if(L!=null)throw Error(a(91));break;default:ge(i,n,w,L,o,null)}i0(i,u,y,b);return;case"option":for(W in o)if(o.hasOwnProperty(W)&&(u=o[W],u!=null))switch(W){case"selected":i.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:ge(i,n,W,u,o,null)}return;case"dialog":Gt("beforetoggle",i),Gt("toggle",i),Gt("cancel",i),Gt("close",i);break;case"iframe":case"object":Gt("load",i);break;case"video":case"audio":for(u=0;u<Lo.length;u++)Gt(Lo[u],i);break;case"image":Gt("error",i),Gt("load",i);break;case"details":Gt("toggle",i);break;case"embed":case"source":case"link":Gt("error",i),Gt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(it in o)if(o.hasOwnProperty(it)&&(u=o[it],u!=null))switch(it){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:ge(i,n,it,u,o,null)}return;default:if(Pf(n)){for(ot in o)o.hasOwnProperty(ot)&&(u=o[ot],u!==void 0&&Ap(i,n,ot,u,o,void 0));return}}for(L in o)o.hasOwnProperty(L)&&(u=o[L],u!=null&&ge(i,n,L,u,o,null))}function vL(i,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 y=null,b=null,w=null,L=null,W=null,it=null,ot=null;for(lt in o){var dt=o[lt];if(o.hasOwnProperty(lt)&&dt!=null)switch(lt){case"checked":break;case"value":break;case"defaultValue":W=dt;default:u.hasOwnProperty(lt)||ge(i,n,lt,null,u,dt)}}for(var rt in u){var lt=u[rt];if(dt=o[rt],u.hasOwnProperty(rt)&&(lt!=null||dt!=null))switch(rt){case"type":b=lt;break;case"name":y=lt;break;case"checked":it=lt;break;case"defaultChecked":ot=lt;break;case"value":w=lt;break;case"defaultValue":L=lt;break;case"children":case"dangerouslySetInnerHTML":if(lt!=null)throw Error(a(137,n));break;default:lt!==dt&&ge(i,n,rt,lt,u,dt)}}Uf(i,w,L,W,it,ot,b,y);return;case"select":lt=w=L=rt=null;for(b in o)if(W=o[b],o.hasOwnProperty(b)&&W!=null)switch(b){case"value":break;case"multiple":lt=W;default:u.hasOwnProperty(b)||ge(i,n,b,null,u,W)}for(y in u)if(b=u[y],W=o[y],u.hasOwnProperty(y)&&(b!=null||W!=null))switch(y){case"value":rt=b;break;case"defaultValue":L=b;break;case"multiple":w=b;default:b!==W&&ge(i,n,y,b,u,W)}n=L,o=w,u=lt,rt!=null?bs(i,!!o,rt,!1):!!u!=!!o&&(n!=null?bs(i,!!o,n,!0):bs(i,!!o,o?[]:"",!1));return;case"textarea":lt=rt=null;for(L in o)if(y=o[L],o.hasOwnProperty(L)&&y!=null&&!u.hasOwnProperty(L))switch(L){case"value":break;case"children":break;default:ge(i,n,L,null,u,y)}for(w in u)if(y=u[w],b=o[w],u.hasOwnProperty(w)&&(y!=null||b!=null))switch(w){case"value":rt=y;break;case"defaultValue":lt=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(a(91));break;default:y!==b&&ge(i,n,w,y,u,b)}e0(i,rt,lt);return;case"option":for(var vt in o)if(rt=o[vt],o.hasOwnProperty(vt)&&rt!=null&&!u.hasOwnProperty(vt))switch(vt){case"selected":i.selected=!1;break;default:ge(i,n,vt,null,u,rt)}for(W in u)if(rt=u[W],lt=o[W],u.hasOwnProperty(W)&&rt!==lt&&(rt!=null||lt!=null))switch(W){case"selected":i.selected=rt&&typeof rt!="function"&&typeof rt!="symbol";break;default:ge(i,n,W,rt,u,lt)}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 Ot in o)rt=o[Ot],o.hasOwnProperty(Ot)&&rt!=null&&!u.hasOwnProperty(Ot)&&ge(i,n,Ot,null,u,rt);for(it in u)if(rt=u[it],lt=o[it],u.hasOwnProperty(it)&&rt!==lt&&(rt!=null||lt!=null))switch(it){case"children":case"dangerouslySetInnerHTML":if(rt!=null)throw Error(a(137,n));break;default:ge(i,n,it,rt,u,lt)}return;default:if(Pf(n)){for(var me in o)rt=o[me],o.hasOwnProperty(me)&&rt!==void 0&&!u.hasOwnProperty(me)&&Ap(i,n,me,void 0,u,rt);for(ot in u)rt=u[ot],lt=o[ot],!u.hasOwnProperty(ot)||rt===lt||rt===void 0&&lt===void 0||Ap(i,n,ot,rt,u,lt);return}}for(var K in o)rt=o[K],o.hasOwnProperty(K)&&rt!=null&&!u.hasOwnProperty(K)&&ge(i,n,K,null,u,rt);for(dt in u)rt=u[dt],lt=o[dt],!u.hasOwnProperty(dt)||rt===lt||rt==null&&lt==null||ge(i,n,dt,rt,u,lt)}function nC(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function SL(){if(typeof performance.getEntriesByType=="function"){for(var i=0,n=0,o=performance.getEntriesByType("resource"),u=0;u<o.length;u++){var y=o[u],b=y.transferSize,w=y.initiatorType,L=y.duration;if(b&&L&&nC(w)){for(w=0,L=y.responseEnd,u+=1;u<o.length;u++){var W=o[u],it=W.startTime;if(it>L)break;var ot=W.transferSize,dt=W.initiatorType;ot&&nC(dt)&&(W=W.responseEnd,w+=ot*(W<L?1:(L-it)/(W-it)))}if(--u,n+=8*(b+w)/(y.duration/1e3),i++,10<i)break}}if(0<i)return n/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var Mp=null,Rp=null;function Hh(i){return i.nodeType===9?i:i.ownerDocument}function sC(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function lC(i,n){if(i===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&n==="foreignObject"?0:i}function Fp(i,n){return i==="textarea"||i==="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 Op=null;function TL(){var i=window.event;return i&&i.type==="popstate"?i===Op?!1:(Op=i,!0):(Op=null,!1)}var oC=typeof setTimeout=="function"?setTimeout:void 0,wL=typeof clearTimeout=="function"?clearTimeout:void 0,cC=typeof Promise=="function"?Promise:void 0,_L=typeof queueMicrotask=="function"?queueMicrotask:typeof cC<"u"?function(i){return cC.resolve(null).then(i).catch(BL)}:oC;function BL(i){setTimeout(function(){throw i})}function an(i){return i==="head"}function hC(i,n){var o=n,u=0;do{var y=o.nextSibling;if(i.removeChild(o),y&&y.nodeType===8)if(o=y.data,o==="/$"||o==="/&"){if(u===0){i.removeChild(y),Qs(n);return}u--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")u++;else if(o==="html")Mo(i.ownerDocument.documentElement);else if(o==="head"){o=i.ownerDocument.head,Mo(o);for(var b=o.firstChild;b;){var w=b.nextSibling,L=b.nodeName;b[za]||L==="SCRIPT"||L==="STYLE"||L==="LINK"&&b.rel.toLowerCase()==="stylesheet"||o.removeChild(b),b=w}}else o==="body"&&Mo(i.ownerDocument.body);o=y}while(o);Qs(n)}function uC(i,n){var o=i;i=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(i===0)break;i--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||i++;o=u}while(o)}function Dp(i){var n=i.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":Dp(o),xs(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}i.removeChild(o)}}function EL(i,n,o,u){for(;i.nodeType===1;){var y=o;if(i.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(u){if(!i[za])switch(n){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(b=i.getAttribute("rel"),b==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(b!==y.rel||i.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||i.getAttribute("title")!==(y.title==null?null:y.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(b=i.getAttribute("src"),(b!==(y.src==null?null:y.src)||i.getAttribute("type")!==(y.type==null?null:y.type)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&b&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(n==="input"&&i.type==="hidden"){var b=y.name==null?null:""+y.name;if(y.type==="hidden"&&i.getAttribute("name")===b)return i}else return i;if(i=lr(i.nextSibling),i===null)break}return null}function LL(i,n,o){if(n==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=lr(i.nextSibling),i===null))return null;return i}function fC(i,n){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!n||(i=lr(i.nextSibling),i===null))return null;return i}function $p(i){return i.data==="$?"||i.data==="$~"}function zp(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function AL(i,n){var o=i.ownerDocument;if(i.data==="$~")i._reactRetry=n;else if(i.data!=="$?"||o.readyState!=="loading")n();else{var u=function(){n(),o.removeEventListener("DOMContentLoaded",u)};o.addEventListener("DOMContentLoaded",u),i._reactRetry=u}}function lr(i){for(;i!=null;i=i.nextSibling){var n=i.nodeType;if(n===1||n===3)break;if(n===8){if(n=i.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return i}var Np=null;function dC(i){i=i.nextSibling;for(var n=0;i;){if(i.nodeType===8){var o=i.data;if(o==="/$"||o==="/&"){if(n===0)return lr(i.nextSibling);n--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||n++}i=i.nextSibling}return null}function pC(i){i=i.previousSibling;for(var n=0;i;){if(i.nodeType===8){var o=i.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(n===0)return i;n--}else o!=="/$"&&o!=="/&"||n++}i=i.previousSibling}return null}function gC(i,n,o){switch(n=Hh(o),i){case"html":if(i=n.documentElement,!i)throw Error(a(452));return i;case"head":if(i=n.head,!i)throw Error(a(453));return i;case"body":if(i=n.body,!i)throw Error(a(454));return i;default:throw Error(a(451))}}function Mo(i){for(var n=i.attributes;n.length;)i.removeAttributeNode(n[0]);xs(i)}var or=new Map,mC=new Set;function Uh(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var ma=z.d;z.d={f:ML,r:RL,D:FL,C:OL,L:DL,m:$L,X:NL,S:zL,M:qL};function ML(){var i=ma.f(),n=Fh();return i||n}function RL(i){var n=Jr(i);n!==null&&n.tag===5&&n.type==="form"?Fx(n):ma.r(i)}var Xs=typeof document>"u"?null:document;function yC(i,n,o){var u=Xs;if(u&&typeof n=="string"&&n){var y=tr(n);y='link[rel="'+i+'"][href="'+y+'"]',typeof o=="string"&&(y+='[crossorigin="'+o+'"]'),mC.has(y)||(mC.add(y),i={rel:i,crossOrigin:o,href:n},u.querySelector(y)===null&&(n=u.createElement("link"),ri(n,"link",i),Ee(n),u.head.appendChild(n)))}}function FL(i){ma.D(i),yC("dns-prefetch",i,null)}function OL(i,n){ma.C(i,n),yC("preconnect",i,n)}function DL(i,n,o){ma.L(i,n,o);var u=Xs;if(u&&i&&n){var y='link[rel="preload"][as="'+tr(n)+'"]';n==="image"&&o&&o.imageSrcSet?(y+='[imagesrcset="'+tr(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(y+='[imagesizes="'+tr(o.imageSizes)+'"]')):y+='[href="'+tr(i)+'"]';var b=y;switch(n){case"style":b=Vs(i);break;case"script":b=Zs(i)}or.has(b)||(i=g({rel:"preload",href:n==="image"&&o&&o.imageSrcSet?void 0:i,as:n},o),or.set(b,i),u.querySelector(y)!==null||n==="style"&&u.querySelector(Ro(b))||n==="script"&&u.querySelector(Fo(b))||(n=u.createElement("link"),ri(n,"link",i),Ee(n),u.head.appendChild(n)))}}function $L(i,n){ma.m(i,n);var o=Xs;if(o&&i){var u=n&&typeof n.as=="string"?n.as:"script",y='link[rel="modulepreload"][as="'+tr(u)+'"][href="'+tr(i)+'"]',b=y;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Zs(i)}if(!or.has(b)&&(i=g({rel:"modulepreload",href:i},n),or.set(b,i),o.querySelector(y)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(Fo(b)))return}u=o.createElement("link"),ri(u,"link",i),Ee(u),o.head.appendChild(u)}}}function zL(i,n,o){ma.S(i,n,o);var u=Xs;if(u&&i){var y=Or(u).hoistableStyles,b=Vs(i);n=n||"default";var w=y.get(b);if(!w){var L={loading:0,preload:null};if(w=u.querySelector(Ro(b)))L.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":n},o),(o=or.get(b))&&qp(i,o);var W=w=u.createElement("link");Ee(W),ri(W,"link",i),W._p=new Promise(function(it,ot){W.onload=it,W.onerror=ot}),W.addEventListener("load",function(){L.loading|=1}),W.addEventListener("error",function(){L.loading|=2}),L.loading|=4,jh(w,n,u)}w={type:"stylesheet",instance:w,count:1,state:L},y.set(b,w)}}}function NL(i,n){ma.X(i,n);var o=Xs;if(o&&i){var u=Or(o).hoistableScripts,y=Zs(i),b=u.get(y);b||(b=o.querySelector(Fo(y)),b||(i=g({src:i,async:!0},n),(n=or.get(y))&&Ip(i,n),b=o.createElement("script"),Ee(b),ri(b,"link",i),o.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(y,b))}}function qL(i,n){ma.M(i,n);var o=Xs;if(o&&i){var u=Or(o).hoistableScripts,y=Zs(i),b=u.get(y);b||(b=o.querySelector(Fo(y)),b||(i=g({src:i,async:!0,type:"module"},n),(n=or.get(y))&&Ip(i,n),b=o.createElement("script"),Ee(b),ri(b,"link",i),o.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(y,b))}}function xC(i,n,o,u){var y=(y=xt.current)?Uh(y):null;if(!y)throw Error(a(446));switch(i){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(n=Vs(o.href),o=Or(y).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"){i=Vs(o.href);var b=Or(y).hoistableStyles,w=b.get(i);if(w||(y=y.ownerDocument||y,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(i,w),(b=y.querySelector(Ro(i)))&&!b._p&&(w.instance=b,w.state.loading=5),or.has(i)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},or.set(i,o),b||IL(y,i,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=Zs(o),o=Or(y).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,i))}}function Vs(i){return'href="'+tr(i)+'"'}function Ro(i){return'link[rel="stylesheet"]['+i+"]"}function bC(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function IL(i,n,o,u){i.querySelector('link[rel="preload"][as="style"]['+n+"]")?u.loading=1:(n=i.createElement("link"),u.preload=n,n.addEventListener("load",function(){return u.loading|=1}),n.addEventListener("error",function(){return u.loading|=2}),ri(n,"link",o),Ee(n),i.head.appendChild(n))}function Zs(i){return'[src="'+tr(i)+'"]'}function Fo(i){return"script[async]"+i}function CC(i,n,o){if(n.count++,n.instance===null)switch(n.type){case"style":var u=i.querySelector('style[data-href~="'+tr(o.href)+'"]');if(u)return n.instance=u,Ee(u),u;var y=g({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return u=(i.ownerDocument||i).createElement("style"),Ee(u),ri(u,"style",y),jh(u,o.precedence,i),n.instance=u;case"stylesheet":y=Vs(o.href);var b=i.querySelector(Ro(y));if(b)return n.state.loading|=4,n.instance=b,Ee(b),b;u=bC(o),(y=or.get(y))&&qp(u,y),b=(i.ownerDocument||i).createElement("link"),Ee(b);var w=b;return w._p=new Promise(function(L,W){w.onload=L,w.onerror=W}),ri(b,"link",u),n.state.loading|=4,jh(b,o.precedence,i),n.instance=b;case"script":return b=Zs(o.src),(y=i.querySelector(Fo(b)))?(n.instance=y,Ee(y),y):(u=o,(y=or.get(b))&&(u=g({},o),Ip(u,y)),i=i.ownerDocument||i,y=i.createElement("script"),Ee(y),ri(y,"link",u),i.head.appendChild(y),n.instance=y);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,jh(u,o.precedence,i));return n.instance}function jh(i,n,o){for(var u=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=u.length?u[u.length-1]:null,b=y,w=0;w<u.length;w++){var L=u[w];if(L.dataset.precedence===n)b=L;else if(b!==y)break}b?b.parentNode.insertBefore(i,b.nextSibling):(n=o.nodeType===9?o.head:o,n.insertBefore(i,n.firstChild))}function qp(i,n){i.crossOrigin==null&&(i.crossOrigin=n.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=n.referrerPolicy),i.title==null&&(i.title=n.title)}function Ip(i,n){i.crossOrigin==null&&(i.crossOrigin=n.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=n.referrerPolicy),i.integrity==null&&(i.integrity=n.integrity)}var Ph=null;function kC(i,n,o){if(Ph===null){var u=new Map,y=Ph=new Map;y.set(o,u)}else y=Ph,u=y.get(o),u||(u=new Map,y.set(o,u));if(u.has(i))return u;for(u.set(i,null),o=o.getElementsByTagName(i),y=0;y<o.length;y++){var b=o[y];if(!(b[za]||b[Ne]||i==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var w=b.getAttribute(n)||"";w=i+w;var L=u.get(w);L?L.push(b):u.set(w,[b])}}return u}function vC(i,n,o){i=i.ownerDocument||i,i.head.insertBefore(o,n==="title"?i.querySelector("head > title"):null)}function HL(i,n,o){if(o===1||n.itemProp!=null)return!1;switch(i){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;switch(n.rel){case"stylesheet":return i=n.disabled,typeof n.precedence=="string"&&i==null;default:return!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 SC(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function UL(i,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 y=Vs(u.href),b=n.querySelector(Ro(y));if(b){n=b._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(i.count++,i=Wh.bind(i),n.then(i,i)),o.state.loading|=4,o.instance=b,Ee(b);return}b=n.ownerDocument||n,u=bC(u),(y=or.get(y))&&qp(u,y),b=b.createElement("link"),Ee(b);var w=b;w._p=new Promise(function(L,W){w.onload=L,w.onerror=W}),ri(b,"link",u),o.instance=b}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(o,n),(n=o.state.preload)&&(o.state.loading&3)===0&&(i.count++,o=Wh.bind(i),n.addEventListener("load",o),n.addEventListener("error",o))}}var Hp=0;function jL(i,n){return i.stylesheets&&i.count===0&&Gh(i,i.stylesheets),0<i.count||0<i.imgCount?function(o){var u=setTimeout(function(){if(i.stylesheets&&Gh(i,i.stylesheets),i.unsuspend){var b=i.unsuspend;i.unsuspend=null,b()}},6e4+n);0<i.imgBytes&&Hp===0&&(Hp=62500*SL());var y=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Gh(i,i.stylesheets),i.unsuspend)){var b=i.unsuspend;i.unsuspend=null,b()}},(i.imgBytes>Hp?50:800)+n);return i.unsuspend=o,function(){i.unsuspend=null,clearTimeout(u),clearTimeout(y)}}:null}function Wh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Gh(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Yh=null;function Gh(i,n){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Yh=new Map,n.forEach(PL,i),Yh=null,Wh.call(i))}function PL(i,n){if(!(n.state.loading&4)){var o=Yh.get(i);if(o)var u=o.get(null);else{o=new Map,Yh.set(i,o);for(var y=i.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<y.length;b++){var w=y[b];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(o.set(w.dataset.precedence,w),u=w)}u&&o.set(null,u)}y=n.instance,w=y.getAttribute("data-precedence"),b=o.get(w)||u,b===u&&o.set(null,y),o.set(w,y),this.count++,u=Wh.bind(this),y.addEventListener("load",u),y.addEventListener("error",u),b?b.parentNode.insertBefore(y,b.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(y,i.firstChild)),n.state.loading|=4}}var Oo={$$typeof:E,Provider:null,Consumer:null,_currentValue:O,_currentValue2:O,_threadCount:0};function WL(i,n,o,u,y,b,w,L,W){this.tag=1,this.containerInfo=i,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=Yl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yl(0),this.hiddenUpdates=Yl(null),this.identifierPrefix=u,this.onUncaughtError=y,this.onCaughtError=b,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.incompleteTransitions=new Map}function TC(i,n,o,u,y,b,w,L,W,it,ot,dt){return i=new WL(i,n,o,w,W,it,ot,dt,L),n=1,b===!0&&(n|=24),b=Ui(3,null,null,n),i.current=b,b.stateNode=i,n=Cd(),n.refCount++,i.pooledCache=n,n.refCount++,b.memoizedState={element:u,isDehydrated:o,cache:n},Td(b),i}function wC(i){return i?(i=Bs,i):Bs}function _C(i,n,o,u,y,b){y=wC(y),u.context===null?u.context=y:u.pendingContext=y,u=Ya(n),u.payload={element:o},b=b===void 0?null:b,b!==null&&(u.callback=b),o=Ga(i,u,n),o!==null&&(Fi(o,i,n),uo(o,i,n))}function BC(i,n){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var o=i.retryLane;i.retryLane=o!==0&&o<n?o:n}}function Up(i,n){BC(i,n),(i=i.alternate)&&BC(i,n)}function EC(i){if(i.tag===13||i.tag===31){var n=En(i,67108864);n!==null&&Fi(n,i,67108864),Up(i,67108864)}}function LC(i){if(i.tag===13||i.tag===31){var n=Gi();n=gs(n);var o=En(i,n);o!==null&&Fi(o,i,n),Up(i,n)}}var Xh=!0;function YL(i,n,o,u){var y=A.T;A.T=null;var b=z.p;try{z.p=2,jp(i,n,o,u)}finally{z.p=b,A.T=y}}function GL(i,n,o,u){var y=A.T;A.T=null;var b=z.p;try{z.p=8,jp(i,n,o,u)}finally{z.p=b,A.T=y}}function jp(i,n,o,u){if(Xh){var y=Pp(u);if(y===null)Lp(i,n,u,Vh,o),MC(i,u);else if(VL(y,i,n,o,u))u.stopPropagation();else if(MC(i,u),n&4&&-1<XL.indexOf(i)){for(;y!==null;){var b=Jr(y);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var w=pr(b.pendingLanes);if(w!==0){var L=b;for(L.pendingLanes|=2,L.entangledLanes|=2;w;){var W=1<<31-Ve(w);L.entanglements[1]|=W,w&=~W}Nr(b),(oe&6)===0&&(Mh=li()+500,Eo(0))}}break;case 31:case 13:L=En(b,2),L!==null&&Fi(L,b,2),Fh(),Up(b,2)}if(b=Pp(u),b===null&&Lp(i,n,u,Vh,o),b===y)break;y=b}y!==null&&u.stopPropagation()}else Lp(i,n,u,null,o)}}function Pp(i){return i=Yf(i),Wp(i)}var Vh=null;function Wp(i){if(Vh=null,i=Na(i),i!==null){var n=l(i);if(n===null)i=null;else{var o=n.tag;if(o===13){if(i=c(n),i!==null)return i;i=null}else if(o===31){if(i=h(n),i!==null)return i;i=null}else if(o===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;i=null}else n!==i&&(i=null)}}return Vh=i,null}function AC(i){switch(i){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(qc()){case Pl:return 2;case us:return 8;case Fr:case La:return 32;case qi:return 268435456;default:return 32}default:return 32}}var Yp=!1,nn=null,sn=null,ln=null,Do=new Map,$o=new Map,on=[],XL="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 MC(i,n){switch(i){case"focusin":case"focusout":nn=null;break;case"dragenter":case"dragleave":sn=null;break;case"mouseover":case"mouseout":ln=null;break;case"pointerover":case"pointerout":Do.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":$o.delete(n.pointerId)}}function zo(i,n,o,u,y,b){return i===null||i.nativeEvent!==b?(i={blockedOn:n,domEventName:o,eventSystemFlags:u,nativeEvent:b,targetContainers:[y]},n!==null&&(n=Jr(n),n!==null&&EC(n)),i):(i.eventSystemFlags|=u,n=i.targetContainers,y!==null&&n.indexOf(y)===-1&&n.push(y),i)}function VL(i,n,o,u,y){switch(n){case"focusin":return nn=zo(nn,i,n,o,u,y),!0;case"dragenter":return sn=zo(sn,i,n,o,u,y),!0;case"mouseover":return ln=zo(ln,i,n,o,u,y),!0;case"pointerover":var b=y.pointerId;return Do.set(b,zo(Do.get(b)||null,i,n,o,u,y)),!0;case"gotpointercapture":return b=y.pointerId,$o.set(b,zo($o.get(b)||null,i,n,o,u,y)),!0}return!1}function RC(i){var n=Na(i.target);if(n!==null){var o=l(n);if(o!==null){if(n=o.tag,n===13){if(n=c(o),n!==null){i.blockedOn=n,_i(i.priority,function(){LC(o)});return}}else if(n===31){if(n=h(o),n!==null){i.blockedOn=n,_i(i.priority,function(){LC(o)});return}}else if(n===3&&o.stateNode.current.memoizedState.isDehydrated){i.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Zh(i){if(i.blockedOn!==null)return!1;for(var n=i.targetContainers;0<n.length;){var o=Pp(i.nativeEvent);if(o===null){o=i.nativeEvent;var u=new o.constructor(o.type,o);Wf=u,o.target.dispatchEvent(u),Wf=null}else return n=Jr(o),n!==null&&EC(n),i.blockedOn=o,!1;n.shift()}return!0}function FC(i,n,o){Zh(i)&&o.delete(n)}function ZL(){Yp=!1,nn!==null&&Zh(nn)&&(nn=null),sn!==null&&Zh(sn)&&(sn=null),ln!==null&&Zh(ln)&&(ln=null),Do.forEach(FC),$o.forEach(FC)}function Qh(i,n){i.blockedOn===n&&(i.blockedOn=null,Yp||(Yp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,ZL)))}var Kh=null;function OC(i){Kh!==i&&(Kh=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Kh===i&&(Kh=null);for(var n=0;n<i.length;n+=3){var o=i[n],u=i[n+1],y=i[n+2];if(typeof u!="function"){if(Wp(u||o)===null)continue;break}var b=Jr(o);b!==null&&(i.splice(n,3),n-=3,Pd(b,{pending:!0,data:y,method:o.method,action:u},u,y))}}))}function Qs(i){function n(W){return Qh(W,i)}nn!==null&&Qh(nn,i),sn!==null&&Qh(sn,i),ln!==null&&Qh(ln,i),Do.forEach(n),$o.forEach(n);for(var o=0;o<on.length;o++){var u=on[o];u.blockedOn===i&&(u.blockedOn=null)}for(;0<on.length&&(o=on[0],o.blockedOn===null);)RC(o),o.blockedOn===null&&on.shift();if(o=(i.ownerDocument||i).$$reactFormReplay,o!=null)for(u=0;u<o.length;u+=3){var y=o[u],b=o[u+1],w=y[Je]||null;if(typeof b=="function")w||OC(o);else if(w){var L=null;if(b&&b.hasAttribute("formAction")){if(y=b,w=b[Je]||null)L=w.formAction;else if(Wp(y)!==null)continue}else L=w.action;typeof L=="function"?o[u+1]=L:(o.splice(u,3),u-=3),OC(o)}}}function DC(){function i(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(w){return y=w})},focusReset:"manual",scroll:"manual"})}function n(){y!==null&&(y(),y=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,y=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(o,100),function(){u=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),y!==null&&(y(),y=null)}}}function Gp(i){this._internalRoot=i}Jh.prototype.render=Gp.prototype.render=function(i){var n=this._internalRoot;if(n===null)throw Error(a(409));var o=n.current,u=Gi();_C(o,u,i,n,null,null)},Jh.prototype.unmount=Gp.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var n=i.containerInfo;_C(i.current,2,null,i,null,null),Fh(),n[Kr]=null}};function Jh(i){this._internalRoot=i}Jh.prototype.unstable_scheduleHydration=function(i){if(i){var n=jc();i={blockedOn:null,target:i,priority:n};for(var o=0;o<on.length&&n!==0&&n<on[o].priority;o++);on.splice(o,0,i),o===0&&RC(i)}};var $C=t.version;if($C!=="19.2.6")throw Error(a(527,$C,"19.2.6"));z.findDOMNode=function(i){var n=i._reactInternals;if(n===void 0)throw typeof i.render=="function"?Error(a(188)):(i=Object.keys(i).join(","),Error(a(268,i)));return i=d(n),i=i!==null?p(i):null,i=i===null?null:i.stateNode,i};var QL={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tu.isDisabled&&tu.supportsFiber)try{Aa=tu.inject(QL),Ke=tu}catch{}}return qo.createRoot=function(i,n){if(!s(i))throw Error(a(299));var o=!1,u="",y=jx,b=Px,w=Wx;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(y=n.onUncaughtError),n.onCaughtError!==void 0&&(b=n.onCaughtError),n.onRecoverableError!==void 0&&(w=n.onRecoverableError)),n=TC(i,1,!1,null,null,o,u,null,y,b,w,DC),i[Kr]=n.current,Ep(i),new Gp(n)},qo.hydrateRoot=function(i,n,o){if(!s(i))throw Error(a(299));var u=!1,y="",b=jx,w=Px,L=Wx,W=null;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(y=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&&(W=o.formState)),n=TC(i,1,!0,n,o??null,u,y,W,b,w,L,DC),n.context=wC(null),o=n.current,u=Gi(),u=gs(u),y=Ya(u),y.callback=null,Ga(o,y,u),o=u,n.current.lanes=o,xe(n,o),Nr(n),i[Kr]=n.current,Ep(i),new Jh(n)},qo.version="19.2.6",qo}var YC;function hA(){if(YC)return Zp.exports;YC=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=cA(),Zp.exports}var uA=hA();const fA=Rm(uA);/**
51
+ * react-router v7.15.1
52
+ *
53
+ * Copyright (c) Remix Software Inc.
54
+ *
55
+ * This source code is licensed under the MIT license found in the
56
+ * LICENSE.md file in the root directory of this source tree.
57
+ *
58
+ * @license MIT
59
+ */var GC="popstate";function XC(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function dA(e={}){function t(a,s){var d;let l=(d=s.state)==null?void 0:d.masked,{pathname:c,search:h,hash:f}=l||a.location;return _g("",{pathname:c,search:h,hash:f},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 r(a,s){return typeof s=="string"?s:dc(s)}return gA(t,r,null,e)}function Be(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Er(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function pA(){return Math.random().toString(36).substring(2,10)}function VC(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 _g(e,t,r=null,a,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?$l(t):t,state:r,key:t&&t.key||a||pA(),mask:s}}function dc({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function $l(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function gA(e,t,r,a={}){let{window:s=document.defaultView,v5Compat:l=!1}=a,c=s.history,h="POP",f=null,d=p();d==null&&(d=0,c.replaceState({...c.state,idx:d},""));function p(){return(c.state||{idx:null}).idx}function g(){h="POP";let v=p(),T=v==null?null:v-d;d=v,f&&f({action:h,location:k.location,delta:T})}function x(v,T){h="PUSH";let _=XC(v)?v:_g(k.location,v,T);d=p()+1;let E=VC(_,d),R=k.createHref(_.mask||_);try{c.pushState(E,"",R)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;s.location.assign(R)}l&&f&&f({action:h,location:k.location,delta:1})}function m(v,T){h="REPLACE";let _=XC(v)?v:_g(k.location,v,T);d=p();let E=VC(_,d),R=k.createHref(_.mask||_);c.replaceState(E,"",R),l&&f&&f({action:h,location:k.location,delta:0})}function C(v){return mA(v)}let k={get action(){return h},get location(){return e(s,c)},listen(v){if(f)throw new Error("A history only accepts one active listener");return s.addEventListener(GC,g),f=v,()=>{s.removeEventListener(GC,g),f=null}},createHref(v){return t(s,v)},createURL:C,encodeLocation(v){let T=C(v);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:x,replace:m,go(v){return c.go(v)}};return k}function mA(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Be(r,"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=r+a),new URL(a,r)}function G2(e,t,r="/"){return yA(e,t,r,!1)}function yA(e,t,r,a,s){let l=typeof t=="string"?$l(t):t,c=Sa(l.pathname||"/",r);if(c==null)return null;let h=xA(e),f=null,d=AA(c);for(let p=0;f==null&&p<h.length;++p)f=EA(h[p],d,a);return f}function xA(e){let t=X2(e);return bA(t),t}function X2(e,t=[],r=[],a="",s=!1){let l=(c,h,f=s,d)=>{let p={relativePath:d===void 0?c.path||"":d,caseSensitive:c.caseSensitive===!0,childrenIndex:h,route:c};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(a)&&f)return;Be(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=wr([a,p.relativePath]),x=r.concat(p);c.children&&c.children.length>0&&(Be(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),X2(c.children,t,x,g,f)),!(c.path==null&&!c.index)&&t.push({path:g,score:_A(g,c.index),routesMeta:x})};return e.forEach((c,h)=>{var f;if(c.path===""||!((f=c.path)!=null&&f.includes("?")))l(c,h);else for(let d of V2(c.path))l(c,h,!0,d)}),t}function V2(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,s=r.endsWith("?"),l=r.replace(/\?$/,"");if(a.length===0)return s?[l,""]:[l];let c=V2(a.join("/")),h=[];return h.push(...c.map(f=>f===""?l:[l,f].join("/"))),s&&h.push(...c),h.map(f=>e.startsWith("/")&&f===""?"/":f)}function bA(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:BA(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var CA=/^:[\w-]+$/,kA=3,vA=2,SA=1,TA=10,wA=-2,ZC=e=>e==="*";function _A(e,t){let r=e.split("/"),a=r.length;return r.some(ZC)&&(a+=wA),t&&(a+=vA),r.filter(s=>!ZC(s)).reduce((s,l)=>s+(CA.test(l)?kA:l===""?SA:TA),a)}function BA(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 EA(e,t,r=!1){let{routesMeta:a}=e,s={},l="/",c=[];for(let h=0;h<a.length;++h){let f=a[h],d=h===a.length-1,p=l==="/"?t:t.slice(l.length)||"/",g=Fu({path:f.relativePath,caseSensitive:f.caseSensitive,end:d},p),x=f.route;if(!g&&d&&r&&!a[a.length-1].route.index&&(g=Fu({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},p)),!g)return null;Object.assign(s,g.params),c.push({params:s,pathname:wr([l,g.pathname]),pathnameBase:OA(wr([l,g.pathnameBase])),route:x}),g.pathnameBase!=="/"&&(l=wr([l,g.pathnameBase]))}return c}function Fu(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=LA(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let l=s[0],c=l.replace(/(.)\/+$/,"$1"),h=s.slice(1);return{params:a.reduce((d,{paramName:p,isOptional:g},x)=>{if(p==="*"){let C=h[x]||"";c=l.slice(0,l.length-C.length).replace(/(.)\/+$/,"$1")}const m=h[x];return g&&!m?d[p]=void 0:d[p]=(m||"").replace(/%2F/g,"/"),d},{}),pathname:l,pathnameBase:c,pattern:e}}function LA(e,t=!1,r=!0){Er(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,f,d,p)=>{if(a.push({paramName:h,isOptional:f!=null}),f){let g=p.charAt(d+c.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),a]}function AA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Er(!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 Sa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}var MA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function RA(e,t="/"){let{pathname:r,search:a="",hash:s=""}=typeof e=="string"?$l(e):e,l;return r?(r=Z2(r),r.startsWith("/")?l=QC(r.substring(1),"/"):l=QC(r,t)):l=t,{pathname:l,search:DA(a),hash:$A(s)}}function QC(e,t){let r=Ou(t).split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function tg(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function FA(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Om(e){let t=FA(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function mf(e,t,r,a=!1){let s;typeof e=="string"?s=$l(e):(s={...e},Be(!s.pathname||!s.pathname.includes("?"),tg("?","pathname","search",s)),Be(!s.pathname||!s.pathname.includes("#"),tg("#","pathname","hash",s)),Be(!s.search||!s.search.includes("#"),tg("#","search","hash",s)));let l=e===""||s.pathname==="",c=l?"/":s.pathname,h;if(c==null)h=r;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 f=RA(s,h),d=c&&c!=="/"&&c.endsWith("/"),p=(l||c===".")&&r.endsWith("/");return!f.pathname.endsWith("/")&&(d||p)&&(f.pathname+="/"),f}var Z2=e=>e.replace(/\/\/+/g,"/"),wr=e=>Z2(e.join("/")),Ou=e=>e.replace(/\/+$/,""),OA=e=>Ou(e).replace(/^\/*/,"/"),DA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,$A=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,zA=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function NA(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function qA(e){let t=e.map(r=>r.route.path).filter(Boolean);return wr(t)||"/"}var Q2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function K2(e,t){let r=e;if(typeof r!="string"||!MA.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,s=!1;if(Q2)try{let l=new URL(window.location.href),c=r.startsWith("//")?new URL(l.protocol+r):new URL(r),h=Sa(c.pathname,t);c.origin===l.origin&&h!=null?r=h+c.search+c.hash:s=!0}catch{Er(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:s,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var J2=["POST","PUT","PATCH","DELETE"];new Set(J2);var IA=["GET",...J2];new Set(IA);var zl=P.createContext(null);zl.displayName="DataRouter";var yf=P.createContext(null);yf.displayName="DataRouterState";var tk=P.createContext(!1);function HA(){return P.useContext(tk)}var ek=P.createContext({isTransitioning:!1});ek.displayName="ViewTransition";var UA=P.createContext(new Map);UA.displayName="Fetchers";var jA=P.createContext(null);jA.displayName="Await";var Qi=P.createContext(null);Qi.displayName="Navigation";var _c=P.createContext(null);_c.displayName="Location";var fr=P.createContext({outlet:null,matches:[],isDataRoute:!1});fr.displayName="Route";var Dm=P.createContext(null);Dm.displayName="RouteError";var ik="REACT_ROUTER_ERROR",PA="REDIRECT",WA="ROUTE_ERROR_RESPONSE";function YA(e){if(e.startsWith(`${ik}:${PA}:{`))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 GA(e){if(e.startsWith(`${ik}:${WA}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new zA(t.status,t.statusText,t.data)}catch{}}function XA(e,{relative:t}={}){Be(Nl(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=P.useContext(Qi),{hash:s,pathname:l,search:c}=Ec(e,{relative:t}),h=l;return r!=="/"&&(h=l==="/"?r:wr([r,l])),a.createHref({pathname:h,search:c,hash:s})}function Nl(){return P.useContext(_c)!=null}function Ar(){return Be(Nl(),"useLocation() may be used only in the context of a <Router> component."),P.useContext(_c).location}var rk="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ak(e){P.useContext(Qi).static||P.useLayoutEffect(e)}function Bc(){let{isDataRoute:e}=P.useContext(fr);return e?h3():VA()}function VA(){Be(Nl(),"useNavigate() may be used only in the context of a <Router> component.");let e=P.useContext(zl),{basename:t,navigator:r}=P.useContext(Qi),{matches:a}=P.useContext(fr),{pathname:s}=Ar(),l=JSON.stringify(Om(a)),c=P.useRef(!1);return ak(()=>{c.current=!0}),P.useCallback((f,d={})=>{if(Er(c.current,rk),!c.current)return;if(typeof f=="number"){r.go(f);return}let p=mf(f,JSON.parse(l),s,d.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:wr([t,p.pathname])),(d.replace?r.replace:r.push)(p,d.state,d)},[t,r,l,s,e])}var ZA=P.createContext(null);function QA(e){let t=P.useContext(fr).outlet;return P.useMemo(()=>t&&P.createElement(ZA.Provider,{value:e},t),[t,e])}function KA(){let{matches:e}=P.useContext(fr),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function Ec(e,{relative:t}={}){let{matches:r}=P.useContext(fr),{pathname:a}=Ar(),s=JSON.stringify(Om(r));return P.useMemo(()=>mf(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function JA(e,t){return nk(e,t)}function nk(e,t,r){var v;Be(Nl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=P.useContext(Qi),{matches:s}=P.useContext(fr),l=s[s.length-1],c=l?l.params:{},h=l?l.pathname:"/",f=l?l.pathnameBase:"/",d=l&&l.route;{let T=d&&d.path||"";lk(h,!d||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${T}">) 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.
60
+
61
+ Please change the parent <Route path="${T}"> to <Route path="${T==="/"?"*":`${T}/*`}">.`)}let p=Ar(),g;if(t){let T=typeof t=="string"?$l(t):t;Be(f==="/"||((v=T.pathname)==null?void 0:v.startsWith(f)),`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 "${f}" but pathname "${T.pathname}" was given in the \`location\` prop.`),g=T}else g=p;let x=g.pathname||"/",m=x;if(f!=="/"){let T=f.replace(/^\//,"").split("/");m="/"+x.replace(/^\//,"").split("/").slice(T.length).join("/")}let C=r&&r.state.matches.length?r.state.matches.map(T=>Object.assign(T,{route:r.manifest[T.route.id]||T.route})):G2(e,{pathname:m});Er(d||C!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Er(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=a3(C&&C.map(T=>Object.assign({},T,{params:Object.assign({},c,T.params),pathname:wr([f,a.encodeLocation?a.encodeLocation(T.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?f:wr([f,a.encodeLocation?a.encodeLocation(T.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathnameBase])})),s,r);return t&&k?P.createElement(_c.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...g},navigationType:"POP"}},k):k}function t3(){let e=c3(),t=NA(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=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=P.createElement(P.Fragment,null,P.createElement("p",null,"💿 Hey developer 👋"),P.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",P.createElement("code",{style:l},"ErrorBoundary")," or"," ",P.createElement("code",{style:l},"errorElement")," prop on your route.")),P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},t),r?P.createElement("pre",{style:s},r):null,c)}var e3=P.createElement(t3,null),sk=class extends P.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 r=GA(e.digest);r&&(e=r)}let t=e!==void 0?P.createElement(fr.Provider,{value:this.props.routeContext},P.createElement(Dm.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?P.createElement(i3,{error:e},t):t}};sk.contextType=tk;var eg=new WeakMap;function i3({children:e,error:t}){let{basename:r}=P.useContext(Qi);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=YA(t.digest);if(a){let s=eg.get(t);if(s)throw s;let l=K2(a.location,r);if(Q2&&!eg.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 eg.set(t,c),c}return P.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return e}function r3({routeContext:e,match:t,children:r}){let a=P.useContext(zl);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),P.createElement(fr.Provider,{value:e},r)}function a3(e,t=[],r){let a=r==null?void 0:r.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==null?void 0:a.errors;if(l!=null){let p=s.findIndex(g=>g.route.id&&(l==null?void 0:l[g.route.id])!==void 0);Be(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(r&&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:m}=a,C=g.route.loader&&!x.hasOwnProperty(g.route.id)&&(!m||m[g.route.id]===void 0);if(g.route.lazy||C){r.isStatic&&(c=!0),h>=0?s=s.slice(0,h+1):s=[s[0]];break}}}}let f=r==null?void 0:r.onError,d=a&&f?(p,g)=>{var x,m;f(p,{location:a.location,params:((m=(x=a.matches)==null?void 0:x[0])==null?void 0:m.params)??{},pattern:qA(a.matches),errorInfo:g})}:void 0;return s.reduceRight((p,g,x)=>{let m,C=!1,k=null,v=null;a&&(m=l&&g.route.id?l[g.route.id]:void 0,k=g.route.errorElement||e3,c&&(h<0&&x===0?(lk("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,v=null):h===x&&(C=!0,v=g.route.hydrateFallbackElement||null)));let T=t.concat(s.slice(0,x+1)),_=()=>{let E;return m?E=k:C?E=v:g.route.Component?E=P.createElement(g.route.Component,null):g.route.element?E=g.route.element:E=p,P.createElement(r3,{match:g,routeContext:{outlet:p,matches:T,isDataRoute:a!=null},children:E})};return a&&(g.route.ErrorBoundary||g.route.errorElement||x===0)?P.createElement(sk,{location:a.location,revalidation:a.revalidation,component:k,error:m,children:_(),routeContext:{outlet:null,matches:T,isDataRoute:!0},onError:d}):_()},null)}function $m(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function n3(e){let t=P.useContext(zl);return Be(t,$m(e)),t}function s3(e){let t=P.useContext(yf);return Be(t,$m(e)),t}function l3(e){let t=P.useContext(fr);return Be(t,$m(e)),t}function zm(e){let t=l3(e),r=t.matches[t.matches.length-1];return Be(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function o3(){return zm("useRouteId")}function c3(){var a;let e=P.useContext(Dm),t=s3("useRouteError"),r=zm("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[r]}function h3(){let{router:e}=n3("useNavigate"),t=zm("useNavigate"),r=P.useRef(!1);return ak(()=>{r.current=!0}),P.useCallback(async(s,l={})=>{Er(r.current,rk),r.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...l}))},[e,t])}var KC={};function lk(e,t,r){!t&&!KC[e]&&(KC[e]=!0,Er(!1,r))}P.memo(u3);function u3({routes:e,manifest:t,future:r,state:a,isStatic:s,onError:l}){return nk(e,void 0,{manifest:t,state:a,isStatic:s,onError:l})}function f3({to:e,replace:t,state:r,relative:a}){Be(Nl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=P.useContext(Qi);Er(!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}=P.useContext(fr),{pathname:c}=Ar(),h=Bc(),f=mf(e,Om(l),c,a==="path"),d=JSON.stringify(f);return P.useEffect(()=>{h(JSON.parse(d),{replace:t,state:r,relative:a})},[h,d,a,t,r]),null}function d3(e){return QA(e.context)}function jn(e){Be(!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 p3({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:s,static:l=!1,useTransitions:c}){Be(!Nl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=e.replace(/^\/*/,"/"),f=P.useMemo(()=>({basename:h,navigator:s,static:l,useTransitions:c,future:{}}),[h,s,l,c]);typeof r=="string"&&(r=$l(r));let{pathname:d="/",search:p="",hash:g="",state:x=null,key:m="default",mask:C}=r,k=P.useMemo(()=>{let v=Sa(d,h);return v==null?null:{location:{pathname:v,search:p,hash:g,state:x,key:m,mask:C},navigationType:a}},[h,d,p,g,x,m,a,C]);return Er(k!=null,`<Router basename="${h}"> is not able to match the URL "${d}${p}${g}" because it does not start with the basename, so the <Router> won't render anything.`),k==null?null:P.createElement(Qi.Provider,{value:f},P.createElement(_c.Provider,{children:t,value:k}))}function g3({children:e,location:t}){return JA(Bg(e),t)}function Bg(e,t=[]){let r=[];return P.Children.forEach(e,(a,s)=>{if(!P.isValidElement(a))return;let l=[...t,s];if(a.type===P.Fragment){r.push.apply(r,Bg(a.props.children,l));return}Be(a.type===jn,`[${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>`),Be(!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=Bg(a.props.children,l)),r.push(c)}),r}var yu="get",xu="application/x-www-form-urlencoded";function xf(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function m3(e){return xf(e)&&e.tagName.toLowerCase()==="button"}function y3(e){return xf(e)&&e.tagName.toLowerCase()==="form"}function x3(e){return xf(e)&&e.tagName.toLowerCase()==="input"}function b3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function C3(e,t){return e.button===0&&(!t||t==="_self")&&!b3(e)}var eu=null;function k3(){if(eu===null)try{new FormData(document.createElement("form"),0),eu=!1}catch{eu=!0}return eu}var v3=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ig(e){return e!=null&&!v3.has(e)?(Er(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${xu}"`),null):e}function S3(e,t){let r,a,s,l,c;if(y3(e)){let h=e.getAttribute("action");a=h?Sa(h,t):null,r=e.getAttribute("method")||yu,s=ig(e.getAttribute("enctype"))||xu,l=new FormData(e)}else if(m3(e)||x3(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 f=e.getAttribute("formaction")||h.getAttribute("action");if(a=f?Sa(f,t):null,r=e.getAttribute("formmethod")||h.getAttribute("method")||yu,s=ig(e.getAttribute("formenctype"))||ig(h.getAttribute("enctype"))||xu,l=new FormData(h,e),!k3()){let{name:d,type:p,value:g}=e;if(p==="image"){let x=d?`${d}.`:"";l.append(`${x}x`,"0"),l.append(`${x}y`,"0")}else d&&l.append(d,g)}}else{if(xf(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=yu,a=null,s=xu,c=e}return l&&s==="text/plain"&&(c=l,l=void 0),{action:a,method:r.toLowerCase(),encType:s,formData:l,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Nm(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ok(e,t,r,a){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${a}`:s.pathname=`${s.pathname}.${a}`:s.pathname==="/"?s.pathname=`_root.${a}`:t&&Sa(s.pathname,t)==="/"?s.pathname=`${Ou(t)}/_root.${a}`:s.pathname=`${Ou(s.pathname)}.${a}`,s}async function T3(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function w3(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 _3(e,t,r){let a=await Promise.all(e.map(async s=>{let l=t.routes[s.route.id];if(l){let c=await T3(l,r);return c.links?c.links():[]}return[]}));return A3(a.flat(1).filter(w3).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function JC(e,t,r,a,s,l){let c=(f,d)=>r[d]?f.route.id!==r[d].route.id:!0,h=(f,d)=>{var p;return r[d].pathname!==f.pathname||((p=r[d].route.path)==null?void 0:p.endsWith("*"))&&r[d].params["*"]!==f.params["*"]};return l==="assets"?t.filter((f,d)=>c(f,d)||h(f,d)):l==="data"?t.filter((f,d)=>{var g;let p=a.routes[f.route.id];if(!p||!p.hasLoader)return!1;if(c(f,d)||h(f,d))return!0;if(f.route.shouldRevalidate){let x=f.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((g=r[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function B3(e,t,{includeHydrateFallback:r}={}){return E3(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)),r&&s.hydrateFallbackModule&&(l=l.concat(s.hydrateFallbackModule)),s.imports&&(l=l.concat(s.imports)),l}).flat(1))}function E3(e){return[...new Set(e)]}function L3(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function A3(e,t){let r=new Set;return new Set(t),e.reduce((a,s)=>{let l=JSON.stringify(L3(s));return r.has(l)||(r.add(l),a.push({key:l,link:s})),a},[])}function qm(){let e=P.useContext(zl);return Nm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function M3(){let e=P.useContext(yf);return Nm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Im=P.createContext(void 0);Im.displayName="FrameworkContext";function Hm(){let e=P.useContext(Im);return Nm(e,"You must render this element inside a <HydratedRouter> element"),e}function R3(e,t){let r=P.useContext(Im),[a,s]=P.useState(!1),[l,c]=P.useState(!1),{onFocus:h,onBlur:f,onMouseEnter:d,onMouseLeave:p,onTouchStart:g}=t,x=P.useRef(null);P.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let k=T=>{T.forEach(_=>{c(_.isIntersecting)})},v=new IntersectionObserver(k,{threshold:.5});return x.current&&v.observe(x.current),()=>{v.disconnect()}}},[e]),P.useEffect(()=>{if(a){let k=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(k)}}},[a]);let m=()=>{s(!0)},C=()=>{s(!1),c(!1)};return r?e!=="intent"?[l,x,{}]:[l,x,{onFocus:Io(h,m),onBlur:Io(f,C),onMouseEnter:Io(d,m),onMouseLeave:Io(p,C),onTouchStart:Io(g,m)}]:[!1,x,{}]}function Io(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function F3({page:e,...t}){let r=HA(),{router:a}=qm(),s=P.useMemo(()=>G2(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?r?P.createElement(D3,{page:e,matches:s,...t}):P.createElement($3,{page:e,matches:s,...t}):null}function O3(e){let{manifest:t,routeModules:r}=Hm(),[a,s]=P.useState([]);return P.useEffect(()=>{let l=!1;return _3(e,t,r).then(c=>{l||s(c)}),()=>{l=!0}},[e,t,r]),a}function D3({page:e,matches:t,...r}){let a=Ar(),{future:s}=Hm(),{basename:l}=qm(),c=P.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let h=ok(e,l,s.unstable_trailingSlashAwareDataRequests,"rsc"),f=!1,d=[];for(let p of t)typeof p.route.shouldRevalidate=="function"?f=!0:d.push(p.route.id);return f&&d.length>0&&h.searchParams.set("_routes",d.join(",")),[h.pathname+h.search]},[l,s.unstable_trailingSlashAwareDataRequests,e,a,t]);return P.createElement(P.Fragment,null,c.map(h=>P.createElement("link",{key:h,rel:"prefetch",as:"fetch",href:h,...r})))}function $3({page:e,matches:t,...r}){let a=Ar(),{future:s,manifest:l,routeModules:c}=Hm(),{basename:h}=qm(),{loaderData:f,matches:d}=M3(),p=P.useMemo(()=>JC(e,t,d,l,a,"data"),[e,t,d,l,a]),g=P.useMemo(()=>JC(e,t,d,l,a,"assets"),[e,t,d,l,a]),x=P.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let k=new Set,v=!1;if(t.forEach(_=>{var R;let E=l.routes[_.route.id];!E||!E.hasLoader||(!p.some(F=>F.route.id===_.route.id)&&_.route.id in f&&((R=c[_.route.id])!=null&&R.shouldRevalidate)||E.hasClientLoader?v=!0:k.add(_.route.id))}),k.size===0)return[];let T=ok(e,h,s.unstable_trailingSlashAwareDataRequests,"data");return v&&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,f,a,l,p,t,e,c]),m=P.useMemo(()=>B3(g,l),[g,l]),C=O3(g);return P.createElement(P.Fragment,null,x.map(k=>P.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...r})),m.map(k=>P.createElement("link",{key:k,rel:"modulepreload",href:k,...r})),C.map(({key:k,link:v})=>P.createElement("link",{key:k,nonce:r.nonce,...v,crossOrigin:v.crossOrigin??r.crossOrigin})))}function z3(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var N3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{N3&&(window.__reactRouterVersion="7.15.1")}catch{}function q3({basename:e,children:t,useTransitions:r,window:a}){let s=P.useRef();s.current==null&&(s.current=dA({window:a,v5Compat:!0}));let l=s.current,[c,h]=P.useState({action:l.action,location:l.location}),f=P.useCallback(d=>{r===!1?h(d):P.startTransition(()=>h(d))},[r]);return P.useLayoutEffect(()=>l.listen(f),[l,f]),P.createElement(p3,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:l,useTransitions:r})}var ck=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hk=P.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:s,reloadDocument:l,replace:c,mask:h,state:f,target:d,to:p,preventScrollReset:g,viewTransition:x,defaultShouldRevalidate:m,...C},k){let{basename:v,navigator:T,useTransitions:_}=P.useContext(Qi),E=typeof p=="string"&&ck.test(p),R=K2(p,v);p=R.to;let F=XA(p,{relative:s}),N=Ar(),H=null;if(h){let j=mf(h,[],N.mask?N.mask.pathname:"/",!0);v!=="/"&&(j.pathname=j.pathname==="/"?v:wr([v,j.pathname])),H=T.createHref(j)}let[I,at,X]=R3(a,C),D=U3(p,{replace:c,mask:h,state:f,target:d,preventScrollReset:g,relative:s,viewTransition:x,defaultShouldRevalidate:m,useTransitions:_});function V(j){t&&t(j),j.defaultPrevented||D(j)}let J=!(R.isExternal||l),Y=P.createElement("a",{...C,...X,href:(J?H:void 0)||R.absoluteURL||F,onClick:J?V:t,ref:z3(k,at),target:d,"data-discover":!E&&r==="render"?"true":void 0});return I&&!E?P.createElement(P.Fragment,null,Y,P.createElement(F3,{page:F})):Y});hk.displayName="Link";var uk=P.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:s=!1,style:l,to:c,viewTransition:h,children:f,...d},p){let g=Ec(c,{relative:d.relative}),x=Ar(),m=P.useContext(yf),{navigator:C,basename:k}=P.useContext(Qi),v=m!=null&&G3(g)&&h===!0,T=C.encodeLocation?C.encodeLocation(g).pathname:g.pathname,_=x.pathname,E=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;r||(_=_.toLowerCase(),E=E?E.toLowerCase():null,T=T.toLowerCase()),E&&k&&(E=Sa(E,k)||E);const R=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let F=_===T||!s&&_.startsWith(T)&&_.charAt(R)==="/",N=E!=null&&(E===T||!s&&E.startsWith(T)&&E.charAt(T.length)==="/"),H={isActive:F,isPending:N,isTransitioning:v},I=F?t:void 0,at;typeof a=="function"?at=a(H):at=[a,F?"active":null,N?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let X=typeof l=="function"?l(H):l;return P.createElement(hk,{...d,"aria-current":I,className:at,ref:p,style:X,to:c,viewTransition:h},typeof f=="function"?f(H):f)});uk.displayName="NavLink";var I3=P.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:s,state:l,method:c=yu,action:h,onSubmit:f,relative:d,preventScrollReset:p,viewTransition:g,defaultShouldRevalidate:x,...m},C)=>{let{useTransitions:k}=P.useContext(Qi),v=W3(),T=Y3(h,{relative:d}),_=c.toLowerCase()==="get"?"get":"post",E=typeof h=="string"&&ck.test(h),R=F=>{if(f&&f(F),F.defaultPrevented)return;F.preventDefault();let N=F.nativeEvent.submitter,H=(N==null?void 0:N.getAttribute("formmethod"))||c,I=()=>v(N||F.currentTarget,{fetcherKey:t,method:H,navigate:r,replace:s,state:l,relative:d,preventScrollReset:p,viewTransition:g,defaultShouldRevalidate:x});k&&r!==!1?P.startTransition(()=>I()):I()};return P.createElement("form",{ref:C,method:_,action:T,onSubmit:a?f:R,...m,"data-discover":!E&&e==="render"?"true":void 0})});I3.displayName="Form";function H3(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fk(e){let t=P.useContext(zl);return Be(t,H3(e)),t}function U3(e,{target:t,replace:r,mask:a,state:s,preventScrollReset:l,relative:c,viewTransition:h,defaultShouldRevalidate:f,useTransitions:d}={}){let p=Bc(),g=Ar(),x=Ec(e,{relative:c});return P.useCallback(m=>{if(C3(m,t)){m.preventDefault();let C=r!==void 0?r:dc(g)===dc(x),k=()=>p(e,{replace:C,mask:a,state:s,preventScrollReset:l,relative:c,viewTransition:h,defaultShouldRevalidate:f});d?P.startTransition(()=>k()):k()}},[g,p,x,r,a,s,t,e,l,c,h,f,d])}var j3=0,P3=()=>`__${String(++j3)}__`;function W3(){let{router:e}=fk("useSubmit"),{basename:t}=P.useContext(Qi),r=o3(),a=e.fetch,s=e.navigate;return P.useCallback(async(l,c={})=>{let{action:h,method:f,encType:d,formData:p,body:g}=S3(l,t);if(c.navigate===!1){let x=c.fetcherKey||P3();await a(x,r,c.action||h,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:p,body:g,formMethod:c.method||f,formEncType:c.encType||d,flushSync:c.flushSync})}else await s(c.action||h,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:p,body:g,formMethod:c.method||f,formEncType:c.encType||d,replace:c.replace,state:c.state,fromRouteId:r,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,s,t,r])}function Y3(e,{relative:t}={}){let{basename:r}=P.useContext(Qi),a=P.useContext(fr);Be(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),l={...Ec(e||".",{relative:t})},c=Ar();if(e==null){l.search=c.search;let h=new URLSearchParams(l.search),f=h.getAll("index");if(f.some(p=>p==="")){h.delete("index"),f.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"),r!=="/"&&(l.pathname=l.pathname==="/"?r:wr([r,l.pathname])),dc(l)}function G3(e,{relative:t}={}){let r=P.useContext(ek);Be(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=fk("useViewTransitionState"),s=Ec(e,{relative:t});if(!r.isTransitioning)return!1;let l=Sa(r.currentLocation.pathname,a)||r.currentLocation.pathname,c=Sa(r.nextLocation.pathname,a)||r.nextLocation.pathname;return Fu(s.pathname,c)!=null||Fu(s.pathname,l)!=null}const X3="",V3=`ws://${window.location.host}`;class Z3{constructor(t=X3,r=V3){Lt(this,"baseUrl");Lt(this,"wsBaseUrl");Lt(this,"apiKey");Lt(this,"ws",null);Lt(this,"wsHandlers",new Map);this.baseUrl=t,this.wsBaseUrl=r,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){var l,c,h,f,d,p,g;if(t.stream)return this.chatCompletionsSSE(t);const r=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(!r.ok){const x=await r.json().catch(()=>({error:{message:r.statusText}}));(c=t.onError)==null||c.call(t,((l=x.error)==null?void 0:l.message)??"Request failed");return}const a=await r.json(),s={v:1,id:a.id,type:"stream.content",payload:{content:((d=(f=(h=a.choices)==null?void 0:h[0])==null?void 0:f.message)==null?void 0:d.content)??"",messageId:a.id},ts:Date.now(),sessionId:t.chatId??""};(p=t.onChunk)==null||p.call(t,s),(g=t.onDone)==null||g.call(t)}async chatCompletionsSSE(t){var h,f,d,p,g,x,m,C,k,v,T,_,E,R,F,N,H;const r=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(!r.ok){const I=await r.json().catch(()=>({error:{message:r.statusText}}));(f=t.onError)==null||f.call(t,((h=I.error)==null?void 0:h.message)??"Request failed");return}const a=(d=r.body)==null?void 0:d.getReader();if(!a){(p=t.onError)==null||p.call(t,"No response body");return}const s=new TextDecoder;let l="",c="";for(;;){const{done:I,value:at}=await a.read();if(I)break;l+=s.decode(at,{stream:!0});const X=l.split(`
62
+ `);l=X.pop()??"";for(const D of X)if(D.startsWith("event: "))c=D.slice(7).trim();else if(D.startsWith("data: ")){const V=D.slice(6).trim();if(V==="[DONE]"){(g=t.onDone)==null||g.call(t);return}try{const J=JSON.parse(V);if(c==="tool_result")(x=t.onToolResult)==null||x.call(t,J);else if(c==="status")(m=t.onStatus)==null||m.call(t,J);else if(c==="subagent")(C=t.onSubagent)==null||C.call(t,J);else if(c==="tool_use")(k=t.onToolUse)==null||k.call(t,J);else{const Y=(T=(v=J.choices)==null?void 0:v[0])==null?void 0:T.delta;if(Y){if(Y.content){const j={v:1,id:J.id,type:"stream.content",payload:{content:Y.content,messageId:J.id},ts:(J.created??0)*1e3,sessionId:t.chatId??""};(_=t.onChunk)==null||_.call(t,j)}if(Y.reasoning_content){const j={v:1,id:J.id,type:"stream.reasoning",payload:{content:Y.reasoning_content,messageId:J.id},ts:(J.created??0)*1e3,sessionId:t.chatId??""};(E=t.onChunk)==null||E.call(t,j)}if(Y.tool_calls)for(const j of Y.tool_calls){const A={v:1,id:J.id,type:"stream.tool_call",payload:{toolCallId:j.id,toolName:(R=j.function)==null?void 0:R.name,argsPreview:(F=j.function)==null?void 0:F.arguments,riskLevel:"safe"},ts:(J.created??0)*1e3,sessionId:t.chatId??""};(N=t.onChunk)==null||N.call(t,A)}}}}catch{}c=""}else D.trim()===""&&(c="")}(H=t.onDone)==null||H.call(t)}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,r){const s=await(await fetch(`${this.baseUrl}/api/sessions`,{method:"POST",headers:this.headers(),body:JSON.stringify({name:t,agentType:r})})).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){var a;const r=await fetch(`${this.baseUrl}/api/sessions/${t}`,{method:"DELETE",headers:this.authHeaders()});if(!r.ok){const s=await r.json().catch(()=>({error:{message:r.statusText}}));throw new Error(((a=s.error)==null?void 0:a.message)??`Delete failed: ${r.status}`)}return r.json()}async deleteAllSessions(){var r;const t=await fetch(`${this.baseUrl}/api/sessions`,{method:"DELETE",headers:this.authHeaders()});if(!t.ok){const a=await t.json().catch(()=>({error:{message:t.statusText}}));throw new Error(((r=a.error)==null?void 0:r.message)??`Delete all failed: ${t.status}`)}return t.json()}async clearSession(t){var a;const r=await fetch(`${this.baseUrl}/api/sessions/${t}/clear`,{method:"POST",headers:this.authHeaders()});if(!r.ok){const s=await r.json().catch(()=>({error:{message:r.statusText}}));throw new Error(((a=s.error)==null?void 0:a.message)??`Clear failed: ${r.status}`)}return r.json()}async renameSession(t,r){return(await fetch(`${this.baseUrl}/api/sessions/${t}`,{method:"PATCH",headers:this.headers(),body:JSON.stringify({name:r})})).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,r){await fetch(`${this.baseUrl}/api/approval/respond`,{method:"POST",headers:this.headers(),body:JSON.stringify({requestId:t,approved:r})})}connectWebSocket(t,r){const a=`${this.wsBaseUrl}/ws`,s=new WebSocket(a);return this.ws=s,s.onopen=()=>{this.wsHandlers.set(t,r)},s.onmessage=l=>{try{const c=JSON.parse(l.data);r(c)}catch{}},s.onclose=()=>{this.wsHandlers.delete(t),this.ws=null},()=>{s.close()}}sendWebSocketMessage(t,r){if(!this.ws||this.ws.readyState!==WebSocket.OPEN)return;const a={v:1,id:`msg_${Date.now()}`,type:"chat.send",payload:{message:r},ts:Date.now(),sessionId:t};this.ws.send(JSON.stringify(a))}}const be=new Z3,dk=P.createContext({currentSession:null,contextPercentage:0,status:null,setCurrentSession:()=>{},refreshStatus:async()=>{},getMessageCache:()=>[],setMessageCache:()=>{},clearMessageCache:()=>{}});function bf(){return P.useContext(dk)}function Q3({children:e}){const[t,r]=P.useState(null),[a,s]=P.useState(null),[l,c]=P.useState(0),h=Bc(),f=Ar(),d=P.useRef(!1),p=P.useRef(new Map),g=P.useCallback(k=>p.current.get(k)??[],[]),x=P.useCallback((k,v)=>{p.current.set(k,v)},[]),m=P.useCallback(k=>{p.current.delete(k)},[]),C=P.useCallback(async()=>{try{const k=await be.getStatus();r(k),c(k.contextPercentage??0),k.currentSession?(s({id:k.currentSession.id,name:k.currentSession.name,messageCount:k.currentSession.messageCount}),d.current||(d.current=!0,f.pathname==="/chat"&&h(`/chat/${k.currentSession.id}`,{replace:!0}))):d.current=!0}catch{}},[h,f.pathname]);return P.useEffect(()=>{C();const k=setInterval(C,3e3);return()=>clearInterval(k)},[C]),U.jsx(dk.Provider,{value:{currentSession:a,contextPercentage:l,status:t,setCurrentSession:s,refreshStatus:C,getMessageCache:g,setMessageCache:x,clearMessageCache:m},children:e})}const K3=[{to:"/chat",label:"Chat",icon:"💬"},{to:"/sessions",label:"Sessions",icon:"📋"},{to:"/settings",label:"Settings",icon:"⚙️"}];function J3(){const{currentSession:e,contextPercentage:t,status:r,setCurrentSession:a,refreshStatus:s}=bf(),l=Bc(),c=t??0,h=c>50?"var(--safe)":c>20?"var(--moderate)":"var(--dangerous)";return U.jsxs("div",{style:{display:"flex",height:"100vh"},children:[U.jsxs("nav",{style:{width:220,minWidth:220,background:"var(--bg-secondary)",borderRight:"1px solid var(--border)",display:"flex",flexDirection:"column",padding:"12px 0"},children:[U.jsxs("div",{style:{padding:"12px 16px",fontSize:18,fontWeight:700,borderBottom:"1px solid var(--border)",marginBottom:8},children:[U.jsx("span",{className:"gradient-text",children:"AggRoot"}),U.jsxs("span",{style:{fontSize:11,fontWeight:400,color:"var(--text-tertiary)",marginLeft:6},children:["v","1.10.2"]})]}),K3.map(f=>U.jsxs(uk,{to:f.to,style:({isActive:d})=>({display:"flex",alignItems:"center",gap:10,padding:"10px 16px",color:d?"var(--text-primary)":"var(--text-secondary)",background:d?"var(--bg-hover)":"transparent",textDecoration:"none",fontSize:14,borderLeft:d?"2px solid var(--accent)":"2px solid transparent",transition:"all 0.15s"}),children:[U.jsx("span",{children:f.icon}),U.jsx("span",{children:f.label})]},f.to)),U.jsx("div",{style:{flex:1}}),U.jsxs("div",{style:{padding:"12px 16px",borderTop:"1px solid var(--border)",fontSize:12,color:"var(--text-muted)"},children:[U.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:10},children:[U.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:r?"var(--emerald)":"var(--text-muted)",boxShadow:r?"0 0 6px var(--emerald)":"none"}}),r?"Connected":"Disconnected"]}),e?U.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:f=>f.currentTarget.style.background="var(--bg-hover)",onMouseLeave:f=>f.currentTarget.style.background="var(--accent-soft)",children:[U.jsx("div",{style:{fontSize:10,color:"var(--accent)",marginBottom:2,fontWeight:600},children:"Current Session"}),U.jsx("div",{style:{color:"var(--text-secondary)",fontSize:12,fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),U.jsxs("div",{style:{fontSize:10,color:"var(--text-muted)",marginTop:2},children:[e.messageCount," messages"]})]}):U.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"}),(r==null?void 0:r.model)&&U.jsxs("div",{style:{marginBottom:8},children:[U.jsx("div",{style:{height:4,background:"rgba(255,255,255,0.05)",borderRadius:2,overflow:"hidden"},children:U.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)"}`}})}),U.jsxs("div",{style:{fontSize:10,marginTop:2,color:h,fontWeight:500},children:["Context: ",c,"%"]})]})]})]}),U.jsx("main",{style:{flex:1,overflow:"auto",background:"var(--bg-primary)"},children:U.jsx(d3,{})})]})}function tM(e){const{getMessageCache:t,setMessageCache:r,clearMessageCache:a,refreshStatus:s}=bf(),l=e??"__default__",[c,h]=P.useState(()=>t(l)),[f,d]=P.useState(!1),[p,g]=P.useState(!1),[x,m]=P.useState(null),[C,k]=P.useState([]),[v,T]=P.useState(null),_=P.useRef(null),E=P.useRef(null),R=P.useRef(l),F=P.useRef(new Set),N=D=>{if(D.includes(`
63
+ `))return D;let V=D;return V=V.replace(/(#{1,6})([^\s#\n\u{2700}-\u{27BF}\u{1F300}-\u{1F9FF}\u{2600}-\u{26FF}])/gu,"$1 $2"),V=V.replace(/(-)(?=[^\s\-])/g,"$1 "),V=V.replace(/([^\n])(#{1,6}\s)/g,`$1
64
+
65
+ $2`),V=V.replace(/(#{1,6}\s[\u4e00-\u9fffa-zA-Z0-9\s]{1,30}?)(?=[^\u4e00-\u9fffa-zA-Z0-9\s\n#])/g,`$1
66
+ `),V=V.replace(/([^\n])(- (?!-))/g,`$1
67
+ $2`),V=V.replace(/([^\n])(\d+\.\s)/g,`$1
68
+ $2`),V=V.replace(/([^\n])(```|~~~)/g,`$1
69
+ $2`),V=V.replace(/([\u4e00-\u9fffa-zA-Z0-9])([\u{2700}-\u{27BF}\u{1F300}-\u{1F9FF}\u{2600}-\u{26FF}])/gu,`$1
70
+ $2`),V},H=D=>{var Y;const V=[];let J=null;for(const j of D)if(j.role!=="system"){if(j.role==="user")J&&(V.push(J),J=null),V.push({id:j.id,role:"user",content:j.content??"",timestamp:j.timestamp});else if(j.role==="assistant")J&&V.push(J),J={id:j.id,role:"assistant",content:N(j.content??""),reasoning:void 0,toolCalls:((Y=j.toolCalls)==null?void 0:Y.map(A=>{var z,O,M;return{id:A.id??"",name:((z=A.function)==null?void 0:z.name)??A.name??"",argsPreview:typeof((O=A.function)==null?void 0:O.arguments)=="string"?A.function.arguments:JSON.stringify(((M=A.function)==null?void 0:M.arguments)??A.args??""),riskLevel:"safe"}}))??[],timestamp:j.timestamp};else if(j.role==="tool"&&J){const A=j.toolCallId;if(A&&J.toolCalls){const z=J.toolCalls.find(O=>O.id===A);z&&(z.result=j.content??void 0,z.success=!0)}}}return J&&V.push(J),V};P.useEffect(()=>{if(!e)return;(async()=>{const V=t(l);if(V.length>0){l!==R.current&&(R.current=l,h(V),m(null),k([]),T(null));return}if(!F.current.has(e)){F.current.add(e),g(!0);try{const J=await be.fetchMessages(e);if(J.length>0){const Y=H(J);h(Y),r(l,Y)}}catch{}g(!1)}})()},[l,e,t,r]),P.useEffect(()=>{if(l!==R.current){R.current=l;const D=t(l);h(D),m(null),k([]),T(null)}},[l,t]),P.useEffect(()=>{r(l,c)},[c,l,r]);const I=P.useCallback(async D=>{if(!D.trim()||f)return;m(null),k([]),T({phase:"thinking",text:"Thinking...",startTime:Date.now()});const V=new AbortController;E.current=V;const J={id:`user_${Date.now()}`,role:"user",content:D,timestamp:Date.now()};h(z=>[...z,J]);const Y=`asst_${Date.now()}`;_.current=Y;const j={id:Y,role:"assistant",content:"",isStreaming:!0,timestamp:Date.now()};h(z=>[...z,j]),d(!0);const A=()=>{d(!1),T(null),k([]),E.current=null};try{const z=[...c,J].map(O=>({role:O.role,content:O.content}));await be.chatCompletions({messages:z,stream:!0,chatId:e,signal:V.signal,onChunk:O=>{if(O.type==="stream.content"){const M=O.payload.content??"";h(Q=>Q.map($=>$.id===Y?{...$,content:$.content+M}:$)),T({phase:"generating",text:"Generating...",startTime:Date.now()})}else if(O.type==="stream.reasoning"){const M=O.payload.content??"";h(Q=>Q.map($=>$.id===Y?{...$,reasoning:($.reasoning??"")+M}:$)),T(Q=>(Q==null?void 0:Q.phase)!=="tool_calling"?{phase:"thinking",text:"Thinking...",startTime:(Q==null?void 0:Q.startTime)??Date.now()}:Q)}else if(O.type==="stream.tool_call"){const M=O.payload;h(Q=>Q.map($=>$.id===Y?{...$,toolCalls:[...$.toolCalls??[],{id:M.toolCallId,name:M.toolName,argsPreview:M.argsPreview,riskLevel:M.riskLevel}]}:$)),T({phase:"tool_calling",text:`Calling ${M.toolName}...`,startTime:Date.now()})}else if(O.type==="stream.error"){const M=O.payload.content??"Error";m(M)}},onToolResult:O=>{h(M=>M.map(Q=>{var $;return Q.id===Y?{...Q,toolCalls:($=Q.toolCalls)==null?void 0:$.map(tt=>tt.id===O.toolCallId||tt.name===O.toolName?{...tt,result:O.stdout||O.result||O.stderr||"",stdout:O.stdout??void 0,stderr:O.stderr??void 0,success:O.success,duration:O.duration}:tt)}:Q}))},onStatus:O=>{O.toolName?T({phase:"tool_calling",text:`${O.toolName}: ${O.content}`,startTime:Date.now()}):T({phase:"thinking",text:O.content,startTime:Date.now()})},onSubagent:O=>{const M=O,Q=M.type,$=M.subAgentId;Q==="started"?(k(tt=>[...tt,{id:$,name:M.subAgentName??M.name??"SubAgent",task:M.task??"",status:"running",toolCount:0,lines:[],startTime:Date.now()}]),T({phase:"tool_calling",text:`SubAgent: ${M.subAgentName??M.name??"running"}...`,startTime:Date.now()})):Q==="tool_use"?k(tt=>tt.map(ct=>ct.id===$?{...ct,toolCount:ct.toolCount+1,lines:[...ct.lines,`🔧 ${M.toolName??"tool"}`]}:ct)):Q==="tool_result"?k(tt=>tt.map(ct=>ct.id===$?{...ct,lines:[...ct.lines,`✓ ${M.toolName??"tool"} (${M.duration??0}ms)`]}:ct)):Q==="completed"&&k([])},onDone:()=>{h(O=>O.map(M=>M.id===Y?{...M,isStreaming:!1}:M)),A(),s()},onError:O=>{m(O),h(M=>M.map(Q=>Q.id===Y?{...Q,isStreaming:!1,content:`Error: ${O}`}:Q)),A()}})}catch(z){if(z instanceof Error&&z.name==="AbortError"){h(M=>M.map(Q=>Q.id===Y?{...Q,isStreaming:!1}:Q)),A();return}const O=z instanceof Error?z.message:String(z);m(O),A()}},[c,f,e]),at=P.useCallback(()=>{h([]),a(l),m(null),k([]),T(null)},[l,a]),X=P.useCallback(async()=>{E.current&&E.current.abort();try{await be.abort()}catch{}},[]);return{messages:c,isLoading:f,isHistoryLoading:p,error:x,sendMessage:I,clearMessages:at,abortChat:X,subAgents:C,thinkingStatus:v}}function eM(){const[e,t]=P.useState([]),[r,a]=P.useState(!1),s=P.useCallback(async()=>{a(!0);try{const g=await be.listSessions();t(g)}catch{}a(!1)},[]),l=P.useCallback(async(g,x)=>{const m=await be.createSession(g,x);return t(C=>[...C,m]),await s(),m},[s]),c=P.useCallback(async g=>{t(x=>x.filter(m=>m.id!==g));try{await be.deleteSession(g)}catch(x){const m=await be.listSessions();throw t(m),x}},[]),h=P.useCallback(async()=>{t([]);try{return(await be.deleteAllSessions()).deletedCount}catch(g){const x=await be.listSessions();throw t(x),g}},[]),f=P.useCallback(async g=>{await be.clearSession(g)},[]),d=P.useCallback(async(g,x)=>{await be.renameSession(g,x),t(m=>m.map(C=>C.id===g?{...C,name:x}:C))},[]),p=P.useCallback(async g=>{await be.activateSession(g)},[]);return{sessions:e,isLoading:r,fetchSessions:s,createSession:l,deleteSession:c,deleteAllSessions:h,clearSession:f,renameSession:d,activateSession:p}}function Um(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ls=Um();function pk(e){ls=e}var Yn={exec:()=>null};function Ks(e){let t=[];return r=>{let a=Math.max(0,Math.min(3,r-1)),s=t[a];return s||(s=e(a),t[a]=s),s}}function Jt(e,t=""){let r=typeof e=="string"?e:e.source,a={replace:(s,l)=>{let c=typeof l=="string"?l:l.source;return c=c.replace(di.caret,"$1"),r=r.replace(s,c),a},getRegex:()=>new RegExp(r,t)};return a}var iM=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),di={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:Ks(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Ks(e=>new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Ks(e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ks(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Ks(e=>new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Ks(e=>new RegExp(`^ {0,${e}}>`))},rM=/^(?:[ \t]*(?:\n|$))+/,aM=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,nM=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Lc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,sM=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,jm=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,gk=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,mk=Jt(gk).replace(/bull/g,jm).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(),lM=Jt(gk).replace(/bull/g,jm).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(),Pm=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,oM=/^[^\n]+/,Wm=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,cM=Jt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Wm).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),hM=Jt(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,jm).getRegex(),Cf="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",Ym=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,uM=Jt("^ {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",Ym).replace("tag",Cf).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),yk=Jt(Pm).replace("hr",Lc).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",Cf).getRegex(),fM=Jt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",yk).getRegex(),Gm={blockquote:fM,code:aM,def:cM,fences:nM,heading:sM,hr:Lc,html:uM,lheading:mk,list:hM,newline:rM,paragraph:yk,table:Yn,text:oM},t1=Jt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Lc).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",Cf).getRegex(),dM={...Gm,lheading:lM,table:t1,paragraph:Jt(Pm).replace("hr",Lc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",t1).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",Cf).getRegex()},pM={...Gm,html:Jt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ym).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:Yn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Jt(Pm).replace("hr",Lc).replace("heading",` *#{1,6} *[^
71
+ ]`).replace("lheading",mk).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},gM=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,mM=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,xk=/^( {2,}|\\)\n(?!\s*$)/,yM=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ql=/[\p{P}\p{S}]/u,kf=/[\s\p{P}\p{S}]/u,Xm=/[^\s\p{P}\p{S}]/u,xM=Jt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,kf).getRegex(),bk=/(?!~)[\p{P}\p{S}]/u,bM=/(?!~)[\s\p{P}\p{S}]/u,CM=/(?:[^\s\p{P}\p{S}]|~)/u,kM=Jt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",iM?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Ck=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,vM=Jt(Ck,"u").replace(/punct/g,ql).getRegex(),SM=Jt(Ck,"u").replace(/punct/g,bk).getRegex(),kk="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",TM=Jt(kk,"gu").replace(/notPunctSpace/g,Xm).replace(/punctSpace/g,kf).replace(/punct/g,ql).getRegex(),wM=Jt(kk,"gu").replace(/notPunctSpace/g,CM).replace(/punctSpace/g,bM).replace(/punct/g,bk).getRegex(),_M=Jt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Xm).replace(/punctSpace/g,kf).replace(/punct/g,ql).getRegex(),BM=Jt(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ql).getRegex(),EM="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",LM=Jt(EM,"gu").replace(/notPunctSpace/g,Xm).replace(/punctSpace/g,kf).replace(/punct/g,ql).getRegex(),AM=Jt(/\\(punct)/,"gu").replace(/punct/g,ql).getRegex(),MM=Jt(/^<(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(),RM=Jt(Ym).replace("(?:-->|$)","-->").getRegex(),FM=Jt("^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",RM).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Du=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,OM=Jt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Du).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),vk=Jt(/^!?\[(label)\]\[(ref)\]/).replace("label",Du).replace("ref",Wm).getRegex(),Sk=Jt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Wm).getRegex(),DM=Jt("reflink|nolink(?!\\()","g").replace("reflink",vk).replace("nolink",Sk).getRegex(),e1=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Vm={_backpedal:Yn,anyPunctuation:AM,autolink:MM,blockSkip:kM,br:xk,code:mM,del:Yn,delLDelim:Yn,delRDelim:Yn,emStrongLDelim:vM,emStrongRDelimAst:TM,emStrongRDelimUnd:_M,escape:gM,link:OM,nolink:Sk,punctuation:xM,reflink:vk,reflinkSearch:DM,tag:FM,text:yM,url:Yn},$M={...Vm,link:Jt(/^!?\[(label)\]\((.*?)\)/).replace("label",Du).getRegex(),reflink:Jt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Du).getRegex()},Eg={...Vm,emStrongRDelimAst:wM,emStrongLDelim:SM,delLDelim:BM,delRDelim:LM,url:Jt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",e1).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:Jt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",e1).getRegex()},zM={...Eg,br:Jt(xk).replace("{2,}","*").getRegex(),text:Jt(Eg.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},iu={normal:Gm,gfm:dM,pedantic:pM},Ho={normal:Vm,gfm:Eg,breaks:zM,pedantic:$M},NM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},i1=e=>NM[e];function qr(e,t){if(t){if(di.escapeTest.test(e))return e.replace(di.escapeReplace,i1)}else if(di.escapeTestNoEncode.test(e))return e.replace(di.escapeReplaceNoEncode,i1);return e}function r1(e){try{e=encodeURI(e).replace(di.percentDecode,"%")}catch{return null}return e}function a1(e,t){var l;let r=e.replace(di.findPipe,(c,h,f)=>{let d=!1,p=h;for(;--p>=0&&f[p]==="\\";)d=!d;return d?"|":" |"}),a=r.split(di.splitPipe),s=0;if(a[0].trim()||a.shift(),a.length>0&&!((l=a.at(-1))!=null&&l.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(di.slashPipe,"|");return a}function hn(e,t,r){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 n1(e){let t=e.split(`
72
+ `),r=t.length-1;for(;r>=0&&di.blankLine.test(t[r]);)r--;return t.length-r<=2?e:t.slice(0,r+1).join(`
73
+ `)}function qM(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let a=0;a<e.length;a++)if(e[a]==="\\")a++;else if(e[a]===t[0])r++;else if(e[a]===t[1]&&(r--,r<0))return a;return r>0?-2:-1}function IM(e,t=0){let r=t,a="";for(let s of e)if(s===" "){let l=4-r%4;a+=" ".repeat(l),r+=l}else a+=s,r++;return a}function s1(e,t,r,a,s){let l=t.href,c=t.title||null,h=e[1].replace(s.other.outputLinkReplace,"$1");a.state.inLink=!0;let f={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:l,title:c,text:h,tokens:a.inlineTokens(h)};return a.state.inLink=!1,f}function HM(e,t,r){let a=e.match(r.other.indentCodeCompensation);if(a===null)return t;let s=a[1];return t.split(`
74
+ `).map(l=>{let c=l.match(r.other.beginningSpace);if(c===null)return l;let[h]=c;return h.length>=s.length?l.slice(s.length):l}).join(`
75
+ `)}var $u=class{constructor(t){Lt(this,"options");Lt(this,"rules");Lt(this,"lexer");this.options=t||ls}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let a=this.options.pedantic?r[0]:n1(r[0]),s=a.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:a,codeBlockStyle:"indented",text:s}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let a=r[0],s=HM(a,r[3]||"",this.rules);return{type:"code",raw:a,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let a=r[2].trim();if(this.rules.other.endingHash.test(a)){let s=hn(a,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(a=s.trim())}return{type:"heading",raw:hn(r[0],`
76
+ `),depth:r[1].length,text:a,tokens:this.lexer.inline(a)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:hn(r[0],`
77
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let a=hn(r[0],`
78
+ `).split(`
79
+ `),s="",l="",c=[];for(;a.length>0;){let h=!1,f=[],d;for(d=0;d<a.length;d++)if(this.rules.other.blockquoteStart.test(a[d]))f.push(a[d]),h=!0;else if(!h)f.push(a[d]);else break;a=a.slice(d);let p=f.join(`
80
+ `),g=p.replace(this.rules.other.blockquoteSetextReplace,`
81
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
82
+ ${p}`:p,l=l?`${l}
83
+ ${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 m=c.at(-1);if((m==null?void 0:m.type)==="code")break;if((m==null?void 0:m.type)==="blockquote"){let C=m,k=C.raw+`
84
+ `+a.join(`
85
+ `),v=this.blockquote(k);c[c.length-1]=v,s=s.substring(0,s.length-C.raw.length)+v.raw,l=l.substring(0,l.length-C.text.length)+v.text;break}else if((m==null?void 0:m.type)==="list"){let C=m,k=C.raw+`
86
+ `+a.join(`
87
+ `),v=this.list(k);c[c.length-1]=v,s=s.substring(0,s.length-m.raw.length)+v.raw,l=l.substring(0,l.length-C.raw.length)+v.raw,a=k.substring(c.at(-1).raw.length).split(`
88
+ `);continue}}return{type:"blockquote",raw:s,tokens:c,text:l}}}list(t){let r=this.rules.block.list.exec(t);if(r){let a=r[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 d=!1,p="",g="";if(!(r=c.exec(t))||this.rules.block.hr.test(t))break;p=r[0],t=t.substring(p.length);let x=IM(r[2].split(`
89
+ `,1)[0],r[1].length),m=t.split(`
90
+ `,1)[0],C=!x.trim(),k=0;if(this.options.pedantic?(k=2,g=x.trimStart()):C?k=r[1].length+1:(k=x.search(this.rules.other.nonSpaceChar),k=k>4?1:k,g=x.slice(k),k+=r[1].length),C&&this.rules.other.blankLine.test(m)&&(p+=m+`
91
+ `,t=t.substring(m.length+1),d=!0),!d){let v=this.rules.other.nextBulletRegex(k),T=this.rules.other.hrRegex(k),_=this.rules.other.fencesBeginRegex(k),E=this.rules.other.headingBeginRegex(k),R=this.rules.other.htmlBeginRegex(k),F=this.rules.other.blockquoteBeginRegex(k);for(;t;){let N=t.split(`
92
+ `,1)[0],H;if(m=N,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),H=m):H=m.replace(this.rules.other.tabCharGlobal," "),_.test(m)||E.test(m)||R.test(m)||F.test(m)||v.test(m)||T.test(m))break;if(H.search(this.rules.other.nonSpaceChar)>=k||!m.trim())g+=`
93
+ `+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+=`
94
+ `+m}C=!m.trim(),p+=N+`
95
+ `,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 f=l.items.at(-1);if(f)f.raw=f.raw.trimEnd(),f.text=f.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let d of l.items){this.lexer.state.top=!1,d.tokens=this.lexer.blockTokens(d.text,[]);let p=d.tokens[0];if(d.task&&((p==null?void 0:p.type)==="text"||(p==null?void 0:p.type)==="paragraph")){d.text=d.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(d.raw);if(g){let x={type:"checkbox",raw:g[0]+" ",checked:g[0]!=="[ ]"};d.checked=x.checked,l.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=x.raw+d.tokens[0].raw,d.tokens[0].text=x.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(x)):d.tokens.unshift({type:"paragraph",raw:x.raw,text:x.raw,tokens:[x]}):d.tokens.unshift(x)}}else d.task&&(d.task=!1);if(!l.loose){let g=d.tokens.filter(m=>m.type==="space"),x=g.length>0&&g.some(m=>this.rules.other.anyLine.test(m.raw));l.loose=x}}if(l.loose)for(let d of l.items){d.loose=!0;for(let p of d.tokens)p.type==="text"&&(p.type="paragraph")}return l}}html(t){let r=this.rules.block.html.exec(t);if(r){let a=n1(r[0]);return{type:"html",block:!0,raw:a,pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:a}}}def(t){let r=this.rules.block.def.exec(t);if(r){let a=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",l=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:a,raw:hn(r[0],`
96
+ `),href:s,title:l}}}table(t){var h;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let a=a1(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=(h=r[3])!=null&&h.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
97
+ `):[],c={type:"table",raw:hn(r[0],`
98
+ `),header:[],align:[],rows:[]};if(a.length===s.length){for(let f of s)this.rules.other.tableAlignRight.test(f)?c.align.push("right"):this.rules.other.tableAlignCenter.test(f)?c.align.push("center"):this.rules.other.tableAlignLeft.test(f)?c.align.push("left"):c.align.push(null);for(let f=0;f<a.length;f++)c.header.push({text:a[f],tokens:this.lexer.inline(a[f]),header:!0,align:c.align[f]});for(let f of l)c.rows.push(a1(f,c.header.length).map((d,p)=>({text:d,tokens:this.lexer.inline(d),header:!1,align:c.align[p]})));return c}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r){let a=r[1].trim();return{type:"heading",raw:hn(r[0],`
99
+ `),depth:r[2].charAt(0)==="="?1:2,text:a,tokens:this.lexer.inline(a)}}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let a=r[1].charAt(r[1].length-1)===`
100
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:a,tokens:this.lexer.inline(a)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let a=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(a)){if(!this.rules.other.endAngleBracket.test(a))return;let c=hn(a.slice(0,-1),"\\");if((a.length-c.length)%2===0)return}else{let c=qM(r[2],"()");if(c===-2)return;if(c>-1){let h=(r[0].indexOf("!")===0?5:4)+r[1].length+c;r[2]=r[2].substring(0,c),r[0]=r[0].substring(0,h).trim(),r[3]=""}}let s=r[2],l="";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(s);c&&(s=c[1],l=c[3])}else l=r[3]?r[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)),s1(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:l&&l.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){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=r[s.toLowerCase()];if(!l){let c=a[0].charAt(0);return{type:"text",raw:c,text:c}}return s1(a,l,a[0],this.lexer,this.rules)}}emStrong(t,r,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,f=l,d=0,p=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,r=r.slice(-1*t.length+l);(s=p.exec(r))!==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]){f+=h;continue}else if((s[5]||s[6])&&l%3&&!((l+h)%3)){d+=h;continue}if(f-=h,f>0)continue;h=Math.min(h,h+f+d);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 m=x.slice(2,-2);return{type:"strong",raw:x,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let a=r[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:r[0],text:a}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t,r,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,f=l,d=this.rules.inline.delRDelim;for(d.lastIndex=0,r=r.slice(-1*t.length+l);(s=d.exec(r))!==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]){f+=h;continue}if(f-=h,f>0)continue;h=Math.min(h,h+f);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 r=this.rules.inline.autolink.exec(t);if(r){let a,s;return r[2]==="@"?(a=r[1],s="mailto:"+a):(a=r[1],s=a),{type:"link",raw:r[0],text:a,href:s,tokens:[{type:"text",raw:a,text:a}]}}}url(t){var a;let r;if(r=this.rules.inline.url.exec(t)){let s,l;if(r[2]==="@")s=r[0],l="mailto:"+s;else{let c;do c=r[0],r[0]=((a=this.rules.inline._backpedal.exec(r[0]))==null?void 0:a[0])??"";while(c!==r[0]);s=r[0],r[1]==="www."?l="http://"+r[0]:l=r[0]}return{type:"link",raw:r[0],text:s,href:l,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let a=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:a}}}},br=class Lg{constructor(t){Lt(this,"tokens");Lt(this,"options");Lt(this,"state");Lt(this,"inlineQueue");Lt(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ls,this.options.tokenizer=this.options.tokenizer||new $u,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 r={other:di,block:iu.normal,inline:Ho.normal};this.options.pedantic?(r.block=iu.pedantic,r.inline=Ho.pedantic):this.options.gfm&&(r.block=iu.gfm,this.options.breaks?r.inline=Ho.breaks:r.inline=Ho.gfm),this.tokenizer.rules=r}static get rules(){return{block:iu,inline:Ho}}static lex(t,r){return new Lg(r).lex(t)}static lexInline(t,r){return new Lg(r).inlineTokens(t)}lex(t){t=t.replace(di.carriageReturn,`
101
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let a=this.inlineQueue[r];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],a=!1){var l,c,h;this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(di.tabCharGlobal," ").replace(di.spaceLine,""));let s=1/0;for(;t;){if(t.length<s)s=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let f;if((c=(l=this.options.extensions)==null?void 0:l.block)!=null&&c.some(p=>(f=p.call({lexer:this},t,r))?(t=t.substring(f.raw.length),r.push(f),!0):!1))continue;if(f=this.tokenizer.space(t)){t=t.substring(f.raw.length);let p=r.at(-1);f.raw.length===1&&p!==void 0?p.raw+=`
102
+ `:r.push(f);continue}if(f=this.tokenizer.code(t)){t=t.substring(f.raw.length);let p=r.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
103
+ `)?"":`
104
+ `)+f.raw,p.text+=`
105
+ `+f.text,this.inlineQueue.at(-1).src=p.text):r.push(f);continue}if(f=this.tokenizer.fences(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.heading(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.hr(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.blockquote(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.list(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.html(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.def(t)){t=t.substring(f.raw.length);let p=r.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
106
+ `)?"":`
107
+ `)+f.raw,p.text+=`
108
+ `+f.raw,this.inlineQueue.at(-1).src=p.text):this.tokens.links[f.tag]||(this.tokens.links[f.tag]={href:f.href,title:f.title},r.push(f));continue}if(f=this.tokenizer.table(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.lheading(t)){t=t.substring(f.raw.length),r.push(f);continue}let d=t;if((h=this.options.extensions)!=null&&h.startBlock){let p=1/0,g=t.slice(1),x;this.options.extensions.startBlock.forEach(m=>{x=m.call({lexer:this},g),typeof x=="number"&&x>=0&&(p=Math.min(p,x))}),p<1/0&&p>=0&&(d=t.substring(0,p+1))}if(this.state.top&&(f=this.tokenizer.paragraph(d))){let p=r.at(-1);a&&(p==null?void 0:p.type)==="paragraph"?(p.raw+=(p.raw.endsWith(`
109
+ `)?"":`
110
+ `)+f.raw,p.text+=`
111
+ `+f.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):r.push(f),a=d.length!==t.length,t=t.substring(f.raw.length);continue}if(f=this.tokenizer.text(t)){t=t.substring(f.raw.length);let p=r.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
112
+ `)?"":`
113
+ `)+f.raw,p.text+=`
114
+ `+f.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):r.push(f);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var d,p,g,x,m;this.tokenizer.lexer=this;let a=t,s=null;if(this.tokens.links){let C=Object.keys(this.tokens.links);if(C.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(a))!==null;)C.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=((p=(d=this.options.hooks)==null?void 0:d.emStrongMask)==null?void 0:p.call({lexer:this},a))??a;let c=!1,h="",f=1/0;for(;t;){if(t.length<f)f=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}c||(h=""),c=!1;let C;if((x=(g=this.options.extensions)==null?void 0:g.inline)!=null&&x.some(v=>(C=v.call({lexer:this},t,r))?(t=t.substring(C.raw.length),r.push(C),!0):!1))continue;if(C=this.tokenizer.escape(t)){t=t.substring(C.raw.length),r.push(C);continue}if(C=this.tokenizer.tag(t)){t=t.substring(C.raw.length),r.push(C);continue}if(C=this.tokenizer.link(t)){t=t.substring(C.raw.length),r.push(C);continue}if(C=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(C.raw.length);let v=r.at(-1);C.type==="text"&&(v==null?void 0:v.type)==="text"?(v.raw+=C.raw,v.text+=C.text):r.push(C);continue}if(C=this.tokenizer.emStrong(t,a,h)){t=t.substring(C.raw.length),r.push(C);continue}if(C=this.tokenizer.codespan(t)){t=t.substring(C.raw.length),r.push(C);continue}if(C=this.tokenizer.br(t)){t=t.substring(C.raw.length),r.push(C);continue}if(C=this.tokenizer.del(t,a,h)){t=t.substring(C.raw.length),r.push(C);continue}if(C=this.tokenizer.autolink(t)){t=t.substring(C.raw.length),r.push(C);continue}if(!this.state.inLink&&(C=this.tokenizer.url(t))){t=t.substring(C.raw.length),r.push(C);continue}let k=t;if((m=this.options.extensions)!=null&&m.startInline){let v=1/0,T=t.slice(1),_;this.options.extensions.startInline.forEach(E=>{_=E.call({lexer:this},T),typeof _=="number"&&_>=0&&(v=Math.min(v,_))}),v<1/0&&v>=0&&(k=t.substring(0,v+1))}if(C=this.tokenizer.inlineText(k)){t=t.substring(C.raw.length),C.raw.slice(-1)!=="_"&&(h=C.raw.slice(-1)),c=!0;let v=r.at(-1);(v==null?void 0:v.type)==="text"?(v.raw+=C.raw,v.text+=C.text):r.push(C);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return r}infiniteLoopError(t){let r="Infinite loop on byte: "+t;if(this.options.silent)console.error(r);else throw new Error(r)}},zu=class{constructor(t){Lt(this,"options");Lt(this,"parser");this.options=t||ls}space(t){return""}code({text:t,lang:r,escaped:a}){var c;let s=(c=(r||"").match(di.notSpaceStart))==null?void 0:c[0],l=t.replace(di.endingNewline,"")+`
115
+ `;return s?'<pre><code class="language-'+qr(s)+'">'+(a?l:qr(l,!0))+`</code></pre>
116
+ `:"<pre><code>"+(a?l:qr(l,!0))+`</code></pre>
117
+ `}blockquote({tokens:t}){return`<blockquote>
118
+ ${this.parser.parse(t)}</blockquote>
119
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
120
+ `}hr(t){return`<hr>
121
+ `}list(t){let r=t.ordered,a=t.start,s="";for(let h=0;h<t.items.length;h++){let f=t.items[h];s+=this.listitem(f)}let l=r?"ol":"ul",c=r&&a!==1?' start="'+a+'"':"";return"<"+l+c+`>
122
+ `+s+"</"+l+`>
123
+ `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
124
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
125
+ `}table(t){let r="",a="";for(let l=0;l<t.header.length;l++)a+=this.tablecell(t.header[l]);r+=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>
126
+ <thead>
127
+ `+r+`</thead>
128
+ `+s+`</table>
129
+ `}tablerow({text:t}){return`<tr>
130
+ ${t}</tr>
131
+ `}tablecell(t){let r=this.parser.parseInline(t.tokens),a=t.header?"th":"td";return(t.align?`<${a} align="${t.align}">`:`<${a}>`)+r+`</${a}>
132
+ `}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>${qr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:a}){let s=this.parser.parseInline(a),l=r1(t);if(l===null)return s;t=l;let c='<a href="'+t+'"';return r&&(c+=' title="'+qr(r)+'"'),c+=">"+s+"</a>",c}image({href:t,title:r,text:a,tokens:s}){s&&(a=this.parser.parseInline(s,this.parser.textRenderer));let l=r1(t);if(l===null)return qr(a);t=l;let c=`<img src="${t}" alt="${qr(a)}"`;return r&&(c+=` title="${qr(r)}"`),c+=">",c}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:qr(t.text)}},Zm=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}},Cr=class Ag{constructor(t){Lt(this,"options");Lt(this,"renderer");Lt(this,"textRenderer");this.options=t||ls,this.options.renderer=this.options.renderer||new zu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Zm}static parse(t,r){return new Ag(r).parse(t)}static parseInline(t,r){return new Ag(r).parseInline(t)}parse(t){var a,s;this.renderer.parser=this;let r="";for(let l=0;l<t.length;l++){let c=t[l];if((s=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&s[c.type]){let f=c,d=this.options.extensions.renderers[f.type].call({parser:this},f);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(f.type)){r+=d||"";continue}}let h=c;switch(h.type){case"space":{r+=this.renderer.space(h);break}case"hr":{r+=this.renderer.hr(h);break}case"heading":{r+=this.renderer.heading(h);break}case"code":{r+=this.renderer.code(h);break}case"table":{r+=this.renderer.table(h);break}case"blockquote":{r+=this.renderer.blockquote(h);break}case"list":{r+=this.renderer.list(h);break}case"checkbox":{r+=this.renderer.checkbox(h);break}case"html":{r+=this.renderer.html(h);break}case"def":{r+=this.renderer.def(h);break}case"paragraph":{r+=this.renderer.paragraph(h);break}case"text":{r+=this.renderer.text(h);break}default:{let f='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return r}parseInline(t,r=this.renderer){var s,l;this.renderer.parser=this;let a="";for(let c=0;c<t.length;c++){let h=t[c];if((l=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&l[h.type]){let d=this.options.extensions.renderers[h.type].call({parser:this},h);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)){a+=d||"";continue}}let f=h;switch(f.type){case"escape":{a+=r.text(f);break}case"html":{a+=r.html(f);break}case"link":{a+=r.link(f);break}case"image":{a+=r.image(f);break}case"checkbox":{a+=r.checkbox(f);break}case"strong":{a+=r.strong(f);break}case"em":{a+=r.em(f);break}case"codespan":{a+=r.codespan(f);break}case"br":{a+=r.br(f);break}case"del":{a+=r.del(f);break}case"text":{a+=r.text(f);break}default:{let d='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return a}},gu,Qo=(gu=class{constructor(t){Lt(this,"options");Lt(this,"block");this.options=t||ls}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?br.lex:br.lexInline}provideParser(t=this.block){return t?Cr.parse:Cr.parseInline}},Lt(gu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Lt(gu,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),gu),UM=class{constructor(...t){Lt(this,"defaults",Um());Lt(this,"options",this.setOptions);Lt(this,"parse",this.parseMarkdown(!0));Lt(this,"parseInline",this.parseMarkdown(!1));Lt(this,"Parser",Cr);Lt(this,"Renderer",zu);Lt(this,"TextRenderer",Zm);Lt(this,"Lexer",br);Lt(this,"Tokenizer",$u);Lt(this,"Hooks",Qo);this.use(...t)}walkTokens(t,r){var s,l;let a=[];for(let c of t)switch(a=a.concat(r.call(this,c)),c.type){case"table":{let h=c;for(let f of h.header)a=a.concat(this.walkTokens(f.tokens,r));for(let f of h.rows)for(let d of f)a=a.concat(this.walkTokens(d.tokens,r));break}case"list":{let h=c;a=a.concat(this.walkTokens(h.items,r));break}default:{let h=c;(l=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&l[h.type]?this.defaults.extensions.childTokens[h.type].forEach(f=>{let d=h[f].flat(1/0);a=a.concat(this.walkTokens(d,r))}):h.tokens&&(a=a.concat(this.walkTokens(h.tokens,r)))}}return a}use(...t){let r=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=r.renderers[l.name];c?r.renderers[l.name]=function(...h){let f=l.renderer.apply(this,h);return f===!1&&(f=c.apply(this,h)),f}:r.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=r[l.level];c?c.unshift(l.tokenizer):r[l.level]=[l.tokenizer],l.start&&(l.level==="block"?r.startBlock?r.startBlock.push(l.start):r.startBlock=[l.start]:l.level==="inline"&&(r.startInline?r.startInline.push(l.start):r.startInline=[l.start]))}"childTokens"in l&&l.childTokens&&(r.childTokens[l.name]=l.childTokens)}),s.extensions=r),a.renderer){let l=this.defaults.renderer||new zu(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,f=a.renderer[h],d=l[h];l[h]=(...p)=>{let g=f.apply(l,p);return g===!1&&(g=d.apply(l,p)),g||""}}s.renderer=l}if(a.tokenizer){let l=this.defaults.tokenizer||new $u(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,f=a.tokenizer[h],d=l[h];l[h]=(...p)=>{let g=f.apply(l,p);return g===!1&&(g=d.apply(l,p)),g}}s.tokenizer=l}if(a.hooks){let l=this.defaults.hooks||new Qo;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,f=a.hooks[h],d=l[h];Qo.passThroughHooks.has(c)?l[h]=p=>{if(this.defaults.async&&Qo.passThroughHooksRespectAsync.has(c))return(async()=>{let x=await f.call(l,p);return d.call(l,x)})();let g=f.call(l,p);return d.call(l,g)}:l[h]=(...p)=>{if(this.defaults.async)return(async()=>{let x=await f.apply(l,p);return x===!1&&(x=await d.apply(l,p)),x})();let g=f.apply(l,p);return g===!1&&(g=d.apply(l,p)),g}}s.hooks=l}if(a.walkTokens){let l=this.defaults.walkTokens,c=a.walkTokens;s.walkTokens=function(h){let f=[];return f.push(c.call(this,h)),l&&(f=f.concat(l.call(this,h))),f}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return br.lex(t,r??this.defaults)}parser(t,r){return Cr.parse(t,r??this.defaults)}parseMarkdown(t){return(r,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 r>"u"||r===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", 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(r):r,f=await(l.hooks?await l.hooks.provideLexer(t):t?br.lex:br.lexInline)(h,l),d=l.hooks?await l.hooks.processAllTokens(f):f;l.walkTokens&&await Promise.all(this.walkTokens(d,l.walkTokens));let p=await(l.hooks?await l.hooks.provideParser(t):t?Cr.parse:Cr.parseInline)(d,l);return l.hooks?await l.hooks.postprocess(p):p})().catch(c);try{l.hooks&&(r=l.hooks.preprocess(r));let h=(l.hooks?l.hooks.provideLexer(t):t?br.lex:br.lexInline)(r,l);l.hooks&&(h=l.hooks.processAllTokens(h)),l.walkTokens&&this.walkTokens(h,l.walkTokens);let f=(l.hooks?l.hooks.provideParser(t):t?Cr.parse:Cr.parseInline)(h,l);return l.hooks&&(f=l.hooks.postprocess(f)),f}catch(h){return c(h)}}}onError(t,r){return a=>{if(a.message+=`
133
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+qr(a.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(a);throw a}}},Jn=new UM;function ce(e,t){return Jn.parse(e,t)}ce.options=ce.setOptions=function(e){return Jn.setOptions(e),ce.defaults=Jn.defaults,pk(ce.defaults),ce};ce.getDefaults=Um;ce.defaults=ls;ce.use=function(...e){return Jn.use(...e),ce.defaults=Jn.defaults,pk(ce.defaults),ce};ce.walkTokens=function(e,t){return Jn.walkTokens(e,t)};ce.parseInline=Jn.parseInline;ce.Parser=Cr;ce.parser=Cr.parse;ce.Renderer=zu;ce.TextRenderer=Zm;ce.Lexer=br;ce.lexer=br.lex;ce.Tokenizer=$u;ce.Hooks=Qo;ce.parse=ce;ce.options;ce.setOptions;ce.use;ce.walkTokens;ce.parseInline;Cr.parse;br.lex;const jM="modulepreload",PM=function(e){return"/"+e},l1={},Kt=function(t,r,a){let s=Promise.resolve();if(r&&r.length>0){let c=function(d){return Promise.all(d.map(p=>Promise.resolve(p).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),f=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));s=c(r.map(d=>{if(d=PM(d),d in l1)return;l1[d]=!0;const p=d.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${g}`))return;const x=document.createElement("link");if(x.rel=p?"stylesheet":jM,p||(x.as="script"),x.crossOrigin="",x.href=d,f&&x.setAttribute("nonce",f),document.head.appendChild(x),p)return new Promise((m,C)=>{x.addEventListener("load",m),x.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${d}`)))})}))}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 bu={exports:{}},WM=bu.exports,o1;function YM(){return o1||(o1=1,(function(e,t){(function(r,a){e.exports=a()})(WM,(function(){var r=1e3,a=6e4,s=36e5,l="millisecond",c="second",h="minute",f="hour",d="day",p="week",g="month",x="quarter",m="year",C="date",k="Invalid Date",v=/^(\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(Y){var j=["th","st","nd","rd"],A=Y%100;return"["+Y+(j[(A-20)%10]||j[A]||j[0])+"]"}},E=function(Y,j,A){var z=String(Y);return!z||z.length>=j?Y:""+Array(j+1-z.length).join(A)+Y},R={s:E,z:function(Y){var j=-Y.utcOffset(),A=Math.abs(j),z=Math.floor(A/60),O=A%60;return(j<=0?"+":"-")+E(z,2,"0")+":"+E(O,2,"0")},m:function Y(j,A){if(j.date()<A.date())return-Y(A,j);var z=12*(A.year()-j.year())+(A.month()-j.month()),O=j.clone().add(z,g),M=A-O<0,Q=j.clone().add(z+(M?-1:1),g);return+(-(z+(A-O)/(M?O-Q:Q-O))||0)},a:function(Y){return Y<0?Math.ceil(Y)||0:Math.floor(Y)},p:function(Y){return{M:g,y:m,w:p,d,D:C,h:f,m:h,s:c,ms:l,Q:x}[Y]||String(Y||"").toLowerCase().replace(/s$/,"")},u:function(Y){return Y===void 0}},F="en",N={};N[F]=_;var H="$isDayjsObject",I=function(Y){return Y instanceof V||!(!Y||!Y[H])},at=function Y(j,A,z){var O;if(!j)return F;if(typeof j=="string"){var M=j.toLowerCase();N[M]&&(O=M),A&&(N[M]=A,O=M);var Q=j.split("-");if(!O&&Q.length>1)return Y(Q[0])}else{var $=j.name;N[$]=j,O=$}return!z&&O&&(F=O),O||!z&&F},X=function(Y,j){if(I(Y))return Y.clone();var A=typeof j=="object"?j:{};return A.date=Y,A.args=arguments,new V(A)},D=R;D.l=at,D.i=I,D.w=function(Y,j){return X(Y,{locale:j.$L,utc:j.$u,x:j.$x,$offset:j.$offset})};var V=(function(){function Y(A){this.$L=at(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[H]=!0}var j=Y.prototype;return j.parse=function(A){this.$d=(function(z){var O=z.date,M=z.utc;if(O===null)return new Date(NaN);if(D.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var Q=O.match(v);if(Q){var $=Q[2]-1||0,tt=(Q[7]||"0").substring(0,3);return M?new Date(Date.UTC(Q[1],$,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,tt)):new Date(Q[1],$,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,tt)}}return new Date(O)})(A),this.init()},j.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()},j.$utils=function(){return D},j.isValid=function(){return this.$d.toString()!==k},j.isSame=function(A,z){var O=X(A);return this.startOf(z)<=O&&O<=this.endOf(z)},j.isAfter=function(A,z){return X(A)<this.startOf(z)},j.isBefore=function(A,z){return this.endOf(z)<X(A)},j.$g=function(A,z,O){return D.u(A)?this[z]:this.set(O,A)},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function(A,z){var O=this,M=!!D.u(z)||z,Q=D.p(A),$=function(pt,mt){var Ct=D.w(O.$u?Date.UTC(O.$y,mt,pt):new Date(O.$y,mt,pt),O);return M?Ct:Ct.endOf(d)},tt=function(pt,mt){return D.w(O.toDate()[pt].apply(O.toDate("s"),(M?[0,0,0,0]:[23,59,59,999]).slice(mt)),O)},ct=this.$W,ht=this.$M,yt=this.$D,xt="set"+(this.$u?"UTC":"");switch(Q){case m:return M?$(1,0):$(31,11);case g:return M?$(1,ht):$(0,ht+1);case p:var Ft=this.$locale().weekStart||0,Dt=(ct<Ft?ct+7:ct)-Ft;return $(M?yt-Dt:yt+(6-Dt),ht);case d:case C:return tt(xt+"Hours",0);case f:return tt(xt+"Minutes",1);case h:return tt(xt+"Seconds",2);case c:return tt(xt+"Milliseconds",3);default:return this.clone()}},j.endOf=function(A){return this.startOf(A,!1)},j.$set=function(A,z){var O,M=D.p(A),Q="set"+(this.$u?"UTC":""),$=(O={},O[d]=Q+"Date",O[C]=Q+"Date",O[g]=Q+"Month",O[m]=Q+"FullYear",O[f]=Q+"Hours",O[h]=Q+"Minutes",O[c]=Q+"Seconds",O[l]=Q+"Milliseconds",O)[M],tt=M===d?this.$D+(z-this.$W):z;if(M===g||M===m){var ct=this.clone().set(C,1);ct.$d[$](tt),ct.init(),this.$d=ct.set(C,Math.min(this.$D,ct.daysInMonth())).$d}else $&&this.$d[$](tt);return this.init(),this},j.set=function(A,z){return this.clone().$set(A,z)},j.get=function(A){return this[D.p(A)]()},j.add=function(A,z){var O,M=this;A=Number(A);var Q=D.p(z),$=function(ht){var yt=X(M);return D.w(yt.date(yt.date()+Math.round(ht*A)),M)};if(Q===g)return this.set(g,this.$M+A);if(Q===m)return this.set(m,this.$y+A);if(Q===d)return $(1);if(Q===p)return $(7);var tt=(O={},O[h]=a,O[f]=s,O[c]=r,O)[Q]||1,ct=this.$d.getTime()+A*tt;return D.w(ct,this)},j.subtract=function(A,z){return this.add(-1*A,z)},j.format=function(A){var z=this,O=this.$locale();if(!this.isValid())return O.invalidDate||k;var M=A||"YYYY-MM-DDTHH:mm:ssZ",Q=D.z(this),$=this.$H,tt=this.$m,ct=this.$M,ht=O.weekdays,yt=O.months,xt=O.meridiem,Ft=function(mt,Ct,Ht,he){return mt&&(mt[Ct]||mt(z,M))||Ht[Ct].slice(0,he)},Dt=function(mt){return D.s($%12||12,mt,"0")},pt=xt||function(mt,Ct,Ht){var he=mt<12?"AM":"PM";return Ht?he.toLowerCase():he};return M.replace(T,(function(mt,Ct){return Ct||(function(Ht){switch(Ht){case"YY":return String(z.$y).slice(-2);case"YYYY":return D.s(z.$y,4,"0");case"M":return ct+1;case"MM":return D.s(ct+1,2,"0");case"MMM":return Ft(O.monthsShort,ct,yt,3);case"MMMM":return Ft(yt,ct);case"D":return z.$D;case"DD":return D.s(z.$D,2,"0");case"d":return String(z.$W);case"dd":return Ft(O.weekdaysMin,z.$W,ht,2);case"ddd":return Ft(O.weekdaysShort,z.$W,ht,3);case"dddd":return ht[z.$W];case"H":return String($);case"HH":return D.s($,2,"0");case"h":return Dt(1);case"hh":return Dt(2);case"a":return pt($,tt,!0);case"A":return pt($,tt,!1);case"m":return String(tt);case"mm":return D.s(tt,2,"0");case"s":return String(z.$s);case"ss":return D.s(z.$s,2,"0");case"SSS":return D.s(z.$ms,3,"0");case"Z":return Q}return null})(mt)||Q.replace(":","")}))},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function(A,z,O){var M,Q=this,$=D.p(z),tt=X(A),ct=(tt.utcOffset()-this.utcOffset())*a,ht=this-tt,yt=function(){return D.m(Q,tt)};switch($){case m:M=yt()/12;break;case g:M=yt();break;case x:M=yt()/3;break;case p:M=(ht-ct)/6048e5;break;case d:M=(ht-ct)/864e5;break;case f:M=ht/s;break;case h:M=ht/a;break;case c:M=ht/r;break;default:M=ht}return O?M:D.a(M)},j.daysInMonth=function(){return this.endOf(g).$D},j.$locale=function(){return N[this.$L]},j.locale=function(A,z){if(!A)return this.$L;var O=this.clone(),M=at(A,z,!0);return M&&(O.$L=M),O},j.clone=function(){return D.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},Y})(),J=V.prototype;return X.prototype=J,[["$ms",l],["$s",c],["$m",h],["$H",f],["$W",d],["$M",g],["$y",m],["$D",C]].forEach((function(Y){J[Y[1]]=function(j){return this.$g(j,Y[0],Y[1])}})),X.extend=function(Y,j){return Y.$i||(Y(j,V,X),Y.$i=!0),X},X.locale=at,X.isDayjs=I,X.unix=function(Y){return X(1e3*Y)},X.en=N[F],X.Ls=N,X.p={},X}))})(bu)),bu.exports}var GM=YM();const XM=Rm(GM);var Tk=Object.defineProperty,S=(e,t)=>Tk(e,"name",{value:t,configurable:!0}),VM=(e,t)=>{for(var r in t)Tk(e,r,{get:t[r],enumerable:!0})},ya={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},gt={trace:S((...e)=>{},"trace"),debug:S((...e)=>{},"debug"),info:S((...e)=>{},"info"),warn:S((...e)=>{},"warn"),error:S((...e)=>{},"error"),fatal:S((...e)=>{},"fatal")},Qm=S(function(e="fatal"){let t=ya.fatal;typeof e=="string"?e.toLowerCase()in ya&&(t=ya[e]):typeof e=="number"&&(t=e),gt.trace=()=>{},gt.debug=()=>{},gt.info=()=>{},gt.warn=()=>{},gt.error=()=>{},gt.fatal=()=>{},t<=ya.fatal&&(gt.fatal=console.error?console.error.bind(console,cr("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",cr("FATAL"))),t<=ya.error&&(gt.error=console.error?console.error.bind(console,cr("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",cr("ERROR"))),t<=ya.warn&&(gt.warn=console.warn?console.warn.bind(console,cr("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",cr("WARN"))),t<=ya.info&&(gt.info=console.info?console.info.bind(console,cr("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",cr("INFO"))),t<=ya.debug&&(gt.debug=console.debug?console.debug.bind(console,cr("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",cr("DEBUG"))),t<=ya.trace&&(gt.trace=console.debug?console.debug.bind(console,cr("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",cr("TRACE")))},"setLogLevel"),cr=S(e=>`%c${XM().format("ss.SSS")} : ${e} : `,"format");const Cu={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},a)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;switch(a){case"r":return Cu.hue2rgb(l,s,e+1/3)*255;case"g":return Cu.hue2rgb(l,s,e)*255;case"b":return Cu.hue2rgb(l,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},a)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),l=Math.min(e,t,r),c=(s+l)/2;if(a==="l")return c*100;if(s===l)return 0;const h=s-l,f=c>.5?h/(2-s-l):h/(s+l);if(a==="s")return f*100;switch(s){case e:return((t-r)/h+(t<r?6:0))*60;case t:return((r-e)/h+2)*60;case r:return((e-t)/h+4)*60;default:return-1}}},ZM={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},QM={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},qt={channel:Cu,lang:ZM,unit:QM},fn={};for(let e=0;e<=255;e++)fn[e]=qt.unit.dec2hex(e);const ui={ALL:0,RGB:1,HSL:2};class KM{constructor(){this.type=ui.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=ui.ALL}is(t){return this.type===t}}class JM{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new KM}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=ui.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:a,l:s}=t;r===void 0&&(t.h=qt.channel.rgb2hsl(t,"h")),a===void 0&&(t.s=qt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=qt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:a,b:s}=t;r===void 0&&(t.r=qt.channel.hsl2rgb(t,"r")),a===void 0&&(t.g=qt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=qt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(ui.HSL)&&r!==void 0?r:(this._ensureHSL(),qt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(ui.HSL)&&r!==void 0?r:(this._ensureHSL(),qt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(ui.HSL)&&r!==void 0?r:(this._ensureHSL(),qt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(ui.RGB)&&r!==void 0?r:(this._ensureRGB(),qt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(ui.RGB)&&r!==void 0?r:(this._ensureRGB(),qt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(ui.RGB)&&r!==void 0?r:(this._ensureRGB(),qt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(ui.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(ui.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(ui.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(ui.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(ui.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(ui.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const vf=new JM({r:0,g:0,b:0,a:0},"transparent"),ul={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(ul.re);if(!t)return;const r=t[1],a=parseInt(r,16),s=r.length,l=s%4===0,c=s>4,h=c?1:17,f=c?8:4,d=l?0:-1,p=c?255:15;return vf.set({r:(a>>f*(d+3)&p)*h,g:(a>>f*(d+2)&p)*h,b:(a>>f*(d+1)&p)*h,a:l?(a&p)*h/255:1},e)},stringify:e=>{const{r:t,g:r,b:a,a:s}=e;return s<1?`#${fn[Math.round(t)]}${fn[Math.round(r)]}${fn[Math.round(a)]}${fn[Math.round(s*255)]}`:`#${fn[Math.round(t)]}${fn[Math.round(r)]}${fn[Math.round(a)]}`}},Gn={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(Gn.hueRe);if(t){const[,r,a]=t;switch(a){case"grad":return qt.channel.clamp.h(parseFloat(r)*.9);case"rad":return qt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return qt.channel.clamp.h(parseFloat(r)*360)}}return qt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Gn.re);if(!r)return;const[,a,s,l,c,h]=r;return vf.set({h:Gn._hue2deg(a),s:qt.channel.clamp.s(parseFloat(s)),l:qt.channel.clamp.l(parseFloat(l)),a:c?qt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{h:t,s:r,l:a,a:s}=e;return s<1?`hsla(${qt.lang.round(t)}, ${qt.lang.round(r)}%, ${qt.lang.round(a)}%, ${s})`:`hsl(${qt.lang.round(t)}, ${qt.lang.round(r)}%, ${qt.lang.round(a)}%)`}},lc={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=lc.colors[e];if(t)return ul.parse(t)},stringify:e=>{const t=ul.stringify(e);for(const r in lc.colors)if(lc.colors[r]===t)return r}},Ko={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Ko.re);if(!r)return;const[,a,s,l,c,h,f,d,p]=r;return vf.set({r:qt.channel.clamp.r(s?parseFloat(a)*2.55:parseFloat(a)),g:qt.channel.clamp.g(c?parseFloat(l)*2.55:parseFloat(l)),b:qt.channel.clamp.b(f?parseFloat(h)*2.55:parseFloat(h)),a:d?qt.channel.clamp.a(p?parseFloat(d)/100:parseFloat(d)):1},e)},stringify:e=>{const{r:t,g:r,b:a,a:s}=e;return s<1?`rgba(${qt.lang.round(t)}, ${qt.lang.round(r)}, ${qt.lang.round(a)}, ${qt.lang.round(s)})`:`rgb(${qt.lang.round(t)}, ${qt.lang.round(r)}, ${qt.lang.round(a)})`}},Wr={format:{keyword:lc,hex:ul,rgb:Ko,rgba:Ko,hsl:Gn,hsla:Gn},parse:e=>{if(typeof e!="string")return e;const t=ul.parse(e)||Ko.parse(e)||Gn.parse(e)||lc.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(ui.HSL)||e.data.r===void 0?Gn.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ko.stringify(e):ul.stringify(e)},wk=(e,t)=>{const r=Wr.parse(e);for(const a in t)r[a]=qt.channel.clamp[a](t[a]);return Wr.stringify(r)},mn=(e,t,r=0,a=1)=>{if(typeof e!="number")return wk(e,{a:t});const s=vf.set({r:qt.channel.clamp.r(e),g:qt.channel.clamp.g(t),b:qt.channel.clamp.b(r),a:qt.channel.clamp.a(a)});return Wr.stringify(s)},t5=e=>{const{r:t,g:r,b:a}=Wr.parse(e),s=.2126*qt.channel.toLinear(t)+.7152*qt.channel.toLinear(r)+.0722*qt.channel.toLinear(a);return qt.lang.round(s)},e5=e=>t5(e)>=.5,Mr=e=>!e5(e),_k=(e,t,r)=>{const a=Wr.parse(e),s=a[t],l=qt.channel.clamp[t](s+r);return s!==l&&(a[t]=l),Wr.stringify(a)},nt=(e,t)=>_k(e,"l",t),st=(e,t)=>_k(e,"l",-t),B=(e,t)=>{const r=Wr.parse(e),a={};for(const s in t)t[s]&&(a[s]=r[s]+t[s]);return wk(e,a)},i5=(e,t,r=50)=>{const{r:a,g:s,b:l,a:c}=Wr.parse(e),{r:h,g:f,b:d,a:p}=Wr.parse(t),g=r/100,x=g*2-1,m=c-p,k=((x*m===-1?x:(x+m)/(1+x*m))+1)/2,v=1-k,T=a*k+h*v,_=s*k+f*v,E=l*k+d*v,R=c*g+p*(1-g);return mn(T,_,E,R)},Z=(e,t=100)=>{const r=Wr.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,i5(r,e,t)};/*! @license DOMPurify 3.4.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.6/LICENSE */function c1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function r5(e){if(Array.isArray(e))return e}function a5(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,s,l,c,h=[],f=!0,d=!1;try{if(l=(r=r.call(e)).next,t!==0)for(;!(f=(a=l.call(r)).done)&&(h.push(a.value),h.length!==t);f=!0);}catch(p){d=!0,s=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(d)throw s}}return h}}function n5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
134
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s5(e,t){return r5(e)||a5(e,t)||l5(e,t)||n5()}function l5(e,t){if(e){if(typeof e=="string")return c1(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c1(e,t):void 0}}const Bk=Object.entries,h1=Object.setPrototypeOf,o5=Object.isFrozen,c5=Object.getPrototypeOf,h5=Object.getOwnPropertyDescriptor;let Ti=Object.freeze,hr=Object.seal,nl=Object.create,Ek=typeof Reflect<"u"&&Reflect,Mg=Ek.apply,Rg=Ek.construct;Ti||(Ti=function(t){return t});hr||(hr=function(t){return t});Mg||(Mg=function(t,r){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(r,s)});Rg||(Rg=function(t){for(var r=arguments.length,a=new Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return new t(...a)});const Js=Pe(Array.prototype.forEach),u5=Pe(Array.prototype.lastIndexOf),u1=Pe(Array.prototype.pop),tl=Pe(Array.prototype.push),f5=Pe(Array.prototype.splice),ki=Array.isArray,Jo=Pe(String.prototype.toLowerCase),rg=Pe(String.prototype.toString),f1=Pe(String.prototype.match),el=Pe(String.prototype.replace),d1=Pe(String.prototype.indexOf),d5=Pe(String.prototype.trim),p5=Pe(Number.prototype.toString),g5=Pe(Boolean.prototype.toString),p1=typeof BigInt>"u"?null:Pe(BigInt.prototype.toString),g1=typeof Symbol>"u"?null:Pe(Symbol.prototype.toString),Fe=Pe(Object.prototype.hasOwnProperty),Uo=Pe(Object.prototype.toString),ai=Pe(RegExp.prototype.test),jo=m5(TypeError);function Pe(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,a=new Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return Mg(e,t,a)}}function m5(e){return function(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return Rg(e,r)}}function Pt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Jo;if(h1&&h1(e,null),!ki(t))return e;let a=t.length;for(;a--;){let s=t[a];if(typeof s=="string"){const l=r(s);l!==s&&(o5(t)||(t[a]=l),s=l)}e[s]=!0}return e}function y5(e){for(let t=0;t<e.length;t++)Fe(e,t)||(e[t]=null);return e}function Di(e){const t=nl(null);for(const a of Bk(e)){var r=s5(a,2);const s=r[0],l=r[1];Fe(e,s)&&(ki(l)?t[s]=y5(l):l&&typeof l=="object"&&l.constructor===Object?t[s]=Di(l):t[s]=l)}return t}function x5(e){switch(typeof e){case"string":return e;case"number":return p5(e);case"boolean":return g5(e);case"bigint":return p1?p1(e):"0";case"symbol":return g1?g1(e):"Symbol()";case"undefined":return Uo(e);case"function":case"object":{if(e===null)return Uo(e);const t=e,r=Ir(t,"toString");if(typeof r=="function"){const a=r(t);return typeof a=="string"?a:Uo(a)}return Uo(e)}default:return Uo(e)}}function Ir(e,t){for(;e!==null;){const a=h5(e,t);if(a){if(a.get)return Pe(a.get);if(typeof a.value=="function")return Pe(a.value)}e=c5(e)}function r(){return null}return r}function b5(e){try{return ai(e,""),!0}catch{return!1}}const m1=Ti(["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"]),ag=Ti(["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"]),ng=Ti(["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"]),C5=Ti(["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"]),sg=Ti(["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"]),k5=Ti(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),y1=Ti(["#text"]),x1=Ti(["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"]),lg=Ti(["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"]),b1=Ti(["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"]),ru=Ti(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),v5=hr(/{{[\w\W]*|^[\w\W]*}}/g),S5=hr(/<%[\w\W]*|^[\w\W]*%>/g),T5=hr(/\${[\w\W]*/g),w5=hr(/^data-[\-\w.\u00B7-\uFFFF]+$/),_5=hr(/^aria-[\-\w]+$/),C1=hr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),B5=hr(/^(?:\w+script|data):/i),E5=hr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),L5=hr(/^html$/i),A5=hr(/^[a-z][.\w]*(-[.\w]+)+$/i),un={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},M5=function(){return typeof window>"u"?null:window},R5=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let a=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(a=r.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}},k1=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Lk(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:M5();const t=wt=>Lk(wt);if(t.version="3.4.6",t.removed=[],!e||!e.document||e.document.nodeType!==un.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const a=r,s=a.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,c=e.Node,h=e.Element,f=e.NodeFilter,d=e.NamedNodeMap;d===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const p=e.DOMParser,g=e.trustedTypes,x=h.prototype,m=Ir(x,"cloneNode"),C=Ir(x,"remove"),k=Ir(x,"nextSibling"),v=Ir(x,"childNodes"),T=Ir(x,"parentNode"),_=Ir(x,"shadowRoot"),E=Ir(x,"attributes"),R=c&&c.prototype?Ir(c.prototype,"nodeType"):null,F=c&&c.prototype?Ir(c.prototype,"nodeName"):null;if(typeof l=="function"){const wt=r.createElement("template");wt.content&&wt.content.ownerDocument&&(r=wt.content.ownerDocument)}let N,H="";const I=r,at=I.implementation,X=I.createNodeIterator,D=I.createDocumentFragment,V=I.getElementsByTagName,J=a.importNode;let Y=k1();t.isSupported=typeof Bk=="function"&&typeof T=="function"&&at&&at.createHTMLDocument!==void 0;const j=v5,A=S5,z=T5,O=w5,M=_5,Q=B5,$=E5,tt=A5;let ct=C1,ht=null;const yt=Pt({},[...m1,...ag,...ng,...sg,...y1]);let xt=null;const Ft=Pt({},[...x1,...lg,...b1,...ru]);let Dt=Object.seal(nl(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}})),pt=null,mt=null;const Ct=Object.seal(nl(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ht=!0,he=!0,Oe=!1,ne=!0,Ce=!1,mi=!0,Te=!1,Zr=!1,Qr=!1,yi=!1,cs=!1,hs=!1,li=!0,qc=!1;const Pl="user-content-";let us=!0,Fr=!1,La={},qi=null;const Wl=Pt({},["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 Ic=null;const Aa=Pt({},["audio","video","img","source","image","track"]);let Ke=null;const dr=Pt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",fs="http://www.w3.org/2000/svg",Ki="http://www.w3.org/1999/xhtml";let Ma=Ki,Ra=!1,Fa=null;const ds=Pt({},[Ve,fs,Ki],rg);let pr=Pt({},["mi","mo","mn","ms","mtext"]),Oa=Pt({},["annotation-xml"]);const Sn=Pt({},["title","style","font","a","script"]);let Tn=null;const Hc=["application/xhtml+xml","text/html"],Yl="text/html";let xe=null,Da=null;const Uc=r.createElement("form"),Gl=function(q){return q instanceof RegExp||q instanceof Function},ps=function(){let q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Da&&Da===q)return;(!q||typeof q!="object")&&(q={}),q=Di(q),Tn=Hc.indexOf(q.PARSER_MEDIA_TYPE)===-1?Yl:q.PARSER_MEDIA_TYPE,xe=Tn==="application/xhtml+xml"?rg:Jo,ht=Fe(q,"ALLOWED_TAGS")&&ki(q.ALLOWED_TAGS)?Pt({},q.ALLOWED_TAGS,xe):yt,xt=Fe(q,"ALLOWED_ATTR")&&ki(q.ALLOWED_ATTR)?Pt({},q.ALLOWED_ATTR,xe):Ft,Fa=Fe(q,"ALLOWED_NAMESPACES")&&ki(q.ALLOWED_NAMESPACES)?Pt({},q.ALLOWED_NAMESPACES,rg):ds,Ke=Fe(q,"ADD_URI_SAFE_ATTR")&&ki(q.ADD_URI_SAFE_ATTR)?Pt(Di(dr),q.ADD_URI_SAFE_ATTR,xe):dr,Ic=Fe(q,"ADD_DATA_URI_TAGS")&&ki(q.ADD_DATA_URI_TAGS)?Pt(Di(Aa),q.ADD_DATA_URI_TAGS,xe):Aa,qi=Fe(q,"FORBID_CONTENTS")&&ki(q.FORBID_CONTENTS)?Pt({},q.FORBID_CONTENTS,xe):Wl,pt=Fe(q,"FORBID_TAGS")&&ki(q.FORBID_TAGS)?Pt({},q.FORBID_TAGS,xe):Di({}),mt=Fe(q,"FORBID_ATTR")&&ki(q.FORBID_ATTR)?Pt({},q.FORBID_ATTR,xe):Di({}),La=Fe(q,"USE_PROFILES")?q.USE_PROFILES&&typeof q.USE_PROFILES=="object"?Di(q.USE_PROFILES):q.USE_PROFILES:!1,Ht=q.ALLOW_ARIA_ATTR!==!1,he=q.ALLOW_DATA_ATTR!==!1,Oe=q.ALLOW_UNKNOWN_PROTOCOLS||!1,ne=q.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ce=q.SAFE_FOR_TEMPLATES||!1,mi=q.SAFE_FOR_XML!==!1,Te=q.WHOLE_DOCUMENT||!1,yi=q.RETURN_DOM||!1,cs=q.RETURN_DOM_FRAGMENT||!1,hs=q.RETURN_TRUSTED_TYPE||!1,Qr=q.FORCE_BODY||!1,li=q.SANITIZE_DOM!==!1,qc=q.SANITIZE_NAMED_PROPS||!1,us=q.KEEP_CONTENT!==!1,Fr=q.IN_PLACE||!1,ct=b5(q.ALLOWED_URI_REGEXP)?q.ALLOWED_URI_REGEXP:C1,Ma=typeof q.NAMESPACE=="string"?q.NAMESPACE:Ki,pr=Fe(q,"MATHML_TEXT_INTEGRATION_POINTS")&&q.MATHML_TEXT_INTEGRATION_POINTS&&typeof q.MATHML_TEXT_INTEGRATION_POINTS=="object"?Di(q.MATHML_TEXT_INTEGRATION_POINTS):Pt({},["mi","mo","mn","ms","mtext"]),Oa=Fe(q,"HTML_INTEGRATION_POINTS")&&q.HTML_INTEGRATION_POINTS&&typeof q.HTML_INTEGRATION_POINTS=="object"?Di(q.HTML_INTEGRATION_POINTS):Pt({},["annotation-xml"]);const ut=Fe(q,"CUSTOM_ELEMENT_HANDLING")&&q.CUSTOM_ELEMENT_HANDLING&&typeof q.CUSTOM_ELEMENT_HANDLING=="object"?Di(q.CUSTOM_ELEMENT_HANDLING):nl(null);if(Dt=nl(null),Fe(ut,"tagNameCheck")&&Gl(ut.tagNameCheck)&&(Dt.tagNameCheck=ut.tagNameCheck),Fe(ut,"attributeNameCheck")&&Gl(ut.attributeNameCheck)&&(Dt.attributeNameCheck=ut.attributeNameCheck),Fe(ut,"allowCustomizedBuiltInElements")&&typeof ut.allowCustomizedBuiltInElements=="boolean"&&(Dt.allowCustomizedBuiltInElements=ut.allowCustomizedBuiltInElements),Ce&&(he=!1),cs&&(yi=!0),La&&(ht=Pt({},y1),xt=nl(null),La.html===!0&&(Pt(ht,m1),Pt(xt,x1)),La.svg===!0&&(Pt(ht,ag),Pt(xt,lg),Pt(xt,ru)),La.svgFilters===!0&&(Pt(ht,ng),Pt(xt,lg),Pt(xt,ru)),La.mathMl===!0&&(Pt(ht,sg),Pt(xt,b1),Pt(xt,ru))),Ct.tagCheck=null,Ct.attributeCheck=null,Fe(q,"ADD_TAGS")&&(typeof q.ADD_TAGS=="function"?Ct.tagCheck=q.ADD_TAGS:ki(q.ADD_TAGS)&&(ht===yt&&(ht=Di(ht)),Pt(ht,q.ADD_TAGS,xe))),Fe(q,"ADD_ATTR")&&(typeof q.ADD_ATTR=="function"?Ct.attributeCheck=q.ADD_ATTR:ki(q.ADD_ATTR)&&(xt===Ft&&(xt=Di(xt)),Pt(xt,q.ADD_ATTR,xe))),Fe(q,"ADD_URI_SAFE_ATTR")&&ki(q.ADD_URI_SAFE_ATTR)&&Pt(Ke,q.ADD_URI_SAFE_ATTR,xe),Fe(q,"FORBID_CONTENTS")&&ki(q.FORBID_CONTENTS)&&(qi===Wl&&(qi=Di(qi)),Pt(qi,q.FORBID_CONTENTS,xe)),Fe(q,"ADD_FORBID_CONTENTS")&&ki(q.ADD_FORBID_CONTENTS)&&(qi===Wl&&(qi=Di(qi)),Pt(qi,q.ADD_FORBID_CONTENTS,xe)),us&&(ht["#text"]=!0),Te&&Pt(ht,["html","head","body"]),ht.table&&(Pt(ht,["tbody"]),delete pt.tbody),q.TRUSTED_TYPES_POLICY){if(typeof q.TRUSTED_TYPES_POLICY.createHTML!="function")throw jo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof q.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw jo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');N=q.TRUSTED_TYPES_POLICY,H=N.createHTML("")}else N===void 0&&(N=R5(g,s)),N!==null&&typeof H=="string"&&(H=N.createHTML(""));Ti&&Ti(q),Da=q},gs=Pt({},[...ag,...ng,...C5]),ms=Pt({},[...sg,...k5]),jc=function(q){let ut=T(q);(!ut||!ut.tagName)&&(ut={namespaceURI:Ma,tagName:"template"});const bt=Jo(q.tagName),se=Jo(ut.tagName);return Fa[q.namespaceURI]?q.namespaceURI===fs?ut.namespaceURI===Ki?bt==="svg":ut.namespaceURI===Ve?bt==="svg"&&(se==="annotation-xml"||pr[se]):!!gs[bt]:q.namespaceURI===Ve?ut.namespaceURI===Ki?bt==="math":ut.namespaceURI===fs?bt==="math"&&Oa[se]:!!ms[bt]:q.namespaceURI===Ki?ut.namespaceURI===fs&&!Oa[se]||ut.namespaceURI===Ve&&!pr[se]?!1:!ms[bt]&&(Sn[bt]||!gs[bt]):!!(Tn==="application/xhtml+xml"&&Fa[q.namespaceURI]):!1},_i=function(q){tl(t.removed,{element:q});try{T(q).removeChild(q)}catch{C(q)}},oi=function(q,ut){try{tl(t.removed,{attribute:ut.getAttributeNode(q),from:ut})}catch{tl(t.removed,{attribute:null,from:ut})}if(ut.removeAttribute(q),q==="is")if(yi||cs)try{_i(ut)}catch{}else try{ut.setAttribute(q,"")}catch{}},Ne=function(q){let ut=null,bt=null;if(Qr)q="<remove></remove>"+q;else{const ke=f1(q,/^[\r\n\t ]+/);bt=ke&&ke[0]}Tn==="application/xhtml+xml"&&Ma===Ki&&(q='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+q+"</body></html>");const se=N?N.createHTML(q):q;if(Ma===Ki)try{ut=new p().parseFromString(se,Tn)}catch{}if(!ut||!ut.documentElement){ut=at.createDocument(Ma,"template",null);try{ut.documentElement.innerHTML=Ra?H:se}catch{}}const te=ut.body||ut.documentElement;return q&&bt&&te.insertBefore(r.createTextNode(bt),te.childNodes[0]||null),Ma===Ki?V.call(ut,Te?"html":"body")[0]:Te?ut.documentElement:te},Je=function(q){return X.call(q.ownerDocument||q,q,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},Kr=function(q){q.normalize();const ut=X.call(q.ownerDocument||q,q,f.SHOW_TEXT|f.SHOW_COMMENT|f.SHOW_CDATA_SECTION|f.SHOW_PROCESSING_INSTRUCTION,null);let bt=ut.nextNode();for(;bt;){let se=bt.data;Js([j,A,z],te=>{se=el(se,te," ")}),bt.data=se,bt=ut.nextNode()}},$a=function(q){const ut=F?F(q):null;return typeof ut!="string"||xe(ut)!=="form"?!1:typeof q.nodeName!="string"||typeof q.textContent!="string"||typeof q.removeChild!="function"||q.attributes!==E(q)||typeof q.removeAttribute!="function"||typeof q.setAttribute!="function"||typeof q.namespaceURI!="string"||typeof q.insertBefore!="function"||typeof q.hasChildNodes!="function"||q.childNodes!==v(q)},Xl=function(q){if(!R||typeof q!="object"||q===null)return!1;try{return R(q)===un.documentFragment}catch{return!1}},ys=function(q){if(!R||typeof q!="object"||q===null)return!1;try{return typeof R(q)=="number"}catch{return!1}};function Ji(wt,q,ut){Js(wt,bt=>{bt.call(t,q,ut,Da)})}const za=function(q){let ut=null;if(Ji(Y.beforeSanitizeElements,q,null),$a(q))return _i(q),!0;const bt=xe(q.nodeName);if(Ji(Y.uponSanitizeElement,q,{tagName:bt,allowedTags:ht}),mi&&q.hasChildNodes()&&!ys(q.firstElementChild)&&ai(/<[/\w!]/g,q.innerHTML)&&ai(/<[/\w!]/g,q.textContent)||mi&&q.namespaceURI===Ki&&bt==="style"&&ys(q.firstElementChild)||q.nodeType===un.progressingInstruction||mi&&q.nodeType===un.comment&&ai(/<[/\w]/g,q.data))return _i(q),!0;if(pt[bt]||!(Ct.tagCheck instanceof Function&&Ct.tagCheck(bt))&&!ht[bt]){if(!pt[bt]&&Jr(bt)&&(Dt.tagNameCheck instanceof RegExp&&ai(Dt.tagNameCheck,bt)||Dt.tagNameCheck instanceof Function&&Dt.tagNameCheck(bt)))return!1;if(us&&!qi[bt]){const te=T(q)||q.parentNode,ke=v(q)||q.childNodes;if(ke&&te){const Bi=ke.length;for(let xi=Bi-1;xi>=0;--xi){const ci=m(ke[xi],!0);te.insertBefore(ci,k(q))}}}return _i(q),!0}return(R?R(q):q.nodeType)===un.element&&!jc(q)||(bt==="noscript"||bt==="noembed"||bt==="noframes")&&ai(/<\/no(script|embed|frames)/i,q.innerHTML)?(_i(q),!0):(Ce&&q.nodeType===un.text&&(ut=q.textContent,Js([j,A,z],te=>{ut=el(ut,te," ")}),q.textContent!==ut&&(tl(t.removed,{element:q.cloneNode()}),q.textContent=ut)),Ji(Y.afterSanitizeElements,q,null),!1)},xs=function(q,ut,bt){if(mt[ut]||li&&(ut==="id"||ut==="name")&&(bt in r||bt in Uc))return!1;const se=xt[ut]||Ct.attributeCheck instanceof Function&&Ct.attributeCheck(ut,q);if(!(he&&!mt[ut]&&ai(O,ut))){if(!(Ht&&ai(M,ut))){if(!se||mt[ut]){if(!(Jr(q)&&(Dt.tagNameCheck instanceof RegExp&&ai(Dt.tagNameCheck,q)||Dt.tagNameCheck instanceof Function&&Dt.tagNameCheck(q))&&(Dt.attributeNameCheck instanceof RegExp&&ai(Dt.attributeNameCheck,ut)||Dt.attributeNameCheck instanceof Function&&Dt.attributeNameCheck(ut,q))||ut==="is"&&Dt.allowCustomizedBuiltInElements&&(Dt.tagNameCheck instanceof RegExp&&ai(Dt.tagNameCheck,bt)||Dt.tagNameCheck instanceof Function&&Dt.tagNameCheck(bt))))return!1}else if(!Ke[ut]){if(!ai(ct,el(bt,$,""))){if(!((ut==="src"||ut==="xlink:href"||ut==="href")&&q!=="script"&&d1(bt,"data:")===0&&Ic[q])){if(!(Oe&&!ai(Q,el(bt,$,"")))){if(bt)return!1}}}}}}return!0},Na=Pt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Jr=function(q){return!Na[Jo(q)]&&ai(tt,q)},qa=function(q){Ji(Y.beforeSanitizeAttributes,q,null);const ut=q.attributes;if(!ut||$a(q))return;const bt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xt,forceKeepAttr:void 0};let se=ut.length;for(;se--;){const te=ut[se],ke=te.name,Bi=te.namespaceURI,xi=te.value,ci=xe(ke),Ii=xi;let le=ke==="value"?Ii:d5(Ii);if(bt.attrName=ci,bt.attrValue=le,bt.keepAttr=!0,bt.forceKeepAttr=void 0,Ji(Y.uponSanitizeAttribute,q,bt),le=bt.attrValue,qc&&(ci==="id"||ci==="name")&&d1(le,Pl)!==0&&(oi(ke,q),le=Pl+le),mi&&ai(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,le)){oi(ke,q);continue}if(ci==="attributename"&&f1(le,"href")){oi(ke,q);continue}if(bt.forceKeepAttr)continue;if(!bt.keepAttr){oi(ke,q);continue}if(!ne&&ai(/\/>/i,le)){oi(ke,q);continue}Ce&&Js([j,A,z],Pc=>{le=el(le,Pc," ")});const Vl=xe(q.nodeName);if(!xs(Vl,ci,le)){oi(ke,q);continue}if(N&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Bi)switch(g.getAttributeType(Vl,ci)){case"TrustedHTML":{le=N.createHTML(le);break}case"TrustedScriptURL":{le=N.createScriptURL(le);break}}if(le!==Ii)try{Bi?q.setAttributeNS(Bi,ke,le):q.setAttribute(ke,le),$a(q)?_i(q):u1(t.removed)}catch{oi(ke,q)}}Ji(Y.afterSanitizeAttributes,q,null)},Or=function(q){let ut=null;const bt=Je(q);for(Ji(Y.beforeSanitizeShadowDOM,q,null);ut=bt.nextNode();)Ji(Y.uponSanitizeShadowNode,ut,null),za(ut),qa(ut),Xl(ut.content)&&Or(ut.content);Ji(Y.afterSanitizeShadowDOM,q,null)},Ee=function(q){if((R?R(q):q.nodeType)===un.element){const te=_?_(q):q.shadowRoot;Xl(te)&&(Ee(te),Or(te))}const bt=v?v(q):q.childNodes;if(!bt)return;const se=[];Js(bt,te=>{tl(se,te)});for(const te of se)Ee(te)};return t.sanitize=function(wt){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ut=null,bt=null,se=null,te=null;if(Ra=!wt,Ra&&(wt="<!-->"),typeof wt!="string"&&!ys(wt)&&(wt=x5(wt),typeof wt!="string"))throw jo("dirty is not a string, aborting");if(!t.isSupported)return wt;if(Zr||ps(q),t.removed=[],typeof wt=="string"&&(Fr=!1),Fr){const xi=F?F(wt):wt.nodeName;if(typeof xi=="string"){const ci=xe(xi);if(!ht[ci]||pt[ci])throw jo("root node is forbidden and cannot be sanitized in-place")}if($a(wt))throw jo("root node is clobbered and cannot be sanitized in-place");Ee(wt)}else if(ys(wt))ut=Ne("<!---->"),bt=ut.ownerDocument.importNode(wt,!0),bt.nodeType===un.element&&bt.nodeName==="BODY"||bt.nodeName==="HTML"?ut=bt:ut.appendChild(bt),Ee(bt);else{if(!yi&&!Ce&&!Te&&wt.indexOf("<")===-1)return N&&hs?N.createHTML(wt):wt;if(ut=Ne(wt),!ut)return yi?null:hs?H:""}ut&&Qr&&_i(ut.firstChild);const ke=Je(Fr?wt:ut);for(;se=ke.nextNode();)za(se),qa(se),Xl(se.content)&&Or(se.content);if(Fr)return Ce&&Kr(wt),wt;if(yi){if(Ce&&Kr(ut),cs)for(te=D.call(ut.ownerDocument);ut.firstChild;)te.appendChild(ut.firstChild);else te=ut;return(xt.shadowroot||xt.shadowrootmode)&&(te=J.call(a,te,!0)),te}let Bi=Te?ut.outerHTML:ut.innerHTML;return Te&&ht["!doctype"]&&ut.ownerDocument&&ut.ownerDocument.doctype&&ut.ownerDocument.doctype.name&&ai(L5,ut.ownerDocument.doctype.name)&&(Bi="<!DOCTYPE "+ut.ownerDocument.doctype.name+`>
135
+ `+Bi),Ce&&Js([j,A,z],xi=>{Bi=el(Bi,xi," ")}),N&&hs?N.createHTML(Bi):Bi},t.setConfig=function(){let wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ps(wt),Zr=!0},t.clearConfig=function(){Da=null,Zr=!1},t.isValidAttribute=function(wt,q,ut){Da||ps({});const bt=xe(wt),se=xe(q);return xs(bt,se,ut)},t.addHook=function(wt,q){typeof q=="function"&&tl(Y[wt],q)},t.removeHook=function(wt,q){if(q!==void 0){const ut=u5(Y[wt],q);return ut===-1?void 0:f5(Y[wt],ut,1)[0]}return u1(Y[wt])},t.removeHooks=function(wt){Y[wt]=[]},t.removeAllHooks=function(){Y=k1()},t}var El=Lk(),Ak=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,oc=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,F5=/\s*%%.*\n/gm,pl,Mk=(pl=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},S(pl,"UnknownDiagramError"),pl),ts={},Km=S(function(e,t){e=e.replace(Ak,"").replace(oc,"").replace(F5,`
136
+ `);for(const[r,{detector:a}]of Object.entries(ts))if(a(e,t))return r;throw new Mk(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Fg=S((...e)=>{for(const{id:t,detector:r,loader:a}of e)Rk(t,r,a)},"registerLazyLoadedDiagrams"),Rk=S((e,t,r)=>{ts[e]&&gt.warn(`Detector with key ${e} already exists. Overwriting.`),ts[e]={detector:t,loader:r},gt.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),O5=S(e=>ts[e].loader,"getDiagramLoader"),Og=S((e,t,{depth:r=2,clobber:a=!1}={})=>{const s={depth:r,clobber:a};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(l=>Og(e,l,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(l=>{e.includes(l)||e.push(l)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(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]=Og(e[l],t[l],{depth:r-1,clobber:a})):(a||typeof e[l]!="object"&&typeof t[l]!="object")&&(e[l]=t[l])}),e)},"assignWithDepth"),Ge=Og,Gr="#ffffff",Xr="#f2f2f2",Nt=S((e,t)=>t?B(e,{s:-40,l:10}):B(e,{s:-40,l:-10}),"mkBorder"),gl,D5=(gl=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(){var r,a,s,l,c,h,f,d,p,g,x,m,C,k,v,T,_,E,R,F,N,H,I,at,X,D,V,J,Y,j,A,z,O,M;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||Nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Nt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Nt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Z(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Z(this.tertiaryColor),this.lineColor=this.lineColor||Z(this.background),this.arrowheadColor=this.arrowheadColor||Z(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?st(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||st(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Z(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||nt(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||st(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||st(this.mainBkg,10)):(this.rowOdd=this.rowOdd||nt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||nt(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 Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScale"+Q]=st(this["cScale"+Q],75);else for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScale"+Q]=st(this["cScale"+Q],25);for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScaleInv"+Q]=this["cScaleInv"+Q]||Z(this["cScale"+Q]);for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this.darkMode?this["cScalePeer"+Q]=this["cScalePeer"+Q]||nt(this["cScale"+Q],10):this["cScalePeer"+Q]=this["cScalePeer"+Q]||st(this["cScale"+Q],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScaleLabel"+Q]=this["cScaleLabel"+Q]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let Q=0;Q<5;Q++)this["surface"+Q]=this["surface"+Q]||B(this.mainBkg,{h:180,s:-15,l:t*(5+Q*3)}),this["surfacePeer"+Q]=this["surfacePeer"+Q]||B(this.mainBkg,{h:180,s:-15,l:t*(8+Q*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:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((a=this.radar)==null?void 0:a.axisStrokeWidth)||2,axisLabelFontSize:((s=this.radar)==null?void 0:s.axisLabelFontSize)||12,curveOpacity:((l=this.radar)==null?void 0:l.curveOpacity)||.5,curveStrokeWidth:((c=this.radar)==null?void 0:c.curveStrokeWidth)||2,graticuleColor:((h=this.radar)==null?void 0:h.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((f=this.radar)==null?void 0:f.graticuleStrokeWidth)||1,graticuleOpacity:((d=this.radar)==null?void 0:d.graticuleOpacity)||.3,legendBoxSize:((p=this.radar)==null?void 0:p.legendBoxSize)||12,legendFontSize:((g=this.radar)==null?void 0:g.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((x=this.wardley)==null?void 0:x.backgroundColor)||this.background,axisColor:((m=this.wardley)==null?void 0:m.axisColor)||this.lineColor,axisTextColor:((C=this.wardley)==null?void 0:C.axisTextColor)||this.primaryTextColor,gridColor:((k=this.wardley)==null?void 0:k.gridColor)||this.gridColor,componentFill:((v=this.wardley)==null?void 0:v.componentFill)||this.background,componentStroke:((T=this.wardley)==null?void 0:T.componentStroke)||this.lineColor,componentLabelColor:((_=this.wardley)==null?void 0:_.componentLabelColor)||this.primaryTextColor,linkStroke:((E=this.wardley)==null?void 0:E.linkStroke)||this.lineColor,evolutionStroke:((R=this.wardley)==null?void 0:R.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((F=this.wardley)==null?void 0:F.annotationStroke)||this.lineColor,annotationTextColor:((N=this.wardley)==null?void 0:N.annotationTextColor)||this.primaryTextColor,annotationFill:((H=this.wardley)==null?void 0:H.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||Mr(this.quadrant1Fill)?nt(this.quadrant1Fill):st(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:((I=this.xyChart)==null?void 0:I.backgroundColor)||this.background,titleColor:((at=this.xyChart)==null?void 0:at.titleColor)||this.primaryTextColor,dataLabelColor:((X=this.xyChart)==null?void 0:X.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((D=this.xyChart)==null?void 0:D.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((V=this.xyChart)==null?void 0:V.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((J=this.xyChart)==null?void 0:J.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Y=this.xyChart)==null?void 0:Y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((j=this.xyChart)==null?void 0:j.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((A=this.xyChart)==null?void 0:A.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((z=this.xyChart)==null?void 0:z.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((M=this.xyChart)==null?void 0:M.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?st(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=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)):(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)),this.gitInv0=this.gitInv0||Z(this.git0),this.gitInv1=this.gitInv1||Z(this.git1),this.gitInv2=this.gitInv2||Z(this.git2),this.gitInv3=this.gitInv3||Z(this.git3),this.gitInv4=this.gitInv4||Z(this.git4),this.gitInv5=this.gitInv5||Z(this.git5),this.gitInv6=this.gitInv6||Z(this.git6),this.gitInv7=this.gitInv7||Z(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||Gr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xr,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(a=>{this[a]=t[a]}),this.updateColors(),r.forEach(a=>{this[a]=t[a]})}},S(gl,"Theme"),gl),$5=S(e=>{const t=new D5;return t.calculate(e),t},"getThemeVariables"),ml,z5=(ml=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=nt(this.primaryColor,16),this.tertiaryColor=B(this.primaryColor,{h:-160}),this.primaryBorderColor=Z(this.background),this.secondaryBorderColor=Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Z(this.primaryColor),this.secondaryTextColor=Z(this.secondaryColor),this.tertiaryTextColor=Z(this.tertiaryColor),this.lineColor=Z(this.background),this.textColor=Z(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=nt(Z("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=mn(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=st("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=st(this.sectionBkgColor,10),this.taskBorderColor=mn(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=mn(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||nt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||st(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(){var t,r,a,s,l,c,h,f,d,p,g,x,m,C,k,v,T,_,E,R,F,N,H,I,at,X,D,V,J,Y,j,A,z,O;this.secondBkg=nt(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=nt(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=nt(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=Z(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 M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||Z(this["cScale"+M]);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScalePeer"+M]=this["cScalePeer"+M]||nt(this["cScale"+M],10);for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||B(this.mainBkg,{h:30,s:-30,l:-(-10+M*4)}),this["surfacePeer"+M]=this["surfacePeer"+M]||B(this.mainBkg,{h:30,s:-30,l:-(-7+M*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||this.scaleLabelColor;for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["pie"+M]=this["cScale"+M];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 M=0;M<8;M++)this["venn"+(M+1)]=this["venn"+(M+1)]??nt(this["cScale"+M],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||Mr(this.quadrant1Fill)?nt(this.quadrant1Fill):st(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((a=this.xyChart)==null?void 0:a.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((f=this.xyChart)==null?void 0:f.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.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:((m=this.radar)==null?void 0:m.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((v=this.radar)==null?void 0:v.curveOpacity)||.5,curveStrokeWidth:((T=this.radar)==null?void 0:T.curveStrokeWidth)||2,graticuleColor:((_=this.radar)==null?void 0:_.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((R=this.radar)==null?void 0:R.graticuleOpacity)||.3,legendBoxSize:((F=this.radar)==null?void 0:F.legendBoxSize)||12,legendFontSize:((N=this.radar)==null?void 0:N.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((H=this.wardley)==null?void 0:H.backgroundColor)||this.background,axisColor:((I=this.wardley)==null?void 0:I.axisColor)||this.lineColor,axisTextColor:((at=this.wardley)==null?void 0:at.axisTextColor)||this.primaryTextColor,gridColor:((X=this.wardley)==null?void 0:X.gridColor)||this.gridColor,componentFill:((D=this.wardley)==null?void 0:D.componentFill)||this.mainBkg,componentStroke:((V=this.wardley)==null?void 0:V.componentStroke)||this.lineColor,componentLabelColor:((J=this.wardley)==null?void 0:J.componentLabelColor)||this.primaryTextColor,linkStroke:((Y=this.wardley)==null?void 0:Y.linkStroke)||this.lineColor,evolutionStroke:((j=this.wardley)==null?void 0:j.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((A=this.wardley)==null?void 0:A.annotationStroke)||this.lineColor,annotationTextColor:((z=this.wardley)==null?void 0:z.annotationTextColor)||this.primaryTextColor,annotationFill:((O=this.wardley)==null?void 0:O.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?st(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=nt(this.secondaryColor,20),this.git1=nt(this.pie2||this.secondaryColor,20),this.git2=nt(this.pie3||this.tertiaryColor,20),this.git3=nt(this.pie4||B(this.primaryColor,{h:-30}),20),this.git4=nt(this.pie5||B(this.primaryColor,{h:-60}),20),this.git5=nt(this.pie6||B(this.primaryColor,{h:-90}),10),this.git6=nt(this.pie7||B(this.primaryColor,{h:60}),10),this.git7=nt(this.pie8||B(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Z(this.git0),this.gitInv1=this.gitInv1||Z(this.git1),this.gitInv2=this.gitInv2||Z(this.git2),this.gitInv3=this.gitInv3||Z(this.git3),this.gitInv4=this.gitInv4||Z(this.git4),this.gitInv5=this.gitInv5||Z(this.git5),this.gitInv6=this.gitInv6||Z(this.git6),this.gitInv7=this.gitInv7||Z(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Z(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Z(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||nt("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||nt("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||nt("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||nt("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||nt(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||nt(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||nt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nt(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(a=>{this[a]=t[a]}),this.updateColors(),r.forEach(a=>{this[a]=t[a]})}},S(ml,"Theme"),ml),N5=S(e=>{const t=new z5;return t.calculate(e),t},"getThemeVariables"),yl,q5=(yl=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=Nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Z(this.primaryColor),this.secondaryTextColor=Z(this.secondaryColor),this.tertiaryTextColor=Z(this.tertiaryColor),this.lineColor=Z(this.background),this.textColor=Z(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Nt(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=mn(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(){var t,r,a,s,l,c,h,f,d,p,g,x,m,C,k,v,T,_,E,R,F,N,H,I,at,X,D,V,J,Y,j,A,z,O;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||st(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||st(this.tertiaryColor,40);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScale"+M]=st(this["cScale"+M],10),this["cScalePeer"+M]=this["cScalePeer"+M]||st(this["cScale"+M],25);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||B(this["cScale"+M],{h:180});for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||B(this.mainBkg,{h:30,l:-(5+M*5)}),this["surfacePeer"+M]=this["surfacePeer"+M]||B(this.mainBkg,{h:30,l:-(7+M*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||Z(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Z(this.labelTextColor);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||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||nt(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||nt(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||Mr(this.quadrant1Fill)?nt(this.quadrant1Fill):st(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((l=this.radar)==null?void 0:l.curveStrokeWidth)||2,graticuleColor:((c=this.radar)==null?void 0:c.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((h=this.radar)==null?void 0:h.graticuleStrokeWidth)||1,graticuleOpacity:((f=this.radar)==null?void 0:f.graticuleOpacity)||.3,legendBoxSize:((d=this.radar)==null?void 0:d.legendBoxSize)||12,legendFontSize:((p=this.radar)==null?void 0:p.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((g=this.wardley)==null?void 0:g.backgroundColor)||this.background,axisColor:((x=this.wardley)==null?void 0:x.axisColor)||this.lineColor,axisTextColor:((m=this.wardley)==null?void 0:m.axisTextColor)||this.primaryTextColor,gridColor:((C=this.wardley)==null?void 0:C.gridColor)||this.gridColor,componentFill:((k=this.wardley)==null?void 0:k.componentFill)||this.background,componentStroke:((v=this.wardley)==null?void 0:v.componentStroke)||this.lineColor,componentLabelColor:((T=this.wardley)==null?void 0:T.componentLabelColor)||this.primaryTextColor,linkStroke:((_=this.wardley)==null?void 0:_.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((R=this.wardley)==null?void 0:R.annotationStroke)||this.lineColor,annotationTextColor:((F=this.wardley)==null?void 0:F.annotationTextColor)||this.primaryTextColor,annotationFill:((N=this.wardley)==null?void 0:N.annotationFill)||this.background},this.xyChart={backgroundColor:((H=this.xyChart)==null?void 0:H.backgroundColor)||this.background,titleColor:((I=this.xyChart)==null?void 0:I.titleColor)||this.primaryTextColor,dataLabelColor:((at=this.xyChart)==null?void 0:at.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((X=this.xyChart)==null?void 0:X.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((D=this.xyChart)==null?void 0:D.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((V=this.xyChart)==null?void 0:V.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((J=this.xyChart)==null?void 0:J.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Y=this.xyChart)==null?void 0:Y.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((j=this.xyChart)==null?void 0:j.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((A=this.xyChart)==null?void 0:A.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((z=this.xyChart)==null?void 0:z.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((O=this.xyChart)==null?void 0:O.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=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)):(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)),this.gitInv0=this.gitInv0||st(Z(this.git0),25),this.gitInv1=this.gitInv1||Z(this.git1),this.gitInv2=this.gitInv2||Z(this.git2),this.gitInv3=this.gitInv3||Z(this.git3),this.gitInv4=this.gitInv4||Z(this.git4),this.gitInv5=this.gitInv5||Z(this.git5),this.gitInv6=this.gitInv6||Z(this.git6),this.gitInv7=this.gitInv7||Z(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Z(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Z(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||Gr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xr}calculate(t){if(Object.keys(this).forEach(a=>{this[a]==="calculated"&&(this[a]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(a=>{this[a]=t[a]}),this.updateColors(),r.forEach(a=>{this[a]=t[a]})}},S(yl,"Theme"),yl),I5=S(e=>{const t=new q5;return t.calculate(e),t},"getThemeVariables"),xl,H5=(xl=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=nt("#cde498",10),this.primaryBorderColor=Nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Z(this.primaryColor),this.secondaryTextColor=Z(this.secondaryColor),this.tertiaryTextColor=Z(this.primaryColor),this.lineColor=Z(this.background),this.textColor=Z(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(){var t,r,a,s,l,c,h,f,d,p,g,x,m,C,k,v,T,_,E,R,F,N,H,I,at,X,D,V,J,Y,j,A,z,O;this.actorBorder=st(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||st(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||st(this.tertiaryColor,40);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScale"+M]=st(this["cScale"+M],10),this["cScalePeer"+M]=this["cScalePeer"+M]||st(this["cScale"+M],25);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||B(this["cScale"+M],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||this.scaleLabelColor;for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||B(this.mainBkg,{h:30,s:-30,l:-(5+M*5)}),this["surfacePeer"+M]=this["surfacePeer"+M]||B(this.mainBkg,{h:30,s:-30,l:-(8+M*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||nt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||nt(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||Mr(this.quadrant1Fill)?nt(this.quadrant1Fill):st(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((l=this.radar)==null?void 0:l.curveStrokeWidth)||2,graticuleColor:((c=this.radar)==null?void 0:c.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((h=this.radar)==null?void 0:h.graticuleStrokeWidth)||1,graticuleOpacity:((f=this.radar)==null?void 0:f.graticuleOpacity)||.3,legendBoxSize:((d=this.radar)==null?void 0:d.legendBoxSize)||12,legendFontSize:((p=this.radar)==null?void 0:p.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((g=this.wardley)==null?void 0:g.backgroundColor)||this.background,axisColor:((x=this.wardley)==null?void 0:x.axisColor)||this.lineColor,axisTextColor:((m=this.wardley)==null?void 0:m.axisTextColor)||this.primaryTextColor,gridColor:((C=this.wardley)==null?void 0:C.gridColor)||this.gridColor,componentFill:((k=this.wardley)==null?void 0:k.componentFill)||this.background,componentStroke:((v=this.wardley)==null?void 0:v.componentStroke)||this.lineColor,componentLabelColor:((T=this.wardley)==null?void 0:T.componentLabelColor)||this.primaryTextColor,linkStroke:((_=this.wardley)==null?void 0:_.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((R=this.wardley)==null?void 0:R.annotationStroke)||this.lineColor,annotationTextColor:((F=this.wardley)==null?void 0:F.annotationTextColor)||this.primaryTextColor,annotationFill:((N=this.wardley)==null?void 0:N.annotationFill)||this.background},this.xyChart={backgroundColor:((H=this.xyChart)==null?void 0:H.backgroundColor)||this.background,titleColor:((I=this.xyChart)==null?void 0:I.titleColor)||this.primaryTextColor,dataLabelColor:((at=this.xyChart)==null?void 0:at.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((X=this.xyChart)==null?void 0:X.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((D=this.xyChart)==null?void 0:D.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((V=this.xyChart)==null?void 0:V.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((J=this.xyChart)==null?void 0:J.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Y=this.xyChart)==null?void 0:Y.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((j=this.xyChart)==null?void 0:j.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((A=this.xyChart)==null?void 0:A.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((z=this.xyChart)==null?void 0:z.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((O=this.xyChart)==null?void 0:O.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=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)):(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)),this.gitInv0=this.gitInv0||Z(this.git0),this.gitInv1=this.gitInv1||Z(this.git1),this.gitInv2=this.gitInv2||Z(this.git2),this.gitInv3=this.gitInv3||Z(this.git3),this.gitInv4=this.gitInv4||Z(this.git4),this.gitInv5=this.gitInv5||Z(this.git5),this.gitInv6=this.gitInv6||Z(this.git6),this.gitInv7=this.gitInv7||Z(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Z(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Z(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||Gr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(a=>{this[a]=t[a]}),this.updateColors(),r.forEach(a=>{this[a]=t[a]})}},S(xl,"Theme"),xl),U5=S(e=>{const t=new H5;return t.calculate(e),t},"getThemeVariables"),bl,j5=(bl=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=nt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=B(this.primaryColor,{h:-160}),this.primaryBorderColor=Nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Z(this.primaryColor),this.secondaryTextColor=Z(this.secondaryColor),this.tertiaryTextColor=Z(this.tertiaryColor),this.lineColor=Z(this.background),this.textColor=Z(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||nt(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(){var t,r,a,s,l,c,h,f,d,p,g,x,m,C,k,v,T,_,E,R,F,N,H,I,at,X,D,V,J,Y,j,A,z,O;this.secondBkg=nt(this.contrast,55),this.border2=this.contrast,this.actorBorder=nt(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 M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||Z(this["cScale"+M]);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this.darkMode?this["cScalePeer"+M]=this["cScalePeer"+M]||nt(this["cScale"+M],10):this["cScalePeer"+M]=this["cScalePeer"+M]||st(this["cScale"+M],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||this.scaleLabelColor;for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||B(this.mainBkg,{l:-(5+M*5)}),this["surfacePeer"+M]=this["surfacePeer"+M]||B(this.mainBkg,{l:-(8+M*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=nt(this.contrast,30),this.sectionBkgColor2=nt(this.contrast,30),this.taskBorderColor=st(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=nt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=st(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 M=0;M<this.THEME_COLOR_LIMIT;M++)this["pie"+M]=this["cScale"+M];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 M=0;M<8;M++)this["venn"+(M+1)]=this["venn"+(M+1)]??this["cScale"+M];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||Mr(this.quadrant1Fill)?nt(this.quadrant1Fill):st(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((a=this.xyChart)==null?void 0:a.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((f=this.xyChart)==null?void 0:f.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((m=this.radar)==null?void 0:m.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((v=this.radar)==null?void 0:v.curveOpacity)||.5,curveStrokeWidth:((T=this.radar)==null?void 0:T.curveStrokeWidth)||2,graticuleColor:((_=this.radar)==null?void 0:_.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((R=this.radar)==null?void 0:R.graticuleOpacity)||.3,legendBoxSize:((F=this.radar)==null?void 0:F.legendBoxSize)||12,legendFontSize:((N=this.radar)==null?void 0:N.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((H=this.wardley)==null?void 0:H.backgroundColor)||this.background,axisColor:((I=this.wardley)==null?void 0:I.axisColor)||this.lineColor,axisTextColor:((at=this.wardley)==null?void 0:at.axisTextColor)||this.primaryTextColor,gridColor:((X=this.wardley)==null?void 0:X.gridColor)||this.gridColor,componentFill:((D=this.wardley)==null?void 0:D.componentFill)||this.background,componentStroke:((V=this.wardley)==null?void 0:V.componentStroke)||this.lineColor,componentLabelColor:((J=this.wardley)==null?void 0:J.componentLabelColor)||this.primaryTextColor,linkStroke:((Y=this.wardley)==null?void 0:Y.linkStroke)||this.lineColor,evolutionStroke:((j=this.wardley)==null?void 0:j.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((A=this.wardley)==null?void 0:A.annotationStroke)||this.lineColor,annotationTextColor:((z=this.wardley)==null?void 0:z.annotationTextColor)||this.primaryTextColor,annotationFill:((O=this.wardley)==null?void 0:O.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=st(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||Z(this.git0),this.gitInv1=this.gitInv1||Z(this.git1),this.gitInv2=this.gitInv2||Z(this.git2),this.gitInv3=this.gitInv3||Z(this.git3),this.gitInv4=this.gitInv4||Z(this.git4),this.gitInv5=this.gitInv5||Z(this.git5),this.gitInv6=this.gitInv6||Z(this.git6),this.gitInv7=this.gitInv7||Z(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||Gr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(a=>{this[a]=t[a]}),this.updateColors(),r.forEach(a=>{this[a]=t[a]})}},S(bl,"Theme"),bl),P5=S(e=>{const t=new j5;return t.calculate(e),t},"getThemeVariables"),Cl,W5=(Cl=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=Nt(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(){var l,c,h,f,d,p,g,x,m,C,k;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||Nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Nt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Nt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Z(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Z(this.tertiaryColor),this.lineColor=this.lineColor||Z(this.background),this.arrowheadColor=this.arrowheadColor||Z(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?st(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||st(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Z(this.lineColor);const t="#ECECFE",r="#E9E9F1",a=B(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||a,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,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||nt(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||r,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 v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=st(this["cScale"+v],75);else for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=st(this["cScale"+v],25);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleInv"+v]=this["cScaleInv"+v]||Z(this["cScale"+v]);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this.darkMode?this["cScalePeer"+v]=this["cScalePeer"+v]||nt(this["cScale"+v],10):this["cScalePeer"+v]=this["cScalePeer"+v]||st(this["cScale"+v],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleLabel"+v]=this["cScaleLabel"+v]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let v=0;v<5;v++)this["surface"+v]=this["surface"+v]||B(this.mainBkg,{h:180,s:-15,l:s*(5+v*3)}),this["surfacePeer"+v]=this["surfacePeer"+v]||B(this.mainBkg,{h:180,s:-15,l:s*(8+v*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||B(t,{h:64}),this.fillType3=this.fillType3||B(r,{h:64}),this.fillType4=this.fillType4||B(t,{h:-64}),this.fillType5=this.fillType5||B(r,{h:-64}),this.fillType6=this.fillType6||B(t,{h:128}),this.fillType7=this.fillType7||B(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||a,this.pie4=this.pie4||B(t,{l:-10}),this.pie5=this.pie5||B(r,{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||Mr(this.quadrant1Fill)?nt(this.quadrant1Fill):st(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:((l=this.xyChart)==null?void 0:l.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((f=this.xyChart)==null?void 0:f.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((d=this.xyChart)==null?void 0:d.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((C=this.xyChart)==null?void 0:C.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((k=this.xyChart)==null?void 0:k.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?st(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,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=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)):(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)),this.gitInv0=this.gitInv0||Z(this.git0),this.gitInv1=this.gitInv1||Z(this.git1),this.gitInv2=this.gitInv2||Z(this.git2),this.gitInv3=this.gitInv3||Z(this.git3),this.gitInv4=this.gitInv4||Z(this.git4),this.gitInv5=this.gitInv5||Z(this.git5),this.gitInv6=this.gitInv6||Z(this.git6),this.gitInv7=this.gitInv7||Z(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||Gr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(a=>{this[a]=t[a]}),this.updateColors(),r.forEach(a=>{this[a]=t[a]})}},S(Cl,"Theme"),Cl),Y5=S(e=>{const t=new W5;return t.calculate(e),t},"getThemeVariables"),kl,G5=(kl=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=nt(this.primaryColor,16),this.tertiaryColor=B(this.primaryColor,{h:-160}),this.primaryBorderColor=Z(this.background),this.secondaryBorderColor=Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Z(this.primaryColor),this.secondaryTextColor=Z(this.secondaryColor),this.tertiaryTextColor=Z(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=nt(Z("#323D47"),10),this.border1="#ccc",this.border2=mn(255,255,255,.25),this.arrowheadColor=Z(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(){var r,a,s,l,c,h,f,d,p,g,x;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||Nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Nt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Nt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Z(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Z(this.tertiaryColor),this.lineColor=this.lineColor||Z(this.background),this.arrowheadColor=this.arrowheadColor||Z(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?st(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||st(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Z(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||nt(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 m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=st(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=st(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||Z(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||nt(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||st(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||B(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||B(this.mainBkg,{h:180,s:-15,l:t*(8+m*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||Mr(this.quadrant1Fill)?nt(this.quadrant1Fill):st(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((f=this.xyChart)==null?void 0:f.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.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?st(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=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)):(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)),this.gitInv0=this.gitInv0||Z(this.git0),this.gitInv1=this.gitInv1||Z(this.git1),this.gitInv2=this.gitInv2||Z(this.git2),this.gitInv3=this.gitInv3||Z(this.git3),this.gitInv4=this.gitInv4||Z(this.git4),this.gitInv5=this.gitInv5||Z(this.git5),this.gitInv6=this.gitInv6||Z(this.git6),this.gitInv7=this.gitInv7||Z(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||Gr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(a=>{this[a]=t[a]}),this.updateColors(),r.forEach(a=>{this[a]=t[a]})}},S(kl,"Theme"),kl),X5=S(e=>{const t=new G5;return t.calculate(e),t},"getThemeVariables"),vl,V5=(vl=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=Nt("#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(){var l,c,h,f,d,p,g,x,m,C,k;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||Nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Nt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Nt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Z(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Z(this.tertiaryColor),this.lineColor=this.lineColor||Z(this.background),this.arrowheadColor=this.arrowheadColor||Z(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?st(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||st(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Z(this.lineColor);const t="#ECECFE",r="#E9E9F1",a=B(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||a,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,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||nt(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 v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=this.mainBkg;if(this.darkMode)for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=st(this["cScale"+v],75);else for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=st(this["cScale"+v],25);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleInv"+v]=this["cScaleInv"+v]||Z(this["cScale"+v]);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this.darkMode?this["cScalePeer"+v]=this["cScalePeer"+v]||nt(this["cScale"+v],10):this["cScalePeer"+v]=this["cScalePeer"+v]||st(this["cScale"+v],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleLabel"+v]=this["cScaleLabel"+v]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let v=0;v<5;v++)this["surface"+v]=this["surface"+v]||B(this.mainBkg,{h:180,s:-15,l:s*(5+v*3)}),this["surfacePeer"+v]=this["surfacePeer"+v]||B(this.mainBkg,{h:180,s:-15,l:s*(8+v*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||B(t,{h:64}),this.fillType3=this.fillType3||B(r,{h:64}),this.fillType4=this.fillType4||B(t,{h:-64}),this.fillType5=this.fillType5||B(r,{h:-64}),this.fillType6=this.fillType6||B(t,{h:128}),this.fillType7=this.fillType7||B(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||a,this.pie4=this.pie4||B(t,{l:-10}),this.pie5=this.pie5||B(r,{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||Mr(this.quadrant1Fill)?nt(this.quadrant1Fill):st(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:((l=this.xyChart)==null?void 0:l.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((f=this.xyChart)==null?void 0:f.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((d=this.xyChart)==null?void 0:d.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((C=this.xyChart)==null?void 0:C.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((k=this.xyChart)==null?void 0:k.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?st(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,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=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)):(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)),this.gitInv0=this.gitInv0||Z(this.git0),this.gitInv1=this.gitInv1||Z(this.git1),this.gitInv2=this.gitInv2||Z(this.git2),this.gitInv3=this.gitInv3||Z(this.git3),this.gitInv4=this.gitInv4||Z(this.git4),this.gitInv5=this.gitInv5||Z(this.git5),this.gitInv6=this.gitInv6||Z(this.git6),this.gitInv7=this.gitInv7||Z(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||Gr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(a=>{this[a]=t[a]}),this.updateColors(),r.forEach(a=>{this[a]=t[a]})}},S(vl,"Theme"),vl),Z5=S(e=>{const t=new V5;return t.calculate(e),t},"getThemeVariables"),Sl,Q5=(Sl=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=nt(this.primaryColor,16),this.tertiaryColor=B(this.primaryColor,{h:-160}),this.primaryBorderColor=Z(this.background),this.secondaryBorderColor=Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Z(this.primaryColor),this.secondaryTextColor=Z(this.secondaryColor),this.tertiaryTextColor=Z(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=nt(Z("#323D47"),10),this.border1="#ccc",this.border2=mn(255,255,255,.25),this.arrowheadColor=Z(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(){var r,a,s,l,c,h,f,d,p,g,x;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||Nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Nt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Nt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Z(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Z(this.tertiaryColor),this.lineColor=this.lineColor||Z(this.background),this.arrowheadColor=this.arrowheadColor||Z(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?st(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||st(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Z(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||nt(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 m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=st(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=st(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||Z(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||nt(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||st(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||B(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||B(this.mainBkg,{h:180,s:-15,l:t*(8+m*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||Mr(this.quadrant1Fill)?nt(this.quadrant1Fill):st(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((f=this.xyChart)==null?void 0:f.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.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?st(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=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)):(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)),this.gitInv0=this.gitInv0||Z(this.git0),this.gitInv1=this.gitInv1||Z(this.git1),this.gitInv2=this.gitInv2||Z(this.git2),this.gitInv3=this.gitInv3||Z(this.git3),this.gitInv4=this.gitInv4||Z(this.git4),this.gitInv5=this.gitInv5||Z(this.git5),this.gitInv6=this.gitInv6||Z(this.git6),this.gitInv7=this.gitInv7||Z(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||Gr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(a=>{this[a]=t[a]}),this.updateColors(),r.forEach(a=>{this[a]=t[a]})}},S(Sl,"Theme"),Sl),K5=S(e=>{const t=new Q5;return t.calculate(e),t},"getThemeVariables"),Tl,J5=(Tl=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=Nt(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(){var l,c,h,f,d,p,g,x,m,C,k;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||Nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Nt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Nt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Z(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Z(this.tertiaryColor),this.lineColor=this.lineColor||Z(this.background),this.arrowheadColor=this.arrowheadColor||Z(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?st(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||st(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Z(this.lineColor);const t="#ECECFE",r="#E9E9F1",a=B(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||a,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,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||nt(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 v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleInv"+v]=this["cScaleInv"+v]||Z(this["cScale"+v]);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this.darkMode?this["cScalePeer"+v]=this["cScalePeer"+v]||nt(this["cScale"+v],10):this["cScalePeer"+v]=this["cScalePeer"+v]||st(this["cScale"+v],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleLabel"+v]=this["cScaleLabel"+v]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let v=0;v<5;v++)this["surface"+v]=this["surface"+v]||B(this.mainBkg,{h:180,s:-15,l:s*(5+v*3)}),this["surfacePeer"+v]=this["surfacePeer"+v]||B(this.mainBkg,{h:180,s:-15,l:s*(8+v*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||B(t,{h:64}),this.fillType3=this.fillType3||B(r,{h:64}),this.fillType4=this.fillType4||B(t,{h:-64}),this.fillType5=this.fillType5||B(r,{h:-64}),this.fillType6=this.fillType6||B(t,{h:128}),this.fillType7=this.fillType7||B(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||a,this.pie4=this.pie4||B(t,{l:-10}),this.pie5=this.pie5||B(r,{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||Mr(this.quadrant1Fill)?nt(this.quadrant1Fill):st(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:((l=this.xyChart)==null?void 0:l.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((f=this.xyChart)==null?void 0:f.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((d=this.xyChart)==null?void 0:d.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((C=this.xyChart)==null?void 0:C.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((k=this.xyChart)==null?void 0:k.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?st(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,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=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)):(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)),this.gitInv0=this.gitInv0||Z(this.git0),this.gitInv1=this.gitInv1||Z(this.git1),this.gitInv2=this.gitInv2||Z(this.git2),this.gitInv3=this.gitInv3||Z(this.git3),this.gitInv4=this.gitInv4||Z(this.git4),this.gitInv5=this.gitInv5||Z(this.git5),this.gitInv6=this.gitInv6||Z(this.git6),this.gitInv7=this.gitInv7||Z(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||Gr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(a=>{this[a]=t[a]}),this.updateColors(),r.forEach(a=>{this[a]=t[a]})}},S(Tl,"Theme"),Tl),tR=S(e=>{const t=new J5;return t.calculate(e),t},"getThemeVariables"),wl,eR=(wl=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=nt(this.primaryColor,16),this.tertiaryColor=B(this.primaryColor,{h:-160}),this.primaryBorderColor=Z(this.background),this.secondaryBorderColor=Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Z(this.primaryColor),this.secondaryTextColor=Z(this.secondaryColor),this.tertiaryTextColor=Z(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=nt(Z("#323D47"),10),this.border1="#ccc",this.border2=mn(255,255,255,.25),this.arrowheadColor=Z(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(){var r,a,s,l,c,h,f,d,p,g,x;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||Nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Nt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Nt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Z(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Z(this.tertiaryColor),this.lineColor=this.lineColor||Z(this.background),this.arrowheadColor=this.arrowheadColor||Z(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?st(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||st(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Z(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||nt(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 m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||Z(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||nt(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||st(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=st(this["cScale"+m],75);const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||B(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||B(this.mainBkg,{h:180,s:-15,l:t*(8+m*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||Mr(this.quadrant1Fill)?nt(this.quadrant1Fill):st(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((f=this.xyChart)==null?void 0:f.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.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?st(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=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)):(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)),this.gitInv0=this.gitInv0||Z(this.git0),this.gitInv1=this.gitInv1||Z(this.git1),this.gitInv2=this.gitInv2||Z(this.git2),this.gitInv3=this.gitInv3||Z(this.git3),this.gitInv4=this.gitInv4||Z(this.git4),this.gitInv5=this.gitInv5||Z(this.git5),this.gitInv6=this.gitInv6||Z(this.git6),this.gitInv7=this.gitInv7||Z(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||Gr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(a=>{this[a]=t[a]}),this.updateColors(),r.forEach(a=>{this[a]=t[a]})}},S(wl,"Theme"),wl),iR=S(e=>{const t=new eR;return t.calculate(e),t},"getThemeVariables"),ka={base:{getThemeVariables:$5},dark:{getThemeVariables:N5},default:{getThemeVariables:I5},forest:{getThemeVariables:U5},neutral:{getThemeVariables:P5},neo:{getThemeVariables:Y5},"neo-dark":{getThemeVariables:X5},redux:{getThemeVariables:Z5},"redux-dark":{getThemeVariables:K5},"redux-color":{getThemeVariables:tR},"redux-dark-color":{getThemeVariables:iR}},Ci={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},Fk={...Ci,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:ka.default.getThemeVariables(),sequence:{...Ci.sequence,messageFont:S(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:S(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:S(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Ci.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Ci.c4,useWidth:void 0,personFont:S(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Ci.flowchart,inheritDir:!1},external_personFont:S(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:S(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:S(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:S(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:S(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:S(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:S(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:S(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:S(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:S(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:S(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:S(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:S(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:S(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:S(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:S(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:S(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:S(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:S(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:S(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:S(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Ci.pie,useWidth:984},xyChart:{...Ci.xyChart,useWidth:void 0},requirement:{...Ci.requirement,useWidth:void 0},packet:{...Ci.packet},eventmodeling:{...Ci.eventmodeling},treeView:{...Ci.treeView,useWidth:void 0},radar:{...Ci.radar},ishikawa:{...Ci.ishikawa},sankey:{...Ci.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:{...Ci.venn}},Ok=S((e,t="")=>Object.keys(e).reduce((r,a)=>Array.isArray(e[a])?r:typeof e[a]=="object"&&e[a]!==null?[...r,t+a,...Ok(e[a],"")]:[...r,t+a],[]),"keyify"),rR=new Set(Ok(Fk,"")),Dk=Fk,Nu=S(e=>{if(gt.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Nu(t));return}for(const t of Object.keys(e)){if(gt.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!rR.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),Nu(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const a of r)t.includes(a)&&(gt.debug("sanitizing css option",t),e[t]=$k(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}gt.debug("After sanitization",e)}},"sanitizeDirective"),$k=S(e=>{let t=0,r=0;for(const a of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";a==="{"?t++:a==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Ll=Object.freeze(Dk),_a=S(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),$i=Ge({},Ll),qu,es=[],cc=Ge({},Ll),Sf=S((e,t)=>{let r=Ge({},e),a={};for(const s of t)qk(s),a=Ge(a,s);if(r=Ge(r,a),a.theme&&a.theme in ka){const s=Ge({},qu),l=Ge(s.themeVariables||{},a.themeVariables);r.theme&&r.theme in ka&&(r.themeVariables=ka[r.theme].getThemeVariables(l))}return cc=r,Hk(cc),cc},"updateCurrentConfig"),aR=S(e=>($i=Ge({},Ll),$i=Ge($i,e),e.theme&&ka[e.theme]&&($i.themeVariables=ka[e.theme].getThemeVariables(e.themeVariables)),Sf($i,es),$i),"setSiteConfig"),nR=S(e=>{qu=Ge({},e)},"saveConfigFromInitialize"),sR=S(e=>($i=Ge($i,e),Sf($i,es),$i),"updateSiteConfig"),zk=S(()=>Ge({},$i),"getSiteConfig"),Nk=S(e=>(Hk(e),Ge(cc,e),Le()),"setConfig"),Le=S(()=>Ge({},cc),"getConfig"),qk=S(e=>{e&&(["secure",...$i.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"&&qk(e[t])}))},"sanitize"),lR=S(e=>{var t;Nu(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),es.push(e),Sf($i,es)},"addDirective"),Iu=S((e=$i)=>{es=[],Sf(e,es)},"reset"),oR={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."},v1={},Ik=S(e=>{v1[e]||(gt.warn(oR[e]),v1[e]=!0)},"issueWarning"),Hk=S(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Ik("LAZY_LOAD_DEPRECATED")},"checkConfig"),z7=S(()=>{let e={};qu&&(e=Ge(e,qu));for(const t of es)e=Ge(e,t);return e},"getUserDefinedConfig"),wi=S(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Ik("FLOWCHART_HTML_LABELS_DEPRECATED"),_a(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Ac=/<br\s*\/?>/gi,cR=S(e=>e?Pk(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),hR=(()=>{let e=!1;return()=>{e||(Uk(),e=!0)}})();function Uk(){const e="data-temp-href-target";El.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),El.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"))})}S(Uk,"setupDompurifyHooks");var jk=S(e=>(hR(),El.sanitize(e)),"removeScript"),S1=S((e,t)=>{if(wi(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=jk(e):r!=="loose"&&(e=Pk(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=pR(e))}return e},"sanitizeMore"),Lr=S((e,t)=>e&&(t.dompurifyConfig?e=El.sanitize(S1(e,t),t.dompurifyConfig).toString():e=El.sanitize(S1(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),uR=S((e,t)=>typeof e=="string"?Lr(e,t):e.flat().map(r=>Lr(r,t)),"sanitizeTextOrArray"),fR=S(e=>Ac.test(e),"hasBreaks"),dR=S(e=>e.split(Ac),"splitBreaks"),pR=S(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Pk=S(e=>e.replace(Ac,"#br#"),"breakToPlaceholder"),gR=S(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),mR=S(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),yR=S(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),T1=S(function(e){const t=e.split(/(,)/),r=[];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];xR(l,c)&&(s=l+","+c,a++,r.pop())}r.push(bR(s))}return r.join("")},"parseGenericTypes"),Dg=S((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),xR=S((e,t)=>{const r=Dg(e,"~"),a=Dg(t,"~");return r===1&&a===1},"shouldCombineSets"),bR=S(e=>{const t=Dg(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!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 r&&a.unshift("~"),a.join("")},"processSet"),w1=S(()=>window.MathMLElement!==void 0,"isMathMLSupported"),$g=/\$\$(.*)\$\$/g,pc=S(e=>{var t;return(((t=e.match($g))==null?void 0:t.length)??0)>0},"hasKatex"),N7=S(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Wk(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const a=document.querySelector("body");a==null||a.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),CR=S(async(e,t)=>{if(!pc(e))return e;if(!(w1()||t.legacyMathML||t.forceLegacyMathML))return e.replace($g,"MathML is unsupported in this environment.");{const{default:r}=await Kt(async()=>{const{default:s}=await import("./katex-C5jXJg4s.js");return{default:s}},[]),a=t.forceLegacyMathML||!w1()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Ac).map(s=>pc(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace($g,(s,l)=>r.renderToString(l,{throwOnError:!0,displayMode:!0,output:a}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Wk=S(async(e,t)=>Lr(await CR(e,t),t),"renderKatexSanitized"),Mc={getRows:cR,sanitizeText:Lr,sanitizeTextOrArray:uR,hasBreaks:fR,splitBreaks:dR,lineBreakRegex:Ac,removeScript:jk,getUrl:gR,evaluate:_a,getMax:mR,getMin:yR},kR=S(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),vR=S(function(e,t,r){let a=new Map;return r?(a.set("width","100%"),a.set("style",`max-width: ${t}px;`)):(a.set("height",e),a.set("width",t)),a},"calculateSvgSizeAttrs"),Yk=S(function(e,t,r,a){const s=vR(t,r,a);kR(e,s)},"configureSvgSize"),SR=S(function(e,t,r,a){const s=t.node().getBBox(),l=s.width,c=s.height;gt.info(`SVG bounds: ${l}x${c}`,s);let h=0,f=0;gt.info(`Graph bounds: ${h}x${f}`,e),h=l+r*2,f=c+r*2,gt.info(`Calculated bounds: ${h}x${f}`),Yk(t,f,h,a);const d=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",d)},"setupGraphViewbox"),ku={};function zg(e){return[...e.cssRules].map(t=>t.cssText).join(`
137
+ `)}S(zg,"cssStyleSheetToString");var TR=S((e,t,r,a)=>{let s="";return e in ku&&ku[e]?s=ku[e]({...r,svgId:a}):gt.warn(`No theme found for ${e}`),` & {
138
+ font-family: ${r.fontFamily};
139
+ font-size: ${r.fontSize};
140
+ fill: ${r.textColor}
141
+ }
142
+ @keyframes edge-animation-frame {
143
+ from {
144
+ stroke-dashoffset: 0;
145
+ }
146
+ }
147
+ @keyframes dash {
148
+ to {
149
+ stroke-dashoffset: 0;
150
+ }
151
+ }
152
+ & .edge-animation-slow {
153
+ stroke-dasharray: 9,5 !important;
154
+ stroke-dashoffset: 900;
155
+ animation: dash 50s linear infinite;
156
+ stroke-linecap: round;
157
+ }
158
+ & .edge-animation-fast {
159
+ stroke-dasharray: 9,5 !important;
160
+ stroke-dashoffset: 900;
161
+ animation: dash 20s linear infinite;
162
+ stroke-linecap: round;
163
+ }
164
+ /* Classes common for multiple diagrams */
165
+
166
+ & .error-icon {
167
+ fill: ${r.errorBkgColor};
168
+ }
169
+ & .error-text {
170
+ fill: ${r.errorTextColor};
171
+ stroke: ${r.errorTextColor};
172
+ }
173
+
174
+ & .edge-thickness-normal {
175
+ stroke-width: ${r.strokeWidth??1}px;
176
+ }
177
+ & .edge-thickness-thick {
178
+ stroke-width: 3.5px
179
+ }
180
+ & .edge-pattern-solid {
181
+ stroke-dasharray: 0;
182
+ }
183
+ & .edge-thickness-invisible {
184
+ stroke-width: 0;
185
+ fill: none;
186
+ }
187
+ & .edge-pattern-dashed{
188
+ stroke-dasharray: 3;
189
+ }
190
+ .edge-pattern-dotted {
191
+ stroke-dasharray: 2;
192
+ }
193
+
194
+ & .marker {
195
+ fill: ${r.lineColor};
196
+ stroke: ${r.lineColor};
197
+ }
198
+ & .marker.cross {
199
+ stroke: ${r.lineColor};
200
+ }
201
+
202
+ & svg {
203
+ font-family: ${r.fontFamily};
204
+ font-size: ${r.fontSize};
205
+ }
206
+ & p {
207
+ margin: 0
208
+ }
209
+
210
+ ${s}
211
+ .node .neo-node {
212
+ stroke: ${r.nodeBorder};
213
+ }
214
+
215
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
216
+ stroke: ${r.useGradient?"url("+a+"-gradient)":r.nodeBorder};
217
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
218
+ }
219
+
220
+
221
+ [data-look="neo"].node path {
222
+ stroke: ${r.useGradient?"url("+a+"-gradient)":r.nodeBorder};
223
+ stroke-width: ${r.strokeWidth??1}px;
224
+ }
225
+
226
+ [data-look="neo"].node .outer-path {
227
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
228
+ }
229
+
230
+ [data-look="neo"].node .neo-line path {
231
+ stroke: ${r.nodeBorder};
232
+ filter: none;
233
+ }
234
+
235
+ [data-look="neo"].node circle{
236
+ stroke: ${r.useGradient?"url("+a+"-gradient)":r.nodeBorder};
237
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
238
+ }
239
+
240
+ [data-look="neo"].node circle .state-start{
241
+ fill: #000000;
242
+ }
243
+
244
+ [data-look="neo"].icon-shape .icon {
245
+ fill: ${r.useGradient?"url("+a+"-gradient)":r.nodeBorder};
246
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
247
+ }
248
+
249
+ [data-look="neo"].icon-shape .icon-neo path {
250
+ stroke: ${r.useGradient?"url("+a+"-gradient)":r.nodeBorder};
251
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
252
+ }
253
+
254
+ ${t}
255
+ `},"getStyles"),wR=S((e,t)=>{t!==void 0&&(ku[e]=t)},"addStylesForDiagram"),_R=TR,Gk={};VM(Gk,{clear:()=>BR,getAccDescription:()=>MR,getAccTitle:()=>LR,getDiagramTitle:()=>FR,setAccDescription:()=>AR,setAccTitle:()=>ER,setDiagramTitle:()=>RR});var Jm="",ty="",ey="",iy=S(e=>Lr(e,Le()),"sanitizeText"),BR=S(()=>{Jm="",ey="",ty=""},"clear"),ER=S(e=>{Jm=iy(e).replace(/^\s+/g,"")},"setAccTitle"),LR=S(()=>Jm,"getAccTitle"),AR=S(e=>{ey=iy(e).replace(/\n\s+/g,`
256
+ `)},"setAccDescription"),MR=S(()=>ey,"getAccDescription"),RR=S(e=>{ty=iy(e)},"setDiagramTitle"),FR=S(()=>ty,"getDiagramTitle"),_1=gt,OR=Qm,re=Le,q7=Nk,I7=Ll,ry=S(e=>Lr(e,re()),"sanitizeText"),DR=SR,$R=S(()=>Gk,"getCommonDb"),Hu={},Uu=S((e,t,r)=>{var a;Hu[e]&&_1.warn(`Diagram with id ${e} already registered. Overwriting.`),Hu[e]=t,r&&Rk(e,r),wR(e,t.styles),(a=t.injectUtils)==null||a.call(t,_1,OR,re,ry,DR,$R(),()=>{})},"registerDiagram"),Ng=S(e=>{if(e in Hu)return Hu[e];throw new zR(e)},"getDiagram"),_l,zR=(_l=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},S(_l,"DiagramNotFoundError"),_l),NR={value:()=>{}};function Xk(){for(var e=0,t=arguments.length,r={},a;e<t;++e){if(!(a=arguments[e]+"")||a in r||/[\s.]/.test(a))throw new Error("illegal type: "+a);r[a]=[]}return new vu(r)}function vu(e){this._=e}function qR(e,t){return e.trim().split(/^|\s+/).map(function(r){var a="",s=r.indexOf(".");if(s>=0&&(a=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:a}})}vu.prototype=Xk.prototype={constructor:vu,on:function(e,t){var r=this._,a=qR(e+"",r),s,l=-1,c=a.length;if(arguments.length<2){for(;++l<c;)if((s=(e=a[l]).type)&&(s=IR(r[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)r[s]=B1(r[s],e.name,t);else if(t==null)for(s in r)r[s]=B1(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new vu(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),a=0,s,l;a<s;++a)r[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,r)},apply:function(e,t,r){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,r)}};function IR(e,t){for(var r=0,a=e.length,s;r<a;++r)if((s=e[r]).name===t)return s.value}function B1(e,t,r){for(var a=0,s=e.length;a<s;++a)if(e[a].name===t){e[a]=NR,e=e.slice(0,a).concat(e.slice(a+1));break}return r!=null&&e.push({name:t,value:r}),e}var qg="http://www.w3.org/1999/xhtml";const E1={svg:"http://www.w3.org/2000/svg",xhtml:qg,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Tf(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),E1.hasOwnProperty(t)?{space:E1[t],local:e}:e}function HR(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===qg&&t.documentElement.namespaceURI===qg?t.createElement(e):t.createElementNS(r,e)}}function UR(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Vk(e){var t=Tf(e);return(t.local?UR:HR)(t)}function jR(){}function ay(e){return e==null?jR:function(){return this.querySelector(e)}}function PR(e){typeof e!="function"&&(e=ay(e));for(var t=this._groups,r=t.length,a=new Array(r),s=0;s<r;++s)for(var l=t[s],c=l.length,h=a[s]=new Array(c),f,d,p=0;p<c;++p)(f=l[p])&&(d=e.call(f,f.__data__,p,l))&&("__data__"in f&&(d.__data__=f.__data__),h[p]=d);return new Zi(a,this._parents)}function WR(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function YR(){return[]}function Zk(e){return e==null?YR:function(){return this.querySelectorAll(e)}}function GR(e){return function(){return WR(e.apply(this,arguments))}}function XR(e){typeof e=="function"?e=GR(e):e=Zk(e);for(var t=this._groups,r=t.length,a=[],s=[],l=0;l<r;++l)for(var c=t[l],h=c.length,f,d=0;d<h;++d)(f=c[d])&&(a.push(e.call(f,f.__data__,d,c)),s.push(f));return new Zi(a,s)}function Qk(e){return function(){return this.matches(e)}}function Kk(e){return function(t){return t.matches(e)}}var VR=Array.prototype.find;function ZR(e){return function(){return VR.call(this.children,e)}}function QR(){return this.firstElementChild}function KR(e){return this.select(e==null?QR:ZR(typeof e=="function"?e:Kk(e)))}var JR=Array.prototype.filter;function t4(){return Array.from(this.children)}function e4(e){return function(){return JR.call(this.children,e)}}function i4(e){return this.selectAll(e==null?t4:e4(typeof e=="function"?e:Kk(e)))}function r4(e){typeof e!="function"&&(e=Qk(e));for(var t=this._groups,r=t.length,a=new Array(r),s=0;s<r;++s)for(var l=t[s],c=l.length,h=a[s]=[],f,d=0;d<c;++d)(f=l[d])&&e.call(f,f.__data__,d,l)&&h.push(f);return new Zi(a,this._parents)}function Jk(e){return new Array(e.length)}function a4(){return new Zi(this._enter||this._groups.map(Jk),this._parents)}function ju(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ju.prototype={constructor:ju,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 n4(e){return function(){return e}}function s4(e,t,r,a,s,l){for(var c=0,h,f=t.length,d=l.length;c<d;++c)(h=t[c])?(h.__data__=l[c],a[c]=h):r[c]=new ju(e,l[c]);for(;c<f;++c)(h=t[c])&&(s[c]=h)}function l4(e,t,r,a,s,l,c){var h,f,d=new Map,p=t.length,g=l.length,x=new Array(p),m;for(h=0;h<p;++h)(f=t[h])&&(x[h]=m=c.call(f,f.__data__,h,t)+"",d.has(m)?s[h]=f:d.set(m,f));for(h=0;h<g;++h)m=c.call(e,l[h],h,l)+"",(f=d.get(m))?(a[h]=f,f.__data__=l[h],d.delete(m)):r[h]=new ju(e,l[h]);for(h=0;h<p;++h)(f=t[h])&&d.get(x[h])===f&&(s[h]=f)}function o4(e){return e.__data__}function c4(e,t){if(!arguments.length)return Array.from(this,o4);var r=t?l4:s4,a=this._parents,s=this._groups;typeof e!="function"&&(e=n4(e));for(var l=s.length,c=new Array(l),h=new Array(l),f=new Array(l),d=0;d<l;++d){var p=a[d],g=s[d],x=g.length,m=h4(e.call(p,p&&p.__data__,d,a)),C=m.length,k=h[d]=new Array(C),v=c[d]=new Array(C),T=f[d]=new Array(x);r(p,g,k,v,T,m,t);for(var _=0,E=0,R,F;_<C;++_)if(R=k[_]){for(_>=E&&(E=_+1);!(F=v[E])&&++E<C;);R._next=F||null}}return c=new Zi(c,a),c._enter=h,c._exit=f,c}function h4(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function u4(){return new Zi(this._exit||this._groups.map(Jk),this._parents)}function f4(e,t,r){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())),r==null?l.remove():r(l),a&&s?a.merge(s).order():s}function d4(e){for(var t=e.selection?e.selection():e,r=this._groups,a=t._groups,s=r.length,l=a.length,c=Math.min(s,l),h=new Array(s),f=0;f<c;++f)for(var d=r[f],p=a[f],g=d.length,x=h[f]=new Array(g),m,C=0;C<g;++C)(m=d[C]||p[C])&&(x[C]=m);for(;f<s;++f)h[f]=r[f];return new Zi(h,this._parents)}function p4(){for(var e=this._groups,t=-1,r=e.length;++t<r;)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 g4(e){e||(e=m4);function t(g,x){return g&&x?e(g.__data__,x.__data__):!g-!x}for(var r=this._groups,a=r.length,s=new Array(a),l=0;l<a;++l){for(var c=r[l],h=c.length,f=s[l]=new Array(h),d,p=0;p<h;++p)(d=c[p])&&(f[p]=d);f.sort(t)}return new Zi(s,this._parents).order()}function m4(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function y4(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function x4(){return Array.from(this)}function b4(){for(var e=this._groups,t=0,r=e.length;t<r;++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 C4(){let e=0;for(const t of this)++e;return e}function k4(){return!this.node()}function v4(e){for(var t=this._groups,r=0,a=t.length;r<a;++r)for(var s=t[r],l=0,c=s.length,h;l<c;++l)(h=s[l])&&e.call(h,h.__data__,l,s);return this}function S4(e){return function(){this.removeAttribute(e)}}function T4(e){return function(){this.removeAttributeNS(e.space,e.local)}}function w4(e,t){return function(){this.setAttribute(e,t)}}function _4(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function B4(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function E4(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function L4(e,t){var r=Tf(e);if(arguments.length<2){var a=this.node();return r.local?a.getAttributeNS(r.space,r.local):a.getAttribute(r)}return this.each((t==null?r.local?T4:S4:typeof t=="function"?r.local?E4:B4:r.local?_4:w4)(r,t))}function tv(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function A4(e){return function(){this.style.removeProperty(e)}}function M4(e,t,r){return function(){this.style.setProperty(e,t,r)}}function R4(e,t,r){return function(){var a=t.apply(this,arguments);a==null?this.style.removeProperty(e):this.style.setProperty(e,a,r)}}function F4(e,t,r){return arguments.length>1?this.each((t==null?A4:typeof t=="function"?R4:M4)(e,t,r??"")):Al(this.node(),e)}function Al(e,t){return e.style.getPropertyValue(t)||tv(e).getComputedStyle(e,null).getPropertyValue(t)}function O4(e){return function(){delete this[e]}}function D4(e,t){return function(){this[e]=t}}function $4(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function z4(e,t){return arguments.length>1?this.each((t==null?O4:typeof t=="function"?$4:D4)(e,t)):this.node()[e]}function ev(e){return e.trim().split(/^|\s+/)}function ny(e){return e.classList||new iv(e)}function iv(e){this._node=e,this._names=ev(e.getAttribute("class")||"")}iv.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 rv(e,t){for(var r=ny(e),a=-1,s=t.length;++a<s;)r.add(t[a])}function av(e,t){for(var r=ny(e),a=-1,s=t.length;++a<s;)r.remove(t[a])}function N4(e){return function(){rv(this,e)}}function q4(e){return function(){av(this,e)}}function I4(e,t){return function(){(t.apply(this,arguments)?rv:av)(this,e)}}function H4(e,t){var r=ev(e+"");if(arguments.length<2){for(var a=ny(this.node()),s=-1,l=r.length;++s<l;)if(!a.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?I4:t?N4:q4)(r,t))}function U4(){this.textContent=""}function j4(e){return function(){this.textContent=e}}function P4(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function W4(e){return arguments.length?this.each(e==null?U4:(typeof e=="function"?P4:j4)(e)):this.node().textContent}function Y4(){this.innerHTML=""}function G4(e){return function(){this.innerHTML=e}}function X4(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function V4(e){return arguments.length?this.each(e==null?Y4:(typeof e=="function"?X4:G4)(e)):this.node().innerHTML}function Z4(){this.nextSibling&&this.parentNode.appendChild(this)}function Q4(){return this.each(Z4)}function K4(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function J4(){return this.each(K4)}function tF(e){var t=typeof e=="function"?e:Vk(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function eF(){return null}function iF(e,t){var r=typeof e=="function"?e:Vk(e),a=t==null?eF:typeof t=="function"?t:ay(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),a.apply(this,arguments)||null)})}function rF(){var e=this.parentNode;e&&e.removeChild(this)}function aF(){return this.each(rF)}function nF(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function sF(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function lF(e){return this.select(e?sF:nF)}function oF(e){return arguments.length?this.property("__data__",e):this.node().__data__}function cF(e){return function(t){e.call(this,t,this.__data__)}}function hF(e){return e.trim().split(/^|\s+/).map(function(t){var r="",a=t.indexOf(".");return a>=0&&(r=t.slice(a+1),t=t.slice(0,a)),{type:t,name:r}})}function uF(e){return function(){var t=this.__on;if(t){for(var r=0,a=-1,s=t.length,l;r<s;++r)l=t[r],(!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 fF(e,t,r){return function(){var a=this.__on,s,l=cF(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=r),s.value=t;return}}this.addEventListener(e.type,l,r),s={type:e.type,name:e.name,value:t,listener:l,options:r},a?a.push(s):this.__on=[s]}}function dF(e,t,r){var a=hF(e+""),s,l=a.length,c;if(arguments.length<2){var h=this.node().__on;if(h){for(var f=0,d=h.length,p;f<d;++f)for(s=0,p=h[f];s<l;++s)if((c=a[s]).type===p.type&&c.name===p.name)return p.value}return}for(h=t?fF:uF,s=0;s<l;++s)this.each(h(a[s],t,r));return this}function nv(e,t,r){var a=tv(e),s=a.CustomEvent;typeof s=="function"?s=new s(t,r):(s=a.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function pF(e,t){return function(){return nv(this,e,t)}}function gF(e,t){return function(){return nv(this,e,t.apply(this,arguments))}}function mF(e,t){return this.each((typeof t=="function"?gF:pF)(e,t))}function*yF(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var a=e[t],s=0,l=a.length,c;s<l;++s)(c=a[s])&&(yield c)}var sv=[null];function Zi(e,t){this._groups=e,this._parents=t}function Rc(){return new Zi([[document.documentElement]],sv)}function xF(){return this}Zi.prototype=Rc.prototype={constructor:Zi,select:PR,selectAll:XR,selectChild:KR,selectChildren:i4,filter:r4,data:c4,enter:a4,exit:u4,join:f4,merge:d4,selection:xF,order:p4,sort:g4,call:y4,nodes:x4,node:b4,size:C4,empty:k4,each:v4,attr:L4,style:F4,property:z4,classed:H4,text:W4,html:V4,raise:Q4,lower:J4,append:tF,insert:iF,remove:aF,clone:lF,datum:oF,on:dF,dispatch:mF,[Symbol.iterator]:yF};function Wt(e){return typeof e=="string"?new Zi([[document.querySelector(e)]],[document.documentElement]):new Zi([[e]],sv)}function sy(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function lv(e,t){var r=Object.create(e.prototype);for(var a in t)r[a]=t[a];return r}function Fc(){}var gc=.7,Pu=1/gc,fl="\\s*([+-]?\\d+)\\s*",mc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bF=/^#([0-9a-f]{3,8})$/,CF=new RegExp(`^rgb\\(${fl},${fl},${fl}\\)$`),kF=new RegExp(`^rgb\\(${Pr},${Pr},${Pr}\\)$`),vF=new RegExp(`^rgba\\(${fl},${fl},${fl},${mc}\\)$`),SF=new RegExp(`^rgba\\(${Pr},${Pr},${Pr},${mc}\\)$`),TF=new RegExp(`^hsl\\(${mc},${Pr},${Pr}\\)$`),wF=new RegExp(`^hsla\\(${mc},${Pr},${Pr},${mc}\\)$`),L1={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};sy(Fc,yc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:A1,formatHex:A1,formatHex8:_F,formatHsl:BF,formatRgb:M1,toString:M1});function A1(){return this.rgb().formatHex()}function _F(){return this.rgb().formatHex8()}function BF(){return ov(this).formatHsl()}function M1(){return this.rgb().formatRgb()}function yc(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=bF.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?R1(t):r===3?new Ni(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?au(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?au(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=CF.exec(e))?new Ni(t[1],t[2],t[3],1):(t=kF.exec(e))?new Ni(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=vF.exec(e))?au(t[1],t[2],t[3],t[4]):(t=SF.exec(e))?au(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=TF.exec(e))?D1(t[1],t[2]/100,t[3]/100,1):(t=wF.exec(e))?D1(t[1],t[2]/100,t[3]/100,t[4]):L1.hasOwnProperty(e)?R1(L1[e]):e==="transparent"?new Ni(NaN,NaN,NaN,0):null}function R1(e){return new Ni(e>>16&255,e>>8&255,e&255,1)}function au(e,t,r,a){return a<=0&&(e=t=r=NaN),new Ni(e,t,r,a)}function EF(e){return e instanceof Fc||(e=yc(e)),e?(e=e.rgb(),new Ni(e.r,e.g,e.b,e.opacity)):new Ni}function Ig(e,t,r,a){return arguments.length===1?EF(e):new Ni(e,t,r,a??1)}function Ni(e,t,r,a){this.r=+e,this.g=+t,this.b=+r,this.opacity=+a}sy(Ni,Ig,lv(Fc,{brighter(e){return e=e==null?Pu:Math.pow(Pu,e),new Ni(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?gc:Math.pow(gc,e),new Ni(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ni(Qn(this.r),Qn(this.g),Qn(this.b),Wu(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:F1,formatHex:F1,formatHex8:LF,formatRgb:O1,toString:O1}));function F1(){return`#${Xn(this.r)}${Xn(this.g)}${Xn(this.b)}`}function LF(){return`#${Xn(this.r)}${Xn(this.g)}${Xn(this.b)}${Xn((isNaN(this.opacity)?1:this.opacity)*255)}`}function O1(){const e=Wu(this.opacity);return`${e===1?"rgb(":"rgba("}${Qn(this.r)}, ${Qn(this.g)}, ${Qn(this.b)}${e===1?")":`, ${e})`}`}function Wu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Qn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Xn(e){return e=Qn(e),(e<16?"0":"")+e.toString(16)}function D1(e,t,r,a){return a<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Sr(e,t,r,a)}function ov(e){if(e instanceof Sr)return new Sr(e.h,e.s,e.l,e.opacity);if(e instanceof Fc||(e=yc(e)),!e)return new Sr;if(e instanceof Sr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,a=e.b/255,s=Math.min(t,r,a),l=Math.max(t,r,a),c=NaN,h=l-s,f=(l+s)/2;return h?(t===l?c=(r-a)/h+(r<a)*6:r===l?c=(a-t)/h+2:c=(t-r)/h+4,h/=f<.5?l+s:2-l-s,c*=60):h=f>0&&f<1?0:c,new Sr(c,h,f,e.opacity)}function AF(e,t,r,a){return arguments.length===1?ov(e):new Sr(e,t,r,a??1)}function Sr(e,t,r,a){this.h=+e,this.s=+t,this.l=+r,this.opacity=+a}sy(Sr,AF,lv(Fc,{brighter(e){return e=e==null?Pu:Math.pow(Pu,e),new Sr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?gc:Math.pow(gc,e),new Sr(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,r=this.l,a=r+(r<.5?r:1-r)*t,s=2*r-a;return new Ni(og(e>=240?e-240:e+120,s,a),og(e,s,a),og(e<120?e+240:e-120,s,a),this.opacity)},clamp(){return new Sr($1(this.h),nu(this.s),nu(this.l),Wu(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=Wu(this.opacity);return`${e===1?"hsl(":"hsla("}${$1(this.h)}, ${nu(this.s)*100}%, ${nu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function $1(e){return e=(e||0)%360,e<0?e+360:e}function nu(e){return Math.max(0,Math.min(1,e||0))}function og(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const ly=e=>()=>e;function cv(e,t){return function(r){return e+r*t}}function MF(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(a){return Math.pow(e+a*t,r)}}function H7(e,t){var r=t-e;return r?cv(e,r>180||r<-180?r-360*Math.round(r/360):r):ly(isNaN(e)?t:e)}function RF(e){return(e=+e)==1?hv:function(t,r){return r-t?MF(t,r,e):ly(isNaN(t)?r:t)}}function hv(e,t){var r=t-e;return r?cv(e,r):ly(isNaN(e)?t:e)}const z1=(function e(t){var r=RF(t);function a(s,l){var c=r((s=Ig(s)).r,(l=Ig(l)).r),h=r(s.g,l.g),f=r(s.b,l.b),d=hv(s.opacity,l.opacity);return function(p){return s.r=c(p),s.g=h(p),s.b=f(p),s.opacity=d(p),s+""}}return a.gamma=e,a})(1);function dn(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Hg=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,cg=new RegExp(Hg.source,"g");function FF(e){return function(){return e}}function OF(e){return function(t){return e(t)+""}}function DF(e,t){var r=Hg.lastIndex=cg.lastIndex=0,a,s,l,c=-1,h=[],f=[];for(e=e+"",t=t+"";(a=Hg.exec(e))&&(s=cg.exec(t));)(l=s.index)>r&&(l=t.slice(r,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,f.push({i:c,x:dn(a,s)})),r=cg.lastIndex;return r<t.length&&(l=t.slice(r),h[c]?h[c]+=l:h[++c]=l),h.length<2?f[0]?OF(f[0].x):FF(t):(t=f.length,function(d){for(var p=0,g;p<t;++p)h[(g=f[p]).i]=g.x(d);return h.join("")})}var N1=180/Math.PI,Ug={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function uv(e,t,r,a,s,l){var c,h,f;return(c=Math.sqrt(e*e+t*t))&&(e/=c,t/=c),(f=e*r+t*a)&&(r-=e*f,a-=t*f),(h=Math.sqrt(r*r+a*a))&&(r/=h,a/=h,f/=h),e*a<t*r&&(e=-e,t=-t,f=-f,c=-c),{translateX:s,translateY:l,rotate:Math.atan2(t,e)*N1,skewX:Math.atan(f)*N1,scaleX:c,scaleY:h}}var su;function $F(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ug:uv(t.a,t.b,t.c,t.d,t.e,t.f)}function zF(e){return e==null||(su||(su=document.createElementNS("http://www.w3.org/2000/svg","g")),su.setAttribute("transform",e),!(e=su.transform.baseVal.consolidate()))?Ug:(e=e.matrix,uv(e.a,e.b,e.c,e.d,e.e,e.f))}function fv(e,t,r,a){function s(d){return d.length?d.pop()+" ":""}function l(d,p,g,x,m,C){if(d!==g||p!==x){var k=m.push("translate(",null,t,null,r);C.push({i:k-4,x:dn(d,g)},{i:k-2,x:dn(p,x)})}else(g||x)&&m.push("translate("+g+t+x+r)}function c(d,p,g,x){d!==p?(d-p>180?p+=360:p-d>180&&(d+=360),x.push({i:g.push(s(g)+"rotate(",null,a)-2,x:dn(d,p)})):p&&g.push(s(g)+"rotate("+p+a)}function h(d,p,g,x){d!==p?x.push({i:g.push(s(g)+"skewX(",null,a)-2,x:dn(d,p)}):p&&g.push(s(g)+"skewX("+p+a)}function f(d,p,g,x,m,C){if(d!==g||p!==x){var k=m.push(s(m)+"scale(",null,",",null,")");C.push({i:k-4,x:dn(d,g)},{i:k-2,x:dn(p,x)})}else(g!==1||x!==1)&&m.push(s(m)+"scale("+g+","+x+")")}return function(d,p){var g=[],x=[];return d=e(d),p=e(p),l(d.translateX,d.translateY,p.translateX,p.translateY,g,x),c(d.rotate,p.rotate,g,x),h(d.skewX,p.skewX,g,x),f(d.scaleX,d.scaleY,p.scaleX,p.scaleY,g,x),d=p=null,function(m){for(var C=-1,k=x.length,v;++C<k;)g[(v=x[C]).i]=v.x(m);return g.join("")}}}var NF=fv($F,"px, ","px)","deg)"),qF=fv(zF,", ",")",")"),Ml=0,tc=0,Po=0,dv=1e3,Yu,ec,Gu=0,is=0,wf=0,xc=typeof performance=="object"&&performance.now?performance:Date,pv=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function oy(){return is||(pv(IF),is=xc.now()+wf)}function IF(){is=0}function Xu(){this._call=this._time=this._next=null}Xu.prototype=gv.prototype={constructor:Xu,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?oy():+r)+(t==null?0:+t),!this._next&&ec!==this&&(ec?ec._next=this:Yu=this,ec=this),this._call=e,this._time=r,jg()},stop:function(){this._call&&(this._call=null,this._time=1/0,jg())}};function gv(e,t,r){var a=new Xu;return a.restart(e,t,r),a}function HF(){oy(),++Ml;for(var e=Yu,t;e;)(t=is-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ml}function q1(){is=(Gu=xc.now())+wf,Ml=tc=0;try{HF()}finally{Ml=0,jF(),is=0}}function UF(){var e=xc.now(),t=e-Gu;t>dv&&(wf-=t,Gu=e)}function jF(){for(var e,t=Yu,r,a=1/0;t;)t._call?(a>t._time&&(a=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Yu=r);ec=e,jg(a)}function jg(e){if(!Ml){tc&&(tc=clearTimeout(tc));var t=e-is;t>24?(e<1/0&&(tc=setTimeout(q1,e-xc.now()-wf)),Po&&(Po=clearInterval(Po))):(Po||(Gu=xc.now(),Po=setInterval(UF,dv)),Ml=1,pv(q1))}}function I1(e,t,r){var a=new Xu;return t=t==null?0:+t,a.restart(s=>{a.stop(),e(s+t)},t,r),a}var PF=Xk("start","end","cancel","interrupt"),WF=[],mv=0,H1=1,Pg=2,Su=3,U1=4,Wg=5,Tu=6;function _f(e,t,r,a,s,l){var c=e.__transition;if(!c)e.__transition={};else if(r in c)return;YF(e,r,{name:t,index:a,group:s,on:PF,tween:WF,time:l.time,delay:l.delay,duration:l.duration,ease:l.ease,timer:null,state:mv})}function cy(e,t){var r=Rr(e,t);if(r.state>mv)throw new Error("too late; already scheduled");return r}function Vr(e,t){var r=Rr(e,t);if(r.state>Su)throw new Error("too late; already running");return r}function Rr(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function YF(e,t,r){var a=e.__transition,s;a[t]=r,r.timer=gv(l,0,r.time);function l(d){r.state=H1,r.timer.restart(c,r.delay,r.time),r.delay<=d&&c(d-r.delay)}function c(d){var p,g,x,m;if(r.state!==H1)return f();for(p in a)if(m=a[p],m.name===r.name){if(m.state===Su)return I1(c);m.state===U1?(m.state=Tu,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete a[p]):+p<t&&(m.state=Tu,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete a[p])}if(I1(function(){r.state===Su&&(r.state=U1,r.timer.restart(h,r.delay,r.time),h(d))}),r.state=Pg,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Pg){for(r.state=Su,s=new Array(x=r.tween.length),p=0,g=-1;p<x;++p)(m=r.tween[p].value.call(e,e.__data__,r.index,r.group))&&(s[++g]=m);s.length=g+1}}function h(d){for(var p=d<r.duration?r.ease.call(null,d/r.duration):(r.timer.restart(f),r.state=Wg,1),g=-1,x=s.length;++g<x;)s[g].call(e,p);r.state===Wg&&(r.on.call("end",e,e.__data__,r.index,r.group),f())}function f(){r.state=Tu,r.timer.stop(),delete a[t];for(var d in a)return;delete e.__transition}}function GF(e,t){var r=e.__transition,a,s,l=!0,c;if(r){t=t==null?null:t+"";for(c in r){if((a=r[c]).name!==t){l=!1;continue}s=a.state>Pg&&a.state<Wg,a.state=Tu,a.timer.stop(),a.on.call(s?"interrupt":"cancel",e,e.__data__,a.index,a.group),delete r[c]}l&&delete e.__transition}}function XF(e){return this.each(function(){GF(this,e)})}function VF(e,t){var r,a;return function(){var s=Vr(this,e),l=s.tween;if(l!==r){a=r=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 ZF(e,t,r){var a,s;if(typeof r!="function")throw new Error;return function(){var l=Vr(this,e),c=l.tween;if(c!==a){s=(a=c).slice();for(var h={name:t,value:r},f=0,d=s.length;f<d;++f)if(s[f].name===t){s[f]=h;break}f===d&&s.push(h)}l.tween=s}}function QF(e,t){var r=this._id;if(e+="",arguments.length<2){for(var a=Rr(this.node(),r).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?VF:ZF)(r,e,t))}function hy(e,t,r){var a=e._id;return e.each(function(){var s=Vr(this,a);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return Rr(s,a).value[t]}}function yv(e,t){var r;return(typeof t=="number"?dn:t instanceof yc?z1:(r=yc(t))?(t=r,z1):DF)(e,t)}function KF(e){return function(){this.removeAttribute(e)}}function JF(e){return function(){this.removeAttributeNS(e.space,e.local)}}function tO(e,t,r){var a,s=r+"",l;return function(){var c=this.getAttribute(e);return c===s?null:c===a?l:l=t(a=c,r)}}function eO(e,t,r){var a,s=r+"",l;return function(){var c=this.getAttributeNS(e.space,e.local);return c===s?null:c===a?l:l=t(a=c,r)}}function iO(e,t,r){var a,s,l;return function(){var c,h=r(this),f;return h==null?void this.removeAttribute(e):(c=this.getAttribute(e),f=h+"",c===f?null:c===a&&f===s?l:(s=f,l=t(a=c,h)))}}function rO(e,t,r){var a,s,l;return function(){var c,h=r(this),f;return h==null?void this.removeAttributeNS(e.space,e.local):(c=this.getAttributeNS(e.space,e.local),f=h+"",c===f?null:c===a&&f===s?l:(s=f,l=t(a=c,h)))}}function aO(e,t){var r=Tf(e),a=r==="transform"?qF:yv;return this.attrTween(e,typeof t=="function"?(r.local?rO:iO)(r,a,hy(this,"attr."+e,t)):t==null?(r.local?JF:KF)(r):(r.local?eO:tO)(r,a,t))}function nO(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function sO(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function lO(e,t){var r,a;function s(){var l=t.apply(this,arguments);return l!==a&&(r=(a=l)&&sO(e,l)),r}return s._value=t,s}function oO(e,t){var r,a;function s(){var l=t.apply(this,arguments);return l!==a&&(r=(a=l)&&nO(e,l)),r}return s._value=t,s}function cO(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var a=Tf(e);return this.tween(r,(a.local?lO:oO)(a,t))}function hO(e,t){return function(){cy(this,e).delay=+t.apply(this,arguments)}}function uO(e,t){return t=+t,function(){cy(this,e).delay=t}}function fO(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?hO:uO)(t,e)):Rr(this.node(),t).delay}function dO(e,t){return function(){Vr(this,e).duration=+t.apply(this,arguments)}}function pO(e,t){return t=+t,function(){Vr(this,e).duration=t}}function gO(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?dO:pO)(t,e)):Rr(this.node(),t).duration}function mO(e,t){if(typeof t!="function")throw new Error;return function(){Vr(this,e).ease=t}}function yO(e){var t=this._id;return arguments.length?this.each(mO(t,e)):Rr(this.node(),t).ease}function xO(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Vr(this,e).ease=r}}function bO(e){if(typeof e!="function")throw new Error;return this.each(xO(this._id,e))}function CO(e){typeof e!="function"&&(e=Qk(e));for(var t=this._groups,r=t.length,a=new Array(r),s=0;s<r;++s)for(var l=t[s],c=l.length,h=a[s]=[],f,d=0;d<c;++d)(f=l[d])&&e.call(f,f.__data__,d,l)&&h.push(f);return new Ta(a,this._parents,this._name,this._id)}function kO(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,a=t.length,s=r.length,l=Math.min(a,s),c=new Array(a),h=0;h<l;++h)for(var f=t[h],d=r[h],p=f.length,g=c[h]=new Array(p),x,m=0;m<p;++m)(x=f[m]||d[m])&&(g[m]=x);for(;h<a;++h)c[h]=t[h];return new Ta(c,this._parents,this._name,this._id)}function vO(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function SO(e,t,r){var a,s,l=vO(t)?cy:Vr;return function(){var c=l(this,e),h=c.on;h!==a&&(s=(a=h).copy()).on(t,r),c.on=s}}function TO(e,t){var r=this._id;return arguments.length<2?Rr(this.node(),r).on.on(e):this.each(SO(r,e,t))}function wO(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function _O(){return this.on("end.remove",wO(this._id))}function BO(e){var t=this._name,r=this._id;typeof e!="function"&&(e=ay(e));for(var a=this._groups,s=a.length,l=new Array(s),c=0;c<s;++c)for(var h=a[c],f=h.length,d=l[c]=new Array(f),p,g,x=0;x<f;++x)(p=h[x])&&(g=e.call(p,p.__data__,x,h))&&("__data__"in p&&(g.__data__=p.__data__),d[x]=g,_f(d[x],t,r,x,d,Rr(p,r)));return new Ta(l,this._parents,t,r)}function EO(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Zk(e));for(var a=this._groups,s=a.length,l=[],c=[],h=0;h<s;++h)for(var f=a[h],d=f.length,p,g=0;g<d;++g)if(p=f[g]){for(var x=e.call(p,p.__data__,g,f),m,C=Rr(p,r),k=0,v=x.length;k<v;++k)(m=x[k])&&_f(m,t,r,k,x,C);l.push(x),c.push(p)}return new Ta(l,c,t,r)}var LO=Rc.prototype.constructor;function AO(){return new LO(this._groups,this._parents)}function MO(e,t){var r,a,s;return function(){var l=Al(this,e),c=(this.style.removeProperty(e),Al(this,e));return l===c?null:l===r&&c===a?s:s=t(r=l,a=c)}}function xv(e){return function(){this.style.removeProperty(e)}}function RO(e,t,r){var a,s=r+"",l;return function(){var c=Al(this,e);return c===s?null:c===a?l:l=t(a=c,r)}}function FO(e,t,r){var a,s,l;return function(){var c=Al(this,e),h=r(this),f=h+"";return h==null&&(f=h=(this.style.removeProperty(e),Al(this,e))),c===f?null:c===a&&f===s?l:(s=f,l=t(a=c,h))}}function OO(e,t){var r,a,s,l="style."+t,c="end."+l,h;return function(){var f=Vr(this,e),d=f.on,p=f.value[l]==null?h||(h=xv(t)):void 0;(d!==r||s!==p)&&(a=(r=d).copy()).on(c,s=p),f.on=a}}function DO(e,t,r){var a=(e+="")=="transform"?NF:yv;return t==null?this.styleTween(e,MO(e,a)).on("end.style."+e,xv(e)):typeof t=="function"?this.styleTween(e,FO(e,a,hy(this,"style."+e,t))).each(OO(this._id,e)):this.styleTween(e,RO(e,a,t),r).on("end.style."+e,null)}function $O(e,t,r){return function(a){this.style.setProperty(e,t.call(this,a),r)}}function zO(e,t,r){var a,s;function l(){var c=t.apply(this,arguments);return c!==s&&(a=(s=c)&&$O(e,c,r)),a}return l._value=t,l}function NO(e,t,r){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,zO(e,t,r??""))}function qO(e){return function(){this.textContent=e}}function IO(e){return function(){var t=e(this);this.textContent=t??""}}function HO(e){return this.tween("text",typeof e=="function"?IO(hy(this,"text",e)):qO(e==null?"":e+""))}function UO(e){return function(t){this.textContent=e.call(this,t)}}function jO(e){var t,r;function a(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&UO(s)),t}return a._value=e,a}function PO(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,jO(e))}function WO(){for(var e=this._name,t=this._id,r=bv(),a=this._groups,s=a.length,l=0;l<s;++l)for(var c=a[l],h=c.length,f,d=0;d<h;++d)if(f=c[d]){var p=Rr(f,t);_f(f,e,r,d,c,{time:p.time+p.delay+p.duration,delay:0,duration:p.duration,ease:p.ease})}return new Ta(a,this._parents,e,r)}function YO(){var e,t,r=this,a=r._id,s=r.size();return new Promise(function(l,c){var h={value:c},f={value:function(){--s===0&&l()}};r.each(function(){var d=Vr(this,a),p=d.on;p!==e&&(t=(e=p).copy(),t._.cancel.push(h),t._.interrupt.push(h),t._.end.push(f)),d.on=t}),s===0&&l()})}var GO=0;function Ta(e,t,r,a){this._groups=e,this._parents=t,this._name=r,this._id=a}function bv(){return++GO}var xa=Rc.prototype;Ta.prototype={constructor:Ta,select:BO,selectAll:EO,selectChild:xa.selectChild,selectChildren:xa.selectChildren,filter:CO,merge:kO,selection:AO,transition:WO,call:xa.call,nodes:xa.nodes,node:xa.node,size:xa.size,empty:xa.empty,each:xa.each,on:TO,attr:aO,attrTween:cO,style:DO,styleTween:NO,text:HO,textTween:PO,remove:_O,tween:QF,delay:fO,duration:gO,ease:yO,easeVarying:bO,end:YO,[Symbol.iterator]:xa[Symbol.iterator]};function XO(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var VO={time:null,delay:0,duration:250,ease:XO};function ZO(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function QO(e){var t,r;e instanceof Ta?(t=e._id,e=e._name):(t=bv(),(r=VO).time=oy(),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,f,d=0;d<h;++d)(f=c[d])&&_f(f,e,t,d,c,r||ZO(f,t));return new Ta(a,this._parents,e,t)}Rc.prototype.interrupt=XF;Rc.prototype.transition=QO;const Yg=Math.PI,Gg=2*Yg,Pn=1e-6,KO=Gg-Pn;function Cv(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function JO(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Cv;const r=10**t;return function(a){this._+=a[0];for(let s=1,l=a.length;s<l;++s)this._+=Math.round(arguments[s]*r)/r+a[s]}}class tD{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Cv:JO(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,a,s){this._append`Q${+t},${+r},${this._x1=+a},${this._y1=+s}`}bezierCurveTo(t,r,a,s,l,c){this._append`C${+t},${+r},${+a},${+s},${this._x1=+l},${this._y1=+c}`}arcTo(t,r,a,s,l){if(t=+t,r=+r,a=+a,s=+s,l=+l,l<0)throw new Error(`negative radius: ${l}`);let c=this._x1,h=this._y1,f=a-t,d=s-r,p=c-t,g=h-r,x=p*p+g*g;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(x>Pn)if(!(Math.abs(g*f-d*p)>Pn)||!l)this._append`L${this._x1=t},${this._y1=r}`;else{let m=a-c,C=s-h,k=f*f+d*d,v=m*m+C*C,T=Math.sqrt(k),_=Math.sqrt(x),E=l*Math.tan((Yg-Math.acos((k+x-v)/(2*T*_)))/2),R=E/_,F=E/T;Math.abs(R-1)>Pn&&this._append`L${t+R*p},${r+R*g}`,this._append`A${l},${l},0,0,${+(g*m>p*C)},${this._x1=t+F*f},${this._y1=r+F*d}`}}arc(t,r,a,s,l,c){if(t=+t,r=+r,a=+a,c=!!c,a<0)throw new Error(`negative radius: ${a}`);let h=a*Math.cos(s),f=a*Math.sin(s),d=t+h,p=r+f,g=1^c,x=c?s-l:l-s;this._x1===null?this._append`M${d},${p}`:(Math.abs(this._x1-d)>Pn||Math.abs(this._y1-p)>Pn)&&this._append`L${d},${p}`,a&&(x<0&&(x=x%Gg+Gg),x>KO?this._append`A${a},${a},0,1,${g},${t-h},${r-f}A${a},${a},0,1,${g},${this._x1=d},${this._y1=p}`:x>Pn&&this._append`A${a},${a},0,${+(x>=Yg)},${g},${this._x1=t+a*Math.cos(l)},${this._y1=r+a*Math.sin(l)}`)}rect(t,r,a,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${a=+a}v${+s}h${-a}Z`}toString(){return this._}}function il(e){return function(){return e}}const U7=Math.abs,j7=Math.atan2,P7=Math.cos,W7=Math.max,Y7=Math.min,G7=Math.sin,X7=Math.sqrt,j1=1e-12,uy=Math.PI,P1=uy/2,V7=2*uy;function Z7(e){return e>1?0:e<-1?uy:Math.acos(e)}function Q7(e){return e>=1?P1:e<=-1?-P1:Math.asin(e)}function eD(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const a=Math.floor(r);if(!(a>=0))throw new RangeError(`invalid digits: ${r}`);t=a}return e},()=>new tD(t)}function iD(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function kv(e){this._context=e}kv.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 hc(e){return new kv(e)}function rD(e){return e[0]}function aD(e){return e[1]}function nD(e,t){var r=il(!0),a=null,s=hc,l=null,c=eD(h);e=typeof e=="function"?e:e===void 0?rD:il(e),t=typeof t=="function"?t:t===void 0?aD:il(t);function h(f){var d,p=(f=iD(f)).length,g,x=!1,m;for(a==null&&(l=s(m=c())),d=0;d<=p;++d)!(d<p&&r(g=f[d],d,f))===x&&((x=!x)?l.lineStart():l.lineEnd()),x&&l.point(+e(g,d,f),+t(g,d,f));if(m)return l=null,m+""||null}return h.x=function(f){return arguments.length?(e=typeof f=="function"?f:il(+f),h):e},h.y=function(f){return arguments.length?(t=typeof f=="function"?f:il(+f),h):t},h.defined=function(f){return arguments.length?(r=typeof f=="function"?f:il(!!f),h):r},h.curve=function(f){return arguments.length?(s=f,a!=null&&(l=s(a)),h):s},h.context=function(f){return arguments.length?(f==null?a=l=null:l=s(a=f),h):a},h}class vv{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Sv(e){return new vv(e,!0)}function Tv(e){return new vv(e,!1)}function xn(){}function Vu(e,t,r){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+r)/6)}function Bf(e){this._context=e}Bf.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:Vu(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:Vu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Xg(e){return new Bf(e)}function wv(e){this._context=e}wv.prototype={areaStart:xn,areaEnd:xn,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:Vu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sD(e){return new wv(e)}function _v(e){this._context=e}_v.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 r=(this._x0+4*this._x1+e)/6,a=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,a):this._context.moveTo(r,a);break;case 3:this._point=4;default:Vu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lD(e){return new _v(e)}function Bv(e,t){this._basis=new Bf(e),this._beta=t}Bv.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var a=e[0],s=t[0],l=e[r]-a,c=t[r]-s,h=-1,f;++h<=r;)f=h/r,this._basis.point(this._beta*e[h]+(1-this._beta)*(a+f*l),this._beta*t[h]+(1-this._beta)*(s+f*c));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const oD=(function e(t){function r(a){return t===1?new Bf(a):new Bv(a,t)}return r.beta=function(a){return e(+a)},r})(.85);function Zu(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function fy(e,t){this._context=e,this._k=(1-t)/6}fy.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:Zu(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:Zu(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 Ev=(function e(t){function r(a){return new fy(a,t)}return r.tension=function(a){return e(+a)},r})(0);function dy(e,t){this._context=e,this._k=(1-t)/6}dy.prototype={areaStart:xn,areaEnd:xn,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:Zu(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 cD=(function e(t){function r(a){return new dy(a,t)}return r.tension=function(a){return e(+a)},r})(0);function py(e,t){this._context=e,this._k=(1-t)/6}py.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:Zu(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 hD=(function e(t){function r(a){return new py(a,t)}return r.tension=function(a){return e(+a)},r})(0);function gy(e,t,r){var a=e._x1,s=e._y1,l=e._x2,c=e._y2;if(e._l01_a>j1){var h=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,f=3*e._l01_a*(e._l01_a+e._l12_a);a=(a*h-e._x0*e._l12_2a+e._x2*e._l01_2a)/f,s=(s*h-e._y0*e._l12_2a+e._y2*e._l01_2a)/f}if(e._l23_a>j1){var d=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*d+e._x1*e._l23_2a-t*e._l12_2a)/p,c=(c*d+e._y1*e._l23_2a-r*e._l12_2a)/p}e._context.bezierCurveTo(a,s,l,c,e._x2,e._y2)}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(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,a=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+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:gy(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 Av=(function e(t){function r(a){return t?new Lv(a,t):new fy(a,0)}return r.alpha=function(a){return e(+a)},r})(.5);function Mv(e,t){this._context=e,this._alpha=t}Mv.prototype={areaStart:xn,areaEnd:xn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,a=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+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:gy(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 uD=(function e(t){function r(a){return t?new Mv(a,t):new dy(a,0)}return r.alpha=function(a){return e(+a)},r})(.5);function Rv(e,t){this._context=e,this._alpha=t}Rv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,a=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+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:gy(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 fD=(function e(t){function r(a){return t?new Rv(a,t):new py(a,0)}return r.alpha=function(a){return e(+a)},r})(.5);function Fv(e){this._context=e}Fv.prototype={areaStart:xn,areaEnd:xn,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 dD(e){return new Fv(e)}function W1(e){return e<0?-1:1}function Y1(e,t,r){var a=e._x1-e._x0,s=t-e._x1,l=(e._y1-e._y0)/(a||s<0&&-0),c=(r-e._y1)/(s||a<0&&-0),h=(l*s+c*a)/(a+s);return(W1(l)+W1(c))*Math.min(Math.abs(l),Math.abs(c),.5*Math.abs(h))||0}function G1(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function hg(e,t,r){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*r,l,c)}function Qu(e){this._context=e}Qu.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:hg(this,this._t0,G1(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 r=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,hg(this,G1(this,r=Y1(this,e,t)),r);break;default:hg(this,this._t0,r=Y1(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Ov(e){this._context=new Dv(e)}(Ov.prototype=Object.create(Qu.prototype)).point=function(e,t){Qu.prototype.point.call(this,t,e)};function Dv(e){this._context=e}Dv.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,r,a,s,l){this._context.bezierCurveTo(t,e,a,r,l,s)}};function $v(e){return new Qu(e)}function zv(e){return new Ov(e)}function Nv(e){this._context=e}Nv.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var a=X1(e),s=X1(t),l=0,c=1;c<r;++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&&r===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 X1(e){var t,r=e.length-1,a,s=new Array(r),l=new Array(r),c=new Array(r);for(s[0]=0,l[0]=2,c[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,l[t]=4,c[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,l[r-1]=7,c[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)a=s[t]/l[t-1],l[t]-=a,c[t]-=a*c[t-1];for(s[r-1]=c[r-1]/l[r-1],t=r-2;t>=0;--t)s[t]=(c[t]-s[t+1])/l[t];for(l[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)l[t]=2*e[t+1]-s[t+1];return[s,l]}function qv(e){return new Nv(e)}function Ef(e,t){this._context=e,this._t=t}Ef.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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Iv(e){return new Ef(e,.5)}function Hv(e){return new Ef(e,0)}function Uv(e){return new Ef(e,1)}function ic(e,t,r){this.k=e,this.x=t,this.y=r}ic.prototype={constructor:ic,scale:function(e){return e===1?this:new ic(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ic(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+")"}};ic.prototype;var pD=S(e=>{var s;const{securityLevel:t}=re();let r=Wt("body");if(t==="sandbox"){const c=((s=Wt(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=Wt(c.body)}return r.select(`#${e}`)},"selectSvgElement");function my(e){return typeof e>"u"||e===null}S(my,"isNothing");function jv(e){return typeof e=="object"&&e!==null}S(jv,"isObject");function Pv(e){return Array.isArray(e)?e:my(e)?[]:[e]}S(Pv,"toArray");function Wv(e,t){var r,a,s,l;if(t)for(l=Object.keys(t),r=0,a=l.length;r<a;r+=1)s=l[r],e[s]=t[s];return e}S(Wv,"extend");function Yv(e,t){var r="",a;for(a=0;a<t;a+=1)r+=e;return r}S(Yv,"repeat");function Gv(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}S(Gv,"isNegativeZero");var gD=my,mD=jv,yD=Pv,xD=Yv,bD=Gv,CD=Wv,Xe={isNothing:gD,isObject:mD,toArray:yD,repeat:xD,isNegativeZero:bD,extend:CD};function yy(e,t){var r="",a=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
257
+
258
+ `+e.mark.snippet),a+" "+r):a}S(yy,"formatError");function Rl(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=yy(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}S(Rl,"YAMLException$1");Rl.prototype=Object.create(Error.prototype);Rl.prototype.constructor=Rl;Rl.prototype.toString=S(function(t){return this.name+": "+yy(this,t)},"toString");var zi=Rl;function wu(e,t,r,a,s){var l="",c="",h=Math.floor(s/2)-1;return a-t>h&&(l=" ... ",t=a-h+l.length),r-a>h&&(c=" ...",r=a+h-c.length),{str:l+e.slice(t,r).replace(/\t/g,"→")+c,pos:a-t+l.length}}S(wu,"getLine");function _u(e,t){return Xe.repeat(" ",t-e.length)+e}S(_u,"padStart");function Xv(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,a=[0],s=[],l,c=-1;l=r.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="",f,d,p=Math.min(e.line+t.linesAfter,s.length).toString().length,g=t.maxLength-(t.indent+p+3);for(f=1;f<=t.linesBefore&&!(c-f<0);f++)d=wu(e.buffer,a[c-f],s[c-f],e.position-(a[c]-a[c-f]),g),h=Xe.repeat(" ",t.indent)+_u((e.line-f+1).toString(),p)+" | "+d.str+`
259
+ `+h;for(d=wu(e.buffer,a[c],s[c],e.position,g),h+=Xe.repeat(" ",t.indent)+_u((e.line+1).toString(),p)+" | "+d.str+`
260
+ `,h+=Xe.repeat("-",t.indent+p+3+d.pos)+`^
261
+ `,f=1;f<=t.linesAfter&&!(c+f>=s.length);f++)d=wu(e.buffer,a[c+f],s[c+f],e.position-(a[c]-a[c+f]),g),h+=Xe.repeat(" ",t.indent)+_u((e.line+f+1).toString(),p)+" | "+d.str+`
262
+ `;return h.replace(/\n$/,"")}S(Xv,"makeSnippet");var kD=Xv,vD=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],SD=["scalar","sequence","mapping"];function Vv(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(a){t[String(a)]=r})}),t}S(Vv,"compileStyleAliases");function Zv(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(vD.indexOf(r)===-1)throw new zi('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Vv(t.styleAliases||null),SD.indexOf(this.kind)===-1)throw new zi('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}S(Zv,"Type$1");var pi=Zv;function Vg(e,t){var r=[];return e[t].forEach(function(a){var s=r.length;r.forEach(function(l,c){l.tag===a.tag&&l.kind===a.kind&&l.multi===a.multi&&(s=c)}),r[s]=a}),r}S(Vg,"compileList");function Qv(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;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(S(a,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(a);return e}S(Qv,"compileMap");function Ku(e){return this.extend(e)}S(Ku,"Schema$1");Ku.prototype.extend=S(function(t){var r=[],a=[];if(t instanceof pi)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&&(r=r.concat(t.implicit)),t.explicit&&(a=a.concat(t.explicit));else throw new zi("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(l){if(!(l instanceof pi))throw new zi("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(l.loadKind&&l.loadKind!=="scalar")throw new zi("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 zi("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 pi))throw new zi("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(Ku.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(a),s.compiledImplicit=Vg(s,"implicit"),s.compiledExplicit=Vg(s,"explicit"),s.compiledTypeMap=Qv(s.compiledImplicit,s.compiledExplicit),s},"extend");var TD=Ku,wD=new pi("tag:yaml.org,2002:str",{kind:"scalar",construct:S(function(e){return e!==null?e:""},"construct")}),_D=new pi("tag:yaml.org,2002:seq",{kind:"sequence",construct:S(function(e){return e!==null?e:[]},"construct")}),BD=new pi("tag:yaml.org,2002:map",{kind:"mapping",construct:S(function(e){return e!==null?e:{}},"construct")}),ED=new TD({explicit:[wD,_D,BD]});function Kv(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}S(Kv,"resolveYamlNull");function Jv(){return null}S(Jv,"constructYamlNull");function tS(e){return e===null}S(tS,"isNull");var LD=new pi("tag:yaml.org,2002:null",{kind:"scalar",resolve:Kv,construct:Jv,predicate:tS,represent:{canonical:S(function(){return"~"},"canonical"),lowercase:S(function(){return"null"},"lowercase"),uppercase:S(function(){return"NULL"},"uppercase"),camelcase:S(function(){return"Null"},"camelcase"),empty:S(function(){return""},"empty")},defaultStyle:"lowercase"});function eS(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")}S(eS,"resolveYamlBoolean");function iS(e){return e==="true"||e==="True"||e==="TRUE"}S(iS,"constructYamlBoolean");function rS(e){return Object.prototype.toString.call(e)==="[object Boolean]"}S(rS,"isBoolean");var AD=new pi("tag:yaml.org,2002:bool",{kind:"scalar",resolve:eS,construct:iS,predicate:rS,represent:{lowercase:S(function(e){return e?"true":"false"},"lowercase"),uppercase:S(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:S(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function aS(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}S(aS,"isHexCode");function nS(e){return 48<=e&&e<=55}S(nS,"isOctCode");function sS(e){return 48<=e&&e<=57}S(sS,"isDecCode");function lS(e){if(e===null)return!1;var t=e.length,r=0,a=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;a=!0}return a&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!aS(e.charCodeAt(r)))return!1;a=!0}return a&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!nS(e.charCodeAt(r)))return!1;a=!0}return a&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!sS(e.charCodeAt(r)))return!1;a=!0}return!(!a||s==="_")}S(lS,"resolveYamlInteger");function oS(e){var t=e,r=1,a;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),a=t[0],(a==="-"||a==="+")&&(a==="-"&&(r=-1),t=t.slice(1),a=t[0]),t==="0")return 0;if(a==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}S(oS,"constructYamlInteger");function cS(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Xe.isNegativeZero(e)}S(cS,"isInteger");var MD=new pi("tag:yaml.org,2002:int",{kind:"scalar",resolve:lS,construct:oS,predicate:cS,represent:{binary:S(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:S(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:S(function(e){return e.toString(10)},"decimal"),hexadecimal:S(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"]}}),RD=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function hS(e){return!(e===null||!RD.test(e)||e[e.length-1]==="_")}S(hS,"resolveYamlFloat");function uS(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}S(uS,"constructYamlFloat");var FD=/^[-+]?[0-9]+e/;function fS(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Xe.isNegativeZero(e))return"-0.0";return r=e.toString(10),FD.test(r)?r.replace("e",".e"):r}S(fS,"representYamlFloat");function dS(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Xe.isNegativeZero(e))}S(dS,"isFloat");var OD=new pi("tag:yaml.org,2002:float",{kind:"scalar",resolve:hS,construct:uS,predicate:dS,represent:fS,defaultStyle:"lowercase"}),pS=ED.extend({implicit:[LD,AD,MD,OD]}),DD=pS,gS=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),mS=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 yS(e){return e===null?!1:gS.exec(e)!==null||mS.exec(e)!==null}S(yS,"resolveYamlTimestamp");function xS(e){var t,r,a,s,l,c,h,f=0,d=null,p,g,x;if(t=gS.exec(e),t===null&&(t=mS.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],a=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,a,s));if(l=+t[4],c=+t[5],h=+t[6],t[7]){for(f=t[7].slice(0,3);f.length<3;)f+="0";f=+f}return t[9]&&(p=+t[10],g=+(t[11]||0),d=(p*60+g)*6e4,t[9]==="-"&&(d=-d)),x=new Date(Date.UTC(r,a,s,l,c,h,f)),d&&x.setTime(x.getTime()-d),x}S(xS,"constructYamlTimestamp");function bS(e){return e.toISOString()}S(bS,"representYamlTimestamp");var $D=new pi("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:yS,construct:xS,instanceOf:Date,represent:bS});function CS(e){return e==="<<"||e===null}S(CS,"resolveYamlMerge");var zD=new pi("tag:yaml.org,2002:merge",{kind:"scalar",resolve:CS}),xy=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
263
+ \r`;function kS(e){if(e===null)return!1;var t,r,a=0,s=e.length,l=xy;for(r=0;r<s;r++)if(t=l.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;a+=6}return a%8===0}S(kS,"resolveYamlBinary");function vS(e){var t,r,a=e.replace(/[\r\n=]/g,""),s=a.length,l=xy,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 r=s%4*6,r===0?(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)):r===18?(h.push(c>>10&255),h.push(c>>2&255)):r===12&&h.push(c>>4&255),new Uint8Array(h)}S(vS,"constructYamlBinary");function SS(e){var t="",r=0,a,s,l=e.length,c=xy;for(a=0;a<l;a++)a%3===0&&a&&(t+=c[r>>18&63],t+=c[r>>12&63],t+=c[r>>6&63],t+=c[r&63]),r=(r<<8)+e[a];return s=l%3,s===0?(t+=c[r>>18&63],t+=c[r>>12&63],t+=c[r>>6&63],t+=c[r&63]):s===2?(t+=c[r>>10&63],t+=c[r>>4&63],t+=c[r<<2&63],t+=c[64]):s===1&&(t+=c[r>>2&63],t+=c[r<<4&63],t+=c[64],t+=c[64]),t}S(SS,"representYamlBinary");function TS(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}S(TS,"isBinary");var ND=new pi("tag:yaml.org,2002:binary",{kind:"scalar",resolve:kS,construct:vS,predicate:TS,represent:SS}),qD=Object.prototype.hasOwnProperty,ID=Object.prototype.toString;function wS(e){if(e===null)return!0;var t=[],r,a,s,l,c,h=e;for(r=0,a=h.length;r<a;r+=1){if(s=h[r],c=!1,ID.call(s)!=="[object Object]")return!1;for(l in s)if(qD.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}S(wS,"resolveYamlOmap");function _S(e){return e!==null?e:[]}S(_S,"constructYamlOmap");var HD=new pi("tag:yaml.org,2002:omap",{kind:"sequence",resolve:wS,construct:_S}),UD=Object.prototype.toString;function BS(e){if(e===null)return!0;var t,r,a,s,l,c=e;for(l=new Array(c.length),t=0,r=c.length;t<r;t+=1){if(a=c[t],UD.call(a)!=="[object Object]"||(s=Object.keys(a),s.length!==1))return!1;l[t]=[s[0],a[s[0]]]}return!0}S(BS,"resolveYamlPairs");function ES(e){if(e===null)return[];var t,r,a,s,l,c=e;for(l=new Array(c.length),t=0,r=c.length;t<r;t+=1)a=c[t],s=Object.keys(a),l[t]=[s[0],a[s[0]]];return l}S(ES,"constructYamlPairs");var jD=new pi("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:BS,construct:ES}),PD=Object.prototype.hasOwnProperty;function LS(e){if(e===null)return!0;var t,r=e;for(t in r)if(PD.call(r,t)&&r[t]!==null)return!1;return!0}S(LS,"resolveYamlSet");function AS(e){return e!==null?e:{}}S(AS,"constructYamlSet");var WD=new pi("tag:yaml.org,2002:set",{kind:"mapping",resolve:LS,construct:AS}),MS=DD.extend({implicit:[$D,zD],explicit:[ND,HD,jD,WD]}),bn=Object.prototype.hasOwnProperty,Ju=1,RS=2,FS=3,tf=4,ug=1,YD=2,V1=3,GD=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,XD=/[\x85\u2028\u2029]/,VD=/[,\[\]\{\}]/,OS=/^(?:!|!!|![a-z\-]+!)$/i,DS=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Zg(e){return Object.prototype.toString.call(e)}S(Zg,"_class");function _r(e){return e===10||e===13}S(_r,"is_EOL");function yn(e){return e===9||e===32}S(yn,"is_WHITE_SPACE");function vi(e){return e===9||e===32||e===10||e===13}S(vi,"is_WS_OR_EOL");function Vn(e){return e===44||e===91||e===93||e===123||e===125}S(Vn,"is_FLOW_INDICATOR");function $S(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}S($S,"fromHexCode");function zS(e){return e===120?2:e===117?4:e===85?8:0}S(zS,"escapedHexLen");function NS(e){return 48<=e&&e<=57?e-48:-1}S(NS,"fromDecimalCode");function Qg(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
264
+ `: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":""}S(Qg,"simpleEscapeSequence");function qS(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}S(qS,"charFromCodepoint");function by(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}S(by,"setProperty");var IS=new Array(256),HS=new Array(256);for(Hn=0;Hn<256;Hn++)IS[Hn]=Qg(Hn)?1:0,HS[Hn]=Qg(Hn);var Hn;function US(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||MS,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=[]}S(US,"State$1");function Cy(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=kD(r),new zi(t,r)}S(Cy,"generateError");function At(e,t){throw Cy(e,t)}S(At,"throwError");function bc(e,t){e.onWarning&&e.onWarning.call(null,Cy(e,t))}S(bc,"throwWarning");var Z1={YAML:S(function(t,r,a){var s,l,c;t.version!==null&&At(t,"duplication of %YAML directive"),a.length!==1&&At(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(a[0]),s===null&&At(t,"ill-formed argument of the YAML directive"),l=parseInt(s[1],10),c=parseInt(s[2],10),l!==1&&At(t,"unacceptable YAML version of the document"),t.version=a[0],t.checkLineBreaks=c<2,c!==1&&c!==2&&bc(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:S(function(t,r,a){var s,l;a.length!==2&&At(t,"TAG directive accepts exactly two arguments"),s=a[0],l=a[1],OS.test(s)||At(t,"ill-formed tag handle (first argument) of the TAG directive"),bn.call(t.tagMap,s)&&At(t,'there is a previously declared suffix for "'+s+'" tag handle'),DS.test(l)||At(t,"ill-formed tag prefix (second argument) of the TAG directive");try{l=decodeURIComponent(l)}catch{At(t,"tag prefix is malformed: "+l)}t.tagMap[s]=l},"handleTagDirective")};function va(e,t,r,a){var s,l,c,h;if(t<r){if(h=e.input.slice(t,r),a)for(s=0,l=h.length;s<l;s+=1)c=h.charCodeAt(s),c===9||32<=c&&c<=1114111||At(e,"expected valid JSON character");else GD.test(h)&&At(e,"the stream contains non-printable characters");e.result+=h}}S(va,"captureSegment");function Kg(e,t,r,a){var s,l,c,h;for(Xe.isObject(r)||At(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),c=0,h=s.length;c<h;c+=1)l=s[c],bn.call(t,l)||(by(t,l,r[l]),a[l]=!0)}S(Kg,"mergeMappings");function Zn(e,t,r,a,s,l,c,h,f){var d,p;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),d=0,p=s.length;d<p;d+=1)Array.isArray(s[d])&&At(e,"nested arrays are not supported inside keys"),typeof s=="object"&&Zg(s[d])==="[object Object]"&&(s[d]="[object Object]");if(typeof s=="object"&&Zg(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),a==="tag:yaml.org,2002:merge")if(Array.isArray(l))for(d=0,p=l.length;d<p;d+=1)Kg(e,t,l[d],r);else Kg(e,t,l,r);else!e.json&&!bn.call(r,s)&&bn.call(t,s)&&(e.line=c||e.line,e.lineStart=h||e.lineStart,e.position=f||e.position,At(e,"duplicated mapping key")),by(t,s,l),delete r[s];return t}S(Zn,"storeMappingPair");function Lf(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++):At(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}S(Lf,"readLineBreak");function ze(e,t,r){for(var a=0,s=e.input.charCodeAt(e.position);s!==0;){for(;yn(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(_r(s))for(Lf(e),s=e.input.charCodeAt(e.position),a++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&a!==0&&e.lineIndent<r&&bc(e,"deficient indentation"),a}S(ze,"skipSeparationSpace");function Oc(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||vi(r)))}S(Oc,"testDocumentSeparator");function Af(e,t){t===1?e.result+=" ":t>1&&(e.result+=Xe.repeat(`
265
+ `,t-1))}S(Af,"writeFoldedLines");function jS(e,t,r){var a,s,l,c,h,f,d,p,g=e.kind,x=e.result,m;if(m=e.input.charCodeAt(e.position),vi(m)||Vn(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(s=e.input.charCodeAt(e.position+1),vi(s)||r&&Vn(s)))return!1;for(e.kind="scalar",e.result="",l=c=e.position,h=!1;m!==0;){if(m===58){if(s=e.input.charCodeAt(e.position+1),vi(s)||r&&Vn(s))break}else if(m===35){if(a=e.input.charCodeAt(e.position-1),vi(a))break}else{if(e.position===e.lineStart&&Oc(e)||r&&Vn(m))break;if(_r(m))if(f=e.line,d=e.lineStart,p=e.lineIndent,ze(e,!1,-1),e.lineIndent>=t){h=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=c,e.line=f,e.lineStart=d,e.lineIndent=p;break}}h&&(va(e,l,c,!1),Af(e,e.line-f),l=c=e.position,h=!1),yn(m)||(c=e.position+1),m=e.input.charCodeAt(++e.position)}return va(e,l,c,!1),e.result?!0:(e.kind=g,e.result=x,!1)}S(jS,"readPlainScalar");function PS(e,t){var r,a,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,a=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(va(e,a,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)a=e.position,e.position++,s=e.position;else return!0;else _r(r)?(va(e,a,s,!0),Af(e,ze(e,!1,t)),a=s=e.position):e.position===e.lineStart&&Oc(e)?At(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);At(e,"unexpected end of the stream within a single quoted scalar")}S(PS,"readSingleQuotedScalar");function WS(e,t){var r,a,s,l,c,h;if(h=e.input.charCodeAt(e.position),h!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=a=e.position;(h=e.input.charCodeAt(e.position))!==0;){if(h===34)return va(e,r,e.position,!0),e.position++,!0;if(h===92){if(va(e,r,e.position,!0),h=e.input.charCodeAt(++e.position),_r(h))ze(e,!1,t);else if(h<256&&IS[h])e.result+=HS[h],e.position++;else if((c=zS(h))>0){for(s=c,l=0;s>0;s--)h=e.input.charCodeAt(++e.position),(c=$S(h))>=0?l=(l<<4)+c:At(e,"expected hexadecimal character");e.result+=qS(l),e.position++}else At(e,"unknown escape sequence");r=a=e.position}else _r(h)?(va(e,r,a,!0),Af(e,ze(e,!1,t)),r=a=e.position):e.position===e.lineStart&&Oc(e)?At(e,"unexpected end of the document within a double quoted scalar"):(e.position++,a=e.position)}At(e,"unexpected end of the stream within a double quoted scalar")}S(WS,"readDoubleQuotedScalar");function YS(e,t){var r=!0,a,s,l,c=e.tag,h,f=e.anchor,d,p,g,x,m,C=Object.create(null),k,v,T,_;if(_=e.input.charCodeAt(e.position),_===91)p=93,m=!1,h=[];else if(_===123)p=125,m=!0,h={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=h),_=e.input.charCodeAt(++e.position);_!==0;){if(ze(e,!0,t),_=e.input.charCodeAt(e.position),_===p)return e.position++,e.tag=c,e.anchor=f,e.kind=m?"mapping":"sequence",e.result=h,!0;r?_===44&&At(e,"expected the node content, but found ','"):At(e,"missed comma between flow collection entries"),v=k=T=null,g=x=!1,_===63&&(d=e.input.charCodeAt(e.position+1),vi(d)&&(g=x=!0,e.position++,ze(e,!0,t))),a=e.line,s=e.lineStart,l=e.position,rs(e,t,Ju,!1,!0),v=e.tag,k=e.result,ze(e,!0,t),_=e.input.charCodeAt(e.position),(x||e.line===a)&&_===58&&(g=!0,_=e.input.charCodeAt(++e.position),ze(e,!0,t),rs(e,t,Ju,!1,!0),T=e.result),m?Zn(e,h,C,v,k,T,a,s,l):g?h.push(Zn(e,null,C,v,k,T,a,s,l)):h.push(k),ze(e,!0,t),_=e.input.charCodeAt(e.position),_===44?(r=!0,_=e.input.charCodeAt(++e.position)):r=!1}At(e,"unexpected end of the stream within a flow collection")}S(YS,"readFlowCollection");function GS(e,t){var r,a,s=ug,l=!1,c=!1,h=t,f=0,d=!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)ug===s?s=g===43?V1:YD:At(e,"repeat of a chomping mode identifier");else if((p=NS(g))>=0)p===0?At(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?At(e,"repeat of an indentation width identifier"):(h=t+p-1,c=!0);else break;if(yn(g)){do g=e.input.charCodeAt(++e.position);while(yn(g));if(g===35)do g=e.input.charCodeAt(++e.position);while(!_r(g)&&g!==0)}for(;g!==0;){for(Lf(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),_r(g)){f++;continue}if(e.lineIndent<h){s===V1?e.result+=Xe.repeat(`
266
+ `,l?1+f:f):s===ug&&l&&(e.result+=`
267
+ `);break}for(a?yn(g)?(d=!0,e.result+=Xe.repeat(`
268
+ `,l?1+f:f)):d?(d=!1,e.result+=Xe.repeat(`
269
+ `,f+1)):f===0?l&&(e.result+=" "):e.result+=Xe.repeat(`
270
+ `,f):e.result+=Xe.repeat(`
271
+ `,l?1+f:f),l=!0,c=!0,f=0,r=e.position;!_r(g)&&g!==0;)g=e.input.charCodeAt(++e.position);va(e,r,e.position,!1)}return!0}S(GS,"readBlockScalar");function Jg(e,t){var r,a=e.tag,s=e.anchor,l=[],c,h=!1,f;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),f=e.input.charCodeAt(e.position);f!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,At(e,"tab characters must not be used in indentation")),!(f!==45||(c=e.input.charCodeAt(e.position+1),!vi(c))));){if(h=!0,e.position++,ze(e,!0,-1)&&e.lineIndent<=t){l.push(null),f=e.input.charCodeAt(e.position);continue}if(r=e.line,rs(e,t,FS,!1,!0),l.push(e.result),ze(e,!0,-1),f=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&f!==0)At(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}S(Jg,"readBlockSequence");function XS(e,t,r){var a,s,l,c,h,f,d=e.tag,p=e.anchor,g={},x=Object.create(null),m=null,C=null,k=null,v=!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(!v&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,At(e,"tab characters must not be used in indentation")),a=e.input.charCodeAt(e.position+1),l=e.line,(_===63||_===58)&&vi(a))_===63?(v&&(Zn(e,g,x,m,C,null,c,h,f),m=C=k=null),T=!0,v=!0,s=!0):v?(v=!1,s=!0):At(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,f=e.position,!rs(e,r,RS,!1,!0))break;if(e.line===l){for(_=e.input.charCodeAt(e.position);yn(_);)_=e.input.charCodeAt(++e.position);if(_===58)_=e.input.charCodeAt(++e.position),vi(_)||At(e,"a whitespace character is expected after the key-value separator within a block mapping"),v&&(Zn(e,g,x,m,C,null,c,h,f),m=C=k=null),T=!0,v=!1,s=!1,m=e.tag,C=e.result;else if(T)At(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=d,e.anchor=p,!0}else if(T)At(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=d,e.anchor=p,!0}if((e.line===l||e.lineIndent>t)&&(v&&(c=e.line,h=e.lineStart,f=e.position),rs(e,t,tf,!0,s)&&(v?C=e.result:k=e.result),v||(Zn(e,g,x,m,C,k,c,h,f),m=C=k=null),ze(e,!0,-1),_=e.input.charCodeAt(e.position)),(e.line===l||e.lineIndent>t)&&_!==0)At(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return v&&Zn(e,g,x,m,C,null,c,h,f),T&&(e.tag=d,e.anchor=p,e.kind="mapping",e.result=g),T}S(XS,"readBlockMapping");function VS(e){var t,r=!1,a=!1,s,l,c;if(c=e.input.charCodeAt(e.position),c!==33)return!1;if(e.tag!==null&&At(e,"duplication of a tag property"),c=e.input.charCodeAt(++e.position),c===60?(r=!0,c=e.input.charCodeAt(++e.position)):c===33?(a=!0,s="!!",c=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){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)):At(e,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!vi(c);)c===33&&(a?At(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),OS.test(s)||At(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),VD.test(l)&&At(e,"tag suffix cannot contain flow indicator characters")}l&&!DS.test(l)&&At(e,"tag name cannot contain such characters: "+l);try{l=decodeURIComponent(l)}catch{At(e,"tag name is malformed: "+l)}return r?e.tag=l:bn.call(e.tagMap,s)?e.tag=e.tagMap[s]+l:s==="!"?e.tag="!"+l:s==="!!"?e.tag="tag:yaml.org,2002:"+l:At(e,'undeclared tag handle "'+s+'"'),!0}S(VS,"readTagProperty");function ZS(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&At(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!vi(r)&&!Vn(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&At(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}S(ZS,"readAnchorProperty");function QS(e){var t,r,a;if(a=e.input.charCodeAt(e.position),a!==42)return!1;for(a=e.input.charCodeAt(++e.position),t=e.position;a!==0&&!vi(a)&&!Vn(a);)a=e.input.charCodeAt(++e.position);return e.position===t&&At(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),bn.call(e.anchorMap,r)||At(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],ze(e,!0,-1),!0}S(QS,"readAlias");function rs(e,t,r,a,s){var l,c,h,f=1,d=!1,p=!1,g,x,m,C,k,v;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,l=c=h=tf===r||FS===r,a&&ze(e,!0,-1)&&(d=!0,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)),f===1)for(;VS(e)||ZS(e);)ze(e,!0,-1)?(d=!0,h=l,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)):h=!1;if(h&&(h=d||s),(f===1||tf===r)&&(Ju===r||RS===r?k=t:k=t+1,v=e.position-e.lineStart,f===1?h&&(Jg(e,v)||XS(e,v,k))||YS(e,k)?p=!0:(c&&GS(e,k)||PS(e,k)||WS(e,k)?p=!0:QS(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&At(e,"alias node should not have any properties")):jS(e,k,Ju===r)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):f===0&&(p=h&&Jg(e,v))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&At(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(bn.call(e.typeMap[e.kind||"fallback"],e.tag))C=e.typeMap[e.kind||"fallback"][e.tag];else for(C=null,m=e.typeMap.multi[e.kind||"fallback"],g=0,x=m.length;g<x;g+=1)if(e.tag.slice(0,m[g].tag.length)===m[g].tag){C=m[g];break}C||At(e,"unknown tag !<"+e.tag+">"),e.result!==null&&C.kind!==e.kind&&At(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)):At(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}S(rs,"composeNode");function KS(e){var t=e.position,r,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&&(ze(e,!0,-1),c=e.input.charCodeAt(e.position),!(e.lineIndent>0||c!==37));){for(l=!0,c=e.input.charCodeAt(++e.position),r=e.position;c!==0&&!vi(c);)c=e.input.charCodeAt(++e.position);for(a=e.input.slice(r,e.position),s=[],a.length<1&&At(e,"directive name must not be less than one character in length");c!==0;){for(;yn(c);)c=e.input.charCodeAt(++e.position);if(c===35){do c=e.input.charCodeAt(++e.position);while(c!==0&&!_r(c));break}if(_r(c))break;for(r=e.position;c!==0&&!vi(c);)c=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}c!==0&&Lf(e),bn.call(Z1,a)?Z1[a](e,a,s):bc(e,'unknown document directive "'+a+'"')}if(ze(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,ze(e,!0,-1)):l&&At(e,"directives end mark is expected"),rs(e,e.lineIndent-1,tf,!1,!0),ze(e,!0,-1),e.checkLineBreaks&&XD.test(e.input.slice(t,e.position))&&bc(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,ze(e,!0,-1));return}if(e.position<e.length-1)At(e,"end of the stream or a document separator is expected");else return}S(KS,"readDocument");function ky(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
272
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new US(e,t),a=e.indexOf("\0");for(a!==-1&&(r.position=a,At(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)KS(r);return r.documents}S(ky,"loadDocuments");function ZD(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var a=ky(e,r);if(typeof t!="function")return a;for(var s=0,l=a.length;s<l;s+=1)t(a[s])}S(ZD,"loadAll$1");function JS(e,t){var r=ky(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new zi("expected a single document in the stream, but found more")}}S(JS,"load$1");var QD=JS,KD={load:QD},tT=Object.prototype.toString,eT=Object.prototype.hasOwnProperty,vy=65279,JD=9,Cc=10,t6=13,e6=32,i6=33,r6=34,tm=35,a6=37,n6=38,s6=39,l6=42,iT=44,o6=45,ef=58,c6=61,h6=62,u6=63,f6=64,rT=91,aT=93,d6=96,nT=123,p6=124,sT=125,gi={};gi[0]="\\0";gi[7]="\\a";gi[8]="\\b";gi[9]="\\t";gi[10]="\\n";gi[11]="\\v";gi[12]="\\f";gi[13]="\\r";gi[27]="\\e";gi[34]='\\"';gi[92]="\\\\";gi[133]="\\N";gi[160]="\\_";gi[8232]="\\L";gi[8233]="\\P";var g6=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],m6=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function lT(e,t){var r,a,s,l,c,h,f;if(t===null)return{};for(r={},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)),f=e.compiledTypeMap.fallback[c],f&&eT.call(f.styleAliases,h)&&(h=f.styleAliases[h]),r[c]=h;return r}S(lT,"compileStyleMap");function oT(e){var t,r,a;if(t=e.toString(16).toUpperCase(),e<=255)r="x",a=2;else if(e<=65535)r="u",a=4;else if(e<=4294967295)r="U",a=8;else throw new zi("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Xe.repeat("0",a-t.length)+t}S(oT,"encodeHex");var y6=1,kc=2;function cT(e){this.schema=e.schema||MS,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Xe.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=lT(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==='"'?kc:y6,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}S(cT,"State");function em(e,t){for(var r=Xe.repeat(" ",t),a=0,s=-1,l="",c,h=e.length;a<h;)s=e.indexOf(`
273
+ `,a),s===-1?(c=e.slice(a),a=h):(c=e.slice(a,s+1),a=s+1),c.length&&c!==`
274
+ `&&(l+=r),l+=c;return l}S(em,"indentString");function rf(e,t){return`
275
+ `+Xe.repeat(" ",e.indent*t)}S(rf,"generateNextLine");function hT(e,t){var r,a,s;for(r=0,a=e.implicitTypes.length;r<a;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}S(hT,"testImplicitResolving");function vc(e){return e===e6||e===JD}S(vc,"isWhitespace");function Fl(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==vy||65536<=e&&e<=1114111}S(Fl,"isPrintable");function im(e){return Fl(e)&&e!==vy&&e!==t6&&e!==Cc}S(im,"isNsCharOrWhitespace");function rm(e,t,r){var a=im(e),s=a&&!vc(e);return(r?a:a&&e!==iT&&e!==rT&&e!==aT&&e!==nT&&e!==sT)&&e!==tm&&!(t===ef&&!s)||im(t)&&!vc(t)&&e===tm||t===ef&&s}S(rm,"isPlainSafe");function uT(e){return Fl(e)&&e!==vy&&!vc(e)&&e!==o6&&e!==u6&&e!==ef&&e!==iT&&e!==rT&&e!==aT&&e!==nT&&e!==sT&&e!==tm&&e!==n6&&e!==l6&&e!==i6&&e!==p6&&e!==c6&&e!==h6&&e!==s6&&e!==r6&&e!==a6&&e!==f6&&e!==d6}S(uT,"isPlainSafeFirst");function fT(e){return!vc(e)&&e!==ef}S(fT,"isPlainSafeLast");function cl(e,t){var r=e.charCodeAt(t),a;return r>=55296&&r<=56319&&t+1<e.length&&(a=e.charCodeAt(t+1),a>=56320&&a<=57343)?(r-55296)*1024+a-56320+65536:r}S(cl,"codePointAt");function Sy(e){var t=/^\n* /;return t.test(e)}S(Sy,"needIndentIndicator");var dT=1,am=2,pT=3,gT=4,sl=5;function mT(e,t,r,a,s,l,c,h){var f,d=0,p=null,g=!1,x=!1,m=a!==-1,C=-1,k=uT(cl(e,0))&&fT(cl(e,e.length-1));if(t||c)for(f=0;f<e.length;d>=65536?f+=2:f++){if(d=cl(e,f),!Fl(d))return sl;k=k&&rm(d,p,h),p=d}else{for(f=0;f<e.length;d>=65536?f+=2:f++){if(d=cl(e,f),d===Cc)g=!0,m&&(x=x||f-C-1>a&&e[C+1]!==" ",C=f);else if(!Fl(d))return sl;k=k&&rm(d,p,h),p=d}x=x||m&&f-C-1>a&&e[C+1]!==" "}return!g&&!x?k&&!c&&!s(e)?dT:l===kc?sl:am:r>9&&Sy(e)?sl:c?l===kc?sl:am:x?gT:pT}S(mT,"chooseScalarStyle");function yT(e,t,r,a,s){e.dump=(function(){if(t.length===0)return e.quotingType===kc?'""':"''";if(!e.noCompatMode&&(g6.indexOf(t)!==-1||m6.test(t)))return e.quotingType===kc?'"'+t+'"':"'"+t+"'";var l=e.indent*Math.max(1,r),c=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-l),h=a||e.flowLevel>-1&&r>=e.flowLevel;function f(d){return hT(e,d)}switch(S(f,"testAmbiguity"),mT(t,h,e.indent,c,f,e.quotingType,e.forceQuotes&&!a,s)){case dT:return t;case am:return"'"+t.replace(/'/g,"''")+"'";case pT:return"|"+nm(t,e.indent)+sm(em(t,l));case gT:return">"+nm(t,e.indent)+sm(em(xT(t,c),l));case sl:return'"'+bT(t)+'"';default:throw new zi("impossible error: invalid scalar style")}})()}S(yT,"writeScalar");function nm(e,t){var r=Sy(e)?String(t):"",a=e[e.length-1]===`
276
+ `,s=a&&(e[e.length-2]===`
277
+ `||e===`
278
+ `),l=s?"+":a?"":"-";return r+l+`
279
+ `}S(nm,"blockHeader");function sm(e){return e[e.length-1]===`
280
+ `?e.slice(0,-1):e}S(sm,"dropEndingNewline");function xT(e,t){for(var r=/(\n+)([^\n]*)/g,a=(function(){var d=e.indexOf(`
281
+ `);return d=d!==-1?d:e.length,r.lastIndex=d,lm(e.slice(0,d),t)})(),s=e[0]===`
282
+ `||e[0]===" ",l,c;c=r.exec(e);){var h=c[1],f=c[2];l=f[0]===" ",a+=h+(!s&&!l&&f!==""?`
283
+ `:"")+lm(f,t),s=l}return a}S(xT,"foldString");function lm(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,a,s=0,l,c=0,h=0,f="";a=r.exec(e);)h=a.index,h-s>t&&(l=c>s?c:h,f+=`
284
+ `+e.slice(s,l),s=l+1),c=h;return f+=`
285
+ `,e.length-s>t&&c>s?f+=e.slice(s,c)+`
286
+ `+e.slice(c+1):f+=e.slice(s),f.slice(1)}S(lm,"foldLine");function bT(e){for(var t="",r=0,a,s=0;s<e.length;r>=65536?s+=2:s++)r=cl(e,s),a=gi[r],!a&&Fl(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=a||oT(r);return t}S(bT,"escapeString");function CT(e,t,r){var a="",s=e.tag,l,c,h;for(l=0,c=r.length;l<c;l+=1)h=r[l],e.replacer&&(h=e.replacer.call(r,String(l),h)),(Yr(e,t,h,!1,!1)||typeof h>"u"&&Yr(e,t,null,!1,!1))&&(a!==""&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=s,e.dump="["+a+"]"}S(CT,"writeFlowSequence");function om(e,t,r,a){var s="",l=e.tag,c,h,f;for(c=0,h=r.length;c<h;c+=1)f=r[c],e.replacer&&(f=e.replacer.call(r,String(c),f)),(Yr(e,t+1,f,!0,!0,!1,!0)||typeof f>"u"&&Yr(e,t+1,null,!0,!0,!1,!0))&&((!a||s!=="")&&(s+=rf(e,t)),e.dump&&Cc===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=l,e.dump=s||"[]"}S(om,"writeBlockSequence");function kT(e,t,r){var a="",s=e.tag,l=Object.keys(r),c,h,f,d,p;for(c=0,h=l.length;c<h;c+=1)p="",a!==""&&(p+=", "),e.condenseFlow&&(p+='"'),f=l[c],d=r[f],e.replacer&&(d=e.replacer.call(r,f,d)),Yr(e,t,f,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Yr(e,t,d,!1,!1)&&(p+=e.dump,a+=p));e.tag=s,e.dump="{"+a+"}"}S(kT,"writeFlowMapping");function vT(e,t,r,a){var s="",l=e.tag,c=Object.keys(r),h,f,d,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 zi("sortKeys must be a boolean or a function");for(h=0,f=c.length;h<f;h+=1)x="",(!a||s!=="")&&(x+=rf(e,t)),d=c[h],p=r[d],e.replacer&&(p=e.replacer.call(r,d,p)),Yr(e,t+1,d,!0,!0,!0)&&(g=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,g&&(e.dump&&Cc===e.dump.charCodeAt(0)?x+="?":x+="? "),x+=e.dump,g&&(x+=rf(e,t)),Yr(e,t+1,p,!0,g)&&(e.dump&&Cc===e.dump.charCodeAt(0)?x+=":":x+=": ",x+=e.dump,s+=x));e.tag=l,e.dump=s||"{}"}S(vT,"writeBlockMapping");function cm(e,t,r){var a,s,l,c,h,f;for(s=r?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(r?h.multi&&h.representName?e.tag=h.representName(t):e.tag=h.tag:e.tag="?",h.represent){if(f=e.styleMap[h.tag]||h.defaultStyle,tT.call(h.represent)==="[object Function]")a=h.represent(t,f);else if(eT.call(h.represent,f))a=h.represent[f](t,f);else throw new zi("!<"+h.tag+'> tag resolver accepts not "'+f+'" style');e.dump=a}return!0}return!1}S(cm,"detectType");function Yr(e,t,r,a,s,l,c){e.tag=null,e.dump=r,cm(e,r,!1)||cm(e,r,!0);var h=tT.call(e.dump),f=a,d;a&&(a=e.flowLevel<0||e.flowLevel>t);var p=h==="[object Object]"||h==="[object Array]",g,x;if(p&&(g=e.duplicates.indexOf(r),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?(vT(e,t,e.dump,s),x&&(e.dump="&ref_"+g+e.dump)):(kT(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?om(e,t-1,e.dump,s):om(e,t,e.dump,s),x&&(e.dump="&ref_"+g+e.dump)):(CT(e,t,e.dump),x&&(e.dump="&ref_"+g+" "+e.dump));else if(h==="[object String]")e.tag!=="?"&&yT(e,e.dump,t,l,f);else{if(h==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new zi("unacceptable kind of an object to dump "+h)}e.tag!==null&&e.tag!=="?"&&(d=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",e.dump=d+" "+e.dump)}return!0}S(Yr,"writeNode");function ST(e,t){var r=[],a=[],s,l;for(af(e,r,a),s=0,l=a.length;s<l;s+=1)t.duplicates.push(r[a[s]]);t.usedDuplicates=new Array(l)}S(ST,"getDuplicateReferences");function af(e,t,r){var a,s,l;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,l=e.length;s<l;s+=1)af(e[s],t,r);else for(a=Object.keys(e),s=0,l=a.length;s<l;s+=1)af(e[a[s]],t,r)}S(af,"inspectNode");function x6(e,t){t=t||{};var r=new cT(t);r.noRefs||ST(e,r);var a=e;return r.replacer&&(a=r.replacer.call({"":a},"",a)),Yr(r,0,a,!0,!0)?r.dump+`
287
+ `:""}S(x6,"dump$1");function b6(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.")}}S(b6,"renamed");var C6=pS,k6=KD.load;/*! Bundled license information:
288
+
289
+ js-yaml/dist/js-yaml.mjs:
290
+ (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
291
+ */var Wo=S((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,a=e.y??0;return"translate("+-(r+e.width/2)+", "+-(a+e.height/2)+")"},"computeLabelTransform"),fi={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},Q1={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function rc(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=_e(e),t=_e(t);const[r,a]=[e.x,e.y],[s,l]=[t.x,t.y],c=s-r,h=l-a;return{angle:Math.atan(h/c),deltaX:c,deltaY:h}}S(rc,"calculateDeltaAndAngle");var _e=S(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),v6=S(e=>({x:S(function(t,r,a){let s=0;const l=_e(a[0]).x<_e(a[a.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(fi,e.arrowTypeStart)){const{angle:m,deltaX:C}=rc(a[0],a[1]);s=fi[e.arrowTypeStart]*Math.cos(m)*(C>=0?1:-1)}else if(r===a.length-1&&Object.hasOwn(fi,e.arrowTypeEnd)){const{angle:m,deltaX:C}=rc(a[a.length-1],a[a.length-2]);s=fi[e.arrowTypeEnd]*Math.cos(m)*(C>=0?1:-1)}const c=Math.abs(_e(t).x-_e(a[a.length-1]).x),h=Math.abs(_e(t).y-_e(a[a.length-1]).y),f=Math.abs(_e(t).x-_e(a[0]).x),d=Math.abs(_e(t).y-_e(a[0]).y),p=fi[e.arrowTypeStart],g=fi[e.arrowTypeEnd],x=1;if(c<g&&c>0&&h<g){let m=g+x-c;m*=l==="right"?-1:1,s-=m}if(f<p&&f>0&&d<p){let m=p+x-f;m*=l==="right"?-1:1,s+=m}return _e(t).x+s},"x"),y:S(function(t,r,a){let s=0;const l=_e(a[0]).y<_e(a[a.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(fi,e.arrowTypeStart)){const{angle:m,deltaY:C}=rc(a[0],a[1]);s=fi[e.arrowTypeStart]*Math.abs(Math.sin(m))*(C>=0?1:-1)}else if(r===a.length-1&&Object.hasOwn(fi,e.arrowTypeEnd)){const{angle:m,deltaY:C}=rc(a[a.length-1],a[a.length-2]);s=fi[e.arrowTypeEnd]*Math.abs(Math.sin(m))*(C>=0?1:-1)}const c=Math.abs(_e(t).y-_e(a[a.length-1]).y),h=Math.abs(_e(t).x-_e(a[a.length-1]).x),f=Math.abs(_e(t).y-_e(a[0]).y),d=Math.abs(_e(t).x-_e(a[0]).x),p=fi[e.arrowTypeStart],g=fi[e.arrowTypeEnd],x=1;if(c<g&&c>0&&h<g){let m=g+x-c;m*=l==="up"?-1:1,s-=m}if(f<p&&f>0&&d<p){let m=p+x-f;m*=l==="up"?-1:1,s+=m}return _e(t).y+s},"y")}),"getLineFunctionsWithOffset"),lu={},Ye={},K1;function S6(){return K1||(K1=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.BLANK_URL=Ye.relativeFirstCharacters=Ye.whitespaceEscapeCharsRegex=Ye.urlSchemeRegex=Ye.ctrlCharactersRegex=Ye.htmlCtrlEntityRegex=Ye.htmlEntitiesRegex=Ye.invalidProtocolRegex=void 0,Ye.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Ye.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Ye.htmlCtrlEntityRegex=/&(newline|tab);/gi,Ye.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Ye.urlSchemeRegex=/^.+(:|&colon;)/gim,Ye.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Ye.relativeFirstCharacters=[".","/"],Ye.BLANK_URL="about:blank"),Ye}var J1;function T6(){if(J1)return lu;J1=1,Object.defineProperty(lu,"__esModule",{value:!0}),lu.sanitizeUrl=l;var e=S6();function t(c){return e.relativeFirstCharacters.indexOf(c[0])>-1}function r(c){var h=c.replace(e.ctrlCharactersRegex,"");return h.replace(e.htmlEntitiesRegex,function(f,d){return String.fromCharCode(d)})}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,f=s(c.trim());do f=r(f).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),f=s(f),h=f.match(e.ctrlCharactersRegex)||f.match(e.htmlEntitiesRegex)||f.match(e.htmlCtrlEntityRegex)||f.match(e.whitespaceEscapeCharsRegex);while(h&&h.length>0);var d=f;if(!d)return e.BLANK_URL;if(t(d))return d;var p=d.trimStart(),g=p.match(e.urlSchemeRegex);if(!g)return d;var x=g[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(x))return e.BLANK_URL;var m=p.replace(/\\/g,"/");if(x==="mailto:"||x.includes("://"))return m;if(x==="http:"||x==="https:"){if(!a(m))return e.BLANK_URL;var C=new URL(m);return C.protocol=C.protocol.toLowerCase(),C.hostname=C.hostname.toLowerCase(),C.toString()}return m}return lu}var w6=T6();function _6(e){return Number.isSafeInteger(e)&&e>=0}function TT(e){return e!=null&&typeof e!="function"&&_6(e.length)}function B6(e){return e==="__proto__"}function Ty(e){return e==null||typeof e!="object"&&typeof e!="function"}function wT(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function wy(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const E6="[object RegExp]",_T="[object String]",BT="[object Number]",ET="[object Boolean]",LT="[object Arguments]",L6="[object Symbol]",A6="[object Date]",M6="[object Map]",R6="[object Set]",F6="[object Array]",O6="[object ArrayBuffer]",AT="[object Object]",D6="[object DataView]",$6="[object Uint8Array]",z6="[object Uint8ClampedArray]",N6="[object Uint16Array]",q6="[object Uint32Array]",I6="[object Int8Array]",H6="[object Int16Array]",U6="[object Int32Array]",j6="[object Float32Array]",P6="[object Float64Array]",t2=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();function _y(e){return typeof t2.Buffer<"u"&&t2.Buffer.isBuffer(e)}function By(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function W6(e,t){return hl(e,void 0,e,new Map,t)}function hl(e,t,r,a=new Map,s=void 0){const l=s==null?void 0:s(e,t,r,a);if(l!==void 0)return l;if(Ty(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]=hl(e[h],h,r,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,f]of e)c.set(h,hl(f,h,r,a,s));return c}if(e instanceof Set){const c=new Set;a.set(e,c);for(const h of e)c.add(hl(h,void 0,r,a,s));return c}if(_y(e))return e.subarray();if(By(e)){const c=new(Object.getPrototypeOf(e)).constructor(e.length);a.set(e,c);for(let h=0;h<e.length;h++)c[h]=hl(e[h],h,r,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),xr(c,e,r,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),xr(c,e,r,a,s),c}if(typeof Blob<"u"&&e instanceof Blob){const c=new Blob([e],{type:e.type});return a.set(e,c),xr(c,e,r,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,xr(c,e,r,a,s),c}if(e instanceof Boolean){const c=new Boolean(e.valueOf());return a.set(e,c),xr(c,e,r,a,s),c}if(e instanceof Number){const c=new Number(e.valueOf());return a.set(e,c),xr(c,e,r,a,s),c}if(e instanceof String){const c=new String(e.valueOf());return a.set(e,c),xr(c,e,r,a,s),c}if(typeof e=="object"&&Y6(e)){const c=Object.create(Object.getPrototypeOf(e));return a.set(e,c),xr(c,e,r,a,s),c}return e}function xr(e,t,r=e,a,s){const l=[...Object.keys(t),...wT(t)];for(let c=0;c<l.length;c++){const h=l[c],f=Object.getOwnPropertyDescriptor(e,h);(f==null||f.writable)&&(e[h]=hl(t[h],h,r,a,s))}}function Y6(e){switch(wy(e)){case LT:case F6:case O6:case D6:case ET:case A6:case j6:case P6:case I6:case H6:case U6:case M6:case BT:case AT:case E6:case R6:case _T:case L6:case $6:case z6:case N6:case q6:return!0;default:return!1}}function G6(e,t){return W6(e,(r,a,s,l)=>{if(typeof e=="object"){if(wy(e)===AT&&typeof e.constructor!="function"){const c={};return l.set(e,c),xr(c,e,s,l),c}switch(Object.prototype.toString.call(e)){case BT:case _T:case ET:{const c=new e.constructor(e==null?void 0:e.valueOf());return xr(c,e),c}case LT:{const c={};return xr(c,e),c.length=e.length,c[Symbol.iterator]=e[Symbol.iterator],c}default:return}}})}function e2(e){return G6(e)}function hm(e){return e!==null&&typeof e=="object"&&wy(e)==="[object Arguments]"}function um(e){return typeof e=="object"&&e!==null}function X6(e){return um(e)&&TT(e)}function Dc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...s){const l=t?t.apply(this,s):s[0],c=r.cache;if(c.has(l))return c.get(l);const h=e.apply(this,s);return r.cache=c.set(l,h)||c,h},a=Dc.Cache||Map;return r.cache=new a,r}Dc.Cache=Map;function V6(){}function Z6(e){const t=e==null?void 0:e.constructor,r=typeof t=="function"?t.prototype:Object.prototype;return e===r}function Bu(e){return By(e)}function fg(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const a=e[Symbol.toStringTag];return a==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${a}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Q6(e){if(Ty(e))return e;if(Array.isArray(e)||By(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 r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const a=new r(e);return a.lastIndex=e.lastIndex,a}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let a;return e instanceof AggregateError?a=new r(e.errors,e.message,{cause:e.cause}):a=new r(e.message,{cause:e.cause}),a.stack=e.stack,Object.assign(a,e),a}if(typeof File<"u"&&e instanceof File)return new r([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 K6(e,...t){const r=t.slice(0,-1),a=t[t.length-1];let s=e;for(let l=0;l<r.length;l++){const c=r[l];s=Eu(s,c,a,new Map)}return s}function Eu(e,t,r,a){if(Ty(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(a.has(t))return Q6(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),...wT(t)];for(let l=0;l<s.length;l++){const c=s[l];if(B6(c))continue;let h=t[c],f=e[c];if(hm(h)&&(h={...h}),hm(f)&&(f={...f}),_y(h)&&(h=e2(h)),Array.isArray(h))if(Array.isArray(f)){const p=[],g=Reflect.ownKeys(f);for(let x=0;x<g.length;x++){const m=g[x];p[m]=f[m]}f=p}else if(X6(f)){const p=[];for(let g=0;g<f.length;g++)p[g]=f[g];f=p}else f=[];const d=r(f,h,c,e,t,a);d!==void 0?e[c]=d:Array.isArray(h)||um(f)&&um(h)&&(fg(f)||fg(h)||Bu(f)||Bu(h))?e[c]=Eu(f,h,r,a):f==null&&fg(h)?e[c]=Eu({},h,r,a):f==null&&Bu(h)?e[c]=e2(h):(f===void 0||h!==void 0)&&(e[c]=h)}return e}function J6(e,...t){return K6(e,...t,V6)}function i2(e){if(e==null)return!0;if(TT(e))return typeof e.splice!="function"&&typeof e!="string"&&!_y(e)&&!Bu(e)&&!hm(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 Z6(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var t$="​",e$={curveBasis:Xg,curveBasisClosed:sD,curveBasisOpen:lD,curveBumpX:Sv,curveBumpY:Tv,curveBundle:oD,curveCardinalClosed:cD,curveCardinalOpen:hD,curveCardinal:Ev,curveCatmullRomClosed:uD,curveCatmullRomOpen:fD,curveCatmullRom:Av,curveLinear:hc,curveLinearClosed:dD,curveMonotoneX:$v,curveMonotoneY:zv,curveNatural:qv,curveStep:Iv,curveStepAfter:Uv,curveStepBefore:Hv},i$=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,r$=S(function(e,t){const r=MT(e,/(?:init\b)|(?:initialize\b)/);let a={};if(Array.isArray(r)){const c=r.map(h=>h.args);Nu(c),a=Ge(a,[...c])}else a=r.args;if(!a)return;let s=Km(e,t);const l="config";return a[l]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),a[s]=a[l],delete a[l]),a},"detectInit"),MT=S(function(e,t=null){var r,a;try{const s=new RegExp(`[%]{2}(?![{]${i$.source})(?=[}][%]{2}).*
292
+ `,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),gt.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let l;const c=[];for(;(l=oc.exec(e))!==null;)if(l.index===oc.lastIndex&&oc.lastIndex++,l&&!t||t&&((r=l[1])!=null&&r.match(t))||t&&((a=l[2])!=null&&a.match(t))){const h=l[1]?l[1]:l[2],f=l[3]?l[3].trim():l[4]?JSON.parse(l[4].trim()):null;c.push({type:h,args:f})}return c.length===0?{type:e,args:null}:c.length===1?c[0]:c}catch(s){return gt.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),a$=S(function(e){return e.replace(oc,"")},"removeDirectives"),n$=S(function(e,t){for(const[r,a]of t.entries())if(a.match(e))return r;return-1},"isSubstringInArray");function Ey(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return e$[r]??t}S(Ey,"interpolateToCurve");function RT(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?w6.sanitizeUrl(r):r}S(RT,"formatUrl");var s$=S((e,...t)=>{const r=e.split("."),a=r.length-1,s=r[a];let l=window;for(let c=0;c<a;c++)if(l=l[r[c]],!l){gt.error(`Function name: ${e} not found in window`);return}l[s](...t)},"runFunc");function Ly(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}S(Ly,"distance");function FT(e){let t,r=0;e.forEach(s=>{r+=Ly(s,t),t=s});const a=r/2;return Ay(e,a)}S(FT,"traverseEdge");function OT(e){return e.length===1?e[0]:FT(e)}S(OT,"calcLabelPosition");var r2=S((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Ay=S((e,t)=>{let r,a=t;for(const s of e){if(r){const l=Ly(s,r);if(l===0)return r;if(l<a)a-=l;else{const c=a/l;if(c<=0)return r;if(c>=1)return{x:s.x,y:s.y};if(c>0&&c<1)return{x:r2((1-c)*r.x+c*s.x,5),y:r2((1-c)*r.y+c*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),l$=S((e,t,r)=>{gt.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=Ay(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 DT(e,t,r){const a=structuredClone(r);gt.info("our points",a),t!=="start_left"&&t!=="start_right"&&a.reverse();const s=25+e,l=Ay(a,s),c=10+e*.5,h=Math.atan2(a[0].y-l.y,a[0].x-l.x),f={x:0,y:0};return t==="start_left"?(f.x=Math.sin(h+Math.PI)*c+(a[0].x+l.x)/2,f.y=-Math.cos(h+Math.PI)*c+(a[0].y+l.y)/2):t==="end_right"?(f.x=Math.sin(h-Math.PI)*c+(a[0].x+l.x)/2-5,f.y=-Math.cos(h-Math.PI)*c+(a[0].y+l.y)/2-5):t==="end_left"?(f.x=Math.sin(h)*c+(a[0].x+l.x)/2-5,f.y=-Math.cos(h)*c+(a[0].y+l.y)/2-5):(f.x=Math.sin(h)*c+(a[0].x+l.x)/2,f.y=-Math.cos(h)*c+(a[0].y+l.y)/2),f}S(DT,"calcTerminalLabelPosition");function $T(e){let t="",r="";for(const a of e)a!==void 0&&(a.startsWith("color:")||a.startsWith("text-align:")?r=r+a+";":t=t+a+";");return{style:t,labelStyle:r}}S($T,"getStylesFromArray");var a2=0,o$=S(()=>(a2++,"id-"+Math.random().toString(36).substr(2,12)+"-"+a2),"generateId");function zT(e){let t="";const r="0123456789abcdef",a=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*a));return t}S(zT,"makeRandomHex");var c$=S(e=>zT(e.length),"random"),h$=S(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"),u$=S(function(e,t){const r=t.text.replace(Mc.lineBreakRegex," "),[,a]=Mf(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(r),s},"drawSimpleText"),f$=Dc((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Mc.lineBreakRegex.test(e)))return e;const a=e.split(" ").filter(Boolean),s=[];let l="";return a.forEach((c,h)=>{const f=wa(`${c} `,r),d=wa(l,r);if(f>t){const{hyphenatedStrings:x,remainingWord:m}=d$(c,t,"-",r);s.push(l,...x),l=m}else d+f>=t?(s.push(l),l=c):l=[l,c].filter(Boolean).join(" ");h+1===a.length&&s.push(l)}),s.filter(c=>c!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),d$=Dc((e,t,r="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);const s=[...e],l=[];let c="";return s.forEach((h,f)=>{const d=`${c}${h}`;if(wa(d,a)>=t){const g=f+1,x=s.length===g,m=`${d}${r}`;l.push(x?d:m),c=""}else c=d}),{hyphenatedStrings:l,remainingWord:c}},(e,t,r="-",a)=>`${e}${t}${r}${a.fontSize}${a.fontWeight}${a.fontFamily}`);function NT(e,t){return My(e,t).height}S(NT,"calculateTextHeight");function wa(e,t){return My(e,t).width}S(wa,"calculateTextWidth");var My=Dc((e,t)=>{const{fontSize:r=12,fontFamily:a="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,l]=Mf(r),c=["sans-serif",a],h=e.split(Mc.lineBreakRegex),f=[],d=Wt("body");if(!d.remove)return{width:0,height:0,lineHeight:0};const p=d.append("svg");for(const x of c){let m=0;const C={width:0,height:0,lineHeight:0};for(const k of h){const v=h$();v.text=k||t$;const T=u$(p,v).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)),m=Math.round(_.height),C.height+=m,C.lineHeight=Math.round(Math.max(C.lineHeight,m))}f.push(C)}p.remove();const g=isNaN(f[1].height)||isNaN(f[1].width)||isNaN(f[1].lineHeight)||f[0].height>f[1].height&&f[0].width>f[1].width&&f[0].lineHeight>f[1].lineHeight?0:1;return f[g]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Bl,p$=(Bl=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},S(Bl,"InitIDGenerator"),Bl),ou,g$=S(function(e){return ou=ou||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ou.innerHTML=e,unescape(ou.textContent)},"entityDecode");function Ry(e){return"str"in e}S(Ry,"isDetailedError");var m$=S((e,t,r,a)=>{var l;if(!a)return;const s=(l=e.node())==null?void 0:l.getBBox();s&&e.append("text").text(a).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Mf=S(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 Fy(e,t){return J6({},e,t)}S(Fy,"cleanAndMerge");var Tr={assignWithDepth:Ge,wrapLabel:f$,calculateTextHeight:NT,calculateTextWidth:wa,calculateTextDimensions:My,cleanAndMerge:Fy,detectInit:r$,detectDirective:MT,isSubstringInArray:n$,interpolateToCurve:Ey,calcLabelPosition:OT,calcCardinalityPosition:l$,calcTerminalLabelPosition:DT,formatUrl:RT,getStylesFromArray:$T,generateId:o$,random:c$,runFunc:s$,entityDecode:g$,insertTitle:m$,isLabelCoordinateInPath:qT,parseFontSize:Mf,InitIDGenerator:p$},y$=S(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const a=r.substring(1,r.length-1);return/^\+?\d+$/.test(a)?"fl°°"+a+"¶ß":"fl°"+a+"¶ß"}),t},"encodeEntities"),as=S(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),K7=S((e,t,{counter:r=0,prefix:a,suffix:s},l)=>l||`${a?`${a}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function Qe(e){return e??null}S(Qe,"handleUndefinedAttr");function qT(e,t){const r=Math.round(e.x),a=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,l=>Math.round(parseFloat(l)).toString());return s.includes(r.toString())||s.includes(a.toString())}S(qT,"isLabelCoordinateInPath");var Oy=S(({flowchart:e})=>{var s,l;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((l=e==null?void 0:e.subGraphTitleMargin)==null?void 0:l.bottom)??0,a=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:a}},"getSubGraphTitleMargins");async function IT(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const a=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(s=>new Promise(l=>{function c(){if(s.style.display="flex",s.style.flexDirection="column",a){const h=re().fontSize?re().fontSize:window.getComputedStyle(document.body).fontSize,f=5,[d=Dk.fontSize]=Mf(h),p=d*f+"px";s.style.minWidth=p,s.style.maxWidth=p}else s.style.width="100%";l(s)}S(c,"setupImage"),setTimeout(()=>{s.complete&&c()}),s.addEventListener("error",c),s.addEventListener("load",c)})))}S(IT,"configureLabelImages");var x$=S(e=>{const{handDrawnSeed:t}=re();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Il=S(e=>{const t=b$([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),b$=S(e=>{const t=new Map;return e.forEach(r=>{const[a,s]=r.split(":");t.set(a.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),HT=S(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=S(e=>{const{stylesArray:t}=Il(e),r=[],a=[],s=[],l=[];return t.forEach(c=>{const h=c[0];HT(h)?r.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:r.join(";"),nodeStyles:a.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:l}},"styles2String"),Tt=S((e,t)=>{var f;const{themeVariables:r,handDrawnSeed:a}=re(),{nodeBorder:s,mainBkg:l}=r,{stylesMap:c}=Il(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:((f=c.get("stroke-width"))==null?void 0:f.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:C$(c.get("stroke-dasharray"))},t)},"userNodeOverrides"),C$=S(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 r=isNaN(t[0])?0:t[0],a=isNaN(t[1])?0:t[1];return[r,a]},"getStrokeDashArray");const k$=Object.freeze({left:0,top:0,width:16,height:16}),nf=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),UT=Object.freeze({...k$,...nf}),v$=Object.freeze({...UT,body:"",hidden:!1}),S$=Object.freeze({width:null,height:null}),T$=Object.freeze({...S$,...nf}),w$=(e,t,r,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(),f=s.pop(),d={provider:s.length>0?s[0]:a,prefix:f,name:h};return dg(d)?d:null}const l=s[0],c=l.split("-");if(c.length>1){const h={provider:a,prefix:c.shift(),name:c.join("-")};return dg(h)?h:null}if(r&&a===""){const h={provider:a,prefix:"",name:l};return dg(h,r)?h:null}return null},dg=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function _$(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const a=((e.rotate||0)+(t.rotate||0))%4;return a&&(r.rotate=a),r}function n2(e,t){const r=_$(e,t);for(const a in v$)a in nf?a in e&&!(a in r)&&(r[a]=nf[a]):a in t?r[a]=t[a]:a in e&&(r[a]=e[a]);return r}function B$(e,t){const r=e.icons,a=e.aliases||Object.create(null),s=Object.create(null);function l(c){if(r[c])return s[c]=[];if(!(c in s)){s[c]=null;const h=a[c]&&a[c].parent,f=h&&l(h);f&&(s[c]=[h].concat(f))}return s[c]}return(t||Object.keys(r).concat(Object.keys(a))).forEach(l),s}function s2(e,t,r){const a=e.icons,s=e.aliases||Object.create(null);let l={};function c(h){l=n2(a[h]||s[h],l)}return c(t),r.forEach(c),n2(e,l)}function E$(e,t){if(e.icons[t])return s2(e,t,[]);const r=B$(e,[t])[t];return r?s2(e,t,r):null}const L$=/(-?[0-9.]*[0-9]+[0-9.]*)/g,A$=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function l2(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const a=e.split(L$);if(a===null||!a.length)return e;const s=[];let l=a.shift(),c=A$.test(l);for(;;){if(c){const h=parseFloat(l);isNaN(h)?s.push(l):s.push(Math.ceil(h*t*r)/r)}else s.push(l);if(l=a.shift(),l===void 0)return s.join("");c=!c}}function M$(e,t="defs"){let r="";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;r+=e.slice(s+1,l).trim(),e=e.slice(0,a).trim()+e.slice(c+1)}return{defs:r,content:e}}function R$(e,t){return e?"<defs>"+e+"</defs>"+t:t}function F$(e,t,r){const a=M$(e);return R$(a.defs,t+a.content+r)}const O$=e=>e==="unset"||e==="undefined"||e==="none";function D$(e,t){const r={...UT,...e},a={...T$,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let l=r.body;[r,a].forEach(k=>{const v=[],T=k.hFlip,_=k.vFlip;let E=k.rotate;T?_?E+=2:(v.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),v.push("scale(-1 1)"),s.top=s.left=0):_&&(v.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),v.push("scale(1 -1)"),s.top=s.left=0);let R;switch(E<0&&(E-=Math.floor(E/4)*4),E=E%4,E){case 1:R=s.height/2+s.top,v.unshift("rotate(90 "+R.toString()+" "+R.toString()+")");break;case 2:v.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:R=s.width/2+s.left,v.unshift("rotate(-90 "+R.toString()+" "+R.toString()+")");break}E%2===1&&(s.left!==s.top&&(R=s.left,s.left=s.top,s.top=R),s.width!==s.height&&(R=s.width,s.width=s.height,s.height=R)),v.length&&(l=F$(l,'<g transform="'+v.join(" ")+'">',"</g>"))});const c=a.width,h=a.height,f=s.width,d=s.height;let p,g;c===null?(g=h===null?"1em":h==="auto"?d:h,p=l2(g,f/d)):(p=c==="auto"?f:c,g=h===null?l2(p,d/f):h==="auto"?d:h);const x={},m=(k,v)=>{O$(v)||(x[k]=v.toString())};m("width",p),m("height",g);const C=[s.left,s.top,f,d];return x.viewBox=C.join(" "),{attributes:x,viewBox:C,body:l}}const $$=/\sid="(\S+)"/g,o2=new Map;function z$(e){e=e.replace(/[0-9]+$/,"")||"a";const t=o2.get(e)||0;return o2.set(e,t+1),t?`${e}${t}`:e}function N$(e){const t=[];let r;for(;r=$$.exec(e);)t.push(r[1]);if(!t.length)return e;const a="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const l=z$(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 q$(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const a in t)r+=" "+a+'="'+t[a]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function Dy(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var os=Dy();function jT(e){os=e}var uc={exec:()=>null};function ae(e,t=""){let r=typeof e=="string"?e:e.source,a={replace:(s,l)=>{let c=typeof l=="string"?l:l.source;return c=c.replace(Si.caret,"$1"),r=r.replace(s,c),a},getRegex:()=>new RegExp(r,t)};return a}var I$=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Si={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")},H$=/^(?:[ \t]*(?:\n|$))+/,U$=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,j$=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,$c=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,P$=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,$y=/(?:[*+-]|\d{1,9}[.)])/,PT=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,WT=ae(PT).replace(/bull/g,$y).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(),W$=ae(PT).replace(/bull/g,$y).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(),zy=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Y$=/^[^\n]+/,Ny=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,G$=ae(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ny).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),X$=ae(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,$y).getRegex(),Rf="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",qy=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,V$=ae("^ {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",qy).replace("tag",Rf).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),YT=ae(zy).replace("hr",$c).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",Rf).getRegex(),Z$=ae(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",YT).getRegex(),Iy={blockquote:Z$,code:U$,def:G$,fences:j$,heading:P$,hr:$c,html:V$,lheading:WT,list:X$,newline:H$,paragraph:YT,table:uc,text:Y$},c2=ae("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",$c).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",Rf).getRegex(),Q$={...Iy,lheading:W$,table:c2,paragraph:ae(zy).replace("hr",$c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",c2).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",Rf).getRegex()},K$={...Iy,html:ae(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",qy).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:uc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ae(zy).replace("hr",$c).replace("heading",` *#{1,6} *[^
293
+ ]`).replace("lheading",WT).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},J$=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,t8=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,GT=/^( {2,}|\\)\n(?!\s*$)/,e8=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ff=/[\p{P}\p{S}]/u,Hy=/[\s\p{P}\p{S}]/u,XT=/[^\s\p{P}\p{S}]/u,i8=ae(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Hy).getRegex(),VT=/(?!~)[\p{P}\p{S}]/u,r8=/(?!~)[\s\p{P}\p{S}]/u,a8=/(?:[^\s\p{P}\p{S}]|~)/u,n8=ae(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",I$?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ZT=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,s8=ae(ZT,"u").replace(/punct/g,Ff).getRegex(),l8=ae(ZT,"u").replace(/punct/g,VT).getRegex(),QT="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",o8=ae(QT,"gu").replace(/notPunctSpace/g,XT).replace(/punctSpace/g,Hy).replace(/punct/g,Ff).getRegex(),c8=ae(QT,"gu").replace(/notPunctSpace/g,a8).replace(/punctSpace/g,r8).replace(/punct/g,VT).getRegex(),h8=ae("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,XT).replace(/punctSpace/g,Hy).replace(/punct/g,Ff).getRegex(),u8=ae(/\\(punct)/,"gu").replace(/punct/g,Ff).getRegex(),f8=ae(/^<(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(),d8=ae(qy).replace("(?:-->|$)","-->").getRegex(),p8=ae("^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",d8).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),sf=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,g8=ae(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",sf).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),KT=ae(/^!?\[(label)\]\[(ref)\]/).replace("label",sf).replace("ref",Ny).getRegex(),JT=ae(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ny).getRegex(),m8=ae("reflink|nolink(?!\\()","g").replace("reflink",KT).replace("nolink",JT).getRegex(),h2=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Uy={_backpedal:uc,anyPunctuation:u8,autolink:f8,blockSkip:n8,br:GT,code:t8,del:uc,emStrongLDelim:s8,emStrongRDelimAst:o8,emStrongRDelimUnd:h8,escape:J$,link:g8,nolink:JT,punctuation:i8,reflink:KT,reflinkSearch:m8,tag:p8,text:e8,url:uc},y8={...Uy,link:ae(/^!?\[(label)\]\((.*?)\)/).replace("label",sf).getRegex(),reflink:ae(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",sf).getRegex()},fm={...Uy,emStrongRDelimAst:c8,emStrongLDelim:l8,url:ae(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",h2).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:ae(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",h2).getRegex()},x8={...fm,br:ae(GT).replace("{2,}","*").getRegex(),text:ae(fm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},cu={normal:Iy,gfm:Q$,pedantic:K$},Yo={normal:Uy,gfm:fm,breaks:x8,pedantic:y8},b8={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},u2=e=>b8[e];function Hr(e,t){if(t){if(Si.escapeTest.test(e))return e.replace(Si.escapeReplace,u2)}else if(Si.escapeTestNoEncode.test(e))return e.replace(Si.escapeReplaceNoEncode,u2);return e}function f2(e){try{e=encodeURI(e).replace(Si.percentDecode,"%")}catch{return null}return e}function d2(e,t){var l;let r=e.replace(Si.findPipe,(c,h,f)=>{let d=!1,p=h;for(;--p>=0&&f[p]==="\\";)d=!d;return d?"|":" |"}),a=r.split(Si.splitPipe),s=0;if(a[0].trim()||a.shift(),a.length>0&&!((l=a.at(-1))!=null&&l.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(Si.slashPipe,"|");return a}function Go(e,t,r){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 C8(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let a=0;a<e.length;a++)if(e[a]==="\\")a++;else if(e[a]===t[0])r++;else if(e[a]===t[1]&&(r--,r<0))return a;return r>0?-2:-1}function p2(e,t,r,a,s){let l=t.href,c=t.title||null,h=e[1].replace(s.other.outputLinkReplace,"$1");a.state.inLink=!0;let f={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:l,title:c,text:h,tokens:a.inlineTokens(h)};return a.state.inLink=!1,f}function k8(e,t,r){let a=e.match(r.other.indentCodeCompensation);if(a===null)return t;let s=a[1];return t.split(`
294
+ `).map(l=>{let c=l.match(r.other.beginningSpace);if(c===null)return l;let[h]=c;return h.length>=s.length?l.slice(s.length):l}).join(`
295
+ `)}var lf=class{constructor(t){Lt(this,"options");Lt(this,"rules");Lt(this,"lexer");this.options=t||os}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let a=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?a:Go(a,`
296
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let a=r[0],s=k8(a,r[3]||"",this.rules);return{type:"code",raw:a,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let a=r[2].trim();if(this.rules.other.endingHash.test(a)){let s=Go(a,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(a=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:a,tokens:this.lexer.inline(a)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Go(r[0],`
297
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let a=Go(r[0],`
298
+ `).split(`
299
+ `),s="",l="",c=[];for(;a.length>0;){let h=!1,f=[],d;for(d=0;d<a.length;d++)if(this.rules.other.blockquoteStart.test(a[d]))f.push(a[d]),h=!0;else if(!h)f.push(a[d]);else break;a=a.slice(d);let p=f.join(`
300
+ `),g=p.replace(this.rules.other.blockquoteSetextReplace,`
301
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
302
+ ${p}`:p,l=l?`${l}
303
+ ${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 m=c.at(-1);if((m==null?void 0:m.type)==="code")break;if((m==null?void 0:m.type)==="blockquote"){let C=m,k=C.raw+`
304
+ `+a.join(`
305
+ `),v=this.blockquote(k);c[c.length-1]=v,s=s.substring(0,s.length-C.raw.length)+v.raw,l=l.substring(0,l.length-C.text.length)+v.text;break}else if((m==null?void 0:m.type)==="list"){let C=m,k=C.raw+`
306
+ `+a.join(`
307
+ `),v=this.list(k);c[c.length-1]=v,s=s.substring(0,s.length-m.raw.length)+v.raw,l=l.substring(0,l.length-C.raw.length)+v.raw,a=k.substring(c.at(-1).raw.length).split(`
308
+ `);continue}}return{type:"blockquote",raw:s,tokens:c,text:l}}}list(t){let r=this.rules.block.list.exec(t);if(r){let a=r[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 d=!1,p="",g="";if(!(r=c.exec(t))||this.rules.block.hr.test(t))break;p=r[0],t=t.substring(p.length);let x=r[2].split(`
309
+ `,1)[0].replace(this.rules.other.listReplaceTabs,_=>" ".repeat(3*_.length)),m=t.split(`
310
+ `,1)[0],C=!x.trim(),k=0;if(this.options.pedantic?(k=2,g=x.trimStart()):C?k=r[1].length+1:(k=r[2].search(this.rules.other.nonSpaceChar),k=k>4?1:k,g=x.slice(k),k+=r[1].length),C&&this.rules.other.blankLine.test(m)&&(p+=m+`
311
+ `,t=t.substring(m.length+1),d=!0),!d){let _=this.rules.other.nextBulletRegex(k),E=this.rules.other.hrRegex(k),R=this.rules.other.fencesBeginRegex(k),F=this.rules.other.headingBeginRegex(k),N=this.rules.other.htmlBeginRegex(k);for(;t;){let H=t.split(`
312
+ `,1)[0],I;if(m=H,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),I=m):I=m.replace(this.rules.other.tabCharGlobal," "),R.test(m)||F.test(m)||N.test(m)||_.test(m)||E.test(m))break;if(I.search(this.rules.other.nonSpaceChar)>=k||!m.trim())g+=`
313
+ `+I.slice(k);else{if(C||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||R.test(x)||F.test(x)||E.test(x))break;g+=`
314
+ `+m}!C&&!m.trim()&&(C=!0),p+=H+`
315
+ `,t=t.substring(H.length+1),x=I.slice(k)}}l.loose||(h?l.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(h=!0));let v=null,T;this.options.gfm&&(v=this.rules.other.listIsTask.exec(g),v&&(T=v[0]!=="[ ] ",g=g.replace(this.rules.other.listReplaceTask,""))),l.items.push({type:"list_item",raw:p,task:!!v,checked:T,loose:!1,text:g,tokens:[]}),l.raw+=p}let f=l.items.at(-1);if(f)f.raw=f.raw.trimEnd(),f.text=f.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let d=0;d<l.items.length;d++)if(this.lexer.state.top=!1,l.items[d].tokens=this.lexer.blockTokens(l.items[d].text,[]),!l.loose){let p=l.items[d].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 d=0;d<l.items.length;d++)l.items[d].loose=!0;return l}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let a=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",l=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:a,raw:r[0],href:s,title:l}}}table(t){var h;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let a=d2(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=(h=r[3])!=null&&h.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
316
+ `):[],c={type:"table",raw:r[0],header:[],align:[],rows:[]};if(a.length===s.length){for(let f of s)this.rules.other.tableAlignRight.test(f)?c.align.push("right"):this.rules.other.tableAlignCenter.test(f)?c.align.push("center"):this.rules.other.tableAlignLeft.test(f)?c.align.push("left"):c.align.push(null);for(let f=0;f<a.length;f++)c.header.push({text:a[f],tokens:this.lexer.inline(a[f]),header:!0,align:c.align[f]});for(let f of l)c.rows.push(d2(f,c.header.length).map((d,p)=>({text:d,tokens:this.lexer.inline(d),header:!1,align:c.align[p]})));return c}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let a=r[1].charAt(r[1].length-1)===`
317
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:a,tokens:this.lexer.inline(a)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let a=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(a)){if(!this.rules.other.endAngleBracket.test(a))return;let c=Go(a.slice(0,-1),"\\");if((a.length-c.length)%2===0)return}else{let c=C8(r[2],"()");if(c===-2)return;if(c>-1){let h=(r[0].indexOf("!")===0?5:4)+r[1].length+c;r[2]=r[2].substring(0,c),r[0]=r[0].substring(0,h).trim(),r[3]=""}}let s=r[2],l="";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(s);c&&(s=c[1],l=c[3])}else l=r[3]?r[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)),p2(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:l&&l.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){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=r[s.toLowerCase()];if(!l){let c=a[0].charAt(0);return{type:"text",raw:c,text:c}}return p2(a,l,a[0],this.lexer,this.rules)}}emStrong(t,r,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,f=l,d=0,p=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,r=r.slice(-1*t.length+l);(s=p.exec(r))!=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]){f+=h;continue}else if((s[5]||s[6])&&l%3&&!((l+h)%3)){d+=h;continue}if(f-=h,f>0)continue;h=Math.min(h,h+f+d);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 m=x.slice(2,-2);return{type:"strong",raw:x,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let a=r[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:r[0],text:a}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let a,s;return r[2]==="@"?(a=r[1],s="mailto:"+a):(a=r[1],s=a),{type:"link",raw:r[0],text:a,href:s,tokens:[{type:"text",raw:a,text:a}]}}}url(t){var a;let r;if(r=this.rules.inline.url.exec(t)){let s,l;if(r[2]==="@")s=r[0],l="mailto:"+s;else{let c;do c=r[0],r[0]=((a=this.rules.inline._backpedal.exec(r[0]))==null?void 0:a[0])??"";while(c!==r[0]);s=r[0],r[1]==="www."?l="http://"+r[0]:l=r[0]}return{type:"link",raw:r[0],text:s,href:l,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let a=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:a}}}},kr=class dm{constructor(t){Lt(this,"tokens");Lt(this,"options");Lt(this,"state");Lt(this,"tokenizer");Lt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||os,this.options.tokenizer=this.options.tokenizer||new lf,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 r={other:Si,block:cu.normal,inline:Yo.normal};this.options.pedantic?(r.block=cu.pedantic,r.inline=Yo.pedantic):this.options.gfm&&(r.block=cu.gfm,this.options.breaks?r.inline=Yo.breaks:r.inline=Yo.gfm),this.tokenizer.rules=r}static get rules(){return{block:cu,inline:Yo}}static lex(t,r){return new dm(r).lex(t)}static lexInline(t,r){return new dm(r).inlineTokens(t)}lex(t){t=t.replace(Si.carriageReturn,`
318
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let a=this.inlineQueue[r];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],a=!1){var s,l,c;for(this.options.pedantic&&(t=t.replace(Si.tabCharGlobal," ").replace(Si.spaceLine,""));t;){let h;if((l=(s=this.options.extensions)==null?void 0:s.block)!=null&&l.some(d=>(h=d.call({lexer:this},t,r))?(t=t.substring(h.raw.length),r.push(h),!0):!1))continue;if(h=this.tokenizer.space(t)){t=t.substring(h.raw.length);let d=r.at(-1);h.raw.length===1&&d!==void 0?d.raw+=`
319
+ `:r.push(h);continue}if(h=this.tokenizer.code(t)){t=t.substring(h.raw.length);let d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
320
+ `)?"":`
321
+ `)+h.raw,d.text+=`
322
+ `+h.text,this.inlineQueue.at(-1).src=d.text):r.push(h);continue}if(h=this.tokenizer.fences(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.heading(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.hr(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.blockquote(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.list(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.html(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.def(t)){t=t.substring(h.raw.length);let d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
323
+ `)?"":`
324
+ `)+h.raw,d.text+=`
325
+ `+h.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title},r.push(h));continue}if(h=this.tokenizer.table(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.lheading(t)){t=t.substring(h.raw.length),r.push(h);continue}let f=t;if((c=this.options.extensions)!=null&&c.startBlock){let d=1/0,p=t.slice(1),g;this.options.extensions.startBlock.forEach(x=>{g=x.call({lexer:this},p),typeof g=="number"&&g>=0&&(d=Math.min(d,g))}),d<1/0&&d>=0&&(f=t.substring(0,d+1))}if(this.state.top&&(h=this.tokenizer.paragraph(f))){let d=r.at(-1);a&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=(d.raw.endsWith(`
326
+ `)?"":`
327
+ `)+h.raw,d.text+=`
328
+ `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(h),a=f.length!==t.length,t=t.substring(h.raw.length);continue}if(h=this.tokenizer.text(t)){t=t.substring(h.raw.length);let d=r.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
329
+ `)?"":`
330
+ `)+h.raw,d.text+=`
331
+ `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(h);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var f,d,p,g,x;let a=t,s=null;if(this.tokens.links){let m=Object.keys(this.tokens.links);if(m.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)m.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=((d=(f=this.options.hooks)==null?void 0:f.emStrongMask)==null?void 0:d.call({lexer:this},a))??a;let c=!1,h="";for(;t;){c||(h=""),c=!1;let m;if((g=(p=this.options.extensions)==null?void 0:p.inline)!=null&&g.some(k=>(m=k.call({lexer:this},t,r))?(t=t.substring(m.raw.length),r.push(m),!0):!1))continue;if(m=this.tokenizer.escape(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.tag(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.link(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(m.raw.length);let k=r.at(-1);m.type==="text"&&(k==null?void 0:k.type)==="text"?(k.raw+=m.raw,k.text+=m.text):r.push(m);continue}if(m=this.tokenizer.emStrong(t,a,h)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.codespan(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.br(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.del(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.autolink(t)){t=t.substring(m.raw.length),r.push(m);continue}if(!this.state.inLink&&(m=this.tokenizer.url(t))){t=t.substring(m.raw.length),r.push(m);continue}let C=t;if((x=this.options.extensions)!=null&&x.startInline){let k=1/0,v=t.slice(1),T;this.options.extensions.startInline.forEach(_=>{T=_.call({lexer:this},v),typeof T=="number"&&T>=0&&(k=Math.min(k,T))}),k<1/0&&k>=0&&(C=t.substring(0,k+1))}if(m=this.tokenizer.inlineText(C)){t=t.substring(m.raw.length),m.raw.slice(-1)!=="_"&&(h=m.raw.slice(-1)),c=!0;let k=r.at(-1);(k==null?void 0:k.type)==="text"?(k.raw+=m.raw,k.text+=m.text):r.push(m);continue}if(t){let k="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(k);break}else throw new Error(k)}}return r}},of=class{constructor(t){Lt(this,"options");Lt(this,"parser");this.options=t||os}space(t){return""}code({text:t,lang:r,escaped:a}){var c;let s=(c=(r||"").match(Si.notSpaceStart))==null?void 0:c[0],l=t.replace(Si.endingNewline,"")+`
332
+ `;return s?'<pre><code class="language-'+Hr(s)+'">'+(a?l:Hr(l,!0))+`</code></pre>
333
+ `:"<pre><code>"+(a?l:Hr(l,!0))+`</code></pre>
334
+ `}blockquote({tokens:t}){return`<blockquote>
335
+ ${this.parser.parse(t)}</blockquote>
336
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
337
+ `}hr(t){return`<hr>
338
+ `}list(t){let r=t.ordered,a=t.start,s="";for(let h=0;h<t.items.length;h++){let f=t.items[h];s+=this.listitem(f)}let l=r?"ol":"ul",c=r&&a!==1?' start="'+a+'"':"";return"<"+l+c+`>
339
+ `+s+"</"+l+`>
340
+ `}listitem(t){var a;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((a=t.tokens[0])==null?void 0:a.type)==="paragraph"?(t.tokens[0].text=s+" "+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=s+" "+Hr(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
341
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
342
+ `}table(t){let r="",a="";for(let l=0;l<t.header.length;l++)a+=this.tablecell(t.header[l]);r+=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>
343
+ <thead>
344
+ `+r+`</thead>
345
+ `+s+`</table>
346
+ `}tablerow({text:t}){return`<tr>
347
+ ${t}</tr>
348
+ `}tablecell(t){let r=this.parser.parseInline(t.tokens),a=t.header?"th":"td";return(t.align?`<${a} align="${t.align}">`:`<${a}>`)+r+`</${a}>
349
+ `}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>${Hr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:a}){let s=this.parser.parseInline(a),l=f2(t);if(l===null)return s;t=l;let c='<a href="'+t+'"';return r&&(c+=' title="'+Hr(r)+'"'),c+=">"+s+"</a>",c}image({href:t,title:r,text:a,tokens:s}){s&&(a=this.parser.parseInline(s,this.parser.textRenderer));let l=f2(t);if(l===null)return Hr(a);t=l;let c=`<img src="${t}" alt="${a}"`;return r&&(c+=` title="${Hr(r)}"`),c+=">",c}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Hr(t.text)}},jy=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""}},vr=class pm{constructor(t){Lt(this,"options");Lt(this,"renderer");Lt(this,"textRenderer");this.options=t||os,this.options.renderer=this.options.renderer||new of,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new jy}static parse(t,r){return new pm(r).parse(t)}static parseInline(t,r){return new pm(r).parseInline(t)}parse(t,r=!0){var s,l;let a="";for(let c=0;c<t.length;c++){let h=t[c];if((l=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&l[h.type]){let d=h,p=this.options.extensions.renderers[d.type].call({parser:this},d);if(p!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(d.type)){a+=p||"";continue}}let f=h;switch(f.type){case"space":{a+=this.renderer.space(f);continue}case"hr":{a+=this.renderer.hr(f);continue}case"heading":{a+=this.renderer.heading(f);continue}case"code":{a+=this.renderer.code(f);continue}case"table":{a+=this.renderer.table(f);continue}case"blockquote":{a+=this.renderer.blockquote(f);continue}case"list":{a+=this.renderer.list(f);continue}case"html":{a+=this.renderer.html(f);continue}case"def":{a+=this.renderer.def(f);continue}case"paragraph":{a+=this.renderer.paragraph(f);continue}case"text":{let d=f,p=this.renderer.text(d);for(;c+1<t.length&&t[c+1].type==="text";)d=t[++c],p+=`
350
+ `+this.renderer.text(d);r?a+=this.renderer.paragraph({type:"paragraph",raw:p,text:p,tokens:[{type:"text",raw:p,text:p,escaped:!0}]}):a+=p;continue}default:{let d='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return a}parseInline(t,r=this.renderer){var s,l;let a="";for(let c=0;c<t.length;c++){let h=t[c];if((l=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&l[h.type]){let d=this.options.extensions.renderers[h.type].call({parser:this},h);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)){a+=d||"";continue}}let f=h;switch(f.type){case"escape":{a+=r.text(f);break}case"html":{a+=r.html(f);break}case"link":{a+=r.link(f);break}case"image":{a+=r.image(f);break}case"strong":{a+=r.strong(f);break}case"em":{a+=r.em(f);break}case"codespan":{a+=r.codespan(f);break}case"br":{a+=r.br(f);break}case"del":{a+=r.del(f);break}case"text":{a+=r.text(f);break}default:{let d='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return a}},mu,ac=(mu=class{constructor(t){Lt(this,"options");Lt(this,"block");this.options=t||os}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?kr.lex:kr.lexInline}provideParser(){return this.block?vr.parse:vr.parseInline}},Lt(mu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Lt(mu,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),mu),v8=class{constructor(...t){Lt(this,"defaults",Dy());Lt(this,"options",this.setOptions);Lt(this,"parse",this.parseMarkdown(!0));Lt(this,"parseInline",this.parseMarkdown(!1));Lt(this,"Parser",vr);Lt(this,"Renderer",of);Lt(this,"TextRenderer",jy);Lt(this,"Lexer",kr);Lt(this,"Tokenizer",lf);Lt(this,"Hooks",ac);this.use(...t)}walkTokens(t,r){var s,l;let a=[];for(let c of t)switch(a=a.concat(r.call(this,c)),c.type){case"table":{let h=c;for(let f of h.header)a=a.concat(this.walkTokens(f.tokens,r));for(let f of h.rows)for(let d of f)a=a.concat(this.walkTokens(d.tokens,r));break}case"list":{let h=c;a=a.concat(this.walkTokens(h.items,r));break}default:{let h=c;(l=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&l[h.type]?this.defaults.extensions.childTokens[h.type].forEach(f=>{let d=h[f].flat(1/0);a=a.concat(this.walkTokens(d,r))}):h.tokens&&(a=a.concat(this.walkTokens(h.tokens,r)))}}return a}use(...t){let r=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=r.renderers[l.name];c?r.renderers[l.name]=function(...h){let f=l.renderer.apply(this,h);return f===!1&&(f=c.apply(this,h)),f}:r.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=r[l.level];c?c.unshift(l.tokenizer):r[l.level]=[l.tokenizer],l.start&&(l.level==="block"?r.startBlock?r.startBlock.push(l.start):r.startBlock=[l.start]:l.level==="inline"&&(r.startInline?r.startInline.push(l.start):r.startInline=[l.start]))}"childTokens"in l&&l.childTokens&&(r.childTokens[l.name]=l.childTokens)}),s.extensions=r),a.renderer){let l=this.defaults.renderer||new of(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,f=a.renderer[h],d=l[h];l[h]=(...p)=>{let g=f.apply(l,p);return g===!1&&(g=d.apply(l,p)),g||""}}s.renderer=l}if(a.tokenizer){let l=this.defaults.tokenizer||new lf(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,f=a.tokenizer[h],d=l[h];l[h]=(...p)=>{let g=f.apply(l,p);return g===!1&&(g=d.apply(l,p)),g}}s.tokenizer=l}if(a.hooks){let l=this.defaults.hooks||new ac;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,f=a.hooks[h],d=l[h];ac.passThroughHooks.has(c)?l[h]=p=>{if(this.defaults.async&&ac.passThroughHooksRespectAsync.has(c))return(async()=>{let x=await f.call(l,p);return d.call(l,x)})();let g=f.call(l,p);return d.call(l,g)}:l[h]=(...p)=>{if(this.defaults.async)return(async()=>{let x=await f.apply(l,p);return x===!1&&(x=await d.apply(l,p)),x})();let g=f.apply(l,p);return g===!1&&(g=d.apply(l,p)),g}}s.hooks=l}if(a.walkTokens){let l=this.defaults.walkTokens,c=a.walkTokens;s.walkTokens=function(h){let f=[];return f.push(c.call(this,h)),l&&(f=f.concat(l.call(this,h))),f}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return kr.lex(t,r??this.defaults)}parser(t,r){return vr.parse(t,r??this.defaults)}parseMarkdown(t){return(r,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 r>"u"||r===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", 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(r):r,f=await(l.hooks?await l.hooks.provideLexer():t?kr.lex:kr.lexInline)(h,l),d=l.hooks?await l.hooks.processAllTokens(f):f;l.walkTokens&&await Promise.all(this.walkTokens(d,l.walkTokens));let p=await(l.hooks?await l.hooks.provideParser():t?vr.parse:vr.parseInline)(d,l);return l.hooks?await l.hooks.postprocess(p):p})().catch(c);try{l.hooks&&(r=l.hooks.preprocess(r));let h=(l.hooks?l.hooks.provideLexer():t?kr.lex:kr.lexInline)(r,l);l.hooks&&(h=l.hooks.processAllTokens(h)),l.walkTokens&&this.walkTokens(h,l.walkTokens);let f=(l.hooks?l.hooks.provideParser():t?vr.parse:vr.parseInline)(h,l);return l.hooks&&(f=l.hooks.postprocess(f)),f}catch(h){return c(h)}}}onError(t,r){return a=>{if(a.message+=`
351
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Hr(a.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(a);throw a}}},ns=new v8;function ue(e,t){return ns.parse(e,t)}ue.options=ue.setOptions=function(e){return ns.setOptions(e),ue.defaults=ns.defaults,jT(ue.defaults),ue};ue.getDefaults=Dy;ue.defaults=os;ue.use=function(...e){return ns.use(...e),ue.defaults=ns.defaults,jT(ue.defaults),ue};ue.walkTokens=function(e,t){return ns.walkTokens(e,t)};ue.parseInline=ns.parseInline;ue.Parser=vr;ue.parser=vr.parse;ue.Renderer=of;ue.TextRenderer=jy;ue.Lexer=kr;ue.lexer=kr.lex;ue.Tokenizer=lf;ue.Hooks=ac;ue.parse=ue;ue.options;ue.setOptions;ue.use;ue.walkTokens;ue.parseInline;vr.parse;kr.lex;function tw(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];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,f){var d=f.match(/\n([\t ]+|(?!\s).)/g);return d?h.concat(d.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(`
352
+ [ ]{`+Math.min.apply(Math,s)+"}","g");a=a.map(function(h){return h.replace(l,`
353
+ `)})}a[0]=a[0].replace(/^\r?\n/,"");var c=a[0];return t.forEach(function(h,f){var d=c.match(/(?:^|\n)( *)$/),p=d?d[1]:"",g=h;typeof h=="string"&&h.includes(`
354
+ `)&&(g=String(h).split(`
355
+ `).map(function(x,m){return m===0?x:""+p+x}).join(`
356
+ `)),c+=g+a[f+1]}),c}var S8={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},gm=new Map,ew=new Map,T8=S(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)ew.set(t.name,t.loader);else if("icons"in t)gm.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"),iw=S(async(e,t)=>{const r=w$(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const a=r.prefix||t;if(!a)throw new Error(`Icon name must contain a prefix: ${e}`);let s=gm.get(a);if(!s){const c=ew.get(a);if(!c)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await c(),prefix:a},gm.set(a,s)}catch(h){throw gt.error(h),new Error(`Failed to load icon set: ${r.prefix}`)}}const l=E$(s,r.name);if(!l)throw new Error(`Icon not found: ${e}`);return l},"getRegisteredIconData"),w8=S(async e=>{try{return await iw(e),!0}catch{return!1}},"isIconAvailable"),zc=S(async(e,t,r)=>{let a;try{a=await iw(e,t==null?void 0:t.fallbackPrefix)}catch(c){gt.error(c),a=S8}const s=D$(a,t),l=q$(N$(s.body),{...s.attributes,...r});return Lr(l,Le())},"getIconSVG");function rw(e,{markdownAutoWrap:t}){const a=e.replace(/<br\/>/g,`
357
+ `).replace(/\n{2,}/g,`
358
+ `);return tw(a)}S(rw,"preprocessMarkdown");function aw(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(a=>({content:a,type:"normal"})))??[]})}S(aw,"nonMarkdownToLines");function nw(e,t={}){const r=rw(e,t),a=ue.lexer(r),s=[[]];let l=0;function c(h,f="normal"){h.type==="text"?h.text.split(`
359
+ `).forEach((p,g)=>{g!==0&&(l++,s.push([])),p.split(" ").forEach(x=>{x=x.replace(/&#39;/g,"'"),x&&s[l].push({content:x,type:f})})}):h.type==="strong"||h.type==="em"?h.tokens.forEach(d=>{c(d,h.type)}):h.type==="html"&&s[l].push({content:h.text,type:"normal"})}return S(c,"processNode"),a.forEach(h=>{var f;h.type==="paragraph"?(f=h.tokens)==null||f.forEach(d=>{c(d)}):h.type==="html"?s[l].push({content:h.text,type:"normal"}):s[l].push({content:h.raw,type:"normal"})}),s}S(nw,"markdownToLines");function sw(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}S(sw,"nonMarkdownToHTML");function lw(e,{markdownAutoWrap:t}={}){const r=ue.lexer(e);function a(s){var l,c,h;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>${(l=s.tokens)==null?void 0:l.map(a).join("")}</strong>`:s.type==="em"?`<em>${(c=s.tokens)==null?void 0:c.map(a).join("")}</em>`:s.type==="paragraph"?`<p>${(h=s.tokens)==null?void 0:h.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 S(a,"output"),r.map(a).join("")}S(lw,"markdownToHTML");function ow(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}S(ow,"splitTextToChars");function cw(e,t){const r=ow(t.content);return Py(e,[],r,t.type)}S(cw,"splitWordToFitWidth");function Py(e,t,r,a){if(r.length===0)return[{content:t.join(""),type:a},{content:"",type:a}];const[s,...l]=r,c=[...t,s];return e([{content:c.join(""),type:a}])?Py(e,c,l,a):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:a},{content:r.join(""),type:a}])}S(Py,"splitWordToFitWidthRecursion");function hw(e,t){if(e.some(({content:r})=>r.includes(`
360
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return cf(e,t)}S(hw,"splitLineToFitWidth");function cf(e,t,r=[],a=[]){if(e.length===0)return a.length>0&&r.push(a),r.length>0?r:[];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 cf(e,t,r,c);if(a.length>0)r.push(a),e.unshift(l);else if(l.content){const[h,f]=cw(t,l);r.push([h]),f.content&&e.unshift(f)}return cf(e,t,r)}S(cf,"splitLineToFitWidthRecursion");function mm(e,t){t&&e.attr("style",t)}S(mm,"applyStyle");var g2=16384;async function uw(e,t,r,a,s=!1,l=Le()){const c=e.append("foreignObject");c.attr("width",`${Math.min(10*r,g2)}px`),c.attr("height",`${Math.min(10*r,g2)}px`);const h=c.append("xhtml:div"),f=pc(t.label)?await Wk(t.label.replace(Mc.lineBreakRegex,`
361
+ `),l):Lr(t.label,l),d=t.isNode?"nodeLabel":"edgeLabel",p=h.append("span");p.html(f),mm(p,t.labelStyle),p.attr("class",`${d} ${a}`),mm(h,t.labelStyle),h.style("display","table-cell"),h.style("white-space","nowrap"),h.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(h.style("max-width",r+"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===r&&(h.style("display","table"),h.style("white-space","break-spaces"),h.style("width",r+"px"),g=h.node().getBoundingClientRect()),c.node()}S(uw,"addHtmlSpan");function Of(e,t,r,a=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return a&&s.attr("text-anchor","middle"),s}S(Of,"createTspan");function fw(e,t,r){const a=e.append("text"),s=Of(a,1,t);Df(s,r);const l=s.node().getComputedTextLength();return a.remove(),l}S(fw,"computeWidthOfText");function _8(e,t,r){var c;const a=e.append("text"),s=Of(a,1,t);Df(s,[{content:r,type:"normal"}]);const l=(c=s.node())==null?void 0:c.getBoundingClientRect();return l&&a.remove(),l}S(_8,"computeDimensionOfText");function dw(e,t,r,a=!1,s=!1){const c=t.append("g"),h=c.insert("rect").attr("class","background").attr("style","stroke: none"),f=c.append("text").attr("y","-10.1");s&&f.attr("text-anchor","middle");let d=0;for(const p of r){const g=S(m=>fw(c,1.1,m)<=e,"checkWidth"),x=g(p)?[p]:hw(p,g);for(const m of x){const C=Of(f,d,1.1,s);Df(C,m),d++}}if(a){const p=f.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 f.node()}S(dw,"createFormattedText");function ym(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,a)=>{switch(a){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}S(ym,"decodeHTMLEntities");function Df(e,t){e.text(""),t.forEach((r,a)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");a===0?s.text(ym(r.content)):s.text(" "+ym(r.content))})}S(Df,"updateTextContentAndStyles");async function pw(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,l,c)=>(r.push((async()=>{const h=`${l}:${c}`;return await w8(h)?await zc(h,void 0,{class:"label-icon"}):`<i class='${Lr(s,t).replace(":"," ")}'></i>`})()),s));const a=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>a.shift()??"")}S(pw,"replaceIconSubstring");var Ba=S(async(e,t="",{style:r="",isTitle:a=!1,classes:s="",useHtmlLabels:l=!0,markdown:c=!0,isNode:h=!0,width:f=200,addSvgBackground:d=!1}={},p)=>{if(gt.debug("XYZ createText",t,r,a,s,l,h,"addSvgBackground: ",d),l){const g=c?lw(t,p):sw(t),x=await pw(as(g),p),m=t.replace(/\\\\/g,"\\"),C={isNode:h,label:pc(t)?m:x,labelStyle:r.replace("fill:","color:")};return await uw(e,C,f,s,d,p)}else{const g=as(t.replace(/<br\s*\/?>/g,"<br/>")),x=c?nw(g.replace("<br>","<br/>"),p):aw(g),m=dw(f,e,x,t?d:!1,!h);if(h){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const C=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Wt(m).attr("style",C)}else{const C=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Wt(m).select("rect").attr("style",C.replace(/background:/g,"fill:"));const k=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Wt(m).select("text").attr("style",k)}return a?Wt(m).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Wt(m).selectAll("tspan.text-outer-tspan").classed("row",!0),m}},"createText");function pg(e,t,r){if(e&&e.length){const[a,s]=t,l=Math.PI/180*r,c=Math.cos(l),h=Math.sin(l);for(const f of e){const[d,p]=f;f[0]=(d-a)*c-(p-s)*h+a,f[1]=(d-a)*h+(p-s)*c+s}}}function B8(e,t){return e[0]===t[0]&&e[1]===t[1]}function E8(e,t,r,a=1){const s=r,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 d of c)pg(d,h,s);const f=(function(d,p,g){const x=[];for(const _ of d){const E=[..._];B8(E[0],E[E.length-1])||E.push([E[0][0],E[0][1]]),E.length>2&&x.push(E)}const m=[];p=Math.max(p,.1);const C=[];for(const _ of x)for(let E=0;E<_.length-1;E++){const R=_[E],F=_[E+1];if(R[1]!==F[1]){const N=Math.min(R[1],F[1]);C.push({ymin:N,ymax:Math.max(R[1],F[1]),x:N===R[1]?R[0]:F[0],islope:(F[0]-R[0])/(F[1]-R[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 m;let k=[],v=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>v);E++)_=E;C.splice(0,_+1).forEach((E=>{k.push({s:v,edge:E})}))}if(k=k.filter((_=>!(_.edge.ymax<=v))),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 R=k[_].edge,F=k[E].edge;m.push([[Math.round(R.x),v],[Math.round(F.x),v]])}v+=g,k.forEach((_=>{_.edge.x=_.edge.x+g*_.edge.islope})),T++}return m})(c,l,a);if(s){for(const d of c)pg(d,h,-s);(function(d,p,g){const x=[];d.forEach((m=>x.push(...m))),pg(x,p,g)})(f,h,-s)}return f}function Nc(e,t){var r;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&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(l=s),E8(e,s,a,l||1)}class Wy{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const a=Nc(t,r);return{type:"fillSketch",ops:this.renderLines(a,r)}}renderLines(t,r){const a=[];for(const s of t)a.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return a}}function $f(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class L8 extends Wy{fillPolygons(t,r){let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);const s=Nc(t,Object.assign({},r,{hachureGap:a})),l=Math.PI/180*r.hachureAngle,c=[],h=.5*a*Math.cos(l),f=.5*a*Math.sin(l);for(const[d,p]of s)$f([d,p])&&c.push([[d[0]-h,d[1]+f],[...p]],[[d[0]+h,d[1]-f],[...p]]);return{type:"fillSketch",ops:this.renderLines(c,r)}}}class A8 extends Wy{fillPolygons(t,r){const a=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),l=this._fillPolygons(t,s);return a.ops=a.ops.concat(l.ops),a}}class M8{constructor(t){this.helper=t}fillPolygons(t,r){const a=Nc(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(a,r)}dotsOnLines(t,r){const a=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let l=r.fillWeight;l<0&&(l=r.strokeWidth/2);const c=s/4;for(const h of t){const f=$f(h),d=f/s,p=Math.ceil(d)-1,g=f-p*s,x=(h[0][0]+h[1][0])/2-s/4,m=Math.min(h[0][1],h[1][1]);for(let C=0;C<p;C++){const k=m+g+C*s,v=x-c+2*Math.random()*c,T=k-c+2*Math.random()*c,_=this.helper.ellipse(v,T,l,l,r);a.push(..._.ops)}}return{type:"fillSketch",ops:a}}}class R8{constructor(t){this.helper=t}fillPolygons(t,r){const a=Nc(t,r);return{type:"fillSketch",ops:this.dashedLine(a,r)}}dashedLine(t,r){const a=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,l=[];return t.forEach((c=>{const h=$f(c),f=Math.floor(h/(a+s)),d=(h+s-f*(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 m=0;m<f;m++){const C=m*(a+s),k=C+a,v=[p[0]+C*Math.cos(x)+d*Math.cos(x),p[1]+C*Math.sin(x)+d*Math.sin(x)],T=[p[0]+k*Math.cos(x)+d*Math.cos(x),p[1]+k*Math.sin(x)+d*Math.sin(x)];l.push(...this.helper.doubleLineOps(v[0],v[1],T[0],T[1],r))}})),l}}class F8{constructor(t){this.helper=t}fillPolygons(t,r){const a=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?a:r.zigzagOffset,l=Nc(t,r=Object.assign({},r,{hachureGap:a+s}));return{type:"fillSketch",ops:this.zigzagLines(l,s,r)}}zigzagLines(t,r,a){const s=[];return t.forEach((l=>{const c=$f(l),h=Math.round(c/(2*r));let f=l[0],d=l[1];f[0]>d[0]&&(f=l[1],d=l[0]);const p=Math.atan((d[1]-f[1])/(d[0]-f[0]));for(let g=0;g<h;g++){const x=2*g*r,m=2*(g+1)*r,C=Math.sqrt(2*Math.pow(r,2)),k=[f[0]+x*Math.cos(p),f[1]+x*Math.sin(p)],v=[f[0]+m*Math.cos(p),f[1]+m*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],v[0],v[1],a))}})),s}}const Oi={};class O8{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const D8=0,gg=1,m2=2,hu={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 mg(e,t){return e.type===t}function Yy(e){const t=[],r=(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:D8,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:gg,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return h[h.length]={type:m2,text:""},h})(e);let a="BOD",s=0,l=r[s];for(;!mg(l,m2);){let c=0;const h=[];if(a==="BOD"){if(l.text!=="M"&&l.text!=="m")return Yy("M0,0"+e);s++,c=hu[l.text],a=l.text}else mg(l,gg)?c=hu[a]:(s++,c=hu[l.text],a=l.text);if(!(s+c<r.length))throw new Error("Path data ended short");for(let f=s;f<s+c;f++){const d=r[f];if(!mg(d,gg))throw new Error("Param not a number: "+a+","+d.text);h[h.length]=+d.text}if(typeof hu[a]!="number")throw new Error("Bad segment: "+a);{const f={key:a,data:h};t.push(f),s+=c,l=r[s],a==="M"&&(a="L"),a==="m"&&(a="l")}}return t}function gw(e){let t=0,r=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,r]=h,[a,s]=h;break;case"m":t+=h[0],r+=h[1],l.push({key:"M",data:[t,r]}),a=t,s=r;break;case"L":l.push({key:"L",data:[...h]}),[t,r]=h;break;case"l":t+=h[0],r+=h[1],l.push({key:"L",data:[t,r]});break;case"C":l.push({key:"C",data:[...h]}),t=h[4],r=h[5];break;case"c":{const f=h.map(((d,p)=>p%2?d+r:d+t));l.push({key:"C",data:f}),t=f[4],r=f[5];break}case"Q":l.push({key:"Q",data:[...h]}),t=h[2],r=h[3];break;case"q":{const f=h.map(((d,p)=>p%2?d+r:d+t));l.push({key:"Q",data:f}),t=f[2],r=f[3];break}case"A":l.push({key:"A",data:[...h]}),t=h[5],r=h[6];break;case"a":t+=h[5],r+=h[6],l.push({key:"A",data:[h[0],h[1],h[2],h[3],h[4],t,r]});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]}),r=h[0];break;case"v":r+=h[0],l.push({key:"V",data:[r]});break;case"S":l.push({key:"S",data:[...h]}),t=h[2],r=h[3];break;case"s":{const f=h.map(((d,p)=>p%2?d+r:d+t));l.push({key:"S",data:f}),t=f[2],r=f[3];break}case"T":l.push({key:"T",data:[...h]}),t=h[0],r=h[1];break;case"t":t+=h[0],r+=h[1],l.push({key:"T",data:[t,r]});break;case"Z":case"z":l.push({key:"Z",data:[]}),t=a,r=s}return l}function mw(e){const t=[];let r="",a=0,s=0,l=0,c=0,h=0,f=0;for(const{key:d,data:p}of e){switch(d){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],f=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;r==="C"||r==="S"?(g=a+(a-h),x=s+(s-f)):(g=a,x=s),t.push({key:"C",data:[g,x,...p]}),h=p[0],f=p[1],a=p[2],s=p[3];break}case"T":{const[g,x]=p;let m=0,C=0;r==="Q"||r==="T"?(m=a+(a-h),C=s+(s-f)):(m=a,C=s);const k=a+2*(m-a)/3,v=s+2*(C-s)/3,T=g+2*(m-g)/3,_=x+2*(C-x)/3;t.push({key:"C",data:[k,v,T,_,g,x]}),h=m,f=C,a=g,s=x;break}case"Q":{const[g,x,m,C]=p,k=a+2*(g-a)/3,v=s+2*(x-s)/3,T=m+2*(g-m)/3,_=C+2*(x-C)/3;t.push({key:"C",data:[k,v,T,_,m,C]}),h=g,f=x,a=m,s=C;break}case"A":{const g=Math.abs(p[0]),x=Math.abs(p[1]),m=p[2],C=p[3],k=p[4],v=p[5],T=p[6];g===0||x===0?(t.push({key:"C",data:[a,s,v,T,v,T]}),a=v,s=T):(a!==v||s!==T)&&(yw(a,s,v,T,g,x,m,C,k).forEach((function(_){t.push({key:"C",data:_})})),a=v,s=T);break}case"Z":t.push({key:"Z",data:[]}),a=l,s=c}r=d}return t}function Xo(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function yw(e,t,r,a,s,l,c,h,f,d){const p=(g=c,Math.PI*g/180);var g;let x=[],m=0,C=0,k=0,v=0;if(d)[m,C,k,v]=d;else{[e,t]=Xo(e,t,-p),[r,a]=Xo(r,a,-p);const J=(e-r)/2,Y=(t-a)/2;let j=J*J/(s*s)+Y*Y/(l*l);j>1&&(j=Math.sqrt(j),s*=j,l*=j);const A=s*s,z=l*l,O=A*z-A*Y*Y-z*J*J,M=A*Y*Y+z*J*J,Q=(h===f?-1:1)*Math.sqrt(Math.abs(O/M));k=Q*s*Y/l+(e+r)/2,v=Q*-l*J/s+(t+a)/2,m=Math.asin(parseFloat(((t-v)/l).toFixed(9))),C=Math.asin(parseFloat(((a-v)/l).toFixed(9))),e<k&&(m=Math.PI-m),r<k&&(C=Math.PI-C),m<0&&(m=2*Math.PI+m),C<0&&(C=2*Math.PI+C),f&&m>C&&(m-=2*Math.PI),!f&&C>m&&(C-=2*Math.PI)}let T=C-m;if(Math.abs(T)>120*Math.PI/180){const J=C,Y=r,j=a;C=f&&C>m?m+120*Math.PI/180*1:m+120*Math.PI/180*-1,x=yw(r=k+s*Math.cos(C),a=v+l*Math.sin(C),Y,j,s,l,c,0,f,[C,J,k,v])}T=C-m;const _=Math.cos(m),E=Math.sin(m),R=Math.cos(C),F=Math.sin(C),N=Math.tan(T/4),H=4/3*s*N,I=4/3*l*N,at=[e,t],X=[e+H*E,t-I*_],D=[r+H*F,a-I*R],V=[r,a];if(X[0]=2*at[0]-X[0],X[1]=2*at[1]-X[1],d)return[X,D,V].concat(x);{x=[X,D,V].concat(x);const J=[];for(let Y=0;Y<x.length;Y+=3){const j=Xo(x[Y][0],x[Y][1],p),A=Xo(x[Y+1][0],x[Y+1][1],p),z=Xo(x[Y+2][0],x[Y+2][1],p);J.push([j[0],j[1],A[0],A[1],z[0],z[1]])}return J}}const $8={randOffset:function(e,t){return zt(e,t)},randOffsetWithRange:function(e,t,r){return hf(e,t,r)},ellipse:function(e,t,r,a,s){const l=bw(r,a,s);return xm(e,t,s,l).opset},doubleLineOps:function(e,t,r,a,s){return Cn(e,t,r,a,s,!0)}};function xw(e,t,r,a,s){return{type:"path",ops:Cn(e,t,r,a,s)}}function Lu(e,t,r){const a=(e||[]).length;if(a>2){const s=[];for(let l=0;l<a-1;l++)s.push(...Cn(e[l][0],e[l][1],e[l+1][0],e[l+1][1],r));return t&&s.push(...Cn(e[a-1][0],e[a-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return a===2?xw(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function z8(e,t,r,a,s){return(function(l,c){return Lu(l,!0,c)})([[e,t],[e+r,t],[e+r,t+a],[e,t+a]],s)}function y2(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,a=uu(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:uu(r[0],1.5*(1+.22*t.roughness),C2(t));for(let l=1;l<r.length;l++){const c=r[l];if(c.length){const h=uu(c,1*(1+.2*t.roughness),t),f=t.disableMultiStroke?[]:uu(c,1.5*(1+.22*t.roughness),C2(t));for(const d of h)d.op!=="move"&&a.push(d);for(const d of f)d.op!=="move"&&s.push(d)}}return{type:"path",ops:a.concat(s)}}return{type:"path",ops:[]}}function bw(e,t,r){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(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*a)),l=2*Math.PI/s;let c=Math.abs(e/2),h=Math.abs(t/2);const f=1-r.curveFitting;return c+=zt(c*f,r),h+=zt(h*f,r),{increment:l,rx:c,ry:h}}function xm(e,t,r,a){const[s,l]=k2(a.increment,e,t,a.rx,a.ry,1,a.increment*hf(.1,hf(.4,1,r),r),r);let c=uf(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[h]=k2(a.increment,e,t,a.rx,a.ry,1.5,0,r),f=uf(h,null,r);c=c.concat(f)}return{estimatedPoints:l,opset:{type:"path",ops:c}}}function x2(e,t,r,a,s,l,c,h,f){const d=e,p=t;let g=Math.abs(r/2),x=Math.abs(a/2);g+=zt(.01*g,f),x+=zt(.01*x,f);let m=s,C=l;for(;m<0;)m+=2*Math.PI,C+=2*Math.PI;C-m>2*Math.PI&&(m=0,C=2*Math.PI);const k=2*Math.PI/f.curveStepCount,v=Math.min(k/2,(C-m)/2),T=v2(v,d,p,g,x,m,C,1,f);if(!f.disableMultiStroke){const _=v2(v,d,p,g,x,m,C,1.5,f);T.push(..._)}return c&&(h?T.push(...Cn(d,p,d+g*Math.cos(m),p+x*Math.sin(m),f),...Cn(d,p,d+g*Math.cos(C),p+x*Math.sin(C),f)):T.push({op:"lineTo",data:[d,p]},{op:"lineTo",data:[d+g*Math.cos(m),p+x*Math.sin(m)]})),{type:"path",ops:T}}function b2(e,t){const r=mw(gw(Yy(e))),a=[];let s=[0,0],l=[0,0];for(const{key:c,data:h}of r)switch(c){case"M":l=[h[0],h[1]],s=[h[0],h[1]];break;case"L":a.push(...Cn(l[0],l[1],h[0],h[1],t)),l=[h[0],h[1]];break;case"C":{const[f,d,p,g,x,m]=h;a.push(...N8(f,d,p,g,x,m,l,t)),l=[x,m];break}case"Z":a.push(...Cn(l[0],l[1],s[0],s[1],t)),l=[s[0],s[1]]}return{type:"path",ops:a}}function yg(e,t){const r=[];for(const a of e)if(a.length){const s=t.maxRandomnessOffset||0,l=a.length;if(l>2){r.push({op:"move",data:[a[0][0]+zt(s,t),a[0][1]+zt(s,t)]});for(let c=1;c<l;c++)r.push({op:"lineTo",data:[a[c][0]+zt(s,t),a[c][1]+zt(s,t)]})}}return{type:"fillPath",ops:r}}function rl(e,t){return(function(r,a){let s=r.fillStyle||"hachure";if(!Oi[s])switch(s){case"zigzag":Oi[s]||(Oi[s]=new L8(a));break;case"cross-hatch":Oi[s]||(Oi[s]=new A8(a));break;case"dots":Oi[s]||(Oi[s]=new M8(a));break;case"dashed":Oi[s]||(Oi[s]=new R8(a));break;case"zigzag-line":Oi[s]||(Oi[s]=new F8(a));break;default:s="hachure",Oi[s]||(Oi[s]=new Wy(a))}return Oi[s]})(t,$8).fillPolygons(e,t)}function C2(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Cw(e){return e.randomizer||(e.randomizer=new O8(e.seed||0)),e.randomizer.next()}function hf(e,t,r,a=1){return r.roughness*a*(Cw(r)*(t-e)+e)}function zt(e,t,r=1){return hf(-e,e,t,r)}function Cn(e,t,r,a,s,l=!1){const c=l?s.disableMultiStrokeFill:s.disableMultiStroke,h=bm(e,t,r,a,s,!0,!1);if(c)return h;const f=bm(e,t,r,a,s,!0,!0);return h.concat(f)}function bm(e,t,r,a,s,l,c){const h=Math.pow(e-r,2)+Math.pow(t-a,2),f=Math.sqrt(h);let d=1;d=f<200?1:f>500?.4:-.0016668*f+1.233334;let p=s.maxRandomnessOffset||0;p*p*100>h&&(p=f/10);const g=p/2,x=.2+.2*Cw(s);let m=s.bowing*s.maxRandomnessOffset*(a-t)/200,C=s.bowing*s.maxRandomnessOffset*(e-r)/200;m=zt(m,s,d),C=zt(C,s,d);const k=[],v=()=>zt(g,s,d),T=()=>zt(p,s,d),_=s.preserveVertices;return c?k.push({op:"move",data:[e+(_?0:v()),t+(_?0:v())]}):k.push({op:"move",data:[e+(_?0:zt(p,s,d)),t+(_?0:zt(p,s,d))]}),c?k.push({op:"bcurveTo",data:[m+e+(r-e)*x+v(),C+t+(a-t)*x+v(),m+e+2*(r-e)*x+v(),C+t+2*(a-t)*x+v(),r+(_?0:v()),a+(_?0:v())]}):k.push({op:"bcurveTo",data:[m+e+(r-e)*x+T(),C+t+(a-t)*x+T(),m+e+2*(r-e)*x+T(),C+t+2*(a-t)*x+T(),r+(_?0:T()),a+(_?0:T())]}),k}function uu(e,t,r){if(!e.length)return[];const a=[];a.push([e[0][0]+zt(t,r),e[0][1]+zt(t,r)]),a.push([e[0][0]+zt(t,r),e[0][1]+zt(t,r)]);for(let s=1;s<e.length;s++)a.push([e[s][0]+zt(t,r),e[s][1]+zt(t,r)]),s===e.length-1&&a.push([e[s][0]+zt(t,r),e[s][1]+zt(t,r)]);return uf(a,null,r)}function uf(e,t,r){const a=e.length,s=[];if(a>3){const l=[],c=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let h=1;h+2<a;h++){const f=e[h];l[0]=[f[0],f[1]],l[1]=[f[0]+(c*e[h+1][0]-c*e[h-1][0])/6,f[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(...bm(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function k2(e,t,r,a,s,l,c,h){const f=[],d=[];if(h.roughness===0){e/=4,d.push([t+a*Math.cos(-e),r+s*Math.sin(-e)]);for(let p=0;p<=2*Math.PI;p+=e){const g=[t+a*Math.cos(p),r+s*Math.sin(p)];f.push(g),d.push(g)}d.push([t+a*Math.cos(0),r+s*Math.sin(0)]),d.push([t+a*Math.cos(e),r+s*Math.sin(e)])}else{const p=zt(.5,h)-Math.PI/2;d.push([zt(l,h)+t+.9*a*Math.cos(p-e),zt(l,h)+r+.9*s*Math.sin(p-e)]);const g=2*Math.PI+p-.01;for(let x=p;x<g;x+=e){const m=[zt(l,h)+t+a*Math.cos(x),zt(l,h)+r+s*Math.sin(x)];f.push(m),d.push(m)}d.push([zt(l,h)+t+a*Math.cos(p+2*Math.PI+.5*c),zt(l,h)+r+s*Math.sin(p+2*Math.PI+.5*c)]),d.push([zt(l,h)+t+.98*a*Math.cos(p+c),zt(l,h)+r+.98*s*Math.sin(p+c)]),d.push([zt(l,h)+t+.9*a*Math.cos(p+.5*c),zt(l,h)+r+.9*s*Math.sin(p+.5*c)])}return[d,f]}function v2(e,t,r,a,s,l,c,h,f){const d=l+zt(.1,f),p=[];p.push([zt(h,f)+t+.9*a*Math.cos(d-e),zt(h,f)+r+.9*s*Math.sin(d-e)]);for(let g=d;g<=c;g+=e)p.push([zt(h,f)+t+a*Math.cos(g),zt(h,f)+r+s*Math.sin(g)]);return p.push([t+a*Math.cos(c),r+s*Math.sin(c)]),p.push([t+a*Math.cos(c),r+s*Math.sin(c)]),uf(p,null,f)}function N8(e,t,r,a,s,l,c,h){const f=[],d=[h.maxRandomnessOffset||1,(h.maxRandomnessOffset||1)+.3];let p=[0,0];const g=h.disableMultiStroke?1:2,x=h.preserveVertices;for(let m=0;m<g;m++)m===0?f.push({op:"move",data:[c[0],c[1]]}):f.push({op:"move",data:[c[0]+(x?0:zt(d[0],h)),c[1]+(x?0:zt(d[0],h))]}),p=x?[s,l]:[s+zt(d[m],h),l+zt(d[m],h)],f.push({op:"bcurveTo",data:[e+zt(d[m],h),t+zt(d[m],h),r+zt(d[m],h),a+zt(d[m],h),p[0],p[1]]});return f}function Vo(e){return[...e]}function S2(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const a=[];if(r===3)a.push(Vo(e[0]),Vo(e[1]),Vo(e[2]),Vo(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(Vo(s[0]));for(let h=1;h+2<s.length;h++){const f=s[h];l[0]=[f[0],f[1]],l[1]=[f[0]+(c*s[h+1][0]-c*s[h-1][0])/6,f[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 Au(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function q8(e,t,r){const a=Au(t,r);if(a===0)return Au(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/a;return s=Math.max(0,Math.min(1,s)),Au(e,Wn(t,r,s))}function Wn(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Cm(e,t,r,a){const s=a||[];if((function(h,f){const d=h[f+0],p=h[f+1],g=h[f+2],x=h[f+3];let m=3*p[0]-2*d[0]-x[0];m*=m;let C=3*p[1]-2*d[1]-x[1];C*=C;let k=3*g[0]-2*x[0]-d[0];k*=k;let v=3*g[1]-2*x[1]-d[1];return v*=v,m<k&&(m=k),C<v&&(C=v),m+C})(e,t)<r){const h=e[t+0];s.length?(l=s[s.length-1],c=h,Math.sqrt(Au(l,c))>1&&s.push(h)):s.push(h),s.push(e[t+3])}else{const f=e[t+0],d=e[t+1],p=e[t+2],g=e[t+3],x=Wn(f,d,.5),m=Wn(d,p,.5),C=Wn(p,g,.5),k=Wn(x,m,.5),v=Wn(m,C,.5),T=Wn(k,v,.5);Cm([f,x,k,T],0,r,s),Cm([T,v,C,g],0,r,s)}var l,c;return s}function I8(e,t){return ff(e,0,e.length,t)}function ff(e,t,r,a,s){const l=s||[],c=e[t],h=e[r-1];let f=0,d=1;for(let p=t+1;p<r-1;++p){const g=q8(e[p],c,h);g>f&&(f=g,d=p)}return Math.sqrt(f)>a?(ff(e,t,d+1,a,l),ff(e,d,r,a,l)):(l.length||l.push(c),l.push(h)),l}function xg(e,t=.15,r){const a=[],s=(e.length-1)/3;for(let l=0;l<s;l++)Cm(e,3*l,t,a);return r&&r>0?ff(a,0,a.length,r):a}const Xi="none";class df{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,a){return{shape:t,sets:r||[],options:a||this.defaultOptions}}line(t,r,a,s,l){const c=this._o(l);return this._d("line",[xw(t,r,a,s,c)],c)}rectangle(t,r,a,s,l){const c=this._o(l),h=[],f=z8(t,r,a,s,c);if(c.fill){const d=[[t,r],[t+a,r],[t+a,r+s],[t,r+s]];c.fillStyle==="solid"?h.push(yg([d],c)):h.push(rl([d],c))}return c.stroke!==Xi&&h.push(f),this._d("rectangle",h,c)}ellipse(t,r,a,s,l){const c=this._o(l),h=[],f=bw(a,s,c),d=xm(t,r,c,f);if(c.fill)if(c.fillStyle==="solid"){const p=xm(t,r,c,f).opset;p.type="fillPath",h.push(p)}else h.push(rl([d.estimatedPoints],c));return c.stroke!==Xi&&h.push(d.opset),this._d("ellipse",h,c)}circle(t,r,a,s){const l=this.ellipse(t,r,a,a,s);return l.shape="circle",l}linearPath(t,r){const a=this._o(r);return this._d("linearPath",[Lu(t,!1,a)],a)}arc(t,r,a,s,l,c,h=!1,f){const d=this._o(f),p=[],g=x2(t,r,a,s,l,c,h,!0,d);if(h&&d.fill)if(d.fillStyle==="solid"){const x=Object.assign({},d);x.disableMultiStroke=!0;const m=x2(t,r,a,s,l,c,!0,!1,x);m.type="fillPath",p.push(m)}else p.push((function(x,m,C,k,v,T,_){const E=x,R=m;let F=Math.abs(C/2),N=Math.abs(k/2);F+=zt(.01*F,_),N+=zt(.01*N,_);let H=v,I=T;for(;H<0;)H+=2*Math.PI,I+=2*Math.PI;I-H>2*Math.PI&&(H=0,I=2*Math.PI);const at=(I-H)/_.curveStepCount,X=[];for(let D=H;D<=I;D+=at)X.push([E+F*Math.cos(D),R+N*Math.sin(D)]);return X.push([E+F*Math.cos(I),R+N*Math.sin(I)]),X.push([E,R]),rl([X],_)})(t,r,a,s,l,c,d));return d.stroke!==Xi&&p.push(g),this._d("arc",p,d)}curve(t,r){const a=this._o(r),s=[],l=y2(t,a);if(a.fill&&a.fill!==Xi)if(a.fillStyle==="solid"){const c=y2(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 f=typeof h[0][0]=="number"?[h]:h;for(const d of f)d.length<3?c.push(...d):d.length===3?c.push(...xg(S2([d[0],d[0],d[1],d[2]]),10,(1+a.roughness)/2)):c.push(...xg(S2(d),10,(1+a.roughness)/2))}c.length&&s.push(rl([c],a))}return a.stroke!==Xi&&s.push(l),this._d("curve",s,a)}polygon(t,r){const a=this._o(r),s=[],l=Lu(t,!0,a);return a.fill&&(a.fillStyle==="solid"?s.push(yg([t],a)):s.push(rl([t],a))),a.stroke!==Xi&&s.push(l),this._d("polygon",s,a)}path(t,r){const a=this._o(r),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!==Xi,c=a.stroke!==Xi,h=!!(a.simplification&&a.simplification<1),f=(function(p,g,x){const m=mw(gw(Yy(p))),C=[];let k=[],v=[0,0],T=[];const _=()=>{T.length>=4&&k.push(...xg(T,g)),T=[]},E=()=>{_(),k.length&&(C.push(k),k=[])};for(const{key:F,data:N}of m)switch(F){case"M":E(),v=[N[0],N[1]],k.push(v);break;case"L":_(),k.push([N[0],N[1]]);break;case"C":if(!T.length){const H=k.length?k[k.length-1]:v;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([v[0],v[1]])}if(E(),!x)return C;const R=[];for(const F of C){const N=I8(F,x);N.length&&R.push(N)}return R})(t,1,h?4-4*(a.simplification||1):(1+a.roughness)/2),d=b2(t,a);if(l)if(a.fillStyle==="solid")if(f.length===1){const p=b2(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(yg(f,a));else s.push(rl(f,a));return c&&(h?f.forEach((p=>{s.push(Lu(p,!1,a))})):s.push(d)),this._d("path",s,a)}opsToPath(t,r){let a="";for(const s of t.ops){const l=typeof r=="number"&&r>=0?s.data.map((c=>+c.toFixed(r))):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 r=t.sets||[],a=t.options||this.defaultOptions,s=[];for(const l of r){let c=null;switch(l.type){case"path":c={d:this.opsToPath(l),stroke:a.stroke,strokeWidth:a.strokeWidth,fill:Xi};break;case"fillPath":c={d:this.opsToPath(l),stroke:Xi,strokeWidth:0,fill:a.fill||Xi};break;case"fillSketch":c=this.fillSketch(l,a)}c&&s.push(c)}return s}fillSketch(t,r){let a=r.fillWeight;return a<0&&(a=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Xi,strokeWidth:a,fill:Xi}}_mergedShape(t){return t.filter(((r,a)=>a===0||r.op!=="move"))}}class H8{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new df(r)}draw(t){const r=t.sets||[],a=t.options||this.getDefaultOptions(),s=this.ctx,l=t.options.fixedDecimalPlaceDigits;for(const c of r)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,r,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,r,a.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,a,s="nonzero"){t.beginPath();for(const l of r.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])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,a,s,l){const c=this.gen.line(t,r,a,s,l);return this.draw(c),c}rectangle(t,r,a,s,l){const c=this.gen.rectangle(t,r,a,s,l);return this.draw(c),c}ellipse(t,r,a,s,l){const c=this.gen.ellipse(t,r,a,s,l);return this.draw(c),c}circle(t,r,a,s){const l=this.gen.circle(t,r,a,s);return this.draw(l),l}linearPath(t,r){const a=this.gen.linearPath(t,r);return this.draw(a),a}polygon(t,r){const a=this.gen.polygon(t,r);return this.draw(a),a}arc(t,r,a,s,l,c,h=!1,f){const d=this.gen.arc(t,r,a,s,l,c,h,f);return this.draw(d),d}curve(t,r){const a=this.gen.curve(t,r);return this.draw(a),a}path(t,r){const a=this.gen.path(t,r);return this.draw(a),a}}const fu="http://www.w3.org/2000/svg";class U8{constructor(t,r){this.svg=t,this.gen=new df(r)}draw(t){const r=t.sets||[],a=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,l=s.createElementNS(fu,"g"),c=t.options.fixedDecimalPlaceDigits;for(const h of r){let f=null;switch(h.type){case"path":f=s.createElementNS(fu,"path"),f.setAttribute("d",this.opsToPath(h,c)),f.setAttribute("stroke",a.stroke),f.setAttribute("stroke-width",a.strokeWidth+""),f.setAttribute("fill","none"),a.strokeLineDash&&f.setAttribute("stroke-dasharray",a.strokeLineDash.join(" ").trim()),a.strokeLineDashOffset&&f.setAttribute("stroke-dashoffset",`${a.strokeLineDashOffset}`);break;case"fillPath":f=s.createElementNS(fu,"path"),f.setAttribute("d",this.opsToPath(h,c)),f.setAttribute("stroke","none"),f.setAttribute("stroke-width","0"),f.setAttribute("fill",a.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||f.setAttribute("fill-rule","evenodd");break;case"fillSketch":f=this.fillSketch(s,h,a)}f&&l.appendChild(f)}return l}fillSketch(t,r,a){let s=a.fillWeight;s<0&&(s=a.strokeWidth/2);const l=t.createElementNS(fu,"path");return l.setAttribute("d",this.opsToPath(r,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,r){return this.gen.opsToPath(t,r)}line(t,r,a,s,l){const c=this.gen.line(t,r,a,s,l);return this.draw(c)}rectangle(t,r,a,s,l){const c=this.gen.rectangle(t,r,a,s,l);return this.draw(c)}ellipse(t,r,a,s,l){const c=this.gen.ellipse(t,r,a,s,l);return this.draw(c)}circle(t,r,a,s){const l=this.gen.circle(t,r,a,s);return this.draw(l)}linearPath(t,r){const a=this.gen.linearPath(t,r);return this.draw(a)}polygon(t,r){const a=this.gen.polygon(t,r);return this.draw(a)}arc(t,r,a,s,l,c,h=!1,f){const d=this.gen.arc(t,r,a,s,l,c,h,f);return this.draw(d)}curve(t,r){const a=this.gen.curve(t,r);return this.draw(a)}path(t,r){const a=this.gen.path(t,r);return this.draw(a)}}var St={canvas:(e,t)=>new H8(e,t),svg:(e,t)=>new U8(e,t),generator:e=>new df(e),newSeed:()=>df.newSeed()},$t=S(async(e,t,r)=>{var m,C;let a;const s=t.useHtmlLabels||_a((m=re())==null?void 0:m.htmlLabels);r?a=r: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",Qe(t.labelStyle));let h;t.label===void 0?h="":h=typeof t.label=="string"?t.label:t.label[0];const f=!!t.icon||!!t.img,d=t.labelType==="markdown",p=await Ba(c,Lr(as(h),re()),{useHtmlLabels:s,width:t.width||((C=re().flowchart)==null?void 0:C.wrappingWidth),classes:d?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:f,markdown:d},re());let g=p.getBBox();const x=((t==null?void 0:t.padding)??0)/2;if(s){const k=p.children[0],v=Wt(p);await IT(k,h),g=k.getBoundingClientRect(),v.attr("width",g.width),v.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"),bg=S(async(e,t,r)=>{var f,d;const a=r.useHtmlLabels??wi(re()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),l=await Ba(s,Lr(as(t),re()),{useHtmlLabels:a,width:r.width||((d=(f=re())==null?void 0:f.flowchart)==null?void 0:d.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let c=l.getBBox();const h=r.padding/2;if(wi(re())){const p=l.children[0],g=Wt(l);c=p.getBoundingClientRect(),g.attr("width",c.width),g.attr("height",c.height)}return a?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),r.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=S((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),Rt=S((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Qt(e){const t=e.map((r,a)=>`${a===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}S(Qt,"createPathFromPoints");function kn(e,t,r,a,s,l){const c=[],f=r-e,d=a-t,p=f/l,g=2*Math.PI/p,x=t+d/2;for(let m=0;m<=50;m++){const C=m/50,k=e+C*f,v=x+s*Math.sin(g*(k-e));c.push({x:k,y:v})}return c}S(kn,"generateFullSineWavePoints");function Sc(e,t,r,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,m=e+r*Math.cos(x),C=t+r*Math.sin(x);c.push({x:-m,y:-C})}return c}S(Sc,"generateCirclePoints");function km(e){const t=Array.from(e.childNodes).filter(f=>f.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),a=t.map(f=>f.getAttribute("d")).filter(f=>f!==null).join(" ");r.setAttribute("d",a);const s=t.find(f=>f.getAttribute("fill")!=="none"),l=t.find(f=>f.getAttribute("stroke")!=="none"),c=S((f,d)=>(f==null?void 0:f.getAttribute(d))??void 0,"getAttr");if(s){const f={fill:c(s,"fill"),"fill-opacity":c(s,"fill-opacity")??"1"};Object.entries(f).forEach(([d,p])=>{p&&r.setAttribute(d,p)})}if(l){const f={stroke:c(l,"stroke"),"stroke-width":c(l,"stroke-width")??"1","stroke-opacity":c(l,"stroke-opacity")??"1"};Object.entries(f).forEach(([d,p])=>{p&&r.setAttribute(d,p)})}const h=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(r),h}S(km,"mergePaths");var j8=S((e,t)=>{var r=e.x,a=e.y,s=t.x-r,l=t.y-a,c=e.width/2,h=e.height/2,f,d;return Math.abs(l)*c>Math.abs(s)*h?(l<0&&(h=-h),f=l===0?0:h*s/l,d=h):(s<0&&(c=-c),f=c,d=s===0?0:c*l/s),{x:r+f,y:a+d}},"intersectRect"),Hl=j8,P8=S(async(e,t,r,a=!1,s=!1)=>{let l=t||"";typeof l=="object"&&(l=l[0]);const c=re(),h=wi(c);return await Ba(e,l,{style:r,isTitle:a,useHtmlLabels:h,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},c)},"createLabel"),pn=P8,vn=S((e,t,r,a,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+a-s,"A",s,s,0,0,1,e+r-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"),kw=S(async(e,t)=>{gt.info("Creating subgraph rect for ",t.id,t);const r=re(),{themeVariables:a,handDrawnSeed:s}=r,{clusterBkg:l,clusterBorder:c}=a,{labelStyles:h,nodeStyles:f,borderStyles:d,backgroundStyles:p}=_t(t),g=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),x=wi(r),m=g.insert("g").attr("class","cluster-label ");let C;t.labelType==="markdown"?C=await Ba(m,t.label,{style:t.labelStyle,useHtmlLabels:x,isNode:!0,width:t.width}):C=await pn(m,t.label,t.labelStyle||"",!1,!0);let k=C.getBBox();if(wi(r)){const H=C.children[0],I=Wt(C);k=H.getBoundingClientRect(),I.attr("width",k.width),I.attr("height",k.height)}const v=t.width<=k.width+t.padding?k.width+t.padding:t.width;t.width<=k.width+t.padding?t.diff=(v-t.width)/2-t.padding:t.diff=-t.padding;const T=t.height,_=t.x-v/2,E=t.y-T/2;gt.trace("Data ",t,JSON.stringify(t));let R;if(t.look==="handDrawn"){const H=St.svg(g),I=Tt(t,{roughness:.7,fill:l,stroke:c,fillWeight:3,seed:s}),at=H.path(vn(_,E,v,T,0),I);R=g.insert(()=>(gt.debug("Rough node insert CXC",at),at),":first-child"),R.select("path:nth-child(2)").attr("style",d.join(";")),R.select("path").attr("style",p.join(";").replace("fill","stroke"))}else R=g.insert("rect",":first-child"),R.attr("style",f).attr("rx",t.rx).attr("ry",t.ry).attr("x",_).attr("y",E).attr("width",v).attr("height",T);const{subGraphTitleTopMargin:F}=Oy(r);if(m.attr("transform",`translate(${t.x-k.width/2}, ${t.y-t.height/2+F})`),h){const H=m.select("span");H&&H.attr("style",h)}const N=R.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 Hl(t,H)},{cluster:g,labelBBox:k}},"rect"),W8=S((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),a=r.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 Hl(t,h)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Y8=S(async(e,t)=>{const r=re(),{themeVariables:a,handDrawnSeed:s}=r,{altBackground:l,compositeBackground:c,compositeTitleBackground:h,nodeBorder:f}=a,d=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),p=d.insert("g",":first-child"),g=d.insert("g").attr("class","cluster-label");let x=d.append("rect");const m=await pn(g,t.label,t.labelStyle,void 0,!0);let C=m.getBBox();if(wi(r)){const at=m.children[0],X=Wt(m);C=at.getBoundingClientRect(),X.attr("width",C.width),X.attr("height",C.height)}const k=0*t.padding,v=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,R=t.x-T/2,F=t.y-_/2;t.width=T;const N=t.y-t.height/2-v+C.height+2;let H;if(t.look==="handDrawn"){const at=t.cssClasses.includes("statediagram-cluster-alt"),X=St.svg(d),D=t.rx||t.ry?X.path(vn(R,F,T,_,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:f,seed:s}):X.rectangle(R,F,T,_,{seed:s});H=d.insert(()=>D,":first-child");const V=X.rectangle(R,N,T,E,{fill:at?l:c,fillStyle:at?"hachure":"solid",stroke:f,seed:s});H=d.insert(()=>D,":first-child"),x=d.insert(()=>V)}else H=p.insert("rect",":first-child"),H.attr("class","outer").attr("x",R).attr("y",F).attr("width",T).attr("height",_).attr("data-look",t.look),x.attr("class","inner").attr("x",R).attr("y",N).attr("width",T).attr("height",E);g.attr("transform",`translate(${t.x-C.width/2}, ${F+1-(wi(r)?0:3)})`);const I=H.node().getBBox();return t.height=I.height,t.offsetX=0,t.offsetY=C.height-t.padding/2,t.labelBBox=C,t.intersect=function(at){return Hl(t,at)},{cluster:d,labelBBox:C}},"roundedWithTitle"),G8=S(async(e,t)=>{gt.info("Creating subgraph rect for ",t.id,t);const r=re(),{themeVariables:a,handDrawnSeed:s}=r,{clusterBkg:l,clusterBorder:c}=a,{labelStyles:h,nodeStyles:f,borderStyles:d,backgroundStyles:p}=_t(t),g=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),x=wi(r),m=g.insert("g").attr("class","cluster-label "),C=await Ba(m,t.label,{style:t.labelStyle,useHtmlLabels:x,isNode:!0,width:t.width});let k=C.getBBox();if(wi(r)){const H=C.children[0],I=Wt(C);k=H.getBoundingClientRect(),I.attr("width",k.width),I.attr("height",k.height)}const v=t.width<=k.width+t.padding?k.width+t.padding:t.width;t.width<=k.width+t.padding?t.diff=(v-t.width)/2-t.padding:t.diff=-t.padding;const T=t.height,_=t.x-v/2,E=t.y-T/2;gt.trace("Data ",t,JSON.stringify(t));let R;if(t.look==="handDrawn"){const H=St.svg(g),I=Tt(t,{roughness:.7,fill:l,stroke:c,fillWeight:4,seed:s}),at=H.path(vn(_,E,v,T,t.rx),I);R=g.insert(()=>(gt.debug("Rough node insert CXC",at),at),":first-child"),R.select("path:nth-child(2)").attr("style",d.join(";")),R.select("path").attr("style",p.join(";").replace("fill","stroke"))}else R=g.insert("rect",":first-child"),R.attr("style",f).attr("rx",t.rx).attr("ry",t.ry).attr("x",_).attr("y",E).attr("width",v).attr("height",T);const{subGraphTitleTopMargin:F}=Oy(r);if(m.attr("transform",`translate(${t.x-k.width/2}, ${t.y-t.height/2+F})`),h){const H=m.select("span");H&&H.attr("style",h)}const N=R.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 Hl(t,H)},{cluster:g,labelBBox:k}},"kanbanSection"),X8=S((e,t)=>{const r=re(),{themeVariables:a,handDrawnSeed:s}=r,{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"),f=0*t.padding,d=t.width+f;t.diff=-t.padding;const p=t.height+f,g=t.x-d/2,x=t.y-p/2;t.width=d;let m;if(t.look==="handDrawn"){const v=St.svg(c).rectangle(g,x,d,p,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:l,seed:s});m=c.insert(()=>v,":first-child")}else{m=h.insert("rect",":first-child");let k="outer";t.look,k="divider",m.attr("class",k).attr("x",g).attr("y",x).attr("width",d).attr("height",p).attr("data-look",t.look)}const C=m.node().getBBox();return t.height=C.height,t.offsetX=0,t.offsetY=0,t.intersect=function(k){return Hl(t,k)},{cluster:c,labelBBox:{}}},"divider"),V8=kw,Z8={rect:kw,squareRect:V8,roundedWithTitle:Y8,noteGroup:W8,divider:X8,kanbanSection:G8},vw=new Map,Q8=S(async(e,t)=>{const r=t.shape||"rect",a=await Z8[r](e,t);return vw.set(t.id,a),a},"insertCluster"),aI=S(()=>{vw=new Map},"clear");function Sw(e,t){return e.intersect(t)}S(Sw,"intersectNode");var K8=Sw;function Tw(e,t,r,a){var s=e.x,l=e.y,c=s-a.x,h=l-a.y,f=Math.sqrt(t*t*h*h+r*r*c*c),d=Math.abs(t*r*c/f);a.x<s&&(d=-d);var p=Math.abs(t*r*h/f);return a.y<l&&(p=-p),{x:s+d,y:l+p}}S(Tw,"intersectEllipse");var ww=Tw;function _w(e,t,r){return ww(e,t,t,r)}S(_w,"intersectCircle");var J8=_w;function Bw(e,t,r,a){{const s=t.y-e.y,l=e.x-t.x,c=t.x*e.y-e.x*t.y,h=s*r.x+l*r.y+c,f=s*a.x+l*a.y+c,d=1e-6;if(h!==0&&f!==0&&vm(h,f))return;const p=a.y-r.y,g=r.x-a.x,x=a.x*r.y-r.x*a.y,m=p*e.x+g*e.y+x,C=p*t.x+g*t.y+x;if(Math.abs(m)<d&&Math.abs(C)<d&&vm(m,C))return;const k=s*g-p*l;if(k===0)return;const v=Math.abs(k/2);let T=l*x-g*c;const _=T<0?(T-v)/k:(T+v)/k;T=p*c-s*x;const E=T<0?(T-v)/k:(T+v)/k;return{x:_,y:E}}}S(Bw,"intersectLine");function vm(e,t){return e*t>0}S(vm,"sameSign");var tz=Bw;function Ew(e,t,r){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 f=a-e.width/2-c,d=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],m=tz(e,r,{x:f+g.x,y:d+g.y},{x:f+x.x,y:d+x.y});m&&l.push(m)}return l.length?(l.length>1&&l.sort(function(p,g){let x=p.x-r.x,m=p.y-r.y,C=Math.sqrt(x*x+m*m),k=g.x-r.x,v=g.y-r.y,T=Math.sqrt(k*k+v*v);return C<T?-1:C===T?0:1}),l[0]):e}S(Ew,"intersectPolygon");var ez=Ew,kt={node:K8,circle:J8,ellipse:ww,polygon:ez,rect:Hl};function Lw(e,t){const{labelStyles:r}=_t(t);t.labelStyle=r;const a=Rt(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,f=St.svg(l),d=Tt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(d.roughness=0);const p=f.circle(0,0,c*2,d),g=l.insert(()=>p,":first-child");return g.attr("class","anchor").attr("style",Qe(h)),Et(t,g),t.intersect=function(x){return gt.info("Circle intersect",t,c,x),kt.circle(t,c,x)},l}S(Lw,"anchor");function Sm(e,t,r,a,s,l,c){const f=(e+r)/2,d=(t+a)/2,p=Math.atan2(a-t,r-e),g=(r-e)/2,x=(a-t)/2,m=g/s,C=x/l,k=Math.sqrt(m**2+C**2);if(k>1)throw new Error("The given radii are too small to create an arc between the points.");const v=Math.sqrt(1-k**2),T=f+v*l*Math.sin(p)*(c?-1:1),_=d-v*s*Math.cos(p)*(c?-1:1),E=Math.atan2((t-_)/l,(e-T)/s);let F=Math.atan2((a-_)/l,(r-T)/s)-E;c&&F<0&&(F+=2*Math.PI),!c&&F>0&&(F-=2*Math.PI);const N=[];for(let H=0;H<20;H++){const I=H/19,at=E+I*F,X=T+s*Math.cos(at),D=_+l*Math.sin(at);N.push({x:X,y:D})}return N}S(Sm,"generateArcPoints");function Aw(e,t,r){const[a,s]=[t,r].sort((l,c)=>c-l);return s*(1-Math.sqrt(1-(e/a/2)**2))}S(Aw,"calculateArcSagitta");async function Mw(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s,h=S(at=>at+c,"calcTotalHeight"),f=S(at=>{const X=at/2;return[X/(2.5+at/50),X]},"calcEllipseRadius"),{shapeSvg:d,bbox:p}=await $t(e,t,Rt(t)),g=h(t!=null&&t.height?t==null?void 0:t.height:p.height),[x,m]=f(g),C=Aw(g,x,m),v=(t!=null&&t.width?t==null?void 0:t.width:p.width)+l*2+C-C,T=g,{cssStyles:_}=t,E=[{x:v/2,y:-T/2},{x:-v/2,y:-T/2},...Sm(-v/2,-T/2,-v/2,T/2,x,m,!1),{x:v/2,y:T/2},...Sm(v/2,T/2,v/2,-T/2,x,m,!0)],R=St.svg(d),F=Tt(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const N=Qt(E),H=R.path(N,F),I=d.insert(()=>H,":first-child");return I.attr("class","basic label-container outer-path"),_&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",_),a&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",a),I.attr("transform",`translate(${x/2}, 0)`),Et(t,I),t.intersect=function(at){return kt.polygon(t,E,at)},d}S(Mw,"bowTieRect");function Ea(e,t,r,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+","+r/2+")")}S(Ea,"insertPolygonShape");var du=12;async function Rw(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const s=t.padding??0,l=t.look==="neo"?28:s,c=t.look==="neo"?24:s,{shapeSvg:h,bbox:f}=await $t(e,t,Rt(t)),d=((t==null?void 0:t.width)??f.width)+(t.look==="neo"?l*2:l+du),p=((t==null?void 0:t.height)??f.height)+(t.look==="neo"?c*2:c),g=0,x=d,m=-p,C=0,k=[{x:g+du,y:m},{x,y:m},{x,y:C},{x:g,y:C},{x:g,y:m+du},{x:g+du,y:m}];let v;const{cssStyles:T}=t;if(t.look==="handDrawn"){const _=St.svg(h),E=Tt(t,{}),R=Qt(k),F=_.path(R,E);v=h.insert(()=>F,":first-child").attr("transform",`translate(${-d/2}, ${p/2})`),T&&v.attr("style",T)}else v=Ea(h,d,p,k);return a&&v.attr("style",a),Et(t,v),t.intersect=function(_){return kt.polygon(t,k,_)},h}S(Rw,"card");function Fw(e,t){const{nodeStyles:r}=_t(t);t.label="";const a=e.insert("g").attr("class",Rt(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),f=Tt(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=Qt(c),p=h.path(d,f),g=a.insert(()=>p,":first-child");return s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(x){return kt.polygon(t,c,x)},a}S(Fw,"choice");async function Gy(e,t,r){const{labelStyles:a,nodeStyles:s}=_t(t);t.labelStyle=a;const{shapeSvg:l,bbox:c,halfPadding:h}=await $t(e,t,Rt(t)),f=16,d=(r==null?void 0:r.padding)??h,p=t.look==="neo"?c.width/2+f*2:c.width/2+d;let g;const{cssStyles:x}=t;if(t.look==="handDrawn"){const m=St.svg(l),C=Tt(t,{}),k=m.circle(0,0,p*2,C);g=l.insert(()=>k,":first-child"),g.attr("class","basic label-container").attr("style",Qe(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(m,C){const k=m.width/2;return kt.circle(m,k,C)},t.intersect=function(m){return gt.info("Circle intersect",t,p,m),kt.circle(t,p,m)},l}S(Gy,"circle");function Ow(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),a=e*2,s={x:a/2*t,y:a/2*r},l={x:-(a/2)*t,y:a/2*r},c={x:-(a/2)*t,y:-(a/2)*r},h={x:a/2*t,y:-(a/2)*r};return`M ${l.x},${l.y} L ${h.x},${h.y}
362
+ M ${s.x},${s.y} L ${c.x},${c.y}`}S(Ow,"createLine");function Dw(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",Rt(t)).attr("id",t.domId??t.id),l=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:c}=t,h=St.svg(s),f=Tt(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=h.circle(0,0,l*2,f),p=Ow(l),g=h.path(p,f),x=s.insert(()=>d,":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(m){return gt.info("crossedCircle intersect",t,{radius:l,point:m}),kt.circle(t,l,m)},s}S(Dw,"crossedCircle");function ba(e,t,r,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,m=e+r*Math.cos(x),C=t+r*Math.sin(x);c.push({x:-m,y:-C})}return c}S(ba,"generateCirclePoints");async function $w(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const{shapeSvg:s,bbox:l,label:c}=await $t(e,t,Rt(t)),h=t.look==="neo"?18:t.padding??0,f=t.look==="neo"?12:t.padding??0,d=l.width+h,p=l.height+f,g=Math.max(5,p*.1),{cssStyles:x}=t,m=[...ba(d/2,-p/2,g,30,-90,0),{x:-d/2-g,y:g},...ba(d/2+g*2,-g,g,20,-180,-270),...ba(d/2+g*2,g,g,20,-90,-180),{x:-d/2-g,y:-p/2},...ba(d/2,p/2,g,20,0,90)],C=[{x:d/2,y:-p/2-g},{x:-d/2,y:-p/2-g},...ba(d/2,-p/2,g,20,-90,0),{x:-d/2-g,y:-g},...ba(d/2+d*.1,-g,g,20,-180,-270),...ba(d/2+d*.1,g,g,20,-90,-180),{x:-d/2-g,y:p/2},...ba(d/2,p/2,g,20,0,90),{x:-d/2,y:p/2+g},{x:d/2,y:p/2+g}],k=St.svg(s),v=Tt(t,{fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const _=Qt(m).replace("Z",""),E=k.path(_,v),R=Qt(C),F=k.path(R,{...v}),N=s.insert("g",":first-child");return N.insert(()=>F,":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(${-d/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}S($w,"curlyBraceLeft");function Ca(e,t,r,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,m=e+r*Math.cos(x),C=t+r*Math.sin(x);c.push({x:m,y:C})}return c}S(Ca,"generateCirclePoints");async function zw(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const{shapeSvg:s,bbox:l,label:c}=await $t(e,t,Rt(t)),h=t.look==="neo"?18:t.padding??0,f=t.look==="neo"?12:t.padding??0,d=l.width+(t.look==="neo"?h*2:h),p=l.height+(t.look==="neo"?f*2:f),g=Math.max(5,p*.1),{cssStyles:x}=t,m=[...Ca(d/2,-p/2,g,20,-90,0),{x:d/2+g,y:-g},...Ca(d/2+g*2,-g,g,20,-180,-270),...Ca(d/2+g*2,g,g,20,-90,-180),{x:d/2+g,y:p/2},...Ca(d/2,p/2,g,20,0,90)],C=[{x:-d/2,y:-p/2-g},{x:d/2,y:-p/2-g},...Ca(d/2,-p/2,g,20,-90,0),{x:d/2+g,y:-g},...Ca(d/2+g*2,-g,g,20,-180,-270),...Ca(d/2+g*2,g,g,20,-90,-180),{x:d/2+g,y:p/2},...Ca(d/2,p/2,g,20,0,90),{x:d/2,y:p/2+g},{x:-d/2,y:p/2+g}],k=St.svg(s),v=Tt(t,{fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const _=Qt(m).replace("Z",""),E=k.path(_,v),R=Qt(C),F=k.path(R,{...v}),N=s.insert("g",":first-child");return N.insert(()=>F,":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(${-d/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}S(zw,"curlyBraceRight");function ni(e,t,r,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,m=e+r*Math.cos(x),C=t+r*Math.sin(x);c.push({x:-m,y:-C})}return c}S(ni,"generateCirclePoints");async function Nw(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const{shapeSvg:s,bbox:l,label:c}=await $t(e,t,Rt(t)),h=t.look==="neo"?18:t.padding??0,f=t.look==="neo"?12:t.padding??0,d=l.width+(t.look==="neo"?h*2:h),p=l.height+(t.look==="neo"?f*2:f),g=Math.max(5,p*.1),{cssStyles:x}=t,m=[...ni(d/2,-p/2,g,30,-90,0),{x:-d/2-g,y:g},...ni(d/2+g*2,-g,g,20,-180,-270),...ni(d/2+g*2,g,g,20,-90,-180),{x:-d/2-g,y:-p/2},...ni(d/2,p/2,g,20,0,90)],C=[...ni(-d/2+g+g/2,-p/2,g,20,-90,-180),{x:d/2-g/2,y:g},...ni(-d/2-g/2,-g,g,20,0,90),...ni(-d/2-g/2,g,g,20,-90,0),{x:d/2-g/2,y:-g},...ni(-d/2+g+g/2,p/2,g,30,-180,-270)],k=[{x:d/2,y:-p/2-g},{x:-d/2,y:-p/2-g},...ni(d/2,-p/2,g,20,-90,0),{x:-d/2-g,y:-g},...ni(d/2+g*2,-g,g,20,-180,-270),...ni(d/2+g*2,g,g,20,-90,-180),{x:-d/2-g,y:p/2},...ni(d/2,p/2,g,20,0,90),{x:-d/2,y:p/2+g},{x:d/2-g-g/2,y:p/2+g},...ni(-d/2+g+g/2,-p/2,g,20,-90,-180),{x:d/2-g/2,y:g},...ni(-d/2-g/2,-g,g,20,0,90),...ni(-d/2-g/2,g,g,20,-90,0),{x:d/2-g/2,y:-g},...ni(-d/2+g+g/2,p/2,g,30,-180,-270)],v=St.svg(s),T=Tt(t,{fill:"none"});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const E=Qt(m).replace("Z",""),R=v.path(E,T),N=Qt(C).replace("Z",""),H=v.path(N,T),I=Qt(k),at=v.path(I,{...T}),X=s.insert("g",":first-child");return X.insert(()=>at,":first-child").attr("stroke-opacity",0),X.insert(()=>R,":first-child"),X.insert(()=>H,":first-child"),X.attr("class","text"),x&&t.look!=="handDrawn"&&X.selectAll("path").attr("style",x),a&&t.look!=="handDrawn"&&X.selectAll("path").attr("style",a),X.attr("transform",`translate(${g-g/4}, 0)`),c.attr("transform",`translate(${-d/2+(t.padding??0)/2-(l.x-(l.left??0))},${-p/2+(t.padding??0)/2-(l.y-(l.top??0))})`),Et(t,X),t.intersect=function(D){return kt.polygon(t,k,D)},s}S(Nw,"curlyBraces");async function qw(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s,h=20,f=5,{shapeSvg:d,bbox:p}=await $t(e,t,Rt(t)),g=Math.max(h,(p.width+l*2)*1.25,(t==null?void 0:t.width)??0),x=Math.max(f,p.height+c*2,(t==null?void 0:t.height)??0),m=x/2,{cssStyles:C}=t,k=St.svg(d),v=Tt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const T=g,_=x,E=T-m,R=_/4,F=[{x:E,y:0},{x:R,y:0},{x:0,y:_/2},{x:R,y:_},{x:E,y:_},...Sc(-E,-_/2,m,50,270,90)],N=Qt(F),H=k.path(N,v),I=d.insert(()=>H,":first-child");return I.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&I.selectChildren("path").attr("style",C),a&&t.look!=="handDrawn"&&I.selectChildren("path").attr("style",a),I.attr("transform",`translate(${-g/2}, ${-x/2})`),Et(t,I),t.intersect=function(at){return kt.polygon(t,F,at)},d}S(qw,"curvedTrapezoid");var iz=S((e,t,r,a,s,l)=>[`M${e},${t+l}`,`a${s},${l} 0,0,0 ${r},0`,`a${s},${l} 0,0,0 ${-r},0`,`l0,${a}`,`a${s},${l} 0,0,0 ${r},0`,`l0,${-a}`].join(" "),"createCylinderPathD"),rz=S((e,t,r,a,s,l)=>[`M${e},${t+l}`,`M${e+r},${t+l}`,`a${s},${l} 0,0,0 ${-r},0`,`l0,${a}`,`a${s},${l} 0,0,0 ${r},0`,`l0,${-a}`].join(" "),"createOuterCylinderPathD"),az=S((e,t,r,a,s,l)=>[`M${e-r/2},${-a/2}`,`a${s},${l} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),T2=8,w2=8;async function Iw(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const s=t.padding??0,l=t.look==="neo"?24:s,c=t.look==="neo"?24:s;if(t.width||t.height){const v=t.width??0;t.width=(t.width??0)-c,t.width<w2&&(t.width=w2);const _=v/2/(2.5+v/50);t.height=(t.height??0)-l-_*3,t.height<T2&&(t.height=T2)}const{shapeSvg:h,bbox:f,label:d}=await $t(e,t,Rt(t)),p=(t.width?t.width:f.width)+c,g=p/2,x=g/(2.5+p/50),m=(t.height?t.height:f.height)+l+x;let C;const{cssStyles:k}=t;if(t.look==="handDrawn"){const v=St.svg(h),T=rz(0,0,p,m,g,x),_=az(0,x,p,m,g,x),E=Tt(t,{}),R=v.path(T,E),F=v.path(_,Tt(t,{fill:"none"}));C=h.insert(()=>F,":first-child"),C=h.insert(()=>R,":first-child"),C.attr("class","basic label-container"),k&&C.attr("style",k)}else{const v=iz(0,0,p,m,g,x);C=h.insert("path",":first-child").attr("d",v).attr("class","basic label-container outer-path").attr("style",Qe(k)).attr("style",a)}return C.attr("label-offset-y",x),C.attr("transform",`translate(${-p/2}, ${-(m/2+x)})`),Et(t,C),d.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${-(f.height/2)+(t.padding??0)/1.5-(f.y-(f.top??0))})`),t.intersect=function(v){const T=kt.rect(t,v),_=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,v.y-(t.y??0)>0&&(E=-E),T.y+=E}return T},h}S(Iw,"cylinder");async function Ul(e,t,r){const{labelStyles:a,nodeStyles:s}=_t(t);t.labelStyle=a;const{shapeSvg:l,bbox:c}=await $t(e,t,Rt(t)),h=Math.max(c.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),f=Math.max(c.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),d=-h/2,p=-f/2;let g,{rx:x,ry:m}=t;const{cssStyles:C}=t;if(r!=null&&r.rx&&r.ry&&(x=r.rx,m=r.ry),t.look==="handDrawn"){const k=St.svg(l),v=Tt(t,{}),T=x||m?k.path(vn(d,p,h,f,x||0),v):k.rectangle(d,p,h,f,v);g=l.insert(()=>T,":first-child"),g.attr("class","basic label-container").attr("style",Qe(C))}else g=l.insert("rect",":first-child"),g.attr("class","basic label-container").attr("style",s).attr("rx",Qe(x)).attr("ry",Qe(m)).attr("x",d).attr("y",p).attr("width",h).attr("height",f);return Et(t,g),t.calcIntersect=function(k,v){return kt.rect(k,v)},t.intersect=function(k){return kt.rect(t,k)},l}S(Ul,"drawRect");async function Hw(e,t){const{cssClasses:r,labelPaddingX:a,labelPaddingY:s,padding:l,width:c,height:h}=t,f={rx:0,ry:0,labelPaddingX:a??(l??0)*2,labelPaddingY:s??l??0},d=await Ul(e,t,f);if(t.look==="handDrawn"){const m=St.svg(d),C=Tt(t,{}),k=d.select(".basic.label-container > path:nth-child(2)"),v=k.node();if(!v)return d;let T=null;if(v instanceof SVGGraphicsElement)T=v.getBBox();else return d;return d.insert(()=>m.line(T.x,T.y,T.x+T.width,T.y,C),".basic.label-container g.label"),d.insert(()=>m.line(T.x,T.y+T.height,T.x+T.width,T.y+T.height,C),".basic.label-container g.label"),k.remove(),d}const p=d.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}`),d}S(Hw,"datastore");async function Uw(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?16:t.padding??0,{shapeSvg:c,bbox:h,label:f}=await $t(e,t,Rt(t)),d=h.width+s,p=h.height+l,g=p*.2,x=-d/2,m=-p/2-g/2,{cssStyles:C}=t,k=St.svg(c),v=Tt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const T=[{x,y:m+g},{x:-x,y:m+g},{x:-x,y:-m},{x,y:-m},{x,y:m},{x:-x,y:m},{x:-x,y:m+g}],_=k.polygon(T.map(R=>[R.x,R.y]),v),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),f.attr("transform",`translate(${x+(t.padding??0)/2-(h.x-(h.left??0))}, ${m+g+(t.padding??0)/2-(h.y-(h.top??0))})`),Et(t,E),t.intersect=function(R){return kt.rect(t,R)},c}S(Uw,"dividedRectangle");async function jw(e,t){var m,C;const{labelStyles:r,nodeStyles:a}=_t(t),s=t.look==="neo"?12:5;t.labelStyle=r;const l=t.padding??0,c=t.look==="neo"?16:l,{shapeSvg:h,bbox:f}=await $t(e,t,Rt(t)),d=(t!=null&&t.width?(t==null?void 0:t.width)/2:f.width/2)+(c??0),p=d-s;let g;const{cssStyles:x}=t;if(t.look==="handDrawn"){const k=St.svg(h),v=Tt(t,{roughness:.2,strokeWidth:2.5}),T=Tt(t,{roughness:.2,strokeWidth:1.5}),_=k.circle(0,0,d*2,v),E=k.circle(0,0,p*2,T);g=h.insert("g",":first-child"),g.attr("class",Qe(t.cssClasses)).attr("style",Qe(x)),(m=g.node())==null||m.appendChild(_),(C=g.node())==null||C.appendChild(E)}else{g=h.insert("g",":first-child");const k=g.insert("circle",":first-child"),v=g.insert("circle");g.attr("class","basic label-container").attr("style",a),k.attr("class","outer-circle").attr("style",a).attr("r",d).attr("cx",0).attr("cy",0),v.attr("class","inner-circle").attr("style",a).attr("r",p).attr("cx",0).attr("cy",0)}return Et(t,g),t.intersect=function(k){return gt.info("DoubleCircle intersect",t,d,k),kt.circle(t,d,k)},h}S(jw,"doublecircle");function Pw(e,t,{config:{themeVariables:r}}){const{labelStyles:a,nodeStyles:s}=_t(t);t.label="",t.labelStyle=a;const l=e.insert("g").attr("class",Rt(t)).attr("id",t.domId??t.id),c=7,{cssStyles:h}=t,f=St.svg(l),{nodeBorder:d}=r,p=Tt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(p.roughness=0);const g=f.circle(0,0,c*2,p),x=l.insert(()=>g,":first-child");return x.selectAll("path").attr("style",`fill: ${d} !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(m){return gt.info("filledCircle intersect",t,{radius:c,point:m}),kt.circle(t,c,m)},l}S(Pw,"filledCircle");var _2=10,B2=10;async function Ww(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const s=t.padding??0,l=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<_2&&(t.height=_2),t.width=((t==null?void 0:t.width)??0)-l-l/2,t.width<B2&&(t.width=B2));const{shapeSvg:c,bbox:h,label:f}=await $t(e,t,Rt(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(l??0),p=t!=null&&t.height?t==null?void 0:t.height:d+h.height,g=p,x=[{x:0,y:-p},{x:g,y:-p},{x:g/2,y:0}],{cssStyles:m}=t,C=St.svg(c),k=Tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=Qt(x),T=C.path(v,k),_=c.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",m),a&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",a),t.width=d,t.height=p,Et(t,_),f.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}S(Ww,"flippedTriangle");function Yw(e,t,{dir:r,config:{state:a,themeVariables:s}}){const{nodeStyles:l}=_t(t);t.label="";const c=e.insert("g").attr("class",Rt(t)).attr("id",t.domId??t.id),{cssStyles:h}=t;let f=Math.max(70,(t==null?void 0:t.width)??0),d=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(f=Math.max(10,(t==null?void 0:t.width)??0),d=Math.max(70,(t==null?void 0:t.height)??0));const p=-1*f/2,g=-1*d/2,x=St.svg(c),m=Tt(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=x.rectangle(p,g,f,d,m),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 v=(a==null?void 0:a.padding)??0;return t.width&&t.height&&(t.width+=v/2||0,t.height+=v/2||0),t.intersect=function(T){return kt.rect(t,T)},c}S(Yw,"forkJoin");async function Gw(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;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==null?void 0:t.height)??0)-h*2,t.height<l&&(t.height=l),t.width=((t==null?void 0:t.width)??0)-c*2,t.width<s&&(t.width=s));const{shapeSvg:f,bbox:d}=await $t(e,t,Rt(t)),p=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,d.width))+c*2,g=(t!=null&&t.height?t==null?void 0:t.height:Math.max(l,d.height))+h*2,x=g/2,{cssStyles:m}=t,C=St.svg(f),k=Tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=[{x:-p/2,y:-g/2},{x:p/2-x,y:-g/2},...Sc(-p/2+x,0,x,50,90,270),{x:p/2-x,y:g/2},{x:-p/2,y:g/2}],T=Qt(v),_=C.path(T,k),E=f.insert(()=>_,":first-child");return E.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",m),a&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",a),Et(t,E),t.intersect=function(R){return gt.info("Pill intersect",t,{radius:x,point:R}),kt.polygon(t,v,R)},f}S(Gw,"halfRoundedRectangle");var nz=S((e,t,r,a,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-a/2}`,`L${e+r-s},${t-a}`,`L${e+s},${t-a}`,`L${e},${t-a/2}`,"Z"].join(" "),"createHexagonPathD");async function Xw(e,t){const{labelStyles:r,nodeStyles:a}=_t(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const l=t.padding??0,c=70,h=32,f=t.look==="neo"?c:l,d=t.look==="neo"?h:l;if(t.width||t.height){const E=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*E-d,t.height=(t.height??0)-f}const{shapeSvg:p,bbox:g}=await $t(e,t,Rt(t)),x=(t!=null&&t.height?t==null?void 0:t.height:g.height)+f,m=x/s,C=(t!=null&&t.width?t==null?void 0:t.width:g.width)+2*m+d,k=[{x:m,y:0},{x:C-m,y:0},{x:C,y:-x/2},{x:C-m,y:-x},{x:m,y:-x},{x:0,y:-x/2}];let v;const{cssStyles:T}=t;if(t.look==="handDrawn"){const _=St.svg(p),E=Tt(t,{}),R=nz(0,0,C,x,m),F=_.path(R,E);v=p.insert(()=>F,":first-child").attr("transform",`translate(${-C/2}, ${x/2})`),T&&v.attr("style",T)}else v=Ea(p,C,x,k);return a&&v.attr("style",a),t.width=C,t.height=x,Et(t,v),t.intersect=function(_){return kt.polygon(t,k,_)},p}S(Xw,"hexagon");async function Vw(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await $t(e,t,Rt(t)),l=Math.max(30,(t==null?void 0:t.width)??0),c=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:h}=t,f=St.svg(s),d=Tt(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=[{x:0,y:0},{x:l,y:0},{x:0,y:c},{x:l,y:c}],g=Qt(p),x=f.path(g,d),m=s.insert(()=>x,":first-child");return m.attr("class","basic label-container outer-path"),h&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",h),a&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",a),m.attr("transform",`translate(${-l/2}, ${-c/2})`),Et(t,m),t.intersect=function(C){return gt.info("Pill intersect",t,{points:p}),kt.polygon(t,p,C)},s}S(Vw,"hourglass");async function Zw(e,t,{config:{themeVariables:r,flowchart:a}}){const{labelStyles:s}=_t(t);t.labelStyle=s;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),f=a==null?void 0:a.wrappingWidth;t.width=Math.max(h,f??0);const{shapeSvg:d,bbox:p,label:g}=await $t(e,t,"icon-shape default"),x=t.pos==="t",m=h,C=h,{nodeBorder:k}=r,{stylesMap:v}=Il(t),T=-C/2,_=-m/2,E=t.label?8:0,R=St.svg(d),F=Tt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const N=R.rectangle(T,_,C,m,F),H=Math.max(C,p.width),I=m+p.height+E,at=R.rectangle(-H/2,-I/2,H,I,{...F,fill:"transparent",stroke:"none"}),X=d.insert(()=>N,":first-child"),D=d.insert(()=>at);if(t.icon){const V=d.append("g");V.html(`<g>${await zc(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const J=V.node().getBBox(),Y=J.width,j=J.height,A=J.x,z=J.y;V.attr("transform",`translate(${-Y/2-A},${x?p.height/2+E/2-j/2-z:-p.height/2-E/2-j/2-z})`),V.attr("style",`color: ${v.get("stroke")??k};`)}return g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${x?-I/2:I/2-p.height})`),X.attr("transform",`translate(0,${x?p.height/2+E/2:-p.height/2-E/2})`),Et(t,D),t.intersect=function(V){if(gt.info("iconSquare intersect",t,V),!t.label)return kt.rect(t,V);const J=t.x??0,Y=t.y??0,j=t.height??0;let A=[];return x?A=[{x:J-p.width/2,y:Y-j/2},{x:J+p.width/2,y:Y-j/2},{x:J+p.width/2,y:Y-j/2+p.height+E},{x:J+C/2,y:Y-j/2+p.height+E},{x:J+C/2,y:Y+j/2},{x:J-C/2,y:Y+j/2},{x:J-C/2,y:Y-j/2+p.height+E},{x:J-p.width/2,y:Y-j/2+p.height+E}]:A=[{x:J-C/2,y:Y-j/2},{x:J+C/2,y:Y-j/2},{x:J+C/2,y:Y-j/2+m},{x:J+p.width/2,y:Y-j/2+m},{x:J+p.width/2/2,y:Y+j/2},{x:J-p.width/2,y:Y+j/2},{x:J-p.width/2,y:Y-j/2+m},{x:J-C/2,y:Y-j/2+m}],kt.polygon(t,A,V)},d}S(Zw,"icon");async function Qw(e,t,{config:{themeVariables:r,flowchart:a}}){const{labelStyles:s}=_t(t);t.labelStyle=s;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),f=a==null?void 0:a.wrappingWidth;t.width=Math.max(h,f??0);const{shapeSvg:d,bbox:p,label:g}=await $t(e,t,"icon-shape default"),x=20,m=t.label?8:0,C=t.pos==="t",{nodeBorder:k,mainBkg:v}=r,{stylesMap:T}=Il(t),_=St.svg(d),E=Tt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const R=T.get("fill");E.stroke=R??v;const F=d.append("g");t.icon&&F.html(`<g>${await zc(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const N=F.node().getBBox(),H=N.width,I=N.height,at=N.x,X=N.y,D=Math.max(H,I)*Math.SQRT2+x*2,V=_.circle(0,0,D,E),J=Math.max(D,p.width),Y=D+p.height+m,j=_.rectangle(-J/2,-Y/2,J,Y,{...E,fill:"transparent",stroke:"none"}),A=d.insert(()=>V,":first-child"),z=d.insert(()=>j);return F.attr("transform",`translate(${-H/2-at},${C?p.height/2+m/2-I/2-X:-p.height/2-m/2-I/2-X})`),F.attr("style",`color: ${T.get("stroke")??k};`),g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${C?-Y/2:Y/2-p.height})`),A.attr("transform",`translate(0,${C?p.height/2+m/2:-p.height/2-m/2})`),Et(t,z),t.intersect=function(O){return gt.info("iconSquare intersect",t,O),kt.rect(t,O)},d}S(Qw,"iconCircle");async function Kw(e,t,{config:{themeVariables:r,flowchart:a}}){const{labelStyles:s}=_t(t);t.labelStyle=s;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),f=a==null?void 0:a.wrappingWidth;t.width=Math.max(h,f??0);const{shapeSvg:d,bbox:p,halfPadding:g,label:x}=await $t(e,t,"icon-shape default"),m=t.pos==="t",C=h+g*2,k=h+g*2,{nodeBorder:v,mainBkg:T}=r,{stylesMap:_}=Il(t),E=-k/2,R=-C/2,F=t.label?8:0,N=St.svg(d),H=Tt(t,{});t.look!=="handDrawn"&&(H.roughness=0,H.fillStyle="solid");const I=_.get("fill");H.stroke=I??T;const at=N.path(vn(E,R,k,C,5),H),X=Math.max(k,p.width),D=C+p.height+F,V=N.rectangle(-X/2,-D/2,X,D,{...H,fill:"transparent",stroke:"none"}),J=d.insert(()=>at,":first-child").attr("class","icon-shape2"),Y=d.insert(()=>V);if(t.icon){const j=d.append("g");j.html(`<g>${await zc(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const A=j.node().getBBox(),z=A.width,O=A.height,M=A.x,Q=A.y;j.attr("transform",`translate(${-z/2-M},${m?p.height/2+F/2-O/2-Q:-p.height/2-F/2-O/2-Q})`),j.attr("style",`color: ${_.get("stroke")??v};`)}return x.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${m?-D/2:D/2-p.height})`),J.attr("transform",`translate(0,${m?p.height/2+F/2:-p.height/2-F/2})`),Et(t,Y),t.intersect=function(j){if(gt.info("iconSquare intersect",t,j),!t.label)return kt.rect(t,j);const A=t.x??0,z=t.y??0,O=t.height??0;let M=[];return m?M=[{x:A-p.width/2,y:z-O/2},{x:A+p.width/2,y:z-O/2},{x:A+p.width/2,y:z-O/2+p.height+F},{x:A+k/2,y:z-O/2+p.height+F},{x:A+k/2,y:z+O/2},{x:A-k/2,y:z+O/2},{x:A-k/2,y:z-O/2+p.height+F},{x:A-p.width/2,y:z-O/2+p.height+F}]:M=[{x:A-k/2,y:z-O/2},{x:A+k/2,y:z-O/2},{x:A+k/2,y:z-O/2+C},{x:A+p.width/2,y:z-O/2+C},{x:A+p.width/2/2,y:z+O/2},{x:A-p.width/2,y:z+O/2},{x:A-p.width/2,y:z-O/2+C},{x:A-k/2,y:z-O/2+C}],kt.polygon(t,M,j)},d}S(Kw,"iconRounded");async function Jw(e,t,{config:{themeVariables:r,flowchart:a}}){const{labelStyles:s}=_t(t);t.labelStyle=s;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),f=a==null?void 0:a.wrappingWidth;t.width=Math.max(h,f??0);const{shapeSvg:d,bbox:p,halfPadding:g,label:x}=await $t(e,t,"icon-shape default"),m=t.pos==="t",C=h+g*2,k=h+g*2,{nodeBorder:v,mainBkg:T}=r,{stylesMap:_}=Il(t),E=-k/2,R=-C/2,F=t.label?8:0,N=St.svg(d),H=Tt(t,{});t.look!=="handDrawn"&&(H.roughness=0,H.fillStyle="solid");const I=_.get("fill");H.stroke=I??T;const at=N.path(vn(E,R,k,C,.1),H),X=Math.max(k,p.width),D=C+p.height+F,V=N.rectangle(-X/2,-D/2,X,D,{...H,fill:"transparent",stroke:"none"}),J=d.insert(()=>at,":first-child"),Y=d.insert(()=>V);if(t.icon){const j=d.append("g");j.html(`<g>${await zc(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const A=j.node().getBBox(),z=A.width,O=A.height,M=A.x,Q=A.y;j.attr("transform",`translate(${-z/2-M},${m?p.height/2+F/2-O/2-Q:-p.height/2-F/2-O/2-Q})`),j.attr("style",`color: ${_.get("stroke")??v};`)}return x.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${m?-D/2:D/2-p.height})`),J.attr("transform",`translate(0,${m?p.height/2+F/2:-p.height/2-F/2})`),Et(t,Y),t.intersect=function(j){if(gt.info("iconSquare intersect",t,j),!t.label)return kt.rect(t,j);const A=t.x??0,z=t.y??0,O=t.height??0;let M=[];return m?M=[{x:A-p.width/2,y:z-O/2},{x:A+p.width/2,y:z-O/2},{x:A+p.width/2,y:z-O/2+p.height+F},{x:A+k/2,y:z-O/2+p.height+F},{x:A+k/2,y:z+O/2},{x:A-k/2,y:z+O/2},{x:A-k/2,y:z-O/2+p.height+F},{x:A-p.width/2,y:z-O/2+p.height+F}]:M=[{x:A-k/2,y:z-O/2},{x:A+k/2,y:z-O/2},{x:A+k/2,y:z-O/2+C},{x:A+p.width/2,y:z-O/2+C},{x:A+p.width/2/2,y:z+O/2},{x:A-p.width/2,y:z+O/2},{x:A-p.width/2,y:z-O/2+C},{x:A-k/2,y:z-O/2+C}],kt.polygon(t,M,j)},d}S(Jw,"iconSquare");async function t_(e,t,{config:{flowchart:r}}){const a=new Image;a.src=(t==null?void 0: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=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const f=Math.max(t.label?h??0:0,(t==null?void 0:t.assetWidth)??s),d=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:f,p=t.constraint==="on"?d/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??l;t.width=Math.max(d,h??0);const{shapeSvg:g,bbox:x,label:m}=await $t(e,t,"image-shape default"),C=t.pos==="t",k=-d/2,v=-p/2,T=t.label?8:0,_=St.svg(g),E=Tt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const R=_.rectangle(k,v,d,p,E),F=Math.max(d,x.width),N=p+x.height+T,H=_.rectangle(-F/2,-N/2,F,N,{...E,fill:"none",stroke:"none"}),I=g.insert(()=>R,":first-child"),at=g.insert(()=>H);if(t.img){const X=g.append("image");X.attr("href",t.img),X.attr("width",d),X.attr("height",p),X.attr("preserveAspectRatio","none"),X.attr("transform",`translate(${-d/2},${C?N/2-p:-N/2})`)}return m.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})`),I.attr("transform",`translate(0,${C?x.height/2+T/2:-x.height/2-T/2})`),Et(t,at),t.intersect=function(X){if(gt.info("iconSquare intersect",t,X),!t.label)return kt.rect(t,X);const D=t.x??0,V=t.y??0,J=t.height??0;let Y=[];return C?Y=[{x:D-x.width/2,y:V-J/2},{x:D+x.width/2,y:V-J/2},{x:D+x.width/2,y:V-J/2+x.height+T},{x:D+d/2,y:V-J/2+x.height+T},{x:D+d/2,y:V+J/2},{x:D-d/2,y:V+J/2},{x:D-d/2,y:V-J/2+x.height+T},{x:D-x.width/2,y:V-J/2+x.height+T}]:Y=[{x:D-d/2,y:V-J/2},{x:D+d/2,y:V-J/2},{x:D+d/2,y:V-J/2+p},{x:D+x.width/2,y:V-J/2+p},{x:D+x.width/2/2,y:V+J/2},{x:D-x.width/2,y:V+J/2},{x:D-x.width/2,y:V-J/2+p},{x:D-d/2,y:V-J/2+p}],kt.polygon(t,Y,X)},g}S(t_,"imageSquare");async function e_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const s=t.padding??0,l=s,c=t.look==="neo"?s*2:s,{shapeSvg:h,bbox:f}=await $t(e,t,Rt(t)),d=Math.max(f.width+(c??0)*2,(t==null?void 0:t.width)??0),p=Math.max(f.height+(l??0)*2,(t==null?void 0:t.height)??0),g=[{x:0,y:0},{x:d,y:0},{x:d+3*p/6,y:-p},{x:-3*p/6,y:-p}];let x;const{cssStyles:m}=t;if(t.look==="handDrawn"){const C=St.svg(h),k=Tt(t,{}),v=Qt(g),T=C.path(v,k);x=h.insert(()=>T,":first-child").attr("transform",`translate(${-d/2}, ${p/2})`),m&&x.attr("style",m)}else x=Ea(h,d,p,g);return a&&x.attr("style",a),t.width=d,t.height=p,Et(t,x),t.intersect=function(C){return kt.polygon(t,g,C)},h}S(e_,"inv_trapezoid");async function i_(e,t){const{shapeSvg:r,bbox:a,label:s}=await $t(e,t,"label"),l=r.insert("rect",":first-child");return l.attr("width",.1).attr("height",.1),r.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(f){return kt.rect(t,f)},r}S(i_,"labelRect");async function r_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const s=t.padding??0,l=s,c=t.look==="neo"?s*2:s,{shapeSvg:h,bbox:f}=await $t(e,t,Rt(t)),d=((t==null?void 0:t.height)??f.height)+l,p=((t==null?void 0:t.width)??f.width)+c,g=[{x:0,y:0},{x:p+3*d/6,y:0},{x:p,y:-d},{x:-(3*d)/6,y:-d}];let x;const{cssStyles:m}=t;if(t.look==="handDrawn"){const C=St.svg(h),k=Tt(t,{}),v=Qt(g),T=C.path(v,k);x=h.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${d/2})`),m&&x.attr("style",m)}else x=Ea(h,p,d,g);return a&&x.attr("style",a),t.width=p,t.height=d,Et(t,x),t.intersect=function(C){return kt.polygon(t,g,C)},h}S(r_,"lean_left");async function a_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const s=t.padding??0,l=s,c=t.look==="neo"?s*2:s,{shapeSvg:h,bbox:f}=await $t(e,t,Rt(t)),d=((t==null?void 0:t.height)??f.height)+l,p=((t==null?void 0:t.width)??f.width)+c,g=[{x:-3*d/6,y:0},{x:p,y:0},{x:p+3*d/6,y:-d},{x:0,y:-d}];let x;const{cssStyles:m}=t;if(t.look==="handDrawn"){const C=St.svg(h),k=Tt(t,{}),v=Qt(g),T=C.path(v,k);x=h.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${d/2})`),m&&x.attr("style",m)}else x=Ea(h,p,d,g);return a&&x.attr("style",a),t.width=p,t.height=d,Et(t,x),t.intersect=function(C){return kt.polygon(t,g,C)},h}S(a_,"lean_right");function n_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",Rt(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,c=Math.max(35,(t==null?void 0:t.width)??0),h=Math.max(35,(t==null?void 0:t.height)??0),f=7,d=[{x:c,y:0},{x:0,y:h+f/2},{x:c-2*f,y:h+f/2},{x:0,y:2*h},{x:c,y:h-f/2},{x:2*f,y:h-f/2}],p=St.svg(s),g=Tt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=Qt(d),m=p.path(x,g),C=s.insert(()=>m,":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,d,k)},s}S(n_,"lightningBolt");var sz=S((e,t,r,a,s,l,c)=>[`M${e},${t+l}`,`a${s},${l} 0,0,0 ${r},0`,`a${s},${l} 0,0,0 ${-r},0`,`l0,${a}`,`a${s},${l} 0,0,0 ${r},0`,`l0,${-a}`,`M${e},${t+l+c}`,`a${s},${l} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),lz=S((e,t,r,a,s,l,c)=>[`M${e},${t+l}`,`M${e+r},${t+l}`,`a${s},${l} 0,0,0 ${-r},0`,`l0,${a}`,`a${s},${l} 0,0,0 ${r},0`,`l0,${-a}`,`M${e},${t+l+c}`,`a${s},${l} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),oz=S((e,t,r,a,s,l)=>[`M${e-r/2},${-a/2}`,`a${s},${l} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),E2=10,L2=10;async function s_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;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<L2&&(t.width=L2);const E=T/2/(2.5+T/50);t.height=(t.height??0)-c-E*3,t.height<E2&&(t.height=E2)}const{shapeSvg:h,bbox:f,label:d}=await $t(e,t,Rt(t)),p=(t!=null&&t.width?t==null?void 0:t.width:f.width)+l*2,g=p/2,x=g/(2.5+p/50),m=(t!=null&&t.height?t==null?void 0:t.height:f.height)+x+c*2,C=m*.1;let k;const{cssStyles:v}=t;if(t.look==="handDrawn"){const T=St.svg(h),_=lz(0,0,p,m,g,x,C),E=oz(0,x,p,m,g,x),R=Tt(t,{}),F=T.path(_,R),N=T.path(E,R);h.insert(()=>N,":first-child").attr("class","line"),k=h.insert(()=>F,":first-child"),k.attr("class","basic label-container"),v&&k.attr("style",v)}else{const T=sz(0,0,p,m,g,x,C);k=h.insert("path",":first-child").attr("d",T).attr("class","basic label-container outer-path").attr("style",Qe(v)).attr("style",a)}return k.attr("label-offset-y",x),k.attr("transform",`translate(${-p/2}, ${-(m/2+x)})`),Et(t,k),d.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${-(f.height/2)+x-(f.y-(f.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 R=x*x*(1-E*E/(g*g));R>0&&(R=Math.sqrt(R)),R=x-R,T.y-(t.y??0)>0&&(R=-R),_.y+=R}return _},h}S(s_,"linedCylinder");async function l_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s;if(t.width||t.height){const R=t.width;t.width=(R??0)*10/11-l*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-c*2,t.height<10&&(t.height=10)}const{shapeSvg:h,bbox:f,label:d}=await $t(e,t,Rt(t)),p=(t!=null&&t.width?t==null?void 0:t.width:f.width)+(l??0)*2,g=(t!=null&&t.height?t==null?void 0:t.height:f.height)+(c??0)*2,x=t.look==="neo"?g/4:g/8,m=g+x,{cssStyles:C}=t,k=St.svg(h),v=Tt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const T=[{x:-p/2-p/2*.1,y:-m/2},{x:-p/2-p/2*.1,y:m/2},...kn(-p/2-p/2*.1,m/2,p/2+p/2*.1,m/2,x,.8),{x:p/2+p/2*.1,y:-m/2},{x:-p/2-p/2*.1,y:-m/2},{x:-p/2,y:-m/2},{x:-p/2,y:m/2*1.1},{x:-p/2,y:-m/2}],_=k.polygon(T.map(R=>[R.x,R.y]),v),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})`),d.attr("transform",`translate(${-p/2+(t.padding??0)+p/2*.1/2-(f.x-(f.left??0))},${-g/2+(t.padding??0)-x/2-(f.y-(f.top??0))})`),Et(t,E),t.intersect=function(R){return kt.polygon(t,T,R)},h}S(l_,"linedWaveEdgedRect");async function o_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;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==null?void 0:t.width)??0)-l*2-2*h,10),t.height=Math.max(((t==null?void 0:t.height)??0)-c*2-2*h,10));const{shapeSvg:f,bbox:d,label:p}=await $t(e,t,Rt(t)),g=(t!=null&&t.width?t==null?void 0:t.width:d.width)+l*2+2*h,x=(t!=null&&t.height?t==null?void 0:t.height:d.height)+c*2+2*h,m=g-2*h,C=x-2*h,k=-m/2,v=-C/2,{cssStyles:T}=t,_=St.svg(f),E=Tt(t,{}),R=[{x:k-h,y:v+h},{x:k-h,y:v+C+h},{x:k+m-h,y:v+C+h},{x:k+m-h,y:v+C},{x:k+m,y:v+C},{x:k+m,y:v+C-h},{x:k+m+h,y:v+C-h},{x:k+m+h,y:v-h},{x:k+h,y:v-h},{x:k+h,y:v},{x:k,y:v},{x:k,y:v+h}],F=[{x:k,y:v+h},{x:k+m-h,y:v+h},{x:k+m-h,y:v+C},{x:k+m,y:v+C},{x:k+m,y:v},{x:k,y:v}];t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const N=Qt(R);let H=_.path(N,E);const I=Qt(F);let at=_.path(I,E);t.look!=="handDrawn"&&(H=km(H),at=km(at));const X=f.insert("g",":first-child");return X.insert(()=>H),X.insert(()=>at),X.attr("class","basic label-container outer-path"),T&&t.look!=="handDrawn"&&X.selectAll("path").attr("style",T),a&&t.look!=="handDrawn"&&X.selectAll("path").attr("style",a),p.attr("transform",`translate(${-(d.width/2)-h-(d.x-(d.left??0))}, ${-(d.height/2)+h-(d.y-(d.top??0))})`),Et(t,X),t.intersect=function(D){return kt.polygon(t,R,D)},f}S(o_,"multiRect");async function c_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const{shapeSvg:s,bbox:l,label:c}=await $t(e,t,Rt(t)),h=t.padding??0,f=t.look==="neo"?16:h,d=t.look==="neo"?12:h;let p=!0;(t.width||t.height)&&(p=!1,t.width=((t==null?void 0:t.width)??0)-f*2,t.height=((t==null?void 0:t.height)??0)-d*3);const g=Math.max(l.width,(t==null?void 0:t.width)??0)+f*2,x=Math.max(l.height,(t==null?void 0:t.height)??0)+d*3,m=t.look==="neo"?x/4:x/8,C=x+(p?m/2:-m/2),k=-g/2,v=-C/2,T=10,{cssStyles:_}=t,E=kn(k-T,v+C+T,k+g-T,v+C+T,m,.8),R=E==null?void 0:E[E.length-1],F=[{x:k-T,y:v+T},{x:k-T,y:v+C+T},...E,{x:k+g-T,y:R.y-T},{x:k+g,y:R.y-T},{x:k+g,y:R.y-2*T},{x:k+g+T,y:R.y-2*T},{x:k+g+T,y:v-T},{x:k+T,y:v-T},{x:k+T,y:v},{x:k,y:v},{x:k,y:v+T}],N=[{x:k,y:v+T},{x:k+g-T,y:v+T},{x:k+g-T,y:R.y-T},{x:k+g,y:R.y-T},{x:k+g,y:v},{x:k,y:v}],H=St.svg(s),I=Tt(t,{});t.look!=="handDrawn"&&(I.roughness=0,I.fillStyle="solid");const at=Qt(F),X=H.path(at,I),D=Qt(N),V=H.path(D,I),J=s.insert(()=>X,":first-child");return J.insert(()=>V),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(0,${-m/2})`),c.attr("transform",`translate(${-(l.width/2)-T-(l.x-(l.left??0))}, ${-(l.height/2)+T-m/2-(l.y-(l.top??0))})`),Et(t,J),t.intersect=function(Y){return kt.polygon(t,F,Y)},s}S(c_,"multiWaveEdgedRectangle");async function h_(e,t,{config:{themeVariables:r}}){const{labelStyles:a,nodeStyles:s}=_t(t);t.labelStyle=a,t.useHtmlLabels||wi(Le())||(t.centerLabel=!0);const{shapeSvg:c,bbox:h,label:f}=await $t(e,t,Rt(t)),d=Math.max(h.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),p=Math.max(h.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),g=-d/2,x=-p/2,{cssStyles:m}=t,C=St.svg(c),k=Tt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=C.rectangle(g,x,d,p,k),T=c.insert(()=>v,":first-child");return T.attr("class","basic label-container outer-path"),f.attr("class","label noteLabel"),m&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",m),s&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",s),f.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}S(h_,"note");var cz=S((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function u_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const{shapeSvg:s,bbox:l}=await $t(e,t,Rt(t)),c=l.width+(t.padding??0),h=l.height+(t.padding??0),f=c+h,d=.5,p=[{x:f/2,y:0},{x:f,y:-f/2},{x:f/2,y:-f},{x:0,y:-f/2}];let g;const{cssStyles:x}=t;if(t.look==="handDrawn"){const m=St.svg(s),C=Tt(t,{}),k=cz(0,0,f),v=m.path(k,C);g=s.insert(()=>v,":first-child").attr("transform",`translate(${-f/2+d}, ${f/2})`),x&&g.attr("style",x)}else g=Ea(s,f,f,p),g.attr("transform",`translate(${-f/2+d}, ${f/2})`);return a&&g.attr("style",a),Et(t,g),t.calcIntersect=function(m,C){const k=m.width,v=[{x:k/2,y:0},{x:k,y:-k/2},{x:k/2,y:-k},{x:0,y:-k/2}],T=kt.polygon(m,v,C);return{x:T.x-.5,y:T.y-.5}},t.intersect=function(m){return this.calcIntersect(t,m)},s}S(u_,"question");async function f_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const s=t.padding??0,l=t.look==="neo"?21:s??0,c=t.look==="neo"?12:s??0,{shapeSvg:h,bbox:f,label:d}=await $t(e,t,Rt(t)),p=((t==null?void 0:t.width)??f.width)+(t.look==="neo"?l*2:l),g=((t==null?void 0:t.height)??f.height)+(t.look==="neo"?c*2:c),x=-p/2,m=-g/2,C=m/2,k=[{x:x+C,y:m},{x,y:0},{x:x+C,y:-m},{x:-x,y:-m},{x:-x,y:m}],{cssStyles:v}=t,T=St.svg(h),_=Tt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const E=Qt(k),R=T.path(E,_),F=h.insert(()=>R,":first-child");return F.attr("class","basic label-container outer-path"),v&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",v),a&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",a),F.attr("transform",`translate(${-C/2},0)`),d.attr("transform",`translate(${-C/2-f.width/2-(f.x-(f.left??0))}, ${-(f.height/2)-(f.y-(f.top??0))})`),Et(t,F),t.intersect=function(N){return kt.polygon(t,k,N)},h}S(f_,"rect_left_inv_arrow");async function d_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;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),f=t.description,d=t.label,p=await pn(h,d,t.labelStyle,!0,!0);let g={width:0,height:0};if(wi(re())){const I=p.children[0],at=Wt(p);g=I.getBoundingClientRect(),at.attr("width",g.width),at.attr("height",g.height)}gt.info("Text 2",f);const x=f||[],m=p.getBBox(),C=await pn(h,Array.isArray(x)?x.join("<br/>"):x,t.labelStyle,!0,!0),k=C.children[0],v=Wt(C);g=k.getBoundingClientRect(),v.attr("width",g.width),v.attr("height",g.height);const T=(t.padding||0)/2;Wt(C).attr("transform","translate( "+(g.width>m.width?0:(m.width-g.width)/2)+", "+(m.height+T+5)+")"),Wt(p).attr("transform","translate( "+(g.width<m.width?0:-(m.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),R=-g.width/2-T,F=-g.height/2-T;let N,H;if(t.look==="handDrawn"){const I=St.svg(l),at=Tt(t,{}),X=I.path(vn(R,F,_,E,t.rx||0),at),D=I.line(-g.width/2-T,-g.height/2-T+m.height+T,g.width/2+T,-g.height/2-T+m.height+T,at);H=l.insert(()=>(gt.debug("Rough node insert CXC",X),D),":first-child"),N=l.insert(()=>(gt.debug("Rough node insert CXC",X),X),":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+m.height+T).attr("y2",-g.height/2-T+m.height+T);return Et(t,N),t.intersect=function(I){return kt.rect(t,I)},l}S(d_,"rectWithTitle");async function p_(e,t,{config:{themeVariables:r}}){const a=(r==null?void 0:r.radius)??5,s={rx:a,ry:a,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return Ul(e,t,s)}S(p_,"roundedRect");var Un=8;async function g_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0,{shapeSvg:c,bbox:h,label:f}=await $t(e,t,Rt(t)),d=((t==null?void 0:t.width)??h.width)+s*2+(t.look==="neo"?Un:Un*2),p=((t==null?void 0:t.height)??h.height)+l*2,g=d-Un,x=p,m=Un-d/2,C=-p/2,{cssStyles:k}=t,v=St.svg(c),T=Tt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const _=[{x:m,y:C},{x:m+g,y:C},{x:m+g,y:C+x},{x:m-Un,y:C+x},{x:m-Un,y:C},{x:m,y:C},{x:m,y:C+x}],E=v.polygon(_.map(F=>[F.x,F.y]),T),R=c.insert(()=>E,":first-child");return R.attr("class","basic label-container outer-path").attr("style",Qe(k)),a&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",a),k&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",a),f.attr("transform",`translate(${Un/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),Et(t,R),t.intersect=function(F){return kt.rect(t,F)},c}S(g_,"shadedProcess");async function m_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;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==null?void 0:t.width)??0)-l*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-c*2,10));const{shapeSvg:h,bbox:f,label:d}=await $t(e,t,Rt(t)),p=(t!=null&&t.width?t==null?void 0:t.width:f.width)+l*2,g=((t!=null&&t.height?t==null?void 0:t.height:f.height)+c*2)*1.5,x=p,m=g/1.5,C=-x/2,k=-m/2,{cssStyles:v}=t,T=St.svg(h),_=Tt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const E=[{x:C,y:k},{x:C,y:k+m},{x:C+x,y:k+m},{x:C+x,y:k-m/2}],R=Qt(E),F=T.path(R,_),N=h.insert(()=>F,":first-child");return N.attr("class","basic label-container outer-path"),v&&t.look!=="handDrawn"&&N.selectChildren("path").attr("style",v),a&&t.look!=="handDrawn"&&N.selectChildren("path").attr("style",a),N.attr("transform",`translate(0, ${m/4})`),d.attr("transform",`translate(${-x/2+(t.padding??0)-(f.x-(f.left??0))}, ${-m/4+(t.padding??0)-(f.y-(f.top??0))})`),Et(t,N),t.intersect=function(H){return kt.polygon(t,E,H)},h}S(m_,"slopedRect");async function y_(e,t){const r=t.padding??0,a=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,l={rx:0,ry:0,labelPaddingX:t.labelPaddingX??a,labelPaddingY:s};return Ul(e,t,l)}S(y_,"squareRect");async function x_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const s=t.padding??0,l=t.look==="neo"?20:s,c=t.look==="neo"?12:s,{shapeSvg:h,bbox:f}=await $t(e,t,Rt(t)),d=f.height+(t.look==="neo"?c*2:c),p=f.width+d/4+(t.look==="neo"?l*2:l),g=d/2,{cssStyles:x}=t,m=St.svg(h),C=Tt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:-p/2+g,y:-d/2},{x:p/2-g,y:-d/2},...Sc(-p/2+g,0,g,50,90,270),{x:p/2-g,y:d/2},...Sc(p/2-g,0,g,50,270,450)],v=Qt(k),T=m.path(v,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}S(x_,"stadium");async function b_(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Ul(e,t,r)}S(b_,"state");function C_(e,t,{config:{themeVariables:r}}){var _,E;const{labelStyles:a,nodeStyles:s}=_t(t);t.labelStyle=a;const{cssStyles:l}=t,{lineColor:c,stateBorder:h,nodeBorder:f,nodeShadow:d}=r;(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 m=g.circle(0,0,t.width,{...x,stroke:c,strokeWidth:2}),C=h??f,k=(t.width??0)*5/14,v=g.circle(0,0,k,{...x,fill:C,stroke:C,strokeWidth:2,fillStyle:"solid"}),T=p.insert(()=>m,":first-child");if(T.insert(()=>v),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&&d&&t.look!=="handDrawn"){const R=((E=(_=e.node())==null?void 0:_.ownerSVGElement)==null?void 0:E.id)??"",F=R?`${R}-drop-shadow-small`:"drop-shadow-small";T.attr("style",`filter:url(#${F})`)}return Et(t,T),t.intersect=function(R){return kt.circle(t,(t.width??0)/2,R)},p}S(C_,"stateEnd");function k_(e,t,{config:{themeVariables:r}}){var h,f;const{lineColor:a,nodeShadow:s}=r;(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 p=St.svg(l).circle(0,0,t.width,x$(a));c=l.insert(()=>p),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 d=((f=(h=e.node())==null?void 0:h.ownerSVGElement)==null?void 0:f.id)??"",p=d?`${d}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${p})`)}return Et(t,c),t.intersect=function(d){return kt.circle(t,(t.width??7)/2,d)},l}S(k_,"stateStart");var al=8;async function v_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,l=t.look==="neo"?28:s,c=t.look==="neo"?12:s,{shapeSvg:h,bbox:f}=await $t(e,t,Rt(t)),d=((t==null?void 0:t.width)??f.width)+2*al+l,p=((t==null?void 0:t.height)??f.height)+c,g=d-2*al,x=p,m=-d/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 v=St.svg(h),T=Tt(t,{}),_=v.rectangle(m,C,g+16,x,T),E=v.line(m+al,C,m+al,C+x,T),R=v.line(m+al+g,C,m+al+g,C+x,T);h.insert(()=>E,":first-child"),h.insert(()=>R,":first-child");const F=h.insert(()=>_,":first-child"),{cssStyles:N}=t;F.attr("class","basic label-container").attr("style",Qe(N)),Et(t,F)}else{const v=Ea(h,g,x,k);a&&v.attr("style",a),Et(t,v)}return t.intersect=function(v){return kt.polygon(t,k,v)},h}S(v_,"subroutine");var Cg=.2;async function S_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;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==null?void 0:t.height)??0)-c*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-l*2-Cg*(t.height+c*2),10));const{shapeSvg:h,bbox:f}=await $t(e,t,Rt(t)),d=(t!=null&&t.height?t==null?void 0:t.height:f.height)+c*2,p=Cg*d,g=Cg*d,m=(t!=null&&t.width?t==null?void 0:t.width:f.width)+l*2+p-p,C=d,k=-m/2,v=-C/2,{cssStyles:T}=t,_=St.svg(h),E=Tt(t,{}),R=[{x:k-p/2,y:v},{x:k+m+p/2,y:v},{x:k+m+p/2,y:v+C},{x:k-p/2,y:v+C}],F=[{x:k+m-p/2,y:v+C},{x:k+m+p/2,y:v+C},{x:k+m+p/2,y:v+C-g}];t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const N=Qt(R),H=_.path(N,E),I=Qt(F),at=_.path(I,{...E,fillStyle:"solid"}),X=h.insert(()=>at,":first-child");return X.insert(()=>H,":first-child"),X.attr("class","basic label-container outer-path"),T&&t.look!=="handDrawn"&&X.selectAll("path").attr("style",T),a&&t.look!=="handDrawn"&&X.selectAll("path").attr("style",a),Et(t,X),t.intersect=function(D){return kt.polygon(t,R,D)},h}S(S_,"taggedRect");async function T_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const{shapeSvg:s,bbox:l,label:c}=await $t(e,t,Rt(t)),h=Math.max(l.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),f=Math.max(l.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),d=f/8,p=.2*h,g=.2*f,x=f+d,{cssStyles:m}=t,C=St.svg(s),k=Tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=[{x:-h/2-h/2*.1,y:x/2},...kn(-h/2-h/2*.1,x/2,h/2+h/2*.1,x/2,d,.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:(_+f)*1.3},{x:T+h,y:_+f-g},{x:T+h,y:(_+f)*.9},...kn(T+h,(_+f)*1.25,T+h-p,(_+f)*1.3,-f*.02,.5)],R=Qt(v),F=C.path(R,k),N=Qt(E),H=C.path(N,{...k,fillStyle:"solid"}),I=s.insert(()=>H,":first-child");return I.insert(()=>F,":first-child"),I.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",m),a&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",a),I.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)-(l.x-(l.left??0))},${-f/2+(t.padding??0)-d/2-(l.y-(l.top??0))})`),Et(t,I),t.intersect=function(at){return kt.polygon(t,v,at)},s}S(T_,"taggedWaveEdgedRectangle");async function w_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const{shapeSvg:s,bbox:l}=await $t(e,t,Rt(t)),c=Math.max(l.width+(t.padding??0),(t==null?void 0:t.width)||0),h=Math.max(l.height+(t.padding??0),(t==null?void 0:t.height)||0),f=-c/2,d=-h/2,p=s.insert("rect",":first-child");return p.attr("class","text").attr("style",a).attr("rx",0).attr("ry",0).attr("x",f).attr("y",d).attr("width",c).attr("height",h),Et(t,p),t.intersect=function(g){return kt.rect(t,g)},s}S(w_,"text");var hz=S((e,t,r,a,s,l)=>`M${e},${t}
363
+ a${s},${l} 0,0,1 0,${-a}
364
+ l${r},0
365
+ a${s},${l} 0,0,1 0,${a}
366
+ M${r},${-a}
367
+ a${s},${l} 0,0,0 0,${a}
368
+ l${-r},0`,"createCylinderPathD"),uz=S((e,t,r,a,s,l)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${l} 0,0,0 0,${-a}`,`l${-r},0`,`a${s},${l} 0,0,0 0,${a}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),fz=S((e,t,r,a,s,l)=>[`M${e+r/2},${-a/2}`,`a${s},${l} 0,0,0 0,${a}`].join(" "),"createInnerCylinderPathD"),A2=5,M2=10;async function __(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;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<A2&&(t.height=A2);const T=k/2/(2.5+k/50);t.width=(t.width??0)-l-T*3,t.width<M2&&(t.width=M2)}const{shapeSvg:c,bbox:h,label:f}=await $t(e,t,Rt(t)),d=(t.height?t.height:h.height)+l,p=d/2,g=p/(2.5+d/50),x=(t.width?t.width:h.width)+g+l,{cssStyles:m}=t;let C;if(t.look==="handDrawn"){const k=St.svg(c),v=uz(0,0,x,d,g,p),T=fz(0,0,x,d,g,p),_=k.path(v,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"),m&&C.attr("style",m)}else{const k=hz(0,0,x,d,g,p);C=c.insert("path",":first-child").attr("d",k).attr("class","basic label-container").attr("style",Qe(m)).attr("style",a),C.attr("class","basic label-container outer-path"),m&&C.selectAll("path").attr("style",m),a&&C.selectAll("path").attr("style",a)}return C.attr("label-offset-x",g),C.attr("transform",`translate(${-x/2}, ${d/2} )`),f.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 v=kt.rect(t,k),T=v.y-(t.y??0);if(p!=0&&(Math.abs(T)<(t.height??0)/2||Math.abs(T)==(t.height??0)/2&&Math.abs(v.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&&(_=-_),v.x+=_}return v},c}S(__,"tiltedCylinder");async function B_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const s=t.padding??0,l=(t.look==="neo",s),c=t.look==="neo"?s*2:s,{shapeSvg:h,bbox:f}=await $t(e,t,Rt(t)),d=((t==null?void 0:t.height)??f.height)+l,p=((t==null?void 0:t.width)??f.width)+c,g=[{x:-3*d/6,y:0},{x:p+3*d/6,y:0},{x:p,y:-d},{x:0,y:-d}];let x;const{cssStyles:m}=t;if(t.look==="handDrawn"){const C=St.svg(h),k=Tt(t,{}),v=Qt(g),T=C.path(v,k);x=h.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${d/2})`),m&&x.attr("style",m)}else x=Ea(h,p,d,g);return a&&x.attr("style",a),t.width=p,t.height=d,Et(t,x),t.intersect=function(C){return kt.polygon(t,g,C)},h}S(B_,"trapezoid");async function E_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s,h=15,f=5;(t.width||t.height)&&(t.height=(t.height??0)-c*2,t.height<f&&(t.height=f),t.width=(t.width??0)-l*2,t.width<h&&(t.width=h));const{shapeSvg:d,bbox:p}=await $t(e,t,Rt(t)),g=(t!=null&&t.width?t==null?void 0:t.width:p.width)+l*2,x=(t!=null&&t.height?t==null?void 0:t.height:p.height)+c*2,{cssStyles:m}=t,C=St.svg(d),k=Tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=[{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=Qt(v),_=C.path(T,k),E=d.insert(()=>_,":first-child");return E.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",m),a&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",a),Et(t,E),t.intersect=function(R){return kt.polygon(t,v,R)},d}S(E_,"trapezoidalPentagon");var R2=10,F2=10;async function L_(e,t){var R;const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const s=t.padding??0,l=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-l)/2,t.width<F2&&(t.width=F2),t.height=(t==null?void 0:t.height)??0,t.height<R2&&(t.height=R2));const{shapeSvg:c,bbox:h,label:f}=await $t(e,t,Rt(t)),d=_a((R=re().flowchart)==null?void 0:R.htmlLabels),p=(t!=null&&t.width?t==null?void 0:t.width:h.width)+l,g=t!=null&&t.height?t==null?void 0:t.height:p+h.height,x=g,m=[{x:0,y:0},{x,y:0},{x:x/2,y:-g}],{cssStyles:C}=t,k=St.svg(c),v=Tt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const T=Qt(m),_=k.path(T,v),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),f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${g/2-(h.height+(t.padding??0)/(d?2:1)-(h.y-(h.top??0)))})`),t.intersect=function(F){return gt.info("Triangle intersect",t,m,F),kt.polygon(t,m,F)},c}S(L_,"triangle");async function A_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;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==null?void 0:t.width)??0)-l*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-c*2,t.height<10&&(t.height=10));const{shapeSvg:f,bbox:d,label:p}=await $t(e,t,Rt(t)),g=(t!=null&&t.width?t==null?void 0:t.width:d.width)+(l??0)*2,x=(t!=null&&t.height?t==null?void 0:t.height:d.height)+(c??0)*2,m=t.look==="neo"?x/4:x/8,C=x+(h?m:-m),{cssStyles:k}=t,T=14-g,_=T>0?T/2:0,E=St.svg(f),R=Tt(t,{});t.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");const F=[{x:-g/2-_,y:C/2},...kn(-g/2-_,C/2,g/2+_,C/2,m,.8),{x:g/2+_,y:-C/2},{x:-g/2-_,y:-C/2}],N=Qt(F),H=E.path(N,R),I=f.insert(()=>H,":first-child");return I.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",k),a&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",a),I.attr("transform",`translate(0,${-m/2})`),p.attr("transform",`translate(${-g/2+(t.padding??0)-(d.x-(d.left??0))},${-x/2+(t.padding??0)-m-(d.y-(d.top??0))})`),Et(t,I),t.intersect=function(at){return kt.polygon(t,F,at)},f}S(A_,"waveEdgedRectangle");async function M_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;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==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const R=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-c-R*(20/9)),t.width=t.width-l*2}const{shapeSvg:h,bbox:f}=await $t(e,t,Rt(t)),d=(t!=null&&t.width?t==null?void 0:t.width:f.width)+l*2,p=(t!=null&&t.height?t==null?void 0:t.height:f.height)+c,g=p/8,x=p+g*2,{cssStyles:m}=t,C=St.svg(h),k=Tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=[{x:-d/2,y:x/2},...kn(-d/2,x/2,d/2,x/2,g,1),{x:d/2,y:-x/2},...kn(d/2,-x/2,-d/2,-x/2,g,-1)],T=Qt(v),_=C.path(T,k),E=h.insert(()=>_,":first-child");return E.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",m),a&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",a),Et(t,E),t.intersect=function(R){return kt.polygon(t,v,R)},h}S(M_,"waveRectangle");var Re=10;async function R_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;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==null?void 0:t.width)??0)-s*2-Re,10),t.height=Math.max(((t==null?void 0:t.height)??0)-l*2-Re,10));const{shapeSvg:c,bbox:h,label:f}=await $t(e,t,Rt(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+s*2+Re,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+l*2+Re,g=d-Re,x=p-Re,m=-g/2,C=-x/2,{cssStyles:k}=t,v=St.svg(c),T=Tt(t,{}),_=[{x:m-Re,y:C-Re},{x:m-Re,y:C+x},{x:m+g,y:C+x},{x:m+g,y:C-Re}],E=`M${m-Re},${C-Re} L${m+g},${C-Re} L${m+g},${C+x} L${m-Re},${C+x} L${m-Re},${C-Re}
369
+ M${m-Re},${C} L${m+g},${C}
370
+ M${m},${C-Re} L${m},${C+x}`;t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const R=v.path(E,T),F=c.insert(()=>R,":first-child");return F.attr("transform",`translate(${Re/2}, ${Re/2})`),F.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",k),a&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",a),f.attr("transform",`translate(${-(h.width/2)+Re/2-(h.x-(h.left??0))}, ${-(h.height/2)+Re/2-(h.y-(h.top??0))})`),Et(t,F),t.intersect=function(N){return kt.polygon(t,_,N)},c}S(R_,"windowPane");var O2=new Set(["redux-color","redux-dark-color"]),dz=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Xy(e,t){var xt,Ft,Dt,pt;const r=t;r.alias&&(t.label=r.alias);const{theme:a,themeVariables:s}=Le(),{rowEven:l,rowOdd:c,nodeBorder:h,borderColorArray:f}=s;if(t.look==="handDrawn"){const{themeVariables:mt}=Le(),{background:Ct}=mt,Ht={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Ct}`]};await Xy(e,Ht)}const d=Le();t.useHtmlLabels=d.htmlLabels;let p=((xt=d.er)==null?void 0:xt.diagramPadding)??10,g=((Ft=d.er)==null?void 0:Ft.entityPadding)??6;const{cssStyles:x}=t,{labelStyles:m,nodeStyles:C}=_t(t);if(r.attributes.length===0&&t.label){const mt={rx:0,ry:0,labelPaddingX:p,labelPaddingY:p*1.5};wa(t.label,d)+mt.labelPaddingX*2<d.er.minEntityWidth&&(t.width=d.er.minEntityWidth);const Ct=await Ul(e,t,mt);if(a!=null&&O2.has(a)){const Ht=r.colorIndex??0;Ct.attr("data-color-id",`color-${Ht%f.length}`)}if(!_a(d.htmlLabels)){const Ht=Ct.select("text"),he=(Dt=Ht.node())==null?void 0:Dt.getBBox();Ht.attr("transform",`translate(${-he.width/2}, 0)`)}return Ct}d.htmlLabels||(p*=1.25,g*=1.25);let k=Rt(t);k||(k="node default");const v=e.insert("g").attr("class",k).attr("id",t.domId||t.id),T=await ll(v,t.label??"",d,0,0,["name"],m);T.height+=g;let _=0;const E=[],R=[];let F=0,N=0,H=0,I=0,at=!0,X=!0;for(const mt of r.attributes){const Ct=await ll(v,mt.type,d,0,_,["attribute-type"],m);F=Math.max(F,Ct.width+p);const Ht=await ll(v,mt.name,d,0,_,["attribute-name"],m);N=Math.max(N,Ht.width+p);const he=await ll(v,mt.keys.join(),d,0,_,["attribute-keys"],m);H=Math.max(H,he.width+p);const Oe=await ll(v,mt.comment,d,0,_,["attribute-comment"],m);I=Math.max(I,Oe.width+p);const ne=Math.max(Ct.height,Ht.height,he.height,Oe.height)+g;R.push({yOffset:_,rowHeight:ne}),_+=ne}let D=4;H<=p&&(at=!1,H=0,D--),I<=p&&(X=!1,I=0,D--);const V=v.node().getBBox();if(T.width+p*2-(F+N+H+I)>0){const mt=T.width+p*2-(F+N+H+I);F+=mt/D,N+=mt/D,H>0&&(H+=mt/D),I>0&&(I+=mt/D)}const J=F+N+H+I,Y=St.svg(v),j=Tt(t,{});t.look!=="handDrawn"&&(j.roughness=0,j.fillStyle="solid");let A=0;R.length>0&&(A=R.reduce((mt,Ct)=>mt+((Ct==null?void 0:Ct.rowHeight)??0),0));const z=Math.max(V.width+p*2,(t==null?void 0:t.width)||0,J),O=Math.max((A??0)+T.height,(t==null?void 0:t.height)||0),M=-z/2,Q=-O/2;if(v.selectAll("g:not(:first-child)").each((mt,Ct,Ht)=>{const he=Wt(Ht[Ct]),Oe=he.attr("transform");let ne=0,Ce=0;if(Oe){const Te=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Oe);Te&&(ne=parseFloat(Te[1]),Ce=parseFloat(Te[2]),he.attr("class").includes("attribute-name")?ne+=F:he.attr("class").includes("attribute-keys")?ne+=F+N:he.attr("class").includes("attribute-comment")&&(ne+=F+N+H))}he.attr("transform",`translate(${M+p/2+ne}, ${Ce+Q+T.height+g/2})`)}),v.select(".name").attr("transform","translate("+-T.width/2+", "+(Q+g/2)+")"),a!=null&&O2.has(a)){const mt=r.colorIndex??0;v.attr("data-color-id",`color-${mt%f.length}`)}const $=Y.rectangle(M,Q,z,O,j),tt=v.insert(()=>$,":first-child").attr("class","outer-path").attr("style",x.join(""));E.push(0);for(const[mt,Ct]of R.entries()){const he=(mt+1)%2===0&&Ct.yOffset!==0,Oe=Y.rectangle(M,T.height+Q+(Ct==null?void 0:Ct.yOffset),z,Ct==null?void 0:Ct.rowHeight,{...j,fill:he?l:c,stroke:h});v.insert(()=>Oe,"g.label").attr("style",x.join("")).attr("class",`row-rect-${he?"even":"odd"}`)}const ct=1e-4;let ht=ol(M,T.height+Q,z+M,T.height+Q,ct),yt=Y.polygon(ht.map(mt=>[mt.x,mt.y]),j);if(v.insert(()=>yt).attr("class","divider"),ht=ol(F+M,T.height+Q,F+M,O+Q,ct),yt=Y.polygon(ht.map(mt=>[mt.x,mt.y]),j),v.insert(()=>yt).attr("class","divider"),at){const mt=F+N+M;ht=ol(mt,T.height+Q,mt,O+Q,ct),yt=Y.polygon(ht.map(Ct=>[Ct.x,Ct.y]),j),v.insert(()=>yt).attr("class","divider")}if(X){const mt=F+N+H+M;ht=ol(mt,T.height+Q,mt,O+Q,ct),yt=Y.polygon(ht.map(Ct=>[Ct.x,Ct.y]),j),v.insert(()=>yt).attr("class","divider")}for(const mt of E){const Ct=T.height+Q+mt;ht=ol(M,Ct,z+M,Ct,ct),yt=Y.polygon(ht.map(Ht=>[Ht.x,Ht.y]),j),v.insert(()=>yt).attr("class","divider")}if(Et(t,tt),C&&t.look!=="handDrawn")if(a!=null&&dz.has(a))v.selectAll("path").attr("style",C);else{const mt=C.split(";"),Ct=(pt=mt==null?void 0:mt.filter(Ht=>Ht.includes("stroke")))==null?void 0:pt.map(Ht=>`${Ht}`).join("; ");v.selectAll("path").attr("style",Ct??""),v.selectAll(".row-rect-even path").attr("style",C)}return t.intersect=function(mt){return kt.rect(t,mt)},v}S(Xy,"erBox");async function ll(e,t,r,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!==T1(t)&&(t=T1(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const f=h.node().appendChild(await Ba(h,t,{width:wa(t,r)+100,style:c,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let p=f.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 d=f.getBBox();if(_a(r.htmlLabels)){const p=f.children[0];p.style.textAlign="start";const g=Wt(f);d=p.getBoundingClientRect(),g.attr("width",d.width),g.attr("height",d.height)}return d}S(ll,"addText");function ol(e,t,r,a,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:a},{x:r-s/2,y:a}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:a+s/2},{x:r,y:a-s/2}]}S(ol,"lineToPolygon");async function F_(e,t,r,a,s=r.class.padding??12){const l=a?0:3,c=e.insert("g").attr("class",Rt(t)).attr("id",t.domId||t.id);let h=null,f=null,d=null,p=null,g=0,x=0,m=0;if(h=c.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const _=t.annotations[0];await nc(h,{text:`«${_}»`},0),g=h.node().getBBox().height}f=c.insert("g").attr("class","label-group text"),await nc(f,t,0,["font-weight: bolder"]);const C=f.node().getBBox();x=C.height,d=c.insert("g").attr("class","members-group text");let k=0;for(const _ of t.members){const E=await nc(d,_,k,[_.parseClassifier()]);k+=E+l}m=d.node().getBBox().height,m<=0&&(m=s/2),p=c.insert("g").attr("class","methods-group text");let v=0;for(const _ of t.methods){const E=await nc(p,_,v,[_.parseClassifier()]);v+=E+l}let T=c.node().getBBox();if(h!==null){const _=h.node().getBBox();h.attr("transform",`translate(${-_.width/2})`)}return f.attr("transform",`translate(${-C.width/2}, ${g})`),T=c.node().getBBox(),d.attr("transform",`translate(0, ${g+x+s*2})`),T=c.node().getBBox(),p.attr("transform",`translate(0, ${g+x+(m?m+s*4:s*2)})`),T=c.node().getBBox(),{shapeSvg:c,bbox:T}}S(F_,"textHelper");async function nc(e,t,r,a=[]){const s=e.insert("g").attr("class","label").attr("style",a.join("; ")),l=Le();let c="useHtmlLabels"in t?t.useHtmlLabels:_a(l.htmlLabels)??!0,h="";"text"in t?h=t.text:h=t.label,!c&&h.startsWith("\\")&&(h=h.substring(1)),pc(h)&&(c=!0);const f=await Ba(s,ry(as(h)),{width:wa(h,l)+50,classes:"markdown-node-label",useHtmlLabels:c},l);let d,p=1;if(c){const g=f.children[0],x=Wt(f);p=g.innerHTML.split("<br>").length,g.innerHTML.includes("</math>")&&(p+=g.innerHTML.split("<mrow>").length-1);const m=g.getElementsByTagName("img");if(m){const C=h.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(k=>new Promise(v=>{function T(){var _;if(k.style.display="flex",k.style.flexDirection="column",C){const E=((_=l.fontSize)==null?void 0:_.toString())??window.getComputedStyle(document.body).fontSize,F=parseInt(E,10)*5+"px";k.style.minWidth=F,k.style.maxWidth=F}else k.style.width="100%";v(k)}S(T,"setupImage"),setTimeout(()=>{k.complete&&T()}),k.addEventListener("error",T),k.addEventListener("load",T)})))}d=g.getBoundingClientRect(),x.attr("width",d.width),x.attr("height",d.height)}else{a.includes("font-weight: bolder")&&Wt(f).selectAll("tspan").attr("font-weight",""),p=f.children.length;const g=f.children[0];(f.textContent===""||f.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=""),d=f.getBBox()}return s.attr("transform","translate(0,"+(-d.height/(2*p)+r)+")"),d.height}S(nc,"addText");async function O_(e,t){var Y,j;const r=re(),{themeVariables:a}=r,{useGradient:s}=a,l=r.class.padding??12,c=l,h=t.useHtmlLabels??_a(r.htmlLabels)??!0,f=t;f.annotations=f.annotations??[],f.members=f.members??[],f.methods=f.methods??[];const{shapeSvg:d,bbox:p}=await F_(e,t,r,h,c),{labelStyles:g,nodeStyles:x}=_t(t);t.labelStyle=g,t.cssStyles=f.styles||"";const m=((Y=f.styles)==null?void 0:Y.join(";"))||x||"";t.cssStyles||(t.cssStyles=m.replaceAll("!important","").split(";"));const C=f.members.length===0&&f.methods.length===0&&!((j=r.class)!=null&&j.hideEmptyMembersBox),k=St.svg(d),v=Tt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.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;f.members.length===0&&f.methods.length===0?_+=c:f.members.length>0&&f.methods.length===0&&(_+=c*2);const R=-T/2,F=-_/2;let N=C?l*2:f.members.length===0&&f.methods.length===0?-l:0;E&&(N=l*2);const H=k.rectangle(R-l,F-l-(C?l:f.members.length===0&&f.methods.length===0?-l/2:0),T+2*l,_+2*l+N,v),I=d.insert(()=>H,":first-child");I.attr("class","basic label-container outer-path");const at=I.node().getBBox(),X=d.select(".annotation-group").node().getBBox().height-(C?l/2:0)||0,D=d.select(".label-group").node().getBBox().height-(C?l/2:0)||0,V=d.select(".members-group").node().getBBox().height-(C?l/2:0)||0,J=(X+D+F+l-(F-l-(C?l:f.members.length===0&&f.methods.length===0?-l/2:0)))/2;if(d.selectAll(".text").each((A,z,O)=>{var ht,yt;const M=Wt(O[z]),Q=M.attr("transform");let $=0;if(Q){const Ft=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Q);Ft&&($=parseFloat(Ft[2]))}let tt=$+F+l-(C?l:f.members.length===0&&f.methods.length===0?-l/2:0);if(M.attr("class").includes("methods-group")){const xt=Math.max(V,c/2);E?tt=Math.max(J,X+D+xt+F+c*2+l)+c*2:tt=X+D+xt+F+c*4+l}f.members.length===0&&f.methods.length===0&&((ht=r.class)!=null&&ht.hideEmptyMembersBox)&&(f.annotations.length>0?tt=$-c:tt=$),h||(tt-=4);let ct=R;(M.attr("class").includes("label-group")||M.attr("class").includes("annotation-group"))&&(ct=-((yt=M.node())==null?void 0:yt.getBBox().width)/2||0,d.selectAll("text").each(function(xt,Ft,Dt){window.getComputedStyle(Dt[Ft]).textAnchor==="middle"&&(ct=0)})),M.attr("transform",`translate(${ct}, ${tt})`)}),f.members.length>0||f.methods.length>0||C){const A=X+D+F+l,z=k.line(at.x,A,at.x+at.width,A+.001,v);d.insert(()=>z).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",m)}if(C||f.members.length>0||f.methods.length>0){const A=X+D+V+F+c*2+l,z=k.line(at.x,E?Math.max(J,A):A,at.x+at.width,(E?Math.max(J,A):A)+.001,v);d.insert(()=>z).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",m)}if(f.look!=="handDrawn"&&d.selectAll("path").attr("style",m),I.select(":nth-child(2)").attr("style",m),d.selectAll(".divider").select("path").attr("style",m),t.labelStyle?d.selectAll("span").attr("style",t.labelStyle):d.selectAll("span").attr("style",m),!h){const A=RegExp(/color\s*:\s*([^;]*)/),z=A.exec(m);if(z){const O=z[0].replace("color","fill");d.selectAll("tspan").attr("style",O)}else if(g){const O=A.exec(g);if(O){const M=O[0].replace("color","fill");d.selectAll("tspan").attr("style",M)}}}return Et(t,I),t.intersect=function(A){return kt.rect(t,A)},d}S(O_,"classBox");async function D_(e,t){var at,X;const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const s=t,l=t,c=20,h=20,f="verifyMethod"in t,d=Rt(t),{themeVariables:p}=re(),{borderColorArray:g,requirementEdgeLabelBackground:x}=p,m=e.insert("g").attr("class",d).attr("id",t.domId??t.id);let C;f?C=await Ur(m,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):C=await Ur(m,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let k=C;const v=await Ur(m,s.name,k,t.labelStyle+"; font-weight: bold;");if(k+=v+h,f){const D=await Ur(m,`${s.requirementId?`ID: ${s.requirementId}`:""}`,k,t.labelStyle);k+=D;const V=await Ur(m,`${s.text?`Text: ${s.text}`:""}`,k,t.labelStyle);k+=V;const J=await Ur(m,`${s.risk?`Risk: ${s.risk}`:""}`,k,t.labelStyle);k+=J,await Ur(m,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,k,t.labelStyle)}else{const D=await Ur(m,`${l.type?`Type: ${l.type}`:""}`,k,t.labelStyle);k+=D,await Ur(m,`${l.docRef?`Doc Ref: ${l.docRef}`:""}`,k,t.labelStyle)}const T=(((at=m.node())==null?void 0:at.getBBox().width)??200)+c,_=(((X=m.node())==null?void 0:X.getBBox().height)??200)+c,E=-T/2,R=-_/2,F=St.svg(m),N=Tt(t,{});t.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const H=F.rectangle(E,R,T,_,N),I=m.insert(()=>H,":first-child");if(I.attr("class","basic label-container outer-path").attr("style",a),g!=null&&g.length){const D=t.colorIndex??0;m.attr("data-color-id",`color-${D%g.length}`)}if(m.selectAll(".label").each((D,V,J)=>{const Y=Wt(J[V]),j=Y.attr("transform");let A=0,z=0;if(j){const $=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(j);$&&(A=parseFloat($[1]),z=parseFloat($[2]))}const O=z-_/2;let M=E+c/2;(V===0||V===1)&&(M=A),Y.attr("transform",`translate(${M}, ${O+c})`)}),k>C+v+h){const D=R+C+v+h;let V;if(t.look==="neo"){const j=[[E,D],[E+T,D],[E+T,D+.001],[E,D+.001]];V=F.polygon(j,N)}else V=F.line(E,D,E+T,D,N);m.insert(()=>V).attr("class","divider")}return Et(t,I),t.intersect=function(D){return kt.rect(t,D)},a&&t.look!=="handDrawn"&&(x||g!=null&&g.length)&&m.selectAll("path").attr("style",a),m}S(D_,"requirementBox");async function Ur(e,t,r,a=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",a),l=re(),c=l.htmlLabels??!0,h=await Ba(s,ry(as(t)),{width:wa(t,l)+50,classes:"markdown-node-label",useHtmlLabels:c,style:a},l);let f;if(c){const d=h.children[0],p=Wt(h);f=d.getBoundingClientRect(),p.attr("width",f.width),p.attr("height",f.height)}else{const d=h.children[0];for(const p of d.children)a&&p.setAttribute("style",a);f=h.getBBox(),f.height+=6}return s.attr("transform",`translate(${-f.width/2},${-f.height/2+r})`),f.height}S(Ur,"addText");var pz=S(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 $_(e,t,{config:r}){var V,J;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:f,label:d}=await $t(e,t,Rt(t)),p=t.padding||10;let g="",x;"ticket"in t&&t.ticket&&((V=r==null?void 0:r.kanban)!=null&&V.ticketBaseUrl)&&(g=(J=r==null?void 0:r.kanban)==null?void 0:J.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 m={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 bg(x,"ticket"in t&&t.ticket||"",m):{label:C,bbox:k}=await bg(h,"ticket"in t&&t.ticket||"",m);const{label:v,bbox:T}=await bg(h,"assigned"in t&&t.assigned||"",m);t.width=c;const _=10,E=(t==null?void 0:t.width)||0,R=Math.max(k.height,T.height)/2,F=Math.max(f.height+_*2,(t==null?void 0:t.height)||0)+R,N=-E/2,H=-F/2;d.attr("transform","translate("+(p-E/2)+", "+(-R-f.height/2)+")"),C.attr("transform","translate("+(p-E/2)+", "+(-R+f.height/2)+")"),v.attr("transform","translate("+(p+E/2-T.width-2*l)+", "+(-R+f.height/2)+")");let I;const{rx:at,ry:X}=t,{cssStyles:D}=t;if(t.look==="handDrawn"){const Y=St.svg(h),j=Tt(t,{}),A=at||X?Y.path(vn(N,H,E,F,at||0),j):Y.rectangle(N,H,E,F,j);I=h.insert(()=>A,":first-child"),I.attr("class","basic label-container").attr("style",D||null)}else{I=h.insert("rect",":first-child"),I.attr("class","basic label-container __APA__").attr("style",s).attr("rx",at??5).attr("ry",X??5).attr("x",N).attr("y",H).attr("width",E).attr("height",F);const Y="priority"in t&&t.priority;if(Y){const j=h.append("line"),A=N+2,z=H+Math.floor((at??0)/2),O=H+F-Math.floor((at??0)/2);j.attr("x1",A).attr("y1",z).attr("x2",A).attr("y2",O).attr("stroke-width","4").attr("stroke",pz(Y))}}return Et(t,I),t.height=F,t.intersect=function(Y){return kt.rect(t,Y)},h}S($_,"kanbanItem");async function z_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const{shapeSvg:s,bbox:l,halfPadding:c,label:h}=await $t(e,t,Rt(t)),f=l.width+10*c,d=l.height+8*c,p=.15*f,{cssStyles:g}=t,x=l.width+20,m=l.height+20,C=Math.max(f,x),k=Math.max(d,m);h.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`);let v;const T=`M0 0
371
+ a${p},${p} 1 0,0 ${C*.25},${-1*k*.1}
372
+ a${p},${p} 1 0,0 ${C*.25},0
373
+ a${p},${p} 1 0,0 ${C*.25},0
374
+ a${p},${p} 1 0,0 ${C*.25},${k*.1}
375
+
376
+ a${p},${p} 1 0,0 ${C*.15},${k*.33}
377
+ a${p*.8},${p*.8} 1 0,0 0,${k*.34}
378
+ a${p},${p} 1 0,0 ${-1*C*.15},${k*.33}
379
+
380
+ a${p},${p} 1 0,0 ${-1*C*.25},${k*.15}
381
+ a${p},${p} 1 0,0 ${-1*C*.25},0
382
+ a${p},${p} 1 0,0 ${-1*C*.25},0
383
+ a${p},${p} 1 0,0 ${-1*C*.25},${-1*k*.15}
384
+
385
+ a${p},${p} 1 0,0 ${-1*C*.1},${-1*k*.33}
386
+ a${p*.8},${p*.8} 1 0,0 0,${-1*k*.34}
387
+ a${p},${p} 1 0,0 ${C*.1},${-1*k*.33}
388
+ H0 V0 Z`;if(t.look==="handDrawn"){const _=St.svg(s),E=Tt(t,{}),R=_.path(T,E);v=s.insert(()=>R,":first-child"),v.attr("class","basic label-container").attr("style",Qe(g))}else v=s.insert("path",":first-child").attr("class","basic label-container").attr("style",a).attr("d",T);return v.attr("transform",`translate(${-C/2}, ${-k/2})`),Et(t,v),t.calcIntersect=function(_,E){return kt.rect(_,E)},t.intersect=function(_){return gt.info("Bang intersect",t,_),kt.rect(t,_)},s}S(z_,"bang");async function N_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const{shapeSvg:s,bbox:l,halfPadding:c,label:h}=await $t(e,t,Rt(t)),f=l.width+2*c,d=l.height+2*c,p=.15*f,g=.25*f,x=.35*f,m=.2*f,{cssStyles:C}=t;let k;const v=`M0 0
389
+ a${p},${p} 0 0,1 ${f*.25},${-1*f*.1}
390
+ a${x},${x} 1 0,1 ${f*.4},${-1*f*.1}
391
+ a${g},${g} 1 0,1 ${f*.35},${f*.2}
392
+
393
+ a${p},${p} 1 0,1 ${f*.15},${d*.35}
394
+ a${m},${m} 1 0,1 ${-1*f*.15},${d*.65}
395
+
396
+ a${g},${p} 1 0,1 ${-1*f*.25},${f*.15}
397
+ a${x},${x} 1 0,1 ${-1*f*.5},0
398
+ a${p},${p} 1 0,1 ${-1*f*.25},${-1*f*.15}
399
+
400
+ a${p},${p} 1 0,1 ${-1*f*.1},${-1*d*.35}
401
+ a${m},${m} 1 0,1 ${f*.1},${-1*d*.65}
402
+ H0 V0 Z`;if(t.look==="handDrawn"){const T=St.svg(s),_=Tt(t,{}),E=T.path(v,_);k=s.insert(()=>E,":first-child"),k.attr("class","basic label-container").attr("style",Qe(C))}else k=s.insert("path",":first-child").attr("class","basic label-container").attr("style",a).attr("d",v);return h.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`),k.attr("transform",`translate(${-f/2}, ${-d/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}S(N_,"cloud");async function q_(e,t){const{labelStyles:r,nodeStyles:a}=_t(t);t.labelStyle=r;const{shapeSvg:s,bbox:l,halfPadding:c,label:h}=await $t(e,t,Rt(t)),f=l.width+8*c,d=l.height+2*c,p=5,g=t.look==="neo"?`
403
+ M${-f/2} ${d/2-p}
404
+ v${-d+2*p}
405
+ q0,-${p} ${p},-${p}
406
+ h${f-2*p}
407
+ q${p},0 ${p},${p}
408
+ v${d-p}
409
+ H${-f/2}
410
+ Z
411
+ `:`
412
+ M${-f/2} ${d/2-p}
413
+ v${-d+2*p}
414
+ q0,-${p} ${p},-${p}
415
+ h${f-2*p}
416
+ q${p},0 ${p},${p}
417
+ v${d-2*p}
418
+ q0,${p} ${-p},${p}
419
+ h${-(f-2*p)}
420
+ q${-p},0 ${-p},${-p}
421
+ Z
422
+ `;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",-f/2).attr("y1",d/2).attr("x2",f/2).attr("y2",d/2),h.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`),s.append(()=>h.node()),Et(t,x),t.calcIntersect=function(m,C){return kt.rect(m,C)},t.intersect=function(m){return kt.rect(t,m)},s}S(q_,"defaultMindmapNode");async function I_(e,t){const r={padding:t.padding??0};return Gy(e,t,r)}S(I_,"mindmapCircle");var gz=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:y_},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:p_},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:x_},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:v_},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Iw},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Hw},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Gy},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:z_},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:N_},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:u_},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Xw},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:a_},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:r_},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:B_},{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:e_},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:jw},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:w_},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Rw},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:g_},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:k_},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:C_},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Yw},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Vw},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:$w},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:zw},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Nw},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:n_},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:A_},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Gw},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:__},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:s_},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:qw},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Uw},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:L_},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:R_},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Pw},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:E_},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Ww},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:m_},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:c_},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:o_},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Mw},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Dw},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:T_},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:S_},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:M_},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:f_},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:l_}],mz=S(()=>{const t=[...Object.entries({state:b_,choice:Fw,note:h_,rectWithTitle:d_,labelRect:i_,iconSquare:Jw,iconCircle:Qw,icon:Zw,iconRounded:Kw,imageSquare:t_,anchor:Lw,kanbanItem:$_,mindmapCircle:I_,defaultMindmapNode:q_,classBox:O_,erBox:Xy,requirementBox:D_}),...gz.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),H_=mz();function yz(e){return e in H_}S(yz,"isValidShape");var zf=new Map;async function U_(e,t,r){let a,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const l=t.shape?H_[t.shape]:void 0;if(!l)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let c;r.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,r)}else s=await l(e,t,r),a=s;return a.attr("data-look",Qe(t.look)),t.tooltip&&s.attr("title",t.tooltip),zf.set(t.id,a),t.haveCallback&&a.attr("class",a.attr("class")+" clickable"),a}S(U_,"insertNode");var nI=S((e,t)=>{zf.set(t.id,e)},"setNodeElem"),sI=S(()=>{zf.clear()},"clear"),lI=S(e=>{const t=zf.get(e.id);gt.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,a=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+a-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),a},"positionNode"),xz=S((e,t,r,a,s,l=!1,c)=>{t.arrowTypeStart&&D2(e,"start",t.arrowTypeStart,r,a,s,l,c),t.arrowTypeEnd&&D2(e,"end",t.arrowTypeEnd,r,a,s,l,c)},"addEdgeMarkers"),bz={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}},Cz=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],D2=S((e,t,r,a,s,l,c=!1,h)=>{var C;const f=bz[r],d=f&&Cz.includes(f.type);if(!f){gt.warn(`Unknown arrow type: ${r}`);return}const p=f.type,m=`${s}_${l}-${p}${t==="start"?"Start":"End"}${c&&d?"-margin":""}`;if(h&&h.trim()!==""){const k=h.replace(/[^\dA-Za-z]/g,"_"),v=`${m}_${k}`;if(!document.getElementById(v)){const T=document.getElementById(m);if(T){const _=T.cloneNode(!0);_.id=v,_.querySelectorAll("path, circle, line").forEach(R=>{R.setAttribute("stroke",h),f.fill&&R.setAttribute("fill",h)}),(C=T.parentNode)==null||C.appendChild(_)}}e.attr(`marker-${t}`,`url(${a}#${v})`)}else e.attr(`marker-${t}`,`url(${a}#${m})`)},"addEdgeMarker"),kz=S(e=>{var t,r;return typeof e=="string"?e:(r=(t=re())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),pf=new Map,si=new Map,oI=S(()=>{pf.clear(),si.clear()},"clear"),Zo=S(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),vz=S(async(e,t)=>{const r=re();let a=wi(r);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",d=await Ba(e,t.label,{style:Zo(t.labelStyle),useHtmlLabels:a,addSvgBackground:!0,isNode:!1,markdown:h,width:h?void 0:void 0},r);c.node().appendChild(d),gt.info("abc82",t,t.labelType);let p=d.getBBox(),g=p;if(a){const m=d.children[0],C=Wt(d);p=m.getBoundingClientRect(),g=p,C.attr("width",p.width),C.attr("height",p.height)}else{const m=Wt(d).select("text").node();m&&typeof m.getBBox=="function"&&(g=m.getBBox())}c.attr("transform",Wo(g,a)),pf.set(t.id,l),t.width=p.width,t.height=p.height;let x;if(t.startLabelLeft){const m=e.insert("g").attr("class","edgeTerminals"),C=m.insert("g").attr("class","inner"),k=await pn(C,t.startLabelLeft,Zo(t.labelStyle)||"",!1,!1);x=k;let v=k.getBBox();if(a){const T=k.children[0],_=Wt(k);v=T.getBoundingClientRect(),_.attr("width",v.width),_.attr("height",v.height)}C.attr("transform",Wo(v,a)),si.get(t.id)||si.set(t.id,{}),si.get(t.id).startLeft=m,sc(x,t.startLabelLeft)}if(t.startLabelRight){const m=e.insert("g").attr("class","edgeTerminals"),C=m.insert("g").attr("class","inner"),k=await pn(C,t.startLabelRight,Zo(t.labelStyle)||"",!1,!1);x=k;let v=k.getBBox();if(a){const T=k.children[0],_=Wt(k);v=T.getBoundingClientRect(),_.attr("width",v.width),_.attr("height",v.height)}C.attr("transform",Wo(v,a)),si.get(t.id)||si.set(t.id,{}),si.get(t.id).startRight=m,sc(x,t.startLabelRight)}if(t.endLabelLeft){const m=e.insert("g").attr("class","edgeTerminals"),C=m.insert("g").attr("class","inner"),k=await pn(m,t.endLabelLeft,Zo(t.labelStyle)||"",!1,!1);x=k;let v=k.getBBox();if(a){const T=k.children[0],_=Wt(k);v=T.getBoundingClientRect(),_.attr("width",v.width),_.attr("height",v.height)}C.attr("transform",Wo(v,a)),si.get(t.id)||si.set(t.id,{}),si.get(t.id).endLeft=m,sc(x,t.endLabelLeft)}if(t.endLabelRight){const m=e.insert("g").attr("class","edgeTerminals"),C=m.insert("g").attr("class","inner"),k=await pn(m,t.endLabelRight,Zo(t.labelStyle)||"",!1,!1);x=k;let v=k.getBBox();if(a){const T=k.children[0],_=Wt(k);v=T.getBoundingClientRect(),_.attr("width",v.width),_.attr("height",v.height)}C.attr("transform",Wo(v,a)),si.get(t.id)||si.set(t.id,{}),si.get(t.id).endRight=m,sc(x,t.endLabelRight)}return d},"insertEdgeLabel");function sc(e,t){wi(re())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}S(sc,"setTerminalWidth");var Sz=S((e,t)=>{gt.debug("Moving label abc88 ",e.id,e.label,pf.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const a=re(),{subGraphTitleTotalMargin:s}=Oy(a);if(e.label){const l=pf.get(e.id);let c=e.x,h=e.y;if(r){const f=Tr.calcLabelPosition(r);gt.debug("Moving label "+e.label+" from (",c,",",h,") to (",f.x,",",f.y,") abc88"),t.updatedPath&&(c=f.x,h=f.y)}l.attr("transform",`translate(${c}, ${h+s/2})`)}if(e.startLabelLeft){const l=si.get(e.id).startLeft;let c=e.x,h=e.y;if(r){const f=Tr.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);c=f.x,h=f.y}l.attr("transform",`translate(${c}, ${h})`)}if(e.startLabelRight){const l=si.get(e.id).startRight;let c=e.x,h=e.y;if(r){const f=Tr.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);c=f.x,h=f.y}l.attr("transform",`translate(${c}, ${h})`)}if(e.endLabelLeft){const l=si.get(e.id).endLeft;let c=e.x,h=e.y;if(r){const f=Tr.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);c=f.x,h=f.y}l.attr("transform",`translate(${c}, ${h})`)}if(e.endLabelRight){const l=si.get(e.id).endRight;let c=e.x,h=e.y;if(r){const f=Tr.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);c=f.x,h=f.y}l.attr("transform",`translate(${c}, ${h})`)}},"positionEdgeLabel"),Tz=S((e,t)=>{const r=e.x,a=e.y,s=Math.abs(t.x-r),l=Math.abs(t.y-a),c=e.width/2,h=e.height/2;return s>=c||l>=h},"outsideNode"),wz=S((e,t,r)=>{gt.debug(`intersection calc abc89:
423
+ outsidePoint: ${JSON.stringify(t)}
424
+ insidePoint : ${JSON.stringify(r)}
425
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const a=e.x,s=e.y,l=Math.abs(a-r.x),c=e.width/2;let h=r.x<t.x?c-l:c+l;const f=e.height/2,d=Math.abs(t.y-r.y),p=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*c>Math.abs(a-t.x)*f){let g=r.y<t.y?t.y-f-s:s-f-t.y;h=p*g/d;const x={x:r.x<t.x?r.x+h:r.x-p+h,y:r.y<t.y?r.y+d-g:r.y-d+g};return h===0&&(x.x=t.x,x.y=t.y),p===0&&(x.x=t.x),d===0&&(x.y=t.y),gt.debug(`abc89 top/bottom calc, Q ${d}, q ${g}, R ${p}, r ${h}`,x),x}else{r.x<t.x?h=t.x-c-a:h=a-c-t.x;let g=d*h/p,x=r.x<t.x?r.x+p-h:r.x-p+h,m=r.y<t.y?r.y+g:r.y-g;return gt.debug(`sides calc abc89, Q ${d}, q ${g}, R ${p}, r ${h}`,{_x:x,_y:m}),h===0&&(x=t.x,m=t.y),p===0&&(x=t.x),d===0&&(m=t.y),{x,y:m}}},"intersection"),$2=S((e,t)=>{gt.warn("abc88 cutPathAtIntersect",e,t);let r=[],a=e[0],s=!1;return e.forEach(l=>{if(gt.info("abc88 checking point",l,t),!Tz(t,l)&&!s){const c=wz(t,a,l);gt.debug("abc88 inside",l,a,c),gt.debug("abc88 intersection",c,t);let h=!1;r.forEach(f=>{h=h||f.x===c.x&&f.y===c.y}),r.some(f=>f.x===c.x&&f.y===c.y)?gt.warn("abc88 no intersect",c,r):r.push(c),s=!0}else gt.warn("abc88 outside",l,a),a=l,s||r.push(l)}),gt.debug("returning points",r),r},"cutPathAtIntersect");function j_(e){const t=[],r=[];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),r.push(a))}return{cornerPoints:t,cornerPointPositions:r}}S(j_,"extractCornerPoints");var z2=S(function(e,t,r){const a=t.x-e.x,s=t.y-e.y,l=Math.sqrt(a*a+s*s),c=r/l;return{x:t.x-c*a,y:t.y-c*s}},"findAdjacentPoint"),_z=S(function(e){const{cornerPointPositions:t}=j_(e),r=[];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=z2(s,c,5),f=z2(l,c,5),d=f.x-h.x,p=f.y-h.y;r.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 m=5;c.x===h.x?x={x:d<0?h.x-m+g:h.x+m-g,y:p<0?h.y-g:h.y+g}:x={x:d<0?h.x-g:h.x+g,y:p<0?h.y-m+g:h.y+m-g}}else gt.debug("Corner point skipping fixing",Math.abs(l.x-s.x),Math.abs(l.y-s.y));r.push(x,f)}else r.push(e[a]);return r},"fixCorners"),Bz=S((e,t,r)=>{const a=e-t-r,s=2,l=2,c=s+l,h=Math.floor(a/c),f=Array(h).fill(`${s} ${l}`).join(" ");return`0 ${t} ${f} ${r}`},"generateDashArray"),Ez=S(function(e,t,r,a,s,l,c,h=!1){var z;if(!c)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:f}=re();let d=t.points,p=!1;const g=s;var x=l;const m=[];for(const O in t.cssCompiledStyles)HT(O)||m.push(t.cssCompiledStyles[O]);gt.debug("UIO intersect check",t.points,x.x,g.x),x.intersect&&g.intersect&&!h&&(d=d.slice(1,t.points.length-1),d.unshift(g.intersect(d[0])),gt.debug("Last point UIO",t.start,"-->",t.end,d[d.length-1],x,x.intersect(d[d.length-1])),d.push(x.intersect(d[d.length-1])));const C=btoa(JSON.stringify(d));t.toCluster&&(gt.info("to cluster abc88",r.get(t.toCluster)),d=$2(t.points,r.get(t.toCluster).node),p=!0),t.fromCluster&&(gt.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(d,null,2)),d=$2(d.reverse(),r.get(t.fromCluster).node).reverse(),p=!0);let k=d.filter(O=>!Number.isNaN(O.y));const v=kz(t.curve);v!=="rounded"&&(k=_z(k));let T=hc;switch(v){case"linear":T=hc;break;case"basis":T=Xg;break;case"cardinal":T=Ev;break;case"bumpX":T=Sv;break;case"bumpY":T=Tv;break;case"catmullRom":T=Av;break;case"monotoneX":T=$v;break;case"monotoneY":T=zv;break;case"natural":T=qv;break;case"step":T=Iv;break;case"stepAfter":T=Uv;break;case"stepBefore":T=Hv;break;case"rounded":T=hc;break;default:T=Xg}const{x:_,y:E}=v6(t),R=nD().x(_).y(E).curve(T);let F;switch(t.thickness){case"normal":F="edge-thickness-normal";break;case"thick":F="edge-thickness-thick";break;case"invisible":F="edge-thickness-invisible";break;default:F="edge-thickness-normal"}switch(t.pattern){case"solid":F+=" edge-pattern-solid";break;case"dotted":F+=" edge-pattern-dotted";break;case"dashed":F+=" edge-pattern-dashed";break;default:F+=" edge-pattern-solid"}let N,H=v==="rounded"?P_(W_(k,t),5):R(k);const I=Array.isArray(t.style)?t.style:[t.style];let at=I.find(O=>O==null?void 0:O.startsWith("stroke:")),X="";t.animate&&(X="edge-animation-fast"),t.animation&&(X="edge-animation-"+t.animation);let D=!1;if(t.look==="handDrawn"){const O=St.svg(e);Object.assign([],k);const M=O.path(H,{roughness:.3,seed:f});F+=" transition",N=Wt(M).select("path").attr("id",`${c}-${t.id}`).attr("class"," "+F+(t.classes?" "+t.classes:"")+(X?" "+X:"")).attr("style",I?I.reduce(($,tt)=>$+";"+tt,""):"");let Q=N.attr("d");N.attr("d",Q),e.node().appendChild(N.node())}else{const O=m.join(";"),M=I?I.reduce((yt,xt)=>yt+xt+";",""):"",Q=(O?O+";"+M+";":M)+";"+(I?I.reduce((yt,xt)=>yt+";"+xt,""):"");N=e.append("path").attr("d",H).attr("id",`${c}-${t.id}`).attr("class"," "+F+(t.classes?" "+t.classes:"")+(X?" "+X:"")).attr("style",Q),at=(z=Q.match(/stroke:([^;]+)/))==null?void 0:z[1],D=t.animate===!0||!!t.animation||O.includes("animation");const $=N.node(),tt=typeof $.getTotalLength=="function"?$.getTotalLength():0,ct=Q1[t.arrowTypeStart]||0,ht=Q1[t.arrowTypeEnd]||0;if(t.look==="neo"&&!D){const xt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Bz(tt,ct,ht):`0 ${ct} ${tt-ct-ht} ${ht}`}; 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",Qe(t.look)),t.showPoints&&k.forEach(O=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",O.x).attr("cy",O.y)});let V="";(re().flowchart.arrowMarkerAbsolute||re().state.arrowMarkerAbsolute)&&(V=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,V=V.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),gt.info("arrowTypeStart",t.arrowTypeStart),gt.info("arrowTypeEnd",t.arrowTypeEnd);const J=!D&&(t==null?void 0:t.look)==="neo";xz(N,t,V,c,a,J,at);const Y=Math.floor(d.length/2),j=d[Y];Tr.isLabelCoordinateInPath(j,N.attr("d"))||(p=!0);let A={};return p&&(A.updatedPath=d),A.originalPath=t.points,A},"insertEdge");function P_(e,t){if(e.length<2)return"";let r="";const a=e.length,s=1e-5;for(let l=0;l<a;l++){const c=e[l],h=e[l-1],f=e[l+1];if(l===0)r+=`M${c.x},${c.y}`;else if(l===a-1)r+=`L${c.x},${c.y}`;else{const d=c.x-h.x,p=c.y-h.y,g=f.x-c.x,x=f.y-c.y,m=Math.hypot(d,p),C=Math.hypot(g,x);if(m<s||C<s){r+=`L${c.x},${c.y}`;continue}const k=d/m,v=p/m,T=g/C,_=x/C,E=k*T+v*_,R=Math.max(-1,Math.min(1,E)),F=Math.acos(R);if(F<s||Math.abs(Math.PI-F)<s){r+=`L${c.x},${c.y}`;continue}const N=Math.min(t/Math.sin(F/2),m/2,C/2),H=c.x-k*N,I=c.y-v*N,at=c.x+T*N,X=c.y+_*N;r+=`L${H},${I}`,r+=`Q${c.x},${c.y} ${at},${X}`}}return r}S(P_,"generateRoundedPath");function Tm(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,a=t.y-e.y;return{angle:Math.atan2(a,r),deltaX:r,deltaY:a}}S(Tm,"calculateDeltaAndAngle");function W_(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&fi[t.arrowTypeStart]){const s=fi[t.arrowTypeStart],l=e[0],c=e[1],{angle:h}=Tm(l,c),f=s*Math.cos(h),d=s*Math.sin(h);r[0].x=l.x+f,r[0].y=l.y+d}const a=e.length;if(a>=2&&fi[t.arrowTypeEnd]){const s=fi[t.arrowTypeEnd],l=e[a-1],c=e[a-2],{angle:h}=Tm(c,l),f=s*Math.cos(h),d=s*Math.sin(h);r[a-1].x=l.x-f,r[a-1].y=l.y-d}return r}S(W_,"applyMarkerOffsetsToPoints");var Lz=S((e,t,r,a)=>{t.forEach(s=>{Kz[s](e,r,a)})},"insertMarkers"),Az=S((e,t,r)=>{gt.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",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",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+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",r+"_"+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"),Mz=S((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),Rz=S((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),Fz=S((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),Oz=S((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),Dz=S((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+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",r+"_"+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"),$z=S((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+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",r+"_"+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"),zz=S((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+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",r+"_"+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"),Nz=S((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),qz=S((e,t,r)=>{const a=Le(),{themeVariables:s}=a,{transitionColor:l}=s;e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),Iz=S((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Hz=S((e,t,r)=>{const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");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",r+"_"+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"),Uz=S((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),jz=S((e,t,r)=>{const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");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",r+"_"+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"),Pz=S((e,t,r)=>{const a=Le(),{themeVariables:s}=a,{strokeWidth:l}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").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",r+"_"+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"),Wz=S((e,t,r)=>{const a=Le(),{themeVariables:s}=a,{strokeWidth:l,mainBkg:c}=s,h=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").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 f=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");f.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${l}`).attr("r",6),f.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${l}`)},"zero_or_one_neo"),Yz=S((e,t,r)=>{const a=Le(),{themeVariables:s}=a,{strokeWidth:l}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").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",r+"_"+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"),Gz=S((e,t,r)=>{const a=Le(),{themeVariables:s}=a,{strokeWidth:l,mainBkg:c}=s,h=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("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 f=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");f.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${l}`),f.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${l}`)},"zero_or_more_neo"),Xz=S((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
426
+ L20,10
427
+ M20,10
428
+ L0,20`)},"requirement_arrow"),Vz=S((e,t,r)=>{const a=Le(),{themeVariables:s}=a,{strokeWidth:l}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${l}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
429
+ L20,10
430
+ M20,10
431
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Zz=S((e,t,r)=>{const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");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"),Qz=S((e,t,r)=>{const a=Le(),{themeVariables:s}=a,{strokeWidth:l}=s,c=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").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"),Kz={extension:Az,composition:Mz,aggregation:Rz,dependency:Fz,lollipop:Oz,point:Dz,circle:$z,cross:zz,barb:Nz,barbNeo:qz,only_one:Iz,zero_or_one:Hz,one_or_more:Uz,zero_or_more:jz,only_one_neo:Pz,zero_or_one_neo:Wz,one_or_more_neo:Yz,zero_or_more_neo:Gz,requirement_arrow:Xz,requirement_contains:Zz,requirement_arrow_neo:Vz,requirement_contains_neo:Qz},Jz=Lz,tN={common:Mc,getConfig:Le,insertCluster:Q8,insertEdge:Ez,insertEdgeLabel:vz,insertMarkers:Jz,insertNode:U_,interpolateToCurve:Ey,labelHelper:$t,log:gt,positionEdgeLabel:Sz},Tc={},Y_=S(e=>{for(const t of e)Tc[t.name]=t},"registerLayoutLoaders"),eN=S(()=>{Y_([{name:"dagre",loader:S(async()=>await Kt(()=>import("./dagre-BM42HDAG-CrTY01ZS.js"),__vite__mapDeps([0,1,2])),"loader")},{name:"cose-bilkent",loader:S(async()=>await Kt(()=>import("./cose-bilkent-S5V4N54A-CWS9LN88.js"),__vite__mapDeps([3,4])),"loader")}])},"registerDefaultLayoutLoaders");eN();var cI=S(async(e,t)=>{if(!(e.layoutAlgorithm in Tc))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 r=Tc[e.layoutAlgorithm],a=await r.loader(),{theme:s,themeVariables:l}=e.config,{useGradient:c,gradientStart:h,gradientStop:f}=l,d=t.attr("id");if(t.append("defs").append("filter").attr("id",`${d}-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!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${d}-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!=null&&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",f).attr("stop-opacity",1)}return a.render(e,t,tN,{algorithm:r.algorithm})},"render"),hI=S((e="",{fallback:t="dagre"}={})=>{if(e in Tc)return e;if(t in Tc)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"),Vy="comm",G_="rule",X_="decl",iN="@media",rN="@import",aN="@supports",nN="@namespace",wm="@keyframes",V_="@layer",sN="@scope",lN=Math.abs,fc=String.fromCharCode;function Z_(e){return e.trim()}function _m(e,t,r){return e.replace(t,r)}function dl(e,t){return e.charCodeAt(t)|0}function Ol(e,t,r){return e.slice(t,r)}function jr(e){return e.length}function Q_(e){return e.length}function pu(e,t){return t.push(e),e}var Nf=1,Dl=1,K_=0,ur=0,je=0,jl="";function Zy(e,t,r,a,s,l,c,h){return{value:e,root:t,parent:r,type:a,props:s,children:l,line:Nf,column:Dl,length:c,return:"",siblings:h}}function oN(){return je}function cN(){return je=ur>0?dl(jl,--ur):0,Dl--,je===10&&(Dl=1,Nf--),je}function Br(){return je=ur<K_?dl(jl,ur++):0,Dl++,je===10&&(Dl=1,Nf++),je}function gn(){return dl(jl,ur)}function Mu(){return ur}function qf(e,t){return Ol(jl,e,t)}function wc(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 hN(e){return Nf=Dl=1,K_=jr(jl=e),ur=0,[]}function uN(e){return jl="",e}function kg(e){return Z_(qf(ur-1,Bm(e===91?e+2:e===40?e+1:e)))}function fN(e){for(;(je=gn())&&je<33;)Br();return wc(e)>2||wc(je)>3?"":" "}function dN(e,t){for(;--t&&Br()&&!(je<48||je>102||je>57&&je<65||je>70&&je<97););return qf(e,Mu()+(t<6&&gn()==32&&Br()==32))}function Bm(e){for(;Br();)switch(je){case e:return ur;case 34:case 39:e!==34&&e!==39&&Bm(je);break;case 40:e===41&&Bm(e);break;case 92:Br();break}return ur}function pN(e,t){for(;Br()&&e+je!==57;)if(e+je===84&&gn()===47)break;return"/*"+qf(t,ur-1)+"*"+fc(e===47?e:Br())}function gN(e){for(;!wc(gn());)Br();return qf(e,ur)}function mN(e){return uN(Ru("",null,null,null,[""],e=hN(e),0,[0],e))}function Ru(e,t,r,a,s,l,c,h,f){for(var d=0,p=0,g=c,x=0,m=0,C=0,k=1,v=1,T=1,_=0,E=0,R="",F=s,N=l,H=a,I=R;v;)switch(C=E,E=Br()){case 40:C!=108&&dl(I,g-1)==58?(_++,I+="("):I+=kg(E);break;case 41:_--,I+=")";break;case 34:case 39:case 91:I+=kg(E);break;case 9:case 10:case 13:case 32:if(_>0){I+=fc(E);break}I+=fN(C);break;case 92:I+=dN(Mu()-1,7);continue;case 47:switch(gn()){case 42:case 47:pu(yN(pN(Br(),Mu()),t,r,f),f),(wc(C||1)==5||wc(gn()||1)==5)&&jr(I)&&Ol(I,-1,void 0)!==" "&&(I+=" ");break;default:I+="/"}break;case 123*k:h[d++]=jr(I)*T;case 125*k:case 59:case 0:if(_>0&&E){I+=fc(E);break}switch(E){case 0:case 125:v=0;case 59+p:T==-1&&(I=_m(I,/\f/g,"")),m>0&&(jr(I)-g||k===0)&&pu(m>32?q2(I+";",a,r,g-1,f):q2(_m(I," ","")+";",a,r,g-2,f),f);break;case 59:I+=";";default:if(pu(H=N2(I,t,r,d,p,s,h,R,F=[],N=[],g,l),l),E===123)if(p===0)Ru(I,t,H,H,F,l,g,h,N);else{switch(x){case 99:if(dl(I,3)===110)break;case 108:if(dl(I,2)===97)break;default:p=0;case 100:case 109:case 115:}p?Ru(e,H,H,a&&pu(N2(e,H,H,0,0,s,h,R,s,F=[],g,N),N),s,N,g,h,a?F:N):Ru(I,H,H,H,[""],N,0,h,N)}}d=p=m=0,k=T=1,R=I="",g=c;break;case 58:g=1+jr(I),m=C;default:if(k<1){if(E==123)--k;else if(E==125&&k++==0&&cN()==125)continue}switch(I+=fc(E),E*k){case 38:T=p>0?1:(I+="\f",-1);break;case 44:if(_>0)break;h[d++]=(jr(I)-1)*T,T=1;break;case 64:gn()===45&&(I+=kg(Br())),x=gn(),p=g=jr(R=I+=gN(Mu())),E++;break;case 45:C===45&&jr(I)==2&&(k=0)}}return l}function N2(e,t,r,a,s,l,c,h,f,d,p,g){for(var x=s-1,m=s===0?l:[""],C=Q_(m),k=0,v=0,T=0;k<a;++k)for(var _=0,E=Ol(e,x+1,x=lN(v=c[k])),R=e;_<C;++_)(R=Z_(v>0?m[_]+" "+E:_m(E,/&\f/g,m[_])))&&(f[T++]=R);return Zy(e,t,r,s===0?G_:h,f,d,p,g)}function yN(e,t,r,a){return Zy(e,t,r,Vy,fc(oN()),Ol(e,2,-2),0,a)}function q2(e,t,r,a,s){return Zy(e,t,r,X_,Ol(e,0,a),Ol(e,a+1,-1),a,s)}function Em(e,t){for(var r="",a=0;a<e.length;a++)r+=t(e[a],a,e,t)||"";return r}function xN(e,t,r,a){switch(e.type){case V_:if(e.children.length)break;case rN:case nN:case X_:return e.return=e.return||e.value;case Vy:return"";case wm:return e.return=e.value+"{"+Em(e.children,a)+"}";case G_:if(!jr(e.value=e.props.join(",")))return""}return jr(r=Em(e.children,a))?e.return=e.value+"{"+r+"}":""}function bN(e){var t=Q_(e);return function(r,a,s,l){for(var c="",h=0;h<t;h++)c+=e[h](r,a,s,l)||"";return c}}var J_="c4",CN=S(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),kN=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./c4Diagram-AAUBKEIU-B3e26q4H.js");return{diagram:t}},__vite__mapDeps([5,6]));return{id:J_,diagram:e}},"loader"),vN={id:J_,detector:CN,loader:kN},SN=vN,tB="flowchart",TN=S((e,t)=>{var r,a;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),wN=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-FgXGamXq.js");return{diagram:t}},__vite__mapDeps([7,8,6,9,10,11]));return{id:tB,diagram:e}},"loader"),_N={id:tB,detector:TN,loader:wN},BN=_N,eB="flowchart-v2",EN=S((e,t)=>{var r,a,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),LN=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-FgXGamXq.js");return{diagram:t}},__vite__mapDeps([7,8,6,9,10,11]));return{id:eB,diagram:e}},"loader"),AN={id:eB,detector:EN,loader:LN},MN=AN,iB="er",RN=S(e=>/^\s*erDiagram/.test(e),"detector"),FN=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./erDiagram-TEJ5UH35-DJ5B_v36.js");return{diagram:t}},__vite__mapDeps([12,9,10,11]));return{id:iB,diagram:e}},"loader"),ON={id:iB,detector:RN,loader:FN},DN=ON,rB="gitGraph",$N=S(e=>/^\s*gitGraph/.test(e),"detector"),zN=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PVQCEYII-B9dyglKH.js");return{diagram:t}},__vite__mapDeps([13,14,15,16]));return{id:rB,diagram:e}},"loader"),NN={id:rB,detector:$N,loader:zN},qN=NN,aB="gantt",IN=S(e=>/^\s*gantt/.test(e),"detector"),HN=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./ganttDiagram-6RSMTGT7-BqQpl_AI.js");return{diagram:t}},__vite__mapDeps([17,18,19,20]));return{id:aB,diagram:e}},"loader"),UN={id:aB,detector:IN,loader:HN},jN=UN,nB="info",PN=S(e=>/^\s*info/.test(e),"detector"),WN=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./infoDiagram-5YYISTIA-BnCd67vl.js");return{diagram:t}},__vite__mapDeps([21,16]));return{id:nB,diagram:e}},"loader"),YN={id:nB,detector:PN,loader:WN},sB="pie",GN=S(e=>/^\s*pie/.test(e),"detector"),XN=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./pieDiagram-4H26LBE5-Bhea-GHU.js");return{diagram:t}},__vite__mapDeps([22,14,16,23,24,19]));return{id:sB,diagram:e}},"loader"),VN={id:sB,detector:GN,loader:XN},lB="quadrantChart",ZN=S(e=>/^\s*quadrantChart/.test(e),"detector"),QN=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./quadrantDiagram-W4KKPZXB-DVV9SA8B.js");return{diagram:t}},__vite__mapDeps([25,18,19,20]));return{id:lB,diagram:e}},"loader"),KN={id:lB,detector:ZN,loader:QN},JN=KN,oB="xychart",t9=S(e=>/^\s*xychart(-beta)?/.test(e),"detector"),e9=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./xychartDiagram-2RQKCTM6-_2nMxLXq.js");return{diagram:t}},__vite__mapDeps([26,19,24,18,20]));return{id:oB,diagram:e}},"loader"),i9={id:oB,detector:t9,loader:e9},r9=i9,cB="requirement",a9=S(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),n9=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./requirementDiagram-4Y6WPE33-79_wp-3B.js");return{diagram:t}},__vite__mapDeps([27,9,10]));return{id:cB,diagram:e}},"loader"),s9={id:cB,detector:a9,loader:n9},l9=s9,hB="sequence",o9=S(e=>/^\s*sequenceDiagram/.test(e),"detector"),c9=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./sequenceDiagram-3UESZ5HK-CROVFpmb.js");return{diagram:t}},__vite__mapDeps([28,6,15]));return{id:hB,diagram:e}},"loader"),h9={id:hB,detector:o9,loader:c9},u9=h9,uB="class",f9=S((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),d9=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./classDiagram-4FO5ZUOK-BG6G2w7M.js");return{diagram:t}},__vite__mapDeps([29,30,8,6,9,10]));return{id:uB,diagram:e}},"loader"),p9={id:uB,detector:f9,loader:d9},g9=p9,fB="classDiagram",m9=S((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),y9=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./classDiagram-v2-Q7XG4LA2-BG6G2w7M.js");return{diagram:t}},__vite__mapDeps([31,30,8,6,9,10]));return{id:fB,diagram:e}},"loader"),x9={id:fB,detector:m9,loader:y9},b9=x9,dB="state",C9=S((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),k9=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./stateDiagram-AJRCARHV-ChI1w0kO.js");return{diagram:t}},__vite__mapDeps([32,33,9,10,1,2]));return{id:dB,diagram:e}},"loader"),v9={id:dB,detector:C9,loader:k9},S9=v9,pB="stateDiagram",T9=S((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),w9=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-BHNVJYJU-uMR_aTUu.js");return{diagram:t}},__vite__mapDeps([34,33,9,10]));return{id:pB,diagram:e}},"loader"),_9={id:pB,detector:T9,loader:w9},B9=_9,gB="journey",E9=S(e=>/^\s*journey/.test(e),"detector"),L9=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./journeyDiagram-JHISSGLW-Cmyx-4-x.js");return{diagram:t}},__vite__mapDeps([35,8,6,23]));return{id:gB,diagram:e}},"loader"),A9={id:gB,detector:E9,loader:L9},M9=A9,R9=S((e,t,r)=>{gt.debug(`rendering svg for syntax error
432
+ `);const a=pD(t),s=a.append("g");a.attr("viewBox","0 0 2412 512"),Yk(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 ${r}`)},"draw"),mB={draw:R9},F9=mB,O9={db:{},renderer:mB,parser:{parse:S(()=>{},"parse")}},D9=O9,yB="flowchart-elk",$9=S((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),z9=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-FgXGamXq.js");return{diagram:t}},__vite__mapDeps([7,8,6,9,10,11]));return{id:yB,diagram:e}},"loader"),N9={id:yB,detector:$9,loader:z9},q9=N9,xB="timeline",I9=S(e=>/^\s*timeline/.test(e),"detector"),H9=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./timeline-definition-PNZ67QCA-DOcZCwg5.js");return{diagram:t}},__vite__mapDeps([36,23]));return{id:xB,diagram:e}},"loader"),U9={id:xB,detector:I9,loader:H9},j9=U9,bB="mindmap",P9=S(e=>/^\s*mindmap/.test(e),"detector"),W9=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./mindmap-definition-RKZ34NQL-BjID6Hwn.js");return{diagram:t}},__vite__mapDeps([37,9,10]));return{id:bB,diagram:e}},"loader"),Y9={id:bB,detector:P9,loader:W9},G9=Y9,CB="kanban",X9=S(e=>/^\s*kanban/.test(e),"detector"),V9=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./kanban-definition-UN3LZRKU-DyrJY_CA.js");return{diagram:t}},__vite__mapDeps([38,8]));return{id:CB,diagram:e}},"loader"),Z9={id:CB,detector:X9,loader:V9},Q9=Z9,kB="sankey",K9=S(e=>/^\s*sankey(-beta)?/.test(e),"detector"),J9=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./sankeyDiagram-5OEKKPKP-BaUWYvhY.js");return{diagram:t}},__vite__mapDeps([39,24,19]));return{id:kB,diagram:e}},"loader"),tq={id:kB,detector:K9,loader:J9},eq=tq,vB="packet",iq=S(e=>/^\s*packet(-beta)?/.test(e),"detector"),rq=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./diagram-LMA3HP47-CtUrWgF8.js");return{diagram:t}},__vite__mapDeps([40,14,16]));return{id:vB,diagram:e}},"loader"),aq={id:vB,detector:iq,loader:rq},SB="radar",nq=S(e=>/^\s*radar-beta/.test(e),"detector"),sq=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./diagram-2AECGRRQ-CZFZ-P_g.js");return{diagram:t}},__vite__mapDeps([41,14,16]));return{id:SB,diagram:e}},"loader"),lq={id:SB,detector:nq,loader:sq},TB="block",oq=S(e=>/^\s*block(-beta)?/.test(e),"detector"),cq=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./blockDiagram-GPEHLZMM-3t2ofZz0.js");return{diagram:t}},__vite__mapDeps([42,8,1,11]));return{id:TB,diagram:e}},"loader"),hq={id:TB,detector:oq,loader:cq},uq=hq,wB="treeView",fq=S(e=>/^\s*treeView-beta/.test(e),"detector"),dq=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./diagram-5GNKFQAL-Cel1H_0m.js");return{diagram:t}},__vite__mapDeps([43,14,15,16]));return{id:wB,diagram:e}},"loader"),pq={id:wB,detector:fq,loader:dq},gq=pq,_B="architecture",mq=S(e=>/^\s*architecture/.test(e),"detector"),yq=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./architectureDiagram-3BPJPVTR-DBjyco54.js");return{diagram:t}},__vite__mapDeps([44,14,16,4]));return{id:_B,diagram:e}},"loader"),xq={id:_B,detector:mq,loader:yq},bq=xq,BB="eventmodeling",Cq=S(e=>/^\s*eventmodeling/.test(e),"detector"),kq=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./diagram-KO2AKTUF-CgSCgVpo.js");return{diagram:t}},__vite__mapDeps([45,14,16]));return{id:BB,diagram:e}},"loader"),vq={id:BB,detector:Cq,loader:kq},Sq=vq,EB="ishikawa",Tq=S(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),wq=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-YF4QCWOH-IPq1s0X7.js");return{diagram:t}},[]);return{id:EB,diagram:e}},"loader"),_q={id:EB,detector:Tq,loader:wq},LB="venn",Bq=S(e=>/^\s*venn-beta/.test(e),"detector"),Eq=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./vennDiagram-CIIHVFJN-CaM3hdOc.js");return{diagram:t}},[]);return{id:LB,diagram:e}},"loader"),Lq={id:LB,detector:Bq,loader:Eq},Aq=Lq,AB="treemap",Mq=S(e=>/^\s*treemap/.test(e),"detector"),Rq=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./diagram-OG6HWLK6-DdZyiUTB.js");return{diagram:t}},__vite__mapDeps([46,10,14,16,20,24,19]));return{id:AB,diagram:e}},"loader"),Fq={id:AB,detector:Mq,loader:Rq},MB="wardley-beta",Oq=S(e=>/^\s*wardley-beta/i.test(e),"detector"),Dq=S(async()=>{const{diagram:e}=await Kt(async()=>{const{diagram:t}=await import("./wardleyDiagram-YWT4CUSO-CZFHdmZ7.js");return{diagram:t}},__vite__mapDeps([47,14,16]));return{id:MB,diagram:e}},"loader"),$q={id:MB,detector:Oq,loader:Dq},zq=$q,I2=!1,If=S(()=>{I2||(I2=!0,Uu("error",D9,e=>e.toLowerCase().trim()==="error"),Uu("---",{db:{clear:S(()=>{},"clear")},styles:{},renderer:{draw:S(()=>{},"draw")},parser:{parse:S(()=>{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:S(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Fg(q9,G9,bq),Fg(SN,Q9,b9,g9,DN,jN,YN,VN,l9,u9,MN,BN,j9,qN,B9,S9,M9,JN,eq,aq,r9,uq,Sq,gq,lq,_q,Fq,Aq,zq))},"addDiagrams"),Nq=S(async()=>{gt.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(ts).map(async([r,{detector:a,loader:s}])=>{if(s)try{Ng(r)}catch{try{const{diagram:l,id:c}=await s();Uu(c,l,a)}catch(l){throw gt.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete ts[r],l}}}))).filter(r=>r.status==="rejected");if(t.length>0){gt.error(`Failed to load ${t.length} external diagrams`);for(const r of t)gt.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),qq="graphics-document document";function RB(e,t){e.attr("role",qq),t!==""&&e.attr("aria-roledescription",t)}S(RB,"setA11yDiagramInfo");function FB(e,t,r,a){if(e.insert!==void 0){if(r){const s=`chart-desc-${a}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${a}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}S(FB,"addSVGa11yTitleDescription");var Kn,Lm=(Kn=class{constructor(t,r,a,s,l){this.type=t,this.text=r,this.db=a,this.parser=s,this.renderer=l}static async fromText(t,r={}){var d,p;const a=Le(),s=Km(t,a);t=y$(t)+`
433
+ `;try{Ng(s)}catch{const g=O5(s);if(!g)throw new Mk(`Diagram ${s} not found.`);const{id:x,diagram:m}=await g();Uu(x,m)}const{db:l,parser:c,renderer:h,init:f}=Ng(s);return c.parser&&(c.parser.yy=l),(d=l.clear)==null||d.call(l),f==null||f(a),r.title&&((p=l.setDiagramTitle)==null||p.call(l,r.title)),await c.parse(t),new Kn(s,t,l,c,h)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},S(Kn,"Diagram"),Kn),H2=[],Iq=S(()=>{H2.forEach(e=>{e()}),H2=[]},"attachFunctions"),Hq=S(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function OB(e){const t=e.match(Ak);if(!t)return{text:e,metadata:{}};let r=k6(t[1],{schema:C6})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const a={};return r.displayMode&&(a.displayMode=r.displayMode.toString()),r.title&&(a.title=r.title.toString()),r.config&&(a.config=r.config),{text:e.slice(t[0].length),metadata:a}}S(OB,"extractFrontMatter");var Uq=S(e=>e.replace(/\r\n?/g,`
434
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,a)=>"<"+r+a.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),jq=S(e=>{const{text:t,metadata:r}=OB(e),{displayMode:a,title:s,config:l={}}=r;return a&&(l.gantt||(l.gantt={}),l.gantt.displayMode=a),{title:s,config:l,text:t}},"processFrontmatter"),Pq=S(e=>{const t=Tr.detectInit(e)??{},r=Tr.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:a})=>a==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:a$(e),directive:t}},"processDirectives");function Qy(e){const t=Uq(e),r=jq(t),a=Pq(r.text),s=Fy(r.config,a.directive);return e=Hq(a.text),{code:e,title:r.title,config:s}}S(Qy,"preprocessDiagram");function DB(e){const t=new TextEncoder().encode(e),r=Array.from(t,a=>String.fromCodePoint(a)).join("");return btoa(r)}S(DB,"toBase64");var Wq=5e4,Yq="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Gq="sandbox",Xq="loose",Vq="http://www.w3.org/2000/svg",Zq="http://www.w3.org/1999/xlink",Qq="http://www.w3.org/1999/xhtml",Kq="100%",Jq="100%",t7="border:0;margin:0;",e7="margin:0",i7="allow-top-navigation-by-user-activation allow-popups",r7='The "iframe" tag is not supported by your browser.',a7=["foreignobject"],n7=["dominant-baseline"];function Ky(e){const t=Qy(e);return Iu(),lR(t.config??{}),t}S(Ky,"processAndSetConfigs");async function $B(e,t){If();try{const{code:r,config:a}=Ky(e);return{diagramType:(await NB(r)).type,config:a}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}S($B,"parse");var U2=S((e,t,r=[])=>{const a=$k(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${a}`},"cssImportantStyles"),s7=S((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const h=wi(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(f=>{i2(f.styles)||h.forEach(d=>{r.insertRule(U2(f.id,d,f.styles),r.cssRules.length)}),i2(f.textStyles)||r.insertRule(U2(f.id,"tspan",((f==null?void 0:f.textStyles)||[]).map(d=>d.replace("color","fill"))),r.cssRules.length)})}let a="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),a=zg(s)+`
435
+ `}else a+=`${e.themeCSS}
436
+ `;return a+zg(r)},"createCssStyles"),l7=S((e,t)=>Em(mN(`${e}{${t}}`),bN([S(function(a,s,l,c){if(a.type==="rule"&&Array.isArray(a.props)){if(a.parent&&a.parent.type===wm)return;a.props=a.props.map(h=>h.startsWith(e)?h:`${e} ${h}`)}else a.type.startsWith("@")&&([...[iN,aN,V_,sN,"@container","@starting-style"],wm].includes(a.type)||(gt.warn(`Removing unsupported at-rule ${a.type} from CSS`),a.type=Vy))},"addNamespace"),xN])),"compileCSS"),o7=S((e,t,r,a)=>{const s=s7(e,r),l=_R(t,s,{...e.themeVariables,theme:e.theme,look:e.look},a);return l7(a,l)},"createUserStyles"),c7=S((e="",t,r)=>{let a=e;return!r&&!t&&(a=a.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),a=as(a),a=a.replace(/<br>/g,"<br/>"),a},"cleanUpSvgCode"),h7=S((e="",t)=>{var s,l;const r=(l=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&l.height?t.viewBox.baseVal.height+"px":Jq,a=DB(`<body style="${e7}">${e}</body>`);return`<iframe style="width:${Kq};height:${r};${t7}" src="data:text/html;charset=UTF-8;base64,${a}" sandbox="${i7}">
437
+ ${r7}
438
+ </iframe>`},"putIntoIFrame"),j2=S((e,t,r,a,s)=>{const l=e.append("div");l.attr("id",r),a&&l.attr("style",a);const c=l.append("svg").attr("id",t).attr("width","100%").attr("xmlns",Vq);return s&&c.attr("xmlns:xlink",s),c.append("g"),e},"appendDivSvgG");function Am(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}S(Am,"sandboxedIframe");var u7=S((e,t,r,a)=>{var s,l,c;(s=e.getElementById(t))==null||s.remove(),(l=e.getElementById(r))==null||l.remove(),(c=e.getElementById(a))==null||c.remove()},"removeExistingElements"),f7=S(async function(e,t,r){var V,J,Y,j,A,z;If();const a=Ky(t);t=a.code;const s=Le();gt.debug(s),t.length>((s==null?void 0:s.maxTextSize)??Wq)&&(t=Yq);const l=`#${e}`,c="i"+e,h="#"+c,f="d"+e,d="#"+f,p=S(()=>{const M=Wt(x?h:d).node();M&&"remove"in M&&M.remove()},"removeTempElements");let g=Wt(document.body);const x=s.securityLevel===Gq,m=s.securityLevel===Xq,C=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),x){const O=Am(Wt(r),c);g=Wt(O.nodes()[0].contentDocument.body),g.node().style.margin="0"}else g=Wt(r);j2(g,e,f,`font-family: ${C}`,Zq)}else{if(u7(document,e,f,c),x){const O=Am(Wt(document.body),c);g=Wt(O.nodes()[0].contentDocument.body),g.node().style.margin="0"}else g=Wt("body");j2(g,e,f)}let k,v;try{k=await Lm.fromText(t,{title:a.title})}catch(O){if(s.suppressErrorRendering)throw p(),O;k=await Lm.fromText("error"),v=O}const T=g.select(d).node(),_=k.type,E=T.firstChild,R=E.firstChild,F=(J=(V=k.renderer).getClasses)==null?void 0:J.call(V,t,k),N=o7(s,_,F,l),H=document.createElement("style");H.innerHTML=N,E.insertBefore(H,R);try{await k.renderer.draw(t,e,"11.15.0",k)}catch(O){throw s.suppressErrorRendering?p():F9.draw(t,e,"11.15.0"),O}const I=g.select(`${d} svg`),at=(j=(Y=k.db).getAccTitle)==null?void 0:j.call(Y),X=(z=(A=k.db).getAccDescription)==null?void 0:z.call(A);qB(_,I,at,X),g.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",Qq);let D=g.select(d).node().innerHTML;if(gt.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),D=c7(D,x,_a(s.arrowMarkerAbsolute)),x){const O=g.select(d+" svg").node();D=h7(D,O)}else m||(D=El.sanitize(D,{ADD_TAGS:a7,ADD_ATTR:n7,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Iq(),v)throw v;return p(),{diagramType:_,svg:D,bindFunctions:k.db.bindFunctions}},"render");function zB(e={}){var a;const t=Ge({},e);t!=null&&t.fontFamily&&!((a=t.themeVariables)!=null&&a.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),nR(t),t!=null&&t.theme&&t.theme in ka?t.themeVariables=ka[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ka.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?aR(t):zk();Qm(r.logLevel),If()}S(zB,"initialize");var NB=S((e,t={})=>{const{code:r}=Qy(e);return Lm.fromText(r,t)},"getDiagramFromText");function qB(e,t,r,a){RB(t,e),FB(t,r,a,t.attr("id"))}S(qB,"addA11yInfo");var ss=Object.freeze({render:f7,parse:$B,getDiagramFromText:NB,initialize:zB,getConfig:Le,setConfig:Nk,getSiteConfig:zk,updateSiteConfig:sR,reset:S(()=>{Iu()},"reset"),globalReset:S(()=>{Iu(Ll)},"globalReset"),defaultConfig:Ll});Qm(Le().logLevel);Iu(Le());var d7=S((e,t,r)=>{gt.warn(e),Ry(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),IB=S(async function(e={querySelector:".mermaid"}){try{await p7(e)}catch(t){if(Ry(t)&&gt.error(t.str),Vi.parseError&&Vi.parseError(t),!e.suppressErrors)throw gt.error("Use the suppressErrors option to suppress these errors"),t}},"run"),p7=S(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const a=ss.getConfig();gt.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");gt.debug(`Found ${s.length} diagrams`),(a==null?void 0:a.startOnLoad)!==void 0&&(gt.debug("Start On Load: "+(a==null?void 0:a.startOnLoad)),ss.updateSiteConfig({startOnLoad:a==null?void 0:a.startOnLoad}));const l=new Tr.InitIDGenerator(a.deterministicIds,a.deterministicIDSeed);let c;const h=[];for(const f of Array.from(s)){if(gt.info("Rendering diagram: "+f.id),f.getAttribute("data-processed"))continue;f.setAttribute("data-processed","true");const d=`mermaid-${l.next()}`;c=f.innerHTML,c=tw(Tr.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>");const p=Tr.detectInit(c);p&&gt.debug("Detected early reinit: ",p);try{const{svg:g,bindFunctions:x}=await PB(d,c,f);f.innerHTML=g,e&&await e(d),x&&x(f)}catch(g){d7(g,h,Vi.parseError)}}if(h.length>0)throw h[0]},"runThrowsErrors"),HB=S(function(e){ss.initialize(e)},"initialize"),g7=S(async function(e,t,r){gt.warn("mermaid.init is deprecated. Please use run instead."),e&&HB(e);const a={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?a.querySelector=t:t&&(t instanceof HTMLElement?a.nodes=[t]:a.nodes=t),await IB(a)},"init"),m7=S(async(e,{lazyLoad:t=!0}={})=>{If(),Fg(...e),t===!1&&await Nq()},"registerExternalDiagrams"),UB=S(function(){if(Vi.startOnLoad){const{startOnLoad:e}=ss.getConfig();e&&Vi.run().catch(t=>gt.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",UB,!1);var y7=S(function(e){Vi.parseError=e},"setParseErrorHandler"),gf=[],vg=!1,jB=S(async()=>{if(!vg){for(vg=!0;gf.length>0;){const e=gf.shift();if(e)try{await e()}catch(t){gt.error("Error executing queue",t)}}vg=!1}},"executeQueue"),x7=S(async(e,t)=>new Promise((r,a)=>{const s=S(()=>new Promise((l,c)=>{ss.parse(e,t).then(h=>{l(h),r(h)},h=>{var f;gt.error("Error parsing",h),(f=Vi.parseError)==null||f.call(Vi,h),c(h),a(h)})}),"performCall");gf.push(s),jB().catch(a)}),"parse"),PB=S((e,t,r)=>new Promise((a,s)=>{const l=S(()=>new Promise((c,h)=>{ss.render(e,t,r).then(f=>{c(f),a(f)},f=>{var d;gt.error("Error parsing",f),(d=Vi.parseError)==null||d.call(Vi,f),h(f),s(f)})}),"performCall");gf.push(l),jB().catch(s)}),"render"),b7=S(()=>Object.keys(ts).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Vi={startOnLoad:!0,mermaidAPI:ss,parse:x7,render:PB,init:g7,run:IB,registerExternalDiagrams:m7,registerLayoutLoaders:Y_,initialize:HB,parseError:void 0,contentLoaded:UB,setParseErrorHandler:y7,detectType:Km,registerIconPacks:T8,getRegisteredDiagramsMetadata:b7},Mm=Vi;/*! Check if previously processed *//*!
439
+ * Wait for document loaded before starting the execution
440
+ */Mm.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 P2(e,t){const{escapeHtml:r=!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 f=s.map(d=>{if(d.type==="fence")return d;let p=d.content;const g=p.split(`
441
+ `),x=[];let m=!1,C=[],k=0;const v=()=>{const T=C.join(`
442
+ `);try{JSON.parse(T),x.push("\n```json\n"+T+"\n```\n")}catch{x.push(...C)}m=!1,C=[],k=0};for(const T of g){const _=T.trim();!m&&_.startsWith('{"')?(m=!0,C=[T],k=(T.match(/{/g)||[]).length-(T.match(/}/g)||[]).length,k<=0&&v()):m?(C.push(T),k+=(T.match(/{/g)||[]).length-(T.match(/}/g)||[]).length,k<=0&&v()):x.push(T)}if(C.length&&x.push(...C),p=x.join(`
443
+ `),a.test(p)){const T=p.split(`
444
+ `),_=[];let E=[];const R=()=>{E.length>0&&(_.push("\n```\n"+E.join(`
445
+ `).replace(/^\n+/,"").replace(/\n+$/,"")+"\n```\n"),E=[])};for(const F of T)a.test(F)?E.push(F):(R(),_.push(F));R(),p=_.join(`
446
+ `)}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,R)=>E&&_===`
447
+ `||/[{(\[\\/>]$/.test(_)?T:_+`
448
+
449
+ `+R),p=p.replace(/(#{1,6}\s[\u4e00-\u9fffa-zA-Z0-9\s]{1,30}?)(?=[^\u4e00-\u9fffa-zA-Z0-9\s\n#])/g,`$1
450
+ `),p=p.replace(/([^\n\s{}()\[\]"':\/\\>])(- (?!-))/g,`$1
451
+ $2`),p=p.replace(/([^\n\s{}()\[\]"':\/\\>])(\d+\.\s)/g,`$1
452
+ $2`),p=p.replace(/([^\n])(```|~~~)/g,`$1
453
+ $2`),p=p.replace(/^([\u4e00-\u9fffa-zA-Z0-9])([\u{2700}-\u{27BF}\u{1F300}-\u{1F9FF}\u{2600}-\u{26FF}])/gmu,`$1
454
+ $2`),{type:"text",content:p}});if(r){const d=[];for(const p of f){if(p.type==="fence"){d.push(p.content);continue}const g=/(```|~~~)[\s\S]*?\1/g;let x=0,m;for(;(m=g.exec(p.content))!==null;)m.index>x&&d.push(p.content.slice(x,m.index).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")),d.push(m[0]),x=m.index+m[0].length;x<p.content.length&&d.push(p.content.slice(x).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"))}return d.join("")}return f.map(d=>d.content).join("")}function W2(){const{sessionId:e}=KA(),{messages:t,isLoading:r,isHistoryLoading:a,error:s,sendMessage:l,clearMessages:c,abortChat:h,subAgents:f,thinkingStatus:d}=tM(e),{status:p}=bf(),[g,x]=P.useState(""),[m,C]=P.useState(!1),k=P.useRef(new Map),v=P.useRef(null),T=P.useRef(null),_=P.useRef(!0),E=P.useRef(null),[R,F]=P.useState(0),[N,H]=P.useState([]),[I,at]=P.useState(null),[X,D]=P.useState(!1),[V,J]=P.useState([]),[Y,j]=P.useState(null),[A,z]=P.useState(!1);P.useEffect(()=>{(async()=>{try{H(await be.listModels())}catch{}try{const pt=await be.getStatus();at(pt.model),j(pt.currentAgent)}catch{}try{const pt=await be.listAgents();J(pt.agents)}catch{}})()},[]);const O=async pt=>{try{const mt=await be.switchModel(pt.id);mt.success&&at(mt.model)}catch{}D(!1)},M=async pt=>{try{const mt=await be.switchAgent(pt);mt.success&&j(mt.currentAgent)}catch{}z(!1)},Q=P.useMemo(()=>{const pt=new Map;for(const mt of N){const Ct=mt.providerDisplayName??mt.provider;pt.has(Ct)||pt.set(Ct,[]),pt.get(Ct).push(mt)}return pt},[N]),$=f.filter(pt=>pt.status==="running"),tt=()=>{const pt=T.current;pt&&(_.current=pt.scrollHeight-pt.scrollTop-pt.clientHeight<80)};P.useEffect(()=>{var mt;if(!_.current)return;const pt=T.current;pt&&(r?pt.scrollTop=pt.scrollHeight:(mt=v.current)==null||mt.scrollIntoView({behavior:"smooth"}))},[t,$,d,r]),P.useEffect(()=>{if(!d){F(0);return}const pt=setInterval(()=>{F(Math.floor((Date.now()-d.startTime)/1e3))},500);return()=>clearInterval(pt)},[d]);const ct=pt=>{var mt;if(pt.preventDefault(),g.trim()&&!r){_.current=!0;let Ct=g.trim();for(const[Ht,he]of k.current)Ct=Ct.replaceAll(Ht,he);k.current.clear(),l(Ct),x("")}(mt=E.current)==null||mt.focus()};P.useEffect(()=>{var pt;(pt=E.current)==null||pt.focus()},[]),P.useEffect(()=>{var pt;r||(pt=E.current)==null||pt.focus()},[r]),P.useEffect(()=>{const pt=mt=>{mt.key==="Escape"&&r&&(mt.preventDefault(),h())};return window.addEventListener("keydown",pt),()=>window.removeEventListener("keydown",pt)},[r,h]);const ht=P.useRef(0),yt=pt=>{pt.preventDefault(),pt.stopPropagation(),ht.current++,pt.dataTransfer.types.includes("Files")&&C(!0)},xt=pt=>{pt.preventDefault(),pt.stopPropagation(),ht.current--,ht.current===0&&C(!1)},Ft=pt=>{pt.preventDefault(),pt.stopPropagation()},Dt=async pt=>{var Oe;pt.preventDefault(),pt.stopPropagation(),ht.current=0,C(!1);const mt=pt.dataTransfer.files;if(mt.length===0)return;const Ct=[],Ht=[];for(let ne=0;ne<mt.length;ne++){const Ce=mt[ne],mi=Ce.path;mi?Ct.push(mi):Ht.push(Ce)}if(Ht.length>0)try{const ne=Te=>new Promise((Zr,Qr)=>{const yi=new FileReader;yi.onload=()=>Zr(yi.result),yi.onerror=Qr,yi.readAsDataURL(Te)}),Ce=await Promise.all(Ht.map(async Te=>({name:Te.name,data:(await ne(Te)).split(",")[1]}))),mi=await fetch("/api/files/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:Ce})});if(mi.ok){const Te=await mi.json();Ct.push(...Te.paths||[])}}catch(ne){console.error("[aggroot] File upload failed:",ne)}if(Ct.length===0)return;const he=[];for(const ne of Ct){const Ce=ne.includes("/")?"/":"\\",Te=`@${ne.slice(ne.lastIndexOf(Ce)+1)}`;k.current.set(Te,ne),he.push(Te)}x(ne=>{const Ce=he.join(" ");return ne?`${ne} ${Ce}`:Ce}),(Oe=E.current)==null||Oe.focus()};return U.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",position:"relative"},onDragEnter:yt,onDragLeave:xt,onDragOver:Ft,onDrop:Dt,children:[U.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:[U.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,flex:1},children:[U.jsx("h2",{style:{fontSize:16,fontWeight:600},className:"gradient-text",children:"Chat"}),U.jsxs("div",{style:{position:"relative"},children:[U.jsxs("button",{className:"btn-ghost",onClick:()=>{z(!A),D(!1)},style:{fontSize:13,display:"flex",alignItems:"center",gap:4},children:[Y??"Agent",U.jsx("span",{style:{fontSize:10},children:"▼"})]}),A&&U.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:V.map(pt=>U.jsxs("div",{onClick:()=>M(pt.name),style:{padding:"8px 12px",cursor:"pointer",fontSize:13,background:pt.name===Y?"var(--accent-soft)":"transparent",color:pt.name===Y?"var(--accent)":"var(--text-primary)",fontWeight:pt.name===Y?500:400},onMouseEnter:mt=>mt.currentTarget.style.background="var(--bg-hover)",onMouseLeave:mt=>mt.currentTarget.style.background=pt.name===Y?"var(--accent-soft)":"transparent",children:[U.jsx("div",{children:pt.name}),pt.description&&U.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:pt.description})]},pt.name))})]}),U.jsxs("div",{style:{position:"relative"},children:[U.jsxs("button",{className:"btn-ghost",onClick:()=>{D(!X),z(!1)},style:{fontSize:13,display:"flex",alignItems:"center",gap:4},children:[(I==null?void 0:I.name)??"Select Model",U.jsx("span",{style:{fontSize:10},children:"▼"})]}),X&&U.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(Q.entries()).map(([pt,mt])=>U.jsxs("div",{children:[U.jsx("div",{style:{padding:"6px 12px",fontSize:11,fontWeight:600,color:"var(--violet)",textTransform:"uppercase",letterSpacing:.5},children:pt}),mt.map(Ct=>U.jsx("div",{onClick:()=>O(Ct),style:{padding:"8px 12px",cursor:"pointer",fontSize:13,background:Ct.id===(I==null?void 0:I.id)?"var(--accent-soft)":"transparent",color:Ct.id===(I==null?void 0:I.id)?"var(--accent)":"var(--text-primary)",fontWeight:Ct.id===(I==null?void 0:I.id)?500:400},onMouseEnter:Ht=>Ht.currentTarget.style.background="var(--bg-hover)",onMouseLeave:Ht=>Ht.currentTarget.style.background=Ct.id===(I==null?void 0:I.id)?"var(--accent-soft)":"transparent",children:Ct.name},Ct.id))]},pt))})]})]}),(p==null?void 0:p.workingDirectory)&&U.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:[U.jsx("span",{style:{flexShrink:0,fontSize:10,fontWeight:600,color:"var(--violet)"},children:"WorkDir:"}),U.jsx("span",{style:{fontFamily:"monospace",color:"var(--text-secondary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.workingDirectory})]}),U.jsx("button",{className:"btn-ghost",onClick:c,children:"Clear"})]}),U.jsxs("div",{ref:T,onScroll:tt,style:{flex:1,overflow:"auto",padding:"16px 20px"},children:[a?U.jsx("div",{style:{textAlign:"center",color:"var(--text-muted)",marginTop:80,fontSize:14},children:"Loading history..."}):t.length===0&&!d&&U.jsxs("div",{style:{textAlign:"center",color:"var(--text-muted)",marginTop:80,fontSize:14},children:[U.jsx("div",{style:{fontSize:48,marginBottom:16,opacity:.3},children:"💬"}),"Start a conversation by typing a message below."]}),t.map(pt=>U.jsx(S7,{message:pt},pt.id)),$.length>0?U.jsx(v7,{agents:$}):d?U.jsx(k7,{status:d,elapsed:R}):null,s&&U.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}),U.jsx("div",{ref:v})]}),U.jsx("form",{onSubmit:ct,style:{padding:"0 20px 16px",display:"flex",alignItems:"flex-end",gap:0},children:U.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:[U.jsx("textarea",{ref:E,value:g,onChange:pt=>x(pt.target.value),onKeyDown:pt=>{pt.key==="Enter"&&!pt.shiftKey&&(pt.preventDefault(),ct(pt))},placeholder:"Type a message... (Shift+Enter for new line)",disabled:r,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"}}),U.jsx("button",{type:"submit",disabled:r||!g.trim(),style:{background:g.trim()&&!r?"var(--accent)":"var(--bg-hover)",color:g.trim()&&!r?"white":"var(--text-muted)",border:"none",borderRadius:"0 var(--radius-lg) var(--radius-lg) 0",padding:"14px 18px",cursor:g.trim()&&!r?"pointer":"default",fontSize:16,display:"flex",alignItems:"center",transition:"all 0.2s",alignSelf:"stretch"},children:U.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[U.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),U.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})}),m&&U.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:U.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 Sg=["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"],Tg=["○","◎","●","◎"];function WB(e=80){const[t,r]=P.useState(0);return P.useEffect(()=>{const a=setInterval(()=>r(s=>(s+1)%Sg.length),e);return()=>clearInterval(a)},[e]),Sg[t%Sg.length]}function C7(e=375){const[t,r]=P.useState(0);return P.useEffect(()=>{const a=setInterval(()=>r(s=>(s+1)%Tg.length),e);return()=>clearInterval(a)},[e]),Tg[t%Tg.length]}function YB(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 k7({status:e,elapsed:t}){const r=WB(),{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 U.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:[U.jsx("span",{style:{color:a,fontFamily:"monospace",fontWeight:700},children:r}),U.jsxs("span",{style:{color:a,fontWeight:500,fontSize:11,opacity:.7},children:["[",l,"]"]}),U.jsx("span",{style:{color:"var(--text-secondary)"},children:e.text}),t>0&&U.jsx("span",{style:{color:"var(--text-muted)",fontSize:11,marginLeft:"auto"},children:YB(t)}),U.jsx("span",{style:{color:"var(--text-muted)",fontSize:11},children:"[ESC打断]"})]})}const Y2=["#6366f1","#8b5cf6","#a855f7","#d946ef","#ec4899","#f43f5e"];function v7({agents:e}){const t=WB(),r=C7(),[a,s]=P.useState(Date.now());P.useEffect(()=>{const h=setInterval(()=>s(Date.now()),1e3);return()=>clearInterval(h)},[]);const l=Math.min(...e.map(h=>h.startTime)),c=YB(Math.floor((a-l)/1e3));return U.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:[U.jsxs("div",{children:[U.jsx("span",{style:{color:"var(--amber)",fontFamily:"monospace",fontWeight:700},children:t})," ",U.jsx("span",{style:{color:"var(--amber)",fontWeight:600},children:"SubagentExecutor"})," ",U.jsxs("span",{style:{color:"var(--text-muted)"},children:["[",c,"]"]})]}),e.map((h,f)=>{const p=f===e.length-1?" └─ ":" ├─ ",g=h.lines.length>0?h.lines[h.lines.length-1]:"思考中...",x=h.toolCount>0?` ${h.toolCount} tools`:"",m=Y2[f%Y2.length];return U.jsxs("div",{children:[U.jsx("span",{style:{color:"var(--text-muted)"},children:p}),U.jsx("span",{style:{color:m,fontWeight:500},children:h.name})," ",U.jsx("span",{style:{color:m,opacity:.6},children:r})," ",U.jsxs("span",{style:{color:"var(--text-muted)"},children:[g,x]})]},h.id)})]})}function S7({message:e}){const t=e.role==="user",[r,a]=P.useState(!1),[s,l]=P.useState(null),c=P.useRef(null),h=P.useRef(null),f=P.useRef(!0);P.useEffect(()=>{e.isStreaming&&e.reasoning&&(a(!0),f.current=!0)},[e.isStreaming,e.reasoning]);const d=()=>{const C=c.current;C&&(f.current=C.scrollHeight-C.scrollTop-C.clientHeight<40)};P.useEffect(()=>{r&&f.current&&c.current&&(c.current.scrollTop=c.current.scrollHeight)},[e.reasoning,r]);const p=P.useMemo(()=>{if(t)return null;try{const C=new ce.Renderer,k=C.code.bind(C);let v=0;C.code=_=>_.lang==="mermaid"?(v++,`<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=ce.parse(P2(e.content||""),{async:!1,renderer:C});return console.log(`[mermaid-debug] useMemo htmlContent: mermaidBlocks=${v}, 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]=P.useState(null);P.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 v=k[0];console.log(`[mermaid-debug] First diagram data-mermaid preview: ${(v.dataset.mermaid||"").slice(0,100)}`)}if(k.length===0){l(p);return}(async()=>{let v=0;for(const _ of Array.from(k)){const E=_,R=decodeURIComponent(E.dataset.mermaid??""),F=v++;let N=!1;try{await Mm.parse(R),N=!0,console.log(`[mermaid-debug#${F}] Parse OK, srcLen=${R.length}`)}catch(H){console.warn(`[mermaid-debug#${F}] 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)">${R.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:I}=await Mm.render(H,R);console.log(`[mermaid-debug#${F}] Render OK, svgLen=${I.length}`);const at=`cb_${Date.now()}_${Math.random().toString(36).slice(2,8)}`;window.__mermaidCb||(window.__mermaidCb={}),window.__mermaidCb[at]={svg:I,async save(V){try{const J=new Blob([I],{type:"image/svg+xml"}),Y=URL.createObjectURL(J),j=document.createElement("a");j.href=Y,j.download=`diagram-${Date.now()}.svg`,document.body.appendChild(j),j.click(),document.body.removeChild(j),URL.revokeObjectURL(Y),V.textContent="Saved!",V.style.color="var(--emerald)",setTimeout(()=>{V.textContent="Save SVG",V.style.color="var(--text-muted)"},2e3)}catch{V.textContent="Failed!",V.style.color="var(--red)",setTimeout(()=>{V.textContent="Save SVG",V.style.color="var(--text-muted)"},2e3)}},fullscreen(){console.log("[bind-debug] Fullscreen via inline onclick!"),x(I)}};const X=`<div class="mermaid-toolbar" style="position:absolute;top:8px;right:8px;display:flex;gap:4px;z-index:5;opacity:1;pointer-events:auto;">
455
+ <button onclick="window.__mermaidCb['${at}'].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>
456
+ <button onclick="event.stopPropagation();window.__mermaidCb['${at}'].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>
457
+ </div>`;E.innerHTML=I+X,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['${at}'].fullscreen()`);const D=E.querySelector("svg");D&&(D.style.maxWidth="100%",D.style.height="auto",D.style.color="inherit"),console.log(`[mermaid-debug#${F}] Toolbar added, final div HTML len=${E.outerHTML.length}`)}catch(H){console.error(`[mermaid-debug#${F}] 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)">${R.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]),P.useEffect(()=>{const C=h.current;if(!C||t)return;C.querySelectorAll("pre").forEach(v=>{var F,N;if((F=v.parentElement)!=null&&F.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 H=v.querySelector("code"),I=(H==null?void 0:H.textContent)||v.textContent||"";try{await navigator.clipboard.writeText(I),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 R=document.createElement("div");R.className="pre-copy-wrapper",R.style.position="relative",(N=v.parentNode)==null||N.insertBefore(R,v),R.appendChild(v),R.appendChild(T)})},[p,t]),P.useEffect(()=>{if(!g)return;const C=k=>{k.key==="Escape"&&x(null)};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[g]);const m=e.reasoning?Math.max(1,Math.round(e.reasoning.length/50)):0;return U.jsxs("div",{style:{marginBottom:16,display:"flex",justifyContent:t?"flex-end":"flex-start"},children:[U.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&&U.jsxs("div",{style:{marginBottom:8},children:[U.jsxs("div",{onClick:()=>a(!r),style:{cursor:"pointer",display:"flex",alignItems:"center",gap:6,fontSize:12,color:"var(--cyan)",userSelect:"none"},children:[U.jsx("span",{style:{fontSize:10,transition:"transform 0.2s",transform:r?"rotate(90deg)":"rotate(0)"},children:"▸"}),U.jsx("span",{style:{fontWeight:500},children:"💭 Thinking"}),!e.isStreaming&&m>0&&U.jsxs("span",{style:{fontSize:11,color:"var(--text-muted)"},children:["(",m,"s)"]})]}),r&&U.jsx("div",{ref:c,onScroll:d,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 ce.parse(P2(e.reasoning||"",{escapeHtml:!0}),{async:!1})}catch{return(e.reasoning||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}})()}})]}),t?U.jsx("div",{style:{whiteSpace:"pre-wrap"},children:e.content}):U.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&&U.jsx("span",{className:"cursor",children:"▌"}),e.toolCalls&&e.toolCalls.length>0&&U.jsx("div",{style:{marginTop:8},children:e.toolCalls.map(C=>U.jsx(E7,{toolCall:C},C.id))})]}),(g&&console.log(`[mermaid-debug] Fullscreen modal RENDERING: svgLen=${g.length}`),null),g&&U.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:U.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:[U.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},children:[U.jsx("span",{style:{fontSize:13,color:"var(--text-muted)",fontWeight:500},children:"📊 Architecture Diagram"}),U.jsx("button",{onClick:()=>{const C=new Blob([g],{type:"image/svg+xml"}),k=URL.createObjectURL(C),v=document.createElement("a");v.href=k,v.download=`diagram-${Date.now()}.svg`,document.body.appendChild(v),v.click(),document.body.removeChild(v),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"}),U.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)"})]}),U.jsx("div",{dangerouslySetInnerHTML:{__html:g}}),U.jsx("div",{style:{marginTop:8,textAlign:"center",fontSize:11,color:"var(--text-muted)"},children:"Click outside or press ESC to close"})]})})]})}function T7(e){const t=e.trim();if((t.startsWith("{")||t.startsWith("["))&&t.length>2)try{const r=JSON.parse(t);return{html:JSON.stringify(r,null,2),isJson:!0}}catch{}return{html:e.replace(/\n{4,}/g,`
458
+
459
+ `),isJson:!1}}function w7(e){try{const t=JSON.parse(e);if(t.command)return t.command}catch{}return""}function _7(e){return e.name==="Shell"||e.name==="Bash"}const B7=({children:e,style:t})=>U.jsx("span",{style:{fontSize:11,fontFamily:"'JetBrains Mono', 'Fira Code', Consolas, monospace",...t},children:e});function E7({toolCall:e}){const{color:t,bg:r,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=P.useRef(null),h=_7(e),f=P.useMemo(()=>{if(!e.argsPreview)return"";const m=e.argsPreview.trim();if((m.startsWith("{")||m.startsWith("["))&&m.length>2)try{const C=JSON.parse(m);return JSON.stringify(C,null,2)}catch{}return e.argsPreview},[e.argsPreview]),d=P.useMemo(()=>h?w7(e.argsPreview):"",[h,e.argsPreview]),p=P.useMemo(()=>e.result?T7(e.result):null,[e.result]);P.useEffect(()=>{const m=c.current;if(!m||!l||m.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")},v=()=>{C.textContent!=="Copied!"&&(C.style.opacity="0")};C.addEventListener("mouseenter",k),C.addEventListener("mouseleave",v),C.addEventListener("click",async()=>{let T="";if(h){const _=[];d&&_.push(`$ ${d}`),e.stdout&&_.push(e.stdout),e.stderr&&_.push(`[stderr] ${e.stderr}`),T=_.join(`
460
+
461
+ `)}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{}}),m.style.position="relative",m.appendChild(C)},[l,h,d,e.stdout,e.stderr,e.result]);const g=(m,C)=>m.length>C?m.slice(0,C)+`
462
+ … (truncated)`:m,x=m=>m.replace(/^\[Shell:[^\]]*\]\n?/,"").replace(/^\[IMPORTANT[^\n]*\n?/,"").trim();return U.jsxs("div",{style:{background:r,borderRadius:"var(--radius)",padding:"8px 12px",marginBottom:6,borderLeft:`3px solid ${t}`,border:`1px solid ${a}`,borderLeftWidth:3,fontSize:12},children:[U.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[U.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[U.jsx("span",{style:{color:t,fontSize:10},children:s}),U.jsx("span",{style:{fontWeight:600,color:t},children:e.name}),h&&d&&U.jsxs(B7,{style:{color:"var(--text-muted)",fontWeight:400,maxWidth:300,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["$ ",d.length>60?d.slice(0,60)+"…":d]})]}),U.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[e.duration!==void 0&&U.jsxs("span",{style:{color:"var(--text-muted)",fontSize:11},children:[e.duration,"ms"]}),l&&(e.success!==!1?U.jsx("span",{style:{color:"var(--emerald)",fontSize:11,fontWeight:700},children:"✓"}):U.jsx("span",{style:{color:"var(--rose)",fontSize:11,fontWeight:700},children:"✗"}))]})]}),!h&&f&&U.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(f,300)}),U.jsx("div",{ref:c,style:{marginTop:4},children:l?h?U.jsxs("div",{children:[e.stdout&&(()=>{const m=x(e.stdout);return!m&&!e.stderr?U.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)"}):m?U.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(m,3e3)}):null})(),e.stderr&&U.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:[U.jsx("span",{style:{opacity:.6,marginRight:6},children:"[stderr]"}),g(e.stderr,1500)]})]}):U.jsx("div",{style:{padding:6,background:p!=null&&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!=null&&p.isJson?"var(--sky)":"var(--text-secondary)",fontSize:11,fontFamily:p!=null&&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 L7(){const{sessions:e,isLoading:t,fetchSessions:r,createSession:a,deleteSession:s,deleteAllSessions:l,clearSession:c}=eM(),h=Bc(),{setCurrentSession:f,refreshStatus:d,clearMessageCache:p}=bf(),[g,x]=P.useState(null),[m,C]=P.useState(""),[k,v]=P.useState(null),[T,_]=P.useState(!1);P.useEffect(()=>{r()},[r]);const E=async()=>{const X=await a();f({id:X.id,name:X.name??"New Session",messageCount:0}),h(`/chat/${X.id}`)},R=async X=>{v(null);try{await s(X),p(X),d()}catch(D){console.error("Failed to delete session:",D),r()}},F=async()=>{_(!1);try{await l(),p("__default__"),d()}catch(X){console.error("Failed to delete all sessions:",X),r()}},N=async X=>{try{await c(X),p(X),d()}catch(D){console.error("Failed to clear session:",D)}},H=async X=>{if(!m.trim()){x(null);return}try{await be.renameSession(X,m.trim()),x(null),await r(),d()}catch{}},I=async(X,D)=>{try{await be.activateSession(X),f({id:D.id,name:D.name??D.id.slice(0,8),messageCount:D.messageCount??0}),h(`/chat/${X}`)}catch{}},at=X=>{x(X.id),C(X.name??"")};return U.jsxs("div",{style:{padding:24},children:[U.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:20},children:[U.jsx("h2",{style:{fontSize:18,fontWeight:600},children:"Sessions"}),U.jsxs("div",{style:{display:"flex",gap:8},children:[e.length>0&&(T?U.jsxs(U.Fragment,{children:[U.jsx("button",{className:"btn-ghost",onClick:F,style:{fontSize:12,padding:"4px 10px",color:"var(--dangerous)"},children:"Confirm Delete All"}),U.jsx("button",{className:"btn-ghost",onClick:()=>_(!1),style:{fontSize:12,padding:"4px 10px"},children:"Cancel"})]}):U.jsx("button",{className:"btn-ghost",onClick:()=>_(!0),style:{fontSize:12,padding:"4px 10px"},children:"Delete All"})),U.jsx("button",{className:"btn-primary",onClick:E,children:"New Session"})]})]}),t?U.jsx("div",{style:{color:"var(--text-muted)",textAlign:"center",padding:40},children:"Loading..."}):e.length===0?U.jsx("div",{style:{color:"var(--text-muted)",textAlign:"center",padding:40},children:"No sessions yet"}):U.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:e.map(X=>U.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:()=>I(X.id,X),onMouseEnter:D=>D.currentTarget.style.borderColor="var(--accent)",onMouseLeave:D=>D.currentTarget.style.borderColor="var(--border)",children:[U.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[g===X.id?U.jsx("input",{value:m,onChange:D=>C(D.target.value),onKeyDown:D=>{D.key==="Enter"&&H(X.id),D.key==="Escape"&&x(null)},onBlur:()=>H(X.id),onClick:D=>D.stopPropagation(),autoFocus:!0,style:{flex:1,fontSize:14,fontWeight:500,padding:"2px 6px"}}):U.jsx("span",{style:{fontWeight:500,fontSize:14,flex:1},children:X.name??X.id.slice(0,8)}),U.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center"},onClick:D=>D.stopPropagation(),children:[U.jsx("button",{className:"btn-ghost",onClick:()=>at(X),style:{fontSize:11,padding:"2px 6px"},title:"Rename",children:"✎"}),U.jsx("button",{className:"btn-ghost",onClick:()=>N(X.id),style:{fontSize:11,padding:"2px 6px"},title:"Clear messages",children:"⊘"}),k===X.id?U.jsxs(U.Fragment,{children:[U.jsx("button",{className:"btn-ghost",onClick:()=>R(X.id),style:{fontSize:11,padding:"2px 6px",color:"var(--dangerous)"},children:"Confirm"}),U.jsx("button",{className:"btn-ghost",onClick:()=>v(null),style:{fontSize:11,padding:"2px 6px"},children:"Cancel"})]}):U.jsx("button",{className:"btn-ghost",onClick:()=>v(X.id),style:{fontSize:11,padding:"2px 6px"},title:"Delete",children:"✕"})]})]}),U.jsxs("div",{style:{color:"var(--text-muted)",fontSize:12,marginTop:4},children:[X.agentName??X.agentType??"main"," · ",X.messageCount??0," messages · ",new Date(X.createdAt).toLocaleString()]})]},X.id))})]})}const wg=[{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 A7(){const[e,t]=P.useState(null),[r,a]=P.useState({}),[s,l]=P.useState("safe_only"),[c,h]=P.useState(!1),[f,d]=P.useState(!1),[p,g]=P.useState(new Set),[x,m]=P.useState([]),[C,k]=P.useState(!1),[v,T]=P.useState({id:"",name:"",baseUrl:"",apiKey:"",contextLength:128e3,supportsTools:!0,isReasoningModel:!1}),[_,E]=P.useState(""),[R,F]=P.useState(!1);P.useEffect(()=>{(async()=>{var D;try{const V=await be.getSettings();t(V);const J={};for(const Y of wg)Y.apiKeyEnvVar&&(J[Y.apiKeyEnvVar]=V.env[Y.apiKeyEnvVar]??""),Y.baseUrlEnvVar&&(J[Y.baseUrlEnvVar]=V.env[Y.baseUrlEnvVar]??"");a(J),l(((D=V.preferences)==null?void 0:D.approvalMode)??"safe_only"),V.customModels&&m(V.customModels)}catch{}})()},[]);const N=D=>{g(V=>{const J=new Set(V);return J.has(D)?J.delete(D):J.add(D),J})},H=async()=>{var D,V;h(!0),d(!1);try{const J={};for(const[j,A]of Object.entries(r)){const z=(e==null?void 0:e.env[j])??"";A!==z&&(J[j]=A)}const Y={};if(s!==(((D=e==null?void 0:e.preferences)==null?void 0:D.approvalMode)??"safe_only")&&(Y.approvalMode=s),Object.keys(J).length>0||Object.keys(Y).length>0){await be.updateSettings({env:J,preferences:Y});const j=await be.getSettings();t(j);const A={};for(const z of wg)z.apiKeyEnvVar&&(A[z.apiKeyEnvVar]=j.env[z.apiKeyEnvVar]??""),z.baseUrlEnvVar&&(A[z.baseUrlEnvVar]=j.env[z.baseUrlEnvVar]??"");a(A),l(((V=j.preferences)==null?void 0:V.approvalMode)??"safe_only")}d(!0)}catch{}h(!1)},I=D=>{a(V=>({...V,[D]:""}))},at=async()=>{if(!v.id||!v.name||!v.baseUrl){E("Model ID, Name, and Base URL are required");return}F(!0),E("");try{const D=await be.addCustomModel({id:v.id,name:v.name,baseUrl:v.baseUrl,apiKey:v.apiKey||void 0,contextLength:v.contextLength??128e3,supportsTools:v.supportsTools??!1,isReasoningModel:v.isReasoningModel??!1});if(D.success){const V=await be.getSettings();V.customModels&&m(V.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")}F(!1)},X=async D=>{try{await be.removeCustomModel(D),m(V=>V.filter(J=>J.id!==D))}catch{}};return U.jsxs("div",{style:{padding:24,maxWidth:700},children:[U.jsx("h2",{style:{fontSize:18,fontWeight:600,marginBottom:20},children:"Settings"}),U.jsxs("section",{style:{marginBottom:24},children:[U.jsx("h3",{style:{fontSize:14,fontWeight:600,marginBottom:10,color:"var(--text-secondary)"},children:"Approval Mode"}),U.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=>U.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:[U.jsx("input",{type:"radio",name:"approvalMode",value:D.value,checked:s===D.value,onChange:()=>l(D.value),style:{marginTop:3}}),U.jsxs("div",{children:[U.jsx("div",{style:{fontWeight:500,fontSize:13},children:D.label}),U.jsx("div",{style:{fontSize:12,color:"var(--text-muted)"},children:D.desc})]})]},D.value))})]}),U.jsxs("section",{style:{marginBottom:24},children:[U.jsx("h3",{style:{fontSize:14,fontWeight:600,marginBottom:10,color:"var(--text-secondary)"},children:"Model Provider Configuration"}),U.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:wg.map(D=>{const V=p.has(D.name),J=r[D.apiKeyEnvVar]??"",Y=r[D.baseUrlEnvVar]??"",j=!!J,A=!!Y&&Y!==D.defaultBaseUrl;return U.jsxs("div",{style:{background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--border)",overflow:"hidden"},children:[U.jsxs("div",{onClick:()=>N(D.name),style:{padding:"10px 14px",display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",userSelect:"none"},children:[U.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[U.jsx("span",{style:{fontSize:10,transition:"transform 0.2s",transform:V?"rotate(90deg)":"rotate(0)"},children:"▸"}),U.jsx("span",{style:{fontWeight:500,fontSize:14},children:D.name})]}),U.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[j&&U.jsx("span",{style:{color:"var(--safe)",fontSize:11},children:"Key set"}),A&&U.jsx("span",{style:{color:"var(--moderate)",fontSize:11},children:"Custom URL"}),!j&&!A&&!V&&U.jsx("span",{style:{color:"var(--text-muted)",fontSize:11},children:"Not configured"})]})]}),V&&U.jsxs("div",{style:{padding:"4px 14px 14px",display:"flex",flexDirection:"column",gap:12},children:[D.apiKeyEnvVar&&U.jsxs("div",{children:[U.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"API Key"}),U.jsxs("div",{style:{display:"flex",gap:6},children:[U.jsx("input",{type:"password",value:J,onChange:z=>a(O=>({...O,[D.apiKeyEnvVar]:z.target.value})),placeholder:D.apiKeyEnvVar,style:{flex:1}}),j&&U.jsx("button",{className:"btn-ghost",onClick:()=>I(D.apiKeyEnvVar),style:{fontSize:11,padding:"4px 8px"},children:"Clear"})]}),U.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:["Env: ",D.apiKeyEnvVar]})]}),D.baseUrlEnvVar&&U.jsxs("div",{children:[U.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Base URL"}),U.jsx("input",{type:"text",value:Y,onChange:z=>a(O=>({...O,[D.baseUrlEnvVar]:z.target.value})),placeholder:D.defaultBaseUrl,style:{width:"100%"}}),U.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:["Env: ",D.baseUrlEnvVar]})]})]})]},D.name)})})]}),U.jsxs("section",{style:{marginBottom:24},children:[U.jsx("h3",{style:{fontSize:14,fontWeight:600,marginBottom:10,color:"var(--text-secondary)"},children:"Custom Models (自定义模型)"}),U.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&&U.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6,marginBottom:10},children:x.map(D=>U.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:[U.jsxs("div",{children:[U.jsx("span",{style:{fontWeight:500,fontSize:13},children:D.name}),U.jsxs("span",{style:{color:"var(--text-muted)",fontSize:11,marginLeft:8},children:[D.id," · ",D.baseUrl]})]}),U.jsx("button",{className:"btn-ghost",onClick:()=>X(D.id),style:{fontSize:11,padding:"2px 8px",color:"var(--danger)"},children:"Remove"})]},D.id))}),C?U.jsxs("div",{style:{padding:16,background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--border)"},children:[U.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12},children:[U.jsxs("div",{children:[U.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:'Model ID * (unique, e.g. "my-llama-70b")'}),U.jsx("input",{type:"text",value:v.id??"",onChange:D=>T(V=>({...V,id:D.target.value})),placeholder:"my-llama-70b",style:{width:"100%"}})]}),U.jsxs("div",{children:[U.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Display Name *"}),U.jsx("input",{type:"text",value:v.name??"",onChange:D=>T(V=>({...V,name:D.target.value})),placeholder:"My LLaMA 70B",style:{width:"100%"}})]}),U.jsxs("div",{style:{gridColumn:"1 / -1"},children:[U.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Base URL * (OpenAI-compatible endpoint)"}),U.jsx("input",{type:"text",value:v.baseUrl??"",onChange:D=>T(V=>({...V,baseUrl:D.target.value})),placeholder:"http://localhost:11434/v1",style:{width:"100%"}})]}),U.jsxs("div",{children:[U.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"API Key (optional)"}),U.jsx("input",{type:"password",value:v.apiKey??"",onChange:D=>T(V=>({...V,apiKey:D.target.value})),placeholder:"sk-...",style:{width:"100%"}})]}),U.jsxs("div",{children:[U.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Context Length"}),U.jsx("input",{type:"number",value:v.contextLength??128e3,onChange:D=>T(V=>({...V,contextLength:Number(D.target.value)||128e3})),placeholder:"128000",style:{width:"100%"}})]})]}),U.jsxs("div",{style:{display:"flex",gap:16,marginTop:12},children:[U.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12,cursor:"pointer"},children:[U.jsx("input",{type:"checkbox",checked:v.supportsTools??!1,onChange:D=>T(V=>({...V,supportsTools:D.target.checked}))}),"Supports Tool Calling"]}),U.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12,cursor:"pointer"},children:[U.jsx("input",{type:"checkbox",checked:v.isReasoningModel??!1,onChange:D=>T(V=>({...V,isReasoningModel:D.target.checked}))}),"Reasoning Model"]})]}),_&&U.jsx("div",{style:{color:"var(--danger)",fontSize:12,marginTop:8},children:_}),U.jsxs("div",{style:{display:"flex",gap:8,marginTop:12},children:[U.jsx("button",{className:"btn-primary",onClick:at,disabled:R,style:{fontSize:12,padding:"4px 12px"},children:R?"Adding...":"Add Model"}),U.jsx("button",{className:"btn-ghost",onClick:()=>{k(!1),E("")},style:{fontSize:12,padding:"4px 12px"},children:"Cancel"})]})]}):U.jsx("button",{className:"btn-ghost",onClick:()=>k(!0),style:{fontSize:12},children:"+ Add Custom Model"})]}),U.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:8,marginBottom:40},children:[U.jsx("button",{className:"btn-primary",onClick:H,disabled:c,children:c?"Saving...":"Save Settings"}),f&&U.jsx("span",{style:{color:"var(--safe)",fontSize:13},children:"Saved"})]})]})}fA.createRoot(document.getElementById("root")).render(U.jsx(aA.StrictMode,{children:U.jsx(q3,{children:U.jsx(Q3,{children:U.jsx(g3,{children:U.jsxs(jn,{path:"/",element:U.jsx(J3,{}),children:[U.jsx(jn,{index:!0,element:U.jsx(f3,{to:"/chat",replace:!0})}),U.jsx(jn,{path:"chat",element:U.jsx(W2,{})}),U.jsx(jn,{path:"chat/:sessionId",element:U.jsx(W2,{})}),U.jsx(jn,{path:"sessions",element:U.jsx(L7,{})}),U.jsx(jn,{path:"settings",element:U.jsx(A7,{})})]})})})})}));export{j6 as $,Mc as A,_8 as B,Wr as C,Wo as D,IT as E,Yk as F,il as G,ly as H,P7 as I,C6 as J,Ba as K,Xg as L,st as M,D6 as N,A6 as O,XM as P,as as Q,Ni as R,I7 as S,Dk as T,qt as U,sy as V,w6 as W,j1 as X,lv as Y,t$ as Z,VM as _,Fc as a,Wt as a$,P6 as a0,o$ as a1,MR as a2,LR as a3,Le as a4,re as a5,Rm as a6,FR as a7,K7 as a8,wi as a9,yz as aA,nt as aB,nD as aC,Ac as aD,k6 as aE,gt as aF,M6 as aG,Jz as aH,W7 as aI,Y7 as aJ,hv as aK,BT as aL,AT as aM,Mf as aN,T1 as aO,uy as aP,Sz as aQ,lI as aR,El as aS,c$ as aT,E6 as aU,T8 as aV,cI as aW,Wk as aX,EF as aY,mn as aZ,Lr as a_,zc as aa,v6 as ab,hI as ac,$T as ad,Oy as ae,wy as af,I5 as ag,gR as ah,z7 as ai,P1 as aj,pc as ak,H7 as al,Q8 as am,Ez as an,vz as ao,U_ as ap,H6 as aq,U6 as ar,I6 as as,dn as at,z1 as au,DF as av,Mr as aw,HT as ax,Ty as ay,Bu as az,S as b,pD as b0,AR as b1,ER as b2,q7 as b3,RR as b4,nI as b5,R6 as b6,SR as b7,DR as b8,G7 as b9,X7 as ba,_T as bb,_t as bc,L6 as bd,V7 as be,N6 as bf,q6 as bg,$6 as bh,z6 as bi,S8 as bj,Et as bk,Tr as bl,eD as bm,f$ as bn,Kt as c,U7 as d,Z7 as e,_k as f,LT as g,iD as h,O6 as i,F6 as j,Q7 as k,Ge as l,St as m,j7 as n,ET as o,N7 as p,My as q,NT as r,wa as s,Fy as t,BR as u,oI as v,aI as w,sI as x,yc as y,Gk as z};